• 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
        • 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
          • Symbolic-arithmetic
          • Bfr
            • Bfr-eval
            • Bfrstate
              • Bfrstate-fix
              • Bfrstate-p
              • Bfrstate->mode
                • Bfrstate->bound
              • Bfr->aignet-lit
              • Bfr-p
              • Bounded-lit-fix
              • Bfr-list-fix
              • Aignet-lit->bfr
              • Variable-g-bindings
              • Bfr-listp$
              • Bfrstate>=
              • Bfr-listp-witness
              • Fgl-object-bindings-bfrlist
              • Bfr-set-var
              • Bfr-negate
              • Bfr-fix
              • Fgl-bfr-object-bindings-p
              • Bfr-mode
              • Bfr-mode-is
              • Lbfr-case
              • Bfrstate-case
              • Bfrstate-mode-is
              • Lbfr-mode-is
              • Bfr-mode-p
            • Fgl-interpreter-state
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Bfrstate

    Bfrstate->mode

    Access the bfr-mode field of a bfrstate object.

    Signature
    (bfrstate->mode x) → mode
    Arguments
    x — Guard (bfrstate-p x).
    Returns
    mode — Type (bfr-mode-p mode).

    Definitions and Theorems

    Function: bfrstate->mode$inline

    (defun bfrstate->mode$inline (x)
      (declare (xargs :guard (bfrstate-p x)))
      (let ((__function__ 'bfrstate->mode))
        (declare (ignorable __function__))
        (logand 3 (bfrstate-fix x))))

    Theorem: bfr-mode-p-of-bfrstate->mode

    (defthm bfr-mode-p-of-bfrstate->mode
      (b* ((mode (bfrstate->mode$inline x)))
        (bfr-mode-p mode))
      :rule-classes :rewrite)

    Theorem: bfrstate->mode-of-bfrstate

    (defthm bfrstate->mode-of-bfrstate
      (equal (bfrstate->mode (bfrstate mode bound))
             (bfr-mode-fix mode)))

    Theorem: bfrstate->mode$inline-of-bfrstate-fix-x

    (defthm bfrstate->mode$inline-of-bfrstate-fix-x
      (equal (bfrstate->mode$inline (bfrstate-fix x))
             (bfrstate->mode$inline x)))

    Theorem: bfrstate->mode$inline-bfrstate-equiv-congruence-on-x

    (defthm bfrstate->mode$inline-bfrstate-equiv-congruence-on-x
      (implies (bfrstate-equiv x x-equiv)
               (equal (bfrstate->mode$inline x)
                      (bfrstate->mode$inline x-equiv)))
      :rule-classes :congruence)