Specification of Invariability in OCL

  • Piotr Kosiuczenko
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4199)


The paradigm of contractual specification provides a transparent way of specifying systems. It clearly distinguishes between client and implementer obligations. One of the best known languages used for this purpose is OCL. Nevertheless, OCL does not provide primitives for a compact specification of what remains unchanged when a method is executed. In this paper, problems with specifying invariability are listed and some weaknesses of existing solutions are pointed out. The question of specifying invariability in OCL is studied and a simple but expressive and flexible extension is proposed. It is shown that this extension has a simple OCL based semantics.


Class Diagram Bank Account Frame Problem Attribute Balance Nonmonotonic Logic 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Baar, T.: OCL and Graph-Transformations – A Symbiotic Alliance to Alleviate the Frame Problem. In: Proc. of MoDELS 2005 Satelite Workshop on Tool Support for OCL and Related Formalisms, Montego Bay, Jamaica, October 4, pp. 83–99 (2005)Google Scholar
  2. 2.
    Borgida, A., Reiter, R., Mylopoulos, J.: On the Frame Problem in Procedure Specifications. In: 15’th Int. Conf. on Software Engineering, Baltimore, IEEE Computer Society Press, Los Alamitos (1993)Google Scholar
  3. 3.
    Darvas, A., Mueller, P.: Reasoning About Method Calls in JML Specifications. In: Proceedings of the 7th Workshop on Formal Techniques for Java-like Programs (FTfJP 2005), Glasgow, Scotland (July 2005)Google Scholar
  4. 4.
    Finkelstein, A., Kramer, J., Nuseibeh, B., Finkelstein, L., Goedicke, M.: Viewpoints: A Framework for Integrating Multiple Perspectives in System Development. International Journal on Software Engineering and Knowledge Engineering, 31–58 (1991)Google Scholar
  5. 5.
    Gogolla, M, Richters, M.: Use: A UML-based Specification Environment,
  6. 6.
    Jezequel, J.M.: Object-Oriented Software Engineering with Eiffel. Eiffel in Practice Series. Addison-Wesley, Reading (1996)MATHGoogle Scholar
  7. 7.
    Hoare, T.: An Axiomatic Basis for Computer Programming. CACM 12(10) (1969)Google Scholar
  8. 8.
    Mitchell, R., McKim, J.: Design by contract by example. Addison-Wesley, Reading (2001)Google Scholar
  9. 9.
    Marek, W., Truszczynski, M.: Nonmonotonic Logic, Context-Dependent Reasoning. Artificial Intelligence. Springer, Heidelberg (1993)MATHGoogle Scholar
  10. 10.
    Meyer, B.: Object-Oriented Software Construction. Prentice Hall, Englewood Cliffs (1998)Google Scholar
  11. 11.
    Minsky, M.: A framework for representing knowledge. Technical Report 306, Artificial Intelligence Laboratory, MIT (1974)Google Scholar
  12. 12.
    Mueller, P., Poetzsch-Heffter, A., Leavens, G.T.: Modular Specification of Frame Properties in JML. In: Concurrency and Computation: Practice and Experience, vol. 15, pp. 117–154. Wiley, Chichester (2003)Google Scholar
  13. 13.
    OMG, MDA Guide, Version 1.0.1 (June 2003)Google Scholar
  14. 14.
    OMG, Meta-Object Facility Specification, Version 1.4 (April 2003)Google Scholar
  15. 15.
    OMG, OCL Specification, Version 2.0 (October 2004)Google Scholar
  16. 16.
    OMG, Unified Modeling Language Specification, Version 2.0 (October 2004)Google Scholar
  17. 17.
    Schubert, L.: Monotonic Solution of the Frame Problem in the Situation Calculus. In: Kyburg, H., Loui, R., Carlson, G. (eds.) Knowledge Representation and Defeasible Reasoning, pp. 23–67. Kluwer, Dordrecht (1990)Google Scholar
  18. 18.
    Warmer, J., Kleppe, A.: Object Constraint Language: Getting Your Models Ready for MDA. Addison Wesley Professional, Reading (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Piotr Kosiuczenko
    • 1
  1. 1.Department of Computer ScienceUniversity of Leicester 

Personalised recommendations