The STATEMATE Semantics of Statecharts. Presentation by: John Finn October 5, by David Harel

Similar documents
Embedded Systems 2. REVIEW: Actor models. A system is a function that accepts an input signal and yields an output signal.

CPU Scheduling Exercises

Theoretical Foundations of the UML Lecture 18: Statecharts Semantics (1)

Information System Design IT60105

Discrete Dynamics Finite State Machines גרא וייס המחלקה למדעי המחשב אוניברסיטת בן-גוריון

Verifying Properties of Parallel Programs: An Axiomatic Approach

TRANSITION CONFLICTS DETECTION IN BINARY MODULAR STATECHART DIAGRAMS 1. Grzegorz Łabiak

Simulation & Modeling Event-Oriented Simulations

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

An Indian Journal FULL PAPER ABSTRACT KEYWORDS. Trade Science Inc.

Opus: University of Bath Online Publication Store

Semantics of S.S.M. (Safe State Machine)

A logical framework to deal with variability

Computation Tree Logic (CTL) & Basic Model Checking Algorithms

Dynamic Semantics. Dynamic Semantics. Operational Semantics Axiomatic Semantics Denotational Semantic. Operational Semantics

On Two Class-Constrained Versions of the Multiple Knapsack Problem

Refinement-Robust Fairness

Description of the ED library Basic Atoms

Topic Dependencies for Electronic Books

Chapter 5. Finite Automata

Embedded Systems Development

Path Testing and Test Coverage. Chapter 9

Path Testing and Test Coverage. Chapter 9

Game Theory and Algorithms Lecture 2: Nash Equilibria and Examples

The Bell-LaPadula Model

CMSC 451: Lecture 7 Greedy Algorithms for Scheduling Tuesday, Sep 19, 2017

Formal Conformance Testing 2006

Embedded Systems. Embedded Systems

SPECIFICATION MODELS. Chapter 3. Overview. Introducing Hierarchy. StateCharts

Unit: Blocking Synchronization Clocks, v0.3 Vijay Saraswat

Composition for Component-Based Modeling

Biological Networks: Comparison, Conservation, and Evolution via Relative Description Length By: Tamir Tuller & Benny Chor

Nonmonotonic Reasoning in Description Logic by Tableaux Algorithm with Blocking

Improper Nesting Example

On Permissions, Inheritance and Role Hierarchies

UML Model Refactoring

Languages for Programming Hybrid Discrete/Continuous-Time Systems

State modeling. Marlon Dumas. Institute of Computer Science

Synchronous Reactive Systems

T Reactive Systems: Temporal Logic LTL

6.207/14.15: Networks Lecture 10: Introduction to Game Theory 2

SEMANTICS OF SYNCCHARTS

Active Integrity Constraints and Revision Programming

Model-Based Design of Game AI

Towards a Property Preserving Transformation from IEC to BIP

Decentralized Control of Discrete Event Systems with Bounded or Unbounded Delay Communication

Process Algebras and Concurrent Systems

The Discrete EVent System specification (DEVS) formalism

Operational Semantics

Electron Configuration! Chapter 5

HYPENS Manual. Fausto Sessego, Alessandro Giua, Carla Seatzu. February 7, 2008

Building Thermal Energy Simulations Supported by the CityGML Energy ADE

Declarative Computation Model. Conditional. Case statement. Procedure values (2) Procedure values. Sequential declarative computation model

The Greedy Method. Design and analysis of algorithms Cs The Greedy Method

Timo Latvala. February 4, 2004

CycleTandem: Energy-Saving Scheduling for Real-Time Systems with Hardware Accelerators

A test sequence selection method for statecharts

STABILITY AND POSETS

A Hybrid Synchronous Language with Hierarchical Automata

Lecture Notes: Axiomatic Semantics and Hoare-style Verification

Session-Based Queueing Systems

On Compensation Primitives as Adaptable Processes

Natural Rock Sample Manual

An object-oriented design process. Weather system description. Layered architecture. Process stages. System context and models of use

Argumentation-Based Models of Agent Reasoning and Communication


Revamped Round Robin Scheduling Algorithm

Saint Patrick High School

1 Lamport s Bakery Algorithm

Computer-Aided Program Design

Dynamic Noninterference Analysis Using Context Sensitive Static Analyses. Gurvan Le Guernic July 14, 2007

Physics 2B. Lecture 24B. Gauss 10 Deutsche Mark

Dialectical Frameworks: Argumentation Beyond Dung

rethinking software design by analyzing state

Traffic accidents and the road network in SAS/GIS

SECTION 1. Introduction to MD NASTRAN SOL 400

Classroom Tips and Techniques: Series Expansions Robert J. Lopez Emeritus Professor of Mathematics and Maple Fellow Maplesoft

Clojure Concurrency Constructs, Part Two. CSCI 5828: Foundations of Software Engineering Lecture 13 10/07/2014

Applying cluster analysis to 2011 Census local authority data

Dynamic Call Center Routing Policies Using Call Waiting and Agent Idle Times Online Supplement

CS505: Distributed Systems

Extending Statecharts with Temporal Logic. A. Sowmya and S. Ramesh

Optimal strategies for maintaining a chain of relays between an explorer and a base camp

EE 144/244: Fundamental Algorithms for System Modeling, Analysis, and Optimization Fall 2016

Formal Semantics for Grafcet Controlled Systems 1 Introduction 2 Grafcet

Trace Diagnostics using Temporal Implicants

Axiomatic Semantics. Stansifer Ch 2.4, Ch. 9 Winskel Ch.6 Slonneger and Kurtz Ch. 11 CSE

Rigorous Software Development CSCI-GA

Improved Deadline Monotonic Scheduling With Dynamic and Intelligent Time Slice for Real-time Systems

Verification of Hybrid Systems with Ariadne

Geometric Steiner Trees

Model Checking for Propositions CS477 Formal Software Dev Methods

Non-impeding Noisy-AND Tree Causal Models Over Multi-valued Variables

18.600: Lecture 32 Markov Chains

Development of a Cartographic Expert System

Overview. 1 Lecture 1: Introduction. 2 Lecture 2: Message Sequence Charts. Joost-Pieter Katoen Theoretical Foundations of the UML 1/32

SMV the Symbolic Model Verifier. Example: the alternating bit protocol. LTL Linear Time temporal Logic

SAMPLE. 1.2 Prime factor form. 1.3 Finding the Highest Common Factor (HCF)

On-line scheduling of periodic tasks in RT OS

Interface Automata with Complex Actions - Extended Version

Transcription:

The STATEMATE Semantics of Statecharts Presentation by: John Finn October 5, 2010 by David Harel

Outline Introduction The Basics System Reactions Compound Transitions History Scope of Transitions Conflicting Transitions

Introduction No official semantics Nearly 20 variants [von der Beek 1994] Clarity and Simplicity STATEMATE semantics, which is a commercial tool for the specification and design of complex systems

The Basics: Activity Chart Hierarchy Root Activities Control Activities OR/AND/Basic States

The Basics: Syntax e[c]/a e: event, which triggers a transition c: condition, which enables the transition if true a: action, which is carried out if the transition is triggered and its condition is true Special Events: enter(s), exit(s)

The Basics: States Static Reactions have the e[c]/a syntax, and can be carried out if the system is in the state Virtual State Activities can be active within or throughout a state

The Basics: System Runs represent snapshots of the system s response to an external stimuli Each snapshot is called a Status, which includes: Active states Activities Data and conditional values Generated events Scheduled actions Past behavior System changes status by executing a Step

The Basics: Semantics Reactions to events and system changes can only be sensed after the step is complete Events only live for the step following the one in which they occur Calculations in one step are based on the status at the start of that step The maximal subset of non-conflicting transitions and static reactions are always executed A step takes zero time

System Reactions: Configuration Configuration is the maximal set of states a system can be in simultaneously Consider a root state, R and a configuration, C C must contain R If C contains an OR state A, it must contain one of A s sub-states If C contains a AND state A, it must contain all of A s sub-states No extraneous states, all states must be require by the rules above

System Reactions: Configuration If the system is in state A, it must also be in A s parent state, unless the current state is the root Basic configurations consist of only basic states For example: Basic Config: {B1, C1, D1}, {E} Full Config: {B1, C1, D1, B, C, D, A, S} Can you spot another Full Config? Illegal Config: {B1, B2, C1, D1} Non-maximal Config: {B1, C1} What about {B2, C1, D2}? {E, S} Basic Configuration

System Reactions: Operations How does a system change its status: Transitions Static Reactions Actions performed when entering a state Actions performed when exiting a state

System Reactions: Transitions Transition becomes enabled when within the transition s source state and the event becomes true For example: Exit A and Enter B exit(a) and enter(b) are generated in(a) becomes false, in(b) become true Exiting A actions take place Entering B actions take place State S s Static Reactions are executed Activities within or throughout A are deactivated, while activities within (not necessarily) or throughout B are activated

System Reactions: Transitions All of the mentioned changes are sensed in the next step For example, For the step below, which act is executed if X is initialized to 4? 5? X := X + 1; act2; act1 if X = 5 then act1 else act2 end Racing Condition: when two or more actions attempt to change a variable in the same step, the outcome is unpredictable

Compound Transitions: Rules Each step must lead the system into a legal configuration A system cannot be in a non-basic state without the ability to enter a sub-state Transition Segment: labeled arrow which can connect states and other transitions Basic Compound Transition: maximal chain of transition segments that are executed simultaneously

Compound Transitions Joint/Fork are AND connectors Condition/Selection/Junction are OR connectors Initial CT: source of the CT is a state Continuation CT: source is a default or history connector Full CT: Contains one initial CT and potentially several continuation CTs

Compound Transitions: Examples OR connectors Two CTs: {t1, t2} {t1, t3} AND connectors {t1, t2, t3}

Compound Transitions: Examples More complicated t1 and t2 must be executed together, which leads into t5 Then, t3 OR t4 Full CTs: {t1, t2, t5, t3} or {t1, t2, t5, t4}

Compound Transitions: Examples Initial CT {t1, t2, t3} Full CT {t1, t2, t3, t4, t5} Why not t6?

History Two types of history connectors Suppose we are executing a CT, t1 to state S H Connector Let S be the sub-state of S which the system was in when most recently in S t1 is treated as if its target is S instead of S H* Connector Let S be the basic configuration relative to S which the system was in when most recently in S t1 is targets all of the states in S If entering S for the first time, t1 is treated as if it is targeting S

History: Example Transition t1 is taken If B was last in B1 the last time in B, then B = B1 The full transition become {t1, t2} If B was last in B2 the last time in B, then B = B2 {t1, t3} If entering B for the first time? {t1, t4, t2}

Scope of Transitions If the system is in A to start and events e and f are triggered during the previous step Transition t1 become active but not t2 The system is now in state B, but it does not know f was triggered previously, and therefore, it will only go to C if f is triggered again CT is enabled in a step if at the beginning of the step the system is in all the states of its source and if its trigger is true

Scope of Transitions The previous example seems simple, however, consider this example When executing t1, should we exit and reenter A? Similarly, should events that trigger from exiting or entering A be executed? Transition Scope answers these questions

Scope of Transitions The scope of a transition is the lowest OR state in the hierarchy of states that is a proper common ancestor of all the sources and targets of that transition, including non-basic states

Scope of Transitions For example, the scope of t1 is S Execution of t1 implies Exiting B2, B, A, C, and C1 or C2 Entering A, B, B1, C, C2 What about t4? U Exiting W and V Entering V and W

Scope of Transitions What is the scope of t6? W

Conflicting Transitions Two transitions are conflicting if there is some common state that would be exited if any one of them were to be taken Transitions t1 and t2 are conflicting Also, t4 is in conflict with t1, t2 and t3, why?

Conflicting Transitions Non-determinism: there is no reason to take t1 over t2 or vice versa However, in the second case, t4 has priority over t1, t2 and t3 The transition with the highest scope has priority If same scope a Non-determinism occurs

Conflicting Transitions Dealing with non-determinisms Simulation Tool waits for one of the possibilities to be selected by the user Dynamic test tool will try all possibilities The code synthesized by the software generator will select the first possibility The hardware code generator behaves similarly, but can report non-determinisms

Summary Introduction The Basics System Reactions Compound Transitions History Scope of Transitions Conflicting Transitions

Next Time Jonathan Kotker will present the remainder of the article Basic Step Algorithm Models of Time Racing Conditions Multiple State Charts