• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • 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-to-xml
            • Stv-entry-to-xml
            • Stv-line-to-xml
            • Stv-entries-to-xml
            • Stv-lines-to-xml
            • 4vec-to-bitwise-chars
            • Stv-repeat-last-entry
              • Stv-repeat-last-entries
              • 4vec-to-hex-chars
              • 4vec-to-hex-char
              • Stv-name-to-xml
              • Stv-labels-to-xml
              • 4vec-to-xml-chars
            • 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-doc

    Stv-repeat-last-entry

    Signature
    (stv-repeat-last-entry line nphases) → new-line
    Arguments
    line — Guard (true-listp line).
    nphases — Guard (natp nphases).
    Returns
    new-line — Type (true-listp new-line).

    Definitions and Theorems

    Function: stv-repeat-last-entry

    (defun stv-repeat-last-entry (line nphases)
      (declare (xargs :guard (and (true-listp line) (natp nphases))))
      (let ((__function__ 'stv-repeat-last-entry))
        (declare (ignorable __function__))
        (b* ((line (list-fix line))
             (llen (len line))
             (nphases (+ 1 nphases))
             ((unless (<= llen nphases))
              (er hard? 'stv-repeat-last-entry
                  "Number of phases is too small: line ~x0, nphases ~x1"
                  line nphases))
             ((when (= llen nphases)) line)
             (last-entry (car (last line)))
             (new-tail (repeat (- nphases llen) last-entry)))
          (append line new-tail))))

    Theorem: true-listp-of-stv-repeat-last-entry

    (defthm true-listp-of-stv-repeat-last-entry
      (b* ((new-line (stv-repeat-last-entry line nphases)))
        (true-listp new-line))
      :rule-classes :rewrite)