public interface ClauseDatabaseInterface
Modifier and Type | Method and Description |
---|---|
int |
addClause(int[] clause,
boolean isModelClause)
It adds a clause to the database.
|
void |
assertLiteral(int literal)
It informs the ClausesDatabase that this literal is set, so that it
can perform unit propagation.
|
void |
backjump(int level)
Do everything needed to return to the given level.
|
boolean |
canRemove(int clauseId)
It tells if the implementation of ClausesDatabase can remove clauses or not
|
void |
removeClause(int clauseId)
It removes the clause which unique ID is @param clauseId.
|
MapClause |
resolutionWith(int clauseIndex,
MapClause clause)
It returns the clause obtained by resolution between clauseIndex and clause.
|
int |
size()
size of the database
|
void |
toCNF(BufferedWriter output)
It writes the clauses of the databases in cnf format to the specified
writer.
|
int addClause(int[] clause, boolean isModelClause)
clause
- the clause to addisModelClause
- defined if the clause is model clausevoid assertLiteral(int literal)
literal
- the literal that is setvoid removeClause(int clauseId)
clauseId
- clause idboolean canRemove(int clauseId)
clauseId
- the unique Id of the clauseMapClause resolutionWith(int clauseIndex, MapClause clause)
clauseIndex
- the unique id of the clauseclause
- an explanation clause that is modified by resolutionvoid backjump(int level)
level
- the level to return to. Must be < solver.getCurrentLevel().int size()
void toCNF(BufferedWriter output) throws IOException
output
- the output writer to which all the clauses will be written to.IOException
- execption from java.io packageCopyright © 2022. All rights reserved.