A delta‐oriented approach to support the safe reuse of black‐box code rewriters

Abstract : Large-scale corrective and perfective maintenance is often automated thanks to rewriting rules using tools such as Python2to3, Spoon or Coccinelle. Such tools consider these rules as black-boxes and compose multiple rules by chaining them: giving the output of a given rewriting rule as input to the next one. It is up to the developer to identify the right order (if it exists) among all the different rules to yield the right program. In this paper, we define a formal model compatible with the black-box assumption that reifies the modifications (∆s) made by each rule. Leveraging these ∆s, we propose a way to safely compose multiple rules when applied to the same program by (i) ensuring the isolated application of the different rules and (ii) identifying unexpected behaviors that were silently ignored before. We assess this approach on two large-scale case studies: (i) identifying conflicts in the Linux source-code automated maintenance and (ii) fixing energy anti-patterns existing in Android applications available on GitHub.
Document type :
Journal articles
Complete list of metadatas

Cited literature [34 references]  Display  Hide  Download

https://hal.inria.fr/hal-02288872
Contributor : Benjamin Benni <>
Submitted on : Monday, September 16, 2019 - 10:33:17 AM
Last modification on : Tuesday, September 17, 2019 - 1:17:55 AM

File

fix-interferences.pdf
Files produced by the author(s)

Identifiers

Collections

Citation

Benjamin Benni, Sébastien Mosser, Naouel Moha, Michel Riveill. A delta‐oriented approach to support the safe reuse of black‐box code rewriters. Journal of Software: Evolution and Process, John Wiley & Sons, Ltd., 2019, 31 (8), ⟨10.1002/smr.2208⟩. ⟨hal-02288872⟩

Share

Metrics

Record views

28

Files downloads

137