Skip to main content

expr_to_rust_static

Function expr_to_rust_static 

Source
pub fn expr_to_rust_static(expr: &SpExpr) -> String
Expand description

Convert an Assura Expr to a Rust expression for use in const context.

Compared to [expr_to_rust], this variant:

  • Does not rename result to the compiler-generated result variable
  • Does not emit i128::from() casts for numeric comparisons
  • Does not translate Implies/In/NotIn/Concat to Rust idioms
  • Emits quantifiers as /* forall ... */ true comments
  • Passes old(expr) through as the inner expression
  • Uses simplified match patterns (Ctor(..) instead of field bindings)