Publicação

Automatic conversion of ADA source code to scala

Ver documento

Detalhes bibliográficos
Resumo:When the popularity of a programming language declines, there are often sizeable existing legacy codebases that need to be modernized. However, migrating off of these legacy languages is very costly. In addition, these declining languages do not necessarily have the same feature set as a modern language. As such, there are often specific features only present in the legacy language, which are useful for a variety of applications, making it hard for modern languages to penetrate these domains. This thesis presents a study of how these advanced features in legacy programming languages can be implemented in modern languages. As a use case, we will consider Ada, a language which is declining in popularity, and we evaluate which modern languages can adequately express Ada’s features. We select Scala as the most suitable language, due to its advanced type system, macro capabilities, implicit functions and constructors, and operator overloading. In addition, we present a set of translation rules from Ada to Scala, which was implemented in an automatic translation tool. Previous work on this domain tends to focus either on semantic correctness or on readability, eschewing one for the other, rather than tackling both at the same time. However, by carefully picking a target language with enough features that lend themselves for this kind of translation, we achieve a result that preserves both semantics and similarity, while maintaining an acceptable level of readability. We expect that this result to reduce the time and monetary cost of migrating off these legacy platforms, thereby making automated conversion of large software systems more viable.
Autores principais:Espada, Guilherme Jorge Nunes Monteiro
Assunto:Compiladores Linguagens de Programação Concurrencia Engenharia de Software Confiabilidade de Software Teses de mestrado - 2020
Ano:2020
País:Portugal
Tipo de documento:dissertação de mestrado
Tipo de acesso:acesso aberto
Instituição associada:Universidade de Lisboa
Idioma:inglês
Origem:Repositório da Universidade de Lisboa
Descrição
Resumo:When the popularity of a programming language declines, there are often sizeable existing legacy codebases that need to be modernized. However, migrating off of these legacy languages is very costly. In addition, these declining languages do not necessarily have the same feature set as a modern language. As such, there are often specific features only present in the legacy language, which are useful for a variety of applications, making it hard for modern languages to penetrate these domains. This thesis presents a study of how these advanced features in legacy programming languages can be implemented in modern languages. As a use case, we will consider Ada, a language which is declining in popularity, and we evaluate which modern languages can adequately express Ada’s features. We select Scala as the most suitable language, due to its advanced type system, macro capabilities, implicit functions and constructors, and operator overloading. In addition, we present a set of translation rules from Ada to Scala, which was implemented in an automatic translation tool. Previous work on this domain tends to focus either on semantic correctness or on readability, eschewing one for the other, rather than tackling both at the same time. However, by carefully picking a target language with enough features that lend themselves for this kind of translation, we achieve a result that preserves both semantics and similarity, while maintaining an acceptable level of readability. We expect that this result to reduce the time and monetary cost of migrating off these legacy platforms, thereby making automated conversion of large software systems more viable.