1 Overview Use of specifications Specification qualities Classification of specification styles Verification of specifications Operational specifications Data flow diagrams – Information/usage Finite state machines – Event based Petri nets – Resource base Queuing and simulation models ER and Object-oriented specifications Logic and algebraic specifications Specification notations and writing specifications
2 Software specification Software systems must be specified. Why? Requirements specification: Design specification: Module specification: In general: Specification vs. implementation: Specification – What Implementation - How
3 Uses of specification Statement of user’s needs: Statement of the interface between the machine and the controlled environment:
4 Uses of specification (contd..) Statement of requirements for implementation: A reference point during maintenance:
6 Clear, unambiguous and understandable (example) Example: specification fragment for a word-processor Selecting is the process of designating areas of the document that you want to work on. Most editing and formatting actions require two steps: first you select what you want to work on, such as text or graphics; then you initiate the appropriate action.
7 Precise, unambiguous, clear (example) Another example (from a real safety-critical system) The message must be triplicated. The three copies must be forwarded through three different physical channels. The receiver accepts the message on the basis of a two-out-of-three voting policy.
8 Consistent Example: specification fragment for a word-processor The whole text should be kept in lines of equal length. The length is specified by the user. Unless the user gives an explicit hyphenation command, a carriage return should occur only at the end of a word.
10 Formal vs. informal specifications Informal: Formal: Advantages of formal specifications: Formal specifications may not be widely used: Semi-formal: Notation without completely precise semantics:
11 Operational vs. Descriptive specifications Operational specification: Describes desired behavior of the system: Descriptional specification: Describes desired properties of system in a declarative manner. Actual specifications may be a mix of operational and declarative styles