Title: Java Program Analysis Projects in Osaka University: AspectBased Slicing System ADAS and RankedCompon
1Java Program Analysis Projects in Osaka
UniversityAspect-Based Slicing System ADAS
andRanked-Component Search System SPARS-J
- Reishi Yokomori, Takashi Ishio,
- Tetsuo Yamamoto, Makoto Matsushita,
- Shinji Kusumoto and Katsuro Inoue
yokomori, t-isio, t-yamamt, matusita, kusumoto,
inoue_at_ist.osaka-u.ac.jp
2Background
- Large scale software is difficult to debug.
- Especially, fault localization needs much cost
since the place where a program crushed is not
always close to the fault. - Executed codes for one test case are usually
small pieces of the program.
Excluding automatically unrelated codes is
effective for fault localization.
3Program Slicing
- Program Slicing extracts a slice of codes, which
affects value of a specific variable. - Program Slicing excludes unrelated codes to aid
fault localization.
1 a 5 2 b a a 3 if (b gt 0) 4 c
a 5 6 d b
1 a 5 2 b a a 3 if (b gt 0) 4 c
a 5 6 d b
a slice based on slice criteria(6, b)
4Slice Calculation Process
- Phase 1 Extraction of
- dependence relations.
- Data Dependence
- Control Dependence
- Phase 2 Construction of
- Program Dependence Graph
- node a statement.
- edge a dependence relation
- Phase 3 Traversal of PDG
- traversal backward from a node
- corresponding a slice criteria
slice criteria
5Dependence-Cache (DC) slicing using dynamic
information
- In slice calculation process, observing program
execution, and using information about statements
actually executed is effective to decrease the
slice size. - which method is actually executed ?
- what type of object is accessed ?
- Dependence-Cache (DC) slicing has been proposed
for use in a dynamic data dependence analysis and
a static control dependence analysis to calculate
accurate slices with lightweight costs .
6Implementation of dynamic analysis
- Although various ways exist in implementing the
dynamic analysis, each one requires a high cost
in implementation or in runtime. - Aspect-oriented programming improves modularity
of crosscutting concerns. - Dynamic analysis is a typical crosscutting
concern.
7Aspect-Oriented Dynamic Analysis and Slicing
Calculation System ADAS
- Debugging Support Tool using Program Slicing for
Java - Dynamic Analysis Aspect (written in AspectJ)
- Simple logging-like Implementation
- Lightweight Analysis
- less overhead The aspect is linked to target
program at compile time. - coarse analysis The aspect ignore local data and
controls. - Program Slicing System
- Program Slicing is an application using dynamic
information. - The prototype is implemented as Eclipse plug-in.
8Architecture and Use Case of ADAS
1.edit
program slice
slice criteria
4.slice calculation
Dynamic Analysis Aspect
Java Source
Slice Calculation Tool
Static Analyzer
2.compile
Java VM
AspectJ
Java Bytecode
3.execute a test case
9Demonstration
10Remark and Future Work
- ADAS supports debugging tasks
- Program slicing shows related code to a user.
- Dynamic information exclude unexecuted code.
- Dynamic Analysis Aspect is
- simple implementation,
- easy to maintain, customize.
- Future Work
- Extension of ADAS to calculate AspectJ slice,
- Improvement of Usability.
11Java Program Analysis Projects in Osaka
UniversityAspect-Based Slicing System ADAS
andRanked-Component Search System SPARS-J
- Reishi Yokomori, Takashi Ishio,
- Tetsuo Yamamoto, Makoto Matsushita,
- Shinji Kusumoto and Katsuro Inoue
yokomori, t-isio, t-yamamt, matusita, kusumoto,
inoue_at_ist.osaka-u.ac.jp
12Reuse of Software Components
- Reuse of software components
- is a technique of developing new software
components by using the components developed in
the past. - Example of reusable components source code,
document .. - improves productivity and quality, and cuts down
development cost as a result. - However, reuse of components is not utilized
effectively. - A developer doesnt know existence of desirable
components. - Although there are a lot of components, these
components are not organized. - In order to take advantage of reuse, it is
required to share the knowledge of components.
13Motivation of Our Research
- We can get a lot of source codes easily through
the Internet. - Software development communities, such as
SourceForge, release source code For promotion of
exchanges of views and information between
developers. - Publishing companies of programming guide book
open the example programs to the public. - These source codes can be helpful as a source of
knowledge about reusable components. - A search engine for the components collected from
the Internet is useful to reuse of components.
14SPARS
- SPARS Software Product Archiving, analyzing and
Retrieving System - Now, we are developing
for Java codes. - In SPARS,
- Components (source codes) are collected from the
Internet. - Components are analyzed syntactically.
- A search engine is built based on the analysis
information. - In order to make a search engine user-friendly,
- The components used repeatedly are displayed on
the higher rank of a search result. - The evaluation value of each component is
calculated from the use relation between
components. (Component Rank) - Information of the component is displayed in an
easy-to-understand way. - Source code
- Other components which it uses
- Similar components
Katsuro Inoue, Reishi Yokomori, Hikaru Fujiwara,
Tetsuo Yamamoto, Makoto Matsushita, Shinji
Kusumoto "Component Rank Relative Significance
Rank for Software Component Search", ICSE,
Portland, OR, May 6, 2003.
15 Structure of
Repository Construction Subsystem
Analyzer
Source Code Repository
Ranker
Parser
Cluster
Repository
Word Repository
Query Parser
Searcher
Component Repository
Browser
Formatter
Repository
Retrieval Subsystem
16Demonstration
17Summary and Future Work
- Summary
- We developed component search engine SPARS-J
- By ranking using Component Rank, retrieval of
components used well is enabled easily. - We expect a promotion of reuse by sharing of
knowledge about component. - Future Work
- Improvement in a performance of SPARS-J
- Improvement in a retrieval function
- Examination of the component information to
display - Evaluation of SPARS-J