|
32 | 32 | import static hu.bme.mit.theta.core.type.abstracttype.AbstractExprs.Neq;
|
33 | 33 | import static hu.bme.mit.theta.core.type.abstracttype.AbstractExprs.Sub;
|
34 | 34 | import static hu.bme.mit.theta.core.type.anytype.Exprs.Prime;
|
35 |
| -import static hu.bme.mit.theta.core.type.booltype.BoolExprs.And; |
36 |
| -import static hu.bme.mit.theta.core.type.booltype.BoolExprs.Bool; |
37 |
| -import static hu.bme.mit.theta.core.type.booltype.BoolExprs.Exists; |
38 |
| -import static hu.bme.mit.theta.core.type.booltype.BoolExprs.False; |
39 |
| -import static hu.bme.mit.theta.core.type.booltype.BoolExprs.Forall; |
40 |
| -import static hu.bme.mit.theta.core.type.booltype.BoolExprs.Iff; |
41 |
| -import static hu.bme.mit.theta.core.type.booltype.BoolExprs.Imply; |
42 |
| -import static hu.bme.mit.theta.core.type.booltype.BoolExprs.Not; |
43 |
| -import static hu.bme.mit.theta.core.type.booltype.BoolExprs.Or; |
44 |
| -import static hu.bme.mit.theta.core.type.booltype.BoolExprs.True; |
| 35 | +import static hu.bme.mit.theta.core.type.booltype.BoolExprs.*; |
45 | 36 | import static hu.bme.mit.theta.core.type.functype.FuncExprs.Func;
|
46 | 37 | import static hu.bme.mit.theta.core.type.inttype.IntExprs.Int;
|
47 | 38 | import static hu.bme.mit.theta.core.type.inttype.IntExprs.Mod;
|
|
107 | 98 | import hu.bme.mit.theta.sts.dsl.gen.StsDslParser.RatLitExprContext;
|
108 | 99 | import hu.bme.mit.theta.sts.dsl.gen.StsDslParser.RelationExprContext;
|
109 | 100 | import hu.bme.mit.theta.sts.dsl.gen.StsDslParser.TrueExprContext;
|
| 101 | +import hu.bme.mit.theta.sts.dsl.gen.StsDslParser.XorExprContext; |
110 | 102 |
|
111 | 103 | final class StsExprCreatorVisitor extends StsDslBaseVisitor<Expr<?>> {
|
112 | 104 |
|
@@ -230,6 +222,17 @@ public Expr<?> visitOrExpr(final OrExprContext ctx) {
|
230 | 222 | }
|
231 | 223 | }
|
232 | 224 |
|
| 225 | + @Override |
| 226 | + public Expr<?> visitXorExpr(final XorExprContext ctx) { |
| 227 | + if (ctx.rightOp != null) { |
| 228 | + final Expr<BoolType> leftOp = TypeUtils.cast(ctx.leftOp.accept(this), Bool()); |
| 229 | + final Expr<BoolType> rightOp = TypeUtils.cast(ctx.rightOp.accept(this), Bool()); |
| 230 | + return Xor(leftOp, rightOp); |
| 231 | + } else { |
| 232 | + return visitChildren(ctx); |
| 233 | + } |
| 234 | + } |
| 235 | + |
233 | 236 | @Override
|
234 | 237 | public Expr<?> visitAndExpr(final AndExprContext ctx) {
|
235 | 238 | if (ctx.ops.size() > 1) {
|
|
0 commit comments