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.TPred;
8 import org.simantics.scl.compiler.types.TVar;
9 import org.simantics.scl.compiler.types.Type;
11 public interface SCLRelation {
13 public static final int F = 0;
14 public static final int B = 1;
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;
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;
30 TVar[] getTypeVariables();
31 Type[] getParameterTypes();
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);