• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • 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
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • 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)