minExpr(2)

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

NAME
minExpr - returns the lowest argument of an operator expression.

SYNOPSIS
#include "logmmm.h"
void minExpr(expr,func)
chain_list *expr;
int (*func)();

PARAMETERS

expr
    operator expression

func
    integer function

DESCRIPTION
minExpr() returns the lowest argument found by using the integer function func(). This function doesn't copy the returned argument.

EXAMPLE
#include "mutnnn.h"		/* mbk utilities */
#include "logmmm.h"
chain_list *expr1,*expr2,*expr3;
expr1 = createExpr(OR);
addQExpr(expr1,createAtom("a"));
addQExpr(expr1,createAtom("b"));
expr2 = createExpr(AND);
addQExpr(expr2,createAtom("c"));
addQExpr(expr2,createAtom("d"));
addQExpr(expr1,expr2);
displayExpr(expr1);
expr3 = minExpr(expr1,numberAtomExpr);
displayExpr(expr3);
/* it will display
(OR a b (AND c d))
a
*/
freeExpr(expr1);	/* don't free expr3 or expr2 ! */

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

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