• Top
    • Documentation
    • Books
    • 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
            • Gl-mbe-fast
            • 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$
        • Fgl
        • Removable-runes
        • Efficiency
        • Rewrite-bounds
        • Bash
        • Def-dag-measure
        • 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
      • Math
      • Testing-utilities
    • Gl-mbe

    Gl-mbe-fast

    Like gl-mbe, but faster and without error checking during execution.

    See gl-mbe for background. (gl-mbe-fast spec exec) is logically identical to gl-mbe and should have exactly the same effect during symbolic execution. However, gl-mbe-fast may run more quickly during concrete execution, at the cost of some error checking.

    In particular, for ordinary, concrete execution, a (gl-mbe spec impl) form requires both the spec and impl forms to be evaluated and checked for equality. In contrast, gl-mbe-fast is essentially a macro that expands to:

    (mbe :logic (gl-mbe spec exec)
         :exec spec)

    The guard proof you will incur should be trivial because gl-mbe always just logically returns spec.

    Aside from performance, this behaves differently than gl-mbe in the degenerate case where your spec and exec forms produce different results. For example:

    (defun test1 (x y) (declare (xargs :guard t)) (gl-mbe x y))
    (defun test2 (x y) (declare (xargs :guard t)) (gl-mbe-fast x y))
    
    (test1 3 7)   --> causes a hard error
    (test2 3 7)   --> no error, returns 3