• 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
          • Selfassigns
          • Leftright-check
          • Dupeinst-check
          • Oddexpr-check
            • Vl-modulelist-oddexpr-check
            • *vl-odd-binops-table*
            • Vl-warn-odd-binary-expression-main
            • Vl-expr-probable-selfsize
            • Vl-odd-binop-class
            • Vl-module-oddexpr-check
            • Vl-oddexpr-check
              • Vl-exprctxalist-oddexpr-check
              • Vl-design-oddexpr-check
              • Vl-warn-odd-binary-expression
              • Vl-pp-oddexpr-details
              • *fake-modelement*
            • 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
    • Oddexpr-check

    Vl-oddexpr-check

    Signature
    (vl-oddexpr-check x ctx ss) → warnings
    Arguments
    x — Guard (vl-expr-p x).
    ctx — Guard (vl-context-p ctx).
    ss — Guard (vl-scopestack-p ss).
    Returns
    warnings — Type (vl-warninglist-p warnings).

    Definitions and Theorems

    Function: vl-oddexpr-check

    (defun vl-oddexpr-check (x ctx ss)
     (declare (xargs :guard (and (vl-expr-p x)
                                 (vl-context-p ctx)
                                 (vl-scopestack-p ss))))
     (let ((__function__ 'vl-oddexpr-check))
      (declare (ignorable __function__))
      (b* ((details (append (vl-warn-odd-binary-expression x ss)))
           ((unless details) nil))
       (list
        (make-vl-warning
         :type :vl-warn-oddexpr
         :msg
         (cat
          "~a0: found ~s1 that suggest precedence problems may be ~
                          present.  Maybe add explicit parens?  Details:~%"
          (with-local-ps (vl-pp-oddexpr-details details)))
         :args (list ctx
                     (if (vl-plural-p details)
                         "subexpressions"
                       "a subexpression")))))))

    Theorem: vl-warninglist-p-of-vl-oddexpr-check

    (defthm vl-warninglist-p-of-vl-oddexpr-check
      (b* ((warnings (vl-oddexpr-check x ctx ss)))
        (vl-warninglist-p warnings))
      :rule-classes :rewrite)