ECGE (Enhanced Petri Net Graphical Editor) : A Multi-Platform Petri Net Editor 15 April 2005 David Dugan.

Slides:



Advertisements
Similar presentations
Integration of MBSE and Virtual Engineering for Detailed Design
Advertisements

Modeling and Simulation By Lecturer: Nada Ahmed. Introduction to simulation and Modeling.
CS0004: Introduction to Programming Visual Studio 2010 and Controls.
Ch 3 System Development Environment
Software Modeling SWE5441 Lecture 3 Eng. Mohammed Timraz
Programming Languages Marjan Sirjani 2 2. Language Design Issues Design to Run efficiently : early languages Easy to write correctly : new languages.
Case Tools Trisha Cummings. Our Definition of CASE  CASE is the use of computer-based support in the software development process.  A CASE tool is a.
Automated creation of verification models for C-programs Yury Yusupov Saint-Petersburg State Polytechnic University The Second Spring Young Researchers.
CIM2564 Introduction to Development Frameworks 1 Overview of a Development Framework Topic 1.
Effective systems development requires a team effort from stakeholders, users, managers, systems development specialists, and various support personnel,
Chapter 13 Embedded Systems
Managing Agent Platforms with the Simple Network Management Protocol Brian Remick Thesis Defense June 26, 2015.
Chapter 1 Principles of Programming and Software Engineering.
The primary purpose of this project is to build a system that will visualise graphs, and more importantly visualise the execution of a graphing algorithm.
Testing an individual module
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Architectural Design Establishing the overall structure of a software system Objectives To introduce architectural design and to discuss its importance.
1 CS101 Introduction to Computing Lecture 19 Programming Languages.
TIBCO Designer TIBCO BusinessWorks is a scalable, extensible, and easy to use integration platform that allows you to develop, deploy, and run integration.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
Introduction 01_intro.ppt
PROGRAMMING LANGUAGES The Study of Programming Languages.
A First Program Using C#
Smith’s Aerospace © P. Bailey & K. Vander Linden, 2005 Architecture: Component and Deployment Diagrams Patrick Bailey Keith Vander Linden Calvin College.
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
(C) 2009 J. M. Garrido1 Object Oriented Simulation with Java.
สาขาวิชาเทคโนโลยี สารสนเทศ คณะเทคโนโลยีสารสนเทศ และการสื่อสาร.
Implementation Yaodong Bi. Introduction to Implementation Purposes of Implementation – Plan the system integrations required in each iteration – Distribute.
Chapter 7 Structuring System Process Requirements
CMSC 345 Fall 2000 Unit Testing. The testing process.
Prepared by: Sanaz Helmi Hoda Akbari Zahra Ahmadi Sharif University of Tech. Summer 2006 An Introduction to.
SOFTWARE DESIGN.
CHAPTER TEN AUTHORING.
- 1 - Embedded Systems - SDL Some general properties of languages 1. Synchronous vs. asynchronous languages Description of several processes in many languages.
SE: CHAPTER 7 Writing The Program
Systems Analysis and Design in a Changing World, 3rd Edition
Requirements as Usecases Capturing the REQUIREMENT ANALYSIS DESIGN IMPLEMENTATION TEST.
UML diagrams What is UML UML diagrams –Static modeoing –Dynamic modeling 1.
Creating Graphical User Interfaces (GUI’s) with MATLAB By Jeffrey A. Webb OSU Gateway Coalition Member.
UML as a Specification Language for Embedded Systems. By, Mir Ahmed Ali, Asst. Professor, ECM department, SNIST. By, Prof. Narsiah sir, Director of School.
1. 2 Preface In the time since the 1986 edition of this book, the world of compiler design has changed significantly 3.
1 CSCD 326 Data Structures I Software Design. 2 The Software Life Cycle 1. Specification 2. Design 3. Risk Analysis 4. Verification 5. Coding 6. Testing.
CITA 342 Section 2 Visual Programming. Allows the use of visual expressions (such as graphics, drawings, or animation) in the process of programming.
Tools, Formats, & Solutions.  Survey of literature found 3 interesting ways Petri Nets are used  BioPNML – Petri Nets for Bio  GJobDL – Petri Nets.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
CASE (Computer-Aided Software Engineering) Tools Software that is used to support software process activities. Provides software process support by:- –
Object-Oriented Application Development Using VB.NET 1 Chapter 10 VB.NET GUI Components Overview.
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.
QPE A Graphical Editor for Modeling using Queueing Petri Nets Christofer Dutz.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Architecture View Models A model is a complete, simplified description of a system from a particular perspective or viewpoint. There is no single view.
1 Technical & Business Writing (ENG-715) Muhammad Bilal Bashir UIIT, Rawalpindi.
Chapter 5 Introduction To Form Builder. Lesson A Objectives  Display Forms Builder forms in a Web browser  Use a data block form to view, insert, update,
Programming Logic and Design Fourth Edition, Comprehensive Chapter 14 Event-Driven Programming with Graphical User Interfaces.
Chapter – 8 Software Tools.
Chapter 7 Part II Structuring System Process Requirements MIS 215 System Analysis and Design.
Basic Characteristics of Object-Oriented Systems
SOFTWARE DESIGN & SOFTWARE ENGINEERING Software design is a process in which data, program structure, interface and their details are represented by well.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Principles of Programming & Software Engineering
UML Diagrams By Daniel Damaris Novarianto S..
Principles of Programming and Software Engineering
UML Diagrams Jung Woo.
Chapter 1 Introduction(1.1)
Analysis models and design models
Agenda Software development (SD) & Software development methodologies (SDM) Orthogonal views of the software OOSD Methodology Why an Object Orientation?
Programming Logic and Design Eighth Edition
Presentation transcript:

eCGE (Enhanced Petri Net Graphical Editor) : A Multi-Platform Petri Net Editor 15 April 2005 David Dugan

Overview Role of Petri Nets in software development and testing Role of Petri Nets in software development and testing How CGE implements Stochastic Petri Nets How CGE implements Stochastic Petri Nets History of CGE and how eCGE enhances capability History of CGE and how eCGE enhances capability Design of eCGE Design of eCGE Test Cases Test Cases Future plans and conclusion Future plans and conclusion

Verification of design requirements Through formal testing or simulation of the environment Through formal testing or simulation of the environment Very costly and time consuming Very costly and time consuming Difficult to go thru all possible execution paths Difficult to go thru all possible execution paths Difficult to simulate timing problems Difficult to simulate timing problems Does not catch problems until well into coding phase Does not catch problems until well into coding phase Performance modeling though a special graphical language formalism Performance modeling though a special graphical language formalism Temporal specifications for time-critical systems Temporal specifications for time-critical systems Probabilistic specifications to describe selection among different possible events Probabilistic specifications to describe selection among different possible events Performance modeling through graphics Performance modeling through graphics

Petri Nets - Graphical Modeling of Critical Timing Applications Flow charts, block diagrams, state diagrams do not show timing or probability of events Flow charts, block diagrams, state diagrams do not show timing or probability of events Firing time in Petri Nets is the delay time before a transition can take place Firing time in Petri Nets is the delay time before a transition can take place Immediate (Deterministic) – Fixed delay time Immediate (Deterministic) – Fixed delay time Timed (Stochastic) – Random or asynchronous time Timed (Stochastic) – Random or asynchronous time

eCGE Benefits eCGE provides a graphical means to specify a Stochastic Petri Net Model to model the dynamic as well as static aspects eCGE provides a graphical means to specify a Stochastic Petri Net Model to model the dynamic as well as static aspects Output of eCGE can be input into the Stochastic Petri Net Package to obtain numerical results for the model using Markov analysis Output of eCGE can be input into the Stochastic Petri Net Package to obtain numerical results for the model using Markov analysis

eCGE Goals Model a system quickly and inexpensively Model a system quickly and inexpensively Produce a tool that does not require extensive training Produce a tool that does not require extensive training Be able to use the model to communicate to customers Be able to use the model to communicate to customers

CGE Background Original work by Norb Gravelle proof of concept that CSPL coding language can be generated from a graphical interface instead of a text editor Original work by Norb Gravelle proof of concept that CSPL coding language can be generated from a graphical interface instead of a text editor Work by Wen Wei extended this tool to include graphical layout algorithms Work by Wen Wei extended this tool to include graphical layout algorithms Spring Algorithm Spring Algorithm Tree Algorithm Tree Algorithm

eCGE Components ComponentLanguage GUI Framework Design Methodology OS Supported Original CGE C++ MS Visual Studios procedural MS Windows CSPL parser C++ N/A – command line application object-orientedany Spring and Tree Algorithm s C++ N/A – selected by a menu item proceduralany Enhanced CGE Java AWT / Swing object-oriented any supporting Java 1.4

My Contribution Combined work by Gravelle, Wei, and CSPL parser into a single application Combined work by Gravelle, Wei, and CSPL parser into a single application Added parser to import CSPL files Added parser to import CSPL files Designed the application using object-oriented analysis and design techniques for future enhancements Designed the application using object-oriented analysis and design techniques for future enhancements Designed an interface for future development of graph layout algorithms Designed an interface for future development of graph layout algorithms Added a Random graph layout algorithm Added a Random graph layout algorithm

CSPL (C Based Stochastic Petri-net language) Specification language for Stochastic Petri Net package - CSPL - can be used to specify complex system behaviors with Petri nets Specification language for Stochastic Petri Net package - CSPL - can be used to specify complex system behaviors with Petri nets CSPL Conversion Process CSPL Conversion Process Reads in CSPL file to determine elements and attributes of model Reads in CSPL file to determine elements and attributes of model CGE Language adds graphical information for each model element CGE Language adds graphical information for each model element

Enhancements to CGE I Ability to read in a CSPL file and display it graphically Ability to read in a CSPL file and display it graphically Edit and display an imported CSPL file Edit and display an imported CSPL file Parameters for a model are input through dialog boxes Parameters for a model are input through dialog boxes Specify the properties of a place, transition, or arc Specify the properties of a place, transition, or arc Interface for defining guard function Interface for defining guard function Read and save a model in CGE format Read and save a model in CGE format

Enhancements to CGE II Consistency checking of parameters insures a syntactically correct model Consistency checking of parameters insures a syntactically correct model Improved maintainability of design through complete redesign of code based on object oriented design Improved maintainability of design through complete redesign of code based on object oriented design Rewrote all code in JAVA to enhance portability to other platforms Rewrote all code in JAVA to enhance portability to other platforms Added a Random Graph Layout Algorithm Added a Random Graph Layout Algorithm

CGE Evolution First IterationSecond Iteration

CGE Evolution Third IterationFourth Iteration

eCGE Design Redesign and integration of legacy CGE components into eCGE Redesign and integration of legacy CGE components into eCGE Gravelle’s Original CGE Gravelle’s Original CGE Wen Wei Graphical Layout algorithms Wen Wei Graphical Layout algorithms CSPL parser CSPL parser Used Object Oriented Design to integrate these components into a single application Used Object Oriented Design to integrate these components into a single application

Legacy Design Approach

eCGE Classes High-Level Class Chart for eCGE High-Level Class Chart for eCGE An appendix in the thesis describes the design and implementation details An appendix in the thesis describes the design and implementation details Class charts Class charts Design and implementation details of key components Design and implementation details of key components

Case Studies Case # 1 - Connected Cyclic Reliability (CCR) model for the anti-lock braking system Case # 1 - Connected Cyclic Reliability (CCR) model for the anti-lock braking system Analyzed the mean time to failure for the braking system of a vehicle Analyzed the mean time to failure for the braking system of a vehicle Case # 2 - How the layout affects understanding and finding problems in a Petri net model (race condition). Case # 2 - How the layout affects understanding and finding problems in a Petri net model (race condition).

Case Study # 1 – CCR Model Model input from CSPL language and translated into CGL language Model input from CSPL language and translated into CGL language Layout (Spring and Tree) algorithms proved inadequate to handle the reformatting of graphical layout of a complex model Layout (Spring and Tree) algorithms proved inadequate to handle the reformatting of graphical layout of a complex model eCGE requires further enhancements to resolve the layout of complex models, as shown in the following figures. eCGE requires further enhancements to resolve the layout of complex models, as shown in the following figures.

Layout using Random Algorithm Method Applying the Random Algorithm results in this arrangement. Applying the Random Algorithm results in this arrangement.

Layout using Manual Methods Manually laying out the elements provides a more readable layout. Manually laying out the elements provides a more readable layout.

Case Study 2 The use of layout is important in understanding the structure of a model and detecting potential problems The use of layout is important in understanding the structure of a model and detecting potential problems Types of possible problems: Types of possible problems: Conflict Conflict Confusion (analogous to a race condition) Confusion (analogous to a race condition)

Example of how a race condition “conflict” can be in Petri Net p = places, t = transitions, 1 = tokens p = places, t = transitions, 1 = tokens Figures 3a and 3b represent confusion as to which path program will take based on which token fires first Figures 3a and 3b represent confusion as to which path program will take based on which token fires first

CSPL Code for prior example of conflict (race condition) The following segment shows the equivalent CSPL code for the previous example The following segment shows the equivalent CSPL code for the previous example The textual version shows the elements, but not the graphical structure, of the model The textual version shows the elements, but not the graphical structure, of the model

Future Enhancements of eCGE Enhance graph layout algorithms to handle more complex structures Enhance graph layout algorithms to handle more complex structures Be able to import and translate other Petri Net modeling tools file formats Be able to import and translate other Petri Net modeling tools file formats Add a scroll bar to document window to increase work space Add a scroll bar to document window to increase work space Be able to group elements to move them Be able to group elements to move them Incorporate an algorithm to minimize arc crossings (such as the various graphviz layout algorithms, see ) Incorporate an algorithm to minimize arc crossings (such as the various graphviz layout algorithms, see )

Conclusions I eCGE has integrated a number of separate programs which represent a foundation for using Stochastic Petri Nets in industry eCGE has integrated a number of separate programs which represent a foundation for using Stochastic Petri Nets in industry Mechanizing and simplifying the development of a model by using a graphical, rather than textual, interface Mechanizing and simplifying the development of a model by using a graphical, rather than textual, interface Being able to visualize time critical events via the Petri net diagrammatic language using eCGE facilities and layout algorithms Being able to visualize time critical events via the Petri net diagrammatic language using eCGE facilities and layout algorithms  Including visualization of a large library of legacy (textually based) CSPL models

Conclusions II Increased maintainability of the code using object-oriented design makes it easier to further enhance the application Increased maintainability of the code using object-oriented design makes it easier to further enhance the application Made programs/components of CGE platform independent through use of JAVA to encourage usage on a variety of platforms Made programs/components of CGE platform independent through use of JAVA to encourage usage on a variety of platforms

Questions & Answer Session Mr. Dugan has a severe speaking disability (WSU has certified) and for the purposes of the defense we asked him to write the answers to the committee’s questions.

Ordinary Petri Net A biparte graph that consists of A biparte graph that consists of A set of Places A set of Places A set of Transitions A set of Transitions A set of directed Arcs A set of directed Arcs Arcs connect Places to Transitions Arcs connect Places to Transitions Input Arc - Directed Arc from Place to Transition Input Arc - Directed Arc from Place to Transition Output Arc - Directed Arc from Transition to Place Output Arc - Directed Arc from Transition to Place

Ordinary Petri Net Formal Definition PN = (P,T,A) PN = (P,T,A) P= {p1, p2,….p(n)} P= {p1, p2,….p(n)} T= {t1,t2,….t(m)} T= {t1,t2,….t(m)} A = {a1, a2, …, a(o)} - arcs A = {a1, a2, …, a(o)} - arcs

Generalized Stochastic Petri Net (GSPN) Time is associated with Transition Time is associated with Transition Transitions are immediate and timed Transitions are immediate and timed Immediate - Fire immediately when enabled and the logical structure is modeled, but not the timing Immediate - Fire immediately when enabled and the logical structure is modeled, but not the timing Timed -Fire after a random,exponentially distributed enabling time Timed -Fire after a random,exponentially distributed enabling time Example of timed - A finite time delay until a hardware device is ready to accept the command before issuing it Example of timed - A finite time delay until a hardware device is ready to accept the command before issuing it Timed - Used with devices that cannot respond at the program execution rate Timed - Used with devices that cannot respond at the program execution rate Example of Immediate - Usual case in programming where transitions are made at the same rate as program execution Example of Immediate - Usual case in programming where transitions are made at the same rate as program execution

Markings Tangible - Only timed transitions are enabled in a marking Tangible - Only timed transitions are enabled in a marking Vanishing - At least one immediate transition is enabled in a marking. May be removed in the analysis to reduce time and space complexity Vanishing - At least one immediate transition is enabled in a marking. May be removed in the analysis to reduce time and space complexity Absorbing Absorbing  Applies to a place which has no output Arcs  Transition firing adds a token to this place  However, the token can no longer be used to enable a transition

Consistency Checking Drawing Window Drawing Window Shows an error message for an illegal operation Shows an error message for an illegal operation For example, conecting a place to a place For example, conecting a place to a place Dialogue Boxes Dialogue Boxes Grays out boxes or input fields(allows operator no input) if operation is illegal or undefined Grays out boxes or input fields(allows operator no input) if operation is illegal or undefined Example - Transition Dialogue Box cannot have a Guard Function if no functions have been defined Example - Transition Dialogue Box cannot have a Guard Function if no functions have been defined

Spring Algorithm Places and transitions are like weights on springs Places and transitions are like weights on springs Starts from the first arc Starts from the first arc Simulates a mechanical system consisting of springs (arcs) and nodes (places and transitions). From the initial configuration or ring positions, the system oscillates until it stabilizes at a minimum-energy configuration. It has been noted that in such a configuration, all the edges typically have relatively uniform length and nodes not connected tend to be far apart. Simulates a mechanical system consisting of springs (arcs) and nodes (places and transitions). From the initial configuration or ring positions, the system oscillates until it stabilizes at a minimum-energy configuration. It has been noted that in such a configuration, all the edges typically have relatively uniform length and nodes not connected tend to be far apart.

Tree Algorithm The goal of this algorithm is to produce a graph that is planar, straight-lined, and upward (that is, a ‘parent’ node is above its ‘children’). Vertices at the same level are horizontally aligned. The first place in the place list is chosen to be the root of the tree. The goal of this algorithm is to produce a graph that is planar, straight-lined, and upward (that is, a ‘parent’ node is above its ‘children’). Vertices at the same level are horizontally aligned. The first place in the place list is chosen to be the root of the tree. The space (vertical distance) between each level is uniform. The space (vertical distance) between each level is uniform. The separation distance between two consecutive vertices on the same level is kept to a minimum. The separation distance between two consecutive vertices on the same level is kept to a minimum. The overall width of the graph is as small as possible and still be readable. The overall width of the graph is as small as possible and still be readable.

Other ways of laying out graphs Reference Article: Empirical Layout of Aesthetics-based Graph Layout by Purchase, Carrington, and Allder Reference Article: Empirical Layout of Aesthetics-based Graph Layout by Purchase, Carrington, and Allder Planar Grid Drawing Algorithm Planar Grid Drawing Algorithm Force Directed Algorithm Force Directed Algorithm Goals of Graph layout program Goals of Graph layout program Minimize edge crossings Minimize edge crossings Orthogonality Orthogonality Information Flow (connected nodes should be close together) Information Flow (connected nodes should be close together) Minimize edge bends Minimize edge bends

Weaknesses of Graphical Approaches Reference Article: Empirical Layout of Aesthetics-based Graph Layout by Purchase, Carrington, and Allder Reference Article: Empirical Layout of Aesthetics-based Graph Layout by Purchase, Carrington, and Allder No one type of layout works for every graph No one type of layout works for every graph Graph layout requires a significant computational power Graph layout requires a significant computational power History of the flow chart History of the flow chart How to show a large graph in a drawing window: How to show a large graph in a drawing window: Add scroll bars Add scroll bars Re-size the model (zoom in and out) Re-size the model (zoom in and out)

Understanding A graphical representation of a Petri Net tends to be at a higher level of abstraction than a textual representation A graphical representation of a Petri Net tends to be at a higher level of abstraction than a textual representation affects response time affects response time Easier to see errors Easier to see errors Shows the structure of the model Shows the structure of the model

Extensibility Interface for graph layout algorihm described in section A.3 of thesis Interface for graph layout algorihm described in section A.3 of thesis Adding a graph layout algorithms requires the following steps: Adding a graph layout algorithms requires the following steps: Create a new subroutine containing the implementation (class document_class) Create a new subroutine containing the implementation (class document_class) Add a new menu item in the Algorithms menu bar (class algorithms_menu) Add a new menu item in the Algorithms menu bar (class algorithms_menu) Add code so that when the menu item is selected, the correct subroutine is called (affects classes document_manager, document_internal_frame, and document_panel) Add code so that when the menu item is selected, the correct subroutine is called (affects classes document_manager, document_internal_frame, and document_panel)

Ease of Use Goal is to minimize the amount of effort required to use the tool such as Goal is to minimize the amount of effort required to use the tool such as Minimizing keystrokes Minimizing keystrokes Logically organizing the layout of dialog boxes Logically organizing the layout of dialog boxes

OO Design Maintainability The system architecture uses fine grained, self contained components that can readily be changed The system architecture uses fine grained, self contained components that can readily be changed Avoids shared data structures and global variables (minimizes data coupling) Avoids shared data structures and global variables (minimizes data coupling) Each class is self-contained - all relevant operations and data are contained within the class Each class is self-contained - all relevant operations and data are contained within the class