1 / 23

Ch5: Software Specification

Ch5: Software Specification. Finite State Machines (FSMs). Consist of: Use of FSMs:. FSMs (contd..). Graphically, -. q. 1. a. a. b. q. q. 2. 0. c. b. q. 3. FSM example: A lamp. Push switch. Off. On. Push switch. FSM example: A plant control system. High-pressure alarm.

malise
Download Presentation

Ch5: Software Specification

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Ch5: Software Specification

  2. Finite State Machines (FSMs) • Consist of: • Use of FSMs:

  3. FSMs (contd..) Graphically, - q 1 a a b q q 2 0 c b q 3

  4. FSM example: A lamp Push switch Off On Push switch

  5. FSM example: A plant control system High-pressure alarm High-temperature alarm On Off Restart

  6. FSM example: A refinement of plant control system Temperature signal Pressure signal Pressure Pressure action action Successful Unsuccessful recovery recovery Normal Off Normal Off Successful Unsuccessful recovery recovery Temperature signal Pressure signal Temperature action

  7. Classes of FSMs • Deterministic/non deterministic: • FSMs as recognizers: • FSMs as transducers:

  8. FSMs as recognizers e g i q q q q 1 2 3 4 n b q q 0 f e d q q 5 6 n

  9. q1 q2 q3 q4 q5 q6 q7 q8 qf q0 FSMs as recognizers (contd..) e a r r d b h i r t w e o What are the strings accepted by this FSM?

  10. Limitations of FSMs • Finite memory • State explosion

  11. Limitations of FSMs (contd..)

  12. Limitations of FSMs (contd..) In the composite FSM, a state is given by a 3-tuple: State of the storage: State of the producer: State of the consumer: Initial state: Total number of states in the composite FSM:

  13. Limitations of FSM (contd..) The resulting FSM

  14. FSMs summary • Simple and widely used: • Most software can be modeled using FSMs • FSMs may become complex: • FSMs can be composed to create new FSMs

  15. UML diagrams • Use case diagrams • Sequence diagrams • Collaboration diagrams

  16. Use case diagrams • Show all the possible functionality • Do not describe any details • Used during requirements analysis

  17. Components of use case diagrams Actors

  18. Components of use case diagrams (contd..) Use Cases

  19. Components of use case diagrams (contd..) Association

  20. Uses of use case diagrams • Determining features (requirements): • Communicating with clients: • Generating test cases:

  21. Suggestions for designing good use cases • Choose a good name: • Show a complete and completable behavior: • Show inverse use cases if applicable: • Limit a use case to one behavior/function: • Write the use cases from the actor’s point of view:

  22. Use case diagrams – Example #1 Consider an airline reservation system. A customer can use this system to either make or cancel a reservation. The system obtains flight information such as the availability of the flights from an external flight database system. During the process of making a reservation, the system may be required to obtain credit card authorization from the credit card system. Every day, the system compiles a list of passengers with reservations on each flight is forwarded to the security personnel.

  23. Use case diagrams – Example #1 Use case Security Personnel Reservation System CreditCard System Compile List Communication Actor Make Reservation External Flight Database Customer Cancel Reservation

More Related