Abstract
Dependent type theory is rich enough to express that a program satisfies an input/output relational specification, but it could be hard to construct the proof term. On the other hand, squiggolists know very well how to show that one relation is included in another by algebraic reasoning. We demonstrate how to encode functional and relational derivations in a dependently typed programming language. A program is coupled with an algebraic derivation from a specification, whose correctness is guaranteed by the type system.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
References
Altenkirch, T., McBride, C., McKinna, J.: Why dependent types matter. Draft (2005)
Augustsson, L.: Cayenne – a language with dependent types. In: ICFP 1998, pp. 239–250 (1998)
Augustsson, L.: Equality proofs in Cayenne. Chalmers Univ. of Tech. (1999)
Backhouse, R.C., et al.: Relational catamorphisms. In: IFIP TC2/WG2.1 Working Conference on Constructing Programs, pp. 287–318. Elsevier, Amsterdam (1991)
Backhouse, R.C., Hoogendijk, P.F.: Elements of a relational theory of datatypes. In: Möller, B., Schuman, S., Partsch, H. (eds.) Formal Program Development. LNCS, vol. 755, pp. 7–42. Springer, Heidelberg (1993)
Bird, R.S.: Algebraic identities for program calculation. Computer Journal 32(2), 122–126 (1989)
Bird, R.S.: Functional algorithm design. Science of Computer Programming 26, 15–31 (1996)
Bird, R.S., de Moor, O.: Algebra of Programming. International Series in Computer Science. Prentice-Hall, Englewood Cliffs (1997)
Cheney, J., Hinze, R.: First-class phantom types. Technical Report TR2003-1901, Cornell University (2003)
The Coq Development Team, LogiCal Project. The Coq Proof Assistant Reference Manual (2006)
de Moor, O., Sittampalam, G.: Higher-order matching for program transformation. Theoretical Computer Science 269(1-2), 135–162 (2001)
Dybjer, P.: Inductive families. Formal Aspects of Computing, 440–465 (1994)
Gonzalía, C.: Relations in Dependent Type Theory. PhD thesis, Chalmers Univ. of Tech. (2006)
McBride, C., McKinna, J.: The view from the left. Journal of Functional Programming 14(1), 69–111 (2004)
McKinna, J., Burstall, R.M.: Deliverables: A categorial approach to program development in type theory. In: Borzyszkowski, A.M., Sokolowski, S. (eds.) MFCS 1993. LNCS, vol. 711, pp. 32–67. Springer, Heidelberg (1993)
Mu, S.-C., Ko, H.-S., Jansson, P.: AoPA: Algebra of programming in Agda, http://www.iis.sinica.edu.tw/~scm/2008/aopa/
Norell, U.: Towards a Practical Programming Language Based on Dependent Type Theory. PhD thesis, Chalmers Univ. of Tech. (2007)
Paulin-Mohring, C.: Extracting F ω ’s programs from proofs in the Calculus of Constructions. In: POPL 1989, Austin. ACM Press, New York (1989)
Sheard, T.: Programming in Ωmega. The 2nd Central European Functional Programming School (June 2007)
Sweeney, T.: The next mainstream programming language: a game developer’s perspective. In: POPL 2006 (January 2006) (invited talk)
The Agda Team. The Agda Wiki (2007), http://www.cs.chalmers.se/~ulfn/Agda/
Verhoeven, R., Backhouse, R.C.: Towards tool support for program verification and construction. In: World Congress on Formal Methods, pp. 1128–1146 (1999)
Xi, H.: Dependent ML: an approach to practical programming with dependent types. Journal of Functional Programming 17(2), 215–286 (2007)
Yokoyama, T., Hu, Z., Takeichi, M.: Yicho - a system for programming program calculations. In: The 3rd Asian Workshop on Programming Languages and Systems (APLAS 2002), pp. 366–382 (2002)
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 2008 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Mu, SC., Ko, HS., Jansson, P. (2008). Algebra of Programming Using Dependent Types. In: Audebaud, P., Paulin-Mohring, C. (eds) Mathematics of Program Construction. MPC 2008. Lecture Notes in Computer Science, vol 5133. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-70594-9_15
Download citation
DOI: https://doi.org/10.1007/978-3-540-70594-9_15
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-70593-2
Online ISBN: 978-3-540-70594-9
eBook Packages: Computer ScienceComputer Science (R0)