Skip to content
Snippets Groups Projects
Commit ba887390 authored by Michael Leuschel's avatar Michael Leuschel
Browse files

use ProB’s IF-THEN-ELSE rather than lambda construction

parent 8031aff5
Branches
Tags
No related merge requests found
......@@ -685,15 +685,15 @@ public class ASTPrettyPrinter extends ExtendedDFAdapter {
@Override
public void caseAIfThenElseExpression(AIfThenElseExpression node) {
sb.append("(%t_.( t_ = 0 & ");
sb.append("IF "); // (%t_.( t_ = 0 & ");
node.getCondition().apply(this);
sb.append(" | ");
sb.append(" THEN "); // | ");
node.getThen().apply(this);
sb.append(")\\/%t_.( t_ = 0 & not(");
node.getCondition().apply(this);
sb.append(") | ");
sb.append(" ELSE "); // )\\/%t_.( t_ = 0 & not(");
//node.getCondition().apply(this);
//sb.append(") | ");
node.getElse().apply(this);
sb.append(" ))(0)");
sb.append(" END"); // "))(0)");
}
@Override
......
......@@ -34,7 +34,7 @@ public class SimpleExpressionTest {
@Test
public void testIfThenElse() throws Exception {
compareExpr(
"(%t_.( t_ = 0 & 1 = 1 | 1 )\\/%t_.( t_ = 0 & not(1 = 1) | 2 ))(0)",
"IF 1 = 1 THEN 1 ELSE 2 END", //"(%t_.( t_ = 0 & 1 = 1 | 1 )\\/%t_.( t_ = 0 & not(1 = 1) | 2 ))(0)",
"IF 1 = 1 THEN 1 ELSE 2");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment