• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • Svex-decomposition-methodology
        • Sv-versus-esim
        • Svex-decomp
        • Svex-compose-dfs
        • Svex-compilation
        • Moddb
        • Svmods
        • Svstmt
        • Sv-tutorial
        • Expressions
          • Rewriting
          • Svex
          • Bit-blasting
          • Functions
          • 4vmask
          • Why-infinite-width
          • Svex-vars
          • Evaluation
            • Svex-xeval
              • Svex-alist-xeval
                • Svex-alist-xeval-aux
              • 4vec-xfree-p
              • Svexlist-xeval
              • Svex-fn/args-xeval
              • Svex-call-xeval
            • Svex-mono-eval
            • Svex-eval
            • Svex-apply
            • Svex-env
            • Svex-alist-eval
            • Svar-boolmasks-lookup
            • Svex-s4eval
            • Svexlist-unquote
            • Svex-alist-eval-for-symbolic
            • Svexlist-eval
            • Svexlist-quotesp
            • Svar-boolmasks
            • Svexlist-s4eval
            • Svexlist-eval-for-symbolic
          • Values
        • Symbolic-test-vector
        • Vl-to-svex
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Svex-xeval

Svex-alist-xeval

Maps svex-xeval over an svex alist.

Signature
(svex-alist-xeval x) → result
Arguments
x — Alist of variables to svex expressions to evaluate. Need not be fast.
    Guard (svex-alist-p x).
Returns
result — New (slow) alist, binds the variables to their expressions' values.
    Type (svex-env-p result).

Definitions and Theorems

Function: svex-alist-xeval

(defun svex-alist-xeval (x)
  (declare (xargs :guard (svex-alist-p x)))
  (let ((__function__ 'svex-alist-xeval))
    (declare (ignorable __function__))
    (mbe :logic
         (if (atom x)
             nil
           (if (mbt (and (consp (car x)) (svar-p (caar x))))
               (cons (cons (caar x) (svex-xeval (cdar x)))
                     (svex-alist-xeval (cdr x)))
             (svex-alist-xeval (cdr x))))
         :exec (svex-alist-xeval-aux x))))

Theorem: svex-env-p-of-svex-alist-xeval

(defthm svex-env-p-of-svex-alist-xeval
  (b* ((result (svex-alist-xeval x)))
    (svex-env-p result))
  :rule-classes :rewrite)

Theorem: svex-alist-xeval-of-svex-alist-fix-x

(defthm svex-alist-xeval-of-svex-alist-fix-x
  (equal (svex-alist-xeval (svex-alist-fix x))
         (svex-alist-xeval x)))

Theorem: svex-alist-xeval-svex-alist-equiv-congruence-on-x

(defthm svex-alist-xeval-svex-alist-equiv-congruence-on-x
  (implies (svex-alist-equiv x x-equiv)
           (equal (svex-alist-xeval x)
                  (svex-alist-xeval x-equiv)))
  :rule-classes :congruence)

Theorem: svex-env-lookup-of-svex-alist-xeval

(defthm svex-env-lookup-of-svex-alist-xeval
  (equal (svex-env-lookup k (svex-alist-xeval x))
         (let ((xk (svex-lookup k x)))
           (if xk (svex-xeval xk) (4vec-x)))))

Theorem: svex-env-boundp-of-svex-alist-xeval

(defthm svex-env-boundp-of-svex-alist-xeval
  (iff (svex-env-boundp k (svex-alist-xeval x))
       (svex-lookup k x)))

Theorem: svex-alist-xeval-of-append

(defthm svex-alist-xeval-of-append
  (equal (svex-alist-xeval (append a b))
         (append (svex-alist-xeval a)
                 (svex-alist-xeval b))))

Theorem: alist-keys-of-svex-alist-xeval

(defthm alist-keys-of-svex-alist-xeval
  (equal (alist-keys (svex-alist-xeval x))
         (svex-alist-keys x)))

Subtopics

Svex-alist-xeval-aux