Skip to content
Snippets Groups Projects
Commit 14d32666 authored by Michael Leuschel's avatar Michael Leuschel
Browse files

add comments

parent dbccc74f
No related branches found
No related tags found
No related merge requests found
......@@ -275,7 +275,7 @@ public class KodkodAnalysis extends DepthFirstAdapter {
/**
* A request has been entered. It will be added to the {@link KodkodSession}
* and the first solutions will be send directly.
* and the first solutions will be sent directly.
*/
@Override
public void caseARequest(final ARequest node) {
......@@ -283,7 +283,7 @@ public class KodkodAnalysis extends DepthFirstAdapter {
final ImmutableProblem problem = session.getProblem(problemId);
if (problem != null) {
final boolean signum = getSignum(node.getReqtype());
int size = extractInt(node.getSize());
int size = extractInt(node.getSize()); // the maximum number of solutions to be computed
final Map<String, TupleSet> args = extractArguments(
node.getArguments(), problem);
session.request(problem, signum, args);
......@@ -301,7 +301,7 @@ public class KodkodAnalysis extends DepthFirstAdapter {
final String id = extractIdentifier(node.getProblem());
final ImmutableProblem problem = session.getProblem(id);
if (problem != null) {
final int size = extractInt(node.getSize());
final int size = extractInt(node.getSize()); // the maximum number of solutions to be computed
session.writeNextSolutions(problem, size, pto);
}
}
......
......@@ -36,7 +36,7 @@ public class KodkodSession {
final Solver solver = new Solver();
solver.options().setSolver(new SAT4JWithTimeoutFactory(timeout));
solver.options().setSymmetryBreaking(0);
solver.options().setSymmetryBreaking(0); // TO DO: provide preference for this; default int value for Kodkod is 20
final Integer bitwidth = problem.getBitwidth();
if (bitwidth != null) {
solver.options().setBitwidth(bitwidth);
......@@ -65,6 +65,7 @@ public class KodkodSession {
return problems.get(problemId);
}
// size is the max number of solutions found
public boolean writeNextSolutions(final ImmutableProblem problem,
final int size, final IPrologTermOutput pto) {
Request request = currentRequests.get(problem);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment