import gnu.trove.map.hash.THashMap;
import gnu.trove.map.hash.TObjectIntHashMap;
-import gnu.trove.set.hash.THashSet;
import gnu.trove.set.hash.TIntHashSet;
public class CHRRuleset extends Symbol {
rule.collectVars(allVars, vars);
}
- public void collectFreeVariables(THashSet<Variable> vars) {
- for(IncludeStatement include : includes)
- include.value.collectFreeVariables(vars);
- for(CHRRule rule : rules)
- rule.collectFreeVariables(vars);
- }
-
public void setLocationDeep(long loc) {
if(location == Locations.NO_LOCATION) {
this.location = loc;
return runtimeRulesetVariable;
}
- public void collectEffects(THashSet<Type> effects) {
- for(CHRRule rule : rules) {
- for(CHRLiteral literal : rule.head.literals)
- literal.collectQueryEffects(effects);
- for(CHRLiteral literal : rule.head.literals)
- literal.collectEnforceEffects(effects);
- }
- }
-
public void addRule(CHRRule rule) {
rules.add(rule);
rule.parentRuleset = this;