1 package org.simantics.scl.compiler.elaboration.relations;
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;
10 public interface SCLRelation {
12 public static final int F = 0;
13 public static final int B = 1;
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;
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;
29 TVar[] getTypeVariables();
30 Type[] getParameterTypes();
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);