• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
      • Gl
      • 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
        • Use-termhint
          • Function-termhint
            • Hintcontext-bind
              • Hintcontext
            • Termhint-seq
            • Process-termhint
            • Hq
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Function-termhint

    Hintcontext-bind

    Bind variables for use in function-termhint.

    Usage:

    (hintcontext-bind bindings body)

    is logically equivalent to body, and should execute as body with no overhead, but sets up variable bindings that can be used in function-termhint.

    The following b* binder form is equivalent:

    (b* (((hintcontext-bind bindings))
         ...)
       ...)

    The main reason to use this is to allow hints to refer to different stages of a stobj's modifications. For example:

    (b* (((hintcontxt-bind ((st0 st))))
         (st (update-st-foo x st))
         ((hintcontext-bind ((st1 st))))
         (st (update-st-bar y st))
         ((hintcontext-bind ((st2 st))))
         (st (update-st-baz z st))
         ((hintcontext :after-updates)))
      ...)

    If a function-termhint gives a hint for the :after-updates context, it will have the following bindings available for use in the hint:

    ((st0 st)
     (st1 (update-st-foo x st))
     (st2 (update-st-bar y (update-st-foo x st)))
     (st  (update-st-baz z (update-st-bar y (update-st-foo x st)))))