Search in sources :

Example 1 with SetBuilder

use of org.btrplace.safeplace.spec.term.SetBuilder in project scheduler by btrplace.

the class MyCstrSpecVisitor method visitSetInComprehension.

@Override
public SetBuilder<?> visitSetInComprehension(@NotNull CstrSpecParser.SetInComprehensionContext ctx) {
    // Get the binder
    List<UserVar<?>> v = visitTypedef(ctx.typedef());
    Proposition p = Proposition.True;
    if (ctx.COMMA() != null) {
        p = (Proposition) visit(ctx.formula());
    }
    Term<?> t = (Term<?>) visit(ctx.term());
    return new SetBuilder<>(t, v.get(0), p);
}
Also used : Term(org.btrplace.safeplace.spec.term.Term) ProtectedTerm(org.btrplace.safeplace.spec.term.ProtectedTerm) Proposition(org.btrplace.safeplace.spec.prop.Proposition) ProtectedProposition(org.btrplace.safeplace.spec.prop.ProtectedProposition) SetBuilder(org.btrplace.safeplace.spec.term.SetBuilder) UserVar(org.btrplace.safeplace.spec.term.UserVar)

Aggregations

Proposition (org.btrplace.safeplace.spec.prop.Proposition)1 ProtectedProposition (org.btrplace.safeplace.spec.prop.ProtectedProposition)1 ProtectedTerm (org.btrplace.safeplace.spec.term.ProtectedTerm)1 SetBuilder (org.btrplace.safeplace.spec.term.SetBuilder)1 Term (org.btrplace.safeplace.spec.term.Term)1 UserVar (org.btrplace.safeplace.spec.term.UserVar)1