• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • 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-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
          • C
          • Soft
          • Bv
          • Imp-language
          • Ethereum
          • Event-macros
          • Java
          • Riscv
          • Bitcoin
          • Zcash
          • Yul
          • ACL2-programming-language
          • Prime-fields
          • Json
          • Syntheto
          • File-io-light
          • Cryptography
          • Number-theory
          • Axe
          • Lists-light
          • Builtins
          • Solidity
          • Helpers
          • Htclient
          • Typed-lists-light
          • Arithmetic-light
        • X86isa
        • Axe
        • Execloader
      • Math
      • Testing-utilities
    • Solve-implementation

    Solve-call-ACL2-rewriter

    Call the ACL2 rewriter on the matrix of old.

    Signature
    (solve-call-acl2-rewriter matrix method-rules ctx state) 
      → 
    (mv erp result state)
    Arguments
    matrix — Guard (pseudo-termp matrix).
    method-rules — Guard (symbol-listp method-rules).
    Returns
    result — A tuple (rewritten-term used-rules) satisfying (typed-tuplep pseudo-termp symbol-listp result).

    Definitions and Theorems

    Function: solve-call-acl2-rewriter

    (defun solve-call-acl2-rewriter (matrix method-rules ctx state)
     (declare (xargs :stobjs (state)))
     (declare (xargs :guard (and (pseudo-termp matrix)
                                 (symbol-listp method-rules))))
     (let ((__function__ 'solve-call-acl2-rewriter))
      (declare (ignorable __function__))
      (b*
       (((er (list* rewritten-term used-rules pairs))
         (rewrite$ matrix
                   :ctx ctx
                   :in-theory (cons 'enable method-rules)))
        ((unless (null pairs))
         (value
          (raise
           "Internal error: ~
                           REWRITE$ returned non-NIL pairs ~x0 ~
                           even though it was called without forced assumptions."
           pairs))))
       (value (list rewritten-term used-rules)))))