• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
        • Fgl-rewrite-rules
          • Binder-functions
          • Fgl-syntactic-checker-binders
          • Binder
          • Fancy-ev
          • Backtraces
          • Annotate
            • Bind-fn-annotation
              • Interp-st-nth-fn-annotation
              • Bind-nth-fn-annotation
            • Binder-rules
            • Def-fgl-program
            • Bind-var
            • Add-fgl-brewrites
            • Def-fgl-rewrite
            • Narrow-equiv
            • Trigger-constraints
            • Def-fgl-branch-merge
            • Add-fgl-rewrites
            • Fgl-interp-obj
            • Syntax-bind
            • Fgl-hide
            • Collect-cmr-rewrites-for-formula-name
            • Fgl-time
            • Fgl-prog2
            • Assume
            • Add-fgl-binder-meta
            • Add-fgl-primitive
            • Add-fgl-meta
            • Add-fgl-branch-merges
            • Cmr::rewritelist->lhses
            • Syntax-interp
            • Remove-fgl-brewrites
            • Remove-fgl-branch-merges
            • Lhses->branch-function-syms
            • Enable-execution
            • Abort-rewrite
            • Remove-fgl-rewrites
            • Lhses->leading-function-syms
            • Remove-fgl-primitive
            • Remove-fgl-binder-meta
            • If!
            • Disable-execution
            • Remove-fgl-meta
            • Fgl-time-fn
            • Disable-definition
            • Def-fgl-brewrite
          • Fgl-function-mode
          • Fgl-object
          • Fgl-solving
          • Fgl-handling-if-then-elses
          • Fgl-counterexamples
          • Fgl-getting-bits-from-objects
          • Fgl-primitive-and-meta-rules
          • Fgl-interpreter-overview
          • Fgl-correctness-of-binding-free-variables
          • Fgl-debugging
          • Fgl-testbenches
          • Def-fgl-boolean-constraint
          • Fgl-stack
          • Fgl-rewrite-tracing
          • Def-fgl-param-thm
          • Def-fgl-thm
          • Fgl-fast-alist-support
          • Fgl-array-support
          • Advanced-equivalence-checking-with-fgl
          • Fgl-fty-support
          • Fgl-internals
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Annotate

    Bind-fn-annotation

    Get the annotation associated with the innermost call of the given function being rewritten

    Usage:

    (bind-fn-annotation free-var 'my-fn)

    finds the record of the innermost call of my-fn in the FGL rewriter's stack, and checks whether there was a call of annotate wrapped immediately around it. If so, it binds the given free variable to the first argument of that call of annotate; otherwise, it binds it to NIL. The bind-fn-annotation form always returns T, so it can be used as a hypothesis in a rewrite rule.

    A related utility is bind-nth-fn-annotation which gets the annotation associated with the nth-innermost call of the function, rather than the innermost.