• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
      • Gl
      • Witness-cp
      • Ccg
      • Install-not-normalized
      • Rewrite$
      • Fgl
        • Fgl-rewrite-rules
          • Binder-functions
          • Fgl-syntactic-checker-binders
          • Fancy-ev
          • Backtraces
          • Binder
          • Annotate
            • Bind-fn-annotation
              • Interp-st-fn-annotation
              • Interp-st-nth-fn-annotation
              • Interp-st-fn-annotation
                • Bind-nth-fn-annotation
              • Binder-rules
              • Def-fgl-program
              • Bind-var
              • Abort-current-rewrite
              • Add-fgl-brewrites
              • Def-fgl-rewrite
              • Narrow-equiv
              • Trigger-constraints
              • Def-fgl-branch-merge
              • Add-fgl-rewrites
              • Syntax-bind
              • Fgl-interp-obj
              • 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
              • Syntax-interp
              • Cmr::rewritelist->lhses
              • 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
            • Def-fgl-param-thm
            • Fgl-rewrite-tracing
            • Def-fgl-thm
            • Fgl-fast-alist-support
            • Fgl-array-support
            • Advanced-equivalence-checking-with-fgl
            • Fgl-fty-support
            • Fgl-internals
          • 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
      • Bind-fn-annotation
      • Annotate

      Interp-st-fn-annotation

      Finds the annotation, if any, of the innermost nesting of fn on the stack.

      Signature
      (interp-st-fn-annotation fn interp-st) → annotation
      Arguments
      fn — Guard (pseudo-fnsym-p fn).
      Returns
      annotation — Type (fgl-object-p annotation).

      Definitions and Theorems

      Function: interp-st-fn-annotation

      (defun interp-st-fn-annotation (fn interp-st)
        (declare (xargs :stobjs (interp-st)))
        (declare (xargs :guard (pseudo-fnsym-p fn)))
        (let ((__function__ 'interp-st-fn-annotation))
          (declare (ignorable __function__))
          (b* ((idx (interp-st-scan-for-fnsym 0 fn interp-st))
               ((unless idx) nil)
               ((when (<= (- (interp-st-full-scratch-len interp-st)
                             2)
                          idx))
                nil))
            (and (eq (interp-st-nth-scratch-kind (+ 2 idx)
                                                 interp-st)
                     :fnsym)
                 (eq (interp-st-nth-scratch-fnsym (+ 2 idx)
                                                  interp-st)
                     'annotate)
                 (eq (interp-st-nth-scratch-kind (+ 1 idx)
                                                 interp-st)
                     :fgl-obj)
                 (interp-st-nth-scratch-fgl-obj (+ 1 idx)
                                                interp-st)))))

      Theorem: fgl-object-p-of-interp-st-fn-annotation

      (defthm fgl-object-p-of-interp-st-fn-annotation
        (b* ((annotation (interp-st-fn-annotation fn interp-st)))
          (fgl-object-p annotation))
        :rule-classes :rewrite)