Information Technology Reference
In-Depth Information
hold. Once a check fails, the repair routine is triggered. Our repair algorithm (shown as
a Java like pseudo code in Listing 1.3) has three major phases:
1. DREAM tries previously abstracted repair actions to see if a fix can be found with-
out calling the repair routine of the underlying repair framework.
2. If the previous phase does not generate an acceptable fix, the repair routine of the
underlying repair framework is called.
3. The concrete repair actions taken by the underlying repair framework are abstracted
out and saved as possible repair candidates for future.
To illustrate, consider the execution of
Listing 1.1. The very first time this ex-
ecution causes a failure, no previous re-
pair abstraction is available (in Listing 1.3,
abstractRepairCandidateSets is
empty). Therefore, the first phase (Lines 3
to 19 of Listing 1.3) is skipped. Line 20
performs the second phase and calls the
underlying repair framework, which repairs
the data structure by setting N 1 .next =
null . This concrete action is abstracted in
the third phase by Lines 21 to 23 to be saved
as [LAST NODE](in post-state).next = null . More details about the ab-
straction process will follow in Section 3.1.
The next time an error is observed in the data structure, DREAM attempts to reuse
previous repair actions to avoid the prohibitively costly repair routine of the underlying
repair framework. Let us say that we have Fig. 1 (b) this time. Lines 3 to 19 imple-
ment the first phase of DREAM. They examine candidate sets of abstract repair actions.
Firstly, DREAM concretizes each abstract action on the current data structure. An ab-
stract action (like [LAST NODE](in post-state).next = null ) contains a
left hand side dereferencing list ( [LAST NODE] in this example), a field on which
the assignment should be applied (here next ), and a right hand side dereferencing
list (here null ). Such dereferencing lists are abstracted forms of actual dereferenc-
ing lists that were used in concrete repair actions and may contain abstract fields (e.g.,
[LAST NODE] )aswellasconcretefields(e.g., next ). In the concretization process,
which is the reverse process of abstraction (Section 3.1), abstract fields are translated
back into sequences of concrete data structure fields. (Here the left hand side derefer-
encing list would become header.next....next
Java Program
DREAM
Underlying Repair Framework
Java Virtual Machine
Fig. 2. The relationship between DREAM,
the underlying repair framework, the Java
Virtual Machine, and the program
.)
500 times
Secondly, the concretized lists are then applied on the input or the faulty output to
identify the target object on which the assignment should take place, the target field, and
the target value (e.g., header.next....next
gives N 500 ). DREAM can utilize either the
500 times
input or the faulty output for concretizing abstract actions and identifying target objects
by using baseObject and flags like derefLeftInOutput (see Section 3.1 for
more details).
 
Search WWH ::




Custom Search