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