Skip to main content

Algebra of Programming Using Dependent Types

  • Conference paper

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 5133))

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Altenkirch, T., McBride, C., McKinna, J.: Why dependent types matter. Draft (2005)

    Google Scholar 

  2. Augustsson, L.: Cayenne – a language with dependent types. In: ICFP 1998, pp. 239–250 (1998)

    Google Scholar 

  3. Augustsson, L.: Equality proofs in Cayenne. Chalmers Univ. of Tech. (1999)

    Google Scholar 

  4. Backhouse, R.C., et al.: Relational catamorphisms. In: IFIP TC2/WG2.1 Working Conference on Constructing Programs, pp. 287–318. Elsevier, Amsterdam (1991)

    Google Scholar 

  5. 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)

    Google Scholar 

  6. Bird, R.S.: Algebraic identities for program calculation. Computer Journal 32(2), 122–126 (1989)

    Article  MathSciNet  Google Scholar 

  7. Bird, R.S.: Functional algorithm design. Science of Computer Programming 26, 15–31 (1996)

    Article  MATH  MathSciNet  Google Scholar 

  8. Bird, R.S., de Moor, O.: Algebra of Programming. International Series in Computer Science. Prentice-Hall, Englewood Cliffs (1997)

    MATH  Google Scholar 

  9. Cheney, J., Hinze, R.: First-class phantom types. Technical Report TR2003-1901, Cornell University (2003)

    Google Scholar 

  10. The Coq Development Team, LogiCal Project. The Coq Proof Assistant Reference Manual (2006)

    Google Scholar 

  11. de Moor, O., Sittampalam, G.: Higher-order matching for program transformation. Theoretical Computer Science 269(1-2), 135–162 (2001)

    Article  MATH  MathSciNet  Google Scholar 

  12. Dybjer, P.: Inductive families. Formal Aspects of Computing, 440–465 (1994)

    Google Scholar 

  13. Gonzalía, C.: Relations in Dependent Type Theory. PhD thesis, Chalmers Univ. of Tech. (2006)

    Google Scholar 

  14. McBride, C., McKinna, J.: The view from the left. Journal of Functional Programming 14(1), 69–111 (2004)

    Article  MATH  MathSciNet  Google Scholar 

  15. 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)

    Google Scholar 

  16. Mu, S.-C., Ko, H.-S., Jansson, P.: AoPA: Algebra of programming in Agda, http://www.iis.sinica.edu.tw/~scm/2008/aopa/

  17. Norell, U.: Towards a Practical Programming Language Based on Dependent Type Theory. PhD thesis, Chalmers Univ. of Tech. (2007)

    Google Scholar 

  18. Paulin-Mohring, C.: Extracting F ω ’s programs from proofs in the Calculus of Constructions. In: POPL 1989, Austin. ACM Press, New York (1989)

    Google Scholar 

  19. Sheard, T.: Programming in Ωmega. The 2nd Central European Functional Programming School (June 2007)

    Google Scholar 

  20. Sweeney, T.: The next mainstream programming language: a game developer’s perspective. In: POPL 2006 (January 2006) (invited talk)

    Google Scholar 

  21. The Agda Team. The Agda Wiki (2007), http://www.cs.chalmers.se/~ulfn/Agda/

  22. Verhoeven, R., Backhouse, R.C.: Towards tool support for program verification and construction. In: World Congress on Formal Methods, pp. 1128–1146 (1999)

    Google Scholar 

  23. Xi, H.: Dependent ML: an approach to practical programming with dependent types. Journal of Functional Programming 17(2), 215–286 (2007)

    Article  MATH  Google Scholar 

  24. 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)

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Philippe Audebaud Christine Paulin-Mohring

Rights and permissions

Reprints 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)

Publish with us

Policies and ethics