• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
      • Kestrel-books
        • Crypto-hdwallet
        • 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
          • Error-checking
          • Fty-extensions
          • Isar
          • Kestrel-utilities
          • Set
          • Soft
          • C
          • Bv
          • Imp-language
          • Event-macros
          • Java
          • Riscv
          • 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
    • Solve-input-processing

    Solve-process-solution-body

    Process the :solution-body input.

    Signature
    (solve-process-solution-body solution-body solution-body? 
                                 method x1...xn f-existsp ctx state) 
     
      → 
    (mv erp nothing state)
    Arguments
    solution-body? — Guard (booleanp solution-body?).
    method — Guard (keywordp method).
    x1...xn — Guard (symbol-listp x1...xn).
    f-existsp — Guard (booleanp f-existsp).
    Returns
    nothing — Always nil.

    Definitions and Theorems

    Function: solve-process-solution-body

    (defun solve-process-solution-body
           (solution-body solution-body?
                          method x1...xn f-existsp ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (booleanp solution-body?)
                                 (keywordp method)
                                 (symbol-listp x1...xn)
                                 (booleanp f-existsp))))
     (let ((__function__ 'solve-process-solution-body))
      (declare (ignorable __function__))
      (if
       (eq method :manual)
       (if f-existsp
        (if solution-body?
         (er-soft+
          ctx t nil
          "Since the :SOLUTION-NAME input ~
                             specifies an existing function, ~
                             the :SOLUTION-BODY input must be absent, ~
                             but instead ~x0 has been supplied.")
         (value nil))
        (if
         (not solution-body?)
         (er-soft+
          ctx t nil
          "Since the :METHOD input is :MANUAL ~
                           and the :SOLUTION-NAME input specifies ~
                           the name of a function to be generated, ~
                           the :SOLUTION-BODY input must be supplied.")
         (b* (((er (list term stobjs-out))
               (ensure-value-is-untranslated-term$
                    solution-body
                    "The :SOLUTION-BODY input" t nil))
              (description (msg "The :SOLUTION-BODY term ~x0"
                                solution-body))
              ((er &)
               (ensure-function/lambda/term-number-of-results$
                    stobjs-out 1 description t nil))
              ((er &)
               (ensure-term-free-vars-subset$
                    term x1...xn description t nil)))
           (value nil))))
       (if solution-body?
        (er-soft+
         ctx t nil
         "Since the :METHOD input is not :MANUAL, ~
                       the :SOLUTION-BODY input must be absent, ~
                       but instead ~x0 has been supplied."
         solution-body)
        (value nil)))))