• 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
        • Syntax-for-tools
        • Atc
        • Language
          • Abstract-syntax
          • Integer-ranges
          • Implementation-environments
          • Dynamic-semantics
            • Exec
            • Exec-arrsub
            • Exec-expr-pure
            • Exec-expr-asg
            • Init-value-to-value
            • Exec-memberp
            • Apconvert-expr-value
            • Exec-address
            • Exec-member
            • Init-scope
            • Exec-unary
            • Exec-fun
            • Exec-block-item
            • Eval-iconst
            • Exec-binary-strict-pure
            • Exec-expr-pure-list
            • Eval-binary-strict-pure
            • Exec-block-item-list
            • Exec-indir
            • Exec-expr-call-or-pure
            • Exec-stmt-while
            • Exec-stmt
            • Exec-ident
              • Eval-cast
              • Exec-cast
              • Eval-unary
              • Exec-const
              • Exec-initer
              • Exec-expr-call-or-asg
              • Eval-const
              • Exec-expr-call
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
            • Character-sets
            • Flexible-array-member-removal
            • Arithmetic-operations
            • Pointer-operations
            • Bytes
            • Keywords
            • Real-operations
            • Array-operations
            • Scalar-operations
            • Structure-operations
          • Representation
          • Transformation-tools
          • Insertion-sort
          • Pack
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Dynamic-semantics

    Exec-ident

    Execute a variable.

    Signature
    (exec-ident id compst) → eval
    Arguments
    id — Guard (identp id).
    compst — Guard (compustatep compst).
    Returns
    eval — Type (expr-value-resultp eval).

    We obtain the object designator of the variable, propagating errors. We read the value from the object designator, which is guaranteed to work as proved in read-object.

    Definitions and Theorems

    Function: exec-ident

    (defun exec-ident (id compst)
      (declare (xargs :guard (and (identp id) (compustatep compst))))
      (let ((__function__ 'exec-ident))
        (declare (ignorable __function__))
        (b* ((objdes (objdesign-of-var id compst))
             ((unless objdes)
              (error (list :no-object-designator (ident-fix id))))
             (val (read-object objdes compst)))
          (make-expr-value :value val
                           :object objdes))))

    Theorem: expr-value-resultp-of-exec-ident

    (defthm expr-value-resultp-of-exec-ident
      (b* ((eval (exec-ident id compst)))
        (expr-value-resultp eval))
      :rule-classes :rewrite)

    Theorem: exec-ident-of-ident-fix-id

    (defthm exec-ident-of-ident-fix-id
      (equal (exec-ident (ident-fix id) compst)
             (exec-ident id compst)))

    Theorem: exec-ident-ident-equiv-congruence-on-id

    (defthm exec-ident-ident-equiv-congruence-on-id
      (implies (ident-equiv id id-equiv)
               (equal (exec-ident id compst)
                      (exec-ident id-equiv compst)))
      :rule-classes :congruence)

    Theorem: exec-ident-of-compustate-fix-compst

    (defthm exec-ident-of-compustate-fix-compst
      (equal (exec-ident id (compustate-fix compst))
             (exec-ident id compst)))

    Theorem: exec-ident-compustate-equiv-congruence-on-compst

    (defthm exec-ident-compustate-equiv-congruence-on-compst
      (implies (compustate-equiv compst compst-equiv)
               (equal (exec-ident id compst)
                      (exec-ident id compst-equiv)))
      :rule-classes :congruence)