A New Paradigm for Component-based Development

Hancock and Setzer describe how Haskell’s monolithic IO monad can be decomposed into worlds when working in a dependently typed language, like Martin-Lof’s type theory. This paper introduces the notion of world map and shows that worlds and world maps form a category with arbitrary products. The construction of the category is carried out entirely in type theory and directly implementable in dependently typed programming languages. If we let the notion of world replace the standard notion of interface, and the notion of world map replace the standard notion of component, we get a rigorous paradigm for component- based development. This new paradigm is investigated and several applications are given. For example, the problem of session state is given a very clean solution.

[1]  Christoph Lüth,et al.  Composing monads using coproducts , 2002, ICFP '02.

[2]  B. Russell Mathematical Logic as Based on the Theory of Types , 1908 .

[3]  Roger M. Needham,et al.  On the duality of operating system structures , 1979, OPSR.

[4]  Tarmo Uustalu,et al.  Coproducts of Ideal Monads , 2004, RAIRO Theor. Informatics Appl..

[5]  Wouter Swierstra,et al.  Data types à la carte , 2008, Journal of Functional Programming.

[6]  Thorsten Altenkirch,et al.  Containers: Constructing strictly positive types , 2005, Theor. Comput. Sci..

[7]  Peter Dybjer,et al.  Inductive families , 2005, Formal Aspects of Computing.

[8]  Peter Dybjer,et al.  The Interpretation of Intuitionistic Type Theory in Locally Cartesian Closed Categories - an Intuitionistic Perspective , 2008, MFPS.

[9]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[10]  John W. Backus,et al.  Can programming be liberated from the von Neumann style?: a functional style and its algebra of programs , 1978, CACM.

[11]  Paul F. Hoogendijk,et al.  Container types categorically , 2000, Journal of Functional Programming.

[12]  Mary Shaw,et al.  An Introduction to Software Architecture , 1993, Advances in Software Engineering and Knowledge Engineering.

[13]  Per Martin-Löf,et al.  Intuitionistic type theory , 1984, Studies in proof theory.

[14]  Per Martin-Löf,et al.  Constructive mathematics and computer programming , 1984 .

[15]  D. A. Turner,et al.  Elementary Strong Functional Programming , 1995, FPLE.

[16]  Peter Hancock,et al.  Interactive Programs in Dependent Type Theory , 2000, CSL.

[17]  Luís Soares Barbosa,et al.  Components as coalgebras , 2001 .

[18]  Simon L. Peyton Jones,et al.  A history of Haskell: being lazy with class , 2007, HOPL.

[19]  Thorsten Altenkirch,et al.  Foundations of Software Science and Computation Structures: 6th International Conference, FOSSACS 2003 Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2003 Warsaw, Poland, April 7–11, 2003 Proceedings , 2003, Lecture Notes in Computer Science.