H7 - test Flashcards

1
Q

What is a formal specification?

A

Specification based on a formal model with precise syntax & semantics.

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

Why is it almost certain that you will be confronted with the “buy or build” method?

A

The presence of standards implies that a lot of people buy instead of build and therefor I will sooner or later be confronted with this.

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

Explain:
Consistent, Complete, Unambiguous

A
  • Consistent
    = no contradictions in the specification
  • Completeness
    = all properties are defined in terms of known concepts
  • Unambiguous
    = misinterpretations are impossible
    -> there is only one way to express a certain property
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the link of Formal Specifications with Testing and Design by Contract?

A

Testing:
to have complete coverage, we use black-box testing test-cases

Design by Contract:
The (natural) pre- and post conditions

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

What types of specifications are there?

A
  • Input/Output specifications
    -> include logic assertions inside algorithm
  • Algebraic Specifications
    -> which operations one can apply on types
  • Logic-based Specifications
    -> usage of mathematical entities
  • State-based Specification
    -> behavior described in terms of state-machine
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

When is an input/output specification consistent/complete/unambiguous?

A

consistent = termination
complete = correctness
unambiguous: are all parts of pre- and postcondition necessary?

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

When is an algebraic specification consistent/complete/unambiguous

A

Consistent: it is never possible to deduce contradictions

complete: can all query expressions be reduced?

unambiguous: are all functions and axioms required?

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

Usage of each specification:

A

Input/Output: program verification

Algebraic: specifying interfaces

Logic: specifying constraints on class models

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

When is a logic-based specification consistent/complete/unambiguous?

A

Consistent: no contradictions in specification

Complete: all properties are defined in terms of known concepts

Unambiguous: misinterpretations are impossible

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

When is a state-based specification complete/consistent/unambiguous?

A

Complete: every event/state pair has a transition

Consistent: every state is reachable from initial state

Unambiguous: deterministic

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