Custom SNodeOperation not working in typesystem aspect, but works in editor and behavior?

I have two languages, lets call them "Core" and "Meta"

Meta has a custom SNodeOperation concept, let's call it "doTheThing".

Core uses that operation in a couple places. 

In Core's "behavior" and "editor" aspects, the reduction appears to work find, and the expected output is observed.

In the "typesystem" aspect, however, the DotExpression node containing "doTheThing" is simply replaced with "doTheThing" node. 

 

My configurations:

Core Language Module: Depends on "Meta" and Extends "Meta"

Core.behavior model used languages includes "Meta"

Core.typesystem model used languages includes: Uses "Meta"

 

Meta Language Module: Extends jetbrains.mps.lang.smodel

Meta Language Generator Module: extends jetbrains.mps.lang.smodel#1139186730696, Priorities: Meta generator runs "=" all smodel generators

I have a template switch_DoTheThing_node extends switch_SNodeOperation_node.

I have nothing in my main configuration.

---

Maybe relevant: I'm working off my own build of the master branch of MPS, (pulled last friday), but I had similar problems with 2018.3.

 

4 comments

You may use the "Show generation trace/traceback" functionality (with "transient models" turned on) to investigate, which generator rules effect the code generated for your typesystem aspect.

Vaclav

 

0

[][][][][][][][][][][][] behavior plan [][][][][][][][][][][][]

> #showGenPlan net.virtualinfinity.binary.Core.behavior
Ignored mapping priority rules:

Generator for language jetbrains.mps.lang.actions defines invalid priority rule [jetbrains.mps.lang.actions#1154466409006:jetbrains.mps.lang.actions.generator.baseLanguage.template.main.ACTL_main] strictly_together [jetbrains.mps.lang.sharedConcepts#1161623873951:jetbrains.mps.lang.sharedConcepts.generator.baseLanguage.template.main.mc_conceptFunctionParameters], with no mapping configurations specified at one side. The rule is ignored.
Rule: [jetbrains.mps.lang.actions#1154466409006:jetbrains.mps.lang.actions.generator.baseLanguage.template.main.ACTL_main] strictly_together [jetbrains.mps.lang.sharedConcepts#1161623873951:jetbrains.mps.lang.sharedConcepts.generator.baseLanguage.template.main.mc_conceptFunctionParameters]
=================================
--------------------- mappings partitioning -----------------------------------

[ 1 ]
jetbrains.mps.lang.core.generator.template.main.*

[ 2 ]
jetbrains.mps.lang.quotation.generator.baseLanguage.template.main.*

[ 3 ]
jetbrains.mps.lang.actions.generator.baseLanguage.template.main.ACTL_main

[ 4 ]
jetbrains.mps.lang.descriptor.generator.template.main.*

[ 5 ]
jetbrains.mps.lang.refactoring.generator.baseLanguage.template.main.*

[ 6 ]
jetbrains.mps.lang.actions.generator.baseLanguage.template.main.node_operations
jetbrains.mps.lang.behavior.generator.template.main.*
jetbrains.mps.lang.smodel.generator.baseLanguage.template.main.*
jetbrains.mps.lang.structure.generator_new.baseLanguage.MAPPING_descriptors
main.*

[ 7 ]
jetbrains.mps.baseLanguage.collections.generator.baseLanguage.template.pre.*

[ 8 ]
jetbrains.mps.lang.structure.generator_new.baseLanguage.MAPPING_main

[ 9 ]
jetbrains.mps.baseLanguage.collections.generator.baseLanguage.template.main.*
jetbrains.mps.baseLanguage.collections.generator.baseLanguage.template.post.*

[ 10 ]
jetbrains.mps.lang.resources.generator.template.main.*

[ 11 ]
jetbrains.mps.baseLanguage.closures.generator.baseLanguage.template.main.preproc

[ 12 ]
jetbrains.mps.baseLanguage.closures.generator.baseLanguage.template.main.main

[ 13 ]
jetbrains.mps.baseLanguage.jdk7.generator.template.main.*

[ 14 ]
jetbrains.mps.baseLanguage.generator.java.properties.*

[ 15 ]
jetbrains.mps.baseLanguage.generator.java.references.desugar

[ 16 ]
jetbrains.mps.baseLanguage.generator.java.references.main

[ 17 ]
jetbrains.mps.baseLanguage.generator.java.closures.*
jetbrains.mps.baseLanguage.generator.java.main.*
jetbrains.mps.baseLanguage.generator.java.strings.*
jetbrains.mps.baseLanguageInternal.generator.template.main.*

---------------------------------------------------------------------------------
Model directly uses next languages (including explicitly engaged, if any):
jetbrains.mps.lang.smodel
net.virtualinfinity.binary.Meta
jetbrains.mps.lang.behavior
jetbrains.mps.baseLanguage.collections
jetbrains.mps.lang.quotation
jetbrains.mps.lang.actions
jetbrains.mps.baseLanguage
jetbrains.mps.baseLanguage.closures
=================================
Engaged generators with trace:
EngagedGenerator: jetbrains.mps.lang.smodel/BL as OWNED through [EngagedLanguage: jetbrains.mps.lang.smodel]
EngagedGenerator: jetbrains.mps.lang.behavior/<no name> as EMPLOYED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.smodel/BL as OWNED through [EngagedLanguage: jetbrains.mps.lang.smodel]]
EngagedGenerator: net.virtualinfinity.binary.Meta/main as OWNED through [EngagedLanguage: net.virtualinfinity.binary.Meta]
EngagedGenerator: jetbrains.mps.lang.smodel/BL as EXTENDED GENERATOR through [EngagedGenerator: net.virtualinfinity.binary.Meta/main as OWNED through [EngagedLanguage: net.virtualinfinity.binary.Meta]]
EngagedGenerator: jetbrains.mps.lang.behavior/<no name> as OWNED through [EngagedLanguage: jetbrains.mps.lang.behavior]
EngagedGenerator: jetbrains.mps.lang.descriptor/main as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.behavior/<no name> as OWNED through [EngagedLanguage: jetbrains.mps.lang.behavior]]
EngagedGenerator: jetbrains.mps.baseLanguage.collections/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage.collections]
EngagedGenerator: jetbrains.mps.baseLanguage/java as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.baseLanguage.collections/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage.collections]]
EngagedGenerator: jetbrains.mps.baseLanguage.closures/ as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.baseLanguage.collections/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage.collections]]
EngagedGenerator: jetbrains.mps.lang.quotation/<no name> as OWNED through [EngagedLanguage: jetbrains.mps.lang.quotation]
EngagedGenerator: jetbrains.mps.lang.smodel/BL as EMPLOYED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.quotation/<no name> as OWNED through [EngagedLanguage: jetbrains.mps.lang.quotation]]
EngagedGenerator: jetbrains.mps.lang.actions/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.actions]
EngagedGenerator: jetbrains.mps.lang.smodel/BL as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.actions/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.actions]]
EngagedGenerator: jetbrains.mps.lang.descriptor/main as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.actions/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.actions]]
EngagedGenerator: jetbrains.mps.baseLanguage/java as EMPLOYED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.actions/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.actions]]
EngagedGenerator: jetbrains.mps.baseLanguage/java as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage]
EngagedGenerator: jetbrains.mps.baseLanguage.closures/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage.closures]
EngagedGenerator: jetbrains.mps.baseLanguage/java as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.baseLanguage.closures/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage.closures]]
EngagedGenerator: jetbrains.mps.lang.core/generator as OWNED through [EngagedLanguage: jetbrains.mps.lang.core as EXTENDS through [EngagedLanguage: jetbrains.mps.lang.smodel]]
EngagedGenerator: jetbrains.mps.baseLanguageInternal/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguageInternal as GENERATES INTO through [EngagedGenerator: jetbrains.mps.lang.smodel/BL as OWNED through [EngagedLanguage: jetbrains.mps.lang.smodel]]]
EngagedGenerator: jetbrains.mps.baseLanguage/java as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.baseLanguageInternal/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguageInternal as GENERATES INTO through [EngagedGenerator: jetbrains.mps.lang.smodel/BL as OWNED through [EngagedLanguage: jetbrains.mps.lang.smodel]]]]
EngagedGenerator: jetbrains.mps.lang.refactoring/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.refactoring as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]
EngagedGenerator: jetbrains.mps.lang.descriptor/main as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.refactoring/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.refactoring as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]]
EngagedGenerator: jetbrains.mps.lang.structure/main as OWNED through [EngagedLanguage: jetbrains.mps.lang.structure as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]
EngagedGenerator: jetbrains.mps.lang.descriptor/main as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.structure/main as OWNED through [EngagedLanguage: jetbrains.mps.lang.structure as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]]
EngagedGenerator: jetbrains.mps.baseLanguage.jdk7/baseLanguage as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage.jdk7 as GENERATES INTO through [EngagedGenerator: jetbrains.mps.lang.actions/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.actions]]]
EngagedGenerator: jetbrains.mps.lang.resources/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.resources as GENERATES INTO through [EngagedGenerator: jetbrains.mps.lang.structure/main as OWNED through [EngagedLanguage: jetbrains.mps.lang.structure as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]]]
EngagedGenerator: jetbrains.mps.lang.smodel/BL as EMPLOYED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.resources/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.resources as GENERATES INTO through [EngagedGenerator: jetbrains.mps.lang.structure/main as OWNED through [EngagedLanguage: jetbrains.mps.lang.structure as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]]]]
=================================
19 roots, 1 components
#0(19): BufferExpression_Behavior ProvidesBuffer_Behavior FixedSizedTypeReader_Behavior ProvidesSource_Behavior ByteBufferReader_Behavior IReadableType_Behavior ITypeAffectingAspect_Behavior WithContextExpression_Behavior ReadableType_Behavior ITypeReader_Behavior CompileTimeConstantParameter_Behavior CompileTimeBaseLangTypeParameter_Behavior CompileTimeTypeParameter_Behavior BaseCompileTimeParameter_Behavior ICompileTimeParametersAspect_Behavior Type_Behavior ITypeDescriptor_Behavior SourceExpression_Behavior WithContextStatement_Behavior


Strong:
19 roots, 18 components
#0(1): ProvidesBuffer_Behavior
#1(1): BufferExpression_Behavior
#2(1): ProvidesSource_Behavior
#3(1): WithContextStatement_Behavior
#4(1): SourceExpression_Behavior
#5(1): ITypeDescriptor_Behavior
#6(1): BaseCompileTimeParameter_Behavior
#7(1): ICompileTimeParametersAspect_Behavior
#8(1): Type_Behavior
#9(1): CompileTimeTypeParameter_Behavior
#10(1): CompileTimeBaseLangTypeParameter_Behavior
#11(1): CompileTimeConstantParameter_Behavior
#12(1): ITypeReader_Behavior
#13(2): IReadableType_Behavior ITypeAffectingAspect_Behavior
#14(1): ReadableType_Behavior
#15(1): WithContextExpression_Behavior
#16(1): ByteBufferReader_Behavior
#17(1): FixedSizedTypeReader_Behavior

 

[][][][][][][][][][][][] typesystem plan [][][][][][][][][][][][]

> #showGenPlan net.virtualinfinity.binary.Core.typesystem
Model uses custom plan configured externally
--------------------- mappings partitioning -----------------------------------

[ 1 ]
jetbrains.mps.lang.core.generator.template.main.*

[ 2 ]
jetbrains.mps.lang.typesystem.generator.baseLanguage.template.main.attributes

[ 3 ]
jetbrains.mps.lang.typesystem.generator.baseLanguage.template.main.main

[ 4 ]
jetbrains.mps.lang.typesystem.generator.baseLanguage.template.main.Inequations

[ 5 ]
Checkpoint: DescriptorClasses

[ 6 ]
jetbrains.mps.lang.dataFlow.analyzers.generator.template.main.*
jetbrains.mps.lang.dataFlow.generator.baseLanguage.template.main.*
jetbrains.mps.lang.pattern.generator.baseLanguage.template.main.*

[ 7 ]
Checkpoint: BeforeBaseLang

[ 8 ]
jetbrains.mps.lang.quotation.generator.baseLanguage.template.main.*

[ 9 ]
jetbrains.mps.baseLanguage.checkedDots.generator.template.main.*

[ 10 ]
jetbrains.mps.lang.actions.generator.baseLanguage.template.main.*
jetbrains.mps.lang.slanguage.generator.template.main.*
jetbrains.mps.lang.smodel.generator.baseLanguage.template.main.*

[ 11 ]
jetbrains.mps.baseLanguage.tuples.generator.template.main.*

[ 12 ]
jetbrains.mps.baseLanguage.collections.generator.baseLanguage.template.main.*
jetbrains.mps.baseLanguage.collections.generator.baseLanguage.template.post.*
jetbrains.mps.baseLanguage.collections.generator.baseLanguage.template.pre.*

[ 13 ]
jetbrains.mps.baseLanguage.closures.generator.baseLanguage.template.main.*

[ 14 ]
jetbrains.mps.baseLanguage.jdk7.generator.template.main.*

[ 15 ]
jetbrains.mps.baseLanguage.classifiers.generator.baseLanguage.template.main.*

[ 16 ]
jetbrains.mps.baseLanguage.generator.java.properties.*

[ 17 ]
jetbrains.mps.baseLanguage.generator.java.references.desugar

[ 18 ]
jetbrains.mps.baseLanguage.generator.java.references.main

[ 19 ]
jetbrains.mps.baseLanguage.generator.java.closures.*
jetbrains.mps.baseLanguage.generator.java.main.*
jetbrains.mps.baseLanguage.generator.java.strings.*
jetbrains.mps.baseLanguage.logging.generator.baseLanguage.template.main.*
jetbrains.mps.baseLanguage.regexp.generator.baseLanguage.template.main.*
jetbrains.mps.baseLanguageInternal.generator.template.main.*

---------------------------------------------------------------------------------
Model directly uses next languages (including explicitly engaged, if any):
jetbrains.mps.lang.smodel
net.virtualinfinity.binary.Meta
jetbrains.mps.baseLanguage.collections
jetbrains.mps.lang.typesystem
jetbrains.mps.lang.core
jetbrains.mps.lang.quotation
jetbrains.mps.baseLanguage
=================================
Engaged generators with trace:
EngagedGenerator: jetbrains.mps.lang.smodel/BL as OWNED through [EngagedLanguage: jetbrains.mps.lang.smodel]
EngagedGenerator: jetbrains.mps.lang.behavior/<no name> as EMPLOYED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.smodel/BL as OWNED through [EngagedLanguage: jetbrains.mps.lang.smodel]]
EngagedGenerator: net.virtualinfinity.binary.Meta/main as OWNED through [EngagedLanguage: net.virtualinfinity.binary.Meta]
EngagedGenerator: jetbrains.mps.lang.smodel/BL as EXTENDED GENERATOR through [EngagedGenerator: net.virtualinfinity.binary.Meta/main as OWNED through [EngagedLanguage: net.virtualinfinity.binary.Meta]]
EngagedGenerator: jetbrains.mps.baseLanguage.collections/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage.collections]
EngagedGenerator: jetbrains.mps.baseLanguage/java as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.baseLanguage.collections/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage.collections]]
EngagedGenerator: jetbrains.mps.baseLanguage.closures/ as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.baseLanguage.collections/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage.collections]]
EngagedGenerator: jetbrains.mps.lang.typesystem/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.typesystem]
EngagedGenerator: jetbrains.mps.lang.descriptor/main as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.typesystem/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.typesystem]]
EngagedGenerator: jetbrains.mps.lang.smodel/BL as EMPLOYED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.typesystem/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.typesystem]]
EngagedGenerator: jetbrains.mps.lang.core/generator as OWNED through [EngagedLanguage: jetbrains.mps.lang.core]
EngagedGenerator: jetbrains.mps.lang.quotation/<no name> as OWNED through [EngagedLanguage: jetbrains.mps.lang.quotation]
EngagedGenerator: jetbrains.mps.lang.smodel/BL as EMPLOYED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.quotation/<no name> as OWNED through [EngagedLanguage: jetbrains.mps.lang.quotation]]
EngagedGenerator: jetbrains.mps.baseLanguage/java as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage]
EngagedGenerator: jetbrains.mps.baseLanguage.closures/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage.closures as EXTENDS through [EngagedLanguage: jetbrains.mps.lang.smodel]]
EngagedGenerator: jetbrains.mps.baseLanguage/java as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.baseLanguage.closures/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguage.closures as EXTENDS through [EngagedLanguage: jetbrains.mps.lang.smodel]]]
EngagedGenerator: jetbrains.mps.baseLanguageInternal/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguageInternal as GENERATES INTO through [EngagedGenerator: jetbrains.mps.lang.smodel/BL as OWNED through [EngagedLanguage: jetbrains.mps.lang.smodel]]]
EngagedGenerator: jetbrains.mps.baseLanguage/java as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.baseLanguageInternal/ as OWNED through [EngagedLanguage: jetbrains.mps.baseLanguageInternal as GENERATES INTO through [EngagedGenerator: jetbrains.mps.lang.smodel/BL as OWNED through [EngagedLanguage: jetbrains.mps.lang.smodel]]]]
EngagedGenerator: jetbrains.mps.lang.refactoring/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.refactoring as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]
EngagedGenerator: jetbrains.mps.lang.descriptor/main as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.refactoring/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.refactoring as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]]
EngagedGenerator: jetbrains.mps.lang.structure/main as OWNED through [EngagedLanguage: jetbrains.mps.lang.structure as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]
EngagedGenerator: jetbrains.mps.lang.descriptor/main as EXTENDED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.structure/main as OWNED through [EngagedLanguage: jetbrains.mps.lang.structure as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]]
EngagedGenerator: jetbrains.mps.lang.resources/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.resources as GENERATES INTO through [EngagedGenerator: jetbrains.mps.lang.structure/main as OWNED through [EngagedLanguage: jetbrains.mps.lang.structure as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]]]
EngagedGenerator: jetbrains.mps.lang.smodel/BL as EMPLOYED GENERATOR through [EngagedGenerator: jetbrains.mps.lang.resources/ as OWNED through [EngagedLanguage: jetbrains.mps.lang.resources as GENERATES INTO through [EngagedGenerator: jetbrains.mps.lang.structure/main as OWNED through [EngagedLanguage: jetbrains.mps.lang.structure as EXTENDS through [EngagedLanguage: net.virtualinfinity.binary.Meta]]]]]
=================================
9 roots, 9 components
#0(1): typeof_SourceExpression
#1(1): typeof_TypeReader
#2(1): typeof_BufferExpression
#3(1): typeof_WithContextStatement
#4(1): typeof_ReadExpression
#5(1): typeof_ByteBufferReader
#6(1): typeof_FixedSizedTypeReader
#7(1): typeof_WithContextExpression
#8(1): typeof_Type_aspects


Strong:
9 roots, 9 components
#0(1): typeof_SourceExpression
#1(1): typeof_TypeReader
#2(1): typeof_BufferExpression
#3(1): typeof_WithContextStatement
#4(1): typeof_ReadExpression
#5(1): typeof_ByteBufferReader
#6(1): typeof_FixedSizedTypeReader
#7(1): typeof_WithContextExpression
#8(1): typeof_Type_aspects

0

Looks like my generator (poorly named "main") is executed in step 6 of "behavior", and that it is supposed to execute at step 10 of "typesystem" but doesn't.  Any suggestions on how to figure out why?

 

0

Okay, so I've figured out that typesystem uses a build-plan from a devkit, while behavior does not.  I'm not quite sure how to reconcile that, if it's even possible... 

0

Please sign in to leave a comment.