• 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
          • Vl-lintconfig-p
          • Lucid
          • Skip-detection
          • Vl-lintresult-p
          • Lint-warning-suppression
          • Condcheck
            • Vl-modulelist-condcheck
            • Vl-condcheck-fix
            • Vl-expr-condcheck
              • Vl-exprlist-condcheck
            • Vl-condcheck-negate
            • Vl-module-condcheck
            • Vl-exprctxalist-condcheck
            • Vl-design-condcheck
          • Selfassigns
          • Leftright-check
          • Dupeinst-check
          • Oddexpr-check
          • Remove-toohard
          • Qmarksize-check
          • Portcheck
          • Duplicate-detect
          • Vl-print-certain-warnings
          • Duperhs-check
          • *vl-lint-help*
          • Lint-stmt-rewrite
          • Drop-missing-submodules
          • Check-case
          • Drop-user-submodules
          • Check-namespace
          • Vl-lint
        • Mlib
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Condcheck

Vl-expr-condcheck

Look for strange conditions throughout an expression.

Signature
(vl-expr-condcheck x tests-above ctx) → warnings
Arguments
x — Guard (vl-expr-p x).
tests-above — Guard (and (vl-exprlist-p tests-above) (true-listp tests-above)).
ctx — Guard (vl-context-p ctx).
Returns
warnings — Type (vl-warninglist-p warnings).

We recursively look throughout x for problematic tests.

The tests-above are all the tests we have seen as we have descended through expressions of the form

test ? then : else

Except:

  • all of the tests-above have been fixed with vl-condcheck-fix, and
  • when we descend into the else branch, we add ~test to tests-above; more precisely, we use vl-condcheck-negate to form this term.

The basic idea is that tests-above acts as a list of things we can assume must be true as we are seeing X.

ctx is a vl-context-p that should explain where this expression occurs, and is used in any warning messages we produce.

Theorem: return-type-of-vl-expr-condcheck.warnings

(defthm return-type-of-vl-expr-condcheck.warnings
  (b* ((?warnings (vl-expr-condcheck x tests-above ctx)))
    (vl-warninglist-p warnings))
  :rule-classes :rewrite)

Theorem: return-type-of-vl-exprlist-condcheck.warnings

(defthm return-type-of-vl-exprlist-condcheck.warnings
  (b* ((?warnings (vl-exprlist-condcheck x tests-above ctx)))
    (vl-warninglist-p warnings))
  :rule-classes :rewrite)

Subtopics

Vl-exprlist-condcheck