• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
      • Zcash
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Poseidon
      • Where-do-i-place-my-book
      • Axe
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
                • Expression
                • Syntax-abstraction
                • Statement
                • Files
                • Input-files
                • Identifiers
                • Types
                • Struct-init
                • Branch
                • Statements
                • Format-strings
                • Input-syntax-abstraction
                • Expressions
                  • Binop
                    • Binopp
                    • Binop-case
                    • Binop-fix
                    • Binop-kind
                    • Binop-equiv
                    • Binop-add
                    • Binop-sub
                    • Binop-gt
                    • Binop-sub-wrapped
                    • Binop-shr-wrapped
                    • Binop-shr
                    • Binop-shl-wrapped
                    • Binop-shl
                    • Binop-rem-wrapped
                    • Binop-rem
                    • Binop-pow-wrapped
                    • Binop-pow
                    • Binop-or
                    • Binop-nor
                    • Binop-ne
                    • Binop-nand
                    • Binop-mul-wrapped
                    • Binop-mul
                    • Binop-lt
                    • Binop-le
                    • Binop-ge
                    • Binop-eq
                    • Binop-div-wrapped
                    • Binop-div
                    • Binop-bitxor
                    • Binop-bitior
                    • Binop-bitand
                    • Binop-and
                    • Binop-add-wrapped
                  • Unop
                  • Expression-option
                  • Struct-init-list-result
                  • Expression-option-result
                  • Unop-result
                  • Struct-init-result
                  • Expression-result
                  • Expression-list-result
                  • Binop-result
                  • Expression-fixtypes
                • Output-files
                • Addresses
                • Literals
                • Characters
                • Expression-list
                • Statement-list
                • Output-syntax-abstraction
                • Struct-init-list
                • Branch-list
                • Annotations
                • Abstract-syntax-trees
                • Symbols
                • Keywords
                • Programs
                • Packages
                • Bit-sizes
              • Dynamic-semantics
              • Compilation
              • Static-semantics
              • Concrete-syntax
      • Bigmems
      • Builtins
      • Execloader
      • Solidity
      • Paco
      • Concurrent-programs
      • Bls12-377-curves
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Expressions

Binop

Fixtype of Leo binary operators.

This is a tagged union type, introduced by fty::deftagsum.

Member Tags → Types
:and → binop-and
:or → binop-or
:eq → binop-eq
:ne → binop-ne
:ge → binop-ge
:gt → binop-gt
:le → binop-le
:lt → binop-lt
:bitxor → binop-bitxor
:bitior → binop-bitior
:bitand → binop-bitand
:shl → binop-shl
:shr → binop-shr
:add → binop-add
:sub → binop-sub
:mul → binop-mul
:div → binop-div
:rem → binop-rem
:pow → binop-pow
:nand → binop-nand
:nor → binop-nor
:shl-wrapped → binop-shl-wrapped
:shr-wrapped → binop-shr-wrapped
:add-wrapped → binop-add-wrapped
:sub-wrapped → binop-sub-wrapped
:mul-wrapped → binop-mul-wrapped
:div-wrapped → binop-div-wrapped
:rem-wrapped → binop-rem-wrapped
:pow-wrapped → binop-pow-wrapped

These are the four boolean operations, the six comparisons, the three bitwise operations, the four shift operations, the ten arithmetic operations, and two raise-to-power operations.

This type does not distinguish between different syntaxes that can be used to create a binary operator; for example, a>b and a.gt(b) both create an expression of kind :binary) with op @('(binop-gt). This is because these two syntaxes have the same meaning. However, if we wish to capture such information we could do that here.

See binop-for-opcall-name for more information.

Subtopics

Binopp
Recognizer for binop structures.
Binop-case
Case macro for the different kinds of binop structures.
Binop-fix
Fixing function for binop structures.
Binop-kind
Get the kind (tag) of a binop structure.
Binop-equiv
Basic equivalence relation for binop structures.
Binop-add
Binop-sub
Binop-gt
Binop-sub-wrapped
Binop-shr-wrapped
Binop-shr
Binop-shl-wrapped
Binop-shl
Binop-rem-wrapped
Binop-rem
Binop-pow-wrapped
Binop-pow
Binop-or
Binop-nor
Binop-ne
Binop-nand
Binop-mul-wrapped
Binop-mul
Binop-lt
Binop-le
Binop-ge
Binop-eq
Binop-div-wrapped
Binop-div
Binop-bitxor
Binop-bitior
Binop-bitand
Binop-and
Binop-add-wrapped