use of org.btrplace.safeplace.spec.prop.Or in project scheduler by btrplace.
the class MyCstrSpecVisitor method visitFormulaOp.
@Override
public Proposition visitFormulaOp(@NotNull CstrSpecParser.FormulaOpContext ctx) {
Proposition p1 = (Proposition) visit(ctx.f1);
Proposition p2 = (Proposition) visit(ctx.f2);
switch(ctx.op.getType()) {
case CstrSpecParser.AND:
return new And(p1, p2);
case CstrSpecParser.OR:
return new Or(p1, p2);
case CstrSpecParser.IMPLIES:
return new Implies(p1, p2);
case CstrSpecParser.IFF:
return new Iff(p1, p2);
default:
throw SpecException.unsupportedOperation(filename, BoolType.getInstance(), ctx.op, BoolType.getInstance());
}
}
Aggregations