What's new
Search limits (SolverLimits + LimitExceededException)
Cap the amount of backtracking search with node-count and/or wall-clock time limits:
BoundSolver solver = Solver.Factory.INSTANCE.createSolver(csp, SolverLimits.ofNodes(10_000));
BoundSolver solver = Solver.Factory.INSTANCE.createSolver(csp, SolverLimits.ofTime(Duration.ofSeconds(5)));
BoundSolver solver = Solver.Factory.INSTANCE.createSolver(csp, SolverLimits.of(10_000, Duration.ofSeconds(5)));getSolution() now throws LimitExceededException (carrying a Statistics snapshot) when a limit is hit, distinguishing that case from genuine UNSAT (Optional.empty()). getSolutions() truncates the stream silently for anytime-search use cases.
try {
Optional<Assignment> solution = solver.getSolution();
// Optional.empty() → genuinely UNSAT
} catch (LimitExceededException e) {
System.out.println("Explored " + e.getStatistics().getNodesExplored() + " nodes");
}Other changes
- Dependency bumps (Lombok, JUnit Jupiter, Mockito, SLF4J, central-publishing-maven-plugin)