• 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-err->vfatal

    Signature
    (vl-err->vfatal err 
                    &key type msg args (fn '__function__) 
                    (vttree 'vttree)) 
     
      → 
    new-vttree
    Arguments
    err — Guard (implies err (vl-msg-p err)).
    type — Guard (symbolp type).
    msg — Guard (stringp msg).
    args — Guard (true-listp args).
    fn — Guard (symbolp fn).
    vttree — Guard (vttree-p vttree).
    Returns
    new-vttree — Type (vttree-p new-vttree).

    Definitions and Theorems

    Function: vl-err->vfatal-fn

    (defun vl-err->vfatal-fn (err type msg args fn vttree)
     (declare (xargs :guard (and (implies err (vl-msg-p err))
                                 (symbolp type)
                                 (stringp msg)
                                 (true-listp args)
                                 (symbolp fn)
                                 (vttree-p vttree))))
     (let ((__function__ 'vl-err->vfatal))
      (declare (ignorable __function__))
      (if err
       (vttree-add-warnings
        (b* ((warnings nil))
         (fatal
          :type type
          :msg "~@0: ~@1"
          :args
          (list
             (make-vl-msg :msg (string-fix msg)
                          :args (mbe :logic (list-fix args) :exec args))
             err)
          :fn fn))
        vttree)
       (vttree-fix vttree))))

    Theorem: vttree-p-of-vl-err->vfatal

    (defthm vttree-p-of-vl-err->vfatal
      (b* ((new-vttree (vl-err->vfatal-fn err type msg args fn vttree)))
        (vttree-p new-vttree))
      :rule-classes :rewrite)

    Theorem: constraints-of-vl-err->vfatal

    (defthm constraints-of-vl-err->vfatal
     (b* ((?new-vttree (vl-err->vfatal-fn err type msg args fn vttree)))
       (equal (vttree->constraints new-vttree)
              (vttree->constraints vttree))))

    Theorem: vl-err->vfatal-fn-of-symbol-fix-type

    (defthm vl-err->vfatal-fn-of-symbol-fix-type
      (equal (vl-err->vfatal-fn err (acl2::symbol-fix type)
                                msg args fn vttree)
             (vl-err->vfatal-fn err type msg args fn vttree)))

    Theorem: vl-err->vfatal-fn-symbol-equiv-congruence-on-type

    (defthm vl-err->vfatal-fn-symbol-equiv-congruence-on-type
     (implies
          (acl2::symbol-equiv type type-equiv)
          (equal (vl-err->vfatal-fn err type msg args fn vttree)
                 (vl-err->vfatal-fn err type-equiv msg args fn vttree)))
     :rule-classes :congruence)

    Theorem: vl-err->vfatal-fn-of-str-fix-msg

    (defthm vl-err->vfatal-fn-of-str-fix-msg
      (equal (vl-err->vfatal-fn err type (str-fix msg)
                                args fn vttree)
             (vl-err->vfatal-fn err type msg args fn vttree)))

    Theorem: vl-err->vfatal-fn-streqv-congruence-on-msg

    (defthm vl-err->vfatal-fn-streqv-congruence-on-msg
     (implies
          (streqv msg msg-equiv)
          (equal (vl-err->vfatal-fn err type msg args fn vttree)
                 (vl-err->vfatal-fn err type msg-equiv args fn vttree)))
     :rule-classes :congruence)

    Theorem: vl-err->vfatal-fn-of-list-fix-args

    (defthm vl-err->vfatal-fn-of-list-fix-args
      (equal (vl-err->vfatal-fn err type msg (list-fix args)
                                fn vttree)
             (vl-err->vfatal-fn err type msg args fn vttree)))

    Theorem: vl-err->vfatal-fn-list-equiv-congruence-on-args

    (defthm vl-err->vfatal-fn-list-equiv-congruence-on-args
     (implies
          (list-equiv args args-equiv)
          (equal (vl-err->vfatal-fn err type msg args fn vttree)
                 (vl-err->vfatal-fn err type msg args-equiv fn vttree)))
     :rule-classes :congruence)

    Theorem: vl-err->vfatal-fn-of-symbol-fix-fn

    (defthm vl-err->vfatal-fn-of-symbol-fix-fn
      (equal (vl-err->vfatal-fn err type msg args (acl2::symbol-fix fn)
                                vttree)
             (vl-err->vfatal-fn err type msg args fn vttree)))

    Theorem: vl-err->vfatal-fn-symbol-equiv-congruence-on-fn

    (defthm vl-err->vfatal-fn-symbol-equiv-congruence-on-fn
     (implies
          (acl2::symbol-equiv fn fn-equiv)
          (equal (vl-err->vfatal-fn err type msg args fn vttree)
                 (vl-err->vfatal-fn err type msg args fn-equiv vttree)))
     :rule-classes :congruence)

    Theorem: vl-err->vfatal-fn-of-vttree-fix-vttree

    (defthm vl-err->vfatal-fn-of-vttree-fix-vttree
      (equal (vl-err->vfatal-fn err
                                type msg args fn (vttree-fix vttree))
             (vl-err->vfatal-fn err type msg args fn vttree)))

    Theorem: vl-err->vfatal-fn-vttree-equiv-congruence-on-vttree

    (defthm vl-err->vfatal-fn-vttree-equiv-congruence-on-vttree
     (implies
          (vttree-equiv vttree vttree-equiv)
          (equal (vl-err->vfatal-fn err type msg args fn vttree)
                 (vl-err->vfatal-fn err type msg args fn vttree-equiv)))
     :rule-classes :congruence)