]> gerrit.simantics Code Review - simantics/platform.git/blob
7b2f2a19e840e6f8dbde246e8631f99925ae3353
[simantics/platform.git] /
1 package org.simantics.scl.compiler.elaboration.relations;
2
3 import org.simantics.scl.compiler.elaboration.expressions.Expression;
4 import org.simantics.scl.compiler.elaboration.expressions.Variable;
5 import org.simantics.scl.compiler.elaboration.query.compilation.EnforcingContext;
6 import org.simantics.scl.compiler.elaboration.query.compilation.QueryCompilationContext;
7 import org.simantics.scl.compiler.types.TVar;
8 import org.simantics.scl.compiler.types.Type;
9
10 public interface SCLRelation {
11     
12     public static final int F = 0;
13     public static final int B = 1;
14     
15     public static final int FF = 0;
16     public static final int BF = 1;
17     public static final int FB = 2;
18     public static final int BB = 3;
19     
20     public static final int FFF = 0;
21     public static final int BFF = 1;
22     public static final int FBF = 2;
23     public static final int BBF = 3;
24     public static final int FFB = 4;
25     public static final int BFB = 5;
26     public static final int FBB = 6;
27     public static final int BBB = 7;
28     
29     TVar[] getTypeVariables();
30     Type[] getParameterTypes();
31     int getPhase();
32     
33     double getSelectivity(int boundVariables);
34     int getRequiredVariablesMask();
35     void generate(long location,
36             QueryCompilationContext context,
37             Type[] typeParameters,
38             Variable[] parameters, int boundVariables);
39     Expression generateEnforce(long location, EnforcingContext context,
40             Type[] typeParameters,
41             Variable[] parameters);
42
43 }