1 Enhancing Program Comprehension with recovered State Models Stéphane S. Somé Timothy C. Lethbridge SITE, University of Ottawa.

Slides:



Advertisements
Similar presentations
Control Structures Any mechanism that departs from straight-line execution: –Selection: if-statements –Multiway-selection: case statements –Unbounded iteration:
Advertisements

Native x86 Decompilation Using Semantics-Preserving Structural Analysis and Iterative Control-Flow Structuring Edward J. Schwartz *, JongHyup Lee ✝, Maverick.
A Brief Introduction. Acknowledgements  The material in this tutorial is based in part on: Concurrency: State Models & Java Programming, by Jeff Magee.
ISBN Chapter 3 Describing Syntax and Semantics.
Component Interaction in Distributed Systems Nat Pryce Imperial College
Tentative Schedule 20/12 Interpreter+ Code Generation 27/12 Code Generation for Control Flow 3/1 Activation Records 10/1 Program Analysis 17/1 Register.
Chapter 8 . Sequence Control
Transformation of Java Card into Diet Java Semester Project Presentation Erich Laube.
SMIILE Finaly COBOL! and what else is new Gordana Rakić, Zoran Budimac.
Describing Syntax and Semantics
Tutorial 4 Decision Making with Control Structures and Statements Section A - Decision Making JavaScript Tutorial 4 -Decision Making with Control.
C++ for Engineers and Scientists Third Edition
1 A Student Guide to Object- Orientated Development Chapter 9 Design.
Object-oriented design CS 345 September 20,2002. Unavoidable Complexity Many software systems are very complex: –Many developers –Ongoing lifespan –Large.
Software Testing and QA Theory and Practice (Chapter 4: Control Flow Testing) © Naik & Tripathy 1 Software Testing and Quality Assurance Theory and Practice.
Oakkar Fall The Need for Decision Engine Automate business processes Implement complex business decision logic Separation of rules and process Business.
Programming Languages CPS120: Introduction to Computer Science Lecture 5.
Using Jeroo To Teach Object-Oriented Concepts By Christian Digout.
Database System Concepts and Architecture Lecture # 3 22 June 2012 National University of Computer and Emerging Sciences.
MBI 630: Class 6 Logic Modeling 9/7/2015. Class 6: Logic Modeling Logic Modeling Broadway Entertainment Co. Inc., Case –Group Discussion (Handout) –Logic.
CS370 Spring 2007 CS 370 Database Systems Lecture 2 Overview of Database Systems.
Benefits of PL/SQL. 2 home back first prev next last What Will I Learn? In this lesson, you will learn to: –List and explain the benefits of PL/SQL –List.
Automatic Identification of Concurrency in Handel-C Joseph C Libby, Kenneth B Kent, Farnaz Gharibian Faculty of Computer Science University of New Brunswick.
Class Specification Implementation Graph By: Njume Njinimbam Chi-Chang Sun.
ECE 2372 Modern Digital System Design
Ceg860 (Prasad)L6MR1 Modularity Extendibility Reusability.
OBJECT ORIENTED SYSTEM ANALYSIS AND DESIGN. COURSE OUTLINE The world of the Information Systems Analyst Approaches to System Development The Analyst as.
Control Structures A control structure is simply a pattern for controlling the flow of a program module. The three fundamental control structures of a.
Chapter 6 Programming Languages (2) Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Nikos Kefalakis, John Soldatos, Efstathios Mertikas, Neeli R. Prasad Generating Business Events in an RFID Network.
Autumn 2012UCN T&B - IT/Computer Science1 State Pattern Implementation of State Machines State Pattern.
1 Statements: Control Structure Issues (Chapters and 19 of Code Complete) Don Bagert CSSE 375, Rose-Hulman October 17, 2006.
 Learn about control structures  Examine relational and logical operators  Explore how to form and evaluate logical (Boolean) expressions  Learn how.
Chapter 3 Functions, Events, and Control Structures JavaScript, Third Edition.
Modeling as a Design Technique Chapter 2 Part 1: Modeling Concepts Object-Oriented Modeling and Design Byung-Hyun Ha
Ruby on Rails Evaluation – Cognitive Dimensions Joshua Sunshine
(1) Basic Language Concepts © Sudhakar Yalamanchili, Georgia Institute of Technology, 2006.
Requirements Engineering-Based Conceptual Modelling From: Requirements Engineering E. Insfran, O. Pastor and R. Wieringa Presented by Chin-Yi Tsai.
1.
Gordana Rakić, Zoran Budimac
Generating Software Documentation in Use Case Maps from Filtered Execution Traces Edna Braun, Daniel Amyot, Timothy Lethbridge University of Ottawa, Canada.
1 Control Flow Analysis Topic today Representation and Analysis Paper (Sections 1, 2) For next class: Read Representation and Analysis Paper (Section 3)
Connecting Architecture Reconstruction Frameworks Ivan Bowman, Michael Godfrey, Ric Holt Software Architecture Group University of Waterloo CoSET ‘99 May.
The Dagstuhl Middle Model: An Overview Timothy C. Lethbridge SITE, University. of Ottawa
Université Toulouse I 1 CADUI' June FUNDP Namur Implementation Techniques for Petri Net Based Specifications of Human-Computer Dialogues.
Engineering Computing I Chapter 3 Control Flow. Chapter 3 - Control Flow The control-flow of a language specify the order in which computations are performed.
Chapter 1: Introduction to Computers and Programming.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
Windows Programming Lecture 06. Data Types Classification Data types are classified in two categories that is, – those data types which stores decimal.
Python Programming Language by Vasu Chetty. Origins of Python Created by: Guido van Rossum, a Dutch Programmer Created during: Christmas Break, 1989 Created.
Course Outcomes of Programming In C (PIC) (17212, C203):
Basic Language Concepts
Control Flow Testing Handouts
State pattern – A logical ‘Finite State Machine’
Outline of the Chapter Basic Idea Outline of Control Flow Testing
Science fair project TITLE
Control Structures (Structured Programming) for controlling the procedural aspects of programming CS1110 – Kaminski.
Topics discussed in this section:
Program Slicing Baishakhi Ray University of Virginia
5 × 7 = × 7 = 70 9 × 7 = CONNECTIONS IN 7 × TABLE
5 × 8 = 40 4 × 8 = 32 9 × 8 = CONNECTIONS IN 8 × TABLE
4 × 6 = 24 8 × 6 = 48 7 × 6 = CONNECTIONS IN 6 × TABLE
5 × 6 = 30 2 × 6 = 12 7 × 6 = CONNECTIONS IN 6 × TABLE
10 × 8 = 80 5 × 8 = 40 6 × 8 = CONNECTIONS IN 8 × TABLE MULTIPLICATION.
3 × 12 = 36 6 × 12 = 72 7 × 12 = CONNECTIONS IN 12 × TABLE
Control Structures (Structured Programming) for controlling the procedural aspects of programming CS1110 – Kaminski.
5 × 12 = × 12 = × 12 = CONNECTIONS IN 12 × TABLE MULTIPLICATION.
5 × 9 = 45 6 × 9 = 54 7 × 9 = CONNECTIONS IN 9 × TABLE
Lesson 3. Controlling program flow. Loops. Methods. Arrays.
3 × 7 = 21 6 × 7 = 42 7 × 7 = CONNECTIONS IN 7 × TABLE
Presentation transcript:

1 Enhancing Program Comprehension with recovered State Models Stéphane S. Somé Timothy C. Lethbridge SITE, University of Ottawa

2 State Transition Models can help program comprehension High-level behavior models Capture design decisions Mapped to code Strong connection between resulting code and state model Highlighted by use of state implementation idioms Problem: what if the original state model is lost or has-been altered

3 State implementation idioms Non-procedural languages Based on goto Procedural (non-OO) languages Based on control structures (if, switch, …) Table lookup Object-oriented languages Dynamic binding

4 Procedural idioms (1) void strans() { …. State = state1; /* initial state */ while(1) { switch(event) { case eventA: if (State == state1) a_1(); else a_2(); break; case eventB: if (State == state1) { b_1(); State = state2; …. } State variable definition change of a state variable

5 Procedural idioms (2) void eventA() { switch(State) { case state1: a_1(); break; case state2: a_2(); break; default: /* error */ exit(0); } void eventB() { switch(State) { case state1: b_1(); State = state2; break; case state2: b_2(); State = state1; break; default: /* error */ exit(0); }

6 State Model Recovery Process State Model Implementation Specification Specifies how state model implemented State Variable Used Routines (and source files) Idiom

7 Statement Tree Abstraction of parse tree with relevant information only Provide code layout Useful for dealing with statements affecting flow of execution

8 State Variable Definition Graph (SVDG) void strans() { (5) State = state1; while(1) { switch(event) { case eventA: if (State == state1) a_1(); else a_2(); break; case eventB: if (State == state1) { b_1(); (20) State = state2; …. } captures state variables control flow

9 State Transition Graph States defined as Transitions change from a state to another events correspond to control structure conditions

10 Multiple routines (1) Generate partial models (2) combine

11 SRecover Recovers state models given state implementation specifications How to find a Specification ? Traditional code exploration

12 Conclusion Supporting additional patterns table based implementation OO state patterns Dealing with multiple state variables Integration with code exploration tools