package org.simantics.scl.compiler.elaboration.relations;
+import org.simantics.scl.compiler.elaboration.chr.plan.PlanContext;
import org.simantics.scl.compiler.elaboration.expressions.Expression;
import org.simantics.scl.compiler.elaboration.expressions.Variable;
import org.simantics.scl.compiler.elaboration.query.compilation.EnforcingContext;
import org.simantics.scl.compiler.elaboration.query.compilation.QueryCompilationContext;
+import org.simantics.scl.compiler.internal.codegen.writer.CodeWriter;
+import org.simantics.scl.compiler.types.TPred;
import org.simantics.scl.compiler.types.TVar;
import org.simantics.scl.compiler.types.Type;
TVar[] getTypeVariables();
Type[] getParameterTypes();
+ default TPred[] getTypeConstraints() {
+ return TPred.EMPTY_ARRAY;
+ }
int getPhase();
-
+
double getSelectivity(int boundVariables);
int getRequiredVariablesMask();
void generate(long location,
Expression generateEnforce(long location, EnforcingContext context,
Type[] typeParameters,
Variable[] parameters);
-
+ default String[] getFieldNames() {
+ return null;
+ }
+
+ void generateIterate(
+ PlanContext context,
+ CodeWriter w,
+ long location,
+ int boundMask,
+ Variable[] variables,
+ Expression[] expressions,
+ Expression[] typeConstraintEvidenceParameters);
+ void generateEnforce(
+ PlanContext context,
+ CodeWriter w,
+ long location,
+ Expression[] parameters,
+ Expression[] typeConstraintEvidenceParameters);
}