• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
        • Aig-constructors
        • Aig-vars
        • Aig-sat
        • Bddify
        • Aig-substitution
        • Aig-other
        • Aig-semantics
          • Aig-eval
            • Aig-env-lookup-missing-action
            • Aig-env-lookup
            • Aig-alist-lookup
            • Aig-eval-thms
            • Aig-env-lookup-missing-output
          • Aig-alist-equiv
          • Aig-env-equiv
          • Aig-equiv
          • Aig-eval-alist
          • Aig-eval-list
          • Aig-eval-alists
        • Aig-and-count
      • Satlink
      • Truth
      • Ubdds
      • Bdd
      • Faig
      • Bed
      • 4v
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Math
    • Testing-utilities
  • Aig-semantics

Aig-eval

(aig-eval x env) gives the semantics of aigs: it gives the Boolean value of the AIG x under the environment env.

Signature
(aig-eval x env) → *
Arguments
x — The AIG to evaluate.
env — A fast alist that binds variables to values. Typically it should bind every variable in x to some Boolean value. When this isn't the case, variables are assigned the default value t; see aig-env-lookup.

This function is memoized. You should typically free its memo table after you are done with whatever env you are using, to avoid excessive memory usage. (We don't use :forget t because you often want to evaluate several related AIGs.)

Definitions and Theorems

Function: aig-eval

(defun aig-eval (x env)
  (declare (xargs :guard t))
  (let ((__function__ 'aig-eval))
    (declare (ignorable __function__))
    (aig-cases x
               :true t
               :false nil
               :var (aig-env-lookup x env)
               :inv (not (aig-eval (car x) env))
               :and (and (aig-eval (car x) env)
                         (aig-eval (cdr x) env)))))

Function: aig-eval-memoize-condition

(defun aig-eval-memoize-condition (x env)
  (declare (ignorable x env)
           (xargs :guard 't))
  (and (consp x) (cdr x)))

Subtopics

Aig-env-lookup-missing-action
Configurable warnings about missing variables in AIG evaluation.
Aig-env-lookup
Look up the value of an AIG variable in an environment.
Aig-alist-lookup
Look up the value of an AIG variable in an environment.
Aig-eval-thms
Basic theorems about aig-eval.
Aig-env-lookup-missing-output
Stub for warnings about missing variables in AIG evaluation.