use of com.microsoft.z3.Expr in project bmoth by hhu-stups.
the class LiftsTest method testTargetAndCurrentCorrespond.
@Test
public void testTargetAndCurrentCorrespond() {
MachineNode simpleMachineWithViolation = parseMachineFromFile(dir + "TargetAndCurrentCorrespond.mch");
ModelCheckingResult result = ExplicitStateModelChecker.check(simpleMachineWithViolation);
assertEquals(false, result.isCorrect());
Expr targetFloor = result.getLastState().getValues().get("target_floor");
Expr currentFloor = result.getLastState().getValues().get("current_floor");
assertNotEquals(targetFloor.toString(), currentFloor.toString());
}
use of com.microsoft.z3.Expr 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());
}
Aggregations