expression
.star_normal_form()
Compute the star normal form of a (Boolean) expression: an equivalent expression where the star operator is applied only on proper expressions (i.e., expressions whose constant term is null).
Preconditions:
The expression is Boolean
Postconditions:
The Result is equivalent to the input expression
The standard automata of the Result and of the input are isomorphic.
See also:
Caveat:
Although the notion of "star normal form" is perfectly valid for weighted expressions, this implementation is unable to compute the star normal form in this case. One could work-around this limitation by running
exp
.standard().expression()
.
Examples
The following function allows to display nicely expressions and their star-normal form.
Of course, expressions already in star-normal form are returned unmodified.
An expression and its star-normal form have the same standard automaton.