- Direct Known Subclasses:
BDDFactoryIntImpl.IntBDDWithFinalizer
- Enclosing class:
- BDDFactoryIntImpl
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.javabdd.BDD
BDD.AllSatIterator, BDD.BDDIterator, BDD.BDDToString -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(BDD that, BDDFactory.BDDOp opr) Returns the result of applying the binary operatoroprto the two BDDs.applyAll(BDD that, BDDFactory.BDDOp opr, BDDVarSet var) Applies the binary operatoroprto two BDDs and then performs a universal quantification of the variables from the variable setvar.applyEx(BDD that, BDDFactory.BDDOp opr, BDDVarSet var) Applies the binary operatoroprto two BDDs and then performs an existential quantification of the variables from the variable setvar.applyUni(BDD that, BDDFactory.BDDOp opr, BDDVarSet var) Applies the binary operatoroprto two BDDs and then performs a unique quantification of the variables from the variable setvar.applyWith(BDD that, BDDFactory.BDDOp opr) Makes this BDD be the result of the binary operatoroprof two BDDs.Functional composition.Generalized cofactor.booleanReturns true if this BDD equals that BDD, false otherwise.Existential quantification of variables.Universal quantification of variables.voidfree()Frees this BDD.Finds one satisfying variable assignment.Returns the factory that created this BDD.inthashCode()high()Gets the true branch of this BDD.id()Identity function.booleanisOne()Returns true if this BDD is the one (true) BDD.booleanReturns true if this BDD is the universe BDD.booleanisZero()Returns true if this BDD is the zero (false) BDD.if-then-else operator.intlevel()Gets the level of this BDD.low()Gets the false branch of this BDD.intCounts the number of distinct nodes used for this BDD.not()Negates this BDD by exchanging all references to the zero-terminal with references to the one-terminal and vice-versa.doubleCounts the number of paths leading to the true terminal.Computes the BDD that represents the set of successor states fromstates, i.e., the ones reachable by taking one forward step from states instates, where this BDD is the (partial) transition relation to consider.relnextIntersection(BDD states, BDD restriction, BDDVarSet vars) Computesand(relnext(states, vars), restriction)as a single BDD operation.Computes the BDD that represents the set of predecessor states fromstates, i.e., the ones reachable by taking one backward step from states instates, where this BDD is the (partial) transition relation to consider.relprevIntersection(BDD states, BDD restriction, BDDVarSet vars) Computesand(relprev(states, vars), restriction)as a single BDD operation.replace(BDDPairing pair) Returns a BDD where all variables are replaced with the variables defined by pair.replaceWith(BDDPairing pair) Replaces all variables in this BDD with the variables defined by pair.Restrict a set of variables to constant values.restrictWith(BDD that) Mutates this BDD to restrict a set of variables to constant values.doublesatCount()Calculates the number of satisfying variable assignments.satOne()Finds one satisfying variable assignment.Finds one satisfying variable assignment.Coudert and Madre's restrict function.support()Returns the variable support of this BDD.toVarSet()Converts this BDD to a new BDDVarSet.Unique quantification of variables.intvar()Gets the variable labeling the BDD.int[]Counts the number of times each variable occurs in this BDD.veccompose(BDDPairing pair) Simultaneous functional composition.Methods inherited from class com.github.javabdd.BDD
allsat, and, andWith, biimp, biimpWith, equals, imp, impWith, iterator, logSatCount, logSatCount, or, orWith, printDot, printdot_rec, printSet, printSetWithDomains, relprod, satCount, scanAllVar, scanVar, toString, toStringWithDomains, toStringWithDomains, xor, xorWith
-
Field Details
-
v
protected int v
-
-
Constructor Details
-
IntBDD
protected IntBDD(int v)
-
-
Method Details
-
apply
Description copied from class:BDDReturns the result of applying the binary operatoroprto the two BDDs.Compare to bdd_apply.
-
applyAll
Description copied from class:BDDApplies the binary operatoroprto two BDDs and then performs a universal quantification of the variables from the variable setvar.Compare to bdd_appall.
-
applyEx
Description copied from class:BDDApplies the binary operatoroprto two BDDs and then performs an existential quantification of the variables from the variable setvar.Compare to bdd_appex.
-
applyUni
Description copied from class:BDDApplies the binary operatoroprto two BDDs and then performs a unique quantification of the variables from the variable setvar.Compare to bdd_appuni.
-
applyWith
Description copied from class:BDDMakes this BDD be the result of the binary operatoroprof two BDDs. The "that" BDD is consumed, and can no longer be used. Attempting to use the passed in BDD again will result in an exception being thrown.Compare to bdd_apply and bdd_delref.
-
compose
Description copied from class:BDDFunctional composition. Substitutes the variable var with the BDD that in this BDD: result = f[g/var].Compare to bdd_compose.
-
constrain
Description copied from class:BDDGeneralized cofactor. Computes the generalized cofactor of this BDD with respect to the given BDD.Compare to bdd_constrain.
-
equalsBDD
Description copied from class:BDDReturns true if this BDD equals that BDD, false otherwise. -
exist
Description copied from class:BDDExistential quantification of variables. Removes all occurrences of this BDD in variables in the set var by existential quantification.Compare to bdd_exist.
-
forAll
Description copied from class:BDDUniversal quantification of variables. Removes all occurrences of this BDD in variables in the set var by universal quantification.Compare to bdd_forall.
-
free
public void free()Description copied from class:BDDFrees this BDD. Further use of this BDD will result in an exception being thrown. -
fullSatOne
Description copied from class:BDDFinds one satisfying variable assignment. Finds a BDD with exactly one variable at all levels. The new BDD implies this BDD and is not false unless this BDD is false.Compare to bdd_fullsatone.
- Specified by:
fullSatOnein classBDD- Returns:
- one satisfying variable assignment
-
getFactory
Description copied from class:BDDReturns the factory that created this BDD.- Specified by:
getFactoryin classBDD- Returns:
- factory that created this BDD
-
hashCode
public int hashCode() -
high
Description copied from class:BDDGets the true branch of this BDD.Compare to bdd_high.
-
id
Description copied from class:BDDIdentity function. Returns a copy of this BDD. Use as the argument to the "xxxWith" style operators when you do not want to have the argument consumed.Compare to bdd_addref.
-
isOne
public boolean isOne()Description copied from class:BDDReturns true if this BDD is the one (true) BDD. -
isUniverse
public boolean isUniverse()Description copied from class:BDDReturns true if this BDD is the universe BDD. The universal BDD differs from the one BDD in ZDD mode.- Overrides:
isUniversein classBDD- Returns:
- true if this BDD is the universe BDD
-
isZero
public boolean isZero()Description copied from class:BDDReturns true if this BDD is the zero (false) BDD. -
ite
Description copied from class:BDDif-then-else operator.Compare to bdd_ite.
-
low
Description copied from class:BDDGets the false branch of this BDD.Compare to bdd_low.
-
level
public int level()Description copied from class:BDDGets the level of this BDD.Compare to LEVEL() macro.
-
nodeCount
public int nodeCount()Description copied from class:BDDCounts the number of distinct nodes used for this BDD.Compare to bdd_nodecount.
-
not
Description copied from class:BDDNegates this BDD by exchanging all references to the zero-terminal with references to the one-terminal and vice-versa.Compare to bdd_not.
-
pathCount
public double pathCount()Description copied from class:BDDCounts the number of paths leading to the true terminal.Compare to bdd_pathcount.
-
replace
Description copied from class:BDDReturns a BDD where all variables are replaced with the variables defined by pair. Each entry in pair consists of a old and a new variable. Whenever the old variable is found in this BDD then a new node with the new variable is inserted instead.Compare to bdd_replace.
-
replaceWith
Description copied from class:BDDReplaces all variables in this BDD with the variables defined by pair. Each entry in pair consists of a old and a new variable. Whenever the old variable is found in this BDD then a new node with the new variable is inserted instead. Mutates the current BDD.Compare to bdd_replace and bdd_delref.
- Specified by:
replaceWithin classBDD- Parameters:
pair- pairing of variables to the BDDs that replace those variables- Returns:
- result of replace
-
restrict
Description copied from class:BDDRestrict a set of variables to constant values. Restricts the variables in this BDD to constant true if they are included in their positive form in var, and constant false if they are included in their negative form.Note that this is quite different than Coudert and Madre's restrict function.
Compare to bdd_restrict.
-
restrictWith
Description copied from class:BDDMutates this BDD to restrict a set of variables to constant values. Restricts the variables in this BDD to constant true if they are included in their positive form in var, and constant false if they are included in their negative form. The "that" BDD is consumed, and can no longer be used.Note that this is quite different than Coudert and Madre's restrict function.
Compare to bdd_restrict and bdd_delref.
- Specified by:
restrictWithin classBDD- Parameters:
that- BDD containing the variables to be restricted- Returns:
- the result of the restrict operation
- See Also:
-
satCount
public double satCount()Description copied from class:BDDCalculates the number of satisfying variable assignments.Compare to bdd_satcount.
-
satOne
Description copied from class:BDDFinds one satisfying variable assignment. Finds a BDD with at most one variable at each level. The new BDD implies this BDD and is not false unless this BDD is false.Compare to bdd_satone.
-
satOne
Description copied from class:BDDFinds one satisfying variable assignment. Finds a minterm in this BDD. Thevarargument is a set of variables that must be mentioned in the result. The polarity of these variables in the result - in case they are undefined in this BDD - are defined by thepolparameter. Ifpolis false, then all variables will be in negative form. Otherwise they will be in positive form.Compare to bdd_satoneset.
-
simplify
Description copied from class:BDDCoudert and Madre's restrict function. Tries to simplify the BDD f by restricting it to the domain covered by d. No checks are done to see if the result is actually smaller than the input. This can be done by the user with a call to nodeCount().Compare to bdd_simplify.
-
support
Description copied from class:BDDReturns the variable support of this BDD. The support is all the variables that this BDD depends on.Compare to bdd_support.
-
unique
Description copied from class:BDDUnique quantification of variables. This type of quantification uses a XOR operator instead of an OR operator as in the existential quantification.Compare to bdd_unique.
-
var
public int var()Description copied from class:BDDGets the variable labeling the BDD.Compare to bdd_var.
-
varProfile
public int[] varProfile()Description copied from class:BDDCounts the number of times each variable occurs in this BDD. The result is stored and returned in an integer array where the i'th position stores the number of times the i'th printing variable occurred in the BDD.Compare to bdd_varprofile.
- Specified by:
varProfilein classBDD- Returns:
- the variable profile
-
veccompose
Description copied from class:BDDSimultaneous functional composition. Uses the pairs of variables and BDDs in pair to make the simultaneous substitution: f [g1/V1, ... gn/Vn]. In this way one or more BDDs may be substituted in one step. The BDDs in pair may depend on the variables they are substituting. BDD.compose() may be used instead of BDD.replace() but is not as efficient when gi is a single variable, the same applies to BDD.restrict(). Note that simultaneous substitution is not necessarily the same as repeated substitution.Compare to bdd_veccompose.
- Specified by:
veccomposein classBDD- Parameters:
pair- the pairing of variables to functions- Returns:
- BDD the result of the simultaneous functional composition
-
toVarSet
Description copied from class:BDDConverts this BDD to a new BDDVarSet.This BDD must be a boolean function that represents the all-true minterm of the BDD variables of interest.
-
relnext
Description copied from class:BDDComputes the BDD that represents the set of successor states fromstates, i.e., the ones reachable by taking one forward step from states instates, where this BDD is the (partial) transition relation to consider. It is assumed that old-state and new-state BDD variables are interleaved in this transition relation, starting with the old-state variable, i.e., each old-state variable comes directly before its corresponding new-state variable.- Specified by:
relnextin classBDD- Parameters:
states- The BDD representing the set of states.vars- The BDD representing the set of variables that are relevant to consider for determining successor states. This variable set must include all variables that occur in the transition relation BDD. Moreover, for every new-state variable that is invars,relnextconsiders the corresponding old-state variable to be relevant as well, regardless of whether it's included invarsor not.- Returns:
- The BDD representing the set of successor states from
states.
-
relnextIntersection
Description copied from class:BDDComputesand(relnext(states, vars), restriction)as a single BDD operation.- Specified by:
relnextIntersectionin classBDD- Parameters:
states- The BDD representing the set of states.restriction- The BDD representing the restriction to apply to the BDD representing the successor states.vars- The BDD representing the set of relevant variables to consider. Seerelnextfor further details.- Returns:
- The BDD representing the restricted set of successor states from
states.
-
relprev
Description copied from class:BDDComputes the BDD that represents the set of predecessor states fromstates, i.e., the ones reachable by taking one backward step from states instates, where this BDD is the (partial) transition relation to consider. It is assumed that old-state and new-state BDD variables are interleaved in this transition relation, starting with the old-state variable, i.e., each old-state variable comes directly before its corresponding new-state variable.- Specified by:
relprevin classBDD- Parameters:
states- The BDD representing the set of states.vars- The BDD representing the set of variables that are relevant to consider for determining predecessor states. This variable set must include all variables that occur in the transition relation BDD. Moreover, for every new-state variable that is invars,relprevconsiders the corresponding old-state variable to be relevant as well, regardless of whether it's included invarsor not.- Returns:
- The BDD representing the set of predecessor states from
states.
-
relprevIntersection
Description copied from class:BDDComputesand(relprev(states, vars), restriction)as a single BDD operation.- Specified by:
relprevIntersectionin classBDD- Parameters:
states- The BDD representing the set of states.restriction- The BDD representing the restriction to apply to the BDD representing the predecessor states.vars- The BDD representing the set of relevant variables to consider. Seerelprevfor further details.- Returns:
- The BDD representing the restricted set of predecessor states from
states.
-