use of fi.thl.covid19.exposurenotification.diagnosiskey.v1.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 = FormulaToZ3Translator.translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.SATISFIABLE, check);
}
use of fi.thl.covid19.exposurenotification.diagnosiskey.v1.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testSubset.
@Test
public void testSubset() {
String formula = "{1} <: {1,2}";
BoolExpr constraint = FormulaToZ3Translator.translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.SATISFIABLE, check);
}
use of fi.thl.covid19.exposurenotification.diagnosiskey.v1.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testNotBelonging.
@Test
public void testNotBelonging() {
String formula = "1 /: {2,3}";
BoolExpr constraint = FormulaToZ3Translator.translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.SATISFIABLE, check);
}
use of fi.thl.covid19.exposurenotification.diagnosiskey.v1.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testStrictSubset.
@Test
public void testStrictSubset() {
String formula = "{1} <<: {1,2}";
BoolExpr constraint = FormulaToZ3Translator.translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.SATISFIABLE, check);
}
use of fi.thl.covid19.exposurenotification.diagnosiskey.v1.Status in project bmoth by hhu-stups.
the class SetFormulaEvaluationTest method testBelonging.
@Test
public void testBelonging() {
String formula = "1 : {1}";
BoolExpr constraint = FormulaToZ3Translator.translatePredicate(formula, z3Context);
z3Solver.add(constraint);
Status check = z3Solver.check();
assertEquals(Status.SATISFIABLE, check);
}
Aggregations