Interactive Data Representation Migration: Exploiting Program Dependence to Aid Program Transformation

Abstract : Data representation migration is a program transformation that involves changing the type of a particular data structure, and then updating all of the operations that somehow depend on that data structure according to the new type. Changing the data representation can provide benefits such as improving efficiency and improving the quality of the computed results. Performing such a transformation is challenging, because it requires applying data-type specific changes to code fragments that may be widely scattered throughout the source code, connected by dataflow dependencies. Refactoring systems are typically sensitive to dataflow dependencies, but are not programmable with respect to the features of particular data types. Existing program transformation languages provide the needed flexibility, but do not concisely support reasoning about dataflow dependencies. To address the needs of data representation migration, we propose a new approach to program transformation that relies on a notion of semantic dependency: every transformation step propagates the transformation process onward to code that somehow depends on the transformed code. Our approach provides a declarative transformation-specification language, for expressing type-specific transformation rules. We further provide scoped rules, a mechanism for guiding rule application, and tags, a device for simple program analysis within our framework, to enable more powerful program transformations. We have implemented a prototype transformation system based on these ideas for C and C++ code and evaluate it against three example specifications, including vectorization, transformation of integers to big integers, and transformation of array-of-structures data types to structure-of-arrays format. Our evaluation shows that our approach can improve program performance and the precision of the computed results, and that it scales to programs of up to 3700 lines.
Type de document :
Communication dans un congrès
PEPM 2017 Workshop on Partial Evaluation and Program Manipulation, Jan 2017, Paris, France. 〈http://conf.researchr.org/track/pepm-2017/pepm-workshop〉
Liste complète des métadonnées

Littérature citée [19 références]  Voir  Masquer  Télécharger

https://hal.inria.fr/hal-01408266
Contributeur : Julia Lawall <>
Soumis le : vendredi 9 décembre 2016 - 18:06:33
Dernière modification le : vendredi 7 décembre 2018 - 01:23:49
Document(s) archivé(s) le : mardi 21 mars 2017 - 14:12:48

Fichier

paper.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

  • HAL Id : hal-01408266, version 1

Citation

Krishna Narasimhan, Christoph Reichenbach, Julia Lawall. Interactive Data Representation Migration: Exploiting Program Dependence to Aid Program Transformation. PEPM 2017 Workshop on Partial Evaluation and Program Manipulation, Jan 2017, Paris, France. 〈http://conf.researchr.org/track/pepm-2017/pepm-workshop〉. 〈hal-01408266〉

Partager

Métriques

Consultations de la notice

337

Téléchargements de fichiers

121