public class BDDModule
extends java.lang.Object
Constructor and Description |
---|
BDDModule()
Creates the module
|
Modifier and Type | Method and Description |
---|---|
com.juliasoft.beedeedee.bdd.BDD |
$(com.juliasoft.beedeedee.bdd.BDD bdd)
registers the bdd into the module so that it can be released on
destruction
|
com.juliasoft.beedeedee.bdd.BDD |
asBDD(Variable variable)
Transforms the provided variable returning the corresponding BDD
|
Formula |
asFormula(com.juliasoft.beedeedee.bdd.BDD bdd)
Transforms the bdd to a tree formula
|
java.lang.String |
decodeID(java.lang.Integer id)
Obtains the name for the given id
|
void |
doneWithFactory()
Signals factory destruction
|
java.util.Map<java.lang.Integer,java.lang.Integer> |
encode(java.util.Map<Variable,Variable> rewriteMap)
Encodes the rewriting map using the corresponding identifiers
|
com.juliasoft.beedeedee.bdd.BDD |
get(int id)
Obtains the BDD with the provided id
|
com.juliasoft.beedeedee.bdd.BDD |
get(java.lang.String name)
Obtains the BDD with the provided name
|
com.juliasoft.beedeedee.bdd.BDD |
getBooleanConstant(BooleanConstant constant)
Obtains the BDD representing the Boolean constant
|
int |
getID(java.lang.String name)
Obtains the ID for the provided BDD name
|
boolean |
hasBeenCreated(Variable variable)
Determines if a particular variable has been created
|
com.juliasoft.beedeedee.bdd.BDD |
rewrite(com.juliasoft.beedeedee.bdd.BDD bdd,
java.util.Map<java.lang.Integer,java.lang.Integer> rewriteMap)
Rewrites the variables of the provided BDD using the rewriting map
MODIFYING the original BDD
|
com.juliasoft.beedeedee.bdd.BDD |
rewrite(java.lang.String name,
java.util.Map<java.lang.Integer,java.lang.Integer> rewriteMap)
Rewrites the BDD with the name given using the rewriting map
|
com.juliasoft.beedeedee.bdd.BDD |
rewriteVars(com.juliasoft.beedeedee.bdd.BDD bdd,
java.util.Map<Variable,Variable> rewriteMap)
rewrites the provided BDD variables according to the given map
|
com.juliasoft.beedeedee.bdd.BDD |
rewriteVars(java.lang.String name,
java.util.Map<Variable,Variable> rewriteMap)
Rewrites the BDD with the name given using the rewriting map
|
int |
set(com.juliasoft.beedeedee.bdd.BDD bdd)
Adds the provided BDD to the module the name of the bdd is the same as
that of its identifier the identifier is automatically generated
|
void |
set(com.juliasoft.beedeedee.bdd.BDD bdd,
java.lang.String name)
Creates or updates the BDD under the given name
|
void |
set(Formula formula,
java.lang.String name)
Transforms the formula to BDD representation and give it the provided
name
|
void |
set(Variable variable)
Sets the provided variable in the module
|
java.lang.String |
toString(com.juliasoft.beedeedee.bdd.BDD bdd)
A string representation of the BDD
|
public void set(Formula formula, java.lang.String name)
formula
- the formula to transformname
- the namepublic void set(Variable variable)
variable
- the variable to setpublic void set(com.juliasoft.beedeedee.bdd.BDD bdd, java.lang.String name)
bdd
- the binary decision diagramname
- the given namepublic boolean hasBeenCreated(Variable variable)
variable
- the variable to checkpublic int set(com.juliasoft.beedeedee.bdd.BDD bdd)
bdd
- the bdd to registerpublic com.juliasoft.beedeedee.bdd.BDD $(com.juliasoft.beedeedee.bdd.BDD bdd)
bdd
- the bdd to registerpublic com.juliasoft.beedeedee.bdd.BDD get(java.lang.String name)
name
- the name of the BDDpublic int getID(java.lang.String name)
name
- the namepublic com.juliasoft.beedeedee.bdd.BDD get(int id)
id
- the numerical identifierpublic com.juliasoft.beedeedee.bdd.BDD getBooleanConstant(BooleanConstant constant)
constant
- the constantpublic com.juliasoft.beedeedee.bdd.BDD rewriteVars(com.juliasoft.beedeedee.bdd.BDD bdd, java.util.Map<Variable,Variable> rewriteMap)
bdd
- the BDD to modifyrewriteMap
- the mapping for the rewritingpublic com.juliasoft.beedeedee.bdd.BDD rewrite(com.juliasoft.beedeedee.bdd.BDD bdd, java.util.Map<java.lang.Integer,java.lang.Integer> rewriteMap)
bdd
- the provided BDDrewriteMap
- the mappublic java.util.Map<java.lang.Integer,java.lang.Integer> encode(java.util.Map<Variable,Variable> rewriteMap)
rewriteMap
- the rewriting map to transformpublic com.juliasoft.beedeedee.bdd.BDD rewriteVars(java.lang.String name, java.util.Map<Variable,Variable> rewriteMap)
name
- the name of the bddrewriteMap
- the mappublic com.juliasoft.beedeedee.bdd.BDD rewrite(java.lang.String name, java.util.Map<java.lang.Integer,java.lang.Integer> rewriteMap)
name
- the name of the BDDrewriteMap
- the rewriting mappublic java.lang.String decodeID(java.lang.Integer id)
id
- the identifierpublic Formula asFormula(com.juliasoft.beedeedee.bdd.BDD bdd)
bdd
- the Binary decision diagrampublic com.juliasoft.beedeedee.bdd.BDD asBDD(Variable variable)
variable
- the variable to setpublic java.lang.String toString(com.juliasoft.beedeedee.bdd.BDD bdd)
bdd
- the given BDDpublic void doneWithFactory()