use of com.microsoft.z3.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testNoProperSubset2.
@Test
public void testNoProperSubset2() {
String formula = "{1} /<<: {1,2}";
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.UNSATISFIABLE, check);
}
use of com.microsoft.z3.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testNotBelonging.
@Test
public void testNotBelonging() {
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.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testStrictSubset.
@Test
public void testStrictSubset() {
String formula = "{1} <<: {1,2}";
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.SATISFIABLE, check);
}
use of com.microsoft.z3.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testSetExtensionFormulaWithSetVarModel.
@Test
public void testSetExtensionFormulaWithSetVarModel() {
String formula = "{1,2} = x";
// getting the translated z3 representation of the formula
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
Expr x = z3Context.mkArrayConst("x", z3Context.mkIntSort(), z3Context.mkBoolSort());
assertEquals(Status.SATISFIABLE, check);
assertEquals("(store (store ((as const (Array Int Bool)) false) 1 true) 2 true)", z3Solver.getModel().eval(x, true).toString());
}
use of com.microsoft.z3.Status 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);
}
Aggregations