• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • 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
            • Atc-implementation
              • Atc-abstract-syntax
              • Atc-pretty-printer
              • Atc-event-and-code-generation
              • Fty-pseudo-term-utilities
              • Atc-term-recognizers
              • Atc-input-processing
                • Atc-process-target
                • Atc-process-const-name
                • Atc-process-function
                • Atc-process-target-list
                • Atc-process-inputs
                • Atc-process-file-name
                • Atc-process-const-name-aux
                  • Atc-process-targets
                  • Atc-process-print
                  • Atc-process-pretty-printing
                  • Atc-remove-called-fns
                  • Atc-process-output-dir
                  • Atc-process-proofs
                  • Atc-process-header
                  • *atc-allowed-pretty-printing-options*
                  • *atc-allowed-options*
                • Atc-shallow-embedding
                • Atc-process-inputs-and-gen-everything
                • Atc-table
                • Atc-fn
                • Atc-pretty-printing-options
                • Atc-types
                • Atc-macro-definition
              • Atc-tutorial
            • Language
            • Representation
            • Transformation-tools
            • 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
    • Atc-input-processing

    Atc-process-const-name-aux

    Signature
    (atc-process-const-name-aux target-fns prog-const wrld) 
      → 
    (mv erp fn-thms fn-limits fn-body-limits)
    Arguments
    target-fns — Guard (symbol-listp target-fns).
    prog-const — Guard (symbolp prog-const).
    wrld — Guard (plist-worldp wrld).
    Returns
    fn-thms — Type (symbol-symbol-alistp fn-thms), given (symbol-listp target-fns).
    fn-limits — Type (symbol-symbol-alistp fn-limits), given (symbol-listp target-fns).
    fn-body-limits — Type (symbol-symbol-alistp fn-body-limits), given (symbol-listp target-fns).

    Definitions and Theorems

    Function: atc-process-const-name-aux

    (defun atc-process-const-name-aux (target-fns prog-const wrld)
     (declare (xargs :guard (and (symbol-listp target-fns)
                                 (symbolp prog-const)
                                 (plist-worldp wrld))))
     (let ((__function__ 'atc-process-const-name-aux))
      (declare (ignorable __function__))
      (b*
       (((reterr) nil nil nil)
        ((when (endp target-fns))
         (retok nil nil nil))
        (fn (car target-fns))
        (fn-thm (packn (list prog-const "-" (symbol-name fn)
                             "-CORRECT")))
        (msg? (acl2::fresh-namep-msg-weak fn-thm nil wrld))
        ((when msg?)
         (reterr
          (msg
           "The generated theorem name ~x0 ~
                             for the correctness theorem of the function ~x1 ~
                             is invalid: ~@2"
           fn-thm fn msg?)))
        ((erp fn-thms fn-limits fn-body-limits)
         (atc-process-const-name-aux (cdr target-fns)
                                     prog-const wrld))
        (fn-limit (packn (list prog-const "-" (symbol-name fn)
                               "-LIMIT")))
        (msg? (acl2::fresh-namep-msg-weak fn-limit 'function
                                          wrld))
        ((when msg?)
         (reterr
          (msg
           "The generated function name ~x0 ~
                             for the limit of the function ~x1 ~
                             is invalid: ~@2"
           fn-limit fn msg?)))
        ((when (not (irecursivep+ fn wrld)))
         (retok (acons fn fn-thm fn-thms)
                (acons fn fn-limit fn-limits)
                fn-body-limits))
        (fn-body-limit (packn (list prog-const "-" (symbol-name fn)
                                    "-BODY-LIMIT")))
        (msg? (acl2::fresh-namep-msg-weak fn-body-limit 'function
                                          wrld))
        ((when msg?)
         (reterr
          (msg
           "The generated function name ~x0 ~
                             for the body limit of the function ~x1 ~
                             is invalid: ~@2"
           fn-body-limit fn msg?))))
       (retok (acons fn fn-thm fn-thms)
              (acons fn fn-limit fn-limits)
              (acons fn fn-body-limit fn-body-limits)))))

    Theorem: symbol-symbol-alistp-of-atc-process-const-name-aux.fn-thms

    (defthm symbol-symbol-alistp-of-atc-process-const-name-aux.fn-thms
     (implies
         (symbol-listp target-fns)
         (b* (((mv acl2::?erp
                   ?fn-thms ?fn-limits ?fn-body-limits)
               (atc-process-const-name-aux target-fns prog-const wrld)))
           (symbol-symbol-alistp fn-thms)))
     :rule-classes :rewrite)

    Theorem: symbol-symbol-alistp-of-atc-process-const-name-aux.fn-limits

    (defthm symbol-symbol-alistp-of-atc-process-const-name-aux.fn-limits
     (implies
         (symbol-listp target-fns)
         (b* (((mv acl2::?erp
                   ?fn-thms ?fn-limits ?fn-body-limits)
               (atc-process-const-name-aux target-fns prog-const wrld)))
           (symbol-symbol-alistp fn-limits)))
     :rule-classes :rewrite)

    Theorem: symbol-symbol-alistp-of-atc-process-const-name-aux.fn-body-limits

    (defthm
      symbol-symbol-alistp-of-atc-process-const-name-aux.fn-body-limits
     (implies
         (symbol-listp target-fns)
         (b* (((mv acl2::?erp
                   ?fn-thms ?fn-limits ?fn-body-limits)
               (atc-process-const-name-aux target-fns prog-const wrld)))
           (symbol-symbol-alistp fn-body-limits)))
     :rule-classes :rewrite)