• 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-spec
            • Svtv-spec-run
            • Svtv-spec-fix
              • Make-svtv-spec
              • Svtv-spec-p
              • Svtv-spec-equiv
              • Svtv-spec->override-test-alists
              • Svtv-spec->override-val-alists
              • Svtv-spec->cycle-phases
              • Change-svtv-spec
              • Svtv-spec->namemap
              • Svtv-spec->initst-alist
              • Svtv-spec->in-alists
              • Svtv-spec->probes
              • Svtv-spec->fsm
            • 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-spec

    Svtv-spec-fix

    Fixing function for svtv-spec structures.

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

    Definitions and Theorems

    Function: svtv-spec-fix$inline

    (defun svtv-spec-fix$inline (x)
     (declare (xargs :guard (svtv-spec-p x)))
     (let ((__function__ 'svtv-spec-fix))
      (declare (ignorable __function__))
      (mbe
          :logic
          (b* ((fsm (fsm-fix (cdr (std::da-nth 0 x))))
               (cycle-phases
                    (svtv-cyclephaselist-fix (cdr (std::da-nth 1 x))))
               (namemap (svtv-name-lhs-map-fix (cdr (std::da-nth 2 x))))
               (probes (svtv-probealist-fix (cdr (std::da-nth 3 x))))
               (in-alists (svex-alistlist-fix (cdr (std::da-nth 4 x))))
               (override-test-alists
                    (svex-alistlist-fix (cdr (std::da-nth 5 x))))
               (override-val-alists
                    (svex-alistlist-fix (cdr (std::da-nth 6 x))))
               (initst-alist (svex-alist-fix (cdr (std::da-nth 7 x)))))
            (list (cons 'fsm fsm)
                  (cons 'cycle-phases cycle-phases)
                  (cons 'namemap namemap)
                  (cons 'probes probes)
                  (cons 'in-alists in-alists)
                  (cons 'override-test-alists
                        override-test-alists)
                  (cons 'override-val-alists
                        override-val-alists)
                  (cons 'initst-alist initst-alist)))
          :exec x)))

    Theorem: svtv-spec-p-of-svtv-spec-fix

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

    Theorem: svtv-spec-fix-when-svtv-spec-p

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

    Function: svtv-spec-equiv$inline

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

    Theorem: svtv-spec-equiv-is-an-equivalence

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

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

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

    Theorem: svtv-spec-fix-under-svtv-spec-equiv

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

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

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

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

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

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

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

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

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