Review of getting started: Dynamic Model - State Diagram. States Labeled with Conditions. Dynamic Models for E.S. More Dynamic Modeling



Similar documents
Compliance and Requirement Traceability for SysML v.1.0a

CPS122 Lecture: State and Activity Diagrams in UML

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Lecture 8: Synchronous Digital Systems

TOYOTA ELECTRONIC TRANSMISSION CHECKS & DIAGNOSIS

Automotive System and Software Architecture

Software Engineering. System Modeling

Using UML Part Two Behavioral Modeling Diagrams

Announcements. SE 1: Software Requirements Specification and Analysis. Review: Use Case Descriptions

Daylite Synchronization Guide

Chapter 13 Embedded Operating Systems

ELEC 5260/6260/6266 Embedded Computing Systems

SECURITY SYSTEM MANUAL

TRAFFIC LIGHT: A PEDAGOGICAL EXPLORATION

Figure 8-1 Four Possible Results of Adding Two Bits

RF 1. Contents: Connecting diagram. Detailed information:

Applying Use Cases to Microcontroller Code Development. Chris Gilbert Cypress Semiconductor

PUSH BUTTON START INSTALLATION MANUAL

TISSOT TWOTIMER SETTING INSTRUCTIONS

Chapter 1 Computer System Overview

Exception and Interrupt Handling in ARM

Video Baby Monitor System. User Guide

Owner s Guide. ca6554

Sofware Requirements Engineeing


Security System Owner s Manual

Requirements Document for the Banking System. Lecture # 40

PART 11: START-UP PROCEDURES FOR THE INSTALLER

Sequence Diagrams. Massimo Felici. Massimo Felici Sequence Diagrams c

Fourth generation techniques (4GT)

International Journal of Software Engineering and Knowledge Engineering Vol. 11, No. 3 (2001) World Scientific Publishing Company

SCORPION. micron security products

Designing a Home Alarm using the UML. And implementing it using C++ and VxWorks

PROGRAMMING & OPERATING INSTRUCTIONS CL5000 AUDIT TRAIL

Chapter 19. Activity Diagrams

Umbrello UML Modeller Handbook

Intellect Platform - The Workflow Engine Basic HelpDesk Troubleticket System - A102

Part 2. Copyright 1998 Philips Consumer Communications L.P. All rights reserved. Printed in Mexico. Issue 1AT&T

Case studies: Outline. Requirement Engineering. Case Study: Automated Banking System. UML and Case Studies ITNP090 - Object Oriented Software Design

Managing Rack-Mount Servers

Weather Direct Displays show Lost Forecast (blank boxes in the picture icons)

Lecture 1. Introduction to Embedded Computer Systems

i. Node Y Represented by a block or part. SysML::Block,

Eaton 9-Speed Synchronized Transmissions Double H Shift Control Configuration TRDR0070

PROGRAMMABLE LOGIC CONTROL

6. BOOLEAN LOGIC DESIGN

Operating Guide. Alert 8D Version 8 Zone Controller Arrowhead Alarm Products Ltd

Applying 4+1 View Architecture with UML 2. White Paper

AN141 SMBUS COMMUNICATION FOR SMALL FORM FACTOR DEVICE FAMILIES. 1. Introduction. 2. Overview of the SMBus Specification. 2.1.

BIGPOND ONLINE STORAGE USER GUIDE Issue August 2005

Welcome to a whole new level of interactive home security

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 OUTCOME 3 PART 1

TECH. Requirements. Why are requirements important? The Requirements Process REQUIREMENTS ELICITATION AND ANALYSIS. Requirements vs.

Fuller Heavy Duty Transmissions TRDR0700 EN-US

Sensi TM. Wi-Fi Programmable Thermostat MANUAL OPERATION. Version: March Emerson Electric Co. All rights reserved.

Smart Touch. Owners Manual. By INNOVATIVE POOL PRODUCTS LLC. For more information look us up on the web at

Q. Consider a dynamic instruction execution (an execution trace, in other words) that consists of repeats of code in this pattern:

Salesforce Classic Guide for iphone

Agile QA Process. Anand Bagmar Version 1.

Overview Motivating Examples Interleaving Model Semantics of Correctness Testing, Debugging, and Verification

Multiprocessor Cache Coherence

Midco SmartHOME. Professionally Monitored Service: User Guide. Touchscreen Key Fob Keychain Remote Web Access Device Access for ios and Android

How To Draw A Cell Phone Into A Cellphone In Unminimal Diagram (Uml)

User s Manual for Fingerprint Door Control Software

Programming Logic controllers

UML for the C programming language.

System Modeling / Class Diagra Diagr m a Week 6

Real Time Programming: Concepts

Lectures 2 & 3: Introduction to Modeling & UML. Getting started

Golf Cart Safety Training

1 General information

11. FLOWCHART BASED DESIGN

Housekeeping & Maintenance Work Orders

Serial Communications

Application of UML in Real-Time Embedded Systems

These release notes are intended to acquaint you with your new software version as quickly as possible.

VIVA 4G LTE Mini Router. Quick Start Guide

CounterPoint SQL and Magento ecommerce Interface

SE Timer - V2.0 Master Programming Mode Flow Chart

A Comprehensive Safety Engineering Approach for Software Intensive Systems based on STPA

Model Simulation in Rational Software Architect: Business Process Simulation

Digital Electronics Detailed Outline

WHAT ELSE CAN YOUR HOME PHONE DO?

Introduction. Drenth Motorsport Gearboxes Fleuweweg AG Enter The Netherlands Phone: +31 (0) Fax: +31 (0)

ETHERNET IRRIGATION CONTROLLER. Irrigation Caddy Model: ICEthS1. User Manual and Installation Instructions

HP 5 Microprocessor Control for Mammoth Water Source Heat Pumps

VCR Ion Beam Sputter Coater

THRUST CURVE LOGGER V-4.200

Application Unit, MDRC AB/S 1.1, GH Q R0111

Ambiente Quick Reference Manual

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Types of UML Diagram. UML Diagrams OOAD. Computer Engineering Sem -IV

It explains the differences between the Plesiochronous Digital Hierarchy and the Synchronous Digital Hierarchy.

IBM Sterling Control Center

Input / Output and I/O Strategies

National CR16C Family On-Chip Emulation. Contents. Technical Notes V

Transcription:

Review of getting ed: More Dynamic Modeling Scenario making: gets us ed thinking about s. Interface (high-level prototyping): helps us to think about order of things. (happening in projects) Event trace: helps to know what object is doing what action. State Diagram creation tips. 1 2 Dynamic Model - State Diagram Graphical representation of a finite state machine. Changing states - transitioning on s. Events - external stimuli and internal messages ex. button pushed; timer complete; tub full. ex. complete sent by state In each state, a set of predicates based on instance variables, is valid. States Labeled with Conditions Microwave Oven _oven/:=t; error:=t open_door/close:=f SOP open_door/close:=f; heat:=f (null) close_door SE1 S0 done/:=f; heat:=f, error do/close:=t close_door close _oven/:=t open_door/close:=f SE2 reset/close:=f; S2 warmup/heat:=t, close, error:=f, close error S4 close; heat _cooking/:=f S3,close, heat 3 4 Dynamic Models for E.S. Dynamic Model for user buttons would be simplistic; button modeling might not be needed. pushed on off button pushed Some environmental units might have behavior that should be modeled. (like an engine shifting through speeds) For embedded systems - might only need one significant behavior model (for controller.) Complex models will be decomposed into more detailed behavioral models. Concurrency could be present within a model. How dynamic model relates to object model One state diagram for each class (with important behavior.) Each class has concurrent behavior. ggregation in the Object Model usually implies concurrency in the Dynamic Model. 5 6 1

Examples of ggregation (5.17) Object model Car Ignition Transmission rake ccelerator How to model concurrency within an object Ignition Car Transmission turn key to [Transmission in Neutral] release key off ing on turn key off Neutral push R push N push N push F Forward stop upshift upshift first second third downshift downshift Reverse Each class here will need a concurrent state diagram 7 off ccelerator depress accelerator on release accelerator off rake depress brake release brake on How to hide complexity Not have a flat state diagram Start abstract and then do subdiagrams. use bull s eye Take one abstract state and expand it with state generalization. idle Example of nesting (and other syntax as well) coin in(value) cancel / refund coins coin in(value) Example: lower-level state diagram for Dispense item activity [item empty] [change=0] Do/add to balance(value) select(item) [change<0] Do/test item present; make change [change>0] Do/dispense change Do/move arm to correct row Do/move are to correct column Do/push item off shelf 9 stop 10 Push F State Generalization Neutral Forward Push R Push N Push N Reverse Neutral Push R Push N Reverse Push F Push N Forward Upshift Upshift First downshift Second downshift Third Notation on Transitions and in States Do/ activity takes some time. associated with a state. Guards conditions - boolean [ guard ] ctions : instantaneous associated with an. /action State1 1 (attribs) [condition1]/ action1 do/ activity 1 You might need any or all of these for your project! State2 do/ activity 2 11 12 2

Checking for completeness and consistency Formal specifications do this better! The mathematical format can allow automation of these types of checks. Every state should have a way in and out. unless ing point or ending point. Look for one object s Dynamic Model sending an that doesn t have any receiving transition in another object s DM. Things to watch out for Think about input from concurrent objects at unexpected times. ex. If more than one TM machine is trying to access the same account at the same time. User input when not planned. (OK to ignore, but make sure that is what is really wanted.) Take your scenarios and see if they work! Walk through seeing that all the object s operations/messages has all the needed transitions. 13 14 Producer-Consumer - Normal Scenario Producer-Consumer State machine 1 get send(.get) data 0 fetch get/send(.) timeout/ send(.nak) data(buf) stash do/save buf data_ready/.data(buf) timeout 15 16 asic Class Diagram Producer-Consumer State machine 2 get, nak send(.get) data,, nak 0 fetch get/send(.) timeout/ send(.nak) data(buf) nak data_ready/.data(buf) timeout stash do/save buf 17 / 18 3

Topics Covered: Dynamic Model Timing and Exceptional Handling Dynamic Model Synchronization schemes Exception Handling Timing including safety critical issues. stop 19 20 Synchronization (Very Simple) Power Plant In concurrent processing, the actions of the objects are rarely independent of each other. One may need to stop and for another process to catch up or get to a certain state. Example: In a nuclear power plant, the model would need to reflect ing for rods to be in place before generating power. off/insert rods off/ close valves; pumps off cool idle Get_ready do/open valves timeout(1s)[water cold] too_hot/insert rods pumps_on heat do/raise rods op_temp/send(pumps_on) pumps do/ pumps 21 22 Synchronization of States by status detection Synchronization of States by a common 1 1 IN(2) State1 State1 1 1 State2 State2 2 2 Transition between 1 and 2 will not fire until object has entered state 2. 23 Firing of the two transitions in the two models will happen at the same time. 24 4

Synchronization of States by common data Synchronization of States by Communication State1 do: x:=0 State1 State1 /send(sync) State1 sync State2 do: x:= 1 When(x==1) State2 State2 State2 Transition from State 1 to State 2 will not fire until in State 2. (This assumes shared memory.) 25 26 Exception Handling Examples of exception handling Events such as resets and hardware interrupts must be handled. These are called Exceptions. Needed if user can exit a sequence of states at anytime. 27 Possible to modeling exiting all the substates of a superstate in UML. Ex. Pushing the N (neutral button) in any of the forward states of a transmission. 3 ways to exit: normal completion, direct transition, and exception. 1 Superstate substate1 exception_ substate2 some_ normal exiting by completion using a final state. Good modularity. normal exit but violates data hiding 28 Timing Issues in Dynamic Model Sometimes the firing of a transition is time dependent, especially in embedded systems. Real-time systems might have transitions that are tied to a real-time clock. States might time-out after a certain length of time. Transitions might need to be stalled for a certain length of time. Timing (Safety critical) Safety critical real-time solutions example: transition out of boiler on state after being in this state for 1 hour, even if one expects a transition on when(temperature>=expected). oiler On when(temperature >= expected) timeout(1h) Off 29 5

Delays in Dynamic Model More Timing Issues in D. M. Sometimes a transition should not be fired for a certain amount of time. This timing constraint can be modeled using timeout and an extra state ex. 10 seconds since the exit from state This will delay the transition to State for 10 seconds. timeout(10s) State Hold State For a real-time system, the might refer to a real-time clock example: changing a traffic signal from day operation to night operation at 10 p.m. Day superstate 2200_hours 0600_hours Night superstate 31 32 6