Commit fffa4ce8 authored by André Pacak's avatar André Pacak

flip lattice upside down and use glb for aggregation for record types to match...

flip lattice upside down and use glb for aggregation for record types to match the aggregation operator of infer
parent d38f6e29
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -59,7 +59,7 @@
<property role="TrG5h" value="test" />
<node concept="1SCrpo" id="75UymJIFIeH" role="2BHfFu">
<node concept="2EAAYt" id="75UymJIFIaj" role="1SCrqz">
<property role="TrG5h" value="b" />
<property role="TrG5h" value="a" />
<node concept="1SCrpo" id="75UymJIFIau" role="2EAAYw">
<node concept="2EAANM" id="75UymJIFIc9" role="1SCrqz">
<node concept="1JAXSW" id="75UymJIFIce" role="2EAAKa">
......@@ -99,10 +99,7 @@
</node>
</node>
</node>
<node concept="1SCrqR" id="75UymJKKgbd" role="1SCrrM">
<node concept="1SCrrb" id="75UymJKKgbs" role="1SCrqY" />
<node concept="1SCrrb" id="75UymJKKgb4" role="1SCrqM" />
</node>
<node concept="1SCrrb" id="75UymJKWMpV" role="1SCrrM" />
</node>
</node>
</node>
......
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="4ui811gdmaqf4pt9xl6bfaeqtjvj7a5">
<product version="3" modelHash="-6xiqm3brhiiyw11q2rnom4t5fb1kwpa">
<files names="AnalysisResultAccess.java:ConstantDefinitions.java:LType.java:LTypeRecord.java:QuerySpecificationHints.java:Typing_AllvarsQuerySpecification.java:Typing_Allvars_0_switchCommonQuerySpecification.java:Typing_AsLTypeQuerySpecification.java:Typing_AsLTypeRecordQuerySpecification.java:Typing_AsLTypeRecord_0_switchCommonQuerySpecification.java:Typing_AsLTypeRecord_WrappedQuerySpecification.java:Typing_AsLType_0_switchCommonQuerySpecification.java:Typing_CheckErrorQuerySpecification.java:Typing_CheckQuerySpecification.java:Typing_Check_0_switchCommonQuerySpecification.java:Typing_InferQuerySpecification.java:Typing_Infer_0_switchCommonQuerySpecification.java:Typing_Infer_WrappedQuerySpecification.java:Typing_LookupFailureQuerySpecification.java:Typing_LookupFailure_0_switchCommonQuerySpecification.java:Typing_LookupQuerySpecification.java:Typing_Lookup_0_switchCommonQuerySpecification.java:Typing_MatchFunFailureQuerySpecification.java:Typing_MatchFunFailure_0_switchCommonQuerySpecification.java:Typing_MatchRecordFailureQuerySpecification.java:Typing_MatchRecordFailure_0_switchCommonQuerySpecification.java:Typing_RequiredQuerySpecification.java:Typing_Required_0_switchCommonQuerySpecification.java" />
</product>
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="-4txmgvk0r7vtpobd0me457v69n356qn" />
<product version="3" modelHash="asjp63grojif6rqwfdiy1nysv35ega7" />
......@@ -42,10 +42,10 @@ public class AnalysisResultAccess {
boolean checkError = CollectionSequence.fromCollection(evaluatorCheckError.getAllMatches()).isNotEmpty();
boolean matchFunFailure = CollectionSequence.fromCollection(evaluatorMatchFunFailure.getAllMatches()).isNotEmpty();
boolean matchVariantFailure = CollectionSequence.fromCollection(evaluatorMatchRecordFailure.getAllMatches()).isNotEmpty();
boolean matchRecordFailure = CollectionSequence.fromCollection(evaluatorMatchRecordFailure.getAllMatches()).isNotEmpty();
boolean lookupFailure = CollectionSequence.fromCollection(evaluatorLookupFailure.getAllMatches()).isNotEmpty();
if (checkError || matchFunFailure || matchVariantFailure || lookupFailure) {
if (checkError || matchFunFailure || matchRecordFailure || lookupFailure) {
return false;
}
......
......@@ -465,7 +465,7 @@ public class LType implements ILatticeOperationProvider<LType.LTypeElement>, IPo
} else if ((case_6_g0a6 = new SequenceMatcher(matcher_a6a0g, matcher_b6a0g).match(values_a0g)) != null) {
LTypeRecord.LTypeRecordElement rty_a1g0a6 = (LTypeRecord.LTypeRecordElement) case_6_g0a6.get("rty");
LTypeRecord.LTypeRecordElement lty_a0g0a6 = (LTypeRecord.LTypeRecordElement) case_6_g0a6.get("lty");
return LType.Record.create(LTypeRecord.instance().lub(lty_a0g0a6, rty_a1g0a6));
return LType.Record.create(LTypeRecord.instance().glb(lty_a0g0a6, rty_a1g0a6));
} else {
throw new PatternMatcherException(values_a0g);
}
......@@ -504,7 +504,7 @@ public class LType implements ILatticeOperationProvider<LType.LTypeElement>, IPo
} else if ((case_6_g0a8 = new SequenceMatcher(matcher_a6a0i, matcher_b6a0i).match(values_a0i)) != null) {
LTypeRecord.LTypeRecordElement rty_a1g0a8 = (LTypeRecord.LTypeRecordElement) case_6_g0a8.get("rty");
LTypeRecord.LTypeRecordElement lty_a0g0a8 = (LTypeRecord.LTypeRecordElement) case_6_g0a8.get("lty");
return LType.Record.create(LTypeRecord.instance().glb(lty_a0g0a8, rty_a1g0a8));
return LType.Record.create(LTypeRecord.instance().lub(lty_a0g0a8, rty_a1g0a8));
} else if ((case_7_h0a8 = new SequenceMatcher(WildCardMatcher.INSTANCE, WildCardMatcher.INSTANCE).match(values_a0i)) != null) {
return LType.Bot.create();
} else {
......@@ -639,21 +639,6 @@ public class LType implements ILatticeOperationProvider<LType.LTypeElement>, IPo
}
}
public final IMultisetAggregationOperator<?, ?, ?> aggregator_lub = new AbstractTreeBasedLatticeAggregationOperator<LType.LTypeElement>(new AugmentedNodeFactory<LType.LTypeElement>(new _FunctionTypes._return_P2_E0<LType.LTypeElement, LType.LTypeElement, LType.LTypeElement>() {
public LType.LTypeElement invoke(final LType.LTypeElement left, final LType.LTypeElement right) {
return lub(left, right);
}
})) {
@Override
public String getName() {
return "aggregator_lub";
}
@Override
public String getShortDescription() {
return "aggregator_lub";
}
};
public final IMultisetAggregationOperator<?, ?, ?> aggregator_glb = new AbstractTreeBasedLatticeAggregationOperator<LType.LTypeElement>(new AugmentedNodeFactory<LType.LTypeElement>(new _FunctionTypes._return_P2_E0<LType.LTypeElement, LType.LTypeElement, LType.LTypeElement>() {
public LType.LTypeElement invoke(final LType.LTypeElement left, final LType.LTypeElement right) {
return glb(left, right);
......
......@@ -197,10 +197,10 @@ public class LTypeRecord implements ILatticeOperationProvider<LTypeRecord.LTypeR
}
public LTypeRecord.LTypeRecordElement top() {
return LTypeRecord.AnyRecord.create();
return LTypeRecord.instance().empty();
}
public LTypeRecord.LTypeRecordElement bot() {
return LTypeRecord.instance().empty();
return LTypeRecord.AnyRecord.create();
}
public LTypeRecord.LTypeRecordElement empty() {
return LTypeRecord.FinRecord.create(Map.Immutable.<String,LType.LTypeElement>of());
......@@ -236,32 +236,34 @@ public class LTypeRecord implements ILatticeOperationProvider<LTypeRecord.LTypeR
java.util.Map<String, Object> case_2_c0a01_0;
if ((case_0_a0a01_0 = new SequenceMatcher(WildCardMatcher.INSTANCE, matcher_b0a0k).match(values_a0k_0)) != null) {
return true;
} else if ((case_1_b0a01_0 = new SequenceMatcher(matcher_a1a0k_0, WildCardMatcher.INSTANCE).match(values_a0k_0)) != null) {
return false;
} else if ((case_1_b0a01_0 = new SequenceMatcher(matcher_a1a0k_0, WildCardMatcher.INSTANCE).match(values_a0k_0)) != null) {
return true;
} else if ((case_2_c0a01_0 = new SequenceMatcher(matcher_a2a0k, matcher_b2a0k).match(values_a0k_0)) != null) {
Map.Immutable<String, LType.LTypeElement> map2_a1c0a01 = (Map.Immutable<String, LType.LTypeElement>) case_2_c0a01_0.get("map2");
Map.Immutable<String, LType.LTypeElement> map1_a0c0a01 = (Map.Immutable<String, LType.LTypeElement>) case_2_c0a01_0.get("map1");
if (map1_a0c0a01.size() != map2_a1c0a01.size()) {
return false;
// check if r is top element
if (map2_a1c0a01.size() == 0) {
return true;
}
//
Iterator<java.util.Map.Entry<String, LType.LTypeElement>> it = map1_a0c0a01.entryIterator();
while (it.hasNext()) {
java.util.Map.Entry<String, LType.LTypeElement> entry1 = it.next();
LType.LTypeElement found = map2_a1c0a01.get(entry1.getKey());
if (found == null) {
return false;
return true;
} else if (!(LType.instance().leq(entry1.getValue(), found))) {
return false;
return true;
}
}
return true;
return false;
} else {
throw new PatternMatcherException(values_a0k_0);
}
}
}
public LTypeRecord.LTypeRecordElement lub(LTypeRecord.LTypeRecordElement l, LTypeRecord.LTypeRecordElement r) {
public LTypeRecord.LTypeRecordElement glb(LTypeRecord.LTypeRecordElement l, LTypeRecord.LTypeRecordElement r) {
{
final Object[] values_a0m_0 = {l, r};
......@@ -295,7 +297,7 @@ public class LTypeRecord implements ILatticeOperationProvider<LTypeRecord.LTypeR
}
}
}
public LTypeRecord.LTypeRecordElement glb(LTypeRecord.LTypeRecordElement l, LTypeRecord.LTypeRecordElement r) {
public LTypeRecord.LTypeRecordElement lub(LTypeRecord.LTypeRecordElement l, LTypeRecord.LTypeRecordElement r) {
{
final Object[] values_a0o_0 = {l, r};
......@@ -311,6 +313,7 @@ public class LTypeRecord implements ILatticeOperationProvider<LTypeRecord.LTypeR
} else if ((case_2_c0a41_0 = new SequenceMatcher(matcher_a2a0o, matcher_b2a0o).match(values_a0o_0)) != null) {
Map.Immutable<String, LType.LTypeElement> map2_a1c0a41 = (Map.Immutable<String, LType.LTypeElement>) case_2_c0a41_0.get("map2");
Map.Immutable<String, LType.LTypeElement> map1_a0c0a41 = (Map.Immutable<String, LType.LTypeElement>) case_2_c0a41_0.get("map1");
Iterator<java.util.Map.Entry<String, LType.LTypeElement>> it = map1_a0c0a41.entryIterator();
Map.Immutable<String, LType.LTypeElement> result = Map.Immutable.of();
while (it.hasNext()) {
......@@ -328,21 +331,6 @@ public class LTypeRecord implements ILatticeOperationProvider<LTypeRecord.LTypeR
}
}
public final IMultisetAggregationOperator<?, ?, ?> aggregator_lub = new AbstractTreeBasedLatticeAggregationOperator<LTypeRecord.LTypeRecordElement>(new AugmentedNodeFactory<LTypeRecord.LTypeRecordElement>(new _FunctionTypes._return_P2_E0<LTypeRecord.LTypeRecordElement, LTypeRecord.LTypeRecordElement, LTypeRecord.LTypeRecordElement>() {
public LTypeRecord.LTypeRecordElement invoke(final LTypeRecord.LTypeRecordElement left, final LTypeRecord.LTypeRecordElement right) {
return lub(left, right);
}
})) {
@Override
public String getName() {
return "aggregator_lub";
}
@Override
public String getShortDescription() {
return "aggregator_lub";
}
};
public final IMultisetAggregationOperator<?, ?, ?> aggregator_glb = new AbstractTreeBasedLatticeAggregationOperator<LTypeRecord.LTypeRecordElement>(new AugmentedNodeFactory<LTypeRecord.LTypeRecordElement>(new _FunctionTypes._return_P2_E0<LTypeRecord.LTypeRecordElement, LTypeRecord.LTypeRecordElement, LTypeRecord.LTypeRecordElement>() {
public LTypeRecord.LTypeRecordElement invoke(final LTypeRecord.LTypeRecordElement left, final LTypeRecord.LTypeRecordElement right) {
return glb(left, right);
......
......@@ -29,33 +29,33 @@ 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(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb937fL, 0x1a4a252762eb93d5L, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb933aL, 0x1a4a252762eb9352L, "body"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9322L, 0x1a4a252762eb9336L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1fd8e2cf9df802c6L, 0x1fd8e2cf9df802cbL, "elems"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb93f1L, 0x1a4a252762eb93f6L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9390L, 0x1a4a252762eb9395L, "ty1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9312L, 0x1a4a252762eb931bL, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getReferenceLink(0xb802a05692a24fbcL, 0x902ef8e5004c331fL, 0x7980b687ac7456feL, 0x7980b687ac7456ffL, "parent"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb936bL, 0x1a4a252762eb9378L, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1fd8e2cf9df802cfL, 0x1fd8e2cf9df802d4L, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9390L, 0x1a4a252762eb9399L, "ty2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9322L, 0x1a4a252762eb9336L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb936bL, 0x1a4a252762eb9374L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9302L, 0x1a4a252762eb930bL, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9390L, 0x1a4a252762eb9395L, "ty1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb93faL, 0x1a4a252762eb93ffL, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb937fL, 0x1a4a252762eb9384L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x9229981a3b8f573L, 0x9229981a3b8f58bL, "entries"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9302L, 0x1a4a252762eb9307L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb936bL, 0x1a4a252762eb9374L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb937fL, 0x1a4a252762eb93d5L, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x2c4ed3ae43d50d92L, 0x2c4ed3ae43d50da6L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9302L, 0x1a4a252762eb930bL, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getReferenceLink(0xb802a05692a24fbcL, 0x902ef8e5004c331fL, 0x7980b687ac7456feL, 0x7980b687ac7456ffL, "parent"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb936bL, 0x1a4a252762eb9378L, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb933aL, 0x1a4a252762eb934eL, "bound"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9312L, 0x1a4a252762eb9317L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb937fL, 0x1a4a252762eb9384L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb93faL, 0x1a4a252762eb93ffL, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1fd8e2cf9df802cfL, 0x1fd8e2cf9df802d4L, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9312L, 0x1a4a252762eb931bL, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb93f1L, 0x1a4a252762eb93f6L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb933aL, 0x1a4a252762eb934eL, "bound"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb92d7L, 0x1a4a252762eb92dcL, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb933aL, 0x1a4a252762eb9352L, "body"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb9302L, 0x1a4a252762eb9307L, "t1"));
this.languages = new HashSet<SLanguage>();
this.languages.add(MetaAdapterFactory.getLanguage(0xb802a05692a24fbcL, 0x902ef8e5004c331fL, "ceab5195-25ea-4f22-9b92-103b95ca8c0c"));
......
......@@ -91,8 +91,8 @@ public final class Typing_AsLTypeQuerySpecification extends MPSQuerySpecificatio
exportedParameters.add(new ExportedParameter(body, var_out_1, p_out_1));
body.setSymbolicParameters(exportedParameters);
PVariable var__3431993442800474088 = body.newVirtualVariable();
PVariable var__match_a0a0s = body.getOrCreateVariableByName("match_a0a0s");
PVariable var__8176999170140397786 = body.newVirtualVariable();
PVariable var__tmp_232 = body.getOrCreateVariableByName("tmp_232");
new TypeConstraint(body, Tuples.flatTupleOf(var_ty), new ConceptKey(MetaAdapterFactory.getInterfaceConcept(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb938fL, "RecordTypes.structure.Type")));
......@@ -103,7 +103,7 @@ public final class Typing_AsLTypeQuerySpecification extends MPSQuerySpecificatio
@Override
public String getShortDescription() {
return "8176999170140397786";
return "3431993442800474088";
}
@Override
......@@ -116,8 +116,8 @@ public final class Typing_AsLTypeQuerySpecification extends MPSQuerySpecificatio
return LType.Nat.create();
}
}, var__8176999170140397786, false);
new Equality(body, var__tmp_232, var__8176999170140397786);
}, var__3431993442800474088, false);
new Equality(body, var__tmp_232, var__3431993442800474088);
new Equality(body, var__tmp_232, var_out_1);
SetSequence.fromSet(bodies).addElement(body);
......@@ -133,9 +133,9 @@ public final class Typing_AsLTypeQuerySpecification extends MPSQuerySpecificatio
body.setSymbolicParameters(exportedParameters);
PVariable var__lty2 = body.getOrCreateVariableByName("lty2");
PVariable var__8176999170140397845 = body.newVirtualVariable();
PVariable var__lty1 = body.getOrCreateVariableByName("lty1");
PVariable var__ty2 = body.getOrCreateVariableByName("ty2");
PVariable var__3431993442800474147 = body.newVirtualVariable();
PVariable var__ty1 = body.getOrCreateVariableByName("ty1");
PVariable var__match_b0b0a81 = body.getOrCreateVariableByName("match_b0b0a81");
PVariable var__match_a0b0a81 = body.getOrCreateVariableByName("match_a0b0a81");
......@@ -164,7 +164,7 @@ public final class Typing_AsLTypeQuerySpecification extends MPSQuerySpecificatio
@Override
public String getShortDescription() {
return "8176999170140397845";
return "3431993442800474147";
}
@Override
......@@ -177,8 +177,8 @@ public final class Typing_AsLTypeQuerySpecification extends MPSQuerySpecificatio
return LType.Fun.create(((LType.LTypeElement) valueProvider.getValue("lty1")), ((LType.LTypeElement) valueProvider.getValue("lty2")));
}
}, var__8176999170140397845, false);
new Equality(body, var__tmp_237, var__8176999170140397845);
}, var__3431993442800474147, false);
new Equality(body, var__tmp_237, var__3431993442800474147);
new Equality(body, var__tmp_237, var_out_1);
SetSequence.fromSet(bodies).addElement(body);
......@@ -196,7 +196,7 @@ public final class Typing_AsLTypeQuerySpecification extends MPSQuerySpecificatio
PVariable var__tmp_238 = body.getOrCreateVariableByName("tmp_238");
PVariable var__tmp_239 = body.getOrCreateVariableByName("tmp_239");
PVariable var__rty = body.getOrCreateVariableByName("rty");
PVariable var__8176999170140397879 = body.newVirtualVariable();
PVariable var__3431993442800474181 = body.newVirtualVariable();
PVariable var__lty = body.getOrCreateVariableByName("lty");
PVariable var__match_a2a0s = body.getOrCreateVariableByName("match_a2a0s");
......@@ -211,7 +211,7 @@ public final class Typing_AsLTypeQuerySpecification extends MPSQuerySpecificatio
@Override
public String getShortDescription() {
return "8176999170140397879";
return "3431993442800474181";
}
@Override
......@@ -224,8 +224,8 @@ public final class Typing_AsLTypeQuerySpecification extends MPSQuerySpecificatio
return LType.Record.create(((LTypeRecord.LTypeRecordElement) valueProvider.getValue("lty")));
}
}, var__8176999170140397879, false);
new Equality(body, var__tmp_239, var__8176999170140397879);
}, var__3431993442800474181, false);
new Equality(body, var__tmp_239, var__3431993442800474181);
new Equality(body, var__tmp_239, var_out_1);
SetSequence.fromSet(bodies).addElement(body);
......
......@@ -89,14 +89,14 @@ public final class Typing_AsLTypeRecordQuerySpecification extends MPSQuerySpecif
exportedParameters.add(new ExportedParameter(body, var_out_1, p_out_1));
body.setSymbolicParameters(exportedParameters);
PVariable var__8176999170140376601 = body.getOrCreateVariableByName("8176999170140376601");
PVariable var__8176999170140376606 = body.newVirtualVariable();
PVariable var__8176999170140376598 = body.getOrCreateVariableByName("8176999170140376598");
PVariable var__3431993442800452207 = body.newVirtualVariable();
PVariable var__3431993442800452199 = body.getOrCreateVariableByName("3431993442800452199");
PVariable var__3431993442800452202 = body.getOrCreateVariableByName("3431993442800452202");
new TypeConstraint(body, Tuples.flatTupleOf(var_type), new ConceptKey(MetaAdapterFactory.getConcept(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1fd8e2cf9df802c6L, "RecordTypes.structure.RecordType")));
new PositivePatternCall(body, Tuples.flatTupleOf(var_type, var__8176999170140376598), Typing_AsLTypeRecord_WrappedQuerySpecification.instance().getInternalQueryRepresentation());
new AggregatorConstraint(new BoundAggregator(LTypeRecord.instance().aggregator_lub, LTypeRecord.LTypeRecordElement.class, LTypeRecord.LTypeRecordElement.class), body, Tuples.flatTupleOf(var_type, var__8176999170140376601), Typing_AsLTypeRecord_WrappedQuerySpecification.instance().getInternalQueryRepresentation(), var__8176999170140376606, 1);
new Equality(body, var_out_1, var__8176999170140376606);
new PositivePatternCall(body, Tuples.flatTupleOf(var_type, var__3431993442800452199), Typing_AsLTypeRecord_WrappedQuerySpecification.instance().getInternalQueryRepresentation());
new AggregatorConstraint(new BoundAggregator(LTypeRecord.instance().aggregator_glb, LTypeRecord.LTypeRecordElement.class, LTypeRecord.LTypeRecordElement.class), body, Tuples.flatTupleOf(var_type, var__3431993442800452202), Typing_AsLTypeRecord_WrappedQuerySpecification.instance().getInternalQueryRepresentation(), var__3431993442800452207, 1);
new Equality(body, var_out_1, var__3431993442800452207);
SetSequence.fromSet(bodies).addElement(body);
}
......
......@@ -93,6 +93,7 @@ public final class Typing_AsLTypeRecord_WrappedQuerySpecification extends MPSQue
body.setSymbolicParameters(exportedParameters);
PVariable var__ty = body.getOrCreateVariableByName("ty");
PVariable var__3431993442800474254 = body.newVirtualVariable();
PVariable var__tmp_245 = body.getOrCreateVariableByName("tmp_245");
PVariable var__tmp_246 = body.getOrCreateVariableByName("tmp_246");
PVariable var__elem = body.getOrCreateVariableByName("elem");
......@@ -100,7 +101,6 @@ public final class Typing_AsLTypeRecord_WrappedQuerySpecification extends MPSQue
PVariable var__l = body.getOrCreateVariableByName("l");
PVariable var__tmp_243 = body.getOrCreateVariableByName("tmp_243");
PVariable var__tmp_244 = body.getOrCreateVariableByName("tmp_244");
PVariable var__8176999170140397952 = body.newVirtualVariable();
new TypeConstraint(body, Tuples.flatTupleOf(var_type), new ConceptKey(MetaAdapterFactory.getConcept(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1fd8e2cf9df802c6L, "RecordTypes.structure.RecordType")));
new PositivePatternCall(body, Tuples.flatTupleOf(), Typing_AsLTypeRecord_0_switchCommonQuerySpecification.instance().getInternalQueryRepresentation());
......@@ -115,7 +115,7 @@ public final class Typing_AsLTypeRecord_WrappedQuerySpecification extends MPSQue
@Override
public String getShortDescription() {
return "8176999170140397952";
return "3431993442800474254";
}
@Override
......@@ -128,8 +128,8 @@ public final class Typing_AsLTypeRecord_WrappedQuerySpecification extends MPSQue
return LTypeRecord.instance().singleton((CodeGenerationHelper.demandWrapString(valueProvider.getValue("l"))), ((LType.LTypeElement) valueProvider.getValue("ty")));
}
}, var__8176999170140397952, false);
new Equality(body, var__tmp_246, var__8176999170140397952);
}, var__3431993442800474254, false);
new Equality(body, var__tmp_246, var__3431993442800474254);
new Equality(body, var__tmp_246, var_out_1);
SetSequence.fromSet(bodies).addElement(body);
......@@ -144,7 +144,7 @@ public final class Typing_AsLTypeRecord_WrappedQuerySpecification extends MPSQue
exportedParameters.add(new ExportedParameter(body, var_out_1, p_out_1));
body.setSymbolicParameters(exportedParameters);
PVariable var__8176999170140397970 = body.newVirtualVariable();
PVariable var__3431993442800474272 = body.newVirtualVariable();
PVariable var__tmp_247 = body.getOrCreateVariableByName("tmp_247");
new TypeConstraint(body, Tuples.flatTupleOf(var_type), new ConceptKey(MetaAdapterFactory.getConcept(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1fd8e2cf9df802c6L, "RecordTypes.structure.RecordType")));
......@@ -153,7 +153,7 @@ public final class Typing_AsLTypeRecord_WrappedQuerySpecification extends MPSQue
@Override
public String getShortDescription() {
return "8176999170140397970";
return "3431993442800474272";
}
@Override
......@@ -166,8 +166,8 @@ public final class Typing_AsLTypeRecord_WrappedQuerySpecification extends MPSQue
return LTypeRecord.instance().empty();
}
}, var__8176999170140397970, false);
new Equality(body, var__tmp_247, var__8176999170140397970);
}, var__3431993442800474272, false);
new Equality(body, var__tmp_247, var__3431993442800474272);
new Equality(body, var__tmp_247, var_out_1);
SetSequence.fromSet(bodies).addElement(body);
......
......@@ -95,22 +95,22 @@ public final class Typing_CheckErrorQuerySpecification extends MPSQuerySpecifica
body.setSymbolicParameters(exportedParameters);
PVariable var__term = body.getOrCreateVariableByName("term");
PVariable var__8176999170140356937 = body.newConstantVariable(Integer.parseInt("0"));
PVariable var__8176999170140395177 = body.newVirtualVariable();
PVariable var__3431993442800432538 = body.newConstantVariable(Integer.parseInt("0"));
PVariable var__tmp_28 = body.getOrCreateVariableByName("tmp_28");
PVariable var__tmp_27 = body.getOrCreateVariableByName("tmp_27");
PVariable var__3431993442800471479 = body.newVirtualVariable();
PVariable var__tmp_26 = body.getOrCreateVariableByName("tmp_26");
new TypeConstraint(body, Tuples.flatTupleOf(var_out_1), new ConceptKey(MetaAdapterFactory.getConcept(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x10802efe25aL, "jetbrains.mps.lang.core.structure.BaseConcept")));
new TypeConstraint(body, Tuples.flatTupleOf(var__term), new ConceptKey(MetaAdapterFactory.getInterfaceConcept(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb92d1L, "RecordTypes.structure.Term")));
new PositivePatternCall(body, Tuples.flatTupleOf(var__term, var__tmp_26), Typing_RequiredQuerySpecification.instance().getInternalQueryRepresentation());
new NegativePatternCall(body, Tuples.flatTupleOf(var__term), Typing_CheckQuerySpecification.instance().getInternalQueryRepresentation());
new Equality(body, var__tmp_27, var__8176999170140356937);
new Equality(body, var__tmp_27, var__3431993442800432538);
new ExpressionEvaluation(body, new IExpressionEvaluator() {
@Override
public String getShortDescription() {
return "8176999170140395177";
return "3431993442800471479";
}
@Override
......@@ -123,8 +123,8 @@ public final class Typing_CheckErrorQuerySpecification extends MPSQuerySpecifica
return String.format("\"check failed\"");
}
}, var__8176999170140395177, false);
new Equality(body, var__tmp_28, var__8176999170140395177);
}, var__3431993442800471479, false);
new Equality(body, var__tmp_28, var__3431993442800471479);
new Equality(body, var__tmp_27, var_out_0);
new Equality(body, var__term, var_out_1);
new Equality(body, var__tmp_28, var_out_2);
......
......@@ -93,11 +93,11 @@ public final class Typing_CheckQuerySpecification extends MPSQuerySpecification
PVariable var__tmp_174 = body.getOrCreateVariableByName("tmp_174");
PVariable var__match_b0a0a0o = body.getOrCreateVariableByName("match_b0a0a0o");
PVariable var__t = body.getOrCreateVariableByName("t");
PVariable var__3431993442800473367 = body.newVirtualVariable();
PVariable var__ty2 = body.getOrCreateVariableByName("ty2");
PVariable var__ty1 = body.getOrCreateVariableByName("ty1");
PVariable var__ty = body.getOrCreateVariableByName("ty");
PVariable var__8176999170140397065 = body.newVirtualVariable();
PVariable var__8176999170140397081 = body.newVirtualVariable();
PVariable var__3431993442800473383 = body.newVirtualVariable();
PVariable var__match_a0a0a0o = body.getOrCreateVariableByName("match_a0a0a0o");
PVariable var__match_a0a0o = body.getOrCreateVariableByName("match_a0a0o");
PVariable var__name = body.getOrCreateVariableByName("name");
......@@ -122,7 +122,7 @@ public final class Typing_CheckQuerySpecification extends MPSQuerySpecification
@Override
public String getShortDescription() {
return "8176999170140397065";
return "3431993442800473367";
}
@Override
......@@ -135,14 +135,14 @@ public final class Typing_CheckQuerySpecification extends MPSQuerySpecification
return LType.instance().funParamType(((LType.LTypeElement) valueProvider.getValue("ty")));
}
}, var__8176999170140397065, false);
new Equality(body, var__tmp_176, var__8176999170140397065);
}, var__3431993442800473367, false);
new Equality(body, var__tmp_176, var__3431993442800473367);
new Equality(body, var__ty1, var__tmp_176);
new ExpressionEvaluation(body, new IExpressionEvaluator() {
@Override
public String getShortDescription() {
return "8176999170140397081";
return "3431993442800473383";
}
@Override
......@@ -155,8 +155,8 @@ public final class Typing_CheckQuerySpecification extends MPSQuerySpecification
return LType.instance().funResultType(((LType.LTypeElement) valueProvider.getValue("ty")));
}
}, var__8176999170140397081, false);
new Equality(body, var__tmp_177, var__8176999170140397081);
}, var__3431993442800473383, false);
new Equality(body, var__tmp_177, var__3431993442800473383);
new Equality(body, var__ty2, var__tmp_177);
new PositivePatternCall(body, Tuples.flatTupleOf(var__t), Typing_CheckQuerySpecification.instance().getInternalQueryRepresentation());
......@@ -175,8 +175,8 @@ public final class Typing_CheckQuerySpecification extends MPSQuerySpecification
PVariable var__match_a1a0o = body.getOrCreateVariableByName("match_a1a0o");
PVariable var__tmp_180 = body.getOrCreateVariableByName("tmp_180");
PVariable var__tmp_181 = body.getOrCreateVariableByName("tmp_181");
PVariable var__3431993442800473442 = body.newVirtualVariable();
PVariable var__ty = body.getOrCreateVariableByName("ty");
PVariable var__8176999170140397140 = body.newVirtualVariable();
PVariable var__entry = body.getOrCreateVariableByName("entry");
PVariable var__label = body.getOrCreateVariableByName("label");
PVariable var__tmp_179 = body.getOrCreateVariableByName("tmp_179");
......@@ -202,7 +202,7 @@ public final class Typing_CheckQuerySpecification extends MPSQuerySpecification
@Override
public String getShortDescription() {
return "8176999170140397140";
return "3431993442800473442";
}
@Override
......@@ -215,8 +215,8 @@ public final class Typing_CheckQuerySpecification extends MPSQuerySpecification
return LType.instance().recordLookup(((LType.LTypeElement) valueProvider.getValue("ty")), (CodeGenerationHelper.demandWrapString(valueProvider.getValue("label"))));
}
}, var__8176999170140397140, false);
new Equality(body, var__tmp_181, var__8176999170140397140);
}, var__3431993442800473442, false);
new Equality(body, var__tmp_181, var__3431993442800473442);
new Equality(body, var__lty, var__tmp_181);
new TypeConstraint(body, Tuples.staticArityFlatTupleOf(var__entry, var__tmp_182), new ConceptFeatureKey(MetaAdapterFactory.getContainmentLink(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x2c4ed3ae43d50d92L, 0x2c4ed3ae43d50da6L, "t")));
new PositivePatternCall(body, Tuples.flatTupleOf(var__tmp_182), Typing_CheckQuerySpecification.instance().getInternalQueryRepresentation());
......@@ -232,7 +232,6 @@ public final class Typing_CheckQuerySpecification extends MPSQuerySpecification
body.setSymbolicParameters(exportedParameters);
PVariable var__tmp_183 = body.getOrCreateVariableByName("tmp_183");
PVariable var__8176999170140397187 = body.newVirtualVariable();
PVariable var__tmp_184 = body.getOrCreateVariableByName("tmp_184");
PVariable var__match_a2a0o = body.getOrCreateVariableByName("match_a2a0o");
PVariable var__tmp_185 = body.getOrCreateVariableByName("tmp_185");
......@@ -240,7 +239,8 @@ public final class Typing_CheckQuerySpecification extends MPSQuerySpecification
PVariable var__infty = body.getOrCreateVariableByName("infty");
PVariable var__reqty = body.getOrCreateVariableByName("reqty");
PVariable var__tmp_186 = body.getOrCreateVariableByName("tmp_186");
PVariable var__8176999170140370909 = body.newConstantVariable(true);
PVariable var__3431993442800473489 = body.newVirtualVariable();
PVariable var__3431993442800446510 = body.newConstantVariable(true);
new TypeConstraint(body, Tuples.flatTupleOf(var_term), new ConceptKey(MetaAdapterFactory.getInterfaceConcept(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb92d1L, "RecordTypes.structure.Term")));
new PositivePatternCall(body, Tuples.flatTupleOf(), Typing_Check_0_switchCommonQuerySpecification.instance().getInternalQueryRepresentation());
......@@ -254,7 +254,7 @@ public final class Typing_CheckQuerySpecification extends MPSQuerySpecification
@Override
public String getShortDescription() {
return "8176999170140397187";
return "3431993442800473489";
}
@Override
......@@ -267,9 +267,9 @@ public final class Typing_CheckQuerySpecification extends MPSQuerySpecification
return LType.instance().leq(((LType.LTypeElement) valueProvider.getValue("infty")), ((LType.LTypeElement) valueProvider.getValue("reqty")));
}
}, var__8176999170140397187, false);
new Equality(body, var__tmp_185, var__8176999170140397187);
new Equality(body, var__tmp_186, var__8176999170140370909);
}, var__3431993442800473489, false);
new Equality(body, var__tmp_185, var__3431993442800473489);
new Equality(body, var__tmp_186, var__3431993442800446510);
new Equality(body, var__tmp_185, var__tmp_186);
SetSequence.fromSet(bodies).addElement(body);
......
......@@ -89,14 +89,14 @@ public final class Typing_InferQuerySpecification extends MPSQuerySpecification
exportedParameters.add(new ExportedParameter(body, var_out_1, p_out_1));
body.setSymbolicParameters(exportedParameters);
PVariable var__8176999170140376548 = body.newVirtualVariable();
PVariable var__8176999170140376540 = body.getOrCreateVariableByName("8176999170140376540");
PVariable var__8176999170140376543 = body.getOrCreateVariableByName("8176999170140376543");
PVariable var__3431993442800452149 = body.newVirtualVariable();
PVariable var__3431993442800452144 = body.getOrCreateVariableByName("3431993442800452144");
PVariable var__3431993442800452141 = body.getOrCreateVariableByName("3431993442800452141");
new TypeConstraint(body, Tuples.flatTupleOf(var_term), new ConceptKey(MetaAdapterFactory.getInterfaceConcept(0x6b642eaa1043424aL, 0x9e0949eb41607114L, 0x1a4a252762eb92d1L, "RecordTypes.structure.Term")));
new PositivePatternCall(body, Tuples.flatTupleOf(var_term, var__8176999170140376540), 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__8176999170140376543), Typing_Infer_WrappedQuerySpecification.instance().getInternalQueryRepresentation(), var__8176999170140376548, 1);
new Equality(body, var_out_1, var__8176999170140376548);
new PositivePatternCall(body, Tuples.flatTupleOf(var_term, var__3431993442800452141), 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__3431993442800452144), Typing_Infer_WrappedQuerySpecification.instance().getInternalQueryRepresentation(), var__3431993442800452149, 1);
new Equality(body, var_out_1, var__3431993442800452149);
SetSequence.fromSet(bodies).addElement(body);
}
......
<
......@@ -94,10 +94,10 @@ public final class Typing_LookupFailureQuerySpecification extends MPSQuerySpecif
exportedParameters.add(new ExportedParameter(body, var_out_2, p_out_2));
body.setSymbolicParameters(exportedParameters);
PVariable var__3431993442800471452 = body.newVirtualVariable();