Asserting the Correctness of Software Language Translations

Authors

  • Bruno Barroca Research Center for Informatics and Information Technologies (CITI) - Faculdade de Ciências e Tecnologia (FCT) at Universidade Nova de Lisboa (UNL)
  • Vasco Amaral Research Center for Informatics and Information Technologies (CITI) - Faculdade de Ciências e Tecnologia (FCT) at Universidade Nova de Lisboa (UNL)

DOI:

https://doi.org/10.14279/tuj.eceasst.50.710

Abstract

While building a new language, we assign its semantics by mapping its syntax onto a semantic domain. To do so, we can either (i) do it operationally, by means of small-step morphisms within the same semantic-domain; or (ii) by means of a translation (syntax-to-syntax transformation), onto a target language that has already an operational semantics defined. Despite the fact that it is possible to build the set of syntactic correspondences from a given translation, it is still not clear how we can assert about the correctness of these syntactic correspondences in w.r.t. both the source and target language's underlying semantics.
In this paper, we combine the above described techniques by analyzing the translation and establishing a semantic relation between the respective operational semantics, in order to assert the correctness of that translation. We demonstrate our approach with a concrete translation between two languages: State Machines and Petri Nets; and decide about its correctness by using their respective operational semantics as oracles. Finally, we discuss about the validity of our assertions in w.r.t. language translations in general.

Downloads

Published

2012-07-12