Algebra of Programming in Agda: Dependent Types for Relational Program Derivation

<p>Relational program derivation is the technique of stepwise refining a relational specification to a program by algebraic rules. The program thus obtained is correct by construction. Meanwhile, dependent type theory is rich enough to express various correctness properties to be verified by t...

ver descrição completa

Detalhes bibliográficos
Principais autores: Mu, S, Ko, H, Jansson, P
Formato: Journal article
Publicado em: 2009
Descrição
Resumo:<p>Relational program derivation is the technique of stepwise refining a relational specification to a program by algebraic rules. The program thus obtained is correct by construction. Meanwhile, dependent type theory is rich enough to express various correctness properties to be verified by the type checker. We have developed a library, <a href='\"http://www.iis.sinica.edu.tw/ scm/2008/aopa/\"'>AoPA</a>, to encode relational derivations in the dependently typed programming language Agda. A program is coupled with an algebraic derivation whose correctness is guaranteed by the type system. Two non-trivial examples are presented: an optimisation problem, and a derivation of quicksort where well-founded recursion is used to model terminating hylomorphisms in a language with inductive types.</p>