Lecture 3: Use Case Modeling For Real-Time Embedded Systems

3y ago
30 Views
2 Downloads
290.63 KB
19 Pages
Last View : 1m ago
Last Download : 3m ago
Upload by : Jacoby Zeller
Transcription

SWE 760Lecture 3:Use Case Modeling forReal-Time Embedded SystemsHassan GomaaDepartment of Computer ScienceGeorge Mason UniversityEmail: hgomaa@gmu.eduReferences:H. Gomaa, Chapter 6 - Real-Time Software Design for Embedded Systems,Cambridge University Press, 2016Copyright 2016 Hassan GomaaAll rights reserved. No part of this document may be reproduced in any formor by any means, without the prior written permission of the author.1Copyright 2016 H. GomaaFigure 4.1 COMET/RTE life cycle entalPrototypingSystemTestingCustomerCopyright 2016 Hassan Gomaa2A-1

Requirements Modeling in COMET/RTE Develop use case model– Define system functional requirements in terms ofactors and use cases– Two different perspectives for RTE use case model Systems Engineering perspective Software Engineering perspective Develop non-functional requirements– A.k.a. quality requirements3Copyright 2016 H. GomaaUse Case Modeling Define system functional requirements in terms of Actors and Use Cases– Each use case defined in terms of sequence of interactions between Actorand System Narrative description Use case is a complete sequence of interactions initiated by an actor– Use case starts with input from an actor– Describes interactions between actor and system– Provides value to actor– Basic path Most common sequence– Alternative branches Variations of basic path E.g., for error handlingCopyright 2016 H. Gomaa4A-2

Example of actor and use case(Fig. 6.1)5Copyright 2016 H. GomaaActors Actor models external entities of system Actor initiates use case Actor interacts with the system– By providing inputs to the system– By responding to outputs from the system Actor must affect sequence of events in use case For real-time embedded systems– All external entities are actorsCopyright 2016 H. Gomaa6A-3

Actors and Use Cases Primary Actor– Starts the use case by providing input to the system Secondary Actor(s)– Participates in use case– Can be Primary Actor of a different use case Identifying use cases from actors– Consider each major function an actor needs to perform– Provides value to actor7Copyright 2016 H. GomaaExample of primary and secondary actors(Fig. 6.2)Copyright 2016 H. Gomaa8A-4

Use Cases for Systems Engineering andSoftware Engineering Systems Engineering and Software Engineeringperspectives on use cases Little or no difference for information or web-basedsystems– Actors are mainly human users, possibly externalsystems– No difference between system and software contextdiagrams RT embedded systems– Big difference in Systems and Software Engineeringperspectives on use cases– Many actors are non-humanCopyright 2016 H. Gomaa9Modeling Actors from a SystemsEngineering Perspective Actors in Systems Engineering use cases– Human user e.g., Microwave User– External system E.g., Factory Robot– Physical entity E.g., Train, VehicleCopyright 2016 H. Gomaa10A-5

Systems Engineering Perspective- Human User as Actor (Fig. 6.3)«human actor»Cook FoodUserCopyright 2016 H. Gomaa11Systems Engineering Perspective- External system as actor (Fig. 6.2)Copyright 2016 H. Gomaa12A-6

Systems Engineering Perspective- Physical entity as ActorFigure 6.4 Example of physical entity actor«physical entity actor»Arrive at RailroadCrossingTrainDepart from RailroadCrossing13Copyright 2016 H. GomaaActors in RT Embedded Systems Many non-human actors E.g., Vehicle arrival and departure detected by System Systems engineering perspective– Vehicle is an actor– External to the system Software engineering perspective– Vehicle does not interact directly with the system– Vehicle arrival and departure detected by sensors– Arrival and departure sensors Internal to total hardware/software system External to software system– Arrival and departure sensors are actorsCopyright 2016 H. Gomaa14A-7

Modeling Actors from a SoftwareEngineering Perspective Actors in Software Engineering use cases– Same actors as in Systems Engineering use cases Human user External system Actors ONLY in Software Engineering use cases– Actors that represent objects that are– Part of total hardware/software system– External to software system Input device Output device I/O device TimerCopyright 2016 H. Gomaa15Software Engineering PerspectiveExample of input device actors (Fig. 6.5)«input device actor»Arrive at RailroadCrossingArrival Sensor«input device actor»Depart fromRailroad CrossingDeparture SensorCopyright 2016 H. Gomaa16A-8

Software Engineering PerspectiveExample of timer actor (Fig. 6.6)DisplayTime of DayTimer(Primary actor)User(Secondary actor)17Copyright 2016 H. GomaaNon-functional Requirements Quality of service goal that system must fulfill– Also called Quality Attribute E.g. of non-functional requirements: Performance requirement: System shall respond to timerinputs within 100 milliseconds. Safety requirement: System shall switch off themicrowave oven if temperature exceeds a pre-specifiedhazard level. Availability requirement: System shall be operational99.9% of required time. Security requirement: System shall encrypt operator idand password.Copyright 2016 H. Gomaa18A-9

Documenting Use Cases NameSummary - Short description of use caseDependency (on other use cases)Actors – primary, secondaryPreconditions– Conditions that are true at start of use caseDescription of main sequence– Narrative and textual descriptionDescription of alternative sequences– Textual description of alternative branchesNonfunctional requirements– E.g., performance and security requirementsPostcondition– Condition that is true at end of use caseCopyright 2016 H. Gomaa19System Context Diagram forMicrowave Oven SystemSysML Block Definition Diagram20Copyright 2016 H. GomaaA-10

Systems Engineering PerspectiveUse Case Model for Microwave Oven System(Fig. 6.8)21Copyright 2016 H. GomaaSystems Engineering PerspectiveUse Case Model for Microwave Oven SystemUse case name: Cook Food.Summary: User puts food in oven, and microwave oven cooks food.Actors: UserPrecondition: Microwave oven is idle.Main Sequence:1. User opens the door2. System switches the oven light on.3. User puts food in the oven and closes the door.4. System switches the oven light off.5. User presses the Cooking Time button.6. System prompts for cooking time.7. User enters cooking time on the numeric keypad and pressesStart.8. System starts cooking the food and switches the oven light on.9. System continually displays the cooking time remaining.Copyright 2016 H. Gomaa22A-11

Systems Engineering PerspectiveUse Case Model for Microwave Oven System10. System timer detects that the cooking time has elapsed.11. System stops cooking the food, switches off the light, stops theturntable, sounds the beeper, and displays the end message.12. User opens the door.13. System switches on the oven light.14. User removes the food from the oven and closes the door.15. System switches off the oven light and clears the display.Configuration requirement:Name: Display Language.Description: There is a choice of language for displaying messages,which is set during system configuration. Default language is English.Postcondition: Microwave oven has cooked the food.Copyright 2016 H. Gomaa23Fig. 5.10: Software System Context Diagram forRailroad Crossing Control SystemCopyright 2016 H. GomaaA-12

Actors inRailroad Crossing Embedded System Systems engineering perspective– Train is an actor– External to the system Software engineering perspective– Train does not interact directly with the system– Train arrival and departure detected by sensors– Arrival and departure sensors Internal to total hardware/software system External to software system– Arrival Sensor and Departure Sensors are actorsCopyright 2016 H. Gomaa25Example of Use Case Model - Software Engineering PerspectiveCopyright 2016 H. Gomaa26A-13

Use Cases - Railroad Crossing Control SystemUse case name: Arrive at Railroad CrossingSummary: Train approaches railroad crossing. The system lowers the barrier, switches on the warninglights, and switches on the audio warning alarm.Actors:oPrimary actor: Arrival SensoroSecondary actors: Barrier Detection Sensor, Barrier Actuator, Warning Light Actuator,Warning Audio Actuator, Rail Operations Service, Barrier Timer.Precondition: The system is operational and there is either no train or one train in the railroad crossing.Main Sequence:1. Arrival Sensor detects the train arrival and informs the system.2. System commands each Barrier Actuator to lower a barrier, each Warning Light Actuator toswitch on the flashing lights, and each Warning Audio Actuator to switch on the audio warning.3. Barrier Detection Sensor detects that a barrier has been lowered and informs the system.4. System sends a train arrival message to Rail Operations Service.Alternative Sequences:Step 2: If there is another train already at the railroad crossing, skip steps 2 and 3.Step 3: If Barrier Timer notifies the system that the lowering timer has timed out, the system sends asafety warning message to the Rail Operations Service.Copyright 2016 H. Gomaa27Use Cases - Railroad Crossing Control SystemNon-functional Requirements:a) Safety requirements:oBarrier lowering time shall not exceed a pre-specified time. If timer times out, the systemshall notify Rail Operations Service.oSystem shall keep track of the number of trains at the railroad crossing, such that thebarrier is lowered when the first train arrives and only raised after the last train departs.b) Performance requirement:oThe elapsed time from the detection of train arrival to sending the command to the barrieractuator shall not exceed a pre-specified response time.Postcondition: The barrier has been closed, the warning lights are flashing and the audio warning issounding.Copyright 2016 H. Gomaa28A-14

Use Case Relationships Include relationship– Identify common sequences of interactions in severaluse cases Extract common sequence into inclusion use case Base use cases includes inclusion use case Example– Suspend Train use caseincludes– Arrive at Station use caseCopyright 2016 H. Gomaa29Example of inclusion use cases and include relationship(Fig. 6.10)Copyright 2016 H. Gomaa30A-15

Example of inclusion use cases and include relationshipUse case: Control Train at Station.Actors: Door Sensor primary , Door Actuator.Precondition: Train is stopped at station with doors opening.Main sequence:1 Door Sensor sends Doors Opened message.2 After time interval, System sends Close Doors command to theDoor Actuator.Postcondition: Train is stopped at station with doors closing.Use case: Arrive at Station.Actors: Approaching Sensor primary , Arrival Sensor, Motor, DoorActuator.Precondition: Train is moving toward next station.Main sequence:1 Approaching Sensor signals that train is approaching station2 System sends Decelerate command to Motor.3 Arrival Sensor signals that train is entering station4 System sends Stop Motor command to Motor.5 Motor responds that train has stopped.6 System sends Open Doors command to the Door Actuator.Postcondition: Train has stopped at station with doors opening.31Copyright 2016 H. GomaaExample of base use case and include relationshipUse case: Suspend Train.Actor: Rail Operator primary , Door Sensor.Dependency: Includes Arrive at Station, Control Train at Station use cases.Precondition: Train is operational and moving toward next station.Main sequence:1Rail Operator sends suspend train operation command to System.2Include Arrive at Station use case.3Include Control Train at Station use case.4Door Sensor sends Doors Closed message to System.Postcondition: Train is stationary at station and out of service.Copyright 2016 H. Gomaa32A-16

Use Case Relationships Extend relationship– Use case A is an extension of use case B– Under certain conditions use case B will be extended bydescription given in use case A– Same use case can be extended in different ways When to use extend– Show conditional parts of use case– Model complex or alternative paths Example of extension use cases and Extend relationship– Store Part, Retrieve Part– Extend Flexibly Manufacture Part33Copyright 2016 H. GomaaExample of extension use case and Extend relationship(Fig. 6.11)«physical entity actor»Enter Green ZoneUnauthorizedVehicle«extends»«external system actor»ProcessUnauthorized VehicleDMV System«external system actor»Police Patrol CarCopyright 2016 H. Gomaa34A-17

Example of base use case and Extend relationshipUse case: Enter Green Zone.Summary: Vehicle enters restricted Green Zone; System starts tracking thevehicle.Actor: Vehicle.Precondition: Green Zone entry point is clear.Main Sequence:1.Vehicle approaches green zone entry point.2.System detects vehicle entering the green zone.3.System reads vehicle permit number RFID.4.System checks that permit number is valid.5.System stores the following information: permit number, entrytime/date, entry location.Alternative Sequence:Step 4: Unauthorized i.e., unrecognized or missing permit number : Extendwith Process Unauthorized Vehicle use case.Postcondition:Vehicle has entered green zone.35Copyright 2016 H. GomaaExample of extension use case and Extend relationshipUse case: Process Unauthorized Vehicle.Summary: The license number of the unauthorized vehicle is detected, decoded, andsent to the police.Actor: Vehicle primary , Police Patrol Car secondary , DMV System secondary .Dependency: Extends Enter Green Zone use case.Precondition: Vehicle has an invalid or nonexistent permit number.Description of insertion segment:1. System takes photograph of vehicle license plate.2. System uses an image processing algorithm to analyze the photograph andextract the state name and vehicle license number.3. System sends a message to the DMV system of the vehicle’s state containingthe vehicle license number and requesting owner name and address.4. The DMV system sends a message to the system containing the name andaddress of the vehicle owner.5. The system issues and prints a fine to be sent by mail to the vehicle owner.Postcondition: The unauthorized vehicle has been detected and a fine has beenissued.Alternative sequence:Step 2: License plate cannot be decoded because of bad photograph, bad weather,Copyright 2016 H. Gomaacovered license plate ; System sends alert message to the Police Patrol Car.36A-18

Figure 4.1 COMET/RTE life cycle entalPrototypingSystemTestingCustomerCopyright 2016 Hassan Gomaa37A-19

Systems Engineering and Software Engineering perspectives on use cases Little or no difference for information or web-based systems –Actors are mainly human users, possibly external systems –No difference between system and software context diagrams RT embedded systems –Big difference in Systems and Software Engineering

Related Documents:

Introduction of Chemical Reaction Engineering Introduction about Chemical Engineering 0:31:15 0:31:09. Lecture 14 Lecture 15 Lecture 16 Lecture 17 Lecture 18 Lecture 19 Lecture 20 Lecture 21 Lecture 22 Lecture 23 Lecture 24 Lecture 25 Lecture 26 Lecture 27 Lecture 28 Lecture

series b, 580c. case farm tractor manuals - tractor repair, service and case 530 ck backhoe & loader only case 530 ck, case 530 forklift attachment only, const king case 531 ag case 535 ag case 540 case 540 ag case 540, 540c ag case 540c ag case 541 case 541 ag case 541c ag case 545 ag case 570 case 570 ag case 570 agas, case

Lecture 1: A Beginner's Guide Lecture 2: Introduction to Programming Lecture 3: Introduction to C, structure of C programming Lecture 4: Elements of C Lecture 5: Variables, Statements, Expressions Lecture 6: Input-Output in C Lecture 7: Formatted Input-Output Lecture 8: Operators Lecture 9: Operators continued

Lecture 1: Introduction and Orientation. Lecture 2: Overview of Electronic Materials . Lecture 3: Free electron Fermi gas . Lecture 4: Energy bands . Lecture 5: Carrier Concentration in Semiconductors . Lecture 6: Shallow dopants and Deep -level traps . Lecture 7: Silicon Materials . Lecture 8: Oxidation. Lecture

TOEFL Listening Lecture 35 184 TOEFL Listening Lecture 36 189 TOEFL Listening Lecture 37 194 TOEFL Listening Lecture 38 199 TOEFL Listening Lecture 39 204 TOEFL Listening Lecture 40 209 TOEFL Listening Lecture 41 214 TOEFL Listening Lecture 42 219 TOEFL Listening Lecture 43 225 COPYRIGHT 2016

Partial Di erential Equations MSO-203-B T. Muthukumar tmk@iitk.ac.in November 14, 2019 T. Muthukumar tmk@iitk.ac.in Partial Di erential EquationsMSO-203-B November 14, 2019 1/193 1 First Week Lecture One Lecture Two Lecture Three Lecture Four 2 Second Week Lecture Five Lecture Six 3 Third Week Lecture Seven Lecture Eight 4 Fourth Week Lecture .

14 D Unit 5.1 Geometric Relationships - Forms and Shapes 15 C Unit 6.4 Modeling - Mathematical 16 B Unit 6.5 Modeling - Computer 17 A Unit 6.1 Modeling - Conceptual 18 D Unit 6.5 Modeling - Computer 19 C Unit 6.5 Modeling - Computer 20 B Unit 6.1 Modeling - Conceptual 21 D Unit 6.3 Modeling - Physical 22 A Unit 6.5 Modeling - Computer

Introduction to Quantum Field Theory for Mathematicians Lecture notes for Math 273, Stanford, Fall 2018 Sourav Chatterjee (Based on a forthcoming textbook by Michel Talagrand) Contents Lecture 1. Introduction 1 Lecture 2. The postulates of quantum mechanics 5 Lecture 3. Position and momentum operators 9 Lecture 4. Time evolution 13 Lecture 5. Many particle states 19 Lecture 6. Bosonic Fock .