• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • Soft
        • C
          • Syntax-for-tools
          • Atc
          • Language
            • Abstract-syntax
            • Integer-ranges
            • Implementation-environments
            • Dynamic-semantics
            • Static-semantics
            • Grammar
            • Integer-formats
            • Types
            • Portable-ascii-identifiers
            • Values
            • Integer-operations
            • Computation-states
            • Object-designators
            • Operations
            • Errors
            • Tag-environments
            • Function-environments
              • Init-fun-env
              • Fun-info
              • Fun-info-option
              • Fun-env-extend
              • Fun-env-result
              • Fun-env-lookup
              • Fun-info-from-fundef
                • Fun-env
              • 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
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Bitcoin
          • Ethereum
          • Yul
          • Zcash
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Lists-light
          • Axe
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Function-environments

    Fun-info-from-fundef

    Create information for a function definition.

    Signature
    (fun-info-from-fundef fundef) → finfo
    Arguments
    fundef — Guard (fundefp fundef).
    Returns
    finfo — Type (fun-infop finfo).

    Definitions and Theorems

    Function: fun-info-from-fundef

    (defun fun-info-from-fundef (fundef)
      (declare (xargs :guard (fundefp fundef)))
      (let ((__function__ 'fun-info-from-fundef))
        (declare (ignorable __function__))
        (b* (((fundef fundef) fundef)
             ((mv & params tyname)
              (tyspec+declor-to-ident+params+tyname
                   fundef.tyspec fundef.declor)))
          (make-fun-info :params params
                         :result tyname
                         :body fundef.body))))

    Theorem: fun-infop-of-fun-info-from-fundef

    (defthm fun-infop-of-fun-info-from-fundef
      (b* ((finfo (fun-info-from-fundef fundef)))
        (fun-infop finfo))
      :rule-classes :rewrite)

    Theorem: fun-info-from-fundef-of-fundef-fix-fundef

    (defthm fun-info-from-fundef-of-fundef-fix-fundef
      (equal (fun-info-from-fundef (fundef-fix fundef))
             (fun-info-from-fundef fundef)))

    Theorem: fun-info-from-fundef-fundef-equiv-congruence-on-fundef

    (defthm fun-info-from-fundef-fundef-equiv-congruence-on-fundef
      (implies (fundef-equiv fundef fundef-equiv)
               (equal (fun-info-from-fundef fundef)
                      (fun-info-from-fundef fundef-equiv)))
      :rule-classes :congruence)