Commit a232b62f authored by André Pacak's avatar André Pacak
Browse files

automated test to check whether models are well or illtyped without dynamic changes to tests

parent c46cc481
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="7bekqxggys1b6q17xlmiqtao5otvah" />
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="axr70m8n5tjsee71efzqbpgqjdlg20u" />
......@@ -12,6 +12,7 @@ import org.eclipse.viatra.query.runtime.rete.matcher.DRedReteBackendFactory;
import java.util.Set;
import org.inca.core.util.plugin.CodeGenerationHelper;
import jetbrains.mps.internal.collections.runtime.SetSequence;
import jetbrains.mps.internal.collections.runtime.IWhereFilter;
import java.util.Map;
import org.inca.data.runtime.plugin.SequenceMatcher;
import org.inca.data.runtime.plugin.WildCardMatcher;
......@@ -20,30 +21,141 @@ import org.inca.data.runtime.plugin.IDataMatcher;
import org.inca.data.runtime.plugin.CompositeMatcher;
public class AnalysisResultAccess {
public static String expectedType(final SNode term, final SModel scope) {
final ViatraQueryMatcher<IPatternMatch> evaluator = EnginePool.getMatcher(Typing_InferQuerySpecification.instance(), AbstractScope.from(scope), true, DRedReteBackendFactory.INSTANCE);
final IPatternMatch tup = evaluator.newMatch(term, null);
final Set<LType.LTypeElement> values = CodeGenerationHelper.getAllValues(evaluator, "out_1", tup);
return typeToString(SetSequence.fromSet(values).first());
}
public static boolean isChecked(final SNode term, final SModel scope) {
final ViatraQueryMatcher<IPatternMatch> evaluator = EnginePool.getMatcher(Typing_InferQuerySpecification.instance(), AbstractScope.from(scope), true, DRedReteBackendFactory.INSTANCE);
final IPatternMatch tup = evaluator.newMatch(term, null);
final Set<LType.LTypeElement> values = CodeGenerationHelper.getAllValues(evaluator, "out_1", tup);
System.out.println(values);
// when is something illtyped and when is it welltyped?
// Bot should not appear in values
// Any can appear as long as there is another wellformed type (not containing any)
boolean isBotAvailable = SetSequence.fromSet(values).any(new IWhereFilter<LType.LTypeElement>() {
public boolean accept(LType.LTypeElement it) {
{
final Object[] values_a0a0a0i0d = {it};
// declare the local variables for the case matchers
Map<String, Object> case_0_a0a0a0a8a3;
Map<String, Object> case_1_b0a0a0a8a3;
if ((case_0_a0a0a0a8a3 = new SequenceMatcher(matcher_a0a0a0a0i0d).match(values_a0a0a0i0d)) != null) {
return true;
} else if ((case_1_b0a0a0a8a3 = new SequenceMatcher(WildCardMatcher.INSTANCE).match(values_a0a0a0i0d)) != null) {
return false;
} else {
throw new PatternMatcherException(values_a0a0a0i0d);
}
}
}
});
if (isBotAvailable) {
return false;
}
final LType.LTypeElement nonBotAnyValue = SetSequence.fromSet(values).findFirst(new IWhereFilter<LType.LTypeElement>() {
public boolean accept(LType.LTypeElement it) {
{
final Object[] values_a0a0a0m0d = {it};
// declare the local variables for the case matchers
Map<String, Object> case_0_a0a0a0a21a3;
Map<String, Object> case_1_b0a0a0a21a3;
Map<String, Object> case_2_c0a0a0a21a3;
if ((case_0_a0a0a0a21a3 = new SequenceMatcher(matcher_a0a0a0a0m0d).match(values_a0a0a0m0d)) != null) {
return false;
} else if ((case_1_b0a0a0a21a3 = new SequenceMatcher(matcher_a1a0a0a0m0d).match(values_a0a0a0m0d)) != null) {
return false;
} else if ((case_2_c0a0a0a21a3 = new SequenceMatcher(WildCardMatcher.INSTANCE).match(values_a0a0a0m0d)) != null) {
return true;
} else {
throw new PatternMatcherException(values_a0a0a0m0d);
}
}
}
});
if (nonBotAnyValue != null) {
return isWellFormedType(nonBotAnyValue);
} else {
return false;
}
}
private static boolean isWellFormedType(LType.LTypeElement type) {
{
final Object[] values_e0a = {SetSequence.fromSet(values).first()};
final Object[] values_a0f = {type};
// declare the local variables for the case matchers
Map<String, Object> case_0_a4a0;
Map<String, Object> case_1_b4a0;
Map<String, Object> case_2_c4a0;
Map<String, Object> case_0_a0a5;
Map<String, Object> case_1_b0a5;
Map<String, Object> case_2_c0a5;
Map<String, Object> case_3_d0a5;
Map<String, Object> case_4_e0a5;
if ((case_0_a4a0 = new SequenceMatcher(matcher_a0e0a).match(values_e0a)) != null) {
if ((case_0_a0a5 = new SequenceMatcher(matcher_a0a0f).match(values_a0f)) != null) {
return true;
} else if ((case_1_b4a0 = new SequenceMatcher(matcher_a1e0a).match(values_e0a)) != null) {
} else if ((case_1_b0a5 = new SequenceMatcher(matcher_a1a0f).match(values_a0f)) != null) {
return isWellFormedType(LType.instance().funParamType(type)) && isWellFormedType(LType.instance().funResultType(type));
} else if ((case_2_c0a5 = new SequenceMatcher(matcher_a2a0f).match(values_a0f)) != null) {
return isWellFormedType(LType.instance().sumLeftType(type)) && isWellFormedType(LType.instance().sumRightType(type));
} else if ((case_3_d0a5 = new SequenceMatcher(matcher_a3a0f).match(values_a0f)) != null) {
return false;
} else if ((case_2_c4a0 = new SequenceMatcher(WildCardMatcher.INSTANCE).match(values_e0a)) != null) {
return true;
} else if ((case_4_e0a5 = new SequenceMatcher(matcher_a4a0f).match(values_a0f)) != null) {
return false;
} else {
throw new PatternMatcherException(values_a0f);
}
}
}
private static String typeToString(LType.LTypeElement type) {
{
final Object[] values_a0h = {type};
// declare the local variables for the case matchers
Map<String, Object> case_0_a0a7;
Map<String, Object> case_1_b0a7;
Map<String, Object> case_2_c0a7;
Map<String, Object> case_3_d0a7;
Map<String, Object> case_4_e0a7;
if ((case_0_a0a7 = new SequenceMatcher(matcher_a0a0h).match(values_a0h)) != null) {
return "Any";
} else if ((case_1_b0a7 = new SequenceMatcher(matcher_a1a0h).match(values_a0h)) != null) {
return "Bot";
} else if ((case_2_c0a7 = new SequenceMatcher(matcher_a2a0h).match(values_a0h)) != null) {
return "Nat";
} else if ((case_3_d0a7 = new SequenceMatcher(matcher_a3a0h).match(values_a0h)) != null) {
return typeToString(LType.instance().funParamType(type)) + "->" + typeToString(LType.instance().funResultType(type));
} else if ((case_4_e0a7 = new SequenceMatcher(matcher_a4a0h).match(values_a0h)) != null) {
return typeToString(LType.instance().sumLeftType(type)) + "+" + typeToString(LType.instance().sumRightType(type));
} else {
throw new PatternMatcherException(values_e0a);
throw new PatternMatcherException(values_a0h);
}
}
}
private static final IDataMatcher matcher_a0e0a = new CompositeMatcher(LType.Any.class);
private static final IDataMatcher matcher_a1e0a = new CompositeMatcher(LType.Bot.class);
private static final IDataMatcher matcher_a0a0a0a0i0d = new CompositeMatcher(LType.Bot.class);
private static final IDataMatcher matcher_a0a0a0a0m0d = new CompositeMatcher(LType.Bot.class);
private static final IDataMatcher matcher_a1a0a0a0m0d = new CompositeMatcher(LType.Any.class);
private static final IDataMatcher matcher_a0a0f = new CompositeMatcher(LType.Nat.class);
private static final IDataMatcher matcher_a1a0f = new CompositeMatcher(LType.Fun.class);
private static final IDataMatcher matcher_a2a0f = new CompositeMatcher(LType.Sum.class);
private static final IDataMatcher matcher_a3a0f = new CompositeMatcher(LType.Any.class);
private static final IDataMatcher matcher_a4a0f = new CompositeMatcher(LType.Bot.class);
private static final IDataMatcher matcher_a0a0h = new CompositeMatcher(LType.Any.class);
private static final IDataMatcher matcher_a1a0h = new CompositeMatcher(LType.Bot.class);
private static final IDataMatcher matcher_a2a0h = new CompositeMatcher(LType.Nat.class);
private static final IDataMatcher matcher_a3a0h = new CompositeMatcher(LType.Fun.class);
private static final IDataMatcher matcher_a4a0h = new CompositeMatcher(LType.Sum.class);
}
......@@ -29,36 +29,36 @@ public final class QuerySpecificationHints extends MPSQuerySpecificationHints {
this.concepts.add(MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL, "jetbrains.mps.lang.core.structure.BaseConcept"));
this.dataTypes = new HashSet<SDataType>();
this.dataTypes.add(UniqueDataType.from("jetbrains.mps.lang.core.structure.string"));
this.dataTypes.add(UniqueDataType.from("jetbrains.mps.lang.core.structure.integer"));
this.dataTypes.add(UniqueDataType.from("jetbrains.mps.lang.core.structure.string"));
this.conceptFeatures = new HashSet<SConceptFeature>();
this.conceptFeatures.add(MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9390L, 0x1a4a252762eb9399L, "ty2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9312L, 0x1a4a252762eb9317L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9302L, 0x1a4a252762eb930bL, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb936bL, 0x1a4a252762eb9374L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9359L, 0x1a4a252762eb935eL, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9312L, 0x1a4a252762eb931bL, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d7L, 0x1a4a252762eb92dcL, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9322L, 0x1a4a252762eb9336L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93dcL, 0x1a4a252762eb93e1L, "ty1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb936bL, 0x1a4a252762eb9378L, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "c1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb933aL, 0x1a4a252762eb9352L, "body"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93f1L, 0x1a4a252762eb93f6L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93dcL, 0x1a4a252762eb93e5L, "ty2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93faL, 0x1a4a252762eb93ffL, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "c2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8b6L, "c1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d7L, 0x1a4a252762eb92dcL, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb933aL, 0x1a4a252762eb9352L, "body"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9302L, 0x1a4a252762eb930bL, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9390L, 0x1a4a252762eb9395L, "ty1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb937fL, 0x1a4a252762eb9384L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb936bL, 0x1a4a252762eb9374L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb937fL, 0x1a4a252762eb93d5L, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9390L, 0x1a4a252762eb9395L, "ty1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb933aL, 0x1a4a252762eb934eL, "bound"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, 0x1a4a252762eba8afL, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba8bdL, "c2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93dcL, 0x1a4a252762eb93e5L, "ty2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9302L, 0x1a4a252762eb9307L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba873L, 0x1a4a252762eba878L, "matchee"));
this.conceptFeatures.add(MetaAdapterFactory.getReferenceLink(0xb802a05692a24fbcL, 0x902ef8e5004c331fL, 0x7980b687ac7456feL, 0x7980b687ac7456ffL, "parent"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9362L, 0x1a4a252762eb9367L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9359L, 0x1a4a252762eb935eL, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eba8aaL, 0x1a4a252762eba8afL, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getReferenceLink(0xb802a05692a24fbcL, 0x902ef8e5004c331fL, 0x7980b687ac7456feL, 0x7980b687ac7456ffL, "parent"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9312L, 0x1a4a252762eb9317L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9322L, 0x1a4a252762eb9336L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93dcL, 0x1a4a252762eb93e1L, "ty1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9390L, 0x1a4a252762eb9399L, "ty2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb933aL, 0x1a4a252762eb934eL, "bound"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb936bL, 0x1a4a252762eb9378L, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb9312L, 0x1a4a252762eb931bL, "t2"));
this.languages = new HashSet<SLanguage>();
this.languages.add(MetaAdapterFactory.getLanguage(0xb802a05692a24fbcL, 0x902ef8e5004c331fL, "ceab5195-25ea-4f22-9b92-103b95ca8c0c"));
......
......@@ -86,10 +86,10 @@ public final class Typing_AsLTypeQuerySpecification extends MPSQuerySpecificatio
exportedParameters.add(new ExportedParameter(body, var_out_1, p_out_1));
body.setSymbolicParameters(exportedParameters);
PVariable var__1066296671789487966 = body.getOrCreateVariableByName("1066296671789487966");
PVariable var__8775378229005008969 = body.getOrCreateVariableByName("8775378229005008969");
new TypeConstraint(body, Tuples.flatTupleOf(var_ty), new ConceptKey(MetaAdapterFactory.getInterfaceConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb938fL, "SumTypes.structure.Type")));
new PositivePatternCall(body, Tuples.flatTupleOf(var_ty, var__1066296671789487966, var_out_1), Typing_AsLType_WrappedQuerySpecification.instance().getInternalQueryRepresentation());
new PositivePatternCall(body, Tuples.flatTupleOf(var_ty, var__8775378229005008969, var_out_1), Typing_AsLType_WrappedQuerySpecification.instance().getInternalQueryRepresentation());
SetSequence.fromSet(bodies).addElement(body);
}
......
......@@ -93,8 +93,8 @@ public final class Typing_AsLType_WrappedBody0QuerySpecification extends MPSQuer
exportedParameters.add(new ExportedParameter(body, var_out_2, p_out_2));
body.setSymbolicParameters(exportedParameters);
PVariable var__8775378229005048030 = body.newVirtualVariable();
PVariable var__tmp_297 = body.getOrCreateVariableByName("tmp_297");
PVariable var__1066296671789528856 = body.newVirtualVariable();
new TypeConstraint(body, Tuples.flatTupleOf(var_ty), new ConceptKey(MetaAdapterFactory.getInterfaceConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb938fL, "SumTypes.structure.Type")));
new TypeConstraint(body, Tuples.flatTupleOf(var_f___match_a0a0s), new ConceptKey(MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93ecL, "SumTypes.structure.Nat")));
......@@ -104,7 +104,7 @@ public final class Typing_AsLType_WrappedBody0QuerySpecification extends MPSQuer
@Override
public String getShortDescription() {
return "1066296671789528856";
return "8775378229005048030";
}
@Override
......@@ -117,8 +117,8 @@ public final class Typing_AsLType_WrappedBody0QuerySpecification extends MPSQuer
return LType.Nat.create();
}
}, var__1066296671789528856, false);
new Equality(body, var__tmp_297, var__1066296671789528856);
}, var__8775378229005048030, false);
new Equality(body, var__tmp_297, var__8775378229005048030);
new Equality(body, var__tmp_297, var_out_2);
SetSequence.fromSet(bodies).addElement(body);
......
......@@ -112,10 +112,10 @@ public final class Typing_AsLType_WrappedBody1QuerySpecification extends MPSQuer
exportedParameters.add(new ExportedParameter(body, var_out_8, p_out_8));
body.setSymbolicParameters(exportedParameters);
PVariable var__1066296671789528915 = body.newVirtualVariable();
PVariable var__tmp_300 = body.getOrCreateVariableByName("tmp_300");
PVariable var__tmp_301 = body.getOrCreateVariableByName("tmp_301");
PVariable var__tmp_302 = body.getOrCreateVariableByName("tmp_302");
PVariable var__8775378229005048089 = body.newVirtualVariable();
PVariable var__tmp_298 = body.getOrCreateVariableByName("tmp_298");
PVariable var__tmp_299 = body.getOrCreateVariableByName("tmp_299");
......@@ -141,7 +141,7 @@ public final class Typing_AsLType_WrappedBody1QuerySpecification extends MPSQuer
@Override
public String getShortDescription() {
return "1066296671789528915";
return "8775378229005048089";
}
@Override
......@@ -154,8 +154,8 @@ public final class Typing_AsLType_WrappedBody1QuerySpecification extends MPSQuer
return LType.Fun.create(((LType.LTypeElement) valueProvider.getValue("f___lty1")), ((LType.LTypeElement) valueProvider.getValue("f___lty2")));
}
}, var__1066296671789528915, false);
new Equality(body, var__tmp_302, var__1066296671789528915);
}, var__8775378229005048089, false);
new Equality(body, var__tmp_302, var__8775378229005048089);
new Equality(body, var__tmp_302, var_out_8);
SetSequence.fromSet(bodies).addElement(body);
......
......@@ -112,12 +112,12 @@ public final class Typing_AsLType_WrappedBody2QuerySpecification extends MPSQuer
exportedParameters.add(new ExportedParameter(body, var_out_8, p_out_8));
body.setSymbolicParameters(exportedParameters);
PVariable var__8775378229005048150 = body.newVirtualVariable();
PVariable var__tmp_304 = body.getOrCreateVariableByName("tmp_304");
PVariable var__tmp_305 = body.getOrCreateVariableByName("tmp_305");
PVariable var__tmp_306 = body.getOrCreateVariableByName("tmp_306");
PVariable var__tmp_307 = body.getOrCreateVariableByName("tmp_307");
PVariable var__tmp_303 = body.getOrCreateVariableByName("tmp_303");
PVariable var__1066296671789528976 = body.newVirtualVariable();
new TypeConstraint(body, Tuples.flatTupleOf(var_ty), new ConceptKey(MetaAdapterFactory.getInterfaceConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb938fL, "SumTypes.structure.Type")));
new TypeConstraint(body, Tuples.flatTupleOf(var_f___match_a2a0s), new ConceptKey(MetaAdapterFactory.getConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb93dcL, "SumTypes.structure.Sum")));
......@@ -141,7 +141,7 @@ public final class Typing_AsLType_WrappedBody2QuerySpecification extends MPSQuer
@Override
public String getShortDescription() {
return "1066296671789528976";
return "8775378229005048150";
}
@Override
......@@ -154,8 +154,8 @@ public final class Typing_AsLType_WrappedBody2QuerySpecification extends MPSQuer
return LType.Sum.create(((LType.LTypeElement) valueProvider.getValue("f___lty1")), ((LType.LTypeElement) valueProvider.getValue("f___lty2")));
}
}, var__1066296671789528976, false);
new Equality(body, var__tmp_307, var__1066296671789528976);
}, var__8775378229005048150, false);
new Equality(body, var__tmp_307, var__8775378229005048150);
new Equality(body, var__tmp_307, var_out_8);
SetSequence.fromSet(bodies).addElement(body);
......
......@@ -89,16 +89,16 @@ public final class Typing_InferQuerySpecification extends MPSQuerySpecification
exportedParameters.add(new ExportedParameter(body, var_out_1, p_out_1));
body.setSymbolicParameters(exportedParameters);
PVariable var__1066296671789476920 = body.getOrCreateVariableByName("1066296671789476920");
PVariable var__1066296671789476930 = body.newVirtualVariable();
PVariable var__1066296671789476921 = body.getOrCreateVariableByName("1066296671789476921");
PVariable var__1066296671789476924 = body.getOrCreateVariableByName("1066296671789476924");
PVariable var__1066296671789476925 = body.getOrCreateVariableByName("1066296671789476925");
PVariable var__8775378229004998033 = body.newVirtualVariable();
PVariable var__8775378229004998023 = body.getOrCreateVariableByName("8775378229004998023");
PVariable var__8775378229004998024 = body.getOrCreateVariableByName("8775378229004998024");
PVariable var__8775378229004998027 = body.getOrCreateVariableByName("8775378229004998027");
PVariable var__8775378229004998028 = body.getOrCreateVariableByName("8775378229004998028");
new TypeConstraint(body, Tuples.flatTupleOf(var_term), new ConceptKey(MetaAdapterFactory.getInterfaceConcept(0x8d2332833fa47ceL, 0x89dfdaaa7554f251L, 0x1a4a252762eb92d1L, "SumTypes.structure.Term")));
new PositivePatternCall(body, Tuples.flatTupleOf(var_term, var__1066296671789476920, var__1066296671789476921), Typing_Infer_WrappedQuerySpecification.instance().getInternalQueryRepresentation());
new AggregatorConstraint(new BoundAggregator(LType.instance().aggregator_glb, LType.LTypeElement.class, LType.LTypeElement.class), body, Tuples.flatTupleOf(var_term, var__1066296671789476924, var__1066296671789476925), Typing_Infer_WrappedQuerySpecification.instance().getInternalQueryRepresentation(), var__1066296671789476930, 2);
new Equality(body, var_out_1, var__1066296671789476930);
new PositivePatternCall(body, Tuples.flatTupleOf(var_term, var__8775378229004998023, var__8775378229004998024), Typing_Infer_WrappedQuerySpecification.instance().getInternalQueryRepresentation());
new AggregatorConstraint(new BoundAggregator(LType.instance().aggregator_glb, LType.LTypeElement.class, LType.LTypeElement.class), body, Tuples.flatTupleOf(var_term, var__8775378229004998027, var__8775378229004998028), Typing_Infer_WrappedQuerySpecification.instance().getInternalQueryRepresentation(), var__8775378229004998033, 2);
new Equality(body, var_out_1, var__8775378229004998033);
SetSequence.fromSet(bodies).addElement(body);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment