Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Extracting Sequence.

Slides:



Advertisements
Similar presentations
Function Point Measurement from Java Programs
Advertisements

Object-oriented Software Change Dynamic Impact Analysis Lulu Huang and Yeong-Tae Song Dept. of Computer and Information Sciences Towson University Towson,
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Modularization.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extraction of.
Unified Modeling Language
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extracting Code.
Abstraction and Dynamic Analysis for the Reconstruction of Scenario Diagrams Bas Cornelissen Leon Moonen Arie van Deursen.
HENRIK BÆRBAK CHRISTENSEN ASSOCIATE PROFESSOR AARHUS UNIVERSITY DEPARTMENT OF COMPUTER SCIENCE 1 Experimental Software Architecture Kandidat orientering.
Automatically Extracting and Verifying Design Patterns in Java Code James Norris Ruchika Agrawal Computer Science Department Stanford University {jcn,
Unified Modeling Language (UML)
1 CSc Senior Project Software Testing. 2 Preface “The amount of required study of testing techniques is trivial – a few hours over the course of.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Industrial Application.
Exploring a Model-Oriented and Executable Syntax for UML Attributes SERA 2013SERA 2013 (August 7, 2013 in Prague, Czech Republic) Omar Badreddin, Andrew.
Computer Programming and Basic Software Engineering 4. Basic Software Engineering 1 Writing a Good Program 4. Basic Software Engineering.
Systems Analysis – Analyzing Requirements.  Analyzing requirement stage identifies user information needs and new systems requirements  IS dev team.
© Janice Regan, CMPT 128, Jan CMPT 128 Introduction to Computing Science for Engineering Students Creating a program.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Debugging Support.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Mining Coding Patterns to Detect Crosscutting Concerns.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University ICSE 2003 Java.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University What Kinds of.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University A Criterion for.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Investigation.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University A clone detection approach for a collection of similar.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University What Do Practitioners.
Chapter 3: Completing the Problem- Solving Process and Getting Started with C++ Introduction to Programming with C++ Fourth Edition.
1 On to Object Design Chapter 14 Applying UML and Patterns.
Object-Oriented Analysis and Design An Introduction.
Slide 1, Presentation: Reverse Engineering state diagrams from C/C++ code, | Dennie van Zeeland Masters Project Reverse Engineering state machine.
Programming in Java Unit 3. Learning outcome:  LO2:Be able to design Java solutions  LO3:Be able to implement Java solutions Assessment criteria: 
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Design and Implementation.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Applying Clone.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Inoue Laboratory Eunjong Choi 1 Investigating Clone.
Summarizing the Content of Large Traces to Facilitate the Understanding of the Behaviour of a Software System Abdelwahab Hamou-Lhadj Timothy Lethbridge.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Technology and Science, Osaka University Dependence-Cache.
Software Engineering 1 Object-oriented Analysis and Design Chap 22 UML Tools and UML as Blueprint.
© 2006 ITT Educational Services Inc. SE350 System Analysis for Software Engineers: Unit 10 Slide 1 Chapter 13 Finalizing Design Specifications.
Discovering object interaction. Use case realisation The USE CASE diagram presents an outside view of the system. The functionality of the use case is.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Retrieving Similar Code Fragments based on Identifier.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University 1 Towards an Assessment of the Quality of Refactoring.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Assertion with.
Unified Modeling Language. Object Oriented Methods ► What are object-oriented (OO) methods?  OO methods provide a set of techniques for analyzing, decomposing,
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University July 21, 2008WODA.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Cage: A Keyword.
Understanding the Behavior of Java Programs Tarja Systa Software Systems Lab. Tampere Univ. Sookmyung Women’s Univ. PSLAB Choi, yoon jeong.
1 Measuring Similarity of Large Software System Based on Source Code Correspondence Tetsuo Yamamoto*, Makoto Matsushita**, Toshihiro Kamiya***, Katsuro.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Classification.
TK2023 Object-Oriented Software Engineering CHAPTER 9 INTRODUCTION TO OBJECT DESIGN.
Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Towards a Collection of Refactoring Patterns Based.
Chapter 13 Finalizing Design Specifications
1 Gemini: Code Clone Analysis Tool †Graduate School of Engineering Science, Osaka Univ., Japan ‡ Graduate School of Information Science and Technology,
Class Diagrams. Terms and Concepts A class diagram is a diagram that shows a set of classes, interfaces, and collaborations and their relationships.
Andrey Karaulov, Alexander Strabykin Institute for System Programming Russian Academy of Sciences SYRCoSE: Spring Young Researchers Colloquium on Software.
Object-Oriented Software Engineering Practical Software Development using UML and Java Modelling with Classes.
Object Oriented Programming and Data Abstraction Earl Huff Rowan University.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
Object Oriented Analysis & Design By Rashid Mahmood.
Modified from Sommerville’s originalsSoftware Engineering, 7th edition. Chapter 14 Slide 1 Object-Oriented Design.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University A Metric-based Approach for Reconstructing Methods.
Estimating Code Size After a Complete Code-Clone Merge Buford Edwards III, Yuhao Wu, Makoto Matsushita, Katsuro Inoue 1 Graduate School of Information.
Engineering Quality Software Week02 J.N.Kotuba1 SYST Engineering Quality Software.
Unified Modeling Language
○Yuichi Semura1, Norihiro Yoshida2, Eunjong Choi3, Katsuro Inoue1
Tatsuya Miyake Takashi Ishio Katsuro Inoue
Lecture 15 (Notes by P. N. Hilfinger and R. Bodik)
Chapter 1 Introduction(1.1)
Research Activities of Software Engineering Lab in Osaka University
UML  UML stands for Unified Modeling Language. It is a standard which is mainly used for creating object- oriented, meaningful documentation models for.
On to Object Design c. 14.
Near-Omniscient Debugging for Java Using Size-Limited Execution Trace
Presentation transcript:

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Extracting Sequence Diagram from Execution Trace of Java Program Koji Taniguchi *, Takashi Ishio*,Toshihiro Kamiya**, Shinji Kusumoto*, Katsuro Inoue* *Osaka University, Japan **Japan Science and Technology Agency, Japan

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 2 Documents of Evolving Software Software is being changed by fixing bugs, modifying functions or adding new functions Owing to such changes No documents may represent the behavior of the software correctly because the software is repeatedly changed but the documents are not updated It makes understanding of program behavior difficult. Especially in object oriented programs We need reverse engineering techniques to recover some documents from a program.

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 3 Object Oriented Program Understanding Features of Object Oriented Program Many objects are concerned with a function Owing to dynamic binding and extending, dynamic behavior of a program differs from static description Message exchanges become more compress as increases of objects It is difficult to understand dynamic behavior of objects from source codes We need some documents that show dynamic behavior of objects

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 4 Visualizing Dynamic Behavior of Objects UML: Sequence Diagram It shows two kind of messages Method Call Object Generation Showing this diagram, we can understand dynamic behavior of objects We try to extract sequence diagram by dynamic analysis of a program 1:A2:B3:C 4:D 5:D Method Call Object Generation

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 5 A Problem of Dynamic Analysis The amount of information of an execution trace is very huge Because an execution trace is recorded all method calls which occurred in loop and recursive call structures. If we show all of them in a diagram, we can not understand easily We need a method to reduce information We propose a method that detects some repetition patterns from execution trace and abstracts them by replacing with a representative of a repetition

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 6 How to Extract Sequence Diagram 1.Get the execution trace 2.Compact the execution trace 3.Draw the Sequence Diagrams from the compacted execution trace

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 7 Step1 : Execution Traces The execution trace records the two event “Enter Method” and “Exit Method” we treat the constructor as the one kind of the method Recorded information When a “Enter Method” event occurred Package name, Class name and Object-ID of a callee object Signature of a method. When a “Exit Method” event occurred The method exit mark

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 8 Step2 : Compaction of Execution Trace Since an execution trace records many information, we need a method to reduce it Our method detects some repetitions from execution trace and abstracts them by replacing with a representative of repetition To compact the execution trace, we propose four Compaction Rules Rules that compact some repetition patterns R1 : Completely same repetition R2 : Allowing different objects repetition R3 : Lack of method calls repetition Rule that compacts recursive calls R4 : Recursive call structure

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 9 Rule R1 : Completely Same Repetition R1 compacts a repetition of completely same method call structure void A.a() 1 int B.b() 2 first time of the repetitionsecond time of the repetition void C.c() 3 void A.a() 1 int B.b() 2 void C.c() 3 representative of the repetition void A.a() 1 int B.b() 2 void C.c() 3 2

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 10 Rule R2 : Allowing Different Objects Repetition R2 compacts a repetition of method call structure whose objects may be different void A.a() 1 int B.b() 2 first time of the repetitionsecond time of the repetition void C.c() 3 void A.a() 4 int B.b() 5 void C.c() 6 representative of the repetition void A.a() 1,4 int B.b() 2,5 void C.c() 3,6 2

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 11 Rule R3 : Lack of Method Calls Repetition R3 compacts a repetition of method call structure some of whose method calls may be lacked void A.a() 1 int B.b() 2 first time of the repetitionsecond time of the repetition void C.c() 3 void A.a() 4 void C.c() 6 representative of the repetition void A.a() 1,4 int B.b() 2 void C.c() 3,6 2 ?

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 12 Rule R4 : Recursive Call Structure R4 compacts recursive call structure by reconstructing it to be simple R4 also not considers object ID void A.a() 1 int B.b() 6 void A.a() 2 3 int B.b() 5 4 void A.a() 1,2,3 void A.a() 1,2,3 int B.b() 4,5,6 R

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 13 Step3 : Drawing Sequence Diagram Draw a sequence diagram from a compacted execution trace We define annotation symbols for each compaction rule Compacted parts are drawn with them in the sequence diagram

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 14 A:1B:2 a() b() int void A.a() 1 int B.b() 2 How to draw non-compacted parts

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 15 A:1B:2 2 a() b() R1 void A.a() 1 int B.b() 2 2 void A.a() 1 int B.b() 2 2 Annotation for R1

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 16 A:1B:2,3 2 a() b() R2 void A.a() 1 1 int B.b() 2,3 2 int B.b() 2 3 Annotation for R2

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 17 A:1B:2,3 2 a() b() C:4 ? c() R3 void A.a() 1 int B.b() 2 3 void A.a() 1 int B.b() 2,3 2 int C.c() 4 4 ? Annotation for R3

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 18 A:1,2B:3,4 a() b() rec a() void A.a() 1 int B.b() 4 void A.a() 2 int B.b() 3 R4 void A.a() 1,2 void A.a() 1,2 int B.b() 3,4 R ? Annotation for R4

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 19 Case Study Case study processes as followings Get execution traces from four Java program jEdit : Text Editor Gemini : Code clone analyzer Scheduler : Schedule management tool LogCompactor : The module of our tool that compacts execution traces Apply four rules to four execution traces. The order of applying rules is R4→R1→R2→R3 Generate Sequence Diagrams

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 20 Result of Compaction

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 21 Sequence DiagramOver View of the Diagram

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 22 Repetition Unified objects

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 23 Summary For Object Oriented program understanding It is necessary to understand dynamic behavior of objects. We try to make sequence diagrams from execution trace The amount of the program execution trace tends to be very large We proposed a method to reduce information by compacting repetition part of the execution trace. Draw the sequence diagram from the compacted execution trace We can extract the simple sequence diagram that shows dynamic behavior of objects

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 24 End

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 25 Compaction (3) Time Method The prot of the methods which recorded the compacted execution trace of Gemini The execution trace of Gemini was most compacted one. But we can see some repetition of the method calls remain. We need the more effective compaction rules

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 26

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 27 Objects which do not exist in the design Method calls which do not exist in the design diagram