Skip to main content
Log in

Categorical foundations for structured specifications in \({\mathsf{Z}}\)

  • Original Article
  • Published:
Formal Aspects of Computing

Abstract

In this paper we present a formalization of the \({\mathsf{Z}}\) notation and its structuring mechanisms. One of the main features of our formal framework, based on category theory and the theory of institutions, is that it enables us to provide an abstract view of \({\mathsf{Z}}\) and its related concepts. We show that the main structuring mechanisms of \({\mathsf{Z}}\) are captured smoothly by categorical constructions. In particular, we provide a straightforward and clear semantics for promotion, a powerful structuring technique that is often not presented as part of the schema calculus. Here we show that promotion is already an operation over schemas (and more generally over specifications), that allows one to promote schemas that operate on a local notion of state to operate on a subsuming global state, and in particular can be used to conveniently define large specifications from collections of simpler ones. Moreover, our proposed formalization facilitates the combination of \({\mathsf{Z}}\) with other notations in order to produce heterogeneous specifications, i.e., specifications that are obtained by using various different mathematical formalisms. Thus, our abstract and precise formulation of \({\mathsf{Z}}\) is useful for relating this notation with other formal languages used by the formal methods community. We illustrate this by means of a known combination of formal languages, namely the combination of \({\mathsf{Z}}\) with \({\mathsf{CSP}}\).

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

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Baar T, Strohmeier A, Moreira A, Mellor S (2004) UML 2004. In: Lecture notes in computer science, vol 3273. Springer, Berlin

  2. Barr M, Wells C (1999) Category theory for computer science. In: Centre de Recherches Mathématiques, Université de Montréal

  3. Baumeister H (1999) Relating abstract datatypes and Z-schemata. In: Proc. of WADT ’99. Lecture notes in computer science, vol 1827. Springer, Berlin, pp 366–382

  4. Bérnabou J (1967) Introduction to bicategories. In: Complementary definitions of programming language semantics. LNM vol 42. Springer, Berlin, pp 1–77

  5. Borzyszkowski T (1999) Higher-order logic and theorem proving for structured specifications. In: Proc. of WADT ’99. Lecture notes in computer science, vol 1827. Springer, Berlin

  6. Brien SM, Martin AP (2000) A calculus for schemas in Z. J Symb Comput 30(1): 63–91

    Article  MATH  MathSciNet  Google Scholar 

  7. Bujorianu MC (2004) Integration of specification languages using viewpoints. In: Proc. of IFM ’04. Lecture notes in computer science, vol 2999. Springer, Berlin

  8. Castro PF, Aguirre N, Lopez Pombo CG, Maibaum TSE (2012) A categorical approach to structuring and promoting Z specifications. In: Proc. of FACS’12. Lecture notes in computer science, vol 7684. Springer, Berlin

  9. Chang CC, Keisler HJ (1990) Model theory. 3rd edn. North Holland, NY

  10. Diaconescu R (2008) Institution-independent model theory. Birkhäuser Verlag, Basel

    MATH  Google Scholar 

  11. Enderton H (2001) A mathematical introduction to logic. 2nd ed., Academic Press, Dublin

  12. Fiadeiro J (2004) Categories for software engineering. Springer, Berlin

    Google Scholar 

  13. Fiadeiro J, Maibaum TSE (1992) Temporal theories as modularisation units for concurrent system specification. Form Asp Comput 4(3): 239–272

    Article  MATH  Google Scholar 

  14. Finkelstein A, Kramer J, Nuseibeh B, Finkelstein L, Goedicke M (1992) Viewpoints: a framework for integrating multiple perspectives in system development. Int J Softw Eng Knowl Eng 2(1): 31–57

    Article  Google Scholar 

  15. Fischer C (1997) Combining CSP and Z. Technical Report, University of Oldenburg

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

    Article  MATH  MathSciNet  Google Scholar 

  17. Henson M, Reeves S (1999) Revising Z: part I—logic and semantics. Form Asp Comput 11(4): 359–380

    Article  MATH  Google Scholar 

  18. Henson M, Reeves S (1999) Revising Z: part II—logical development. Form Asp Comput 11(4): 381–401

    Article  MATH  Google Scholar 

  19. Hoare CAR, Jifeng H (1998) Unifying theories of programming. Prentice Hall College Division, Englewood Cliffs

  20. Jacky J (1997) The way of Z, practical programming with formal methods. Cambridge University Press, Cambridge

    Google Scholar 

  21. Lano K (2009) Model-driven software development with UML and java. Course Technology

  22. MacLane S (1998) Categories for the working mathematician. 2nd edn. Springer, Berlin

  23. Meyer B (2000) Object-oriented software construction. Prentice Hall, Englewood Cliffs

    Google Scholar 

  24. Mossakowski T, Maeder C, Lüttich K (2007) The heterogeneous tool set (hets). In: Proc. of 4th international verification workshop in connection with CADE-21. http://CEUR-WS.org

  25. Nicholls J (1995) Z notation: version 1.2. Z standards panel

  26. Mossakowski T, Tarlecki A. Pawlowski W (1997) Combining and representing logical systems. In: Proc. of category theory and computer science’97. Lecture notes in computer science, vol 1290. Springer, Berlin

  27. Mossakowski T, Roggenbach M (2006) Structured CSP—a process algebra as an institution. In: Proc. of WADT’06. Lecture notes in computer science, vol 4409. Springer, Berlin

  28. Oliveira M, Cavalcanti A, Woodcock J (2009) A UTP semantics for circus. Form Asp Comput 21(2): 3–32

    Article  MATH  Google Scholar 

  29. Parnas D (1972) On the criteria to be used in decomposing systems into modules. Commun. ACM 15(12): 1053–1058

    Article  Google Scholar 

  30. Parnas D (1985) The modular structure of complex system. IEEE Trans Softw Eng 11(3): 259–266

    Article  Google Scholar 

  31. Risk! Rules of Play (1963) Parker Brothers

  32. Spivey JM (1984) Towards a formal semantics for the Z notation. Oxford University Computing Laboratory, T.M. PRG-41

  33. Spivey JM (1988) Understanding Z: a specification language and its formal semantics. Cambridge Tracts in Theoretical Computer Science

  34. Spivey JM (1992) The Z notation: a reference manual. Prentice Hall, Englewood Cliffs

  35. Tarlecki A (1995) Moving between logical systems. In: Proc. of ADT/COMPASS’95. Lecture notes in computer science, vol 1130. Springer, Berlin

  36. Webber M (1996) Combining statecharts and Z for the design of safety-critical control systems. In: Proc. of FME’96. Lecture notes in computer science, vol 1051. Springer, Berlin

  37. Woodcock J (1990) Mathematics as a management tool: proof rules for promotion. In: Software engineering for large software systems. Springer, Netherlands

  38. Woodcock J, Davies J (1996) Using Z: specification, refinement, and proof. Prentice Hall, Englewood Cliffs

    MATH  Google Scholar 

  39. Woodcock J, Cavancanti A (2001) Circus: a concurrent refinement language. Technical report, Oxford University Computing Laboratory, Oxford, UK

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Pablo F. Castro.

Additional information

Jim Woodcock

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Castro, P.F., Aguirre, N., Pombo, C.L. et al. Categorical foundations for structured specifications in \({\mathsf{Z}}\) . Form Asp Comp 27, 831–865 (2015). https://doi.org/10.1007/s00165-015-0336-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s00165-015-0336-0

Keywords

Navigation