• 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
          • 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
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • 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
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • ACL2
      • Macro-libraries
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • 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 (get-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)