• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
      • Theories
      • Rule-classes
        • Type-prescription
        • Rewrite
        • Meta
        • Linear
        • Definition
        • Clause-processor
          • Meta-extract
          • Set-skip-meta-termp-checks
          • Make-summary-data
          • Clause-processor-tools
            • Rp-rewriter
              • Rp-ruleset
              • Defthmrp
              • Rp-rewriter/meta-rules
              • Rp-utilities
              • Rp-rewriter-demo
              • Rp-rewriter/debugging
              • Rp-rewriter/applications
          • Set-skip-meta-termp-checks!
        • Tau-system
        • Forward-chaining
        • Equivalence
        • Congruence
        • Free-variables
        • Executable-counterpart
        • Induction
        • Type-reasoning
        • Compound-recognizer
        • Rewrite-quoted-constant
        • Elim
        • Well-founded-relation-rule
        • Built-in-clause
        • Well-formedness-guarantee
        • Patterned-congruence
        • Rule-classes-introduction
        • Guard-holders
        • Refinement
        • Type-set-inverter
        • Generalize
        • Corollary
        • Induction-heuristics
        • Backchaining
        • Default-backchain-limit
      • Proof-builder
      • Recursion-and-induction
      • Hons-and-memoization
      • Events
      • Parallelism
      • History
      • Programming
      • Operational-semantics
      • Real
      • Start-here
      • Debugging
      • Miscellaneous
      • Output-controls
      • Macros
      • Interfacing-tools
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Projects
  • Clause-processor-tools

Rp-rewriter

A verified clause-processor and customized rewriter for large terms that uses existing ACL2 rewrite rules to prove theorems.

RP-Rewriter (rp for 'retain property') is a verified clause processor that can be used to replace ACL2's rewriter for some theorems, and for some cases, can provide time efficiency and convenience when building lemmas. It uses a subset of the heuristics of the ACL2's rewriter but has some distinctive features:

  1. By introducing an invariant, it can retain properties about terms, which we call side-conditions. These properties can help relieve hypotheses or be used in meta functions even after large terms went through drastic changes through rewriting that may have made it difficult to confirm those properties through regular hyp relief system.
  2. In the case of alists in the theorems to be rewritten, it can create a corresponding fast-alist in the background for later fast search and access. It does that by triggering a special mechanism when it encounters hons-acons and hons-get in terms.
  3. Meta rules can return a dont-rw structure to prevent repeated rewriting of large returned terms, which can provide large performance (time and memory) benefits.
  4. It supports inside-out as well as outside-in rewriting in the same rewriting pass.

The rewriter supports a big set of rewrite rules existing in ACL2's world. For every other rule-classes, it treats them as rewrite-rules if possible. It also provides a mechanism to run meta functions. We do not support rules with bind-free, ACL2::loop-stopper, ACL2::free-variables, case-split etc. Note that there is also no ACL2::type-alist or any form of type reasoning.

This rewriter is mainly used by an efficient integer multiplier-verification library.

Two papers are published that mainly discuss RP-Rewriter:

  • ( RP-Rewriter: An Optimized Rewriter for Large Terms in ACL2)
  • ( Verified Implementation of an Efficient Term-Rewriting Algorithm for Multiplier Verification on ACL2 )

Subtopics

Rp-ruleset
Functions to manage RP-Rewriter's ruleset
Defthmrp
A defthm macro that calls RP-Rewriter as a clause processor with custom arguments.
Rp-rewriter/meta-rules
The steps necessary to add meta rules to RP-Rewriter
Rp-utilities
Some useful tools for rp-rewriter
Rp-rewriter-demo
A demo and a case where side-conditions of RP-Rewriter are used.
Rp-rewriter/debugging
Tools that may be used while debugging RP-Rewriter.
Rp-rewriter/applications
Applications of RP-Rewriter