NORMEXPR(3)

NAME
normExpr - normalizes an expression

SYNOPSYS
#include "logmmm.h"
void normExpr(expr)
chain_list *expr;

PARAMETER

expr
    expression to normalize

DESCRIPTION
normExpr() sorts recursively the arguments of an expression by using predefined rules. The operator expressions are sorted by increasing operator number and arity of the first level. The atomic expressions are put at the end of the operator expressions.

EXAMPLE
#include "mutnnn.h"		/* mbk utilities */
#include "logmmm.h"
chain_list *expr1;
/* let's suppose that expr1 = (AND a (XOR b c a) (NOT h) (AND e g) (OR b a)) */
normExpr(expr1);
displayExpr(expr1);
/* it will display
(AND (OR b a) (AND e g) (XOR b c a) (NOT h) a)
*/
freeExpr(expr1);

SEE ALSO
log(1), abl(1), sortExpr(3), maxExpr(3), minExpr(3), copyExpr(3), substExpr(3), substPhyExpr(3), flatArityExpr(3), flatPolarityExpr(3).