skip to main content
research-article
Open Access

Do-it-yourself type theory

Authors Info & Claims
Published:01 March 1989Publication History
Skip Abstract Section

Abstract

Abstract

This paper provides a tutorial introduction to a constructive theory of types based on, but incorporating some extensions to, that originally developed by Per Martin-Löf. The emphasis is on the relevance of the theory to the construction of computer programs and, in particular, on the formal relationship between program and data structure. Topics discussed include the principle of propositions as types, free types, congruence types, types with information loss and mutually recursive types. Several examples of program development within the theory are also discussed in detail.

References

  1. [All87] Allen, S.: A Non-Type-Theoretic Semantics for Type-Theoretic Language. PhD thesis, Cornell University, September 1987.Google ScholarGoogle Scholar
  2. [Bac86a] Backhouse, R. C.: Notes on Martin-Löf's Theory of Types, parts 1 and 2. In:FACS ACTS, British Computer Society, 1986.Google ScholarGoogle Scholar
  3. [Bac86b] Backhouse, R. C.:On the Meaning and Construction of the Rules in Martin-Löf's Theory of Types. Computing Science Notes CS 8606, Department of Mathematics and Computing Science, University of Groningen, 1986.Google ScholarGoogle Scholar
  4. [Bac86c] Backhouse, R. C.:Program Construction and Verification. Prentice-Hall International, 1986.Google ScholarGoogle Scholar
  5. [BoM79] Boyer, R. S. and Moore, J. S.:A Computational Logic. Academic Press, 1979.Google ScholarGoogle Scholar
  6. [BoM79] Boyer, R. S. and Moore, J. S.:MJRTY — A Fast Majority Vote Algorithm. Technical Report ICSCA-CMP-32, Institute for Computing Science and Computer Application, University of Texas at Austin, 1982.Google ScholarGoogle Scholar
  7. [Bru80] de Bruijn, N. G.: A Survey of the Project Automath. In:Essays in Combinatory Logic, Lambda Calculus, and Formalism, J. P. Seldin and J. R. Hindley, (eds.), pp. 589–606, Academic Press, 1980.Google ScholarGoogle Scholar
  8. [Chi87] Chisholm P.Derivation of a Parsing Algorithm in Martin-Löf's Theory of TypesScience of Computer Programming19878142Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. [Chi88] Chisholm P.Investigations into Martin-Löf Type Theory as a Programming LogicPhD thesis1988EdinburghDepartment of Computer Science, Heriot-Watt UniversityGoogle ScholarGoogle Scholar
  10. [Chu51] Church A.Annals of Mathematical Studies The Calculi of Lambda-Conversion. Vol. 61951PrincetonPrinceton University PressGoogle ScholarGoogle Scholar
  11. [ClP85] Cleaveland, R. and Panangaden, P.:Type Theory and Concurrency. Technical Report TR 85–714, Department of Computer Science, Cornell University, December 1985.Google ScholarGoogle Scholar
  12. [Con85] Constable R. L.Constructive Mathematics as a Programming Logic 1: Some Principles of TheoryAnnals of Discrete Mathematics1985242138Google ScholarGoogle Scholar
  13. [CKB85] Constable R. L.Knoblock T. B.Bates J. L.Writing Programs that Construct ProofsJournal of Automated Reasoning19851285326Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. [CoM85] Constable, R. L. and Mendler, N. P.: Recursive Definitions in Type Theory. In:Proc. Logics of Programs Conference, LNCS 193, pp. 61–78, Springer-Verlag, 1985.Google ScholarGoogle Scholar
  15. [CoS87] Constable, R. L. and Smith, S. F.: Partial Objects in Constructive Type Theory. In:Proc. IEEE Symp. on Logic in Computer Science, pp. 183–193, Computer Society Press of the IEEE, 1987.Google ScholarGoogle Scholar
  16. [Con86] Constable, R. L. et al.:Implementing Mathematics in the Nuprl Proof Development System. Prentice-Hall, 1986.Google ScholarGoogle Scholar
  17. [CoH85] Coquand, T. and Huet, G: Constructions: a Higher Order Proof System for Mechanizing Mathematics. In:Proc. of EUROCAL 85, Linz, Austria, April 1985.Google ScholarGoogle Scholar
  18. [CuF58] Curry, H. B. and Feys, R.:Combinatory Logic. Vol. 1. North-Holland, 1958.Google ScholarGoogle Scholar
  19. [DDH72] Dahl, O.-J., Dijkstra, E. W. and Hoare, C. A. R.:Structured Programming. Academic Press, 1972.Google ScholarGoogle Scholar
  20. [Dij76] Dijkstra, E. W.:A Discipline of Programming. Prentice-Hall, 1976.Google ScholarGoogle Scholar
  21. [DiF84] Dijkstra, E. W. and Feijen, W. H.-J.:Een Methode van Programmeren. Academic Service, 1984. Now available asA Method of Programming, Addison-Wesley, 1988.Google ScholarGoogle Scholar
  22. [Dyb87] Dybjer, P.: Inductively Defined Sets in Martin-Löf's Set Theory. In:Workshop on General Logic, A. Avron, R. Harper, F. Honsell, I. Mason and G. Plotkin, (eds.), Report ECS-LFCS-88-52, Department of Computer Science, University of Edinburgh, February, 1987.Google ScholarGoogle Scholar
  23. [Dyc85] Dyckhoff, R.:Category Theory as an Extension of Martin-Löf Type Theory. Technical Report CS/86/3, Department of Computational Science, University of St. Andrews, 1985.Google ScholarGoogle Scholar
  24. [Gen69] Gentzen, G.: Investigations into Logical Deduction. In:The Collected Papers of Gerhard Gentzen, M. E. Szabo, (ed.), pp. 68–213, North-Holland, 1969.Google ScholarGoogle Scholar
  25. [Gli29] Glivenko V.Sur Quelques Points de la Logique de m. BrouwerBulletins de la classe des sciences192915183188Google ScholarGoogle Scholar
  26. [GMW79] Gordon, M. J., Milner, R. and Wadsworth, C. P.:Edinburgh LCF. Springer-Verlag, 1979.Google ScholarGoogle Scholar
  27. [Gri81] Gries, D.:The Science of Programming. Springer-Verlag, 1981.Google ScholarGoogle Scholar
  28. [HHP87] Harper, R., Honsell, F. A. and Plotkin, G.: A Framework for Defining Logics. In:Proc. Second Annual Conf. on Logic in Computer Science, Cornell, December 1987.Google ScholarGoogle Scholar
  29. [Heh84] Hehner, E. R. C.:The Logic of Programming. Prentice-Hall, 1984.Google ScholarGoogle Scholar
  30. [HMT88] Harper, R., Milner, R. and Tofte, M.:The Definition of Standard ML: Version 2. Report No. ECS-LFC-88-62, Laboratory for Foundations of Computer Science, University of Edinburgh, 1988.Google ScholarGoogle Scholar
  31. [Hoa72] Hoare, C. A. R.: Notes on Data Structuring. In:Structured Programming, O.-J. Dahl, E. W. Dijkstra and C. A. R. Hoare, (eds.), Academic Press, 1972.Google ScholarGoogle Scholar
  32. [How80] Howard, W. A.: The Formulas-as-Types Notion of Construction. In:To H. B. Curry: Essays on Combinatory Logic, Lambda Calculus, and Formalism, J. P. Seldin and J. R. Hindley, (eds.), pp. 479–490, Academic Press, 1980.Google ScholarGoogle Scholar
  33. [Hug84] Hughes, J.:Why Functional Programming Matters. Technical Report, Department of Computer Science, University of Göteborg/Chalmers, 1984.Google ScholarGoogle Scholar
  34. [Jac75] Jackson, M. A.:Principles of Program Design. Academic Press, 1975.Google ScholarGoogle Scholar
  35. [JeW75] Jensen, K. and Wirth, N.:PASCAL: User Manual and Report. Springer-Verlag, 1975.Google ScholarGoogle Scholar
  36. [Kle52] Kleene S. C.Introduction to Metamathematics1952AmsterdamNorth-HollandGoogle ScholarGoogle Scholar
  37. [KMP77] Knuth D. E.Morris J. H.Pratt V. R.Fast Pattern Matching in StringsSIAM Journal of Computing19776325350Google ScholarGoogle Scholar
  38. [LaS86] Lambek, J. and Scott, P. J.:Studies in Advanced Mathematics Vol 7, Introduction to Higher Order Categorical Logic. Cambridge University Press, 1986.Google ScholarGoogle Scholar
  39. [MaC88] Malcolm, G. R. and Chisholm, P.:Polymorphism and Information Loss in Martin-Löf's Type Theory. Report CS 8814, Department of Mathematics and Computing Science, University of Groningen, 1988.Google ScholarGoogle Scholar
  40. [Mar75] Martin-Löf, P.: An Intuitionistic Theory of Types: Predicative Part. In:Logic Colloquium 1973, H. E. Rose and J. C. Shepherdson (eds.), pp. 73–118, North-Holland, 1975.Google ScholarGoogle Scholar
  41. [Mar82] Martin-Löf, P.: Constructive Mathematics and Computer Programming. In:Logic, Methodology and Philosophy of Science, IV, L. J. Cohen, J. Los, H. Pfeiffer and K.-P. Podewski (eds.) pp. 153–175, North-Holland, 1982.Google ScholarGoogle Scholar
  42. [Mar84a] Martin-Löf, P.: Constructive Mathematics and Computer Programming. In:Mathematical Logic and Computer Programming, C. A. R. Hoare and J. C. Shepherdson (eds.), pp. 167–184, Prentice-Hall, 1984.Google ScholarGoogle Scholar
  43. [Mar84b] Martin-Löf, P.:Intuitionistic Type Theory. Bibliopolis, 1984. Notes by Giovanni Sambin of a series of lectures given in Padova.Google ScholarGoogle Scholar
  44. [Mee86] Meertens, L.: Algorithmics — Towards Programming as a Mathematical Activity. In:Proc. CWI Symp. on Mathematics and Computer Science, pp. 289–334, North-Holland, 1986.Google ScholarGoogle Scholar
  45. [Men87] Mendler, N. P.: Inductive Definitions in Type Theory. PhD thesis, Cornell University, September 1987.Google ScholarGoogle Scholar
  46. [Mil77] Milner R.A Theory of Type Polymorphism in ProgrammingJournal of Computer System Sciences197717348375Google ScholarGoogle ScholarCross RefCross Ref
  47. [MiG82] Misra J.Gries D.Finding Repeated ElementsScience of Computer Programming19822143152Google ScholarGoogle ScholarCross RefCross Ref
  48. [MiP85] Mitchell, J. and Plotkin, G.: Abstract Types have Existential Types. In:Proc. 12th ACM Symp. on Principles of Programming Languages, pp. 37–51, 1985.Google ScholarGoogle Scholar
  49. [Nor85] Nordström, B.: Multilevel Functions in Type Theory. In:Programs as Data Objects, N. Jones (ed.), Springer-Verlag, LNCS 217, 1985.Google ScholarGoogle Scholar
  50. [Nor87] Nordström, B.:Terminating General Recursion. Technical Report, Programming Methodology Group, University of Göteborg/Chalmers, September 1987.Google ScholarGoogle Scholar
  51. [NoP83] Nordström, B. and Petersson, K.: Types and Specifications. In:IFIP'83, R. E. Mason (ed.), pp. 915–920, Elsevier Science Publishers, 1983.Google ScholarGoogle Scholar
  52. [NoP85] Nordström, B. and Petersson, K.:The Semantics of Module Specifications in Martin-Löf's Type Theory. Technical Report 36, Programming Methodology Group, University of Göteborg/Chalmers, October 1985.Google ScholarGoogle Scholar
  53. [NPS86] Nordström, B., Petersson, K. and Smith, J.:An Introduction to Martin-Löf's Theory of Types. Technical Report, Programming Methodology Group, University of Göteborg/Chalmers, 1986.Google ScholarGoogle Scholar
  54. [Pau86] Paulson L. C.Constructing Recursion Operators in Intuitionistic Type TheoryJournal of Symbolic Computation19862325355Google ScholarGoogle ScholarDigital LibraryDigital Library
  55. [PeS87] Petersson, K. and Synek, D.,A Set Constructor for Trees in Intuitionistic Type Theory. Technical Report, Department of Computer Science, University of Göteborg/Chalmers, August 1987.Google ScholarGoogle Scholar
  56. [Pra79] Prawitz, D.: Proofs and the Meaning and Completeness of the Logical Constants. In:Essays on Mathematical and Philosophical Logic, J. Hintikka, I. Niiniluoto and E. Saarinen (eds.), pp. 25–40, Reidel, 1979.Google ScholarGoogle Scholar
  57. [Rey81] Reynolds, J. C.:The Craft of Programming. Prentice-Hall, 1981.Google ScholarGoogle Scholar
  58. [SaM87] Saaman, E. and Malcolm, G. R.:Well-founded Recursion in Type Theory. Computing Science Notes CS 8701, Department of Mathematics and Computer Science, University of Groningen, 1987.Google ScholarGoogle Scholar
  59. [Sch86] Schmidt, D.:Denotational Semantics: A Methodology for Language Development. Allyn and Bacon, 1986.Google ScholarGoogle Scholar
  60. [Sch84] Schröder-Heister, P.: A Natural Extension of Natural Deduction.The Journal of Symbolic Logic,49, 1984.Google ScholarGoogle Scholar
  61. [Smi87] Smith, J.: On a Nonconstructive Type Theory and Program Derivation. In:Mathematical Logic and its Applications, D. G. Skordev (ed.), pp. 331–340, Plenum Publishing Corporation, 1987.Google ScholarGoogle Scholar
  62. [Sto77] Stoy, J.:Denotational Semantics. The MIT Press, 1977.Google ScholarGoogle Scholar

Index Terms

  1. Do-it-yourself type theory
          Index terms have been assigned to the content through auto-classification.

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in

          Full Access

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader