use of examples.alloy.Dijkstra in project org.alloytools.alloy by AlloyTools.
the class ExamplesTest method testDijkstra.
/**
* Runs the Dijkstra example for 6 States, 6 Processes, and 6 Mutexes.
*/
public void testDijkstra() {
final Dijkstra prob = new Dijkstra();
final Solution sol = solve(prob.checkDijkstraPreventsDeadlocks(), prob.bounds(6, 6, 6));
check(prob.getClass().getSimpleName(), sol, UNSATISFIABLE, 444, 4341, 18485);
}
use of examples.alloy.Dijkstra in project org.alloytools.alloy by AlloyTools.
the class EnumerationTest method testDijkstra.
public final void testDijkstra() {
final Dijkstra model = new Dijkstra();
final Formula f = model.showDijkstra();
Iterator<Solution> sol = solver.solveAll(f, model.bounds(5, 2, 2));
// has more than one instance
assertNotNull(sol.next().instance());
assertNotNull(sol.next().instance());
assertTrue(sol.hasNext());
}