• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
      • Gl
        • Term-level-reasoning
        • Glmc
        • Other-resources
        • Optimization
        • Reference
          • Def-gl-thm
          • Shape-specs
          • Symbolic-objects
          • Gl-aside
          • Def-gl-param-thm
          • Symbolic-arithmetic
          • Bfr
          • Def-gl-boolean-constraint
          • Gl-mbe
          • Bvec
          • Flex-bindings
          • Auto-bindings
          • Gl-interp
          • Gl-set-uninterpreted
          • Def-gl-clause-processor
          • Def-glcp-ctrex-rewrite
          • ACL2::always-equal
          • Gl-hint
          • Def-gl-rewrite
          • Def-gl-branch-merge
            • Gl-force-check
            • Gl-concretize
            • Gl-assert
            • Gl-param-thm
            • Gl-simplify-satlink-mode
            • Gl-satlink-mode
            • Gl-bdd-mode
            • Gl-aig-bddify-mode
            • Gl-fraig-satlink-mode
          • Debugging
          • Basic-tutorial
        • Witness-cp
        • Ccg
        • Install-not-normalized
        • Rewrite$
        • Removable-runes
        • Efficiency
        • Rewrite-bounds
        • Bash
        • Def-dag-measure
        • Fgl
        • Bdd
        • Remove-hyps
        • Contextual-rewriting
        • Simp
        • Rewrite$-hyps
        • Bash-term-to-dnf
        • Use-trivial-ancestors-check
        • Minimal-runes
        • Clause-processor-tools
        • Fn-is-body
        • Without-subsumption
        • Rewrite-equiv-hint
        • Def-bounds
        • Rewrite$-context
        • Try-gl-concls
        • Hint-utils
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Reference
    • Term-level-reasoning

    Def-gl-branch-merge

    Define a rule for GL to use in merging IF branches

    Usage:

    (gl::def-gl-branch-merge my-branch-merge-rule
       (implies (and (syntaxp (integerp m))
                     (integerp m))
                (equal (if cond (logcons b n) m)
                       (logcons (if cond b (logcar m))
                                (if cond n (logcdr m)))))
     :hints ...)

    This form creates an ACL2 theorem with :rule-classes nil and installs it in a table that GL references when attempting to merge branches of an IF term.

    Branch merge rules work similarly to normal rewrite rules, except that:

    • the LHS must be of the form: (if <var> <then-term> <else-term>)
    • each rule is indexed by the function symbol of the then-term, so then-term must be a function call.

    Definitions and Theorems

    Function: def-gl-branch-merge-fn

    (defun
     def-gl-branch-merge-fn
     (name body hints otf-flg)
     (cons
      'progn
      (cons
       (cons
        'defthm
        (cons
         name
         (cons
             body
             (cons ':hints
                   (cons hints
                         (cons ':otf-flg
                               (cons otf-flg '(:rule-classes nil))))))))
       (cons (cons 'add-gl-branch-merge
                   (cons name 'nil))
             'nil))))