• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
      • Gl
      • Witness-cp
      • Ccg
      • Install-not-normalized
      • Rewrite$
      • Fgl
        • Fgl-rewrite-rules
        • Fgl-function-mode
        • Fgl-object
        • Fgl-solving
        • Fgl-handling-if-then-elses
        • Fgl-getting-bits-from-objects
        • Fgl-primitive-and-meta-rules
        • Fgl-counterexamples
        • 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
      • 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
  • Bfr

Bfrstate

Object encoding the bfr-mode and current node index bound, if using AIGNET mode.

Signature
(bfrstate mode bound) → bfrstate
Arguments
mode — Guard (bfr-mode-p mode).
bound — Guard (natp bound).
Returns
bfrstate — Type (bfrstate-p bfrstate).

For a bfr object to be well-formed, we need to know, first, whether we're operating in BDD, AIG, or AIGNET mode, and second, if in AIGNET mode, the bound on node indices. This type encodes the bfr-mode in the lower 2 bits and the node index bound in the upper bits of an integer.

Definitions and Theorems

Function: bfrstate

(defun bfrstate (mode bound)
  (declare (xargs :guard (and (bfr-mode-p mode) (natp bound))))
  (let ((__function__ 'bfrstate))
    (declare (ignorable __function__))
    (logior (ash (lnfix bound) 2)
            (bfr-mode-fix mode))))

Theorem: bfrstate-p-of-bfrstate

(defthm bfrstate-p-of-bfrstate
  (b* ((bfrstate (bfrstate mode bound)))
    (bfrstate-p bfrstate))
  :rule-classes (:rewrite :type-prescription))

Theorem: bfrstate-of-bfr-mode-fix-mode

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

Theorem: bfrstate-bfr-mode-equiv-congruence-on-mode

(defthm bfrstate-bfr-mode-equiv-congruence-on-mode
  (implies (bfr-mode-equiv mode mode-equiv)
           (equal (bfrstate mode bound)
                  (bfrstate mode-equiv bound)))
  :rule-classes :congruence)

Theorem: bfrstate-of-nfix-bound

(defthm bfrstate-of-nfix-bound
  (equal (bfrstate mode (nfix bound))
         (bfrstate mode bound)))

Theorem: bfrstate-nat-equiv-congruence-on-bound

(defthm bfrstate-nat-equiv-congruence-on-bound
  (implies (acl2::nat-equiv bound bound-equiv)
           (equal (bfrstate mode bound)
                  (bfrstate mode bound-equiv)))
  :rule-classes :congruence)

Subtopics

Bfrstate-fix
Fixing function for bfrstate objects.
Bfrstate-p
Recognizer for a bfrstate object.
Bfrstate->mode
Access the bfr-mode field of a bfrstate object.
Bfrstate->bound
Access the node index bound field of a bfrstate object.