Hello! As part of my thesis I'm creating an example DSL in MPS. It's a really nice tool, I must admit, I really like it. My language is basically a notation for designing questionnaires, which have sections, questions and so on. The questions have different types. I'm not sure what is the preferred way for doing this, but in places where normally in EBNF I would say now comes BooleanQuestion or MultipleChoiceQuestion and so on I used concept inheritance in MPS. Now I am trying to write a generator and I'm not sure how to cast questions from the general concept type to the concrete subclass and call the proper template to instantiate the appropriate Java object. What I would like to do is loop over all questions in a particular section and branch the generation for different types. I suppose I should somehow use mapping rules or switch, but I can't seem to figure out how. Can anyone help, please?