• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Ethereum
      • Leftist-trees
      • Java
      • Riscv
      • Taspi
      • Bitcoin
      • Zcash
      • Des
      • X86isa
      • Sha-2
      • Yul
      • Proof-checker-itp13
      • Regex
      • ACL2-programming-language
      • Json
      • Jfkr
      • Equational
      • Cryptography
      • Axe
      • Poseidon
      • Where-do-i-place-my-book
      • Aleo
        • Aleobft
        • Aleovm
        • Leo
          • Grammar
          • Early-version
            • Json2ast
            • Testing
            • Definition
              • Flattening
              • Abstract-syntax
              • Dynamic-semantics
                • Execution
                • Values
                • Dynamic-environments
                  • Call-dinfo
                  • Denv
                  • Update-var/const-dinfo-in-scope-list
                  • Update-var/const-dinfo-in-scope
                  • Var/const-dinfo
                  • Update-var/const-dinfo
                  • Add-var/const-dinfo-to-scope
                  • Add-var/const-dinfo
                  • Var/const-dinfo-option
                  • Get-var/const-dinfo-from-scope-list
                  • Denv-option
                  • Get-var/const-dinfo-from-scope
                  • Vcscope-dinfo-option
                  • Vcscope-dinfo-list-option
                  • Vcscope-dinfo
                  • Screens
                  • Get-var/const-dinfo
                  • Vcscope-dinfo-option-result
                  • Vcscope-dinfo-list-result
                  • Vcscope-dinfo-result
                  • Dynamic-struct-environments
                  • Dynamic-function-environments
                    • Function-dinfo
                    • Function-dinfo-option
                    • Add-function-dinfo
                    • Function-denv-option
                    • Get-function-dinfo
                      • Function-denv
                      • Init-function-denv
                    • Denv-result
                    • Init-denv
                    • Vcscope-dinfo-list
                    • Call-dinfo-list
                  • Arithmetic-operations
                  • Curve-parameterization
                  • Shift-operations
                  • Errors
                  • Value-expressions
                  • 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-function-environments

    Get-function-dinfo

    Get the information for a function in a dynamic environment.

    Signature
    (get-function-dinfo fun env) → info?
    Arguments
    fun — Guard (identifierp fun).
    env — Guard (function-denvp env).
    Returns
    info? — Type (function-dinfo-optionp info?).

    If there is no function with that name in the environment, we return nil to indicate an error.

    Definitions and Theorems

    Function: get-function-dinfo

    (defun get-function-dinfo (fun env)
      (declare (xargs :guard (and (identifierp fun)
                                  (function-denvp env))))
      (let ((__function__ 'get-function-dinfo))
        (declare (ignorable __function__))
        (cdr (omap::assoc (identifier-fix fun)
                          (function-denv-fix env)))))

    Theorem: function-dinfo-optionp-of-get-function-dinfo

    (defthm function-dinfo-optionp-of-get-function-dinfo
      (b* ((info? (get-function-dinfo fun env)))
        (function-dinfo-optionp info?))
      :rule-classes :rewrite)

    Theorem: get-function-dinfo-of-identifier-fix-fun

    (defthm get-function-dinfo-of-identifier-fix-fun
      (equal (get-function-dinfo (identifier-fix fun)
                                 env)
             (get-function-dinfo fun env)))

    Theorem: get-function-dinfo-identifier-equiv-congruence-on-fun

    (defthm get-function-dinfo-identifier-equiv-congruence-on-fun
      (implies (identifier-equiv fun fun-equiv)
               (equal (get-function-dinfo fun env)
                      (get-function-dinfo fun-equiv env)))
      :rule-classes :congruence)

    Theorem: get-function-dinfo-of-function-denv-fix-env

    (defthm get-function-dinfo-of-function-denv-fix-env
      (equal (get-function-dinfo fun (function-denv-fix env))
             (get-function-dinfo fun env)))

    Theorem: get-function-dinfo-function-denv-equiv-congruence-on-env

    (defthm get-function-dinfo-function-denv-equiv-congruence-on-env
      (implies (function-denv-equiv env env-equiv)
               (equal (get-function-dinfo fun env)
                      (get-function-dinfo fun env-equiv)))
      :rule-classes :congruence)