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, unsatExplanation
public 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 verifyContradictionException
public IConstr[] ite(int y, int x1, int x2, int x3) throws ContradictionException
y
- x1
- the selector variablex2
- x3
- ContradictionException
public IConstr[] and(int y, IVecInt literals) throws ContradictionException
y
- literals
- the x1 ... xn literals.ContradictionException
public IConstr[] and(int y, int x1, int x2) throws ContradictionException
y
- x1
- x2
- ContradictionException
public IConstr[] or(int y, IVecInt literals) throws ContradictionException
y
- literals
- ContradictionException
public IConstr[] halfOr(int y, IVecInt literals) throws ContradictionException
y
- literals
- ContradictionException
public IConstr[] not(int y, int x) throws ContradictionException
y
- x
- ContradictionException
public IConstr[] xor(int y, IVecInt literals) throws ContradictionException
y
- literals
- ContradictionException
public IConstr[] iff(int y, IVecInt literals) throws ContradictionException
y
- literals
- ContradictionException
public void xor(int x, int a, int b) throws ContradictionException
ContradictionException
public void fullAdderSum(int x, int a, int b, int c) throws ContradictionException
ContradictionException
public void fullAdderCarry(int x, int a, int b, int c) throws ContradictionException
ContradictionException
public void additionalFullAdderConstraints(int xcarry, int xsum, int a, int b, int c) throws ContradictionException
ContradictionException
public void halfAdderSum(int x, int a, int b) throws ContradictionException
ContradictionException
public void halfAdderCarry(int x, int a, int b) throws ContradictionException
ContradictionException
public void optimisationFunction(IVecInt literals, IVec<BigInteger> coefs, IVecInt result) throws ContradictionException
ContradictionException
Copyright © 2013 Centre de Recherche en Informatique de Lens (CRIL). All Rights Reserved.