Hostname: page-component-89b8bd64d-72crv Total loading time: 0 Render date: 2026-05-13T06:23:37.040Z Has data issue: false hasContentIssue false

Algebra of programming in Agda: Dependent types for relational program derivation

Published online by Cambridge University Press:  23 July 2009

SHIN-CHENG MU
Affiliation:
Institute of Information Science, Academia Sinica, Taiwan (e-mail: scm@iis.sinica.edu.tw)
HSIANG-SHANG KO
Affiliation:
Department of Computer Science and Information Engineering, National Taiwan University, Taiwan (e-mail: joshs@mail2000.com.tw)
PATRIK JANSSON
Affiliation:
Department of Computer Science and Engineering, Chalmers University of Technology, and University of Gothenburg, Sweden (e-mail: patrikj@chalmers.se)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

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, AoPA (Algebra of Programming in Agda), 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 in which well-founded recursion is used to model terminating hylomorphisms in a language with inductive types.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 2009
Submit a response

Discussions

No Discussions have been published for this article.