public final class Lits extends Object implements Serializable, ILits
| Constructor and Description |
|---|
Lits() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
belongsToPool(int x)
Returns true iff the variable is used in the set of constraints.
|
protected int |
capacity()
To get the capacity of the current vocabulary.
|
void |
ensurePool(int howmany)
Make sure that all data structures are ready to manage howmany boolean
variables.
|
void |
forgets(int var)
Removes a variable from the formula.
|
int |
getFromPool(int x)
Translates a Dimacs literal into an internal representation literal.
|
int |
getLevel(int lit)
Returns the level at which that literal has been assigned a value, else
-1.
|
Constr |
getReason(int lit)
Returns the reason of the assignment of a literal.
|
void |
init(int nvar) |
boolean |
isFalsified(int lit)
Check if a literal is falsified.
|
boolean |
isImplied(int lit) |
boolean |
isSatisfied(int lit)
Check if a literal is satisfied.
|
boolean |
isUnassigned(int lit)
Check if a literal is assigned a truth value.
|
int |
nextFreeVarId(boolean reserve)
Ask the solver for a free variable identifier, in Dimacs format (i.e. a
positive number).
|
int |
not(int lit) |
int |
nVars()
to obtain the max id of the variable
|
int |
realnVars()
to obtain the real number of variables appearing in the formula
|
void |
reset(int lit)
Reset a literal in the vocabulary.
|
void |
resetPool()
reset the vocabulary.
|
void |
satisfies(int lit)
Satisfies a boolean variable (truth value is TRUE).
|
void |
setLevel(int lit,
int l)
Sets the decision level of a literal.
|
void |
setReason(int lit,
Constr r)
Sets the reason of the assignment of a literal.
|
static String |
toString(int lit) |
void |
unassign(int lit)
Unassigns a boolean variable (truth value if UNDEF).
|
IVec<Undoable> |
undos(int lit)
Retrieve the methods to call when the solver backtracks.
|
String |
valueToString(int lit)
Returns a textual representation of the truth value of that literal.
|
void |
watch(int lit,
Propagatable c)
Record a new constraint to watch when a literal is satisfied.
|
IVec<Propagatable> |
watches(int lit) |
public int getFromPool(int x)
ILitsgetFromPool in interface ILitsx - the Dimacs literal (a non null integer).public boolean belongsToPool(int x)
ILitsbelongsToPool in interface ILitspublic void resetPool()
ILitspublic void ensurePool(int howmany)
ILitsensurePool in interface ILitshowmany - the new capacity (in boolean variables) of the vocabulary.public void unassign(int lit)
ILitspublic void satisfies(int lit)
ILitspublic void forgets(int var)
ILitspublic boolean isSatisfied(int lit)
ILitsisSatisfied in interface ILitslit - a literal in internal format.public boolean isFalsified(int lit)
ILitsisFalsified in interface ILitslit - a literal in internal format.public boolean isUnassigned(int lit)
ILitsisUnassigned in interface ILitslit - a literal in internal format.public String valueToString(int lit)
ILitsvalueToString in interface ILitslit - a literal in internal representation.public int nVars()
ILitspublic int not(int lit)
public static String toString(int lit)
public void reset(int lit)
ILitspublic int getLevel(int lit)
ILitspublic void setLevel(int lit,
int l)
ILitspublic Constr getReason(int lit)
ILitspublic void setReason(int lit,
Constr r)
ILitspublic IVec<Undoable> undos(int lit)
ILitspublic void watch(int lit,
Propagatable c)
ILitspublic IVec<Propagatable> watches(int lit)
public boolean isImplied(int lit)
public int realnVars()
ILitsprotected int capacity()
public int nextFreeVarId(boolean reserve)
ILitsnextFreeVarId in interface ILitsCopyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.