1 package org.simantics.scl.compiler.compilation;
3 import gnu.trove.map.hash.TObjectIntHashMap;
4 import gnu.trove.set.hash.THashSet;
5 import gnu.trove.set.hash.TIntHashSet;
7 import java.util.ArrayList;
8 import java.util.Collection;
10 import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
11 import org.simantics.scl.compiler.elaboration.expressions.Variable;
12 import org.simantics.scl.compiler.internal.elaboration.constraints.Constraint;
13 import org.simantics.scl.compiler.types.TPred;
14 import org.simantics.scl.compiler.types.TVar;
16 public interface TypeInferableDefinition {
18 Collection<Object> getDefinedObjects();
19 void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs);
21 void initializeTypeChecking(TypingContext context);
22 void checkType(TypingContext context);
23 void solveConstraints();
24 void collectFreeTypeVariables(THashSet<TVar> varSet);
25 ArrayList<Variable> getFreeEvidence();
26 void injectEvidence(TVar[] vars, TPred[] constraints);
27 ArrayList<Constraint> getUnsolvedConstraints();