Topcased 5.3 Simulation of models Tutorial 2012-12-12 Topcased Simulation - Tutorial Page 1.

Slides:



Advertisements
Similar presentations
Withdrawal Transaction Use Case Primary Actor: Customer Pre-conditions: The customer must have a valid ATM card and PIN. Post-conditions: The customer.
Advertisements

StateChart Diagrams State Machines Overview Change summary –core constructs –notation Examples Backward compatibility User benefits Issues.
Nested state diagrams:Problems with flat state diagram
UML State chart/machine diagram State machine diagram is a behavior diagram which shows discrete behavior of a part of designed system through finite state.
1 CIS224 Software Projects: Software Engineering and Research Methods Lecture 11 Brief introduction to the UML Specification (Based on UML Superstructure.
DLC-MODS Workbook 1.2 Pinky says, “Hello.” Presented by University of Tennessee Libraries Digital Library Center Melanie Feltner-Reichert, Metadata Librarian.
Activity Diagrams. Recap Activity Diagrams – When to use? – Where? – Nodes – Edges – More to come …. 2.
ESE Einführung in Software Engineering 7. Modeling Behaviour Prof. O. Nierstrasz.
The Web Warrior Guide to Web Design Technologies
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
® IBM Software Group © 2006 IBM Corporation Rational Software France Object-Oriented Analysis and Design with UML2 and Rational Software Modeler 04. Other.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
1 CS 426 Senior Projects Chapter 14: Activity Diagrams [Arlow and Neustadt, 2005] February 17, 2009.
© 2008 IBM Corporation Behavioral Models for Software Development Andrei Kirshin, Dolev Dotan, Alan Hartman January 2008.
An Introduction to Rational Rose Real-Time
UML Class Diagrams: Basic Concepts. Objects –The purpose of class modeling is to describe objects. –An object is a concept, abstraction or thing that.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
State and Sequence Diagrams Modelling dynamic information So far we have seen: Use Case Diagrams – requirements capture, interface.
Sage CRM Developers Course
מידול התנהגותי 1. Today’s Session Sequence Diagrams State Machines 2.
Department of Mechanical Engineering, LSUSession VII MATLAB Tutorials Session VIII Graphical User Interface using MATLAB Rajeev Madazhy
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
Lecture Set 2 Part B – Configuring Visual Studio; Configuration Options and The Help System (scan quickly for future reference)
Alice 2.0 Introductory Concepts and Techniques Project 1 Exploring Alice and Object-Oriented Programming.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Chapter One An Introduction to Visual Basic 2010 Programming with Microsoft Visual Basic th Edition.
Introduction to Eclipse CSC 216 Lecture 3 Ed Gehringer Using (with permission) slides developed by— Dwight Deugo Nesa Matic
IBM Software Group ® Overview of SA and RSA Integration John Jessup June 1, 2012 Slides from Kevin Cornell December 2008 Have been reused in this presentation.
Conceptual Modelling – Behaviour
1 Devon M. Simmonds University of North Carolina, Wilmington CSC450 Software Engineering WorkFlow Modeling with Activity Diagrams.
Business Informatics Group Institute of Software Technology and Interactive Systems Vienna University of Technology Favoritenstraße 9-11/188-3, 1040 Vienna,
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of The Eclipse debugger.
An Introduction to the Unified Modeling Language
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
1 Kyung Hee University Statecharts Spring Kyung Hee University Specifying Objects’ Behaviour  Interaction diagrams show message-passing behaviour.
1 Class Diagrams. 2 Overview Class diagrams are the most commonly used diagrams in UML. Class diagrams are for visualizing, specifying and documenting.
Systems Analysis and Design in a Changing World, 6th Edition 1 Chapter 5 INTRODUCTION TO SYSTEMS ANALYSIS AND DESIGN: AN AGILE, ITERATIVE APPROACH CHAPTER.
JavaScript, Fourth Edition
Chapter 11 Activity Diagrams. 2 “Activity diagrams are a technique to describe procedural logic, business processes, and work flows” - M. Fowler An activity.
Object Oriented Analysis & Design & UML (Unified Modeling Language)1 Part VI: Design Continuous Activity Diagams State Diagrams.
CS212: Object Oriented Analysis and Design Lecture 34: UML Activity and Collaboration diagram.
CS3773 Software Engineering Lecture 06 UML State Machines.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 4 Slide 1 Slide 1 What we'll cover here l Using the debugger: Starting the debugger Setting.
Summary PlatformModel Model Components Conformance Files and Variables Model Modification CMIP5 Questionnaire Roadmap – beta1 Inputs Needed Resolve Inputs.
Chapter 14: Activity Diagrams November 2015 [Arlow and Neustadt, 2005] CS 425/625 Senior Projects University of Nevada, Reno Department of Computer Science.
Chapter 3: Introducing the UML
Chapter – 8 Software Tools.
UML ACTIVITY DIAGRAM 1. Recap Formal Use Case diagram UML notation for use cases Examples 2.
UML (Unified Modeling Language)
Cliquez pour modifier le style du titre Cliquez pour modifier les styles du texte du masque Deuxième niveau Troisième niveau Quatrième niveau Cinquième.
Method – Notation 8 Hours.
Studio modeling basics
Systems Analysis and Design in a Changing World, 6th Edition
Object-Oriented Analysis and Design
Unified Modeling Language
State Machine Diagrams
Important terms Black-box testing White-box testing Regression testing
Important terms Black-box testing White-box testing Regression testing
UML Class Diagrams: Basic Concepts
Debugging with Eclipse
UML Activity Diagrams & State Charts
Behavioral Models for Software Development
Systems Analysis and Design in a Changing World, 6th Edition
Chapter 14: Activity Diagrams
Chapter 14: Activity Diagrams
Object Oriented System Design Class Diagrams
Debugging with Eclipse
Presentation transcript:

Topcased 5.3 Simulation of models Tutorial Topcased Simulation - Tutorial Page 1

Introduction  Mechanisms of simulation of models  ‘Early model’ approach  What is new in version 5.3 How to use  Starting the simulation  Used views in platform  Stimulating the running system  Controlling execution flow  Getting details on running system UML Supported features  Classification and structures  State machines  Activities  OCL interpretation More information… Agenda Topcased Simulation - Tutorial Page

Mechanisms of simulation of models  Topcased provides an component capable of interpreting UML models.  Possibility to animate State machines and activities of a model.  Visualisation of current states and enabled actions.  Just like a UML « Virtual Machine ».  Possibility to send and receive message from a system.  From a step-to-step interpretation to a continuous execution. ‘Early model’ approach  Unlike traditional programming, model does not need to be fully semantically correct to be interpreted.  Only used Classes and Activities are required to be conform to Model language  If an action or an expression is inconsistent, a error is displayed in console but, most of the time, simulation can proceed. Introduction Topcased Simulation - Tutorial Page

What is new in version 5.3  Model simulation has been completely redesign for Topcased 5.3  Control of interpretation flow has been updated -Provided buttons is now based on “debug” feature -It is possible to “see” emitted message.  Syntax of displayed elements is inspired from common syntax: -State of object interpretation use folder convention -Property of object used dotted notation  UML coverage is wider, especially for State Machine concern.  OCL is applicable for all opaque elements.  Models of Topcased 5.2 require update to run under Topcased 5.3 -Signal Event requires signal property (as defined in UML). -To send a signal to an instance, its classifier must declare a “reception” of the signal. Introduction Topcased Simulation - Tutorial Page

Topcased Simulation - Tutorial Page 5 How to use Starting the simulation  Select a file containing a UML model or Papyrus file.  Right click and select “Simulate”.  A dialog box appears to define session context.

Topcased Simulation - Tutorial Page 6 How to use Starting the simulation  In start dialog first page, -Select an execution mode Only default mode available. (Traces file and mode is for future versions) -Select the display mode “Papyrus Animator” for Papyrus models.  In second page, -Define properties about time value of the date when simulation begins. Ratio between real time and simulation time for continuous execution. -Select the main objet to simulate This objet is the root of the executed system.

Used views in platform How to use Topcased Simulation - Tutorial Page

Used views in platform  ‘Model Simulation’ view is specific to simulation -Provides buttons to pause, resume execution or select step order.  ‘Console’ view: -Display signal emitted from simulation -Show warning about model inconsistencies  Customized Papyrus Editor -Diagrams are duplicated for each executed behaviour -Current state is coloured in those diagrams.  Enriched ‘Model Explorer’ view -Contain the state and properties values of all instances in the running environment -Closed diagrams can be opened again How to use Topcased Simulation - Tutorial Page

Stimulating the running system  Click on the ‘Send Signal’ button from ‘Model Simulation’ view  Select a destination for the signal > increases the current date of the system; The default value is duration until the next timer end.  Select the signal to send Signal list is defined from the interfaces and ports implemented by the class of selected instance. For the signal to appear in the provided list, a “reception” of the signal must be declared as feature of the classifier of the selected instance.  Fill the signal content For 5.3 version, only UML primitive types are supported. How to use Topcased Simulation - Tutorial Page

Controlling execution flow  ‘Model Simulation’ view provides several actions to control the order of actions Provided buttons are based on ‘Debug’ approach. Same semantic is applied.  ‘Resume’ interprets all available actions and event consumptions. When no more actions is available, system date is updated accordingly with pending time events. To provide an experience closed to real execution, interpretation is paused for a while according next event date and time ratio of simulation properties.  ‘Suspend’ stops continuous interpretation and step sequences.  ‘Terminate’ ends simulation session.  ‘Reload’ restarts the simulation from the beginning. How to use Topcased Simulation - Tutorial Page

Controlling execution flow  Steps buttons provide controls on interpretation sequence A dialog proposes available actions. List of actions is established based on UML semantic. Syntax for action: “Instance Name” / “Activity Name” / “Action Name” Syntax for event: “Instance Name” / > “Event content”  When no step is available, increasing system date is proposed. How to use Topcased Simulation - Tutorial Page

Controlling execution flow  Step Into : Execute a 1 single step On a call of activity, initialise the activity and pause On a transition with activities, enter the first activity and pause  Step Over : Execute 1 action On a call of activity, execute it until the ends. On a transition with activities, execute the whole transition.  Step Return : Complete parent activity On an action, execute all actions of parent activity and pause. Otherwise behave like Step Over. How to use Topcased Simulation - Tutorial Page

Getting details on running system  Via diagram animation For Papyrus model, an editor is opened and each behaviour of running instances is shown using corresponding diagram. In State Machine, current states or transition are green bold. In Activity, enabled actions are red bold, flow tokens are green bold. How to use Topcased Simulation - Tutorial Page

Getting details on running system  Via ‘Model Explorer’ view In Additional resources, simulation state is available. In ‘state’ and ‘activityExecution’ nodes, is it possible to re-open closed diagrams. All simulation states are available: Event queues, Activity tokens, deferred events, …  Objects tree is editable: Change instance attributes using ‘Properties’ view and contextual menu.  Navigation is simplified ‘Model Explorer’ view is customised to ease the ready of objet navigation. Tree organisation is similar to ‘Variable’ view of Debug perspective. How to use Topcased Simulation - Tutorial Page

Getting details on running system  Via ‘Console’ view -Process Console is created on Simulation start. -Semantic errors are printed in red. -Signal occurrence without destination are displayed with their content. -Console is based on ‘Process console’ of ‘Debug’ perspective: Standard operations are available: Stop, clear, stop scrolling, pin, … How to use Topcased Simulation - Tutorial Page

Classification and structures  Classes and components can be instantiated.  Composed attributes are used to create child objects -Object classification is defined from attribute type. -Number of created object is based on attributes lower bound  InstanceSpecifications are used to describe objects to run  Type connector as interpreted on instance start action Composite diagram can be used to define relation between elements of class. Connector must be type for the simulator to identify attributes values.  Operation overriding is supported for inheriting classes  Operation implementation can be defined by an activity or an OCL OpaqueBehavior UML Supported features Topcased Simulation - Tutorial Page

Structural features unsupported features  PrimitiveTypes inheritance from UML Primitives  Real primitive types is not supported  Pure association: More than 2 ends, or owning both member ends.  Constraints, TimeObservations and DurationObservations are ignored.  Template parameter are ignored for signature and unsupported for objects instantiation.  Nodes are handled like simple classes.  Navigation through Connectors and Ports are not supported, Signal target must be explicit.  Qualified properties are not supported and property options are ignored: Derived, static, read only, unique, ordered (except for OCL expression), visibility, subsetted, redefined. UML Supported features Topcased Simulation - Tutorial Page

State machine  Class with classifiedBehavior must be defined by a state machine The state machine instance is created on Simulation start or on a StartClassifierBehaviorAction.  Triggers with Signal, Relative or absolute time, AnyReceive and completion events.  Internal and external Transition with guard in OCL and deferred triggers.  Composite state and multiple regions are handled.  Choice and junction can be used with guard expressed in OCL ‘else’ key word is supported for Choice and Trigger guards.  Call of activities for state ‘onEntry’ and ‘onExit’ and transition ‘effect’.  Sequencing of ‘onEntry’ and ‘onExit’ of composite states.  Signal content can be handled using transition effect with matching signature. UML Supported features Topcased Simulation - Tutorial Page

Topcased Simulation - Tutorial Page 19 UML Supported features State machine  Example of signal handling -StateMachine1 is in state State1::(State1a, State1b) -Sending signal Signal2 A new consumption action will be available

Topcased Simulation - Tutorial Page 20 UML Supported features State machine  Example of signal handling Clicking Step Into shows next event consumption action:

State machine unsupported features  State machine inheritance, submachine in State.  Triggers with CallEvent are not supported.  Constraints, Entry points, Exit points, History, Terminate are not supported.  Fork and Junction are not supported Can modelled using composite state UML Supported features Topcased Simulation - Tutorial Page

Activity  Common unitary actions Call behaviour, Start Classifier Behaviour, Call Operation, Send Signal, Read/Add/Remove/Clear property, Read/Add/Remove/Clear property, Create/Destroy Object, Read self, Read Value Specification and Opaque actions.  Sequencing is established using: -Control and object flows, -initial, decision/merge, fork/join and final nodes.  OpaqueExpression, OpaqueAction, OpaqueBehavior and Guard must defined in OCL OCL is the default language. OCL guard can be used for Decision nodes.  Opaque action can be empty No Output Pin must be defined  ValuePin can contain OCL OpaqueExpression UML Supported features Topcased Simulation - Tutorial Page

Activity  Variable values are accessible : -In OpaqueExpression of Guards and Value Specification Actions -In OpaqueAction.  DecisionInputFlow of Decision node is not supported but Decision Node can have Object Flow as incoming flow and Control Flow as outgoing flows. Guard of Decision Node can use the content of Object flow if it is produced from a Object Node (In this case, objet node must be named).  ‘else’ string is supported in decision UML Supported features Topcased Simulation - Tutorial Page

Topcased Simulation - Tutorial Page 24 UML Supported features Activity  Example action sequence Execution tokens are green. Actions about to be executed are red.  Dialog box of Step buttons lists the enabled actions User can force the order of execution.

Activity unsupported features  Signal propagation via connector and ports is not supported Development in progress. Signal destination must be explicitly expressed by target.  Index in Write action (Variable or property) is not supported.  No Structured Node (including Loop, conditional, Sequence) is supported.  Activity partitions are ignored.  Activity cannot represent waiting state: Accept Event, Accept Call and Reply actions are not handled.  Interruptible regions and Exception handler are not supported.  Merge of Object flows and (flow weight <> 1) are not supported.  Action about association are not supported: Create/Destroy/Read/Write/Clear link actions  Miscellaneous actions are not supported: Unmarshall (use several Read Property actions), Raise Exception, Read Extends, Reduce (use OCL iterate function), Reclassify actions. UML Supported features Topcased Simulation - Tutorial Page

OCL interpretation  OCL is expected for all Opaque Elements (Except empty OpaqueActions)  OCL interpretation is based on Official Eclipse plugins and meets same level of compliance (OMG OCL 2.3).  OCL expression can invoke operations of objects as long as implementation is defined by OpaqueBehavior and operation is a query.  Input pins of Opaque Action must be fully qualified: Name, type and upper bound are required.  Several output pins for Opaque Action is supported via OCL tuple: With several output, output pins must be named.  Operation oclIsInState is available for Class having a State machine as classifier behaviour. Note: In external transition, operation returns false for source state and target state.  Primitive type ‘Real’ is not supported (because of UML version)  ‘IdealClock::currentTime()’ is used to get the system current date Warning: Typed by an Integer value and not a Real value (UML version limitation). UML Supported features Topcased Simulation - Tutorial Page

Word of caution  Papyrus editor is required to view system state Once closed, it can not be retrieved. At end of simulation, model will not be saved. Any modification is lost.  Currently, papyrus editor is limited to 1 instance, this impacts the usage of simultaneous simulation session. Versions -Based on Eclipse Indigo and Papyrus 0.8 (Incubation) -Conform to OMG UML 2.1.2, OMG OCL 2.3 More information… Topcased Simulation - Tutorial Page

TOPCASED tutorials and examples  Acceleo documentation available online  Contacts  TOPCASED user mailing lists    More information… Topcased Simulation - Tutorial Page