• 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
              • Dynamic-semantics
                • Execution
                • Values
                • Dynamic-environments
                • Arithmetic-operations
                • Curve-parameterization
                • Shift-operations
                • Errors
                • Value-expressions
                  • Value-to-value-expr
                  • Expression-valuep
                  • Value-expr-to-value
                • Locations
                • Input-execution
                • Edwards-bls12-generator
                • Equality-operations
                • Logical-operations
                • Program-execution
                • Ordering-operations
                • Bitwise-operations
                • Literal-evaluation
                • Type-maps-for-struct-components
                • Output-execution
                • Tuple-operations
                • Struct-operations
              • 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
  • Dynamic-semantics

Value-expressions

Value expressions and their evaluation.

In some contexts, we need to denote values via expressions that can be readily evaluated without the need for a dynamic environment. Thus, we introduce a notion of value expressions, as the expressions that can be evaluated in that way. These include literals (to denote primitive values), arithmetic negation applied to signed literals (to denote negative signed values), tuple expressions whose components are value expressions, and struct expressions whose components are value expressions.

The representation of values by value expressions is not unique. For example, the same field value may be denoted by infinite literals whose numerals differ by the prime.

Along with expression values, we also define their evaluation to values. We also define an inverse, namely a mapping from values to expression values that evaluate to the values. We pick a ``minimal'' such mapping: with reference to the non-uniqueness example above, we pick the smallest numeral for a field literal.

Subtopics

Value-to-value-expr
Value expression that denotes a given value.
Expression-valuep
Check if an expression is an expression value.
Value-expr-to-value
Value denoted by an expression value.