• 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
            • Atc-implementation
              • Atc-abstract-syntax
              • Atc-pretty-printer
              • Atc-event-and-code-generation
                • Atc-symbolic-computation-states
                • Atc-symbolic-execution-rules
                • Atc-gen-ext-declon-lists
                • Atc-function-and-loop-generation
                • Atc-statement-generation
                • Atc-gen-fileset
                • Atc-gen-everything
                • Atc-gen-obj-declon
                • Atc-gen-fileset-event
                • Atc-tag-tables
                • Atc-expression-generation
                • Atc-generation-contexts
                • Atc-gen-wf-thm
                • Term-checkers-atc
                • Atc-variable-tables
                • Term-checkers-common
                • Atc-gen-init-fun-env-thm
                • Atc-gen-appconds
                  • Read-write-variables
                  • Atc-gen-thm-assert-events
                  • Test*
                  • Atc-gen-prog-const
                  • Atc-gen-expr-bool
                  • Atc-theorem-generation
                  • Atc-tag-generation
                  • Atc-gen-expr-pure
                  • Atc-function-tables
                  • Atc-object-tables
                • Fty-pseudo-term-utilities
                • Atc-term-recognizers
                • Atc-input-processing
                • 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-event-and-code-generation

    Atc-gen-appconds

    Generate the applicability conditions.

    Signature
    (atc-gen-appconds targets wrld) → (mv appconds fn-appconds)
    Arguments
    targets — Guard (symbol-listp targets).
    wrld — Guard (plist-worldp wrld).
    Returns
    appconds — Type (evmac-appcond-listp appconds).
    fn-appconds — Type (symbol-symbol-alistp fn-appconds), given (symbol-listp targets).

    Also return an alist from the recursive target functions to the corresponding applicability condition names.

    We skip over defstruct names, defobject names, and non-recursive function names.

    Definitions and Theorems

    Function: atc-gen-appconds

    (defun atc-gen-appconds (targets wrld)
      (declare (xargs :guard (and (symbol-listp targets)
                                  (plist-worldp wrld))))
      (let ((__function__ 'atc-gen-appconds))
        (declare (ignorable __function__))
        (b* (((when (endp targets)) (mv nil nil))
             (target (car targets))
             ((when (not (function-symbolp target wrld)))
              (atc-gen-appconds (cdr targets) wrld))
             ((when (not (irecursivep+ target wrld)))
              (atc-gen-appconds (cdr targets) wrld))
             (meas (measure+ target wrld))
             (name (packn-pos (list 'natp-of-measure-of- target)
                              :keyword))
             (formula (cons 'natp (cons meas 'nil)))
             (appcond (make-evmac-appcond :name name
                                          :formula formula))
             ((mv appconds fn-appconds)
              (atc-gen-appconds (cdr targets) wrld)))
          (mv (cons appcond appconds)
              (acons target name fn-appconds)))))

    Theorem: evmac-appcond-listp-of-atc-gen-appconds.appconds

    (defthm evmac-appcond-listp-of-atc-gen-appconds.appconds
      (b* (((mv ?appconds ?fn-appconds)
            (atc-gen-appconds targets wrld)))
        (evmac-appcond-listp appconds))
      :rule-classes :rewrite)

    Theorem: symbol-symbol-alistp-of-atc-gen-appconds.fn-appconds

    (defthm symbol-symbol-alistp-of-atc-gen-appconds.fn-appconds
      (implies (symbol-listp targets)
               (b* (((mv ?appconds ?fn-appconds)
                     (atc-gen-appconds targets wrld)))
                 (symbol-symbol-alistp fn-appconds)))
      :rule-classes :rewrite)