• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
        • Svex-stvs
        • 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
          • Vl-to-sv
          • Vl-design->sv-design
            • Vl-simpconfig
            • Vl-hierarchy-sv-translation
            • Vl-expr-svex-translation
              • Sv::vl-expr.lisp
                • Vl-scopecontext-to-addr
                • Vl-binaryop-to-svex
                • Vl-expr-to-svex-maybe-typed
                • Vl-datatype-syscall-to-svex
                • Vl-operandinfo-to-svex-preproc
                • Vl-structmemberlist->types
                • Vl-seltrace-to-svex-select
                • Vl-portdecllist->types
                • Vl-operandinfo-to-svex-select
                • Vl-plusminus-partselect->svex
                • Vl-arrayrange->rel-lsb-and-width
                • Vl-unaryop-to-svex
                • Vl-funcall-args-to-ordered
                • Vl-expr-to-svex-lhs
                • Vl-operandinfo-to-svex
                • Vl-array-assignpat-keyval-resolve
                • Vl-err->vfatal
                • Vl-datatypelist-usertype-resolve
                • Vl-upscope-to-svex-upscope
                • Vl-err->fatal
                • Vl-streaming-concat-trunc/extend
                • Vl-operandinfo-base-svar
                • Vl-index-shift-amount
                • Vttree->constraints
                • Vl-slicesize-resolve
                • Vl-function-map-find-matching-aux
                • Vl-funname-lookup
                • Vl-datatype-size-warn
                • Svex-repeat-aux
                • Vl-$test$plusargs-to-svex
                  • Svex-extend
                  • Vl-structmemberlist-shift-bits
                  • Vl-datatype-slot-width/range
                  • Vl-datatype-index-shift-amount
                  • Vl-datatype-field-shift-amount
                  • 4vec-extend
                  • Vl-function-pair-inputs-with-actuals
                  • Vl-expr-to-svex-untyped
                  • Vl-function-map-check-matching
                  • Vl-datatype-syscall-remove-dims
                  • Svex-concat-list-aux
                  • Vttree-add-constraints
                  • Vttree-add-warnings
                  • Vl-check-struct-assignpat-keys
                  • Vl-check-array-assignpat-keys
                  • Sv::constraintlist-subst-memo
                  • Vl-svex-keyval-index-lookup
                  • Vl-function-map-find-matching
                  • Vl-convert-dollarsign-to-expr
                  • Vttree->constraints-acc
                  • Vl-seltrace-type
                  • Vl-seltrace-to-path
                  • Vl-keyval-member-lookup
                  • Svex-repeat
                  • Vttree->warnings-acc
                  • Vl-trunc/extend-type-err
                  • Constraintlist-add-ctx
                  • Vl-hidtrace-add-to-path
                  • Svex-multiconcat
                  • Vttree-join
                  • Vl-value-to-string-aux
                  • Vl-seltrace-add-to-path
                  • Vl-value-to-4vec
                  • Vl-expr-to-svex-selfdet
                  • Vl-svex-keyval-default-lookup
                  • Vl-$test$plusargs-p
                  • Vl-value-to-svex
                  • Vl-value-in-range
                  • Vl-keyval-default-lookup
                  • Sv::svexlist-args-extract-constants
                  • Vl-string->bits
                  • Vl-size-to-unsigned-logic
                  • Vl-hidtrace-to-path
                  • Svex-concat-list
                  • Vttree->warnings
                  • Vl-seltrace-unres-count
                  • Vl-datatype-index-is-bitselect
                  • Vl-bitlist->4vec
                  • Vl-svex-keyvallist-vars
                  • Vl-hidstep->svex-index
                  • Vl-selstep->svex-name
                  • Vl-datatypelist-resolved-p
                  • Vl-datatype-$unpacked_dimensions
                  • Vl-datatype-$dimensions
                  • Vl-bitlist->offset
                  • Vl-bitlist->onset
                  • Vl-streamexprlist-has-with
                  • Vl-hidstep-resolved-p
                  • Vl-expr-needs-type-context
                  • Vl-streamexprlist->exprs
                  • Vl-integer-to-string
                  • Vl-hidtrace-resolved-p
                  • Vl-selstep-resolved-p
                  • Vl-select-resolved-p
                  • Vl-svex-keyvallist
                  • Vl-datatypelist
                  • Svex-x
                • Vttree
              • Vl-design->svex-modalist
              • Vl-svstmt
            • Vl-to-sv-main
            • Vl-simplify-sv
            • Vl-user-paramsettings->unparam-names
            • Vl-user-paramsettings->modnames
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Sv::vl-expr.lisp

    Vl-$test$plusargs-to-svex

    Signature
    (vl-$test$plusargs-to-svex expr design) → (mv warnings svex)
    Arguments
    expr — Guard (vl-expr-p expr).
    design — Guard (vl-design-p design).
    Returns
    warnings — Type (vl-warninglist-p warnings).
    svex — Type (and (sv::svex-p svex) (sv::svarlist-addr-p (sv::svex-vars svex))).

    Definitions and Theorems

    Function: vl-$test$plusargs-to-svex

    (defun vl-$test$plusargs-to-svex (expr design)
     (declare (xargs :guard (and (vl-expr-p expr)
                                 (vl-design-p design))))
     (let ((__function__ 'vl-$test$plusargs-to-svex))
      (declare (ignorable __function__))
      (b*
       ((expr (vl-expr-fix expr))
        (arg-str
         (vl-expr-case
             expr
             :vl-literal
             (vl-value-case expr.val
                            :vl-constint (vl-integer-to-string expr.val)
                            :vl-string expr.val.value
                            :otherwise nil)
             :otherwise nil))
        ((unless arg-str)
         (mv
          (fatal
           :type :vl-expr-to-svex-fail
           :msg
           "Unsupported $test$plusargs(...) call.  We only ~
                             support literal strings like ~
                             $test$plusargs(\"foo\"). but found ~
                             $test$plusargs(~a0)."
           :args (list expr)
           :acc nil)
          (svex-x)))
        (ans-svex
          (if (vl-$test$plusargs-p arg-str (vl-design->plusargs design))
              (sv::svex-quote (sv::4vec 1 1))
            (sv::svex-quote (sv::4vec 0 0)))))
       (mv nil ans-svex))))

    Theorem: vl-warninglist-p-of-vl-$test$plusargs-to-svex.warnings

    (defthm vl-warninglist-p-of-vl-$test$plusargs-to-svex.warnings
      (b* (((mv ?warnings ?svex)
            (vl-$test$plusargs-to-svex expr design)))
        (vl-warninglist-p warnings))
      :rule-classes :rewrite)

    Theorem: return-type-of-vl-$test$plusargs-to-svex.svex

    (defthm return-type-of-vl-$test$plusargs-to-svex.svex
      (b* (((mv ?warnings ?svex)
            (vl-$test$plusargs-to-svex expr design)))
        (and (sv::svex-p svex)
             (sv::svarlist-addr-p (sv::svex-vars svex))))
      :rule-classes :rewrite)

    Theorem: vl-$test$plusargs-to-svex-of-vl-expr-fix-expr

    (defthm vl-$test$plusargs-to-svex-of-vl-expr-fix-expr
      (equal (vl-$test$plusargs-to-svex (vl-expr-fix expr)
                                        design)
             (vl-$test$plusargs-to-svex expr design)))

    Theorem: vl-$test$plusargs-to-svex-vl-expr-equiv-congruence-on-expr

    (defthm vl-$test$plusargs-to-svex-vl-expr-equiv-congruence-on-expr
      (implies (vl-expr-equiv expr expr-equiv)
               (equal (vl-$test$plusargs-to-svex expr design)
                      (vl-$test$plusargs-to-svex expr-equiv design)))
      :rule-classes :congruence)

    Theorem: vl-$test$plusargs-to-svex-of-vl-design-fix-design

    (defthm vl-$test$plusargs-to-svex-of-vl-design-fix-design
      (equal (vl-$test$plusargs-to-svex expr (vl-design-fix design))
             (vl-$test$plusargs-to-svex expr design)))

    Theorem: vl-$test$plusargs-to-svex-vl-design-equiv-congruence-on-design

    (defthm
         vl-$test$plusargs-to-svex-vl-design-equiv-congruence-on-design
      (implies (vl-design-equiv design design-equiv)
               (equal (vl-$test$plusargs-to-svex expr design)
                      (vl-$test$plusargs-to-svex expr design-equiv)))
      :rule-classes :congruence)