Information Technology Reference
In-Depth Information
(1)
method entry
public void m(){
(4)
potentially
recursive
call site
(3a)
x.m()
provably
non-recursive
call site
(3b)
y.n()
}
method exit
(2)
Fig. 4. Possible inter-procedural control-flows of a method [7]
v , v will definitely point to a different object during each method invocation
at runtime, which means that the shadow s and the configuration are actually
not compatible at runtime. After eliminating all the interferential configurations
from sources ( s )and futures ( s ), we use the remaining configurations to deter-
mine whether the shadow s is a “nop shadow” according to the conditions in
Section 2.
5 Experiments and Discussion
We have implemented our optimizations on the Clara framework [6] and con-
ducted experiments on the DaCapo benchmark suite [4]. NSA cannot support
multi-threaded programs. Hence, we ignore the multi-threaded programs hsqldb ,
lusearch and xalan in the benchmark. Our experiments are based on the experi-
ments of the original NSA in [7]. We are only interested in 23 property/program
combinations for each of which the original NSA cannot remove all the shadows.
These 23 combinations involve 8 typestate properties and 7 programs. Table 1
lists the typestate properties used in the experiments.
In order to make our experimental results more convincible, we also limit
the maximum number of configurations to be 15000, which is the same as that
of the original NSA in [7]. Once the number of configurations computed by our
optimized analysis is above the threshold, it will abort the analysis of the current
method and process the next one.
We evaluate our optimizations as follows: for each optimization, we carry out
original NSA first, then use the optimized NSA to further identify “nop shad-
ows”. This way of evaluation is different from using an optimized NSA directly.
Actually, according to our experimental results, under the same configuration
limit, using an optimized NSA after original NSA will have better results than
that of using the optimized NSA directly. The reason is that using each optimized
analysis directly generates more configurations than the original NSA.
Search WWH ::




Custom Search