H7 - test Flashcards
What is a formal specification?
Specification based on a formal model with precise syntax & semantics.
Why is it almost certain that you will be confronted with the “buy or build” method?
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.
Explain:
Consistent, Complete, Unambiguous
- 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
What is the link of Formal Specifications with Testing and Design by Contract?
Testing:
to have complete coverage, we use black-box testing test-cases
Design by Contract:
The (natural) pre- and post conditions
What types of specifications are there?
- 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
When is an input/output specification consistent/complete/unambiguous?
consistent = termination
complete = correctness
unambiguous: are all parts of pre- and postcondition necessary?
When is an algebraic specification consistent/complete/unambiguous
Consistent: it is never possible to deduce contradictions
complete: can all query expressions be reduced?
unambiguous: are all functions and axioms required?
Usage of each specification:
Input/Output: program verification
Algebraic: specifying interfaces
Logic: specifying constraints on class models
When is a logic-based specification consistent/complete/unambiguous?
Consistent: no contradictions in specification
Complete: all properties are defined in terms of known concepts
Unambiguous: misinterpretations are impossible
When is a state-based specification complete/consistent/unambiguous?
Complete: every event/state pair has a transition
Consistent: every state is reachable from initial state
Unambiguous: deterministic