Skip to main content

Type Class Polymorphism in an Institutional Framework

  • Conference paper
Book cover Recent Trends in Algebraic Development Techniques (WADT 2004)

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

Included in the following conference series:

Abstract

Higher-order logic with shallow type class polymorphism is widely used as a specification formalism. Its polymorphic entities (types, operators, axioms) can easily be equipped with a ‘naive’ semantics defined in terms of collections of instances. However, this semantics has the unpleasant property that while model reduction preserves satisfaction of sentences, model expansion generally does not. In other words, unless further measures are taken, type class polymorphism fails to constitute a proper institution, being only a so-called rps preinstitution; this is unfortunate, as it means that one cannot use institution-independent or heterogeneous structuring languages, proof calculi, and tools with it.

Here, we suggest to remedy this problem by modifying the notion of model to include information also about its potential future extensions. Our construction works at a high level of generality in the sense that it provides, for any preinstitution, an institution in which the original preinstitution can be represented. The semantics of polymorphism used in the specification language HasCasl makes use of this result. In fact, HasCasl’s polymorphism is a special case of a general notion of polymorphism in institutions introduced here, and our construction leads to the right notion of semantic consequence when applied to this generic polymorphism. The appropriateness of the construction for other frameworks that share the same problem depends on methodological questions to be decided case by case. In particular, it turns out that our method is apparently unsuitable for observational logics, while it works well with abstract state machine formalisms such as state-based Casl.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

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

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Adámek, J., Herrlich, H., Strecker, G.E.: Abstract and concrete categories. Wiley Interscience, Hoboken (1990)

    MATH  Google Scholar 

  2. Barwise, J.: Axioms for abstract model theory. Ann. Math. Logic 7, 221–265 (1974)

    Article  MATH  MathSciNet  Google Scholar 

  3. Baumeister, H.: An institution for SB-CASL. In: Talk presented at the 15th International Workshop on Algebraic Development Techniques, Genova (2001)

    Google Scholar 

  4. Baumeister, H., Zamulin, A.: State-based extension of Casl. In: Grieskamp, W., Santen, T., Stoddart, B. (eds.) IFM 2000. LNCS, vol. 1945, pp. 3–24. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  5. Bidoit, M., Hennicker, R.: On the integration of observability and reachability concepts. In: Nielsen, M., Engberg, U. (eds.) FOSSACS 2002. LNCS, vol. 2303, pp. 21–36. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  6. Bidoit, M., Mosses, P.D. (eds.): CASL User Manual. LNCS, vol. 2900. Springer, Heidelberg (2004)

    MATH  Google Scholar 

  7. Borzyszkowski, T.: Higher-order logic and theorem proving for structured specifications. In: Bert, D., Choppy, C., Mosses, P.D. (eds.) WADT 1999. LNCS, vol. 1827, pp. 401–418. Springer, Heidelberg (2000)

    Chapter  Google Scholar 

  8. Bossi, A., Focardi, R., Piazza, C., Rossi, S.: Refinement operators and information flow security. In: Software Engineering and Formal Methods, pp. 44–53. IEEE Computer Society Press, Los Alamitos (2003)

    Google Scholar 

  9. Cerioli, M., Reggio, G.: Very abstract specifications: a formalism independent approach. Math. Struct. Comput. Sci. 8, 17–66 (1998)

    Article  MATH  MathSciNet  Google Scholar 

  10. Coquand, T.: An analysis of Girard’s paradox. In: Logic in Computer Science, pp. 227–236. IEEE, Los Alamitos (1986)

    Google Scholar 

  11. Diaconescu, R., Goguen, J., Stefaneas, P.: Logical support for modularisation. In: Workshop on Logical Frameworks, Programming Research Group. Oxford University, Oxford (1991)

    Google Scholar 

  12. Durán, F., Meseguer, J.: Structured theories and institutions. In: Category Theory and Computer Science, ENTCS, vol. 29 (1999)

    Google Scholar 

  13. Ehrig, H., Mahr, B.: Fundamentals of algebraic specification 2. Springer, Heidelberg (1990)

    MATH  Google Scholar 

  14. George, C., Haff, P., Havelund, K., Haxthausen, A.E., Milne, R., Bendix Nielson, C., Prehn, S., Wagner, K.R.: The Raise Specification Language. Prentice Hall, Englewood Cliffs (1992)

    Google Scholar 

  15. Goguen, J., Burstall, R.: Institutions: Abstract model theory for specification and programming. J. ACM 39, 95–146 (1992)

    Article  MATH  MathSciNet  Google Scholar 

  16. Goguen, J., Malcolm, G.: A hidden agenda. Theoret. Comput. Sci. 245, 55–101 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  17. Goguen, J., Rosu, G.: Institution morphisms. Formal aspects of computing 13, 274–307 (2002)

    Article  MATH  Google Scholar 

  18. Goguen, J., Tracz, W.: An implementation-oriented semantics for module composition. In: Foundations of Component-Based Systems, Cambridge, pp. 231–263 (2000)

    Google Scholar 

  19. Kubiak, R., Borzyszkowski, A., Sokolowski, S.: A set-theoretic model for a typed polymorphic lambda calculus — a contribution to MetaSoft. In: Bloomfield, R.E., Jones, R.B., Marshall, L.S. (eds.) VDM 1988. LNCS, vol. 328, pp. 267–298. Springer, Heidelberg (1988)

    Google Scholar 

  20. Kurz, A.: Logics for coalgebras and applications to computer science, Ph.D. thesis, Universität München (2000)

    Google Scholar 

  21. Meseguer, J.: General logics, Logic Colloquium, vol. 87, pp. 275–329. North-Holland, Amsterdam (1989)

    Google Scholar 

  22. Moerdijk, I., Palmgren, E.: Wellfounded trees in categories. Ann. Pure Appl. Logic 104, 189–218 (2000)

    Article  MATH  MathSciNet  Google Scholar 

  23. Moggi, E.: Categories of partial morphisms and the λ p -calculus. In: Poigné, A., Pitt, D.H., Rydeheard, D.E., Abramsky, S. (eds.) Category Theory and Computer Programming. LNCS, vol. 240, pp. 242–251. Springer, Heidelberg (1986)

    Google Scholar 

  24. Mossakowski, T.: Representations, hierarchies and graphs of institutions, Ph.D. thesis, Universität Bremen (1996), also: Logos-Verlag (2001)

    Google Scholar 

  25. Mossakowski, T.: Foundations of heterogeneous specification. In: Wirsing, M., Pattinson, D., Hennicker, R. (eds.) WADT 2003. LNCS, vol. 2755, pp. 359–375. Springer, Heidelberg (2003)

    Chapter  Google Scholar 

  26. Mossakowski, T.: heterogeneous specification. Language summary (2004), http://www.tzi.de/cofi/hetcasl

  27. Mosses, P.D. (ed.): CASL Reference Manual. LNCS, vol. 2960. Springer, Heidelberg (2004)

    MATH  Google Scholar 

  28. Nielsen, M., Pletat, U.: Polymorphism in an institutional framework, Tech. report, Technical University of Denmark (1986)

    Google Scholar 

  29. Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle/HOL. LNCS, vol. 2283. Springer, Heidelberg (2002)

    Book  MATH  Google Scholar 

  30. Pepper, P.: Transforming algebraic specifications – lessons learnt from an example. In: Constructing Programs from Specifications, pp. 1–27. Elsevier, Amsterdam (1991)

    Google Scholar 

  31. Peyton-Jones, S. (ed.): Haskell 1998 language and libraries — the revised report, Cambridge (2003), also: J. Funct. Programming 13 (2003)

    Google Scholar 

  32. Salibra, A., Scollo, G.: A soft stairway to institutions. In: Bidoit, M., Choppy, C. (eds.) Abstract Data Types 1991 and COMPASS 1991. LNCS, vol. 655, pp. 310–329. Springer, Heidelberg (1993)

    Google Scholar 

  33. Sannella, D., Tarlecki, A.: Specifications in an arbitrary institution. Information and Computation 76, 165–210 (1988)

    Article  MATH  MathSciNet  Google Scholar 

  34. Schröder, L.: The prologue: categorical syntax and semantics of the partial λ-calculus, available as, http://www.informatik.uni-bremen.de/~lschrode/hascasl/plam.ps

  35. Schröder, L., Mossakowski, T.: Towards integrated specification and development of functional programs. In: Kirchner, H., Ringeissen, C. (eds.) AMAST 2002. LNCS, vol. 2422, pp. 99–116. Springer, Heidelberg (2002)

    Chapter  Google Scholar 

  36. Schröder, L., Mossakowski, T., Maeder, C.: Integrated functional specification and programming. Language summary, available under, http://www.informatik.uni-bremen.de/agbkb/forschung/formal_methods/CoFI/HasCASL

  37. Tarlecki, A.: Quasi-varieties in abstract algebraic institutions. J. Comput. System Sci. 33, 333–360 (1986)

    Article  MATH  MathSciNet  Google Scholar 

  38. Wenzel, M.: Type classes and overloading in higher-order logic. In: Gunter, E.L., Felty, A.P. (eds.) TPHOLs 1997. LNCS, vol. 1275, pp. 307–322. Springer, Heidelberg (1997)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2005 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Schröder, L., Mossakowski, T., Lüth, C. (2005). Type Class Polymorphism in an Institutional Framework. In: Fiadeiro, J.L., Mosses, P.D., Orejas, F. (eds) Recent Trends in Algebraic Development Techniques. WADT 2004. Lecture Notes in Computer Science, vol 3423. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-31959-7_14

Download citation

  • DOI: https://doi.org/10.1007/978-3-540-31959-7_14

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-25327-3

  • Online ISBN: 978-3-540-31959-7

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics