Lecture 6 Flashcards
What makes it difficult to maintain consistency between multiple views of a design model?
A design model has multiple views, making it difficult to maintain consistency.
What mechanism is widely used to define the language of a design model?
Metamodeling is a widely used mechanism to define such a language.
What does a metamodel describe?
A metamodel describes the abstract syntax of a modelling language.
What does syntactic consistency ensure in a model’s view?
Syntactic consistency ensures that a model’s view conforms to the model’s abstract syntax.
What does semantic consistency require for different views of a model?
Semantic consistency requires different views of a model to be semantically compatible.
How are consistency requirements upon a model expressed?
Consistency requirements are expressed using its metamodel and its constraints.
When does an inconsistency occur in a model?
An inconsistency occurs if and only if a constraint has been broken.
What may a constraint describe in a model?
A constraint may describe syntactic and semantic relationships between model elements.
What are some types of constraints that can be described?
Constraints can prescribe coherence relationships between different views of a model, impose best practices, and describe specific requirements.
What language can be used to specify consistency constraints?
Object Constraint Language (OCL) can be used to specify consistency constraints.
What is an invariant in the context of OCL?
An invariant specifies conditions that must hold in all instances of the class, type, or interface in a UML diagram.
What is a precondition or postcondition in the context of OCL?
A condition that must hold at the moment just before or after its execution.
What must the passenger size be in relation to the number of seats on a bus?
Passenger size has to be <= number of seats on bus.
What must be unique for each passenger in the invariant example?
Each passenger name must be unique.
What are the conditions to shift a meeting according to the precondition and postcondition example?
The meeting needs to be not confirmed, shift function parameter needs to be > 0, and d must be >= 1.