use of com.microsoft.z3.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testSubset.
@Test
public void testSubset() {
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 testSetExtensionFormulaWithSingleVarModel.
@Test
public void testSetExtensionFormulaWithSingleVarModel() {
String formula = "{1,2} = {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.mkIntConst("x");
assertEquals(Status.SATISFIABLE, check);
assertEquals(z3Context.mkInt(1), z3Solver.getModel().eval(x, true));
}
use of com.microsoft.z3.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testIntersection.
@Test
public void testIntersection() {
String formula = "{1,2} /\\ {2,3} = {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 testUnion2.
@Test
public void testUnion2() {
String formula = "{1,2} \\/ {2,3} = {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 testDifference2.
@Test
public void testDifference2() {
String formula = "{1,2}\\{3} = {1}";
BoolExpr constraint = translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.UNSATISFIABLE, check);
}
Aggregations