• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
        • Simplify-defun
        • Isodata
        • Tailrec
        • Schemalg
        • Restrict
          • Restrict-implementation
            • Restrict-event-generation
              • Restrict-gen-verify-guards
              • Restrict-gen-everything
              • Restrict-gen-old-to-new
              • Restrict-gen-new
              • Restrict-gen-restriction-of-rec-calls-consequent-term
              • Restrict-gen-new-to-old
              • Restrict-gen-appconds
                • Restrict-gen-restriction-of-rec-calls-consequent-term-aux
              • Restrict-fn
              • Restrict-macro-definition
              • Restrict-input-processing
          • Expdata
          • Casesplit
          • Simplify-term
          • Simplify-defun-sk
          • Parteval
          • Solve
          • Wrap-output
          • Propagate-iso
          • Simplify
          • Finite-difference
          • Drop-irrelevant-params
          • Copy-function
          • Lift-iso
          • Rename-params
          • Utilities
          • Simplify-term-programmatic
          • Simplify-defun-sk-programmatic
          • Simplify-defun-programmatic
          • Simplify-defun+
          • Common-options
          • Common-concepts
        • Zfc
        • Acre
        • Milawa
        • Smtlink
        • Abnf
        • Vwsim
        • Isar
        • Wp-gen
        • Dimacs-reader
        • Pfcs
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Riscv
        • 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
    • Restrict-event-generation

    Restrict-gen-appconds

    Generate the applicability conditions.

    Signature
    (restrict-gen-appconds old restriction verify-guards stub? state) 
      → 
    appconds
    Arguments
    old — Guard (symbolp old).
    restriction — Guard (pseudo-termp restriction).
    verify-guards — Guard (booleanp verify-guards).
    stub? — Guard (symbolp stub?).
    Returns
    appconds — A evmac-appcond-listp.

    We retrieve the guard with limited simplification, for greater predictability and robustness. This is matched by the fact that we verify guards with limited simplification, in restrict-gen-verify-guards.

    Definitions and Theorems

    Function: restrict-gen-appconds

    (defun restrict-gen-appconds
           (old restriction verify-guards stub? state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (symbolp old)
                                 (pseudo-termp restriction)
                                 (booleanp verify-guards)
                                 (symbolp stub?))))
     (let ((__function__ 'restrict-gen-appconds))
      (declare (ignorable __function__))
      (b* ((wrld (w state)))
       (append
        (make-evmac-appcond?
             :restriction-of-rec-calls
             (b* ((rec-calls-with-tests (recursive-calls old wrld))
                  (consequent (restrict-gen-restriction-of-rec-calls-consequent-term
                                   old rec-calls-with-tests
                                   restriction stub? wrld)))
               (implicate restriction consequent))
             :when (recursivep old nil wrld))
        (make-evmac-appcond?
          :restriction-guard
          (b*
            ((old-guard (guard old nil wrld))
             (restriction-guard (term-guard-obligation restriction
                                                       :limited state)))
            (implicate old-guard restriction-guard))
          :when verify-guards)))))