Commit 3fd1360b authored by André Pacak's avatar André Pacak

make final type checkers for record, variant and fo-recursive types more...

make final type checkers for record, variant and fo-recursive types more systematic (case, inferNormed, requiredNormed)
parent e559979c
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<model ref="r:049f7bb3-4f05-46da-8430-cb9d6874ce23(FORecursiveTypes_Checker.test.ok_mutually_rec_types)">
<persistence version="9" />
<languages>
<use id="83519d5a-e8d8-40b1-b958-7bbbda82ff24" name="FORecursiveTypes" version="0" />
</languages>
<imports>
<import index="se3d" ref="r:dbbc3a30-e198-4dc0-ba2b-f425856d088c(FORecursiveTypes.structure)" />
</imports>
<registry>
<language id="83519d5a-e8d8-40b1-b958-7bbbda82ff24" name="FORecursiveTypes">
<concept id="2294833391481651919" name="FORecursiveTypes.structure.VariantTypeEntry" flags="ng" index="228e00">
<child id="2294833391481651924" name="ty" index="228e0r" />
</concept>
<concept id="2294833391481651910" name="FORecursiveTypes.structure.VariantType" flags="ng" index="228e09">
<child id="2294833391481651915" name="elems" index="228e04" />
</concept>
<concept id="7997266186981964043" name="FORecursiveTypes.structure.ModuleElemDef" flags="ng" index="2BHCoM">
<child id="7997266186982065639" name="term" index="2BHfFu" />
</concept>
<concept id="658257277626152307" name="FORecursiveTypes.structure.Tag" flags="ng" index="2EAANM">
<child id="658257277626152331" name="t" index="2EAAKa" />
</concept>
<concept id="5790571747095872620" name="FORecursiveTypes.structure.Module" flags="ng" index="1gj3CZ">
<child id="5790571747095872621" name="elems" index="1gj3CY" />
</concept>
<concept id="8032141838602454975" name="FORecursiveTypes.structure.LetType" flags="ng" index="1s127d">
<child id="8032141838602454995" name="ty" index="1s126x" />
<child id="8032141838602454999" name="t" index="1s126_" />
</concept>
<concept id="8032141838602814340" name="FORecursiveTypes.structure.UnitTerm" flags="ng" index="1s3EnQ" />
<concept id="2012336639220440734" name="FORecursiveTypes.structure.TypeVar" flags="ng" index="3IOpWs" />
<concept id="2012336639220440697" name="FORecursiveTypes.structure.UnitType" flags="ng" index="3IOpZV" />
<concept id="1894367444356273023" name="FORecursiveTypes.structure.Anno" flags="ng" index="1SCrpo">
<child id="1894367444356273028" name="t" index="1SCrqz" />
<child id="1894367444356273109" name="ty" index="1SCrrM" />
</concept>
</language>
<language id="ceab5195-25ea-4f22-9b92-103b95ca8c0c" name="jetbrains.mps.lang.core">
<concept id="1169194658468" name="jetbrains.mps.lang.core.structure.INamedConcept" flags="ng" index="TrEIO">
<property id="1169194664001" name="name" index="TrG5h" />
</concept>
</language>
</registry>
<node concept="1gj3CZ" id="4m9X9ub89kT">
<property role="TrG5h" value="OkMutuallyRecTypes" />
<node concept="2BHCoM" id="4m9X9ub89kU" role="1gj3CY">
<property role="TrG5h" value="test" />
<node concept="1s127d" id="4m9X9ub89le" role="2BHfFu">
<property role="TrG5h" value="Even" />
<node concept="228e09" id="4m9X9ub89lr" role="1s126x">
<node concept="228e00" id="4m9X9ub89lw" role="228e04">
<property role="TrG5h" value="zero" />
<node concept="3IOpZV" id="4m9X9ub89lV" role="228e0r" />
</node>
<node concept="228e00" id="4m9X9ub89m0" role="228e04">
<property role="TrG5h" value="succ1" />
<node concept="3IOpWs" id="4m9X9ub89mm" role="228e0r">
<property role="TrG5h" value="Odd" />
</node>
</node>
</node>
<node concept="1s127d" id="4m9X9ub89mr" role="1s126_">
<property role="TrG5h" value="Odd" />
<node concept="228e09" id="4m9X9ub89mC" role="1s126x">
<node concept="228e00" id="4m9X9ub89mH" role="228e04">
<property role="TrG5h" value="one" />
<node concept="3IOpZV" id="4m9X9ub89mR" role="228e0r" />
</node>
<node concept="228e00" id="4m9X9ub89mW" role="228e04">
<property role="TrG5h" value="succ2" />
<node concept="3IOpWs" id="4m9X9ub89na" role="228e0r">
<property role="TrG5h" value="Even" />
</node>
</node>
</node>
<node concept="1SCrpo" id="4m9X9ub89nf" role="1s126_">
<node concept="2EAANM" id="4m9X9ub89nB" role="1SCrqz">
<property role="TrG5h" value="succ1" />
<node concept="2EAANM" id="4m9X9ub89nQ" role="2EAAKa">
<property role="TrG5h" value="one" />
<node concept="1s3EnQ" id="4m9X9ub89oh" role="2EAAKa" />
</node>
</node>
<node concept="3IOpWs" id="4m9X9ub89ns" role="1SCrrM">
<property role="TrG5h" value="Even" />
</node>
</node>
</node>
</node>
</node>
</node>
</model>
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="32khcnyrzzm5zdetceut0l7x5d1vbng">
<files names="AnalysisResultAccess.java:ConstantDefinitions.java:LType.java:LTypeVariant.java:QuerySpecificationHints.java:Typing_AllvarsQuerySpecification.java:Typing_Allvars_0_switchCommonQuerySpecification.java:Typing_AsLTypeQuerySpecification.java:Typing_AsLTypeVariantQuerySpecification.java:Typing_AsLTypeVariant_0_switchCommonQuerySpecification.java:Typing_AsLTypeVariant_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_LookupCaseConditionQuerySpecification.java:Typing_LookupFailureQuerySpecification.java:Typing_LookupFailure_0_switchCommonQuerySpecification.java:Typing_LookupQuerySpecification.java:Typing_LookupTypeVarFailureQuerySpecification.java:Typing_LookupTypeVarFailure_0_switchCommonQuerySpecification.java:Typing_LookupTypeVarQuerySpecification.java:Typing_LookupTypeVar_0_switchCommonQuerySpecification.java:Typing_Lookup_0_switchCommonQuerySpecification.java:Typing_MatchFunFailureQuerySpecification.java:Typing_MatchFunFailure_0_switchCommonQuerySpecification.java:Typing_MatchVariantFailureQuerySpecification.java:Typing_MatchVariantFailure_0_switchCommonQuerySpecification.java:Typing_RequiredQuerySpecification.java:Typing_Required_0_switchCommonQuerySpecification.java" />
<product version="3" modelHash="-9tusnvn91o0ilat0qwqvdawrcuqsg3o">
<files names="AnalysisResultAccess.java:ConstantDefinitions.java:LType.java:LTypeVariant.java:QuerySpecificationHints.java:Typing_AllvarsQuerySpecification.java:Typing_Allvars_0_switchCommonQuerySpecification.java:Typing_AsLTypeQuerySpecification.java:Typing_AsLTypeVariantQuerySpecification.java:Typing_AsLTypeVariant_0_switchCommonQuerySpecification.java:Typing_AsLTypeVariant_WrappedQuerySpecification.java:Typing_AsLType_0_switchCommonQuerySpecification.java:Typing_CheckErrorQuerySpecification.java:Typing_CheckQuerySpecification.java:Typing_Check_0_switchCommonQuerySpecification.java:Typing_InferNormedQuerySpecification.java:Typing_InferNormed_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_LookupTypeVarFailureQuerySpecification.java:Typing_LookupTypeVarFailure_0_switchCommonQuerySpecification.java:Typing_LookupTypeVarQuerySpecification.java:Typing_LookupTypeVar_0_switchCommonQuerySpecification.java:Typing_Lookup_0_switchCommonQuerySpecification.java:Typing_MatchFunFailureQuerySpecification.java:Typing_MatchFunFailure_0_switchCommonQuerySpecification.java:Typing_MatchVariantFailureQuerySpecification.java:Typing_MatchVariantFailure_0_switchCommonQuerySpecification.java:Typing_RequiredNormedQuerySpecification.java:Typing_RequiredNormed_0_switchCommonQuerySpecification.java:Typing_RequiredQuerySpecification.java:Typing_Required_0_switchCommonQuerySpecification.java" />
</product>
<?xml version="1.0" encoding="UTF-8"?>
<product version="3" modelHash="9v1evhkotxrgia7u21yevrxmfmzl3pz" />
......@@ -29,38 +29,38 @@ 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.getProperty(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x9229981a3b8f721L, 0x9229981a3b8f726L, "label"));
this.conceptFeatures.add(MetaAdapterFactory.getProperty(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x9229981a3b8f721L, 0x9229981a3b8f72aL, "name"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x9229981a3b8f61cL, 0x9229981a3b8f62fL, "cases"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9302L, 0x1a4a252762eb930bL, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb93f1L, 0x1a4a252762eb93f6L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1fd8e2cf9df802cfL, 0x1fd8e2cf9df802d4L, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "matchee"));
this.conceptFeatures.add(MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb92d7L, 0x1a4a252762eb92dcL, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb936bL, 0x1a4a252762eb9378L, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9390L, 0x1a4a252762eb9395L, "ty1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9312L, 0x1a4a252762eb931bL, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9390L, 0x1a4a252762eb9399L, "ty2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb937fL, 0x1a4a252762eb93d5L, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9322L, 0x1a4a252762eb9336L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb936bL, 0x1a4a252762eb9374L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9302L, 0x1a4a252762eb9307L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9312L, 0x1a4a252762eb9317L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x6f77e6723373c7bfL, 0x6f77e6723373c7d3L, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getReferenceLink(0xb802a05692a24fbcL, 0x902ef8e5004c331fL, 0x7980b687ac7456feL, 0x7980b687ac7456ffL, "parent"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x9229981a3b8f721L, 0x9229981a3b8f731L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb937fL, 0x1a4a252762eb9384L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1fd8e2cf9df802c6L, 0x1fd8e2cf9df802cbL, "elems"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb933aL, 0x1a4a252762eb9352L, "body"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x9229981a3b8f61cL, 0x9229981a3b8f621L, "matchee"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x6f77e6723373c7bfL, 0x6f77e6723373c7d7L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb933aL, 0x1a4a252762eb934eL, "bound"));
this.conceptFeatures.add(MetaAdapterFactory.getReferenceLink(0xb802a05692a24fbcL, 0x902ef8e5004c331fL, 0x7980b687ac7456feL, 0x7980b687ac7456ffL, "parent"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb937fL, 0x1a4a252762eb9384L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x9229981a3b8f573L, 0x9229981a3b8f58bL, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb93f1L, 0x1a4a252762eb93f6L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x6f77e6723373c7bfL, 0x6f77e6723373c7d3L, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1fd8e2cf9df802cfL, 0x1fd8e2cf9df802d4L, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9302L, 0x1a4a252762eb930bL, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb933aL, 0x1a4a252762eb934eL, "bound"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x9229981a3b8f61cL, 0x9229981a3b8f62fL, "cases"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9312L, 0x1a4a252762eb931bL, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9390L, 0x1a4a252762eb9395L, "ty1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9312L, 0x1a4a252762eb9317L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9302L, 0x1a4a252762eb9307L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb9390L, 0x1a4a252762eb9399L, "ty2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x9229981a3b8f721L, 0x9229981a3b8f731L, "t"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb93faL, 0x1a4a252762eb93ffL, "ty"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb936bL, 0x1a4a252762eb9374L, "t1"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb936bL, 0x1a4a252762eb9378L, "t2"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1fd8e2cf9df802c6L, 0x1fd8e2cf9df802cbL, "elems"));
this.conceptFeatures.add(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb937fL, 0x1a4a252762eb93d5L, "ty"));
this.languages = new HashSet<SLanguage>();
this.languages.add(MetaAdapterFactory.getLanguage(0xb802a05692a24fbcL, 0x902ef8e5004c331fL, "ceab5195-25ea-4f22-9b92-103b95ca8c0c"));
......
......@@ -89,14 +89,14 @@ public final class Typing_AsLTypeVariantQuerySpecification extends MPSQuerySpeci
exportedParameters.add(new ExportedParameter(body, var_out_1, p_out_1));
body.setSymbolicParameters(exportedParameters);
PVariable var__1284323678216528319 = body.getOrCreateVariableByName("1284323678216528319");
PVariable var__1284323678216528327 = body.newVirtualVariable();
PVariable var__1284323678216528322 = body.getOrCreateVariableByName("1284323678216528322");
PVariable var__703677452244313737 = body.newVirtualVariable();
PVariable var__703677452244313729 = body.getOrCreateVariableByName("703677452244313729");
PVariable var__703677452244313732 = body.getOrCreateVariableByName("703677452244313732");
new TypeConstraint(body, Tuples.flatTupleOf(var_type), new ConceptKey(MetaAdapterFactory.getConcept(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1fd8e2cf9df802c6L, "FORecursiveTypes.structure.VariantType")));
new PositivePatternCall(body, Tuples.flatTupleOf(var_type, var__1284323678216528319), Typing_AsLTypeVariant_WrappedQuerySpecification.instance().getInternalQueryRepresentation());
new AggregatorConstraint(new BoundAggregator(LTypeVariant.instance().aggregator_lub, LTypeVariant.LTypeVariantElement.class, LTypeVariant.LTypeVariantElement.class), body, Tuples.flatTupleOf(var_type, var__1284323678216528322), Typing_AsLTypeVariant_WrappedQuerySpecification.instance().getInternalQueryRepresentation(), var__1284323678216528327, 1);
new Equality(body, var_out_1, var__1284323678216528327);
new PositivePatternCall(body, Tuples.flatTupleOf(var_type, var__703677452244313729), Typing_AsLTypeVariant_WrappedQuerySpecification.instance().getInternalQueryRepresentation());
new AggregatorConstraint(new BoundAggregator(LTypeVariant.instance().aggregator_lub, LTypeVariant.LTypeVariantElement.class, LTypeVariant.LTypeVariantElement.class), body, Tuples.flatTupleOf(var_type, var__703677452244313732), Typing_AsLTypeVariant_WrappedQuerySpecification.instance().getInternalQueryRepresentation(), var__703677452244313737, 1);
new Equality(body, var_out_1, var__703677452244313737);
SetSequence.fromSet(bodies).addElement(body);
}
......
......@@ -92,30 +92,30 @@ public final class Typing_AsLTypeVariant_WrappedQuerySpecification extends MPSQu
exportedParameters.add(new ExportedParameter(body, var_out_1, p_out_1));
body.setSymbolicParameters(exportedParameters);
PVariable var__tmp_546 = body.getOrCreateVariableByName("tmp_546");
PVariable var__tmp_391 = body.getOrCreateVariableByName("tmp_391");
PVariable var__tmp_392 = body.getOrCreateVariableByName("tmp_392");
PVariable var__ty = body.getOrCreateVariableByName("ty");
PVariable var__tmp_547 = body.getOrCreateVariableByName("tmp_547");
PVariable var__tmp_548 = body.getOrCreateVariableByName("tmp_548");
PVariable var__tmp_549 = body.getOrCreateVariableByName("tmp_549");
PVariable var__tmp_545 = body.getOrCreateVariableByName("tmp_545");
PVariable var__1284323678216572198 = body.newVirtualVariable();
PVariable var__tmp_390 = body.getOrCreateVariableByName("tmp_390");
PVariable var__tmp_388 = body.getOrCreateVariableByName("tmp_388");
PVariable var__tmp_389 = body.getOrCreateVariableByName("tmp_389");
PVariable var__elem = body.getOrCreateVariableByName("elem");
PVariable var__l = body.getOrCreateVariableByName("l");
PVariable var__703677452244350070 = body.newVirtualVariable();
new TypeConstraint(body, Tuples.flatTupleOf(var_type), new ConceptKey(MetaAdapterFactory.getConcept(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1fd8e2cf9df802c6L, "FORecursiveTypes.structure.VariantType")));
new PositivePatternCall(body, Tuples.flatTupleOf(), Typing_AsLTypeVariant_0_switchCommonQuerySpecification.instance().getInternalQueryRepresentation());
new TypeConstraint(body, Tuples.staticArityFlatTupleOf(var_type, var__tmp_545), new ConceptFeatureKey(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1fd8e2cf9df802c6L, 0x1fd8e2cf9df802cbL, "elems")));
new Equality(body, var__elem, var__tmp_545);
new TypeConstraint(body, Tuples.staticArityFlatTupleOf(var__elem, var__tmp_546), new ConceptFeatureKey(MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")));
new Equality(body, var__l, var__tmp_546);
new TypeConstraint(body, Tuples.staticArityFlatTupleOf(var__elem, var__tmp_547), new ConceptFeatureKey(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1fd8e2cf9df802cfL, 0x1fd8e2cf9df802d4L, "ty")));
new PositivePatternCall(body, Tuples.flatTupleOf(var__tmp_547, var__tmp_548), Typing_AsLTypeQuerySpecification.instance().getInternalQueryRepresentation());
new Equality(body, var__ty, var__tmp_548);
new TypeConstraint(body, Tuples.staticArityFlatTupleOf(var_type, var__tmp_388), new ConceptFeatureKey(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1fd8e2cf9df802c6L, 0x1fd8e2cf9df802cbL, "elems")));
new Equality(body, var__elem, var__tmp_388);
new TypeConstraint(body, Tuples.staticArityFlatTupleOf(var__elem, var__tmp_389), new ConceptFeatureKey(MetaAdapterFactory.getProperty(0xceab519525ea4f22L, 0x9b92103b95ca8c0cL, 0x110396eaaa4L, 0x110396ec041L, "name")));
new Equality(body, var__l, var__tmp_389);
new TypeConstraint(body, Tuples.staticArityFlatTupleOf(var__elem, var__tmp_390), new ConceptFeatureKey(MetaAdapterFactory.getContainmentLink(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1fd8e2cf9df802cfL, 0x1fd8e2cf9df802d4L, "ty")));
new PositivePatternCall(body, Tuples.flatTupleOf(var__tmp_390, var__tmp_391), Typing_AsLTypeQuerySpecification.instance().getInternalQueryRepresentation());
new Equality(body, var__ty, var__tmp_391);
new ExpressionEvaluation(body, new IExpressionEvaluator() {
@Override
public String getShortDescription() {
return "1284323678216572198";
return "703677452244350070";
}
@Override
......@@ -128,9 +128,9 @@ public final class Typing_AsLTypeVariant_WrappedQuerySpecification extends MPSQu
return LTypeVariant.instance().singleton((CodeGenerationHelper.demandWrapString(valueProvider.getValue("l"))), ((LType.LTypeElement) valueProvider.getValue("ty")));
}
}, var__1284323678216572198, false);
new Equality(body, var__tmp_549, var__1284323678216572198);
new Equality(body, var__tmp_549, var_out_1);
}, var__703677452244350070, false);
new Equality(body, var__tmp_392, var__703677452244350070);
new Equality(body, var__tmp_392, var_out_1);
SetSequence.fromSet(bodies).addElement(body);
}
......@@ -144,8 +144,8 @@ public final class Typing_AsLTypeVariant_WrappedQuerySpecification extends MPSQu
exportedParameters.add(new ExportedParameter(body, var_out_1, p_out_1));
body.setSymbolicParameters(exportedParameters);
PVariable var__1284323678216572216 = body.newVirtualVariable();
PVariable var__tmp_550 = body.getOrCreateVariableByName("tmp_550");
PVariable var__tmp_393 = body.getOrCreateVariableByName("tmp_393");
PVariable var__703677452244350088 = body.newVirtualVariable();
new TypeConstraint(body, Tuples.flatTupleOf(var_type), new ConceptKey(MetaAdapterFactory.getConcept(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1fd8e2cf9df802c6L, "FORecursiveTypes.structure.VariantType")));
new PositivePatternCall(body, Tuples.flatTupleOf(), Typing_AsLTypeVariant_0_switchCommonQuerySpecification.instance().getInternalQueryRepresentation());
......@@ -153,7 +153,7 @@ public final class Typing_AsLTypeVariant_WrappedQuerySpecification extends MPSQu
@Override
public String getShortDescription() {
return "1284323678216572216";
return "703677452244350088";
}
@Override
......@@ -166,9 +166,9 @@ public final class Typing_AsLTypeVariant_WrappedQuerySpecification extends MPSQu
return LTypeVariant.instance().empty();
}
}, var__1284323678216572216, false);
new Equality(body, var__tmp_550, var__1284323678216572216);
new Equality(body, var__tmp_550, var_out_1);
}, var__703677452244350088, false);
new Equality(body, var__tmp_393, var__703677452244350088);
new Equality(body, var__tmp_393, var_out_1);
SetSequence.fromSet(bodies).addElement(body);
}
......
......@@ -94,23 +94,23 @@ public final class Typing_CheckErrorQuerySpecification extends MPSQuerySpecifica
exportedParameters.add(new ExportedParameter(body, var_out_2, p_out_2));
body.setSymbolicParameters(exportedParameters);
PVariable var__703677452244345666 = body.newVirtualVariable();
PVariable var__term = body.getOrCreateVariableByName("term");
PVariable var__tmp_82 = body.getOrCreateVariableByName("tmp_82");
PVariable var__tmp_84 = body.getOrCreateVariableByName("tmp_84");
PVariable var__tmp_83 = body.getOrCreateVariableByName("tmp_83");
PVariable var__1284323678216487120 = body.newConstantVariable(Integer.parseInt("0"));
PVariable var__1284323678216566579 = body.newVirtualVariable();
PVariable var__tmp_35 = body.getOrCreateVariableByName("tmp_35");
PVariable var__703677452244279102 = body.newConstantVariable(Integer.parseInt("0"));
PVariable var__tmp_37 = body.getOrCreateVariableByName("tmp_37");
PVariable var__tmp_36 = body.getOrCreateVariableByName("tmp_36");
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(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb92d1L, "FORecursiveTypes.structure.Term")));
new PositivePatternCall(body, Tuples.flatTupleOf(var__term, var__tmp_82), Typing_RequiredQuerySpecification.instance().getInternalQueryRepresentation());
new PositivePatternCall(body, Tuples.flatTupleOf(var__term, var__tmp_35), Typing_RequiredQuerySpecification.instance().getInternalQueryRepresentation());
new NegativePatternCall(body, Tuples.flatTupleOf(var__term), Typing_CheckQuerySpecification.instance().getInternalQueryRepresentation());
new Equality(body, var__tmp_83, var__1284323678216487120);
new Equality(body, var__tmp_36, var__703677452244279102);
new ExpressionEvaluation(body, new IExpressionEvaluator() {
@Override
public String getShortDescription() {
return "1284323678216566579";
return "703677452244345666";
}
@Override
......@@ -123,11 +123,11 @@ public final class Typing_CheckErrorQuerySpecification extends MPSQuerySpecifica
return String.format("check failed");
}
}, var__1284323678216566579, false);
new Equality(body, var__tmp_84, var__1284323678216566579);
new Equality(body, var__tmp_83, var_out_0);
}, var__703677452244345666, false);
new Equality(body, var__tmp_37, var__703677452244345666);
new Equality(body, var__tmp_36, var_out_0);
new Equality(body, var__term, var_out_1);
new Equality(body, var__tmp_84, var_out_2);
new Equality(body, var__tmp_37, var_out_2);
SetSequence.fromSet(bodies).addElement(body);
}
......
package FORecursiveTypes_Checker.model;
/*Generated by MPS */
import org.inca.core.runtime.plugin.MPSQuerySpecification;
import org.inca.core.runtime.plugin.MPSQuerySpecificationHints;
import org.inca.core.runtime.plugin.MPSGenericPatternMatcher;
import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
import org.eclipse.viatra.query.runtime.exception.ViatraQueryException;
import org.eclipse.viatra.query.runtime.api.scope.QueryScope;
import org.inca.core.runtime.plugin.AbstractScope;
import org.inca.core.runtime.plugin.AbstractPQuery;
import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
import org.inca.core.runtime.plugin.ConceptKey;
import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory;
import org.inca.data.runtime.plugin.LatticeInputKey;
import java.util.Set;
import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
import org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException;
import jetbrains.mps.internal.collections.runtime.SetSequence;
import java.util.HashSet;
import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
import java.util.List;
import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
import java.util.ArrayList;
import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator;
import java.util.Arrays;
import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider;
import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality;
@SuppressWarnings("all")
public final class Typing_InferNormedQuerySpecification extends MPSQuerySpecification {
private Typing_InferNormedQuerySpecification() {
super(Typing_InferNormedQuerySpecification.GeneratedPQuery.INSTANCE);
}
@Override
public MPSQuerySpecificationHints getHints() {
return QuerySpecificationHints.instance();
}
@Override
protected MPSGenericPatternMatcher instantiate(ViatraQueryEngine engine) throws ViatraQueryException {
return MPSGenericPatternMatcher.on(engine, this);
}
@Override
public Class<? extends QueryScope> getPreferredScopeClass() {
return AbstractScope.class;
}
public static Typing_InferNormedQuerySpecification instance() {
return Typing_InferNormedQuerySpecification.LazyHolder.INSTANCE;
}
@SuppressWarnings("all")
private static final class LazyHolder {
private static final Typing_InferNormedQuerySpecification INSTANCE = make();
public static Typing_InferNormedQuerySpecification make() {
return new Typing_InferNormedQuerySpecification();
}
}
private static final class GeneratedPQuery extends AbstractPQuery {
private final PParameter p_t = new PParameter("t", "FORecursiveTypes.structure.Term", new ConceptKey(MetaAdapterFactory.getInterfaceConcept(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb92d1L, "FORecursiveTypes.structure.Term")));
private final PParameter p_out_1 = new PParameter("out_1", "FORecursiveTypes_Checker.model.LType", new LatticeInputKey("FORecursiveTypes_Checker.model.LType", LType.instance()));
private static final Typing_InferNormedQuerySpecification.GeneratedPQuery INSTANCE = new Typing_InferNormedQuerySpecification.GeneratedPQuery();
@Override
protected Set<PBody> doGetContainedBodies() throws QueryInitializationException {
Set<PBody> bodies = SetSequence.fromSet(new HashSet<PBody>());
{
PBody body = new PBody(this);
PVariable var_t = body.getOrCreateVariableByName("t");
PVariable var_out_1 = body.getOrCreateVariableByName("out_1");
List<ExportedParameter> exportedParameters = new ArrayList<ExportedParameter>();
exportedParameters.add(new ExportedParameter(body, var_t, p_t));
exportedParameters.add(new ExportedParameter(body, var_out_1, p_out_1));
body.setSymbolicParameters(exportedParameters);
PVariable var__tmp_294 = body.getOrCreateVariableByName("tmp_294");
PVariable var__tmp_295 = body.getOrCreateVariableByName("tmp_295");
PVariable var__ty = body.getOrCreateVariableByName("ty");
PVariable var__703677452244348841 = body.newVirtualVariable();
PVariable var__703677452244304979 = body.newConstantVariable(true);
PVariable var__typeVarName = body.getOrCreateVariableByName("typeVarName");
PVariable var__703677452244348860 = body.newVirtualVariable();
PVariable var__tmp_296 = body.getOrCreateVariableByName("tmp_296");
PVariable var__tmp_297 = body.getOrCreateVariableByName("tmp_297");
new TypeConstraint(body, Tuples.flatTupleOf(var_t), new ConceptKey(MetaAdapterFactory.getInterfaceConcept(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb92d1L, "FORecursiveTypes.structure.Term")));
new PositivePatternCall(body, Tuples.flatTupleOf(var_t, var__ty), Typing_InferNormed_0_switchCommonQuerySpecification.instance().getInternalQueryRepresentation());
new ExpressionEvaluation(body, new IExpressionEvaluator() {
@Override
public String getShortDescription() {
return "703677452244348841";
}
@Override
public Iterable<String> getInputParameterNames() {
return Arrays.asList("ty");
}
@Override
public Object evaluateExpression(IValueProvider valueProvider) throws Exception {
return LType.instance().isTypeVar(((LType.LTypeElement) valueProvider.getValue("ty")));
}
}, var__703677452244348841, false);
new Equality(body, var__tmp_294, var__703677452244348841);
new Equality(body, var__tmp_295, var__703677452244304979);
new Equality(body, var__tmp_294, var__tmp_295);
new ExpressionEvaluation(body, new IExpressionEvaluator() {
@Override
public String getShortDescription() {
return "703677452244348860";
}
@Override
public Iterable<String> getInputParameterNames() {
return Arrays.asList("ty");
}
@Override
public Object evaluateExpression(IValueProvider valueProvider) throws Exception {
return LType.instance().typeVarString(((LType.LTypeElement) valueProvider.getValue("ty")));
}
}, var__703677452244348860, false);
new Equality(body, var__tmp_296, var__703677452244348860);
new Equality(body, var__typeVarName, var__tmp_296);
new PositivePatternCall(body, Tuples.flatTupleOf(var_t, var__typeVarName, var__tmp_297), Typing_LookupTypeVarQuerySpecification.instance().getInternalQueryRepresentation());
new Equality(body, var__tmp_297, var_out_1);
SetSequence.fromSet(bodies).addElement(body);
}
{
PBody body = new PBody(this);
PVariable var_t = body.getOrCreateVariableByName("t");
PVariable var_out_1 = body.getOrCreateVariableByName("out_1");
List<ExportedParameter> exportedParameters = new ArrayList<ExportedParameter>();
exportedParameters.add(new ExportedParameter(body, var_t, p_t));
exportedParameters.add(new ExportedParameter(body, var_out_1, p_out_1));
body.setSymbolicParameters(exportedParameters);
PVariable var__703677452244348887 = body.newVirtualVariable();
PVariable var__ty = body.getOrCreateVariableByName("ty");
PVariable var__703677452244305042 = body.newConstantVariable(true);
PVariable var__tmp_298 = body.getOrCreateVariableByName("tmp_298");
PVariable var__tmp_299 = body.getOrCreateVariableByName("tmp_299");
new TypeConstraint(body, Tuples.flatTupleOf(var_t), new ConceptKey(MetaAdapterFactory.getInterfaceConcept(0x83519d5ae8d840b1L, 0xb9587bbbda82ff24L, 0x1a4a252762eb92d1L, "FORecursiveTypes.structure.Term")));
new PositivePatternCall(body, Tuples.flatTupleOf(var_t, var__ty), Typing_InferNormed_0_switchCommonQuerySpecification.instance().getInternalQueryRepresentation());
new ExpressionEvaluation(body, new IExpressionEvaluator() {
@Override
public String getShortDescription() {