Download Reuse of Software Components - Software Engineering Laboratory

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Java Program Analysis Projects in Osaka University:
Aspect-Based Slicing System ADAS
and
Ranked-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}@ist.osaka-u.ac.jp
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Background
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.
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Program Slicing
Program Slicing extracts a slice of codes,
which affects value of a specific variable.
1:
2:
3:
4:
5:
6:
a = 5;
b = a + a;
if (b > 0) {
c = a;
}
d = b;
a slice based on slice
criteria(6, b)
1:
2:
3:
4:
5:
6:
a = 5;
b = a + a;
if (b > 0) {
c = a;
}
d = b;
Program Slicing excludes unrelated codes
to aid fault localization.
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Slice Calculation Process
Phase 1: Extraction of
dependence relations.
Data Dependence
1: a = 1;
2: c = 4;
3: b = a;
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
a
Control Dependence
4: if (a < 1) {
5:
b = a;
6: }
Program Dependence
Graph
slice criteria
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
ICSE 2003
Dependence-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 .
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Implementation 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.
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Aspect-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.
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Architecture and Use Case of ADAS
1.edit
program slice
slice
criteria
Dynamic
Java Source
Analysis
Aspect
4.slice calculation
Slice Calculation Tool
Static
Analyzer
Static
Info.
2.compile
AspectJ
Java
Bytecode
Java VM
3.execute
a test case
Dynamic
Info.
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Demonstration
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Remark 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.
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Java Program Analysis Projects in Osaka University:
Aspect-Based Slicing System ADAS
and
Ranked-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}@ist.osaka-u.ac.jp
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Reuse 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 doesn’t 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.
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Motivation 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.
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
SPARS
SPARS … Software Product Archiving, analyzing and
Retrieving System
Now, we are developing
In SPARS,
1.
2.
3.
for Java codes.
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.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
ICSE 2003
Structure of
Repository Construction Subsystem
Analyzer
Java
Source Files
Source Code
Repository
Ranker
Parser
Cluster
Repository
Query
Parser
Searcher
Browser
Word
Repository Component
Repository
Formatter
Retrieval Subsystem
Repository
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
ICSE 2003
Demonstration
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Summary 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
ICSE 2003
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University
Related documents