• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
          • Svtv-data
          • Defsvtv$
          • Svtv-run
          • Defsvtv-phasewise
          • Svtv
            • Svtv-chase
            • Svtv-p
            • Svtv-to-fsm
            • Make-svtv
            • Svtv-fix
              • Change-svtv
              • Svtv-equiv
              • Svtv->orig-overrides
              • Svtv->orig-internals
              • Svtv->expanded-overrides
              • Svtv->states
              • Svtv->nextstate
              • Svtv->expanded-ins
              • Svtv->outmasks
              • Svtv->outexprs
              • Svtv->orig-outs
              • Svtv->orig-ins
              • Svtv->inmasks
              • Svtv->nphases
              • Svtv->name
              • Svtv->labels
              • Svtv->inmap
              • Svtv->form
            • Svtv-spec
            • Defsvtv
            • Process.lisp
            • Svtv-doc
            • Svtv-chase$
            • Svtv-versus-stv
            • Svtv-debug-fsm
            • Structure.lisp
            • Svtv-debug
            • Def-pipeline-thm
            • Expand.lisp
            • Def-cycle-thm
            • Svtv-utilities
            • Svtv-debug$
            • Defsvtv$-phasewise
          • Svex-decomposition-methodology
          • Sv-versus-esim
          • Svex-decomp
          • Svex-compose-dfs
          • Svex-compilation
          • Moddb
          • Svmods
          • Svstmt
          • Sv-tutorial
          • Expressions
          • Symbolic-test-vector
          • Vl-to-svex
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Svtv

    Svtv-fix

    Fixing function for svtv structures.

    Signature
    (svtv-fix x) → new-x
    Arguments
    x — Guard (svtv-p x).
    Returns
    new-x — Type (svtv-p new-x).

    Definitions and Theorems

    Function: svtv-fix$inline

    (defun svtv-fix$inline (x)
     (declare (xargs :guard (svtv-p x)))
     (let ((__function__ 'svtv-fix))
      (declare (ignorable __function__))
      (mbe :logic
           (b* ((name (acl2::symbol-fix (std::da-nth 0 x)))
                (outexprs (svex-alist-fix (std::da-nth 1 x)))
                (nextstate (svex-alist-fix (std::da-nth 2 x)))
                (states (svex-alistlist-fix (std::da-nth 3 x)))
                (inmasks (svar-boolmasks-fix (std::da-nth 4 x)))
                (outmasks (svar-boolmasks-fix (std::da-nth 5 x)))
                (inmap (svtv-inputmap-fix (std::da-nth 6 x)))
                (orig-ins (true-list-list-fix (std::da-nth 7 x)))
                (orig-overrides (true-list-list-fix (std::da-nth 8 x)))
                (orig-outs (true-list-list-fix (std::da-nth 9 x)))
                (orig-internals (true-list-list-fix (std::da-nth 10 x)))
                (expanded-ins (svtv-lines-fix (std::da-nth 11 x)))
                (expanded-overrides (svtv-lines-fix (std::da-nth 12 x)))
                (nphases (nfix (std::da-nth 13 x)))
                (labels (acl2::symbol-list-fix (std::da-nth 14 x)))
                (form (std::da-nth 15 x)))
             (list name outexprs nextstate states inmasks
                   outmasks inmap orig-ins orig-overrides
                   orig-outs orig-internals expanded-ins
                   expanded-overrides nphases labels form))
           :exec x)))

    Theorem: svtv-p-of-svtv-fix

    (defthm svtv-p-of-svtv-fix
      (b* ((new-x (svtv-fix$inline x)))
        (svtv-p new-x))
      :rule-classes :rewrite)

    Theorem: svtv-fix-when-svtv-p

    (defthm svtv-fix-when-svtv-p
      (implies (svtv-p x)
               (equal (svtv-fix x) x)))

    Function: svtv-equiv$inline

    (defun svtv-equiv$inline (x y)
      (declare (xargs :guard (and (svtv-p x) (svtv-p y))))
      (equal (svtv-fix x) (svtv-fix y)))

    Theorem: svtv-equiv-is-an-equivalence

    (defthm svtv-equiv-is-an-equivalence
      (and (booleanp (svtv-equiv x y))
           (svtv-equiv x x)
           (implies (svtv-equiv x y)
                    (svtv-equiv y x))
           (implies (and (svtv-equiv x y) (svtv-equiv y z))
                    (svtv-equiv x z)))
      :rule-classes (:equivalence))

    Theorem: svtv-equiv-implies-equal-svtv-fix-1

    (defthm svtv-equiv-implies-equal-svtv-fix-1
      (implies (svtv-equiv x x-equiv)
               (equal (svtv-fix x) (svtv-fix x-equiv)))
      :rule-classes (:congruence))

    Theorem: svtv-fix-under-svtv-equiv

    (defthm svtv-fix-under-svtv-equiv
      (svtv-equiv (svtv-fix x) x)
      :rule-classes (:rewrite :rewrite-quoted-constant))

    Theorem: equal-of-svtv-fix-1-forward-to-svtv-equiv

    (defthm equal-of-svtv-fix-1-forward-to-svtv-equiv
      (implies (equal (svtv-fix x) y)
               (svtv-equiv x y))
      :rule-classes :forward-chaining)

    Theorem: equal-of-svtv-fix-2-forward-to-svtv-equiv

    (defthm equal-of-svtv-fix-2-forward-to-svtv-equiv
      (implies (equal x (svtv-fix y))
               (svtv-equiv x y))
      :rule-classes :forward-chaining)

    Theorem: svtv-equiv-of-svtv-fix-1-forward

    (defthm svtv-equiv-of-svtv-fix-1-forward
      (implies (svtv-equiv (svtv-fix x) y)
               (svtv-equiv x y))
      :rule-classes :forward-chaining)

    Theorem: svtv-equiv-of-svtv-fix-2-forward

    (defthm svtv-equiv-of-svtv-fix-2-forward
      (implies (svtv-equiv x (svtv-fix y))
               (svtv-equiv x y))
      :rule-classes :forward-chaining)