1 Gas Station and Cruise Control Specifications Ronnie Apcar Edwin Chiu Hasmik Jerejian November 2, 2000 CSCI 599 Formal Methods November 2, 2000 Concurrency.

Slides:



Advertisements
Similar presentations
School of Computer Science & Software Engineering
Advertisements

Workflow Management Systems © Dr. Rafael A. Calvo – Edited by Mark Aufflick (pumptheory.com) School of Electrical and Information Eng, University of Sydney.
1 Petri Nets I Paul Fishwick author From
Formal Methods in Software Engineering
1 SE-561 Formal Methods in Software Petri Nets - I.
Knowledge Based Synthesis of Control for Distributed Systems Doron Peled.
An Introduction to Petri Nets
Principles of Engineering System Design Dr T Asokan
Introduction to Petri Nets Hugo Andrés López
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
Petri Nets Section 2 Roohollah Abdipur.
Based on: Petri Nets and Industrial Applications: A Tutorial
Interaction Modeling for Testing We would generate the test cases based on our understanding of the interactions that may happen. The source is, again,
Discrete Interaction Design Specification Prof. Dr. Matthias Rauterberg Faculty Industrial Design Technical University of Eindhoven
1 Concurrency Specification. 2 Outline 4 Issues in concurrent systems 4 Programming language support for concurrency 4 Concurrency analysis - A specification.
Synthesis of Embedded Software Using Free-Choice Petri Nets.
Petri Nets Overview 1 Definition of Petri Net C = ( P, T, I, O) Places P = { p 1, p 2, p 3, …, p n } Transitions T = { t 1, t 2, t 3, …, t n } Input.
CS447/ECE453/SE465 Prof. Alencar University of Waterloo 1 CS447/ECE453/SE465 Software Testing Tutorial Winter 2008 Based on the tutorials by Prof. Kontogiannis,
An Introduction to Input/Output Automata Qihua Wang.
CSC 402 Requirements Engineering 1 Requirements Techniques, cont. Formal requirements analysis techniques include: – DFD (covered) – ERD (covered) – Finite.
Advanced Topics in Behavior Analysis - Page L15-1 MEF-OOM&A-L15-1 Dr. M.E. Fayad Lesson 15: Advanced Topics in Behavior Analysis Object- Oriented Modeling.
FunState – An Internal Design Representation for Codesign A model that enables representations of different types of system components. Mixture of functional.
Data and Knowledge Representation Lecture 6 Qing Zeng, Ph.D.
12/07/2007Jiacun Wang1 SE-561 Math Foundations Petri Nets - II Dr. Jiacun Wang Department of Software Engineering Monmouth University.
10/19/2000cs599 - Formal Methods in Software Architecture 1 Algebraic Example – OBJ3 Tarang Garg Srikumar Nagaraj.
Models of Computation for Embedded System Design Alvise Bonivento.
Modeling State-Dependent Objects Using Colored Petri Nets
Requirements Techniques, cont. Brief review Formal Requirements Techniques –Finite State Machines –Petri Nets.
THE OBJECT-ORIENTED DESIGN WORKFLOW Statechart Diagrams.
Petri Net Modeling for dynamic MM composite Object.
Mata kuliah :K0362/ Matematika Diskrit Tahun :2008
Petri Nets An Overview IE 680 Presentation April 30, 2007 Renata Kopach- Konrad.
PETRINETS Nipun Devlekar Zauja Lahtau. PETRINETS DEFINITION : DEFINITION :  PETRINET (place/ transition net): a formal, graphical, executable technique.
An Introduction to Petri Nets Marjan Sirjani Formal Methods Laboratory University of Tehran.
Modeling with ordinary Petri Nets Events: Actions that take place in the system The occurrence of these events is controlled by the state of the system.
CY2003 Computer Systems Lecture 7 Petri net. © LJMU, 2004CY2003- Week 72 Overview Petri net –concepts –Petri net representation –Firing a transition –Marks.
Virtual Storytelling Adam Abonyi Daniel Balaš. Agenda 1.Introduction to virtual storytelling 2.Petri Nets 3.Our improvements in Petri Nets 4.Example.
Petri Nets: Their Development and Use in Production Planning Jeffrey E. Short, P.E. December 6, 2000.
Stochastic Activity Networks ( SAN ) Sharif University of Technology,Computer Engineer Department, Winter 2013 Verification of Reactive Systems Mohammad.
- 1 -  P. Marwedel, Univ. Dortmund, Informatik 12, 05/06 Universität Dortmund Petri nets Introduced in 1962 by Carl Adam Petri in his PhD thesis. Focus.
Hardware Design and The Petri Net Abhijit K. Deb SAM, LECS, IMIT, KTH Kista, Stockholm.
Petri Nets Lecturer: Roohollah Abdipour. Agenda Introduction Petri Net Modelling with Petri Net Analysis of Petri net 2.
Petri Nets Invented by Carl Adam Petri in 1962 Concurrent systems with timing problems  Synchronization, race problem, deadlock A petri net consists of.
Modelling by Petri nets
Ch5: Software Specification. 1 Petri Nets  Introduced by C. Adams Petri in  Widely used in the modeling and analysis of computer systems.  Basic.
1 Copyright  2001 Pao-Ann Hsiung SW HW Module Outline l Introduction l Unified HW/SW Representations l HW/SW Partitioning Techniques l Integrated HW/SW.
CSCI1600: Embedded and Real Time Software Lecture 11: Modeling IV: Concurrency Steven Reiss, Fall 2015.
School of Computer Science & Software Engineering
CAP 4800/CAP 5805: Computer Simulation Concepts
ProShell Procedure Framework Status MedAustron Control System Week 2 October 7 th, 2010 Roland Moser PR a-RMO, October 7 th, 2010 Roland Moser 1.
Review n System dynamics : A sequence of state transition n model : A set of rules for state transition System S X Y Discrete event system FSM (Automata)
/faculteit technologie management PN-1 Petri nets refresher Prof.dr.ir. Wil van der Aalst Eindhoven University of Technology, Faculty of Technology Management,
Petri-Nets and Other Models
The Dynamic Analysis Model StateCharts Prof. Hany H. Ammar, CSEE, WVU, and Dept. of Computer Science, Faculty of Computers and Information, Cairo University.
Turing Machine Model Are there computations that no “reasonable” computing machine can perform? –the machine should not store the answer to all possible.
Laurea Triennale in Informatica – Corso di Ingegneria del Software I – A.A. 2006/2007 Andrea Polini VIII. Specifications (II)
Modeling for Testing Interactions
Victor Khomenko Newcastle University
Requirements Techniques, cont.
Advantages of FSM Their simplicity make it easy for inexperienced developers to implement with little to no extra knowledge (low entry level)
Dr. Eng Amr T. Abdel-Hamid
Model-Based Testing Model the system
Workflow Management Systems
CAP 4800/CAP 5805: Computer Simulation Concepts
CAP 4800/CAP 5805: Computer Simulation Concepts
Marija Rakic Greg Gao Roshanak Roshandel
An Introduction to Petri Nets
CAP 4800/CAP 5805: Computer Simulation Concepts
Petri Net :Abstract formal model of information flow Major use:
Petri Nets Laurie Frazier.
Presentation transcript:

1 Gas Station and Cruise Control Specifications Ronnie Apcar Edwin Chiu Hasmik Jerejian November 2, 2000 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian CSCI Formal Methods Concurrency Examples

2 n Concurrency Issues n Brief Tutorial of Petri Nets n The Gas Station Specification n The Cruise Control Specification n Concluding Remarks n Q&A CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Agenda

3 n Synchronization and Communication n Resource sharing n Deadlock n Starvation n Non-determinism CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Concurrency Issues

4 n What are Petri Nets? –Petri Nets are a graphical formalism for systems specification n Petri Nets are formed from finite sets of –Places –Transitions –Arrows connecting either places to transitions or transitions to places CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets

5 n A Petri Net (PN) is given a state by marking its places. n Marking of a PN consists of assigning a nonnegative integer to each place. –Graphically, tokens are inserted in places of a PN n Input place - arrow goes from the place to the transtion n Output place - arrow goes from the transition to the place CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets (2)

6 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets (3)

7 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets (4)

8 n A transition may have one or more Input and Output places n A transition is enabled if there is at least one token in each of its input places. n An Enabled transition may fire: – one token is removed from each input place and one token is inserted in each ouput place of the transition CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets (5)

9 n A Petri Net as a four-tuple (P,T,I,O), where –P is a set of places –T is a set of transitions –I is an input function: n for places leading into a transition –O is an output function n for places leading out of a transition CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets (6)

10 n Describing Concurrent Systems with PN –Transitions - model events or actions –Transition Firings - model occurrence of events or execution of actions –Presence of tokens - denote existence of some condition, that allow an event or action –Transitions are concurrent - if enabled, firing of one does not prevent others from firing CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets (7)

11 n Starvation –a process never receives access to a needed resource n Deadlock –iff no transition is enabled in that marking n Live –no deadlock can ever occur CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets (8)

12 n Limitations and extensions of Petri Nets –similar to FSMs (Finite State Machines), control- oriented model –tokens are anonymous n solution: assigning values to tokens –not possible to specify selection policy n solution: prioritizing transitions –timing issues - don’t take time into account n solution: Timed PN CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets (9)

13 Assigning values to tokens - Predicates and Functions CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets (10) t2t2 P2P2 P3P3 P4P4 P5P5 t1t1 P1P1 t 1 associations: P 2 > P 1 and P 4 := P 2 + P 1 t 2 associations: P 3 > P 2 P 4 := P 3 + P 2 P 5 := P 2 + P 3

14 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets (11) Producer-Consumer

15 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Tutorial of Petri Nets (12) Producer-Consumer

16 n Assumptions –The gas filling process begins when a customer presses a nozzle, after which time the type of gas being filled cannot be changed. –The pump nozzle and common storage tank sensors continuously sense tank fill status. –When the set threshold of any one of the 3 common storage tanks is reached, all the pump nozzles associated with that storage tank are disabled. CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Assumptions Gas Station Example

17 n Assumptions –No more than one customer can be pulled up to a particular pump at any one time, thereby eliminating the previously specified race conditions. –Each pump’s meter provides the following information: n Amount of gas dispensed in gallons n Total price of amount of gas dispensed. CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Assumptions Gas Station Example (2)

18 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Gas Station Example Tank Component Operator: Refill_Done Operator: Enable_Pump External: Refill_Status Operator: Schedule_Refill

19 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Gas Station Example Operator Component Pump: Available Tank: Not_Empty Tank: Reactivate_Fueling External: Refill Event Tank: Refill_Detected Customer: Go_To_Operator Customer: At_Pump Serve

20 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Gas Station Example Pump Component Customer: Pumping Customer: Change_Status Customer: Stop_Pumping Customer: Drive_Up Operator: Enable_Pump Customer: Drive_Away External: Tank_Full Not_Available Customer: Drive_Up

21 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Gas Station Example Customer Component Pump: Available Operator: Available Operator: Available Pump: Change_Status Pump: Start_Fueling Tank: Not_Empty Operator: Enabled Pump: Nozzle_Sensor Operator: Customer_Paid Pump: Available Pump: Not_Available Operator: Serve Operator: Busy

22 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Gas Station Example Example Linking Components

23 n Assumptions –The six CC actions are implemented as pairs of actions on three separate steering column turn levers: on/off, set speed/resume speed, and accelerate/decelerate. – Order of precedence for the CC actions: –on/off –set speed/resume speed –accelerate/decelerate. CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Assumptions Cruise Control Example

24 n Assumptions –When the cruise control system is enabled and either the accelerator pedal or brake pedal is depressed, the cruise control system is disabled and remains so until either set speed or resume speed is activated. –Cruising speed in uphill and downhill driving conditions is not maintained by the cruise control system, and thus not modeled in the following specification. CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Assumptions Cruise Control Example (2)

25 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Cruise Control Example Engine Component CC: Turn_CC_Off CC: Turn_CC_On

26 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Cruise Control Example Gas/Break Pedal Components CC: Disable_Cruising

27 CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Cruise Control Example Gas/Break Pedal Components Engine: On Gas/Break: Pressed

28 n Challenges –Enforcing a certain selection property –Maintaining global conditions throughout the system for all the states of the components –Modeling complex multiple concurrencies –Modeling data storage and access (e.g. Notion of variables in a programming language) CSCI 599 Formal Methods November 2, 2000 Concurrency Examples R. Apcar, E. Chiu, H. Jerejian Concluding Remarks