use of kodkod.engine.Solution in project org.alloytools.alloy by AlloyTools.
the class EnumerationTest method testCeilingsAndFloors.
public final void testCeilingsAndFloors() {
final CeilingsAndFloors model = new CeilingsAndFloors();
final Formula f = model.checkBelowTooAssertion();
// has exactly one instance
Iterator<Solution> sol = solver.solveAll(f, model.bounds(2, 2));
assertNotNull(sol.next().instance());
assertNull(sol.next().instance());
assertFalse(sol.hasNext());
// has more than one instance
sol = solver.solveAll(f, model.bounds(3, 3));
assertNotNull(sol.next().instance());
assertNotNull(sol.next().instance());
assertTrue(sol.hasNext());
// has no instances
sol = solver.solveAll(model.checkBelowTooDoublePrime(), model.bounds(3, 3));
assertNull(sol.next().instance());
}
use of kodkod.engine.Solution in project org.alloytools.alloy by AlloyTools.
the class ExamplesTest method testSET967.
/**
* Runs SET967.checkT120_zfmisc_1 for 3.
*/
public void testSET967() {
final SET967 prob = new SET967();
final Solution sol = solve(prob.checkT120_zfmisc_1(), prob.bounds(3));
check(prob.getClass().getSimpleName(), sol, UNSATISFIABLE, 407, 6968, 15413);
}
use of kodkod.engine.Solution in project org.alloytools.alloy by AlloyTools.
the class ExamplesTest method testFileSystem.
/**
* Runs FileSystem.checkNoDirAliases for 5.
*/
public void testFileSystem() {
final FileSystem prob = new FileSystem();
final Solution sol = solve(prob.checkNoDirAliases(), prob.bounds(5));
check(prob.getClass().getSimpleName(), sol, SATISFIABLE, 444, 4341, 18485);
}
use of kodkod.engine.Solution in project org.alloytools.alloy by AlloyTools.
the class ExamplesTest method testALG212.
/**
* Runs ALG212.checkDistLong for 4.
*/
public void testALG212() {
final ALG212 prob = new ALG212();
final Solution sol = solve(prob.checkDistLong(), prob.bounds(4));
check(prob.getClass().getSimpleName(), sol, UNSATISFIABLE, 407, 6968, 15413);
}
use of kodkod.engine.Solution in project org.alloytools.alloy by AlloyTools.
the class ExamplesTest method testMED009.
/**
* Runs MED009.checkTranssls2_qige27 for 6.
*/
public void testMED009() {
final MED009 prob = new MED009();
final Solution sol = solve(prob.checkTranssls2_qige27(), prob.bounds(6));
check(prob.getClass().getSimpleName(), sol, UNSATISFIABLE, 407, 6968, 15413);
}
Aggregations