TIntArrayList chrConstraintFrames = new TIntArrayList();
ArrayList<CHRConstraintEntry> chrConstraintEntries = new ArrayList<CHRConstraintEntry>();
+ private THashSet<Expression> expandedFromWildcard;
+
public CHRRuleset currentRuleset;
public ModuleDebugInfo moduleDebugInfo;
variable = new Variable(name);
variables.put(name, variable);
existentialFrame.variables.add(name);
- return new EVariable(variable);
+ return new EVariable(location, variable);
}
case '_': {
if(name.length()==1) {
return Environments.getRuleset(environment, name);
}
+ /**
+ * Tells that new existential variables are no longer allowed in this context.
+ */
public void disallowNewExistentials() {
getCurrentExistentialFrame().disallowNewExistentials = true;
}
+
+ /**
+ * Marks that the expression is a result of expanding .. wildcard pattern in records.
+ */
+ public void addExpandedFromWildcard(Expression expression) {
+ if(expandedFromWildcard == null)
+ expandedFromWildcard = new THashSet<>();
+ expandedFromWildcard.add(expression);
+ }
+
+ /**
+ * Asks if the expression is a result of expanding .. wildcard pattern in records.
+ */
+ public boolean isExpandedFromWildcard(Expression expression) {
+ if(expandedFromWildcard == null)
+ return false;
+ else
+ return expandedFromWildcard.contains(expression);
+ }
}