1 package org.simantics.scl.compiler.elaboration.relations;
3 import org.simantics.scl.compiler.elaboration.chr.plan.PlanContext;
4 import org.simantics.scl.compiler.elaboration.expressions.Expression;
5 import org.simantics.scl.compiler.elaboration.expressions.Variable;
6 import org.simantics.scl.compiler.elaboration.query.compilation.EnforcingContext;
7 import org.simantics.scl.compiler.elaboration.query.compilation.QueryCompilationContext;
8 import org.simantics.scl.compiler.internal.codegen.writer.CodeWriter;
9 import org.simantics.scl.compiler.types.TVar;
10 import org.simantics.scl.compiler.types.Type;
12 public interface SCLRelation {
14 public static final int F = 0;
15 public static final int B = 1;
17 public static final int FF = 0;
18 public static final int BF = 1;
19 public static final int FB = 2;
20 public static final int BB = 3;
22 public static final int FFF = 0;
23 public static final int BFF = 1;
24 public static final int FBF = 2;
25 public static final int BBF = 3;
26 public static final int FFB = 4;
27 public static final int BFB = 5;
28 public static final int FBB = 6;
29 public static final int BBB = 7;
31 TVar[] getTypeVariables();
32 Type[] getParameterTypes();
35 double getSelectivity(int boundVariables);
36 int getRequiredVariablesMask();
37 void generate(long location,
38 QueryCompilationContext context,
39 Type[] typeParameters,
40 Variable[] parameters, int boundVariables);
41 Expression generateEnforce(long location, EnforcingContext context,
42 Type[] typeParameters,
43 Variable[] parameters);
51 Expression[] expressions);
56 Expression[] parameters);