COMPOSECCT(3)

NAME
composeCct - composes all the outputs within a circuit with a BDD

SYNOPSYS
#include "logmmm.h"
void composeCct(pC,name,pBdd)
pCircuit pC;
char *name;
pNode pBdd;

PARAMETERS

pC  Circuit in which is made the composition

name
    name to substitute

pBdd
    BDD that replaces the variable

DESCRIPTION
composeCct() substitutes the nodes associated to name by pBdd within pC.

EXAMPLE
#include "mutnnn.h"		/* mbk utilities */
#include "logmmm.h"
chain_list *expr;
pNode res;
pCircuit pC;
initializeBdd(SMALL_BDD);
pC = initializeCct("circuit 1",10,10);
addInputCct(pC,"a");
addInputCct(pC,"b");
addOutputCct(pC,"s",applyBinBdd(OR,
                        createNodeTermBdd(searchInputCct(pC,"a")),
                        createNodeTermBdd(searchInputCct(pC,"b"))));
	/* a is replaced by (not b) */
composeCct(pC,"a",notBdd(createNodeTermBdd(searchInputCct(pC,"b"))));
displayCct(pC,1);
/* it will display
************* DISPLAY circuit 1 *********
INPUT = b	INDEX = 3
----------- NUMBER OF INPUTS = 1
OUTPUT = s	s = 1
----------- NUMBER OF OUTPUTS = 1
*****************************************
*/
destroyCct(pC);
destroyBdd(1);

SEE ALSO
log(1), bdd(1), abl(1), upVarCct(3), constraintCct(3).