• 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
        • Soft
        • C
          • Syntax-for-tools
          • Atc
          • Language
          • Transformation-tools
            • Simpadd0
            • Splitgso
            • Constant-propagation
            • Specialize
              • Specialize-implementation
                • Param-declon-list-remove-param-by-ident
                • Specialize-fundef
                • Specialize-extdecl
                • Specialize-filepath-transunit-map
                • Specialize-extdecl-list
                • Specialize-transunit-ensemble
                • Param-declon-to-decl
                • Specialize-transunit
                  • Ident-from-param-declon
                  • Specialize-event-generation
                  • Specialize-input-processing
              • Split-fn
              • Split-fn-when
              • Split-all-gso
              • Copy-fn
              • Rename
              • Utilities
            • Representation
            • Insertion-sort
            • Pack
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Riscv
          • 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
    • Specialize-implementation

    Specialize-transunit

    Transform a translation unit.

    Signature
    (specialize-transunit tunit target-fn target-param const) 
      → 
    new-tunit
    Arguments
    tunit — Guard (transunitp tunit).
    target-fn — Guard (identp target-fn).
    target-param — Guard (identp target-param).
    const — Guard (exprp const).
    Returns
    new-tunit — Type (transunitp new-tunit).

    Definitions and Theorems

    Function: specialize-transunit

    (defun specialize-transunit (tunit target-fn target-param const)
     (declare (xargs :guard (and (transunitp tunit)
                                 (identp target-fn)
                                 (identp target-param)
                                 (exprp const))))
     (b* (((transunit tunit) tunit))
      (make-transunit
           :decls (specialize-extdecl-list tunit.decls
                                           target-fn target-param const)
           :info tunit.info)))

    Theorem: transunitp-of-specialize-transunit

    (defthm transunitp-of-specialize-transunit
      (b*
       ((new-tunit
             (specialize-transunit tunit target-fn target-param const)))
       (transunitp new-tunit))
      :rule-classes :rewrite)