import org.simantics.scl.compiler.top.ExpressionInterpretationContext;
import org.simantics.scl.compiler.types.exceptions.MatchException;
-import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
-import gnu.trove.set.hash.TIntHashSet;
-
public class ECHRRuleset extends Expression {
- CHRRuleset ruleset;
- Expression in;
+ public CHRRuleset ruleset;
+ public Expression in;
public ECHRRuleset(CHRRuleset ruleset, Expression in) {
this.ruleset = ruleset;
this.in = in;
}
-
- @Override
- public void collectVars(TObjectIntHashMap<Variable> allVars, TIntHashSet vars) {
- ruleset.collectVars(allVars, vars);
- in.collectVars(allVars, vars);
- }
@Override
protected void updateType() throws MatchException {
return in.toVal(context, w);
}
- @Override
- public void collectFreeVariables(THashSet<Variable> vars) {
- ruleset.collectFreeVariables(vars);
- in.collectFreeVariables(vars);
- }
-
@Override
public Expression resolve(TranslationContext context) {
if(context.currentRuleset != null) {