• 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-extdecl

    Transform an external declaration.

    Signature
    (split-fn-extdecl target-fn new-fn-name extdecl split-point) 
      → 
    (mv er target-found extdecls)
    Arguments
    target-fn — Guard (identp target-fn).
    new-fn-name — Guard (identp new-fn-name).
    extdecl — Guard (extdeclp extdecl).
    split-point — Guard (natp split-point).
    Returns
    target-found — Type (booleanp target-found).
    extdecls — Type (extdecl-listp extdecls).

    Definitions and Theorems

    Function: split-fn-extdecl

    (defun split-fn-extdecl (target-fn new-fn-name extdecl split-point)
     (declare (xargs :guard (and (identp target-fn)
                                 (identp new-fn-name)
                                 (extdeclp extdecl)
                                 (natp split-point))))
     (let ((__function__ 'split-fn-extdecl))
       (declare (ignorable __function__))
       (b* (((reterr) nil nil))
         (extdecl-case
              extdecl :fundef
              (b* (((erp fundef1 fundef2)
                    (split-fn-fundef target-fn new-fn-name
                                     extdecl.unwrap split-point)))
                (fundef-option-case
                     fundef2
                     :some (retok t
                                  (list (extdecl-fundef fundef1)
                                        (extdecl-fundef fundef2.val)))
                     :none (retok nil (list (extdecl-fundef fundef1)))))
              :decl (retok nil (list (extdecl-fix extdecl)))
              :empty (retok nil (list (extdecl-fix extdecl)))
              :asm (retok nil (list (extdecl-fix extdecl)))))))

    Theorem: booleanp-of-split-fn-extdecl.target-found

    (defthm booleanp-of-split-fn-extdecl.target-found
      (b* (((mv acl2::?er ?target-found ?extdecls)
            (split-fn-extdecl target-fn
                              new-fn-name extdecl split-point)))
        (booleanp target-found))
      :rule-classes :rewrite)

    Theorem: extdecl-listp-of-split-fn-extdecl.extdecls

    (defthm extdecl-listp-of-split-fn-extdecl.extdecls
      (b* (((mv acl2::?er ?target-found ?extdecls)
            (split-fn-extdecl target-fn
                              new-fn-name extdecl split-point)))
        (extdecl-listp extdecls))
      :rule-classes :rewrite)