Multi-language synchronization

  • Authors:
  • Robert Ennals;David Gay

  • Affiliations:
  • Intel Research Berkeley, Berkeley, CA;Intel Research Berkeley, Berkeley, CA

  • Venue:
  • ESOP'07 Proceedings of the 16th European conference on Programming
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

We propose multi-language synchronization, a novel approach to the problem of migrating code from a legacy language (such as C) to a new language. We maintain two parallel versions of every source file, one in the legacy language, and one in the new language. Both of these files are fully editable, and the two files are kept automatically in sync so that they have the same semantic meaning and, where possible, have the same comments and layout. We propose non-deterministic language translation as a means to implement multi-language synchronization. If a file is modified in language A, we produce a new version in language B by translating the file into a non-deterministic description of many ways that it could be encoded in language B and then choosing the version that is closest to the old file in language B. To demonstrate the feasibility of this approach, we have implemented a translator that can synchronize files written in a straw-man language, Jekyll, with files written in C. Jekyll is a high level functional programming language that has many of the features found in modern programming languages.