Publicação

Correct translation of imperative programs to single assignment form

Ver documento

Detalhes bibliográficos
Resumo:A common practice in compiler design is to have an intermediate representation of the source code in Static Single-Assignment (SSA) form in order to simplify the code optimization process and make it more efficient. Generally, one says that an imperative program is in SSA form if each variable is assigned exactly once. In this thesis we study the central ideas of SSA-programs in the context of a simple imperative language including jump instructions. The focus of this work is the proof of correctness of a translation from programs of the source imperative language into the SSA format. In particular, we formally introduce the syntax and the semantics of the source imperative language (GL) and the SSA language; we define and implement a function that translates from source imperative programs into SSA-programs; we develop an alternative operational semantics, in order to be able to relate the execution of a source program and of its SSA translation; we prove soundness and completeness results for the translation, relatively to the alternative operational semantics, and from these results we prove correctness of the translation relatively to the initial small-step semantics.
Autores principais:Azevedo, Marta Vasconcelos Castro
Assunto:Engenharia e Tecnologia::Outras Engenharias e Tecnologias
Ano:2017
País:Portugal
Tipo de documento:dissertação de mestrado
Tipo de acesso:acesso aberto
Instituição associada:Universidade do Minho
Idioma:inglês
Origem:RepositóriUM - Universidade do Minho
Descrição
Resumo:A common practice in compiler design is to have an intermediate representation of the source code in Static Single-Assignment (SSA) form in order to simplify the code optimization process and make it more efficient. Generally, one says that an imperative program is in SSA form if each variable is assigned exactly once. In this thesis we study the central ideas of SSA-programs in the context of a simple imperative language including jump instructions. The focus of this work is the proof of correctness of a translation from programs of the source imperative language into the SSA format. In particular, we formally introduce the syntax and the semantics of the source imperative language (GL) and the SSA language; we define and implement a function that translates from source imperative programs into SSA-programs; we develop an alternative operational semantics, in order to be able to relate the execution of a source program and of its SSA translation; we prove soundness and completeness results for the translation, relatively to the alternative operational semantics, and from these results we prove correctness of the translation relatively to the initial small-step semantics.