1 package org.simantics.scl.compiler.elaboration.query.compilation;
3 import org.simantics.scl.compiler.elaboration.contexts.TypingContext;
4 import org.simantics.scl.compiler.elaboration.expressions.EVariable;
5 import org.simantics.scl.compiler.errors.ErrorLog;
6 import org.simantics.scl.compiler.types.TPred;
8 public class EnforcingContext {
11 public EnforcingContext(TypingContext context) {
12 this.context = context;
15 public ErrorLog getErrorLog() {
16 return context.getErrorLog();
19 public TypingContext getTypingContext() {
23 public EVariable getEvidence(long location, TPred pred) {
24 EVariable evidence = new EVariable(location, null);
25 evidence.setType(pred);
26 context.addConstraintDemand(evidence);