Hoofdstuk 7 - Formal Specifications Flashcards
What does it mean when we say that a formal specification is (a) consistent, (b) complete and (c) unambiguous ?
◦ (a) A formal specification is consistent when there are no contradictions in the specification
◦ (b) A formal specification is complete when all properties are defined in terms of known concepts
◦ (c) A formal specification is unambiguous when misinterpretations are impossible, it could also be minimal.
What does it mean for a state-chart to be (a) consistent, (b) complete, and (c) unambiguous ?
◦ (a) A state-chart is consistent when every state is reachable from the initial state and the final state is reachable from every other state.
◦ (b) A state-chart is complete when every event (state pair) has a transition
◦ (c) A state-chart is unambiguous (deterministic) when the same event does not appear on more than one transition leaving a given state.
What does it mean for an algebraic specification to be (a) consistent and (b) complete ?
◦ (a) An algebraic specification is consistent when it is never possible to deduce contradictions
◦ (b) An algebraic specification is complete when all query expressions can be reduced
Why is an UML class diagram a semi-formal specification?
Because it is based on a notation with precise syntax but loose semantics
Can you give 3 arguments against formal methods? Can you counter them?
◦ High cost of specification but better verifiability
◦ Requires highly trained staff but only simple math and logic is required
◦ Customers don’t understand but depends on customers and specification style, prototypes can be generated
What’s the distinction between a semi-formal and a formal specification?
The semantics are not loose
Why is it necessary to complement sequence diagrams with state charts?
A state-chart allows to specify all valid (also all illegal) scenario’s