Dec 2009 - 1 Timothy C. Lethbridge Trace-Directed Modelling State-of-the-Art, Ideas and Plans Timothy C. Lethbridge CRuiSE (Complexity Reduction in Software.

Slides:



Advertisements
Similar presentations
2009 – E. Félix Security DSL Toward model-based security engineering: developing a security analysis DSML Véronique Normand, Edith Félix, Thales Research.
Advertisements

Team Skill 5: Refining the Use Cases Lecture 11. Advantages of Use Cases They are easy to write Written in users language Provide cohesive, related threads.
Programming Paradigms and languages
Lecture # 2 : Process Models
IT Requirements Capture Process. Motivation for this seminar Discovering system requirements is hard. Formally testing use case conformance is hard. We.
Building Enterprise Applications Using Visual Studio ®.NET Enterprise Architect.
Software Engineering COMP 201
Detailed Design Kenneth M. Anderson Lecture 21
Aki Hecht Seminar in Databases (236826) January 2009
Report on Intrusion Detection and Data Fusion By Ganesh Godavari.
SPECIFYING COGNITIVE MODELS Using Patterns and Conflicts A. Macklem, F. Mili Oakland University S. Dungrani TARDEC June, 2004.
Chapter 1 Software Engineering. Homework ► Read Section 2.2 (pages 79-98) ► Answer questions: ► 7, 8, 11, 12, & 13 on page 134. ► Answer on paper, hand.
November 18, 2004 Embedded System Design Flow Arkadeb Ghosal Alessandro Pinto Daniele Gasperini Alberto Sangiovanni-Vincentelli
Mining Metamodels From Instance Models: The MARS System Faizan Javed Department of Computer & Information Sciences, University of Alabama at Birmingham.
© 2008 IBM Corporation Behavioral Models for Software Development Andrei Kirshin, Dolev Dotan, Alan Hartman January 2008.
The chapter will address the following questions:
SCHOOL OF COMPUTING QUEEN’S UNIVERSITY 08/03/2013 Andrew Forward, Omar Badreddin, Timothy C. Lethbridge, and Julian Solano School of Electrical Engineering.
Basic Concepts The Unified Modeling Language (UML) SYSC System Analysis and Design.
CASE Tools And Their Effect On Software Quality Peter Geddis – pxg07u.
Objects What are Objects Observations
The Umple Model-Oriented Programming Technology: Easy-to-Use Open-Source Code Generation Code Generation 2013, Cambridge UK Timothy C. Lethbridge, University.
272: Software Engineering Fall 2012 Instructor: Tevfik Bultan Lecture 17: Code Mining.
Model-Oriented Programming: Bridging the Model-Code Divide Modeling in Software Engineering (MiSE 2013) Omar Badreddin, Timothy C. Lethbridge University.
Reverse Engineering State Machines by Interactive Grammar Inference Neil Walkinshaw, Kirill Bogdanov, Mike Holcombe, Sarah Salahuddin.
Modeling Practices in Open Source Software OSS 2013 Koper-Capodistria, Slovenia Omar Badreddin Post Doctoral Fellow, University of Ottawa
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
1 Validation & Verification Chapter VALIDATION & VERIFICATION Very Difficult Very Important Conceptually distinct, but performed simultaneously.
Team Skill 6: Building the Right System From Use Cases to Implementation (25)
A Specification Language and Test Planner for Software Testing Aolat A. Adedeji 1 Mary Lou Soffa 1 1 DEPARTMENT OF COMPUTER SCIENCE, UNIVERSITY OF VIRGINIA.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
Tracking with Unreliable Node Sequences Ziguo Zhong, Ting Zhu, Dan Wang and Tian He Computer Science and Engineering, University of Minnesota Infocom 2009.
Reviewing Recent ICSE Proceedings For:.  Defining and Continuous Checking of Structural Program Dependencies  Automatic Inference of Structural Changes.
Report on Intrusion Detection and Data Fusion By Ganesh Godavari.
Software Engineering Research paper presentation Ali Ahmad Formal Approaches to Software Testing Hierarchal GUI Test Case Generation Using Automated Planning.
Cross Language Clone Analysis Team 2 October 27, 2010.
Software Development Cycle What is Software? Instructions (computer programs) that when executed provide desired function and performance Data structures.
June 05 David A. Gaitros Jean Muhammad Introduction to OOD and UML Dr. Jean Muhammad.
Umple Toolkit for Model-Oriented Programming NECSIS Webinar, May Timothy C. Lethbridge, University of Ottawa
Abstract We present two Model Driven Engineering (MDE) tools, namely the Eclipse Modeling Framework (EMF) and Umple. We identify the structure and characteristic.
Knowledge-oriented Maintenance at the University of Ottawa Timothy C Lethbridge KOM Banff.
Summarizing the Content of Large Traces to Facilitate the Understanding of the Behaviour of a Software System Abdelwahab Hamou-Lhadj Timothy Lethbridge.
The Systems Development Life Cycle
L8 - March 28, 2006copyright Thomas Pole , all rights reserved 1 Lecture 8: Software Asset Management and Text Ch. 5: Software Factories, (Review)
UHD::3320::CH121 DESIGN PHASE Chapter 12. UHD::3320::CH122 Design Phase Two Aspects –Actions which operate on data –Data on which actions operate Two.
Improving Code Generation for Associations: Enforcing Multiplicity Constraints and Ensuring Referential Integrity SERA 2013SERA 2013 (August 7, 2013 in.
Verification of behavioural elements of UML models using B Truong, Ninh-Thuan and Souquieres, Jeanine In Proceedings of the 2005 ACM Symposium on.
Sept Tracing Status Update - Sept Montreal - Timothy Lethbridge Trace-Directed Modelling Status Update Timothy C. Lethbridge University.
Hassen Grati, Houari Sahraoui, Pierre Poulin DIRO, Université de Montréal Extracting Sequence Diagrams from Execution Traces using Interactive Visualization.
Architectural Point Mapping for Design Traceability Naoyasu Ubayashi and Yasutaka Kamei Kyushu University, Japan March 26, 2012 FOAL 2012 (AOSD Workshop)
Applying a Research Prototype Tool in Industrial Practice Ottawa Carleton Institute for Computer Science Umple: a Model Oriented Programming Language University.
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.
Testing Implementation Conformance with respect to its Architectural specification Software Architectures and Testing Begin Antonia Bertolino IEI - CNR,
Ch- 8. Class Diagrams Class diagrams are the most common diagram found in modeling object- oriented systems. Class diagrams are important not only for.
Teaching UML Using Umple: Applying Model-Oriented Programming in the Classroom CSEE&T 2011 Timothy C. Lethbridge, Gunter Mussbacher, Andrew Forward and.
Generating Software Documentation in Use Case Maps from Filtered Execution Traces Edna Braun, Daniel Amyot, Timothy Lethbridge University of Ottawa, Canada.
® IBM Software Group © 2009 IBM Corporation Essentials of Modeling with the IBM Rational Software Architect, V7.5 Module 15: Traceability and Static Analysis.
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
Oct Interchangability in Software Design Notation - Timothy C. Lethbridge Interchangability in software design notation: programs models visual.
Class Diagrams. Terms and Concepts A class diagram is a diagram that shows a set of classes, interfaces, and collaborations and their relationships.
Lectures 2 & 3: Software Process Models Neelam Gupta.
From Use Cases to Implementation 1. Structural and Behavioral Aspects of Collaborations  Two aspects of Collaborations Structural – specifies the static.
© 2009 Artisan Software Tools. All rights reserved. Testing Solutions with UML/SysML Andrew Stuart, Matthew Hause.
From Use Cases to Implementation 1. Mapping Requirements Directly to Design and Code  For many, if not most, of our requirements it is relatively easy.
Applying a Research Prototype Tool in Industrial Practice
Behavioral Models for Software Development
Tools of Software Development
Human Complexity of Software
Teaching Effective UML Modeling by Combining it with Programming
From Use Cases to Implementation
Timothy C. Lethbridge, Andrew Forward, Omar Badreddin
Presentation transcript:

Dec Timothy C. Lethbridge Trace-Directed Modelling State-of-the-Art, Ideas and Plans Timothy C. Lethbridge CRuiSE (Complexity Reduction in Software Engineering) Research Group SITE (School of Information Technology and Engineering) University of Ottawa December

Dec Timothy C. Lethbridge Agenda Current status Quick overview of subproject intent State of the art –Verification and analysis using state machines –Reverse engineering from traces –State machine generation and modeling –Umple: A modeling infrastructure Plans and potential directions

Dec Timothy C. Lethbridge Current Status Project considerably delayed due to difficulty recruiting students However I finally have three new students who are supposed to be starting in January –Two for this project and one for basic science that will help with this project –Hamoud Aljamaan –Ahmed and Mahmoud Orabi More later on plans

Dec Timothy C. Lethbridge Agenda Current status Quick overview of subproject intent State of the art –Verification and analysis using state machines –Reverse engineering from traces –State machine generation and modeling –Umple: A modeling infrastructure Plans and potential directions

Dec Timothy C. Lethbridge Quick Overview of Subproject Intent Find ways to improve models so tracing can be more effectively performed –Models that simplify understanding and design for multi-core architectures –With adjustable levels of abstraction –Generating an optimal set of tracepoints Find better ways to extract models from traces Match traces to models they were generated from to increase understanding and find discrepancies It was previously agreed that the focus of modeling will be using large-scale concurrent state machines All the above is subject to adjustment according to the needs of the sponsors

Dec Timothy C. Lethbridge Agenda Current status Quick overview of subproject intent State of the art –Verification and analysis using state machines –Reverse engineering from traces –State machine generation and modeling –Umple: A modeling infrastructure Plans and potential directions

Dec Timothy C. Lethbridge State of the Art - Verification Using State Machine Models - Li et. Al. Li, X., Qiu, X., Wang, L., Lei, B., and Wong, W. E “UML state machine diagram driven runtime verification of Java programs for message interaction consistency.” Proc ACM SAC '08. pp DOI= –Steps in their method Design the system with method call sequences specified using a state machine Instrument method calls to allow tracing Drive program with random test cases to generate traces Verify sequences match the original design

Dec Timothy C. Lethbridge Sample State Machine Used in the Experiments of Li et. al.

Dec Timothy C. Lethbridge State of the art - Bottleneck Detection and Elimination - Saidi et al. Saidi, A. G., Binkert, N. L., Reinhardt, S. K., & Mudge, T. “End-to-end performance forecasting: finding bottlenecks before they happen”. Proc 36th Annual International Symposium on Computer Architecture, ISCA '09. ACM, pp DOI= Overall approach aims to analyse hardware+software in multi-core systems –Identify end-to-end critical paths –Modelling performed as collections of state machines interacting via queues –Case study: Linux TCP/IP stack & ethernet controller –Identifies bottlenecks, then change model to remove

Dec Timothy C. Lethbridge Saidi et al cont’d: Method Start with state machines if possible But if the system is not modelled with state machines then: –Reverse engineer a state machine Little detail in this paper - I will discuss later –Manually refine the state machine so it has the required level of abstraction –Convert multiple interacting state machines into a dependency graph Transitions become the nodes States become arc with timing while in state

Dec Timothy C. Lethbridge Saidi et al cont’d: Sample Original State Machines

Dec Timothy C. Lethbridge Saidi et al cont’d: Sample Derived Dependency Graph

Dec Timothy C. Lethbridge Saidi et al cont’d: Modifying Dependencies

Dec Timothy C. Lethbridge Agenda Current status Quick overview of subproject intent State of the art –Verification and analysis using state machines –Reverse engineering from traces –State machine generation and modeling –Umple: A modeling infrastructure Plans and potential directions

Dec Timothy C. Lethbridge State of the art - Inferring Models from Traces - Walkinshaw et al Walkinshaw, N. and Bogdanov, K. “Inferring Finite-State Models with Temporal Constraints”. Proc 23rd IEEE/ACM international Conference on Automated Software Engineering 2008 pp DOI= Key ideas –State machine models have wide potential use –They are ‘unpopular’ due to weaknesses in tools to keep them up to date to generate them –Reverse engineering complete state machines from traces is hard To generate a complete machine, complete path coverage needed A large number of test cases must be traced –Temporal logic can help

Dec Timothy C. Lethbridge Walkinshaw et al - cont’d: Literature Review Provides an excellent overview of the state of the art in inferring state machines from traces Traditional approach –Passive merging of similar sequences in an augmented prefix tree acceptor (APTA) –Exemplified in these papers A. Biermann and J. Feldman. “On the synthesis of finite-state machines from samples of their behavior”. IEEE Trans. Computers, 21:592–597, G. Ammons, R. Bodík, and J. Larus. “Mining specifications”. POPL’02, 4–16, J. E. Cook and A. L. Wolf. “Discovering models of software processes from event-based data”. ACM TOSEM, 7(3):215–249, D. Lo and S. Khoo. “SMArTIC: towards building an accurate, robust and scalable specification miner”. In SIGSOFT FSE, 265–275, 2006

Dec Timothy C. Lethbridge Walkinshaw et al - cont’d: The Evolution of State Merging Passive merging leads to overgeneralization if the traces don’t cover the full space of possibilities –A problem for most large systems without complete testcases More recent work: Active merging –Asking questions of the developer when information is needed –Exemplified in: P. Dupont, B. Lambeau, C. Damas, and A. van Lamsweerde. “The QSM algorithm and its application to software behavior model induction”. Applied Artificial Intelligence, 22:77–115, N. Walkinshaw, K. Bogdanov, M. Holcombe, and S. Salahuddin. “Reverse engineering state machines by interactive grammar inference”. WCRE’07, 2007.

Dec Timothy C. Lethbridge Walkinshaw et al - cont’d: Passive then Active Inference

Dec Timothy C. Lethbridge Walkinshaw et al - cont’d: New approach uses LTL The developer suggests some constraints in Linear Temporal Logic –An iterative process

Dec Timothy C. Lethbridge LTL review Next x –x has to hold in the next state Global x –x has to hold for every future state Eventually x –x has to hold eventually Until x U y –x has to hold until y Release x R y –y is true until x becomes true –x releases y You can’t load again unless you close first

Dec Timothy C. Lethbridge Walkinshaw et al: Sample Sequence of Reverse Engineering Steps

Dec Timothy C. Lethbridge Walkinshaw et al: Results Having the user be able to specify LTL constraints reduces the number of questions asked by 50-70% But: –Reverse engineers must be fluent in temporal logic Maybe a better interaction method can be defined to allow LTL entry in a simpler form? o Graphical? Patterns? –System knowledge is still needed

Dec Timothy C. Lethbridge Agenda Current status Quick overview of subproject intent State of the art –Verification and analysis using state machines –Reverse engineering from traces –State machine generation and modeling –Umple: A modeling infrastructure Plans and potential directions

Dec Timothy C. Lethbridge State of the art: State Machine Modeling Tools and Code Generation

Dec Timothy C. Lethbridge State of the art: URLs of Key State-Machine Generating Tools nt/bridgepoint/

Dec Timothy C. Lethbridge Agenda Current status Quick overview of subproject intent State of the art –Verification and analysis using state machines –Reverse engineering from traces –State machine generation and modeling –Umple: A modeling infrastructure Plans and potential directions

Dec Timothy C. Lethbridge State of the Art: Umple, a Modeling Infrastructure Sponsored by IBM CAS Ottawa –Project has one more year of current sponsorship A textual language in which –UML concepts appear like programming language concepts –Modelling can be performed Fully generated code that needs no round-tripping –Programming can be done as normal Normal Java code, just incremented with UML abstractions Still under development, but robust enough for real development Current grammar is at:

Dec Timothy C. Lethbridge Umple continued Associations: class X { } class Y { 1 -- * X; } Constraints maintained: –Referential integrity –Multiplicity Umple is written in itself Online demo

Dec Timothy C. Lethbridge State Machines in Umple class X { SM1 { S1 { e1 / {callMethod();} -> S2;} S2 { e1 -> S1;} } class Y { Boolean b = true; SM2 { S3 { e2 [b] -> S4;} S4 { e3 -> / {setB(false);} S3;} }

Dec Timothy C. Lethbridge A larger sample of state machine code class IntersectionTimerDriven { Integer directionOneGoTime; Integer directionTwoGoTime; Integer yellowTime; Integer P1GoTime; Integer P2GoTime; flow { FourWayStop { entry / {directionOneLight = FlashingRed; directionTwoLight = FlashingRed; } initiateRegularOperation -> DirectionOneGo; } DirectionOneGo { entry / {directionOneLight = Green; directionTwoLight = Red; } afterSeconds(directionOneGoTime) -> DirectionOneHalting; detectMalfunction -> FourWayStop; } DirectionOneHalting { entry / {directionOneLight = Yellow; } afterSeconds(yellowTime) -> DirectionTwoGo; detectMalfunction -> FourWayStop; } DirectionTwoGo { entry / {directionOneLight = Red; directionTwoLight = Green; } afterSeconds(directionTwoGoTime) -> DirectionTwoHalting; detectMalfunction -> FourWayStop; } DirectionTwoHalting { entry / {directionTwoLight = Yellow; } afterSeconds(yellowTime) -> DirectionOneGo; detectMalfunction -> FourWayStop; } pedestrianFlow { FourWayStop { entry / {P1Light = DoNotWalk; P2Light = DoNotWalk;} initiateRegularOperation -> P2Go; } P1Go { entry / {P1Light = Walk;} afterSeconds(P1GoTime) -> P1Halting; detectMalfunction -> FourWayStop; } P1halting { entry / {P1Light = Flashing;} afterSeconds(P1GoTime) -> P2Go; detectMalfunction -> FourWayStop; } P2Go { entry / {P2Light = Walk;} afterSeconds(P2GoTime) -> P2Halting; detectMalfunction -> FourWayStop; } P2Halting { entry / {P2Light = Flashing;} afterSeconds(flashingTime) -> P1Go; detectMalfunction -> FourWayStop; } } directionOneLight { FlashingRed, Red, Yellow, Green } directionTwoLight { FlashingRed, Red, Yellow, Green } P1Light { DoNotWalk, Flashing, Walk } P2Light { DoNotWalk. Flashing, Walk }

Dec Timothy C. Lethbridge Variability Modeling in Umple Allows –Creating a product family –Putting together a product from sets of features

Dec Timothy C. Lethbridge Why use Umple for this Project 1 Allows for –Arbitrarily nested and concurrent states –Interruptible do activities –Multiple state machines per class –Reusable state machines –Product families of state machines –Definition of model patterns –Separation of diagrams from model –Aspects and mixins

Dec Timothy C. Lethbridge Why use Umple for this Project 2 Integrated with Eclipse –Works like any other compiler Generates multiple languages Under our control so we can experiment Textual –So we can create, generate and edit sophisticated models easily –So we can apply sophisticated tools to analyse and transform them –But text is not XML, so merging and analysis can be easier Graphical so we can visualize state machines Integrate state and class diagrams tightly

Dec Timothy C. Lethbridge Agenda Current status Quick overview of subproject intent State of the art –Verification and analysis using state machines –Reverse engineering from traces –State machine generation and modeling –Umple: A modeling infrastructure Plans and potential directions

Dec Timothy C. Lethbridge Students to be Involved Directly on project (starting in January) –Hamoud Aljamaan, PhD - Scholarship student Enhacing modeling tool Umple to facilitate tracing –Mahmoud Orabi, PhD - Funded by project Reverse engineering traces to state machines Working on supporting technologies –Ahmed Orabi, PhD student starting in January, NSERC funds Metamodeling for tracing –Omar Badreldin, PhD student 30% completed, IBM funds State machine modeling and code generation –Andrew Forward, PhD student 90% completed, IBM funds Overall Umple architecture –One more masters student is expected to start in May Also scholarships supported Making Umple generate for with C++ / Erlang, etc. –Undergrad students working on IDE

Dec Timothy C. Lethbridge Near-Term Plans: Develop and Enhance Tracable Models Manually model some existing systems of interest to Ericsson or DND –Most effective do this in Umple –If we have source code we can try re-factor to Umple Refactor to associations and state machines Umple can be made to generate C++, Erlang, etc. –We have a lot of experience refactoring to Umple with associations Learning to do it with state machines would be an interesting exercise

Dec Timothy C. Lethbridge Near-term Plans: Reverse Enginering from Traces to State Machines Attempt to replicate (by borrowing software?) existing semi-automated reverse engineering techniques –Target language would be Umple But easy to translate to and from other targets –New research questions not addressed by current research: Reverse engineering to concurrent state machines and nested state machines Full reverse engineering of correct guards, actions, and activities Can we make it work with truly huge traces?

Dec Timothy C. Lethbridge Near-term plans: Deepen our literature review The new students who will be starting will be tasked with this

Dec Timothy C. Lethbridge Task for a student Work with Debrief software –As provided by Mario Couture –One of several case studies we will need to develop –Instrument and trace –Manually model prior to attempting to automatically model –Generate code from the model for further experimentation

Dec Timothy C. Lethbridge Other general project tasks Meet more with Ericsson and DND to better understand –Perspectives –Requirements –Target examples Investigate synergies with IBM –They are interested in Umple, but would like to see a customer interested in it before investing