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

Slides:



Advertisements
Similar presentations
Slicing Methods Using Static and Dynamic Information Yoshiyuki Ashida, Fumiaki Ohata, † † † ‡ †‡ Katsuro Inoue Osaka University Nara Institute of Science.
Advertisements

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Identifying Source.
Chair of Software Engineering From Program slicing to Abstract Interpretation Dr. Manuel Oriol.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University On the Effectiveness.
1 Program Slicing Purvi Patel. 2 Contents Introduction What is program slicing? Principle of dependences Variants of program slicing Slicing classifications.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extraction of.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extracting Code.
SWE Introduction to Software Engineering
5-1 Flow of Control Recitation-01/25/2008  CS 180  Department of Computer Science  Purdue University.
CS 536 Spring Global Optimizations Lecture 23.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University A Prototype of.
Software Testing and Quality Assurance
Prof. Fateman CS 164 Lecture 221 Global Optimization Lecture 22.
1 Software Testing and Quality Assurance Lecture 5 - Software Testing Techniques.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Automatic Categorization.
Prof. Bodik CS 164 Lecture 16, Fall Global Optimization Lecture 16.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Measuring Copying.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 7 Slide 1 Requirements Engineering Processes 1.
Su Ping and Ma Xiao-xing Department of Computer Science and Technology Nanjing University Automated Analysis of Dynamic Dependences between Java Components.
Reverse Engineering State Machines by Interactive Grammar Inference Neil Walkinshaw, Kirill Bogdanov, Mike Holcombe, Sarah Salahuddin.
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.
A Review of Recursion Dr. Jicheng Fu Department of Computer Science University of Central Oklahoma.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University A lightweight.
2006/09/19AOAsia 21 Towards Locating a Functional Concern Based on a Program Slicing Technique Takashi Ishio 1,2, Ryusuke Niitani 2 and Katsuro Inoue 2.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University What Kinds of.
Chapter 5: Requirement Engineering Process Omar Meqdadi SE 2730 Lecture 5 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
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.
Computing with C# and the.NET Framework Chapter 1 An Introduction to Computing with C# ©2003, 2011 Art Gittleman.
1 A Static Analysis Approach for Automatically Generating Test Cases for Web Applications Presented by: Beverly Leung Fahim Rahman.
Software Engineering Research Group, Graduate School of Engineering Science, Osaka University Analysis and Implementation Method of Program to Detect Inappropriate.
Bug Localization with Machine Learning Techniques Wujie Zheng
© 2001 Business & Information Systems 2/e1 Chapter 8 Personal Productivity and Problem Solving.
Lead Black Slide Powered by DeSiaMore1. 2 Chapter 8 Personal Productivity and Problem Solving.
Branch Regulation: Low-Overhead Protection from Code Reuse Attacks.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Design and Implementation.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Inoue Laboratory Eunjong Choi 1 Investigating Clone.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University How to extract.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Technology and Science, Osaka University Dependence-Cache.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University VerXCombo: An.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Development of.
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University Retrieving Similar Code Fragments based on Identifier.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Assertion with.
IDENTIFYING SEMANTIC DIFFERENCES IN ASPECTJ PROGRAMS Martin Görg and Jianjun Zhao Computer Science Department, Shanghai Jiao Tong University.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Towards Program.
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 Finding Code Clones.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Decision Trees Binary output – easily extendible to multiple output classes. Takes a set of attributes for a given situation or object and outputs a yes/no.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Cage: A Keyword.
Software Engineering Research Group, Graduate School of Engineering Science, Osaka University A Slicing Method for Object-Oriented Programs Using Lightweight.
Extracting a Unified Directory Tree to Compare Similar Software Products Yusuke Sakaguchi, Takashi Ishio, Tetsuya Kanda, Katsuro Inoue Department of Computer.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Classification.
Requirements Engineering Processes. Syllabus l Definition of Requirement engineering process (REP) l Phases of Requirements Engineering Process: Requirements.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Extracting Sequence.
ANALYSIS PHASE OF BUSINESS SYSTEM DEVELOPMENT METHODOLOGY.
Identifying “Best Bet” Web Search Results by Mining Past User Behavior Author: Eugene Agichtein, Zijian Zheng (Microsoft Research) Source: KDD2006 Reporter:
Finding bugs with a constraint solver daniel jackson. mandana vaziri mit laboratory for computer science issta 2000.
Verification vs. Validation Verification: "Are we building the product right?" The software should conform to its specification.The software should conform.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Software Ingredients:
Department of Computer Science, Graduate School of Information Science & Technology, Osaka University A Metric-based Approach for Reconstructing Methods.
Yasuhiro Hayase†, Yu Kashima‡, Yuki Manabe‡, Katsuro Inoue‡
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Microsoft Visual Basic 2005 BASICS
Program Slicing Baishakhi Ray University of Virginia
Recommending Verbs for Rename Method using Association Rule Mining
Whitebox Testing.
Presentation transcript:

Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extraction of Conditional Statements for Understanding Business Rules Tomomi Hatano 1 Takashi Ishio 1 Joji Okada 2 Yuji Sakata 2 Katsuro Inoue Osaka University 2 NTT DATA Corporation

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Maintenance of a business system Developers must understand computational business rules [1] –The rules define how the output of a feature is computed from inputs. –The rules are implemented in the source code. 2 Rule for fee: The registration fee is 3,000 yen if an application is early received and 4,500 yen otherwise. [1] K. Wiegers and J. Beatty, Software Requirements, 3rd ed. Microsoft press, void action(int early) { int fee; if (early == 1) { fee = 3000; } else { fee = 4500; } setFee(fee); }

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Understanding Computational Business Rules A tedious and error-prone activity because –Documentation is generally unavailable. –A system has many features. A feature may compute multiple outputs. 3 void action(int early) { int fee; if (early == 1) { fee = 3000; } else { fee = 4500; } setFee(fee); } Rule for fee ?

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example: An imaginary facility A feature computes a usage fee and a time limit for a facility. A constraint –Children may not become premium members 4 valuesconditions 5children 10students 15adults valuesconditions 3premium members 2regular members fee [$]time limit [hour]

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example: Implementation Line 2 Checks the database access Lines 3 ─ 10 Computes the fee Line 5 checks violation Lines 11 ─ 14 Computes the time limit void action(int status, boolean member) { if (hasError()) { return; } int fee = 15; if (status==CHILD) { if (member) { return; } fee = 5; } else if (status==STUDENT) { fee = 10; } setFee(fee); setHour(2); if (member) { setHour(3); }

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example: Extracting Rules 6 valuesconditions 5children 10students 15adults fee [$] void action(int status, boolean member) { if (hasError()) { return; } int fee = 15; if (status==CHILD) { if (member) { return; } fee = 5; } else if (status==STUDENT) { fee = 10; } setFee(fee); setHour(2); if (member) { setHour(3); } ?

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example: Extracting Relevant Statements 7 valuesconditions 5status==CHILD 10status==STUDENT 15!(status==CHILD) && !(status==STUDENT) fee [$] void action(int status, boolean member) { if (hasError()) { return; } int fee = 15; if (status==CHILD) { if (member) { return; } fee = 5; } else if (status==STUDENT) { fee = 10; } setFee(fee); setHour(2); if (member) { setHour(3); } Relevant statements are conditional statements that represent “conditions” of computational business rules.

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example: Extracting Relevant Statements 8 Lines 4 and 7 are relevant. –The value of the fee is affected by their results. Lines 2 and 5 are irrelevant. –If their conditions are not hold, the fee is not outputted void action(int status, boolean member) { if (hasError()) { return; } int fee = 15; if (status==CHILD) { if (member) { return; } fee = 5; } else if (status==STUDENT) { fee = 10; } setFee(fee); setHour(2); if (member) { setHour(3); } Which conditional statements are relevant to the fee?

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Program slicing appears to be a promising technique but… A program slice for setFee –Lines 1 ─ 10 The slice includes irrelevant statements [2] –Lines 2 and void action(int status, boolean member) { if (hasError()) { return; } int fee = 15; if (status==CHILD) { if (member) { return; } fee = 5; } else if (status==STUDENT) { fee = 10; } setFee(fee); setHour(2); if (member) { setHour(3); } [2] V. Cosentino, J. Cabot, P. Albert, P. Bauquel, and J. Perronnet, “Extracting business rules from COBOL: A model-based framework,” in Proc. WCRE, 2013, pp. 409–416.

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Why Program Slicing Includes Irrelevant Statements? Because program slicing extracts two types of conditional statements without distinction –a statement which decides whether the computation is executed ⇒ irrelevant –a statement which affects the output value ⇒ relevant 10 We focus on a control-flow graph to exclude irrelevant statements.

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Dependence in Program Slicing Entry return void action(int status, boolean member) { if (hasError()) { return; } int fee = 15; if (status==CHILD) { if (member) { return; } fee = 5; } else if (status==STUDENT) { fee = 10; } setFee(fee); setHour(2); if (member) { setHour(3); } setFee

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Dependence in Program Slicing Entry return void action(int status, boolean member) { if (hasError()) { return; } int fee = 15; if (status==CHILD) { if (member) { return; } fee = 5; } else if (status==STUDENT) { fee = 10; } setFee(fee); setHour(2); if (member) { setHour(3); } setFee

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Our Key Idea Extract a partial control-flow graph, every path of which must output the value. Extract relevant statements from the graph in a similar way to program slicing. 13

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extraction of Partial CFG Entry return void action(int status, boolean member) { if (hasError()) { return; } int fee = 15; if (status==CHILD) { if (member) { return; } fee = 5; } else if (status==STUDENT) { fee = 10; } setFee(fee); setHour(2); if (member) { setHour(3); } Every path must output the fee setFee

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Extraction of Relevant Statements Entry 3 10 define fee use fee void action(int status, boolean member) { if (hasError()) { return; } int fee = 15; if (status==CHILD) { if (member) { return; } fee = 5; } else if (status==STUDENT) { fee = 10; } setFee(fee); setHour(2); if (member) { setHour(3); } Lines 2 and 5 Null Line 4 Lines 5, 6, and 7 Line 7 Line 8 Lines 3, 6, and 8 Line 10 Lines 4 and 7 are extracted Control

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Evaluation Q1. Does our technique help developers aa_accurately identify relevant statements? Q2. Does our technique affect the time aa_needed to identify relevant statements? Q3. Is our technique accurate? 16

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Controlled Experiment 8 developers in NTT DATA Corporation Each developer analyzed two Java methods –one method with our technique –the other method without our technique Process of the analysis –The developers classify each conditional statement as either relevant or irrelevant –They create a table of the computational business rules using the classification results 17

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Analysis with Our Technique 18 Source Code void action(int status, boolean member) { if (hasError()) { return; } // IRRELEVANT int fee = 15; if (status==CHILD) { // RELEVANT if (member) { return; } // IRRELEVANT fee = 5; } … } #LineConditionResult Your Answer 12hasError() IRRELEVAN T 24status==CHILDRELEVANT 35member IRRELEVAN T 47 status==STUDEN T RELEVANT 512member IRRELEVAN T Spreadsheet

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Analysis without Our Technique 19 void action(int status, boolean member) { if (hasError()) { return; } int fee = 15; if (status==CHILD) { if (member) { return; } fee = 5; } … } #LineConditionResult Your Answer 12hasError() 24status==CHILD 35member 47 status==STUDEN T 512member Spreadsheet Source Code

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Decision of the Correct Answer The 8 developers and the third author discussed the correct answer of classification They used the table of computational business rules to review the classification results. 20

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Result: Q1. Does our technique help developers accurately identify relevant statements? 21 Accuracy Yes Support No

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Result: Q2. Does our technique affect the time needed to identify relevant statements? 22 Time[s] YesNo Not statistically significant Developers must read the entire method to verify conditions represented in statements Support Our technique improves the accuracy of identification of relevant statements without affecting the time.

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Result: Q3. Is our technique accurate? Yes but… Our technique included 8 irrelevant statements. –Precision was 0.64 (14 / 22) –The statements would be excluded by a more precise analysis for library methods. Our technique missed 3 relevant statements. –Recall was 0.82 (14 / 17) –The next slide 23

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Example: Missed Relevant Statements 24 void foo(int mode) { if (mode==ON) { setX(1); } else if (mode==OFF) { setX(0); } ConditionOur techniqueDevelopers mode==ONRelevant mode==OFFIrrelevantRelevant Entry setX(1) setX(0) Entry combined conditions setX(1)setX(0) mode==ON mode==OFF Our techniqueDevelopers mode==ONmode==OFF Missed

Department of Computer Science, Graduate School of Information Science and Technology, Osaka University Conclusion We proposed a program dependence analysis technique to understand computational business rules. Our technique improved the accuracy of identification of relevant statements. We plan to apply our technique to re- engineering processes in practical projects. 25