• 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
            • Split-fn
              • Split-fn-implementation
                • Abstract-fn
                • Split-fn-block-item-list
                • Declon-to-ident-param-declon-map
                • Split-fn-fundef
                • Split-fn-ext-declon
                • Split-fn-filepath-transunit-map
                • Split-fn-ext-declon-list
                  • Split-fn-transunit-ensemble
                  • Split-fn-code-ensemble
                  • Split-fn-transunit
                  • Param-declon-to-ident-param-declon-map
                  • Declon-to-ident-param-declon-map0
                  • Param-declon-list-to-ident-param-declon-map
                  • Ident-param-declon-map-filter
                  • Declon-list-to-ident-param-declon-map
                  • Add-pointer-param-declon
                  • Map-address-ident-list
                  • Map-add-pointer-param-declon
                  • Make-deref-subst
                  • Ident-param-declon-map
                  • Split-fn-event-generation
                  • Split-fn-input-processing
              • 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
    • Split-fn-implementation

    Split-fn-ext-declon-list

    Transform a list of external declarations.

    Signature
    (split-fn-ext-declon-list target-fn 
                              new-fn-name extdecls split-point) 
     
      → 
    (mv er? new-extdecls)
    Arguments
    target-fn — Guard (identp target-fn).
    new-fn-name — Guard (identp new-fn-name).
    extdecls — Guard (ext-declon-listp extdecls).
    split-point — Guard (natp split-point).
    Returns
    er? — Type (maybe-msgp er?).
    new-extdecls — Type (ext-declon-listp new-extdecls).

    Definitions and Theorems

    Function: split-fn-ext-declon-list

    (defun split-fn-ext-declon-list
           (target-fn new-fn-name extdecls split-point)
      (declare (xargs :guard (and (identp target-fn)
                                  (identp new-fn-name)
                                  (ext-declon-listp extdecls)
                                  (natp split-point))))
      (b*
       (((reterr) nil)
        ((when (endp extdecls)) (retok nil))
        ((erp target-found extdecls1)
         (split-fn-ext-declon target-fn new-fn-name (first extdecls)
                              split-point))
        ((when target-found)
         (retok (append extdecls1
                        (ext-declon-list-fix (rest extdecls)))))
        ((erp extdecls2)
         (split-fn-ext-declon-list target-fn new-fn-name (rest extdecls)
                                   split-point)))
       (retok (append extdecls1 extdecls2))))

    Theorem: maybe-msgp-of-split-fn-ext-declon-list.er?

    (defthm maybe-msgp-of-split-fn-ext-declon-list.er?
     (b* (((mv ?er? ?new-extdecls)
           (split-fn-ext-declon-list target-fn
                                     new-fn-name extdecls split-point)))
       (maybe-msgp er?))
     :rule-classes :rewrite)

    Theorem: ext-declon-listp-of-split-fn-ext-declon-list.new-extdecls

    (defthm ext-declon-listp-of-split-fn-ext-declon-list.new-extdecls
     (b* (((mv ?er? ?new-extdecls)
           (split-fn-ext-declon-list target-fn
                                     new-fn-name extdecls split-point)))
       (ext-declon-listp new-extdecls))
     :rule-classes :rewrite)