Marija Rakic Greg Gao Roshanak Roshandel

Slides:



Advertisements
Similar presentations
PICTO Enterprise Resource Planning (ERP) System
Advertisements

Customer Return Management Scenario Overview
Static Electricity Rare Occurrence or Common Hazard?
Programming with Alice Computing Institute for K-12 Teachers Summer 2011 Workshop.
PART-2. Access the functions as described. Accessing functions. To change the accessing password, follow the steps below. Use the NEXT key to select:
UML: Use Cases Michael L. Collard, Ph.D. Department of Computer Science Kent State University.
Physical Activity as part of your healthy active lifestyle
Ch 12: Object-Oriented Analysis
Embedded Systems Details. Object Model: Four main system objects or classes Controller object might be made up of several controllers is the brains of.
Techniques for Object Discovery from Real Time UML, B.P. Douglass.
1 / 26 CS 425/625 Software Engineering Software Requirements Based on Chapter 5 of the textbook [Somm00] Ian Sommerville, Software Engineering, 6 th Ed.,
1 Gas Station and Cruise Control Specifications Ronnie Apcar Edwin Chiu Hasmik Jerejian November 2, 2000 CSCI 599 Formal Methods November 2, 2000 Concurrency.
CS 425/625 Software Engineering Software Requirements
10/19/2000cs599 - Formal Methods in Software Architecture 1 Algebraic Example – OBJ3 Tarang Garg Srikumar Nagaraj.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
AccuMax Multi-Point Injection Mechanics
Linear Motion-Acceleration
Abs.
[ §6 : 1 ] 6. Basic Methods II Overview 6.1 Models 6.2 Taxonomy 6.3 Finite State Model 6.4 State Transition Model 6.5 Dataflow Model 6.6 User Manual.
Chapter 10 State Machine Diagrams
Micropos MiniTouch Pump Control System The Micropos Pump Control and Convenience Store scanning system will run on any of the Minitouch Series hardware.
Concurrency: introduction1 ©Magee/Kramer Concurrency State Models and Java Programs Jeff Magee and Jeff Kramer.
Data Flow Diagrams.
Unit - #6 Air Brake System
Chapter 5 Models and UML Notation for The Object-Oriented Approach.
Class diagram Used for describing structure and behaviour in the use cases Provide a conceptual model of the system in terms of entities and their relationships.
Chapter 6 Adaptive Cruise Control (ACC)
States.
Overview of Project ADS Software Engineering CSE435 Michigan State University Fall 2013 Team members: Project Manager: Alec Dutch Facilitator: Duncan Young.
Customer Return Management Scenario Overview
Requirements Specification
CompSci 280 S Introduction to Software Development
Design Review.
Systems Analysis and Design in a Changing World, Fourth Edition
Analysis Classes Unit 5.
Case Study -- Weather system
Chapter 5 System modeling
Marlon Dumas Institute of Computer Science
Team members: Project Manager: Alex Crimin Facilitator: Chengzhu Jin
Recall The Team Skills Analyzing the Problem (with 5 steps)
Processes for OO Software Development
Department of Computer Science
Jan 22, 2012 INCOSE IW12 MBSE Workshop MBSE Wiki page:
Chrome River Navigation Guide
Unit 2 Basic Vehicle Control
Competitor Information Event Contact: Christian Ball
Introduction to Events
Use of Neutral Gear in an Automatic Transmission Car
Software Engineering Chapter 5 (Part 3) System Modeling Dr.Doaa Sami.
IVG Driver Training Performance Monitoring.
States.
Navya Thum February 13, 2013 Day 7: MICROSOFT EXCEL Navya Thum February 13, 2013.
Event-Based Architecture Definition Language
CS310 Software Engineering Dr.Doaa Sami
Use Case Model Use case diagram – Part 2.
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Dynamic Modeling Lecture # 37.
Diesel Particulate Filters
Marlon Dumas Institute of Computer Science
States.
Add a dues payment to the Dues manager module for the Grand Lodge of Nebraska LSI Lodge Secretary Interface online Membership Database.
CS 8532: Advanced Software Engineering
Design pattern Lecture 6.
Requirements Document
Chapter 9: Setting the list or quoted price
Compressor Operating Instructions
Liquid Controls LCR600 Service Training
Product Definition Scenario Overview
Chapter 13: Object State Modeling for Event-Driven Systems
Behavioural modelling
Presentation transcript:

Marija Rakic Greg Gao Roshanak Roshandel Statecharts example Marija Rakic Greg Gao Roshanak Roshandel 12/9/2018 CS599- Formal Methods in SW Architectures

Statecharts – brief overview Provide behavioral description of reactive systems Clustering and refinement States and transitions Arrow- labeled event and optionally a parenthesized condition Clustered two events to one D is an abstraction of A and C D can be refined to consist of A and C Zooming in and out of D (in latter A and C are not shown) Arrow- labeled event and optionally a praenthesized condition Clustered two events b to one D is an abstraction of A and C D can be refined to consist of A and C Zooming in and out of D (in latter A and C are not shown) 12/9/2018 CS599- Formal Methods in SW Architectures

Statecharts – brief overview Orthogonality Y A B D C a b in (G) G E g F m d Y is the orthogonal product of A and D 12/9/2018 CS599- Formal Methods in SW Architectures

Gas Station Specifications 1. There will be four pumps at the gas station, and a unique number will identify each pump. 2. All pumps are “self serve.” 3. Each pump has three nozzles for different type of gas—regular, plus, and premium—denoting different octane content in the gasoline. The prices for the three types of gas vary. 4. Each pump has one meter. At any one time, only one person can use one pump. 5. All pumps are connected to common storage tanks, one for each of the three types of gas. When the level of gas in a storage tank gets below a set threshold, a request for a refill is issued to an external system. 6. It is possible for a customer to pump gas during storage tank refill. 7. A customer must pay first. The single gas station attendant accepts cash only. 8. Upon payment, the attendant enables a given pump to dispense the paid-for amount of gas. 9. The customer can change the decision on the type of gas (s)he wants to fill before starting to fill. Once the customer has started to fill, then the decision cannot be changed. 10. Should the customer pre-pay more than (s)he spent to fill the car tank, the gas station attendant will return to the customer his/her change. 11. The pump nozzle has a sensor that stops the gas flow once the tank is full. 12. The system should handle race conditions, such as a. one customer paying while, in the meantime, another beginning to pump gas at the paid-for pump, and b. one customer beginning to pump at a pump without paying, before another is able to retrieve his/her change. 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures Example – gas station Events “regular”, “premium” or “plus” selected Level of gas reached threshold Pump gas Tank full Pay Change picked up Assumptions The threshold is set in such a way that there is enough gas for the current vehicles on all pumps to finish filling 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures Refinement Clustering 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures Gas station Handling the raise condition 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures Cruise Control System 12/9/2018 CS599- Formal Methods in SW Architectures

Cruise Control System Specifications 1. You can assume an automatic transmission vehicle. 2. For any of the cruise control (CC) functions to take effect, CC must be turned on first. 3. CC can be in the following states: off, enabled (i.e., on and cruising), and disabled (on, but not cruising). 4. The CC system should be automatically disabled below 30mph and above 90mph. 5. Four actions are permitted during CC: set speed, accelerate, decelerate, and resume speed. 6. When the system is under CC and the brake is pressed, CC is disabled. When the resume button is pressed, the system resumes at the last set CC speed. 7. When the system is under CC and the accelerator pedal is pressed, CC is disabled and the speed increases correspondingly. When the accelerator is released, the CC resumes at its last set CC speed. If at any point of time during acceleration the CC speed is set, CC replaces the old set speed with the new speed. 8. If CC is enabled and the vehicle starts going uphill or downhill, CC should automatically apply the accelerator or brake to maintain the set speed. 12/9/2018 CS599- Formal Methods in SW Architectures

Cruise Control (CC) Events Engine on Engine off CC off CC on (+ cruising+ disabled) Set speed (CC is on) Accelerate Decelerate Resume CC 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures Top level states: Engine on and engine off Events to change states: turn on engine, turn off engine Refinement Clustering 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures Zoom in engine on: CC on and CC off Events to change states: push CC on, push CC off Refinement Clustering 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures Zoom in CC on: CC enabled and CC disabled Disable to enable: push resume (speed set); push set (30<speed<90); accelerator released; Enable to Disable: gas or brake pressed; Refinement Clustering 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures 12/9/2018 CS599- Formal Methods in SW Architectures

What Statecharts are good for? Reactive Systems (event driven) Showing concurrency and its restrictions Showing state changes Certain timing constraints Hierarchical systems Easy to understand and communicate 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures What are the problems? Statemate formulas require more notation than others for the same level of details Large (or variable) number of similar activities are hard to present Various designers could come up with different designs State explosion 12/9/2018 CS599- Formal Methods in SW Architectures

What happened in our systems? We used: Clustering/Refinement Orthogonality (i.e. Concurrency) Action/Activities We did not use: History (we tried!) 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures Our experience Timing and Concurrency issue was not critical in our systems Orthogonality could not be used except for the the gas station example when the station runs out of gas History was not used since the system did not need to remember the previous state in any of the examples 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures Challenges Transition on the same state Problems in the system for differentiating states from conditions and events. Is “grade selected” an state or event? Is “current speed = cruise speed” an event or state or condition? Concurrency issue in the gas station example 12/9/2018 CS599- Formal Methods in SW Architectures

CS599- Formal Methods in SW Architectures Discussion Is Statechart notation appropriate for modeling these systems? Pre/post conditions  conditions/activities Problem with specifying values in the statecharts (unlike C2SADEL) Difficult to model statical aspects. Variables inside the state (current speed) Specifying invariants, state variable. 12/9/2018 CS599- Formal Methods in SW Architectures