]> gerrit.simantics Code Review - simantics/platform.git/blob
34c6c1b85189fca05dff5536f094f4439370bf2c
[simantics/platform.git] /
1 package org.simantics.scl.compiler.compilation;
2
3 import gnu.trove.map.hash.TObjectIntHashMap;
4 import gnu.trove.set.hash.THashSet;
5 import gnu.trove.set.hash.TIntHashSet;
6
7 import java.util.ArrayList;
8 import java.util.Collection;
9
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;
15
16 public interface TypeInferableDefinition {
17     long getLocation();
18     Collection<Object> getDefinedObjects();
19     void collectRefs(TObjectIntHashMap<Object> allRefs, TIntHashSet refs);
20     
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();
28 }