Title: Design and Implementation of Bytecode-Based Java Slicing System
1Design and Implementation of Bytecode-Based Java
Slicing System
- Fumiaki Umemori, Kenji Konda,
- Reishi Yokomori, Katsuro Inoue
- Osaka University, Japan
2Background
- 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
3Dependence-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 slice DC slice Dynamic slice
DD analysis Static Dynamic Dynamic
CD analysis Static Static Dynamic
Target Source code Source 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.
4Dynamic 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.
5Slicing 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
6Data Dependence Analysis Based on Java Virtual
Machine
Java Virtual Machine
s1 iconst_3
local variable
stack
s2 iconst_5
s3 iadd
8
0
s4 istore_0
corresponding cache
data dependence
s4
0
7System 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
8Overview of Slice Calculation
Java Compile
Slice Criterion
User Input
Tool
Slicer
Tool Output
CD analysis tool
static control dependence
dynamic data dependence
Java Virtual Machine
9Conclusions 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
10END
Thanks ! Question ? (But, please speak slowly !)