• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
          • 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-parse-path/select

    Signature
    (svtv-parse-path/select x) 
      → 
    (mv errmsg path range-msb range-lsb)
    Arguments
    x — Guard (stringp x).
    Returns
    path — Type (implies (not errmsg) (path-p path)).
    range-msb — Type (or (not range-msb) (natp range-msb)).
    range-lsb — Type (implies range-msb (natp range-lsb)).

    Definitions and Theorems

    Function: svtv-parse-path/select

    (defun svtv-parse-path/select (x)
      (declare (xargs :guard (stringp x)))
      (let ((__function__ 'svtv-parse-path/select))
        (declare (ignorable __function__))
        (b* ((dotted-parts (strtok x '(#\.))))
          (svtv-parse-path/select-aux dotted-parts x))))

    Theorem: return-type-of-svtv-parse-path/select.path

    (defthm return-type-of-svtv-parse-path/select.path
      (b* (((mv ?errmsg ?path ?range-msb ?range-lsb)
            (svtv-parse-path/select x)))
        (implies (not errmsg) (path-p path)))
      :rule-classes :rewrite)

    Theorem: return-type-of-svtv-parse-path/select.range-msb

    (defthm return-type-of-svtv-parse-path/select.range-msb
      (b* (((mv ?errmsg ?path ?range-msb ?range-lsb)
            (svtv-parse-path/select x)))
        (or (not range-msb) (natp range-msb)))
      :rule-classes :type-prescription)

    Theorem: return-type-of-svtv-parse-path/select.range-lsb

    (defthm return-type-of-svtv-parse-path/select.range-lsb
      (b* (((mv ?errmsg ?path ?range-msb ?range-lsb)
            (svtv-parse-path/select x)))
        (implies range-msb (natp range-lsb)))
      :rule-classes :type-prescription)

    Theorem: svtv-parse-path/select-of-str-fix-x

    (defthm svtv-parse-path/select-of-str-fix-x
      (equal (svtv-parse-path/select (str-fix x))
             (svtv-parse-path/select x)))

    Theorem: svtv-parse-path/select-streqv-congruence-on-x

    (defthm svtv-parse-path/select-streqv-congruence-on-x
      (implies (acl2::streqv x x-equiv)
               (equal (svtv-parse-path/select x)
                      (svtv-parse-path/select x-equiv)))
      :rule-classes :congruence)