TU Wien:Model Engineering VU (Kappel)/Test 2 - 2021-01-25

From VoWi
Jump to navigation Jump to search

MC Questions[edit]

Select the correct statements about model-to-model transformations.

  • Model-to-model transformations always have a single model as input and a single model as output
  • To change a single attribute value an in-place transformation is usually more efficient compared to an out-place transformation
  • Transformations need to conform to a transformation metamodel to be applicable
  • A transformation execution engine takes a transformation model and a source model as input and produces a target metamodel

Xtend enables code generation with (M2M, M2T, programming languages,..) and is a dialect of (Java, HTML, Henshin,..)

Select the correct statements about Henshin:

  • Negative application conditions are applied in cases where no other rules match.
  • Rules as well as units can have input parameters in Henshin.
  • A Henshin rule is only applief if for each preserve node a matching element exists in the source model.
  • The target model of a Henshin rule conforms to the same metamodel as the source model.

Which of the following statements about the LSP are true?

  • So far, LSP is only used by Eclipse and VSCode
  • The EMF distribution used in this course is a good example for an application enabled by LSP.
  • Language servers usually run on the users machine, in order to provide fast language support in the editor.
  • LSP and language servers would enable us to implement an online modeling tool for our textual SBSML from lab2.
  • LSP is used by many different language servers, among others supportin Java, Haskell and Typescript

Select the correct statements about ATL

  • In ATL source models can be read and written
  • Matches rules and lazy rules are only applied once for each element
  • Matched rules have no side-effects
  • Helper functions can have an optional context

Give two arguments for code generation. Give one argument against code generation.

Three code examples with a given metamodel[edit]

Xtend code example

ATL code example

Henshin code example If there is a Section with a Program that contains a DrillItem command and the Section contains an IndustrialRobot with a Driller EndOfArmTooling that contains no DrillTool, create a new DrillTool for that Driller. The diameter of the created DrillTool should be set with an input parameter. You do not need to assign values to other attributes of the created DrillTool and the rule has to be applied only once.