Skip to content

Design

Design decision records for Z3Wire. Each document captures a tricky design space, the reasoning behind the decisions made, and alternatives considered.

  • Concrete Types — why concrete types exist, why they have minimal operations, and their role as typed data holders
  • Bool vs UInt<1> — why booleans and 1-bit vectors are separate types with explicit conversion
  • Lossless Auto-Promotion — which type conversions happen implicitly, which require explicit casts, and why
  • Three-Tier Casting — why there are three cast functions and when to use each
  • Comparison Semantics — why comparison operators are strict on width and signedness, and why mathematical comparisons use the z3w::math_* free-function family
  • Bit-Growth Arithmetic — why arithmetic and left shift widen their result types instead of wrapping