SIMPLIF10EXPR(3)

NAME
simplif10Expr - makes simplifications on an expression including constant atomic expressions

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

PARAMETER

expr
    expression to simplify

DESCRIPTION
simplif10Expr() makes simplifications by applying the following rules :

(or 0 x1 x2 ... xn) --> (or x1 x2 ... xn)  if n>1

(or 1 x1 x2 ... xn) --> 1

(or 0 x1) --> x1

(and 0 x1 x2 ... xn) --> 0

(and 1 x1 x2 ... xn) --> (and x1 x2 ... xn)  if n>1

(and 1 x1) --> x1

(nor 0 x1 x2 ... xn) --> (nor x1 x2 ... xn)  if n>1

(nor 1 x1 x2 ... xn) --> 0

(nor 0 x1) --> (not x1)

(nand 0 x1 x2 ... xn) --> 1

(nand 1 x1 x2 ... xn) --> (nand x1 x2 ... xn)  if n>1

(nand 1 x1) --> (not x1)

(xor 0 x1 x2 ... xn) --> (xor x1 x2 ... xn)  if n>1

(xor 1 x1 x2 ... xn) --> (not (xor x1 x2 ... xn))  if n>1

(xor 1 x1) --> (not x1)

(xor 0 x1) --> x1

(not 1) --> 0

(not 0) --> 1

EXAMPLE
#include "mutnnn.h"		/* mbk utilities */
#include "logmmm.h"
chain_list *expr1,*expr2;
/* let's suppose that expr1 = (OR (OR 1 (NOT a)) (NAND 0 (NOT b))) */
expr2 = simplif10Expr(expr1);
displayExpr(expr2);
/* it will display
1
*/
freeExpr(expr1);
freeExpr(expr2);

SEE ALSO
log(1), abl(1), simplifNotExpr(3), devXorExpr(3), devXor2Expr(3), notExpr(3), flatPolarityExpr(3), flatArityExpr(3), sortExpr(3), normExpr(3).