--- /dev/null
+package org.simantics.scl.compiler.elaboration.query.compilation;
+
+import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
+import org.simantics.scl.compiler.elaboration.expressions.EVariable;
+import org.simantics.scl.compiler.errors.ErrorLog;
+import org.simantics.scl.compiler.types.TPred;
+
+public class EnforcingContext {
+ TypingContext context;
+
+ public EnforcingContext(TypingContext context) {
+ this.context = context;
+ }
+
+ public ErrorLog getErrorLog() {
+ return context.getErrorLog();
+ }
+
+ public TypingContext getTypingContext() {
+ return context;
+ }
+
+ public EVariable getEvidence(long location, TPred pred) {
+ EVariable evidence = new EVariable(location, null);
+ evidence.setType(pred);
+ context.addConstraintDemand(evidence);
+ return evidence;
+ }
+}