• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
        • Warnings
        • Primitives
        • Use-set
        • Syntax
        • Getting-started
        • Utilities
        • Loader
        • Transforms
        • Lint
        • Mlib
          • Scopestack
          • Filtering-by-name
          • Vl-namefactory
          • Substitution
          • Allexprs
          • Hid-tools
          • Vl-consteval
          • Range-tools
          • Lvalexprs
          • Hierarchy
          • Finding-by-name
          • Expr-tools
          • Expr-slicing
          • Stripping-functions
          • Stmt-tools
          • Modnamespace
          • Vl-parse-expr-from-str
          • Welltyped
          • Reordering-by-name
          • Flat-warnings
          • Genblob
          • Expr-building
          • Datatype-tools
          • Syscalls
          • Relocate
          • Expr-cleaning
          • Namemangle
          • Caremask
          • Port-tools
          • Lvalues
            • Vl-expr-lvaluep
            • Lvaluecheck
              • Vl-plainarglist-lvaluecheck
              • Vl-plainarg-lvaluecheck
              • Vl-taskdecllist-lvaluecheck
              • Vl-gateinstlist-lvaluecheck
              • Vl-arguments-lvaluecheck
                • Vl-modinstlist-lvaluecheck
                • Vl-initiallist-lvaluecheck
                • Vl-fundecllist-lvaluecheck
                • Vl-assignlist-lvaluecheck
                • Vl-alwayslist-lvaluecheck
                • Vl-modinst-lvaluecheck
                • Vl-gateinst-lvaluecheck
                • Vl-assign-lvaluecheck
                • Vl-taskdecl-lvaluecheck
                • Vl-initial-lvaluecheck
                • Vl-fundecl-lvaluecheck
                • Vl-always-lvaluecheck
          • Server
          • Kit
          • Printer
          • Esim-vl
          • Well-formedness
        • Sv
        • Fgl
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Vl-arguments-p
    • Lvaluecheck

    Vl-arguments-lvaluecheck

    Check well-formedness of lvalues in a vl-arguments-p.

    Signature
    (vl-arguments-lvaluecheck x loc instname warnings) 
      → 
    new-warnings
    Arguments
    x — Guard (vl-arguments-p x).
    warnings — Ordinary warnings accumulator.
        Guard (vl-warninglist-p warnings).
    Returns
    new-warnings — Type (vl-warninglist-p new-warnings).

    We check the lvalues throughout x for well-formedness in the sense of vl-expr-lvaluep, and generate non-fatal warnings for any problematic lvalues encountered.

    Definitions and Theorems

    Function: vl-arguments-lvaluecheck

    (defun vl-arguments-lvaluecheck (x loc instname warnings)
     (declare (xargs :guard (and (vl-arguments-p x)
                                 (vl-warninglist-p warnings))))
     (declare (xargs :guard (and (vl-location-p loc)
                                 (maybe-stringp instname))))
     (let ((__function__ 'vl-arguments-lvaluecheck))
      (declare (ignorable __function__))
      (if
       (eq (vl-arguments-kind x)
           :vl-arguments-named)
       (warn
        :type :vl-programming-error
        :msg
        "~l0: expected arguments of instance ~s1 to be resolved, but ~
                      args are still named."
        :args (list loc instname))
       (vl-plainarglist-lvaluecheck (vl-arguments-plain->args x)
                                    loc instname warnings))))

    Theorem: vl-warninglist-p-of-vl-arguments-lvaluecheck

    (defthm vl-warninglist-p-of-vl-arguments-lvaluecheck
      (b* ((new-warnings
                (vl-arguments-lvaluecheck x loc instname warnings)))
        (vl-warninglist-p new-warnings))
      :rule-classes :rewrite)

    Theorem: vl-arguments-lvaluecheck-of-vl-arguments-fix-x

    (defthm vl-arguments-lvaluecheck-of-vl-arguments-fix-x
      (equal (vl-arguments-lvaluecheck (vl-arguments-fix x)
                                       loc instname warnings)
             (vl-arguments-lvaluecheck x loc instname warnings)))

    Theorem: vl-arguments-lvaluecheck-vl-arguments-equiv-congruence-on-x

    (defthm vl-arguments-lvaluecheck-vl-arguments-equiv-congruence-on-x
     (implies
       (vl-arguments-equiv x x-equiv)
       (equal (vl-arguments-lvaluecheck x loc instname warnings)
              (vl-arguments-lvaluecheck x-equiv loc instname warnings)))
     :rule-classes :congruence)

    Theorem: vl-arguments-lvaluecheck-of-vl-warninglist-fix-warnings

    (defthm vl-arguments-lvaluecheck-of-vl-warninglist-fix-warnings
     (equal
       (vl-arguments-lvaluecheck x loc
                                 instname (vl-warninglist-fix warnings))
       (vl-arguments-lvaluecheck x loc instname warnings)))

    Theorem: vl-arguments-lvaluecheck-vl-warninglist-equiv-congruence-on-warnings

    (defthm
     vl-arguments-lvaluecheck-vl-warninglist-equiv-congruence-on-warnings
     (implies
       (vl-warninglist-equiv warnings warnings-equiv)
       (equal (vl-arguments-lvaluecheck x loc instname warnings)
              (vl-arguments-lvaluecheck x loc instname warnings-equiv)))
     :rule-classes :congruence)