• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
      • B*
      • Defunc
      • Fty
      • Apt
        • Isodata
        • Simplify-defun
        • Tailrec
        • Schemalg
        • Restrict
        • Expdata
        • Casesplit
        • Simplify-term
        • Simplify-defun-sk
        • Parteval
        • Solve
          • Solve-implementation
            • Solve-event-generation
            • Solve-fn
            • Solve-input-processing
              • Solve-process-inputs
              • Solve-process-solution-name
              • Solve-process-old
                • Solve-process-solution-guard-hints
                • Solve-process-solution-body
                • Solve-process-solution-hints
                • Solve-process-solution-guard
                • Solve-process-solution-enable
                • Solve-process-method
                • Solve-process-method-rules
                • *solve-call-axe-rewriter*
                • *solve-call-ACL2-rewriter*
              • Solve-macro-definition
              • Solve-call-ACL2-rewriter
          • 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
        • Std/util
        • Defdata
        • Defrstobj
        • Seq
        • Match-tree
        • Defrstobj
        • With-supporters
        • Def-partial-measure
        • Template-subst
        • Soft
        • Defthm-domain
        • Event-macros
        • Def-universal-equiv
        • Def-saved-obligs
        • With-supporters-after
        • Definec
        • Sig
        • Outer-local
        • Data-structures
      • ACL2
        • Theories
        • Rule-classes
        • Proof-builder
        • Recursion-and-induction
        • Hons-and-memoization
        • Events
        • Parallelism
        • History
        • Programming
        • Operational-semantics
        • Real
        • Start-here
        • Miscellaneous
        • Output-controls
        • Bdd
        • Macros
          • Make-event
          • Defmacro
          • Untranslate-patterns
          • Tc
          • Trans*
          • Macro-aliases-table
          • Macro-args
          • Defabbrev
          • User-defined-functions-table
          • Trans
          • Untranslate-for-execution
          • Macro-libraries
            • B*
            • Defunc
            • Fty
            • Apt
              • Isodata
              • Simplify-defun
              • Tailrec
              • Schemalg
              • Restrict
              • Expdata
              • Casesplit
              • Simplify-term
              • Simplify-defun-sk
              • Parteval
              • Solve
                • Solve-implementation
                  • Solve-event-generation
                  • Solve-fn
                  • Solve-input-processing
                    • Solve-process-inputs
                    • Solve-process-solution-name
                    • Solve-process-old
                      • Solve-process-solution-guard-hints
                      • Solve-process-solution-body
                      • Solve-process-solution-hints
                      • Solve-process-solution-guard
                      • Solve-process-solution-enable
                      • Solve-process-method
                      • Solve-process-method-rules
                      • *solve-call-axe-rewriter*
                      • *solve-call-ACL2-rewriter*
                    • Solve-macro-definition
                    • Solve-call-ACL2-rewriter
                • 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
              • Std/util
              • Defdata
              • Defrstobj
              • Seq
              • Match-tree
              • Defrstobj
              • With-supporters
              • Def-partial-measure
              • Template-subst
              • Soft
              • Defthm-domain
              • Event-macros
              • Def-universal-equiv
              • Def-saved-obligs
              • With-supporters-after
              • Definec
              • Sig
              • Outer-local
              • Data-structures
            • Add-macro-fn
            • Check-vars-not-free
            • Safe-mode
            • Trans1
            • Defmacro-untouchable
            • Set-duplicate-keys-action
            • Add-macro-alias
            • Magic-macroexpand
            • Defmacroq
            • Trans!
            • Remove-macro-fn
            • Remove-macro-alias
            • Add-binop
            • Untrans-table
            • Trans*-
            • Remove-binop
            • Tcp
            • Tca
          • Installation
          • Mailing-lists
        • Interfacing-tools
        • Hardware-verification
        • Software-verification
        • Math
        • Testing-utilities
      • Solve-input-processing

      Solve-process-old

      Process the old input.

      Signature
      (solve-process-old old verify-guards ctx state) 
        → 
      (mv erp result state)
      Returns
      result — (tuple (old symbolp) (?f symbolp) (x1...xn symbol-listp) (matrix pseudo-termp) result).

      Definitions and Theorems

      Function: solve-process-old

      (defun solve-process-old (old verify-guards ctx state)
       (declare (xargs :stobjs (state)))
       (declare (xargs :guard t))
       (let ((__function__ 'solve-process-old))
        (declare (ignorable __function__))
        (b*
         ((wrld (w state))
          ((er old)
           (ensure-function-name-or-numbered-wildcard$
                old "The first input" t nil))
          ((when (and (eq verify-guards t)
                      (not (guard-verified-p old wrld))))
           (er-soft+
            ctx t nil
            "Since the :VERIFY-GUARDS input is T, ~
                         the target function ~x0 must be guard-verified, ~
                         but it is not."
            old))
          ((unless (soft::quant-sofunp old wrld))
           (er-soft+
            ctx t nil
            "The target function ~x0 ~
                         must be a SOFT quantifier function."
            old))
          (funvars (soft::sofun-funvars old wrld))
          ((unless (= (len funvars) 1))
           (er-soft+
            ctx t nil
            "The target function ~x0 ~
                         must depend on exactly one function variable, ~
                         but instead it depends on ~x1."
            old funvars))
          (??f (car funvars))
          ((when (consp (formals old wrld)))
           (er-soft+
            ctx t nil
            "The target function ~x0 ~
                         must have no parameters, but instead it has parameters ~x1."
            old (formals old wrld)))
          ((unless (eq (defun-sk-quantifier old wrld)
                       'forall))
           (er-soft+
            ctx t nil
            "The quantifier of the target function ~x0 ~
                         must be universal, but it is existential instead."
            old))
          (x1...xn (defun-sk-bound-vars old wrld))
          (imatrix (defun-sk-imatrix old wrld))
          (matrix (defun-sk-matrix old wrld))
          (calls (all-calls (list ?f) matrix nil nil))
          ((unless (= (len calls) 1))
           (er-soft+
            ctx t nil
            "The matrix ~x0 of the target function ~x1, ~
                         after translation and LET expansion, ~
                         must contains exactly one call of ~x2, ~
                         but it contains ~@3 instead."
            imatrix old ?f
            (if (consp calls)
                (msg "multiple calls ~&0" calls)
              "no calls")))
          (call (car calls))
          ((unless (equal (fargs call) x1...xn))
           (er-soft+
            ctx t nil
            "The matrix ~x0 of the target function ~x1, ~
                         after translation and LET expansion, ~
                         must call ~x2 on the variables ~x3, ~
                         but it calls it on ~x4 instead."
            imatrix old ?f x1...xn (fargs call))))
         (value (list old ?f x1...xn matrix)))))