• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • 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
          • Defsvtv
          • Process.lisp
          • Svtv-doc
          • Svtv-chase$
          • Svtv-versus-stv
          • Svtv-debug-fsm
          • Structure.lisp
          • Svtv-debug
          • Def-pipeline-thm
          • Expand.lisp
            • Svtv-parse-path-indices
            • Svtv-extend-entrylist
              • Svtv-parse-path/select-aux
              • Svtv-fsm-add-names
              • Svtv-1wire->lhs
              • Svtv-wires->lhses
              • Svtv-concat->lhs
              • Svtv-wire->lhs!
              • Svtv-lines->overrides
              • Svtv-wire->lhs
              • Svtv-mod-alias-guard
              • Svtv-fsm-mod-alias-guard
              • Svtv-parse-path/select
              • Svtv-expand-lines
              • Svtv-max-length
              • Msg-list
            • 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
    • Expand.lisp

    Svtv-extend-entrylist

    Signature
    (svtv-extend-entrylist x len lastval lastent width) → xx
    Arguments
    x — Guard (svtv-entrylist-p x).
    len — Guard (natp len).
    lastval — Guard (svtv-entry-p lastval).
    lastent — Guard (svtv-entry-p lastent).
    width — Guard (natp width).
    Returns
    xx — Type (svtv-entrylist-p xx).

    Definitions and Theorems

    Function: svtv-extend-entrylist

    (defun svtv-extend-entrylist (x len lastval lastent width)
     (declare (xargs :guard (and (svtv-entrylist-p x)
                                 (natp len)
                                 (svtv-entry-p lastval)
                                 (svtv-entry-p lastent)
                                 (natp width))))
     (let ((__function__ 'svtv-extend-entrylist))
      (declare (ignorable __function__))
      (b*
       (((when (zp len)) nil)
        (lastval (svtv-entry-fix lastval))
        (lastent (svtv-entry-fix lastent))
        (ent (if (consp x)
                 (svtv-entry-fix (car x))
               lastent))
        (val
         (if
          (and (symbolp ent)
               (equal (symbol-name ent) "~"))
          (if (4vec-p lastval)
              (4vec-bitnot lastval)
           (prog2$
            (raise
              "Toggle entries (~) must be preceded by a constant value")
            '_))
          ent))
        (val (if (4vec-p val)
                 (4vec-zero-ext (2vec (lnfix width)) val)
               val)))
       (cons val
             (svtv-extend-entrylist (cdr x)
                                    (1- len)
                                    val ent width)))))

    Theorem: svtv-entrylist-p-of-svtv-extend-entrylist

    (defthm svtv-entrylist-p-of-svtv-extend-entrylist
      (b* ((xx (svtv-extend-entrylist x len lastval lastent width)))
        (svtv-entrylist-p xx))
      :rule-classes :rewrite)

    Theorem: len-of-svtv-extend-entrylist

    (defthm len-of-svtv-extend-entrylist
      (equal (len (svtv-extend-entrylist x len lastval lastent width))
             (nfix len)))

    Theorem: svtv-extend-entrylist-of-svtv-entrylist-fix-x

    (defthm svtv-extend-entrylist-of-svtv-entrylist-fix-x
      (equal (svtv-extend-entrylist (svtv-entrylist-fix x)
                                    len lastval lastent width)
             (svtv-extend-entrylist x len lastval lastent width)))

    Theorem: svtv-extend-entrylist-svtv-entrylist-equiv-congruence-on-x

    (defthm svtv-extend-entrylist-svtv-entrylist-equiv-congruence-on-x
     (implies
      (svtv-entrylist-equiv x x-equiv)
      (equal (svtv-extend-entrylist x len lastval lastent width)
             (svtv-extend-entrylist x-equiv len lastval lastent width)))
     :rule-classes :congruence)

    Theorem: svtv-extend-entrylist-of-nfix-len

    (defthm svtv-extend-entrylist-of-nfix-len
      (equal (svtv-extend-entrylist x (nfix len)
                                    lastval lastent width)
             (svtv-extend-entrylist x len lastval lastent width)))

    Theorem: svtv-extend-entrylist-nat-equiv-congruence-on-len

    (defthm svtv-extend-entrylist-nat-equiv-congruence-on-len
     (implies
      (nat-equiv len len-equiv)
      (equal (svtv-extend-entrylist x len lastval lastent width)
             (svtv-extend-entrylist x len-equiv lastval lastent width)))
     :rule-classes :congruence)

    Theorem: svtv-extend-entrylist-of-svtv-entry-fix-lastval

    (defthm svtv-extend-entrylist-of-svtv-entry-fix-lastval
      (equal (svtv-extend-entrylist x len (svtv-entry-fix lastval)
                                    lastent width)
             (svtv-extend-entrylist x len lastval lastent width)))

    Theorem: svtv-extend-entrylist-svtv-entry-equiv-congruence-on-lastval

    (defthm svtv-extend-entrylist-svtv-entry-equiv-congruence-on-lastval
     (implies
      (svtv-entry-equiv lastval lastval-equiv)
      (equal (svtv-extend-entrylist x len lastval lastent width)
             (svtv-extend-entrylist x len lastval-equiv lastent width)))
     :rule-classes :congruence)

    Theorem: svtv-extend-entrylist-of-svtv-entry-fix-lastent

    (defthm svtv-extend-entrylist-of-svtv-entry-fix-lastent
      (equal
           (svtv-extend-entrylist x len lastval (svtv-entry-fix lastent)
                                  width)
           (svtv-extend-entrylist x len lastval lastent width)))

    Theorem: svtv-extend-entrylist-svtv-entry-equiv-congruence-on-lastent

    (defthm svtv-extend-entrylist-svtv-entry-equiv-congruence-on-lastent
     (implies
      (svtv-entry-equiv lastent lastent-equiv)
      (equal (svtv-extend-entrylist x len lastval lastent width)
             (svtv-extend-entrylist x len lastval lastent-equiv width)))
     :rule-classes :congruence)

    Theorem: svtv-extend-entrylist-of-nfix-width

    (defthm svtv-extend-entrylist-of-nfix-width
      (equal (svtv-extend-entrylist x len lastval lastent (nfix width))
             (svtv-extend-entrylist x len lastval lastent width)))

    Theorem: svtv-extend-entrylist-nat-equiv-congruence-on-width

    (defthm svtv-extend-entrylist-nat-equiv-congruence-on-width
     (implies
      (nat-equiv width width-equiv)
      (equal (svtv-extend-entrylist x len lastval lastent width)
             (svtv-extend-entrylist x len lastval lastent width-equiv)))
     :rule-classes :congruence)