Automating Program Transformation for Java Using Semantic Patches ; Automatisation de la transformation de programme pour Java à l’aide de correctifs sémantiques

Uloženo v:
Podrobná bibliografie
Název: Automating Program Transformation for Java Using Semantic Patches ; Automatisation de la transformation de programme pour Java à l’aide de correctifs sémantiques
Autoři: Kang, Hong Jin, Thung, Ferdian, Lawall, Julia, Muller, Gilles, Jiang, Lingxiao, Lo, David
Přispěvatelé: Singapore Management University (SIS), Singapore Management University, Well Honed Infrastructure Software for Programming Environments and Runtimes ( Whisper), Inria de Paris, Institut National de Recherche en Informatique et en Automatique (Inria)-Institut National de Recherche en Informatique et en Automatique (Inria)-LIP6, Sorbonne Université (SU)-Centre National de la Recherche Scientifique (CNRS)-Sorbonne Université (SU)-Centre National de la Recherche Scientifique (CNRS), Inria Paris, ANR-16-CE25-0012,ITrans,Inférence automatique de règles de transformation pour le portage des logiciels d'infrastructure patrimoniaux(2016)
Zdroj: https://hal.inria.fr/hal-02023368 ; [Research Report] RR-9256, Inria Paris. 2019.
Informace o vydavateli: HAL CCSD
Rok vydání: 2019
Sbírka: Archive ouverte HAL (Hyper Article en Ligne, CCSD - Centre pour la Communication Scientifique Directe)
Témata: Semantic patches, Automatic program transformation, Java, Correctifs sémantiques, Transformation automatique de programmes, [INFO.INFO-SE]Computer Science [cs]/Software Engineering [cs.SE], [INFO.INFO-OS]Computer Science [cs]/Operating Systems [cs.OS]
Popis: Developing software often requires code changes that are widespread and applied to multiple locations. There are tools for Java that allow developers to specify patterns for program matching and source-to-source transformation. However, to our knowledge, none allows for transforming code based on its control-flow context. We prototype Coccinelle4J, an extension to Coccinelle, which is a program transformation tool designed for widespread changes in C code, in order to work on Java source code. We adapt Coccinelle to be able to apply scripts written in the Semantic Patch Language (SmPL), a language provided by Coccinelle, to Java source files. As a case study, we demonstrate the utility of Coccinelle4J with the task of API migration. We show 6 semantic patches to migrate from deprecated Android API methods on several open source Android projects. We describe how SmPL can be used to express several API migrations and justify several of our design decisions.
Druh dokumentu: report
Jazyk: English
Relation: Report N°: RR-9256; hal-02023368; https://hal.inria.fr/hal-02023368; https://hal.inria.fr/hal-02023368/document; https://hal.inria.fr/hal-02023368/file/RR-9256.pdf
Dostupnost: https://hal.inria.fr/hal-02023368
https://hal.inria.fr/hal-02023368/document
https://hal.inria.fr/hal-02023368/file/RR-9256.pdf
Rights: info:eu-repo/semantics/OpenAccess
Přístupové číslo: edsbas.7E093C64
Databáze: BASE
Popis
Abstrakt:Developing software often requires code changes that are widespread and applied to multiple locations. There are tools for Java that allow developers to specify patterns for program matching and source-to-source transformation. However, to our knowledge, none allows for transforming code based on its control-flow context. We prototype Coccinelle4J, an extension to Coccinelle, which is a program transformation tool designed for widespread changes in C code, in order to work on Java source code. We adapt Coccinelle to be able to apply scripts written in the Semantic Patch Language (SmPL), a language provided by Coccinelle, to Java source files. As a case study, we demonstrate the utility of Coccinelle4J with the task of API migration. We show 6 semantic patches to migrate from deprecated Android API methods on several open source Android projects. We describe how SmPL can be used to express several API migrations and justify several of our design decisions.