cudd/cuddAddIte.c File Reference

ADD ITE function and satellites. More...

#include "util.h"
#include "cuddInt.h"
Include dependency graph for cuddAddIte.c:

Functions

DdNodeCudd_addIte (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Implements ITE(f,g,h).
DdNodeCudd_addIteConstant (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Implements ITEconstant for ADDs.
DdNodeCudd_addEvalConst (DdManager *dd, DdNode *f, DdNode *g)
 Checks whether ADD g is constant whenever ADD f is 1.
DdNodeCudd_addCmpl (DdManager *dd, DdNode *f)
 Computes the complement of an ADD a la C language.
int Cudd_addLeq (DdManager *dd, DdNode *f, DdNode *g)
 Determines whether f is less than or equal to g.
DdNodecuddAddIteRecur (DdManager *dd, DdNode *f, DdNode *g, DdNode *h)
 Implements the recursive step of Cudd_addIte(f,g,h).
DdNodecuddAddCmplRecur (DdManager *dd, DdNode *f)
 Performs the recursive step of Cudd_addCmpl.
static void addVarToConst (DdNode *f, DdNode **gp, DdNode **hp, DdNode *one, DdNode *zero)
 Replaces variables with constants if possible (part of canonical form).

Detailed Description

ADD ITE function and satellites.

Author:
Fabio Somenzi

Copyright (c) 1995-2015, Regents of the University of Colorado

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

Neither the name of the University of Colorado nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


Function Documentation

static void addVarToConst ( DdNode f,
DdNode **  gp,
DdNode **  hp,
DdNode one,
DdNode zero 
) [static]

Replaces variables with constants if possible (part of canonical form).

Side effects
None
DdNode* Cudd_addCmpl ( DdManager dd,
DdNode f 
)

Computes the complement of an ADD a la C language.

The complement of 0 is 1 and the complement of everything else is 0.

Returns:
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects
None
See also:
Cudd_addNegate
DdNode* Cudd_addEvalConst ( DdManager dd,
DdNode f,
DdNode g 
)

Checks whether ADD g is constant whenever ADD f is 1.

f must be a 0-1 ADD. If f is identically 0, the check is assumed to be successful, and the background value is returned. No new nodes are created.

Returns:
a pointer to the resulting ADD (which may or may not be constant) or DD_NON_CONSTANT.
Side effects
None
See also:
Cudd_addIteConstant Cudd_addLeq
DdNode* Cudd_addIte ( DdManager dd,
DdNode f,
DdNode g,
DdNode h 
)

Implements ITE(f,g,h).

This procedure assumes that f is a 0-1 ADD.

Returns:
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects
None
See also:
Cudd_bddIte Cudd_addIteConstant Cudd_addApply
DdNode* Cudd_addIteConstant ( DdManager dd,
DdNode f,
DdNode g,
DdNode h 
)

Implements ITEconstant for ADDs.

f must be a 0-1 ADD. No new nodes are created. This function can be used, for instance, to check that g has a constant value (specified by h) whenever f is 1. If the constant value is unknown, then one should use Cudd_addEvalConst.

Returns:
a pointer to the resulting ADD (which may or may not be constant) or DD_NON_CONSTANT.
Side effects
None
See also:
Cudd_addIte Cudd_addEvalConst Cudd_bddIteConstant
int Cudd_addLeq ( DdManager dd,
DdNode f,
DdNode g 
)

Determines whether f is less than or equal to g.

No new nodes are created. This procedure works for arbitrary ADDs. For 0-1 ADDs Cudd_addEvalConst is more efficient.

Returns:
1 if f is less than or equal to g; 0 otherwise.
Side effects
None
See also:
Cudd_addIteConstant Cudd_addEvalConst Cudd_bddLeq
DdNode* cuddAddCmplRecur ( DdManager dd,
DdNode f 
)

Performs the recursive step of Cudd_addCmpl.

Returns:
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects
None
See also:
Cudd_addCmpl
DdNode* cuddAddIteRecur ( DdManager dd,
DdNode f,
DdNode g,
DdNode h 
)

Implements the recursive step of Cudd_addIte(f,g,h).

Returns:
a pointer to the resulting ADD if successful; NULL otherwise.
Side effects
None
See also:
Cudd_addIte
 All Data Structures Files Functions Variables Typedefs Enumerations Defines

Generated on 31 Dec 2015 for cudd by  doxygen 1.6.1