Lecture 6 Flashcards

1
Q

What makes it difficult to maintain consistency between multiple views of a design model?

A

A design model has multiple views, making it difficult to maintain consistency.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What mechanism is widely used to define the language of a design model?

A

Metamodeling is a widely used mechanism to define such a language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does a metamodel describe?

A

A metamodel describes the abstract syntax of a modelling language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What does syntactic consistency ensure in a model’s view?

A

Syntactic consistency ensures that a model’s view conforms to the model’s abstract syntax.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does semantic consistency require for different views of a model?

A

Semantic consistency requires different views of a model to be semantically compatible.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How are consistency requirements upon a model expressed?

A

Consistency requirements are expressed using its metamodel and its constraints.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When does an inconsistency occur in a model?

A

An inconsistency occurs if and only if a constraint has been broken.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What may a constraint describe in a model?

A

A constraint may describe syntactic and semantic relationships between model elements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are some types of constraints that can be described?

A

Constraints can prescribe coherence relationships between different views of a model, impose best practices, and describe specific requirements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What language can be used to specify consistency constraints?

A

Object Constraint Language (OCL) can be used to specify consistency constraints.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is an invariant in the context of OCL?

A

An invariant specifies conditions that must hold in all instances of the class, type, or interface in a UML diagram.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a precondition or postcondition in the context of OCL?

A

A condition that must hold at the moment just before or after its execution.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What must the passenger size be in relation to the number of seats on a bus?

A

Passenger size has to be <= number of seats on bus.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What must be unique for each passenger in the invariant example?

A

Each passenger name must be unique.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What are the conditions to shift a meeting according to the precondition and postcondition example?

A

The meeting needs to be not confirmed, shift function parameter needs to be > 0, and d must be >= 1.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the activity of checking for inconsistencies in design models called?

A

Detection of inconsistencies.

17
Q

What is the activity for identifying the source, cause, and impact of an inconsistency called?

A

Diagnosis of inconsistencies.

18
Q

What is required to fix inconsistencies in design models?

A

Making and propagating changes to different parts of design models.

19
Q

What is the invariant for the variable ‘isMarried’ in the pen and paper exercise?

A

isMarried must be > int 15.

20
Q

What invariant must hold true at all times for the variable ‘numberOfEmployees’?

A

numberOfEmployees must be the same as the size of the employee object.

21
Q

What must the Date object ‘d’ be in the pre-context of the function ‘income()’?

A

The Date ‘d’ must be later than the birthDate.

22
Q

What is the post-context condition for the function ‘income()’ if age < 18?

A

If age < 18, then result is < 100.

23
Q

What is the post-context condition for the function ‘income()’ if age >= 18?

A

If age >= 18, then result is < 200.

24
Q

What is the length constraint for a person’s name in the pen and paper exercise?

A

The length of a person’s name must be always less than 20 characters.

25
Q

What is the OCL expression to ensure a person’s name is less than 20 characters?

A

Person p : len(p.firstName) < 20.