• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
      • Gl
        • Term-level-reasoning
          • G-call
          • Def-gl-boolean-constraint
          • Gl-set-uninterpreted
          • Def-glcp-ctrex-rewrite
          • Def-gl-rewrite
            • Def-gl-branch-merge
          • Glmc
          • Other-resources
          • Optimization
            • Term-level-reasoning
              • G-call
              • Def-gl-boolean-constraint
              • Gl-set-uninterpreted
              • Def-glcp-ctrex-rewrite
              • Def-gl-rewrite
                • Def-gl-branch-merge
              • Def-gl-param-thm
              • Case-splitting
              • Modes
              • Memory-management
              • Preferred-definitions
              • Custom-symbolic-counterparts
              • Redundant-recursion
              • Alternate-definitions
              • Gl-param-thm
            • Reference
            • Debugging
            • Basic-tutorial
          • Esim
          • Vl2014
          • Sv
          • Fgl
          • Vwsim
          • Vl
          • X86isa
          • Svl
          • Rtl
        • Software-verification
        • Math
        • Testing-utilities
      • Reference
      • Term-level-reasoning

      Def-gl-rewrite

      Define a rewrite rule for GL to use on term-level objects

      GL can use ACL2-style rewrite rules to simplify term-level symbolic objects. However, typically one wants a different theory for ACL2 theorem proving than one wants to use inside GL. GL::DEF-GL-REWRITE defines a rewrite rule that is only used inside GL:

      (gl::def-gl-rewrite my-rewrite-rule
         (implies (and (syntaxp (and (integerp n) (< 0 (integer-length n))))
                       (< 0 m))
                  (equal (logand n m)
                         (logcons (b-and (logcar n) (logcar m))
                                  (logand (logcdr n) (logcdr m)))))
        :hints ...)

      This defines a disabled ACL2 rewrite rule called my-rewrite-rule, and adds my-rewrite-rule to the table of rules GL is allowed to use. (GL will still use it even though it is disabled, as long as it is in that table.)

      Def-gl-rewrite supports syntaxp hypotheses, but the term representation used is different from ACL2's. Instead of being bound to TERMPs, the variables are bound to symbolic objects. See symbolic-objects for reference.