import org.simantics.scl.compiler.types.Types;
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 EEnforce extends SimplifiableExpression {
- Query query;
+ public Query query;
public EEnforce(Query query) {
this.query = query;
return query;
}
- @Override
- public void collectVars(TObjectIntHashMap<Variable> allVars,
- TIntHashSet vars) {
- query.collectVars(allVars, vars);
- }
-
@Override
protected void updateType() throws MatchException {
setType(Types.tupleConstructor(0));
return query.generateEnforce(new EnforcingContext(context));
}
- @Override
- public void collectFreeVariables(THashSet<Variable> vars) {
- query.collectFreeVariables(vars);
- }
-
@Override
public Expression simplify(SimplificationContext context) {
/*query = query.simplify(context);