Interfaces as Games, Programs as Strategies

  • Markus Michelbrink
Part of the Lecture Notes in Computer Science book series (LNCS, volume 3839)


Peter Hancock and Anton Setzer developed the notion of interface to introduce interactive programming into dependent type theory. We generalise their notion and get an even simpler definition for interfaces. With this definition the relationship of interfaces to games becomes apparent. In fact from a game theoretical point of view interfaces are nothing other than special games. Programs are strategies for these games. There is an obvious notion of refinement which coincides exactly with the intuition. Interfaces together with the re.nement relation build a complete lattice. We can define several operators on interfaces: tensor, par, choice, bang etc. Every notion has a dual notion by interchanging the viewpoint of player and opponent. Identifying strategies by some kind of behavioural equivalence we conjecture to receive a linear category. All results so far can be achieved in intensional Martin-Löf Type Theory and are verified in the theorem prover Agda (with the exception of associativity of composition which is only proved on paper until now).


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abbott, M., Altenkirch, T., Ghani, N.: Categories of Containers. In: Gordon, A.D. (ed.) FOSSACS 2003. LNCS, vol. 2620, pp. 23–38. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  2. 2.
    Abbott, M., Altenkirch, T., Ghani, N., McBride, C.: Derivatives of Containers. In: Hofmann, M.O. (ed.) TLCA 2003. LNCS, vol. 2701, pp. 16–30. Springer, Heidelberg (2003)CrossRefGoogle Scholar
  3. 3.
    Abbott, M., Altenkirch, T., Ghani, N., McBride, C.: \(\partial\) for data. Fundamenta Informatica 65(1-2) (2005)Google Scholar
  4. 4.
    Abbott, M.G.: Categories of Containers. PhD thesis, University of Leicester (2003)Google Scholar
  5. 5.
    Abramsky, S.: Semantics of Interaction: an introduction to Game Semantics. In: Dybjer, P., Pitts, A. (eds.) Proceedings of the 1996 CLiCS Summer School, pp. 1–31. Cambridge University Press, Cambridge (1997)Google Scholar
  6. 6.
    Chakrabarti, A., de Alfaro, L., Henzinger, T.A., Jurdziński, M., Mang, F.Y.C.: Interface Compatibility Checking for Software Modules. In: Brinksma, E., Larsen, K.G. (eds.) CAV 2002. LNCS, vol. 2404, pp. 428–441. Springer, Heidelberg (2002)CrossRefGoogle Scholar
  7. 7.
    Hancock, P., Hyvernat, P.: Programming interfaces and basic topology. In: Proceedings of the second workshop of Formal Topology. Annals of Pure and Applied Logic (2004) (to appear)Google Scholar
  8. 8.
    Hancock, P., Setzer, A.: Interactive programs in dependent type theory. In: Clote, P.G., Schwichtenberg, H. (eds.) CSL 2000. LNCS, vol. 1862, pp. 317–331. Springer, Heidelberg (2000)CrossRefGoogle Scholar
  9. 9.
    Hancock, P., Setzer, A.: Specifying interactions with dependent types. In: Workshop on subtyping and dependent types in programming, Portugal, July 7 (2000); Electronic proceedingsGoogle Scholar
  10. 10.
    Hancock, P., Setzer, A.: Guarded induction and weakly final coalgebras in dependent type theory (extended version). In: Altenkirch, T., Hofmann, M., Hughes, J. (eds.) Dependently typed programming. Dagstuhl Seminar Proceedings 04381, Dagstuhl, Germany (2005)Google Scholar
  11. 11.
    Hancock, P., Setzer, A.: Interactive programs and weakly final coalgebras in dependent type theory. In: Crosilla, L., Schuster, P. (eds.) From sets and types to topology and analysis: Towards practicable foundations for constructive mathematics. Oxford Logic Guides, pp. 115–136. Oxford University Press, Oxford (2005)Google Scholar
  12. 12.
    Huet, G.: The zipper. Journal of Functional Programming 7(5), 549–554 (1997)zbMATHCrossRefMathSciNetGoogle Scholar
  13. 13.
    Hyland, M.: Game Semantics. In: Dybjer, P., Pitts, A. (eds.) Proceedings of the 1996 CLiCS Summer School, pp. 131–184. Cambridge University Press, Cambridge (1997)Google Scholar
  14. 14.
    Hyvernat, P.: Predicate transformers and linear logic: yet another denotational model. In: Marcinkowski, J., Tarlecki, A. (eds.) CSL 2004. LNCS, vol. 3210, pp. 115–129. Springer, Heidelberg (2004)CrossRefGoogle Scholar
  15. 15.
    Hyvernat, P.: Synchronous Games, Simulations and λ-calculus. In: Ghica, D.R., McCusker, G. (eds.) Games for Logic and Programming Languages, GaLoP (ETAPS 2005), April 2005, pp. 1–15 (2005)Google Scholar
  16. 16.
    Lamport, L.: Proving the correctness of multiprocess programs. IEEE Transactions on Software Engineering 3(2), 125–143 (1977)CrossRefMathSciNetGoogle Scholar
  17. 17.
    Michelbrink, M.: A generalisation of Hancock-Setzer Interfaces. Draft (2005), Available via,
  18. 18.
    Michelbrink, M.: Interfaces as functors, programs as coalgebras - a final coalgebra theorem in intensional type theory (2005) (submitted), Available via,
  19. 19.
    Michelbrink, M., Setzer, A.: State-dependent IO-monads in type theory. In: Birkedal, L. (ed.) Proceedings of the 10th Conference on Category Theory in Computer Science (CTCS 2004). Electronic Notes in Theoretical Computer Science, vol. 122, pp. 127–146. Elsevier, Amsterdam (2005)Google Scholar
  20. 20.
    Sambin, G.: The Basic Picture, a structure for topology (the Basic Picture, I) (2001)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Markus Michelbrink
    • 1
  1. 1.Department of Computer ScienceUniversity of Wales SwanseaSwanseaUnited Kingdom

Personalised recommendations