Skip to main content

simplify

Function simplify 

Source
pub fn simplify(expr: &ClassicalExpr) -> ClassicalExpr
Expand description

Returns a structurally simplified copy of expr.

The result has the same static type as the input and reads a subset of the input’s runtime classical variables and values. Simplification is idempotent: applying it twice yields the same expression.

Rules that require constructing a UInt or BitVec zero/one literal are skipped when the type is wider than the current 128-bit literal representation. In that case the original, type-correct expression shape is preserved.