pub fn normalization_distance(
expression: &Expression,
dnf: bool,
max_distance: i64,
) -> i64Expand description
Calculate the normalization distance for an expression.
This estimates the cost of converting to normal form. The conversion is exponential in complexity, so this helps decide whether to attempt it.
§Arguments
expression- The expression to analyzednf- Whether checking distance to DNF (true) or CNF (false)max_distance- Early exit if distance exceeds this
§Returns
The estimated normalization distance.