use of catdata.opl.OplExp.OplPushout in project fql by CategoricalData.
the class OplChase method chase.
static OplInst chase(OplInst I, List<OplQuery> EDs, int limit) {
OplInst ret = I;
for (int i = 0; i < limit; i++) {
boolean changed = false;
for (OplQuery ed : EDs) {
OplPushout ret2 = step(ret, ed);
if (ret2 != null) {
ret = (OplInst) ret2.pushout().first;
changed = true;
}
}
if (!changed) {
return ret;
}
}
throw new RuntimeException("Limit exceeded, last instance:\n\n" + ret);
}
Aggregations