• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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-interfacelist-alwaysstyle
            • Truncation-warnings
            • Vl-modulelist-alwaysstyle
            • Skip-detection
            • Vl-lint-report
            • Vl-lintresult
            • Vl::vl-design-sv-use-set
            • Oddexpr-check
            • Leftright-check
              • Vl-packagelist-leftright-check
              • Vl-modulelist-leftright-check
              • Vl-interfacelist-leftright-check
              • Vl-collect-ac-args
              • Vl-leftright-exprlist-duplicates
              • Vl-interface-leftright-check
              • Vl-package-leftright-check
              • Vl-module-leftright-check
              • Vl-expr-leftright-check1
                • Vl-expr-leftright-check
                • Vl-expr-indexy-via-ctx
                • Vl-ctxexprlist-leftright-check
                • Vl-design-leftright-check
                • Vl-ctxexprlist-leftright-check-nrev
                • Vl-op-ac-p
              • 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
    • Leftright-check

    Vl-expr-leftright-check1

    Search for strange expressions like A [op] A.

    Signature
    (vl-expr-leftright-check1 x indexy ctx) → warnings
    Arguments
    x — Expression we are considering.
        Guard (vl-expr-p x).
    indexy — Heuristic info. We set this to true when we've gone into an index-like expression, e.g., the 3 in foo[3], the replication amount in a multiple concatenation, or similar sorts of contexts. In such a context, we suppress warnings about A+A, A-A, and A*A, because they are occasionally useful in indexing arithmetic.
        Guard (booleanp indexy).
    ctx — Context where the expression occurs.
        Guard (vl-context1-p ctx).
    Returns
    warnings — Type (vl-warninglist-p warnings).

    We search through the expression x for sub-expressions of the form A [op] A, and generate a warning whenever we find one. The ctx is a vl-context1-p that says where x occurs, for more helpful warnings. We also use it to suppress warnings in certain cases.