use of com.microsoft.z3.BoolExpr in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testCartesianProduct.
@Test
public void testCartesianProduct() {
String formula = "{1}*{2}={(1,2)}";
// getting the translated z3 representation of the formula
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.SATISFIABLE, check);
}
use of com.microsoft.z3.BoolExpr in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testFailAdditionFormula.
@Test
public void testFailAdditionFormula() {
String formula = "x : 2 .. 3 & x > 3";
// getting the translated z3 representation of the formula
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.UNSATISFIABLE, check);
}
use of com.microsoft.z3.BoolExpr in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testnoSubset2.
@Test
public void testnoSubset2() {
String formula = "{1} /<: {2,3}";
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.SATISFIABLE, check);
}
use of com.microsoft.z3.BoolExpr in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testStrictSubset2.
@Test
public void testStrictSubset2() {
String formula = "{1} <<: {1}";
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.UNSATISFIABLE, check);
}
use of com.microsoft.z3.BoolExpr in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testBelonging3.
@Test
public void testBelonging3() {
String formula = "1 : {2,3}";
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.UNSATISFIABLE, check);
}
Aggregations