import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
import org.simantics.scl.compiler.elaboration.expressions.Expression;
import org.simantics.scl.compiler.elaboration.expressions.Variable;
-import org.simantics.scl.compiler.elaboration.expressions.VariableProcedure;
import org.simantics.scl.compiler.elaboration.expressions.printing.ExpressionToStringVisitor;
import org.simantics.scl.compiler.errors.Locations;
import org.simantics.scl.compiler.internal.parsing.Symbol;
-import org.simantics.scl.compiler.types.Type;
import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
import gnu.trove.set.hash.TIntHashSet;
public class CHRQuery extends Symbol {
literal.resolve(context);
}
- public void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs) {
- for(CHRLiteral literal : literals)
- literal.collectRefs(allRefs, refs);
- }
-
public void checkType(TypingContext context) {
for(CHRLiteral literal : literals)
literal.checkType(context);
for(CHRLiteral literal : literals)
literal.collectVars(allVars, vars);
}
-
- public void forVariables(VariableProcedure procedure) {
- for(CHRLiteral literal : literals)
- literal.forVariables(procedure);
- }
-
- public void collectFreeVariables(THashSet<Variable> vars) {
- for(CHRLiteral literal : literals)
- literal.collectFreeVariables(vars);
- }
-
+
public void setLocationDeep(long loc) {
if(location == Locations.NO_LOCATION) {
this.location = loc;
visitor.visit(this);
return b.toString();
}
-
- public void collectQueryEffects(THashSet<Type> effects) {
- for(CHRLiteral literal : literals)
- literal.collectQueryEffects(effects);
- }
-
- public void collectEnforceEffects(THashSet<Type> effects) {
- for(CHRLiteral literal : literals)
- literal.collectEnforceEffects(effects);
- }
}