• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
      • Satlink
      • Truth
      • Ubdds
      • Bdd
      • Faig
      • Bed
      • 4v
        • 4v-sexprs
          • 4v-sexpr-vars
          • 4v-sexpr-eval
          • 4v-sexpr-to-faig
          • 4v-sexpr-restrict-with-rw
          • 4vs-constructors
          • 4v-sexpr-compose-with-rw
          • 4v-sexpr-restrict
          • 4v-sexpr-alist-extract
          • 4v-sexpr-compose
          • 4v-nsexpr-p
          • 4v-sexpr-purebool-p
          • 4v-sexpr-<=
          • Sfaig
            • Sfaiglist-recover-4venv
            • Sfaiglist-make-faigenv
            • Sfaiglist
            • Sfaig-recover-4venv
              • Sfaig-make-faigenv
            • Sexpr-equivs
            • 3v-syntax-sexprp
            • Sexpr-rewriting
            • 4v-sexpr-ind
            • 4v-alist-extract
          • 4v-monotonicity
          • 4v-operations
          • Why-4v-logic
          • 4v-<=
          • 4vp
          • 4vcases
          • 4v-fix
          • 4v-lookup
      • Projects
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Sfaig

    Sfaig-recover-4venv

    For use with sfaig, translates faig environments into equivalent sexpr environments.

    Signature
    (sfaig-recover-4venv sexpr faig-env) → sexpr-env
    Arguments
    sexpr — A single 4v-sexpr.
    faig-env — A faig-env to evaluate the corresponding faig.
    Returns
    sexpr-env — The corresponding sexpr environment.

    Definitions and Theorems

    Function: sfaig-recover-4venv

    (defun sfaig-recover-4venv (sexpr faig-env)
     (declare (xargs :guard t))
     (let ((__function__ 'sfaig-recover-4venv))
      (declare (ignorable __function__))
      (b* ((vars (4v-sexpr-vars-1pass sexpr))
           (onoff (num-varmap vars 0)))
        (faig-const-alist->4v-alist (faig-eval-alist onoff faig-env)))))

    Theorem: sexpr-eval-of-sfaig-recover-4venv

    (defthm sexpr-eval-of-sfaig-recover-4venv
      (b* ((faig (sfaig sexpr))
           (sexpr-env (sfaig-recover-4venv sexpr faig-env)))
        (equal (4v-sexpr-eval sexpr sexpr-env)
               (faig-const->4v (faig-eval faig faig-env)))))