package org.jetbrains.mps.samples.Money.typesystem; /*Generated by MPS */ import jetbrains.mps.lang.typesystem.runtime.BaseHelginsDescriptor; import jetbrains.mps.lang.typesystem.runtime.InferenceRule_Runtime; import jetbrains.mps.lang.typesystem.runtime.SubtypingRule_Runtime; import jetbrains.mps.smodel.adapter.structure.MetaAdapterFactory; import jetbrains.mps.lang.typesystem.runtime.OverloadedOperationsTypesProvider; import org.jetbrains.mps.openapi.language.SAbstractConcept; import org.jetbrains.mps.openapi.model.SNode; import jetbrains.mps.errors.IRuleConflictWarningProducer; import org.jetbrains.mps.openapi.persistence.PersistenceFacade; import jetbrains.mps.smodel.SModelUtil_new; public class TypesystemDescriptor extends BaseHelginsDescriptor { public TypesystemDescriptor() { { InferenceRule_Runtime inferenceRule = new typeof_ConvertTo_InferenceRule(); this.myInferenceRules.add(inferenceRule); } { InferenceRule_Runtime inferenceRule = new typeof_GetAmount_InferenceRule(); this.myInferenceRules.add(inferenceRule); } { InferenceRule_Runtime inferenceRule = new typeof_GetCurrency_InferenceRule(); this.myInferenceRules.add(inferenceRule); } { InferenceRule_Runtime inferenceRule = new typeof_MoneyLiteral_InferenceRule(); this.myInferenceRules.add(inferenceRule); } { InferenceRule_Runtime inferenceRule = new typeof_MovingAverage_InferenceRule(); this.myInferenceRules.add(inferenceRule); } { InferenceRule_Runtime inferenceRule = new typeof_StockPriceInquiry_InferenceRule(); this.myInferenceRules.add(inferenceRule); } { SubtypingRule_Runtime subtypingRule = new Money_extends_java_lang_Object_SubtypingRule(); this.mySubtypingRules.add(subtypingRule); } this.myOverloadedOperationsTypesProviders.add(new TypesystemDescriptor.CustomOverloadedOperationsTypesProvider_b(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfbced38fcfL, "jetbrains.mps.baseLanguage.structure.GreaterThanExpression"))); this.myOverloadedOperationsTypesProviders.add(new TypesystemDescriptor.CustomOverloadedOperationsTypesProvider_b(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x10c8d0fac2cL, "jetbrains.mps.baseLanguage.structure.GreaterThanOrEqualsExpression"))); this.myOverloadedOperationsTypesProviders.add(new TypesystemDescriptor.CustomOverloadedOperationsTypesProvider_b(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xfbced3b82aL, "jetbrains.mps.baseLanguage.structure.LessThanExpression"))); this.myOverloadedOperationsTypesProviders.add(new TypesystemDescriptor.CustomOverloadedOperationsTypesProvider_b(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0x10c8d53a915L, "jetbrains.mps.baseLanguage.structure.LessThanOrEqualsExpression"))); this.myOverloadedOperationsTypesProviders.add(new TypesystemDescriptor.CustomOverloadedOperationsTypesProvider_a(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc67c7f5L, "jetbrains.mps.baseLanguage.structure.MinusExpression"))); this.myOverloadedOperationsTypesProviders.add(new TypesystemDescriptor.CustomOverloadedOperationsTypesProvider_a(MetaAdapterFactory.getConcept(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, 0xf8cc67c7fbL, "jetbrains.mps.baseLanguage.structure.PlusExpression"))); } public static class CustomOverloadedOperationsTypesProvider_b extends OverloadedOperationsTypesProvider { public CustomOverloadedOperationsTypesProvider_b(SAbstractConcept concept) { this.myLeftOperandType = _quotation_createNode_3ist9o_a0a0a1(); this.myRightOperandType = _quotation_createNode_3ist9o_a0b0a1(); this.myOperationConcept = concept; this.myLeftTypeIsExact = false; this.myRightTypeIsExact = false; this.myRightIsStrong = false; this.myLeftIsStrong = false; this.myRuleModelId = "r:0c486cb8-8265-4e9d-90e8-118f83fd1147(org.jetbrains.mps.samples.Money.typesystem)"; this.myRuleNodeId = "2864272256649699155"; } public SNode getOperationType(SNode operation, SNode leftOperandType, SNode rightOperandType) { return _quotation_createNode_3ist9o_a0a1b(); } @Override public void reportConflict(IRuleConflictWarningProducer producer) { producer.produceWarning(myRuleModelId, myRuleNodeId); } private static SNode _quotation_createNode_3ist9o_a0a0a1() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x662a9f2b58024d16L, 0x955872c65c7a681eL, "org.jetbrains.mps.samples.Money"), 0x4b9a2fe55913516aL, "MoneyType"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_3ist9o_a0b0a1() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x662a9f2b58024d16L, 0x955872c65c7a681eL, "org.jetbrains.mps.samples.Money"), 0x4b9a2fe55913516aL, "MoneyType"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_3ist9o_a0a1b() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0xf3061a5392264cc5L, 0xa443f952ceaf5816L, "jetbrains.mps.baseLanguage"), 0xf940d6513eL, "BooleanType"), null, null, false); return quotedNode_1; } } public static class CustomOverloadedOperationsTypesProvider_a extends OverloadedOperationsTypesProvider { public CustomOverloadedOperationsTypesProvider_a(SAbstractConcept concept) { this.myLeftOperandType = _quotation_createNode_3ist9o_a0a0a2(); this.myRightOperandType = _quotation_createNode_3ist9o_a0b0a2(); this.myOperationConcept = concept; this.myLeftTypeIsExact = false; this.myRightTypeIsExact = false; this.myRightIsStrong = false; this.myLeftIsStrong = false; this.myRuleModelId = "r:0c486cb8-8265-4e9d-90e8-118f83fd1147(org.jetbrains.mps.samples.Money.typesystem)"; this.myRuleNodeId = "5447719361346552314"; } public SNode getOperationType(SNode operation, SNode leftOperandType, SNode rightOperandType) { return _quotation_createNode_3ist9o_a0a1c(); } @Override public void reportConflict(IRuleConflictWarningProducer producer) { producer.produceWarning(myRuleModelId, myRuleNodeId); } private static SNode _quotation_createNode_3ist9o_a0a0a2() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x662a9f2b58024d16L, 0x955872c65c7a681eL, "org.jetbrains.mps.samples.Money"), 0x4b9a2fe55913516aL, "MoneyType"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_3ist9o_a0b0a2() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x662a9f2b58024d16L, 0x955872c65c7a681eL, "org.jetbrains.mps.samples.Money"), 0x4b9a2fe55913516aL, "MoneyType"), null, null, false); return quotedNode_1; } private static SNode _quotation_createNode_3ist9o_a0a1c() { PersistenceFacade facade = PersistenceFacade.getInstance(); SNode quotedNode_1 = null; quotedNode_1 = SModelUtil_new.instantiateConceptDeclaration(MetaAdapterFactory.getConcept(MetaAdapterFactory.getLanguage(0x662a9f2b58024d16L, 0x955872c65c7a681eL, "org.jetbrains.mps.samples.Money"), 0x4b9a2fe55913516aL, "MoneyType"), null, null, false); return quotedNode_1; } } }