• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
      • Vwsim
      • Vl
        • Syntax
        • Loader
        • Warnings
        • Getting-started
        • Utilities
        • Printer
        • Kit
          • Vl-lint
            • Vl-lintconfig-p
            • Condcheck
            • Lint-warning-suppression
            • Lucid
            • Lvaluecheck
              • Vl-modulelist-lvaluecheck
              • Vl-plainarglist-lvaluecheck
              • Vl-modelement-lvaluecheck
              • Vl-plainarg-lvaluecheck
              • Vl-arguments-lvaluecheck
              • Vl-function-specialization-map-lvaluecheck
              • Vl-module-lvaluecheck-aux
              • Vl-function-specialization-lvaluecheck
              • Vl-maybe-parse-temps-lvaluecheck
              • Vl-taskdecllist-lvaluecheck
              • Vl-modinstlist-lvaluecheck
              • Vl-initiallist-lvaluecheck
              • Vl-gateinstlist-lvaluecheck
              • Vl-fundecllist-lvaluecheck
              • Vl-elabtasklist-lvaluecheck
              • Vl-cassertionlist-lvaluecheck
              • Vl-assertionlist-lvaluecheck
              • Vl-assignlist-lvaluecheck
              • Vl-alwayslist-lvaluecheck
              • Vl-parse-temps-lvaluecheck
              • Vl-finallist-lvaluecheck
              • Vl-classlist-lvaluecheck
              • Vl-bindlist-lvaluecheck
              • Vl-taskdecl-lvaluecheck
              • Vl-initial-lvaluecheck
              • Vl-fundecl-lvaluecheck
              • Vl-elabtask-lvaluecheck
              • Vl-class-lvaluecheck
              • Vl-always-lvaluecheck
              • Vl-modinst-lvaluecheck
              • Vl-gateinst-lvaluecheck
              • Vl-final-lvaluecheck
              • Vl-bind-lvaluecheck
              • Vl-assign-lvaluecheck
                • Vl-module-lvaluecheck
                • Vl-design-lvaluecheck
              • Vl-interfacelist-alwaysstyle
              • Truncation-warnings
              • Vl-modulelist-alwaysstyle
              • Skip-detection
              • Vl-lint-report
              • Vl-lintresult
              • Vl::vl-design-sv-use-set
              • Oddexpr-check
              • Leftright-check
              • Duplicate-detect
              • Selfassigns
              • *vl-lint-help*
              • Arith-compare-check
              • Dupeinst-check
              • Qmarksize-check
              • Lint-whole-file-suppression
              • Run-vl-lint-main
              • Logicassign
              • Run-vl-lint
              • Vl-print-certain-warnings
              • Duperhs-check
              • Vl-lint-top
              • Sd-filter-problems
              • Vl-modulelist-add-svbad-warnings
              • Vl-module-add-svbad-warnings
              • Check-case
              • Vl-lint-extra-actions
              • Drop-lint-stubs
              • Vl-lint-print-warnings
              • Drop-user-submodules
              • Check-namespace
              • Vl-lintconfig-loadconfig
              • Vl-lint-design->svex-modalist-wrapper
              • Vl-delete-sd-problems-for-modnames-aux
              • Vl-collect-new-names-from-orignames
              • Vl-lint-print-all-warnings
              • Vl-design-remove-unnecessary-modules
              • Vl-delete-sd-problems-for-modnames
              • Vl-always-check-style
              • Vl-vardecllist-svbad-warnings
              • Vl-vardecl-svbad-warnings
              • Vl-reportcard-remove-suppressed
              • Vl-reportcard-keep-suppressed
              • Vl-alwayslist-check-style
              • Vl-remove-nameless-descriptions
              • Vl-lint-apply-quiet
              • Vl-warninglist-remove-suppressed
              • Vl-warninglist-keep-suppressed
              • Vl-print-eliminated-descs
              • Vl-module-alwaysstyle
              • Vl-jp-reportcard-aux
              • Vl-interface-alwaysstyle
              • Vl-design-alwaysstyle
              • Vl-jp-description-locations
              • Vl-jp-reportcard
              • Vl-pp-stringlist-lines
              • Vl-jp-design-locations
              • Vl-datatype-svbad-p
              • Unpacked-range-check
              • Sd-problem-major-p
              • Vl-alwaysstyle
            • Vl-server
            • Vl-gather
            • Vl-zip
            • Vl-main
            • Split-plusargs
            • Vl-shell
            • Vl-json
          • Mlib
          • Transforms
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Lvaluecheck

    Vl-assign-lvaluecheck

    Signature
    (vl-assign-lvaluecheck x warnings) → warnings
    Arguments
    x — Guard (vl-assign-p x).
    warnings — Guard (vl-warninglist-p warnings).
    Returns
    warnings — Type (vl-warninglist-p warnings).

    Definitions and Theorems

    Function: vl-assign-lvaluecheck

    (defun vl-assign-lvaluecheck (x warnings)
      (declare (xargs :guard (and (vl-assign-p x)
                                  (vl-warninglist-p warnings))))
      (let ((__function__ 'vl-assign-lvaluecheck))
        (declare (ignorable __function__))
        (b* (((vl-assign x))
             ((when (vl-expr-variable-lvalue-p x.lvalue))
              (ok)))
          (warn :type :vl-bad-lvalue
                :msg "~a0: assignment to bad lvalue ~a1."
                :args (list x.loc x.lvalue)))))

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

    (defthm vl-warninglist-p-of-vl-assign-lvaluecheck
      (b* ((warnings (vl-assign-lvaluecheck x warnings)))
        (vl-warninglist-p warnings))
      :rule-classes :rewrite)

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

    (defthm vl-assign-lvaluecheck-of-vl-assign-fix-x
      (equal (vl-assign-lvaluecheck (vl-assign-fix x)
                                    warnings)
             (vl-assign-lvaluecheck x warnings)))

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

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

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

    (defthm vl-assign-lvaluecheck-of-vl-warninglist-fix-warnings
      (equal (vl-assign-lvaluecheck x (vl-warninglist-fix warnings))
             (vl-assign-lvaluecheck x warnings)))

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

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