Theory of Computing Systems

, Volume 43, Issue 3–4, pp 362–393 | Cite as

Datatype-Generic Termination Proofs

Article
  • 42 Downloads

Abstract

Datatype-generic programs are programs that are parameterised by a datatype. We review the allegorical foundations of a methodology of designing datatype-generic programs. The notion of F-reductivity, where F parametrises a datatype, is reviewed and a number of its properties are presented. The properties are used to give concise, effective proofs of termination of a number of datatype-generic programming schemas. The paper concludes with a concise proof of the well-foundedness of a datatype-generic occurs-in relation.

Keywords

Datatype Generic programming Relation algebra Allegory Programming methodology 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Backhouse, R.C.: Naturality of homomorphisms. In: International Summer School on Constructive Algorithmics, Lecture Notes, vol. 3 (1989) http://www.cs.uu.nl/wiki/Swiestra/StopProject
  2. 2.
    Backhouse, R.C., de Bruin, P., Malcolm, G., Voermans, T.S., van der Woude, J.: Relational catamorphisms. In: Möller, B. (ed.) Proceedings of the IFIP TC2/WG2.1 Working Conference on Constructing Programs from Specifications, pp. 287–318. Elsevier Science, Amsterdam (1991) Google Scholar
  3. 3.
    Backhouse, R.C., de Bruin, P., Hoogendijk, P., Malcolm, G., Voermans, T.S., van der Woude, J.: Polynomial relators. In: Nivat, M., Rattray, C.S., Rus, T., Scollo, G. (eds.) Proceedings of the 2nd Conference on Algebraic Methodology and Software Technology, AMAST’91. Workshops in Computing, pp. 303–326. Springer, Berlin (1992) Google Scholar
  4. 4.
    Backhouse, R., Hoogendijk, P.: Final dialgebras: from categories to allegories. Theor. Inform. Appl. 33(4/5), 401–426 (1999) MATHCrossRefMathSciNetGoogle Scholar
  5. 5.
    Backhouse, R., Jansson, P., Jeuring, J., Meertens, L.: Generic programming. An introduction. In: Swierstra, S.D. (ed.) 3rd International Summer School on Advanced Functional Programming, Braga, Portugal, 12–19 September 1998. Lecture Notes in Computer Science, vol. 1608, pp. 28–115. Springer, Berlin (1999) Google Scholar
  6. 6.
    Backhouse, R.C., van der Woude, J.: Demonic operators and monotype factors. Math. Struct. Comput. Sci. 3(4), 417–433 (1993) MATHCrossRefGoogle Scholar
  7. 7.
    Bird, R.S., de Moor, O.: Algebra of Programming. Prentice-Hall, Englewood Cliffs (1996) Google Scholar
  8. 8.
    Doornbos, H.: Reductivity arguments and program construction. Ph.D. thesis, Department of Mathematics and Computing Science, Eindhoven University of Technology (June 1996) Google Scholar
  9. 9.
    Doornbos, H., Backhouse, R.: Induction and recursion on datatypes. In: Möller, B. (ed.) Mathematics of Program Construction, 3rd International Conference. Lecture Notes in Computer Science, vol. 947, pp. 242–256. Springer, Berlin (1995) Google Scholar
  10. 10.
    Doornbos, H., Backhouse, R.C., van der Woude, J.: A calculational approach to mathematical induction. Theor. Comput. Sci. 179, 103–135 (1997) MATHCrossRefGoogle Scholar
  11. 11.
    Doornbos, H., Backhouse, R.: Reductivity. Sci. Comput. Program. 26(1–3), 217–236 (1996) MATHCrossRefMathSciNetGoogle Scholar
  12. 12.
    Fokkinga, M.M.: Law and order in algorithmics. Ph.D. thesis, Universiteit Twente, The Netherlands (1992) Google Scholar
  13. 13.
    Freyd, P.: Algebraically complete categories. In: Rosolini, G., Carboni, A., Pedicchio, M.C. (eds.) Category Theory, Proceedings of COMO 1990. Lecture Notes in Mathematics, vol. 1488, pp. 95–104. Springer, New York (1990) Google Scholar
  14. 14.
    Freyd, P.J., Ščedrov, A.: Categories, Allegories. North-Holland, Amsterdam (1990) MATHGoogle Scholar
  15. 15.
    Gibbons, J.: Patterns in datatype-generic programming. In: Striegnitz, J., Davis, K. (eds.) First International Workshop on Declarative Programming in the Context of Object-Oriented Languages (DPCOOL). Multiparadigm Programming, vol. 27. John von Neumann Institute for Computing (NIC) (2003) Google Scholar
  16. 16.
    Hinze, R.: Polytypic values possess polykinded types. Sci. Comput. Program. 43(2–3), 129–159 (2002) MATHCrossRefMathSciNetGoogle Scholar
  17. 17.
    Hinze, R., Jeuring, J., Löh, A.: Type-indexed data types. Sci. Comput. Program. 51(1/2), 117–151 (2004) MATHCrossRefGoogle Scholar
  18. 18.
    Hoare, C.A.R., He, J.: The weakest prespecification. Fundamenta Informaticae 9, 51–84 (1986). 217–252 MATHMathSciNetGoogle Scholar
  19. 19.
    Hoogendijk, P.: A generic theory of datatypes. Ph.D. thesis, Department of Mathematics and Computing Science, Eindhoven University of Technology (1997) Google Scholar
  20. 20.
    Hoogendijk, P., de Moor, O.: Container types categorically. J. Funct. Program. 10(2), 191–225 (2000) MATHCrossRefGoogle Scholar
  21. 21.
    Jansson, P., Jeuring, J.: PolyP—a polytypic programming language extension. In: POPL ’97: the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pp. 470–482. ACM, New York (1997) CrossRefGoogle Scholar
  22. 22.
    Jansson, P., Jeuring, J.: Functional pearl: Polytypic unification. J. Funct. Program. 8(5), 527–536 (1998) MATHCrossRefMathSciNetGoogle Scholar
  23. 23.
    Jeuring, J., Jansson, P.: Polytypic programming. In: Launchbury, J., Meijer, E., Sheard, T. (eds.) Proceedings of the Second International Summer School on Advanced Functional Programming Techniques. Lecture Notes in Computer Science, vol. 1129, pp. 68–114. Springer, Berlin (1996) Google Scholar
  24. 24.
    Löh, A., Clarke, D., Jeuring, J.: Dependency-style generic Haskell. In: Shivers, O. (ed.) Proceedings of the International Conference, ICFP’03, pp. 141–152. ACM, New York (2003) Google Scholar
  25. 25.
    Malcolm, G.: Algebraic data types and program transformation. Ph.D. thesis, Groningen University (1990) Google Scholar
  26. 26.
    Malcolm, G.: Data structures and program transformation. Sci. Comput. Program. 14(2–3), 255–280 (1990) MATHCrossRefMathSciNetGoogle Scholar
  27. 27.
    Mathematics of Program Construction Group, Eindhoven University of Technology: Fixed point calculus. Inf. Proc. Lett. 53(3), 131–136 (1995) CrossRefGoogle Scholar
  28. 28.
    Meertens, L.: Paramorphisms. Formal Aspects Comput. 4(5), 413–424 (1992) MATHCrossRefGoogle Scholar
  29. 29.
    Meijer, E., Fokkinga, M., Paterson, R.: Functional programming with bananas, lenses, envelopes and barbed wire. In: FPCA ’91: Functional Programming Languages and Computer Architecture. Lecture Notes in Computer Science, vol. 523, pp. 124–144. Springer, Berlin (1991) Google Scholar
  30. 30.
    Meijer, E.: Calculating compilers. Ph.D. thesis, University of Nijmegen (1992) Google Scholar
  31. 31.
    Moggi, E.: Notions of computation and monads. Inf. Comput. 93(1), 55–92 (1991) MATHCrossRefMathSciNetGoogle Scholar
  32. 32.
    Reynolds, J.C.: Types, abstraction and parametric polymorphism. In: Mason, R.E. (ed.) IFIP ’83, pp. 513–523. Elsevier Science, Amsterdam (1983) Google Scholar
  33. 33.
    Wadler, P.: Theorems for free!. In: 4th Symposium on Functional Programming Languages and Computer Architecture. ACM, London (1989) Google Scholar

Copyright information

© Springer Science+Business Media, LLC 2007

Authors and Affiliations

  1. 1.School of Computer Science and Information TechnologyUniversity of NottinghamNottinghamUK
  2. 2.QuestanceGroningenThe Netherlands

Personalised recommendations