• 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
      • Taspi
      • Bitcoin
      • Riscv
      • Des
      • Ethereum
      • X86isa
      • Sha-2
      • Yul
        • Transformations
        • Language
          • Abstract-syntax
          • Dynamic-semantics
            • Exec
            • Find-fun
            • Init-local
            • Write-vars-values
            • Add-vars-values
            • Add-funs
            • Eoutcome
            • Soutcome
            • Ensure-funscope-disjoint
            • Write-var-value
            • Restrict-vars
            • Add-var-value
            • Funinfo
            • Exec-top-block
            • Values
            • Cstate
            • Funinfo+funenv
            • Read-vars-values
            • Read-var-value
            • Funenv
            • Funscope-for-fundefs
            • Exec-path
              • Path-to-var
              • Funinfo+funenv-result
              • Exec-literal
              • Soutcome-result
              • Mode-set-result
              • Literal-evaluation
              • Funscope-result
              • Funinfo-result
              • Funenv-result
              • Eoutcome-result
              • Cstate-result
              • Paths-to-vars
              • Funinfo-for-fundef
              • Lstate
              • Funscope
              • Mode-set
              • Modes
            • Concrete-syntax
            • Static-soundness
            • Static-semantics
            • Errors
          • Yul-json
        • 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-path

    Execute a path.

    Signature
    (exec-path path cstate) → outcome
    Arguments
    path — Guard (pathp path).
    cstate — Guard (cstatep cstate).
    Returns
    outcome — Type (eoutcome-resultp outcome).

    We look up the variable in the computation state. This always returns a single value, and does not change the computation state.

    Definitions and Theorems

    Function: exec-path

    (defun exec-path (path cstate)
      (declare (xargs :guard (and (pathp path) (cstatep cstate))))
      (let ((__function__ 'exec-path))
        (declare (ignorable __function__))
        (b* (((okf var) (path-to-var path))
             ((okf val) (read-var-value var cstate)))
          (make-eoutcome :cstate cstate
                         :values (list val)))))

    Theorem: eoutcome-resultp-of-exec-path

    (defthm eoutcome-resultp-of-exec-path
      (b* ((outcome (exec-path path cstate)))
        (eoutcome-resultp outcome))
      :rule-classes :rewrite)

    Theorem: error-info-wfp-of-exec-path

    (defthm error-info-wfp-of-exec-path
      (b* ((?outcome (exec-path path cstate)))
        (implies (reserrp outcome)
                 (error-info-wfp outcome))))

    Theorem: exec-path-of-path-fix-path

    (defthm exec-path-of-path-fix-path
      (equal (exec-path (path-fix path) cstate)
             (exec-path path cstate)))

    Theorem: exec-path-path-equiv-congruence-on-path

    (defthm exec-path-path-equiv-congruence-on-path
      (implies (path-equiv path path-equiv)
               (equal (exec-path path cstate)
                      (exec-path path-equiv cstate)))
      :rule-classes :congruence)

    Theorem: exec-path-of-cstate-fix-cstate

    (defthm exec-path-of-cstate-fix-cstate
      (equal (exec-path path (cstate-fix cstate))
             (exec-path path cstate)))

    Theorem: exec-path-cstate-equiv-congruence-on-cstate

    (defthm exec-path-cstate-equiv-congruence-on-cstate
      (implies (cstate-equiv cstate cstate-equiv)
               (equal (exec-path path cstate)
                      (exec-path path cstate-equiv)))
      :rule-classes :congruence)