Strategies for testing and formalizing properties of modern programming languages

Detalhes bibliográficos
Ano de defesa: 2019
Autor(a) principal: Feitosa, Samuel da Silva
Orientador(a): Du Bois, André Rauber
Banca de defesa: Não Informado pela instituição
Tipo de documento: Tese
Tipo de acesso: Acesso aberto
Idioma: por
Instituição de defesa: Universidade Federal de Pelotas
Programa de Pós-Graduação: Programa de Pós-Graduação em Computação
Departamento: Centro de Desenvolvimento Tecnológico
País: Brasil
Palavras-chave em Português:
Área do conhecimento CNPq:
Link de acesso: http://guaiaca.ufpel.edu.br/handle/prefix/6280
Resumo: Today’s world is full of devices and machines controlled by software, which depend upon programming languages and compilers to be produced and executed. The importance of correct software development goes beyond personal computers and smartphone apps. An error in a critical system, such as on a nuclear power plant or on an airplane controller, can cause catastrophic damage in our society. Nowadays, essentially two software validation techniques are used to avoid such problems: software testing and software verification. In this thesis we combine both validation techniques in the programming languages research area, applying property-based testing first to improve specifications and debugging programs, before an attempt of formal verification. By using such testing approach we can quickly eliminate false conjectures, by using the generated counterexamples, which help to correct them. Then, having confidence that the specification is correct, one can give a step forward and formalize the specification and prove its properties in an interactive theorem prover, which uses a mathematical framework to guarantee that these properties hold for a given specification. We apply different strategies to test and formalize two major programming languages, the functional Lambda Calculus, and the modern object-oriented calculus Featherweight Java. The first branch of this thesis defines a type-directed procedure to generate random programs for each calculus in order to apply property-based testing to check soundness properties on them, using the Haskell library QuickCheck. And in the second branch, we apply the two most used approaches, extrinsic and intrinsic, to formalize and prove type safety for both studied programming languages using the dependently-typed programming language Agda, comparing the subtleties of each technique. Furthermore, we show that our formalizations can be extended to new language constructions, by specifying and proving the same properties for Java 8 constructions. We believe that this combination of property-based testing with formal verification can improve the quality of software in general and increase productivity during formal proof development.