TU Wien:Model Engineering VU (Kappel)/Test 1 - 2020-11-16

From VoWi
< TU Wien:Model Engineering VU (Kappel)
Revision as of 18:19, 23 January 2021 by 0.0.0.0 (talk) (Test 16.11.2020)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Metamodeling

Select the correct statements:

  • During the modeling phase the technologies used for the implementation are defined.
  • PIM models can specify functionalities defined in PSM models in more detail.
  • A business process is an example for a computation independent model.
  • UML is an example for a General Purpose (Modeling) Language.
  • In Model-Driven Software Engineering models are just pictures.
  • Changes in technology stacks do not always require changes in the domain models.
  • In Model-Driven Engineering models are primarily used for communication of ideas and alternatives.
  • A model is based on an original (= System), but it only reflects a selection of the original's properties.

To which of the 4 Metamodeling Layers does EBNF belong to?

  • M0 (Model instance)
  • M1 (Model)
  • M2 (Metamodel)
  • M3 (Meta-Metamodel)

To which of the 4 Metamodeling Layers does a SQL Statement belong to?

  • M0 (Model instance)
  • M1 (Model)
  • M2 (Metamodel)
  • M3 (Meta-Metamodel)

Which of the following statements about metamodeling in EMF are true?

  • Metamodels are models conforming to higher level metamodels. Those higher level descriptions are called meta-metamodels.
  • If an Ecore metaclass A defines a containment reference to the metaclass B, it means that an instance of metaclass A is a part of at least one instance of metaclass B.
  • Classes and relations are not a part of Ecore metamodels
  • Upon changes in the metamodel, already existing models might become invalid.
  • Meta-metamodels are mostly self-descriptive which means they conform to themselves.
  • A model by definition conforms to multiple metamodels.
  • The validity of a model can only be determined in combination with a metamodel.
  • Theoretically, the concept of meta-hierarchies is not limited to four layers.

OCL

Select the correct statements about OCL

  • OCL is often used to define invariants on metamodel level
  • OCL invariants are expressions that can return boolean values as integer values
  • OCL is often used to set attribute values in models
  • OCL is often used to define invariants on meta-metamodel level
  • OCL constraints are defined on metamodel level and evaluated on model level
  • OCL is ofted used as a query language


Textual ML

Which of the following statements about Xtext are correct?

  • In a grammar-first approach, the metamodel can be generated from the grammar definition.
  • With Xtext semantics can be added to domain-specific languages.
  • The Java syntax could theoretically be defined with an Xtext grammar.
  • The Xtext grammar uses EBNF.
  • Scoping has to be implemented for every cross-reference in a Xtext grammar.
  • Scoping enables the definition of the attribute visibility in a Xtext grammar.

Consider the following Xtext grammar:

Company returns Company:
 'company' name=EString '{'
 (containers+=Container)*
 (trucks+=Truck=+
 '}'
;
Container returns Container:
 'container' name=EString
;
Truck returns Truck:
 (ParkedTruck|TransportingTruck)
;
ParkedTruck returns Truck:
 'parked' 'truck' name=EString
;
TransportingTruck returns Truck:
'truck' 'transports' transports=[Container]

Select the models conforming to this grammar:

company Comp1 {
 container C1 
 container C2 
 truck T2 transports C2
 truck T3
}
company Comp1 {
 container C1 
 truck T1 transports C1
 parked truck T2
}
company Comp1 {
 parked truck T1
}
company Comp1 {
 container C1
 truck T1 transports C2
 parked truck T2
}

Graphical ML

Select the correct statements about Sirius and Graphical Concrete Syntaxes:

  • The Sirius Creation Tools enable the creation of mappings between abstract syntax and their graphical representation.
  • Every class of a metamodel has to be covered by ate least one Sirius representation viewpoint.
  • If multiple conditional styles match to an element, all styles will be applied.
  • A viewpoint can only contain a single representation description
  • Sirius provides a default representation for undefined class mappings.
  • In an annotation based approach the metamodels are annotated within the Ecore file.
  • One abstract syntax of modeling language can be realized by multiple concrete syntaxes.
  • References can be represented as edges as well as labels.
  • The sirius runtime automatically and dynamically interprets the model and adjusts the graphical representation.