public class GateTranslator extends SolverDecorator<ISolver>
| Constructor and Description |
|---|
GateTranslator(ISolver solver) |
| Modifier and Type | Method and Description |
|---|---|
void |
additionalFullAdderConstraints(int xcarry,
int xsum,
int a,
int b,
int c) |
IConstr[] |
and(int y,
int x1,
int x2)
Translate y <=> x1 /\ x2
|
IConstr[] |
and(int y,
IVecInt literals)
Translate y <=> x1 /\ x2 /\ ... /\ xn into clauses.
|
void |
fullAdderCarry(int x,
int a,
int b,
int c) |
void |
fullAdderSum(int x,
int a,
int b,
int c) |
IConstr |
gateFalse(int y)
translate y <=> FALSE into a clause.
|
IConstr |
gateTrue(int y)
translate y <=> TRUE into a clause.
|
void |
halfAdderCarry(int x,
int a,
int b) |
void |
halfAdderSum(int x,
int a,
int b) |
IConstr[] |
halfOr(int y,
IVecInt literals)
translate y <= x1 \/ x2 \/ ... \/ xn into clauses.
|
IConstr[] |
iff(int y,
IVecInt literals)
translate y <=> (x1 <=> x2 <=> ... <=> xn) into clauses.
|
IConstr[] |
ite(int y,
int x1,
int x2,
int x3)
translate y <=> if x1 then x2 else x3 into clauses.
|
IConstr[] |
not(int y,
int x)
Translate y <=> not x into clauses.
|
void |
optimisationFunction(IVecInt literals,
IVec<BigInteger> coefs,
IVecInt result)
Translate an optimization function into constraints and provides the
binary literals in results.
|
IConstr[] |
or(int y,
IVecInt literals)
translate y <=> x1 \/ x2 \/ ... \/ xn into clauses.
|
void |
xor(int x,
int a,
int b) |
IConstr[] |
xor(int y,
IVecInt literals)
translate y <=> x1 xor x2 xor ... xor xn into clauses.
|
addAllClauses, addAtLeast, addAtMost, addBlockingClause, addClause, addExactly, clearDecorated, clearLearntClauses, decorated, expireTimeout, findModel, findModel, getLogPrefix, getSearchListener, getSolvingEngine, getStat, getTimeout, getTimeoutMs, isDBSimplificationAllowed, isSatisfiable, isSatisfiable, isSatisfiable, isSatisfiable, isSolverKeptHot, isVerbose, model, model, modelWithInternalVariables, nConstraints, newVar, newVar, nextFreeVarId, nVars, primeImplicant, primeImplicant, printInfos, printInfos, printStat, printStat, printStat, realNumberOfVariables, registerLiteral, removeConstr, removeSubsumedConstr, reset, setDBSimplificationAllowed, setExpectedNumberOfClauses, setKeepSolverHot, setLogPrefix, setSearchListener, setTimeout, setTimeoutMs, setTimeoutOnConflicts, setUnitClauseProvider, setVerbose, toString, toString, unsatExplanationpublic GateTranslator(ISolver solver)
public IConstr gateFalse(int y) throws ContradictionException
y - a variable to falsifyContradictionException - iff a trivial inconsistency is found.public IConstr gateTrue(int y) throws ContradictionException
y - a variable to verifyContradictionExceptionpublic IConstr[] ite(int y, int x1, int x2, int x3) throws ContradictionException
y - x1 - the selector variablex2 - x3 - ContradictionExceptionpublic IConstr[] and(int y, IVecInt literals) throws ContradictionException
y - literals - the x1 ... xn literals.ContradictionExceptionpublic IConstr[] and(int y, int x1, int x2) throws ContradictionException
y - x1 - x2 - ContradictionExceptionpublic IConstr[] or(int y, IVecInt literals) throws ContradictionException
y - literals - ContradictionExceptionpublic IConstr[] halfOr(int y, IVecInt literals) throws ContradictionException
y - literals - ContradictionExceptionpublic IConstr[] not(int y, int x) throws ContradictionException
y - x - ContradictionExceptionpublic IConstr[] xor(int y, IVecInt literals) throws ContradictionException
y - literals - ContradictionExceptionpublic IConstr[] iff(int y, IVecInt literals) throws ContradictionException
y - literals - ContradictionExceptionpublic void xor(int x,
int a,
int b)
throws ContradictionException
ContradictionExceptionpublic void fullAdderSum(int x,
int a,
int b,
int c)
throws ContradictionException
ContradictionExceptionpublic void fullAdderCarry(int x,
int a,
int b,
int c)
throws ContradictionException
ContradictionExceptionpublic void additionalFullAdderConstraints(int xcarry,
int xsum,
int a,
int b,
int c)
throws ContradictionException
ContradictionExceptionpublic void halfAdderSum(int x,
int a,
int b)
throws ContradictionException
ContradictionExceptionpublic void halfAdderCarry(int x,
int a,
int b)
throws ContradictionException
ContradictionExceptionpublic void optimisationFunction(IVecInt literals, IVec<BigInteger> coefs, IVecInt result) throws ContradictionException
ContradictionExceptionCopyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.