• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • 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
          • Representation
          • Transformation-tools
            • Simpadd0
            • Deftrans
            • Splitgso
            • Constant-propagation
            • Split-fn
              • Abstract-fn
              • Split-fn-block-item-list
              • Decl-to-ident-paramdeclon-map
              • Split-fn-fundef
              • Split-fn-extdecl
              • Split-fn-filepath-transunit-map
              • Split-fn-extdecl-list
              • Param-declon-to-ident-paramdeclon-map
              • Split-fn-transunit-ensemble
              • Split-fn-transunit
                • Param-declon-list-to-ident-paramdeclon-map
                • Ident-paramdeclon-map-filter
                • Decl-to-ident-paramdeclon-map0
                • Decl-list-to-ident-paramdeclon-map
                • Expr-ident-list
                • Ident-paramdeclon-map
              • Copy-fn
              • Specialize
              • Split-all-gso
              • Rename
              • Utilities
            • 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
    • Split-fn

    Split-fn-transunit

    Transform a translation unit.

    Signature
    (split-fn-transunit target-fn new-fn-name tunit split-point) 
      → 
    (mv er new-tunit)
    Arguments
    target-fn — Guard (identp target-fn).
    new-fn-name — Guard (identp new-fn-name).
    tunit — Guard (transunitp tunit).
    split-point — Guard (natp split-point).
    Returns
    new-tunit — Type (transunitp new-tunit).

    Definitions and Theorems

    Function: split-fn-transunit

    (defun split-fn-transunit (target-fn new-fn-name tunit split-point)
     (declare (xargs :guard (and (identp target-fn)
                                 (identp new-fn-name)
                                 (transunitp tunit)
                                 (natp split-point))))
     (let ((__function__ 'split-fn-transunit))
       (declare (ignorable __function__))
       (b*
         (((transunit tunit) tunit)
          ((mv er extdecls)
           (split-fn-extdecl-list target-fn
                                  new-fn-name tunit.decls split-point)))
         (mv er
             (make-transunit :decls extdecls
                             :info tunit.info)))))

    Theorem: transunitp-of-split-fn-transunit.new-tunit

    (defthm transunitp-of-split-fn-transunit.new-tunit
      (b* (((mv acl2::?er ?new-tunit)
            (split-fn-transunit target-fn
                                new-fn-name tunit split-point)))
        (transunitp new-tunit))
      :rule-classes :rewrite)