mapCarExpr(2)

ORIGIN
Cao-vlsi libraries, log package, libablmmm.a

NAME
mapCarExpr - creates a new expression by applying a function to all the arguments of an operator expression

SYNOPSIS
#include "logmmm.h"
chain_list *mapCarExpr(func,oper,expr)
chain_list *(*func)();
short oper;
chain_list *expr;

PARAMETERS

func
    function to apply

oper
    Operator number (OR,AN,XOR,NAND,NOR...).

expr
    expression from wich th new expression is deduced

DESCRIPTION
mapCarExpr() creates a head of an operator expression having oper as operator and adds the arguments calculated by applying func() to each arguments of expr. func() must return an expression and must have a unique expression as argument.

EXAMPLE
#include "mutnnn.h"		/* mbk utilities */
#include "logmmm.h"
chain_list *expr1,*expr2;
expr1 = createExpr(NOR);
addHExpr(expr1,createAtom("a"));
addHExpr(expr1,createAtom("b"));
		/* it looks like Morgan's Law... */
expr2 = mapCarExpr(notExpr,AND,expr1);
displayExpr(expr2);
/* it will display
(AND (NOT b) (NOT a))
*/
freeExpr(expr1);
freeExpr(expr2);

SEE ALSO
log(1), abl(1), mapExpr(2), anyExpr(2), everyExpr(2).

SUPPORT STATUS
if bugs arise, please e-mail to cao-vlsi@masi.ibp.fr