Search in sources :

Example 41 with Solution

use of kodkod.engine.Solution in project org.alloytools.alloy by AlloyTools.

the class ExamplesTest method testCeilingsAndFloors_BelowTooAssertion.

/**
 * Runs the CeilingsAndFloors.checkBelowTooAssertion example for 6 Man, 6
 * Platform.
 */
public void testCeilingsAndFloors_BelowTooAssertion() {
    final CeilingsAndFloors prob = new CeilingsAndFloors();
    final Solution sol = solve(prob.checkBelowTooAssertion(), prob.bounds(6, 6));
    check(prob.getClass().getSimpleName(), sol, SATISFIABLE, 90, 1750, 3414);
}
Also used : CeilingsAndFloors(examples.alloy.CeilingsAndFloors) Solution(kodkod.engine.Solution)

Example 42 with Solution

use of kodkod.engine.Solution in project org.alloytools.alloy by AlloyTools.

the class ExamplesTest method testAWD_A241.

/**
 * Runs AbstractWorldDefinitions.checkA241 for 5.
 */
public void testAWD_A241() {
    final AbstractWorldDefinitions prob = new AbstractWorldDefinitions();
    final Solution sol = solve(prob.checkA241(), prob.bounds(5));
    check(prob.getClass().getSimpleName(), sol, UNSATISFIABLE, 407, 6968, 15413);
}
Also used : AbstractWorldDefinitions(examples.alloy.AbstractWorldDefinitions) Solution(kodkod.engine.Solution)

Example 43 with Solution

use of kodkod.engine.Solution in project org.alloytools.alloy by AlloyTools.

the class ExamplesTest method testCOM008.

/**
 * Runs COM008.checkGoalToBeProved for 5.
 */
public void testCOM008() {
    final COM008 prob = new COM008();
    final Solution sol = solve(prob.checkGoalToBeProved(), prob.bounds(5));
    check(prob.getClass().getSimpleName(), sol, UNSATISFIABLE, 407, 6968, 15413);
}
Also used : COM008(examples.tptp.COM008) Solution(kodkod.engine.Solution)

Example 44 with Solution

use of kodkod.engine.Solution in project org.alloytools.alloy by AlloyTools.

the class ExamplesTest method testAWD_AbOp_total.

/**
 * Runs AbstractWorldDefinitions.checkAbOp_total for 5.
 */
public void testAWD_AbOp_total() {
    final AbstractWorldDefinitions prob = new AbstractWorldDefinitions();
    final Solution sol = solve(prob.checkAbOp_total(), prob.bounds(5));
    check(prob.getClass().getSimpleName(), sol, TRIVIALLY_UNSATISFIABLE, 0, 0, 0);
}
Also used : AbstractWorldDefinitions(examples.alloy.AbstractWorldDefinitions) Solution(kodkod.engine.Solution)

Example 45 with Solution

use of kodkod.engine.Solution 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);
}
Also used : Solution(kodkod.engine.Solution) Dijkstra(examples.alloy.Dijkstra)

Aggregations

Solution (kodkod.engine.Solution)153 Formula (kodkod.ast.Formula)101 Bounds (kodkod.instance.Bounds)75 Solver (kodkod.engine.Solver)72 Universe (kodkod.instance.Universe)32 Relation (kodkod.ast.Relation)30 TupleFactory (kodkod.instance.TupleFactory)30 TupleSet (kodkod.instance.TupleSet)25 Variable (kodkod.ast.Variable)24 IntExpression (kodkod.ast.IntExpression)19 Expression (kodkod.ast.Expression)17 Test (org.junit.Test)16 QuantifiedFormula (kodkod.ast.QuantifiedFormula)15 Decls (kodkod.ast.Decls)11 Evaluator (kodkod.engine.Evaluator)10 HigherOrderDeclException (kodkod.engine.fol2sat.HigherOrderDeclException)7 UnboundLeafException (kodkod.engine.fol2sat.UnboundLeafException)7 ConsoleReporter (kodkod.engine.config.ConsoleReporter)6 Instance (kodkod.instance.Instance)6 ArrayList (java.util.ArrayList)5