Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Design and Implementation."— Presentation transcript:

1 Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Design and Implementation of Bytecode-Based Java Slicing System Fumiaki Umemori, Kenji Konda, Reishi Yokomori, Katsuro Inoue Osaka University, Japan

2 Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 2 Background Software systems are becoming large and complex. Developers spend a large amount of time to test and debug their systems. Various techniques for improving debugging efficiency have been proposed Program Slicing

3 Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 3 Dependence-Cache (DC) Slicing ¶ Dependence-Cache Slicing : Intermediate slicing between static slicing and dynamic slicing † DD(Data Dependence), ‡ CD(Control Dependence) Advantage Better analysis precision than static slice Smaller analysis cost than dynamic slice Static sliceDC sliceDynamic slice DD † analysisStaticDynamic CD ‡ analysisStatic Dynamic TargetSource code Execution trace ¶ Ashida, Y., Ohata, F. and Inoue, K. : “Slicing Methods Using Static and Dynamic Information”, Proceedings of the 6th Asia Pacific Software Engineering Conference, 344-350, 1999.

4 Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 4 Dynamic Data Dependence Analysis for DC Slicing Key idea: Cache On program execution, we have only to trace the most- recently defined statement for each variable using cache. Cache(v) : statement that defined the value of v most-recently. Operations for caches Before program execution, For each variable v, Cache(v)  . On program execution, For each statement s, when v is defined, Cache(v)  s. when v is referred to, we extract dynamic data dependence from Cache(v) to s about v.

5 Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 5 Slicing for Java Java programs have many elements determined at runtime Dynamic DD analysis is necessary Proposed Method Analyze dynamic data dependence using Java Virtual Machine Analysis is based on bytecode Mapping bytecode onto source code DC slicing is effective for Java Slicing System

6 Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 6 s21s1030s3080 s1: iconst_3 s2: iconst_5 s3: iadd s4: istore_0 s1: iconst_3 8 s4: istore_0 s3: iadd s2: iconst_5 0 Data Dependence Analysis Based on Java Virtual Machine corresponding cache local variablestack data dependence Java Virtual Machine s4 0 51

7 Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 7 System Implementation Bytecode-Based Java DC-Slicing System (U1) Compile unit Extended Java compiler to create cross reference table (U2) Control Dependence Analysis unit Extract CD relation statically (U3) Execution unit Extended Java Virtual Machine ( JVM ) to extract DD relation dynamically (U4) Slicing unit Construct Program Dependence Graph ( PDG ) and Compute Slice

8 Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 8 Source code Overview of Slice Calculation Source code Java Compile Cross Reference Table Java Virtual Machine CD analysis tool Slicer User Input Tool Tool Output static control dependence dynamic data dependence Bytecode Slice Criterion PDG ( Bytecode )

9 Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 9 Conclusions and Future Works Bytecode based Java Slicing System Cross Reference Table Static Analysis for Control Dependence Dynamic Analysis for Data Dependence Slicer Future Works Cross Reference Table for optimized bytecode Improve Data Dependence analysis time

10 Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 10 END Thanks ! Question ? (But, please speak slowly !)


Download ppt "Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Design and Implementation."

Similar presentations


Ads by Google