• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
            • Vl-atom-welltyped-p
            • Vl-selexpr-welltyped-p
            • Vl-expr-welltyped-p
          • Reordering-by-name
          • Flat-warnings
          • Genblob
          • Expr-building
          • Datatype-tools
          • Syscalls
          • Relocate
          • Expr-cleaning
          • Namemangle
          • Caremask
          • Port-tools
          • Lvalues
        • Server
        • Kit
        • Printer
        • Esim-vl
        • Well-formedness
      • Sv
      • Fgl
      • Vwsim
      • Vl
      • X86isa
      • Svl
      • Rtl
    • Software-verification
    • Math
    • Testing-utilities
  • Mlib
  • Vl-expr-p
  • Expression-sizing

Welltyped

Expressions whose sizes and types are sensible.

We say expressions are well-typed when their signs and widths have been computed, and when certain consistency requirements are met. This is a rather elaborate consistency check we use as a basic correctness property of our expression-sizing transformation. It may also be useful in later transformations to insist that the you are working with reasonably sane expressions.

Every atom in the expression must satisfy vl-atom-welltyped-p.

Every nonatom has certain consistency checks that depend upon which operator is being applied. For instance, in an expression like a + b, we require that the final width/type of the expression agrees exactly with the final widths/types of a and b. As another example, we insist that the finalwidth/type of &foo is one-bit unsigned, but otherwise we only require that the width of foo itself is non-zero.

Subtopics

Vl-atom-welltyped-p
(vl-atom-welltyped-p x) determines if an atomic expression is well-typed.
Vl-selexpr-welltyped-p
Vl-expr-welltyped-p
Check that an expression is welltyped