You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewIllegalArgumentException("something went wrong with the cycle checker");
}
for (EObjectobj : cycleObjects) {
if (obj.equals(constStat)) {
error(constStat.getExpr(), "Cyclic reference to variable '" + constStat.getName() + "'");
}
}
for (Expre : EcoreUtil2.getAllContentsOfType(constStat.getExpr(), Expr.class)) {
if (!exprIsConstant(e)) {
error(e, "Non-constant expression in constant declaration");
return;
}
}
}
The ExprCycleVisitor just goes down the AST, but it does not search for recursive loops. For example, the following code should produce an error, but it does not:
package TestPackage
public
system sys
annex agree {**
eq test1 : int = test2 + 10;
eq test2 : int = test1 - 10;
**};
end sys;
end TestPackage;
The text was updated successfully, but these errors were encountered:
Currently a cyclic expression is checked by performing the following (lines 1856-1865 specifically):
AGREE/com.rockwellcollins.atc.agree/src/com/rockwellcollins/atc/agree/validation/AgreeValidator.java
Lines 1846 to 1873 in 8d101f3
The
ExprCycleVisitor
just goes down the AST, but it does not search for recursive loops. For example, the following code should produce an error, but it does not:The text was updated successfully, but these errors were encountered: