use of su.litvak.chromecast.api.v2.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testnoSubset.
@Test
public void testnoSubset() {
String formula = "{1} /<: {1}";
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.UNSATISFIABLE, check);
}
use of su.litvak.chromecast.api.v2.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testCartesianProductUnsat.
@Test
public void testCartesianProductUnsat() {
String formula = "{1}*{2}={(1,3)}";
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.UNSATISFIABLE, check);
}
use of su.litvak.chromecast.api.v2.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testSetMembership.
@Test
public void testSetMembership() {
String formula = "x : {3}";
// getting the translated z3 representation of the formula
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
Expr x = z3Context.mkIntConst("x");
assertEquals(Status.SATISFIABLE, check);
assertEquals("3", z3Solver.getModel().eval(x, true).toString());
}
use of su.litvak.chromecast.api.v2.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testNoProperSubset.
@Test
public void testNoProperSubset() {
String formula = "{1} /<<: {1}";
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.SATISFIABLE, check);
}
use of su.litvak.chromecast.api.v2.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testAdditionFormula.
@Test
public void testAdditionFormula() {
String formula = "x : 2 .. 3";
// getting the translated z3 representation of the formula
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.SATISFIABLE, check);
}
Aggregations