• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
        • Z3-installation
        • Smt-hint
        • Tutorial
        • Status
        • Developer
          • Verified
          • Trusted
            • Translation-datatypes
            • Smt-run
            • Smt-prove
            • Smt-write
            • Smt-trusted-cp
              • Z3-py
        • 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
        • Bitcoin
        • Riscv
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Trusted

    Smt-trusted-cp

    The trusted clause processor

    Definitions and Theorems

    Theorem: true-listp-smt-prove-stub

    (defthm true-listp-smt-prove-stub
      (true-listp (smt-prove-stub term smtlink-hint state))
      :rule-classes :type-prescription)

    Function: smt-trusted-cp-main

    (defun smt-trusted-cp-main (cl smtlink-hint custom-p state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (pseudo-term-listp cl)
                                 (booleanp custom-p))))
     (declare (xargs :stobjs state))
     (let ((acl2::__function__ 'smt-trusted-cp-main))
      (declare (ignorable acl2::__function__))
      (b*
       ((smt-cnf (if custom-p (custom-smt-cnf)
                   (default-smt-cnf)))
        (smtlink-hint (change-smtlink-hint smtlink-hint
                                           :smt-cnf smt-cnf))
        ((mv res smt-precond state)
         (smt-prove-stub (disjoin cl)
                         smtlink-hint state))
        (subgoal-lst
         (cons
          (cons
              '(hint-please
                    '(:in-theory (enable magic-fix hint-please type-hyp)
                                 :expand ((:free (x) (hide x)))))
              (cons smt-precond (cons (disjoin cl) 'nil)))
          'nil)))
       (if res (prog2$ (cw "Proved!~%")
                       (mv nil subgoal-lst state))
        (mv
         (cons
          "NOTE: Unable to prove goal with ~
                          SMT-trusted-cp and indicated hint."
          nil)
         (list cl)
         state)))))

    Function: smt-trusted-cp

    (defun smt-trusted-cp (cl smtlink-hint state)
      (declare (xargs :stobjs (state)))
      (declare (xargs :guard (and (pseudo-term-listp cl)
                                  (smtlink-hint-p smtlink-hint))))
      (declare (xargs :stobjs state))
      (let ((acl2::__function__ 'smt-trusted-cp))
        (declare (ignorable acl2::__function__))
        (prog2$ (cw "Using default SMT-trusted-cp...~%")
                (smt-trusted-cp-main cl smtlink-hint nil state))))

    Function: smt-trusted-cp-custom

    (defun smt-trusted-cp-custom (cl smtlink-hint state)
      (declare (xargs :stobjs (state)))
      (declare (xargs :guard (and (pseudo-term-listp cl)
                                  (smtlink-hint-p smtlink-hint))))
      (declare (xargs :stobjs state))
      (let ((acl2::__function__ 'smt-trusted-cp-custom))
        (declare (ignorable acl2::__function__))
        (prog2$ (cw "Using custom SMT-trusted-cp...~%")
                (smt-trusted-cp-main cl smtlink-hint t state))))