Open Access. Powered by Scholars. Published by Universities.®

Physical Sciences and Mathematics Commons

Open Access. Powered by Scholars. Published by Universities.®

Research Collection School Of Computing and Information Systems

2019

Program transformation

Articles 1 - 3 of 3

Full-Text Articles in Physical Sciences and Mathematics

Towards Generating Transformation Rules Without Examples For Android Api Replacement, Ferdian Thung, Hong Jin Kang, Lingxiao Jiang, David Lo Oct 2019

Towards Generating Transformation Rules Without Examples For Android Api Replacement, Ferdian Thung, Hong Jin Kang, Lingxiao Jiang, David Lo

Research Collection School Of Computing and Information Systems

Deprecation of APIs in software libraries is common when library maintainers make changes to a library and will no longer support certain APIs in the future. When deprecation occurs, developers whose programs depend on the APIs need to replace the usages of the deprecated APIs sooner or later. Often times, software documentation specifies which new APIs the developers should use in place of a deprecated API. However, replacing the usages of a deprecated API remains a challenge since developers may not know exactly how to use the new APIs. The developers would first need to understand the API changes before …


Semantic Patches For Java Program Transformation, Hong Jin Kang, Ferdian Thung, Julia Lawall, Gilles Muller, Lingxiao Jiang, David Lo Jul 2019

Semantic Patches For Java Program Transformation, Hong Jin Kang, Ferdian Thung, Julia Lawall, Gilles Muller, Lingxiao Jiang, David Lo

Research Collection School Of Computing and Information Systems

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 …


Semantic Patches For Java Program Transformation (Artifact), Hong Jin Kang, Thung Ferdian, Julia Lawall, Gilles Muller, Lingxiao Jiang, David Lo Jul 2019

Semantic Patches For Java Program Transformation (Artifact), Hong Jin Kang, Thung Ferdian, Julia Lawall, Gilles Muller, Lingxiao Jiang, David Lo

Research Collection School Of Computing and Information Systems

The program transformation tool Coccinelle is designed for making changes that is required in many locations within a software project. It has been shown to be useful for C code and has been been adopted for use in the Linux kernel by many developers. Over 6000 commits mentioning the use of Coccinelle have been made in the Linux kernel. Our artifact, Coccinelle4J, is an extension to Coccinelle in order for it to apply program transformations to Java source code. This artifact accompanies our experience report “Semantic Patches for Java Program Transformation”, in which we show a case study of applying …