• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • Apt
        • Error-checking
        • Fty-extensions
        • Isar
        • Kestrel-utilities
        • Set
        • C
          • Syntax-for-tools
          • Atc
          • Transformation-tools
            • Simpadd0
            • Proof-generation
            • Split-gso
            • Wrap-fn
            • Constant-propagation
            • Specialize
              • Specialize-implementation
                • Param-declon-list-remove-param-by-ident
                • Specialize-fundef
                • Specialize-ext-declon
                  • Specialize-filepath-transunit-map
                  • Param-declon-to-declon
                  • Specialize-ext-declon-list
                  • Specialize-transunit-ensemble
                  • Specialize-transunit
                  • Specialize-code-ensemble
                  • Ident-from-param-declon
                  • Specialize-event-generation
                  • Specialize-input-processing
              • Split-fn
              • Split-fn-when
              • Split-all-gso
              • Copy-fn
              • Variables-in-computation-states
              • Rename
              • Utilities
              • Proof-generation-theorems
              • Input-processing
            • Language
            • Representation
            • Insertion-sort
            • Pack
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Specialize-implementation

    Specialize-ext-declon

    Transform an external declaration.

    Signature
    (specialize-ext-declon extdecl target-fn target-param const) 
      → 
    (mv found new-extdecl)
    Arguments
    extdecl — Guard (ext-declonp extdecl).
    target-fn — Guard (identp target-fn).
    target-param — Guard (identp target-param).
    const — Guard (exprp const).
    Returns
    found — Type (booleanp found).
    new-extdecl — Type (ext-declonp new-extdecl).

    Definitions and Theorems

    Function: specialize-ext-declon

    (defun specialize-ext-declon (extdecl target-fn target-param const)
      (declare (xargs :guard (and (ext-declonp extdecl)
                                  (identp target-fn)
                                  (identp target-param)
                                  (exprp const))))
      (ext-declon-case
           extdecl :fundef
           (b* (((mv found fundef)
                 (specialize-fundef extdecl.fundef
                                    target-fn target-param const)))
             (mv found (ext-declon-fundef fundef)))
           :declon (mv nil (ext-declon-fix extdecl))
           :empty (mv nil (ext-declon-fix extdecl))
           :asm (mv nil (ext-declon-fix extdecl))))

    Theorem: booleanp-of-specialize-ext-declon.found

    (defthm booleanp-of-specialize-ext-declon.found
      (b*
        (((mv ?found ?new-extdecl)
          (specialize-ext-declon extdecl target-fn target-param const)))
        (booleanp found))
      :rule-classes :rewrite)

    Theorem: ext-declonp-of-specialize-ext-declon.new-extdecl

    (defthm ext-declonp-of-specialize-ext-declon.new-extdecl
      (b*
        (((mv ?found ?new-extdecl)
          (specialize-ext-declon extdecl target-fn target-param const)))
        (ext-declonp new-extdecl))
      :rule-classes :rewrite)