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

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 diff is collapsed.
......@@ -68,6 +68,7 @@
<concept id="6368683143941319361" name="org.inca.fun.structure.PatternFunctionModule" flags="ng" index="3TKv5i" />
<concept id="6368683143941346282" name="org.inca.fun.structure.PatternFunctionAnonymousParameter" flags="ng" index="3TL$xT" />
<concept id="5458164179963309291" name="org.inca.fun.structure.PatternFunctionParameter" flags="ng" index="1VLyuc" />
<concept id="6151553526979403292" name="org.inca.fun.structure.PatternFunctionComment" flags="ng" index="1XdyHb" />
<concept id="6151553526979403289" name="org.inca.fun.structure.PatternFunctionEmptyContent" flags="ng" index="1XdyHe" />
</language>
<language id="e6d2ffd5-9c56-41f8-99ac-9d1ceb13daa2" name="org.inca.data">
......@@ -213,6 +214,9 @@
<concept id="1068580123137" name="jetbrains.mps.baseLanguage.structure.BooleanConstant" flags="nn" index="3clFbT">
<property id="1068580123138" name="value" index="3clFbU" />
</concept>
<concept id="1068580320020" name="jetbrains.mps.baseLanguage.structure.IntegerConstant" flags="nn" index="3cmrfG">
<property id="1068580320021" name="value" index="3cmrfH" />
</concept>
<concept id="1068581242875" name="jetbrains.mps.baseLanguage.structure.PlusExpression" flags="nn" index="3cpWs3" />
<concept id="1068581242878" name="jetbrains.mps.baseLanguage.structure.ReturnStatement" flags="nn" index="3cpWs6">
<child id="1068581517676" name="expression" index="3cqZAk" />
......@@ -363,6 +367,9 @@
<concept id="4530729936991344605" name="org.inca.core.structure.IPatternBody" flags="ng" index="1dubk2">
<child id="4530729936991965471" name="contents" index="1dgzf0" />
</concept>
<concept id="4530729936991344618" name="org.inca.core.structure.Comment" flags="ng" index="1dubkP">
<property id="4530729936991344628" name="text" index="1dubkF" />
</concept>
<concept id="4530729936991344019" name="org.inca.core.structure.IPatternModule" flags="ng" index="1dubtc">
<child id="4530729936991344607" name="contents" index="1dubk0" />
</concept>
......@@ -2466,6 +2473,9 @@
</node>
</node>
<node concept="3_zGKi" id="75UymJHZQof" role="3_zGzd">
<node concept="1XdyHb" id="2YwSXDdCWmb" role="1dgzf0">
<property role="1dubkF" value="TODO: need check that ty and entries are of the same length" />
</node>
<node concept="34odk1" id="75UymJI02S8" role="1dgzf0">
<node concept="2k1GkI" id="75UymJI04DM" role="34ocZk">
<node concept="2k1_uq" id="75UymJI04DK" role="2nKVj6">
......@@ -2479,11 +2489,6 @@
<property role="TrG5h" value="ty" />
</node>
</node>
<node concept="1waTxd" id="75UymJKTzGi" role="1dgzf0">
<node concept="3zV_Rz" id="75UymJKTzGk" role="3zVECR">
<node concept="1XdyHe" id="75UymJKTVMt" role="1dgzf0" />
</node>
<node concept="3zV_Rz" id="75UymJKTYsx" role="3zVECR">
<node concept="34odk1" id="75UymJI0iMv" role="1dgzf0">
<node concept="30NkWi" id="75UymJI0kyZ" role="34ocZk">
<ref role="XkjO9" node="75UymJHZVI6" resolve="entries" />
......@@ -2537,8 +2542,6 @@
</node>
</node>
</node>
</node>
</node>
<node concept="1XyUHm" id="75UymJHZTSp" role="3_$9z_">
<node concept="27Pwox" id="75UymJHZVGi" role="1XyUH6">
<node concept="2kdjtB" id="75UymJJKbWb" role="27Pwoi">
......@@ -2619,7 +2622,7 @@
</node>
</node>
</node>
<node concept="1XdyHe" id="75UymJHJJMC" role="1dubk0" />
<node concept="1XdyHe" id="75UymJKUptY" role="1dubk0" />
<node concept="3zyOaA" id="75UymJHJJQn" role="1dubk0">
<property role="TrG5h" value="required" />
<node concept="3zV_Rz" id="75UymJHJJQo" role="3zVECS">
......@@ -3448,8 +3451,8 @@
<node concept="2ZQB9c" id="75UymJHOm9H" role="2eP6Tc">
<ref role="2ZQB93" node="75UymJHJhQC" resolve="LTypeRecord" />
</node>
<node concept="2kHsid" id="75UymJKQ3I2" role="iwB5b">
<ref role="2kHsi0" node="75UymJHJFn7" resolve="lub" />
<node concept="2kHsid" id="2YwSXDd_Gvu" role="iwB5b">
<ref role="2kHsi0" node="75UymJHJFn7" resolve="glb" />
</node>
</node>
</node>
......@@ -3816,7 +3819,7 @@
<ref role="3_Jajq" node="75UymJHJhQC" resolve="LTypeRecord" />
</node>
<node concept="1i8UFo" id="75UymJHJRfm" role="1p_StM">
<ref role="2RnLXx" node="75UymJHJFn7" resolve="lub" />
<ref role="2RnLXx" node="75UymJHJFn7" resolve="glb" />
<node concept="37vLTw" id="75UymJHJRkv" role="2ZRyFy">
<ref role="3cqZAo" node="75UymJHJQNj" resolve="lty" />
</node>
......@@ -4019,7 +4022,7 @@
<ref role="3_Jajq" node="75UymJHJhQC" resolve="LTypeRecord" />
</node>
<node concept="1i8UFo" id="75UymJHJV$E" role="1p_StM">
<ref role="2RnLXx" node="1ZoSGYurnH9" resolve="glb" />
<ref role="2RnLXx" node="1ZoSGYurnH9" resolve="lub" />
<node concept="37vLTw" id="75UymJHJVFx" role="2ZRyFy">
<ref role="3cqZAo" node="75UymJHJV2a" resolve="lty" />
</node>
......@@ -4504,8 +4507,8 @@
<node concept="3Tm1VV" id="75UymJHJkzl" role="1B3o_S" />
<node concept="3clFbS" id="75UymJHJkzm" role="3clF47">
<node concept="3cpWs6" id="75UymJHJk$i" role="3cqZAp">
<node concept="2ZRyFJ" id="75UymJHJlyl" role="3cqZAk">
<ref role="2ZRyFH" node="75UymJHJhR7" resolve="AnyRecord" />
<node concept="1i8UFo" id="75UymJKVo0r" role="3cqZAk">
<ref role="2RnLXx" node="75UymJHJlZu" resolve="empty" />
</node>
</node>
</node>
......@@ -4519,8 +4522,8 @@
<node concept="3Tm1VV" id="75UymJHJlzx" role="1B3o_S" />
<node concept="3clFbS" id="75UymJHJlzy" role="3clF47">
<node concept="3cpWs6" id="75UymJHJqp2" role="3cqZAp">
<node concept="1i8UFo" id="75UymJHJqAp" role="3cqZAk">
<ref role="2RnLXx" node="75UymJHJlZu" resolve="empty" />
<node concept="2ZRyFJ" id="75UymJKVpCB" role="3cqZAk">
<ref role="2ZRyFH" node="75UymJHJhR7" resolve="AnyRecord" />
</node>
</node>
</node>
......@@ -4650,6 +4653,7 @@
</node>
</node>
<node concept="2slB5m" id="75UymJHJD42" role="_iOnB" />
<node concept="2slB5m" id="2YwSXDdAPCE" role="_iOnB" />
<node concept="hMdjl" id="75UymJHJDib" role="_iOnB">
<property role="TrG5h" value="leq" />
<node concept="10P_77" id="75UymJHJFbn" role="3clF45" />
......@@ -4659,9 +4663,7 @@
<node concept="3_zGKh" id="75UymJHKnF8" role="3_zGzc">
<node concept="3clFbS" id="75UymJHKnFa" role="3LOtAQ">
<node concept="3cpWs6" id="75UymJHKnGz" role="3cqZAp">
<node concept="3clFbT" id="75UymJHKnGY" role="3cqZAk">
<property role="3clFbU" value="true" />
</node>
<node concept="3clFbT" id="75UymJHKnGY" role="3cqZAk" />
</node>
</node>
<node concept="3_$9zU" id="75UymJHKnFy" role="3_$9z$" />
......@@ -4674,7 +4676,9 @@
<node concept="3_zGKh" id="75UymJHKnHY" role="3_zGzc">
<node concept="3clFbS" id="75UymJHKnI0" role="3LOtAQ">
<node concept="3cpWs6" id="75UymJHKnKm" role="3cqZAp">
<node concept="3clFbT" id="75UymJHKnKN" role="3cqZAk" />
<node concept="3clFbT" id="75UymJHKnKN" role="3cqZAk">
<property role="3clFbU" value="true" />
</node>
</node>
</node>
<node concept="3__aGB" id="75UymJHKnJm" role="3_$9z$">
......@@ -4686,7 +4690,42 @@
</node>
<node concept="3_zGKh" id="75UymJHKnMP" role="3_zGzc">
<node concept="3clFbS" id="75UymJHKnMR" role="3LOtAQ">
<node concept="3clFbJ" id="75UymJHKnXw" role="3cqZAp">
<node concept="3SKdUt" id="2YwSXDdASoP" role="3cqZAp">
<node concept="3SKdUq" id="2YwSXDdASoR" role="3SKWNk">
<property role="3SKdUp" value="is this method needed? when we only need glb or lub" />
</node>
</node>
<node concept="3SKdUt" id="75UymJKWWBC" role="3cqZAp">
<node concept="3SKdUq" id="75UymJKWWBE" role="3SKWNk">
<property role="3SKdUp" value="check if r is top element because we cannot pattern match to check if empty" />
</node>
</node>
<node concept="3clFbJ" id="75UymJKWPaK" role="3cqZAp">
<node concept="3clFbS" id="75UymJKWPaM" role="3clFbx">
<node concept="3cpWs6" id="75UymJKWU$j" role="3cqZAp">
<node concept="3clFbT" id="75UymJKWVfg" role="3cqZAk">
<property role="3clFbU" value="true" />
</node>
</node>
</node>
<node concept="3clFbC" id="75UymJKWTm4" role="3clFbw">
<node concept="3cmrfG" id="75UymJKWUeZ" role="3uHU7w">
<property role="3cmrfH" value="0" />
</node>
<node concept="2OqwBi" id="75UymJKWQjW" role="3uHU7B">
<node concept="37vLTw" id="75UymJKWP$d" role="2Oq$k0">
<ref role="3cqZAo" node="75UymJHKnSz" resolve="map2" />
</node>
<node concept="liA8E" id="75UymJKWRV6" role="2OqNvi">
<ref role="37wK5l" to="l0z0:~Map.size():int" resolve="size" />
</node>
</node>
</node>
</node>
<node concept="1X3_iC" id="75UymJKWYNy" role="lGtFl">
<property role="3V$3am" value="statement" />
<property role="3V$3ak" value="f3061a53-9226-4cc5-a443-f952ceaf5816/1068580123136/1068581517665" />
<node concept="3clFbJ" id="75UymJHKnXw" role="8Wnug">
<node concept="3y3z36" id="75UymJHKrcs" role="3clFbw">
<node concept="2OqwBi" id="75UymJHKslu" role="3uHU7w">
<node concept="37vLTw" id="75UymJHKrpC" role="2Oq$k0">
......@@ -4711,6 +4750,7 @@
</node>
</node>
</node>
</node>
<node concept="3cpWs8" id="75UymJHKvA1" role="3cqZAp">
<node concept="3cpWsn" id="75UymJHKvA4" role="3cpWs9">
<property role="TrG5h" value="it" />
......@@ -4783,7 +4823,9 @@
<node concept="3clFbJ" id="75UymJJxHh3" role="3cqZAp">
<node concept="3clFbS" id="75UymJJxHh5" role="3clFbx">
<node concept="3cpWs6" id="75UymJJxHM4" role="3cqZAp">
<node concept="3clFbT" id="75UymJJxHMC" role="3cqZAk" />
<node concept="3clFbT" id="75UymJJxHMC" role="3cqZAk">
<property role="3clFbU" value="true" />
</node>
</node>
</node>
<node concept="3clFbC" id="75UymJJxHHb" role="3clFbw">
......@@ -4816,7 +4858,9 @@
</node>
<node concept="3clFbS" id="75UymJJxI7O" role="3eOfB_">
<node concept="3cpWs6" id="75UymJJxVYU" role="3cqZAp">
<node concept="3clFbT" id="75UymJJxVZn" role="3cqZAk" />
<node concept="3clFbT" id="75UymJJxVZn" role="3cqZAk">
<property role="3clFbU" value="true" />
</node>
</node>
</node>
</node>
......@@ -4832,9 +4876,7 @@
</node>
</node>
<node concept="3cpWs6" id="75UymJHL0$w" role="3cqZAp">
<node concept="3clFbT" id="75UymJHL1jw" role="3cqZAk">
<property role="3clFbU" value="true" />
</node>
<node concept="3clFbT" id="75UymJHL1jw" role="3cqZAk" />
</node>
</node>
<node concept="3__aGB" id="75UymJHKnOn" role="3_$9z$">
......@@ -4879,7 +4921,7 @@
</node>
<node concept="2slB5m" id="75UymJHJFcw" role="_iOnB" />
<node concept="hMdjl" id="75UymJHJFn7" role="_iOnB">
<property role="TrG5h" value="lub" />
<property role="TrG5h" value="glb" />
<node concept="2ZQB9c" id="75UymJHJFMm" role="3clF45">
<ref role="2ZQB93" node="75UymJHJhQC" resolve="LTypeRecord" />
</node>
......@@ -5138,7 +5180,7 @@
</node>
<node concept="2slB5m" id="75UymJHN4dA" role="_iOnB" />
<node concept="hMdjl" id="1ZoSGYurnH9" role="_iOnB">
<property role="TrG5h" value="glb" />
<property role="TrG5h" value="lub" />
<node concept="2ZQB9c" id="75UymJHMN4O" role="3clF45">
<ref role="2ZQB93" node="75UymJHJhQC" resolve="LTypeRecord" />
</node>
......@@ -5148,7 +5190,7 @@
<node concept="3_zGKh" id="1ZoSGYuu1JE" role="3_zGzc">
<node concept="3clFbS" id="1ZoSGYuu1JG" role="3LOtAQ">
<node concept="3cpWs6" id="1ZoSGYuu1Lb" role="3cqZAp">
<node concept="37vLTw" id="1ZoSGYuu1Ms" role="3cqZAk">
<node concept="37vLTw" id="2YwSXDd$4Sf" role="3cqZAk">
<ref role="3cqZAo" node="1ZoSGYurnUW" resolve="r" />
</node>
</node>
......@@ -5163,7 +5205,7 @@
<node concept="3_zGKh" id="1ZoSGYuu1NA" role="3_zGzc">
<node concept="3clFbS" id="1ZoSGYuu1NC" role="3LOtAQ">
<node concept="3cpWs6" id="1ZoSGYuu1PA" role="3cqZAp">
<node concept="37vLTw" id="1ZoSGYuu1Qs" role="3cqZAk">
<node concept="37vLTw" id="2YwSXDd$6KZ" role="3cqZAk">
<ref role="3cqZAo" node="1ZoSGYurnQ7" resolve="l" />
</node>
</node>
......
......@@ -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();