| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sat4j.tools.SolverDecorator<ISolver>
org.sat4j.tools.GateTranslator
public class GateTranslator
Utility class to easily feed a SAT solver using logical gates.
| Constructor Summary | |
|---|---|
GateTranslator(ISolver solver)
 | 
|
| Method Summary | |
|---|---|
 void | 
and(int y,
    int x1,
    int x2)
Translate y <=> x1 /\ x2  | 
 void | 
and(int y,
    IVecInt literals)
Translate y <=> x1 /\ x2 /\ ... /\ xn into clauses.  | 
 void | 
gateFalse(int y)
translate y <=> FALSE into a clause.  | 
 void | 
gateTrue(int y)
translate y <=> TRUE into a clause.  | 
 void | 
iff(int y,
    IVecInt literals)
translate y <=> (x1 <=> x2 <=> ... <=> xn) into clauses.  | 
 void | 
ite(int y,
    int x1,
    int x2,
    int x3)
translate y <=> if x1 then x2 else x3 into clauses.  | 
 void | 
not(int y,
    int x)
Translate y <=> not x into clauses.  | 
 void | 
or(int y,
   IVecInt literals)
translate y <=> x1 \/ x2 \/ ... \/ xn into clauses.  | 
 void | 
xor(int y,
    IVecInt literals)
translate y <=> x1 xor x2 xor ... xor xn into clauses.  | 
| Methods inherited from class org.sat4j.tools.SolverDecorator | 
|---|
addAllClauses, addAtLeast, addAtMost, addClause, clearDecorated, clearLearntClauses, decorated, expireTimeout, findModel, findModel, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, isSatisfiable, isSatisfiable, isSatisfiable, isSatisfiable, model, model, nConstraints, newVar, newVar, nVars, printInfos, printStat, printStat, removeConstr, reset, setDBSimplificationAllowed, setExpectedNumberOfClauses, setTimeout, setTimeoutMs, setTimeoutOnConflicts, toString | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public GateTranslator(ISolver solver)
| Method Detail | 
|---|
public void gateFalse(int y)
               throws ContradictionException
y - a variable to falsify
ContradictionException - iff a trivial inconsistency is found.
public void gateTrue(int y)
              throws ContradictionException
y - a variable to verify
ContradictionException
public void ite(int y,
                int x1,
                int x2,
                int x3)
         throws ContradictionException
y - x1 - the selector variablex2 - x3 - 
ContradictionException
public void and(int y,
                IVecInt literals)
         throws ContradictionException
y - literals - the x1 ... xn literals.
ContradictionException
public void and(int y,
                int x1,
                int x2)
         throws ContradictionException
y - x1 - x2 - 
ContradictionException
public void or(int y,
               IVecInt literals)
        throws ContradictionException
y - literals - 
ContradictionException
public void not(int y,
                int x)
         throws ContradictionException
y - x - 
ContradictionException
public void xor(int y,
                IVecInt literals)
         throws ContradictionException
y - literals - 
ContradictionException
public void iff(int y,
                IVecInt literals)
         throws ContradictionException
y - literals - 
ContradictionException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||