• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
                • Add-meta-rule
                • Dont-rw
                  • Attach-meta-fncs
                  • Is-rp-clause-processor-up-to-date
                • 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
          • Refinement
          • Guard-holders
          • Type-set-inverter
          • Generalize
          • Corollary
          • Induction-heuristics
          • Well-founded-relation
          • Backchaining
          • Default-backchain-limit
        • Proof-builder
        • Recursion-and-induction
        • Hons-and-memoization
        • Events
        • Parallelism
        • History
        • Programming
        • Operational-semantics
        • Real
        • Start-here
        • Miscellaneous
        • Output-controls
        • Bdd
        • Macros
        • Installation
        • Mailing-lists
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Rp-rewriter/meta-rules

    Dont-rw

    A special data structure that RP-Rewriter meta rules may return to control rewriting of returned terms.

    When a term us returned from a meta rule, it appears as completely new to the rewriter and by default, it will be parsed completely and be rewritten for a second time. This can cause performance issues with big terms. To solve this problem, we use a special structure called dont-rw that meta functions may generate and return to control which subterms should be rewritten and which should not.

    The dont-rw structure has the same cons skeleton as the term itself such that it is traversed (car'ed and cdr'ed) the same way as the term. Whenever dont-rw structure becomes an atom and non-nil, the rewriting of corresponding term stops. For example, assume that a meta rule returns the following term and we would like to avoid rewriting all the instances of g, then the following dont-rw structure would enable that.

    (f1 (f2 (g a b) c) 
        (f3 d (g x y))) 
    
    (nil (nil t t) 
         (nil t t))