package jetbrains.mps.baseLanguage.collections.typesystem; /*Generated by MPS */ import jetbrains.mps.lang.typesystem.runtime.AbstractInequationReplacementRule_Runtime; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.typesystem.inference.EquationInfo; import jetbrains.mps.typesystem.inference.TypeCheckingContext; import jetbrains.mps.lang.typesystem.runtime.IsApplicable2Status; import jetbrains.mps.lang.smodel.generator.smodelAdapter.SLinkOperations; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.typesystem.inference.TypeChecker; import jetbrains.mps.lang.typesystem.runtime.IsApplicableStatus; import org.jetbrains.mps.openapi.language.SAbstractConcept; public class enumerator_subtypeOf_enumerator_InequationReplacementRule extends AbstractInequationReplacementRule_Runtime { public enumerator_subtypeOf_enumerator_InequationReplacementRule() { } public void processInequation(final SNode subtype, final SNode supertype, final EquationInfo equationInfo, final TypeCheckingContext typeCheckingContext, IsApplicable2Status status, final boolean inequalityIsWeak, final boolean inequalityIsLessThan) { { SNode _nodeToCheck_1029348928467 = equationInfo.getNodeWithError(); EquationInfo _info_12389875345 = new EquationInfo(_nodeToCheck_1029348928467, null, "r:00000000-0000-4000-0000-011c8959032b(jetbrains.mps.baseLanguage.collections.typesystem)", "1237496801702", 0, null); _info_12389875345.getOuterRulesIdFromInfo(equationInfo); typeCheckingContext.createLessThanInequality((SNode) SLinkOperations.getTarget(subtype, MetaAdapterFactory.getContainmentLink(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x12020864111L, 0x12020864112L, "elementType")), (SNode) SLinkOperations.getTarget(supertype, MetaAdapterFactory.getContainmentLink(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x12020864111L, 0x12020864112L, "elementType")), false, true, _info_12389875345); } } public boolean checkInequation(final SNode subtype, final SNode supertype, final EquationInfo equationInfo, IsApplicable2Status status, final boolean inequalityIsWeak, final boolean inequalityIsLessThan) { boolean result_14532009 = true; result_14532009 = result_14532009 && TypeChecker.getInstance().getSubtypingManager().isSubtype((SNode) SLinkOperations.getTarget(subtype, MetaAdapterFactory.getContainmentLink(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x12020864111L, 0x12020864112L, "elementType")), (SNode) SLinkOperations.getTarget(supertype, MetaAdapterFactory.getContainmentLink(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x12020864111L, 0x12020864112L, "elementType")), true); return result_14532009; } public boolean isWeak() { return true; } public IsApplicableStatus isApplicableSubtypeAndPattern(SNode node) { return new IsApplicableStatus(node.getConcept().isSubConceptOf(getApplicableSubtypeConcept()), null); } public IsApplicableStatus isApplicableSupertypeAndPattern(SNode node) { return new IsApplicableStatus(node.getConcept().isSubConceptOf(getApplicableSupertypeConcept()), null); } public SAbstractConcept getApplicableSubtypeConcept() { return MetaAdapterFactory.getConcept(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x12020864111L, "jetbrains.mps.baseLanguage.collections.structure.EnumeratorType"); } public SAbstractConcept getApplicableSupertypeConcept() { return MetaAdapterFactory.getConcept(0x8388864671ce4f1cL, 0x9c53c54016f6ad4fL, 0x12020864111L, "jetbrains.mps.baseLanguage.collections.structure.EnumeratorType"); } }