Abstract
From its beginnings, OCL is based on a strict semantics for undefinedness, with the exception of the logical connectives of type Boolean that constitute a three-valued propositional logic. Recent versions of the OCL standard added a second exception element, which, similar to the null references in object-oriented programming languages, is given a non-strict semantics. Unfortunately, this extension has been done in an ad hoc manner, which results in several inconsistencies and contradictions.
In this paper, we present a consistent formal semantics (based on our HOL-OCL approach) that includes such a non-strict exception element. We discuss the possible consequences concerning class diagram semantics as well as deduction rules. The benefits of our approach for the specification-pragmatics of design level operation contracts are demonstrated with a small case-study.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Andrews, P.B.: Introduction to Mathematical Logic and Type Theory: To Truth through Proof, 2nd edn. Kluwer Academic Publishers, Dordrecht (2002)
Barnett, M., Leino, K.R.M., Schulte, W.: The Spec# programming system: An overview. In: Barthe, G., Burdy, L., Huisman, M., Lanet, J.-L., Muntean, T. (eds.) CASSIS 2004. LNCS, vol. 3362, pp. 49–69. Springer, Heidelberg (2005)
Brucker, A.D., Doser, J., Wolff, B.: An MDA framework supporting OCL. Electronic Communications of the EASST 5 (2006)
Brucker, A.D., Wolff, B.: The HOL-OCL book. Tech. Rep. 525, ETH Zurich (2006)
Brucker, A.D., Wolff, B.: An extensible encoding of object-oriented data models in HOL. Journal of Automated Reasoning 41, 219–249 (2008)
Brucker, A.D., Wolff, B.: Semantics, calculi, and analysis for object-oriented specifications. Acta Informatica 46(4), 255–284 (2009)
Chalin, P., Rioux, F.: Non-null references by default in the Java modeling language. In: SAVCBS 2005: Proceedings of the 2005 conference on Specification and verification of component-based systems, p. 9. ACM Press, New York (2005)
Church, A.: A formulation of the simple theory of types. Journal of Symbolic Logic 5(2), 56–68 (1940)
Ekman, T., Hedin, G.: Pluggable checking and inferencing of nonnull types for Java. Journal of Object Technology 6(9), 455–475 (2007)
Fähndrich, M., Leino, K.R.M.: Declaring and checking non-null types in an object-oriented language. In: OOPSLA, pp. 302–312. ACM Press, New York (2003)
Gogolla, M., Kuhlmann, M., Büttner, F.: A benchmark for OCL engine accuracy, determinateness, and efficiency. In: Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 446–459. Springer, Heidelberg (2008)
Gordon, M.J.C., Melham, T.F.: Introduction to HOL: a theorem proving environment for higher order logic. Cambridge University Press, Cambridge (1993)
Kosiuczenko, P.: Specification of invariability in OCL. In: Nierstrasz, O., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 676–691. Springer, Heidelberg (2006)
Leavens, G.T., Poll, E., Clifton, C., Cheon, Y., Ruby, C., Cok, D.R., Müller, P., Kiniry, J., Chalin, P.: JML reference manual, revision 1.2 (2007)
Nipkow, T., Paulson, L.C., Wenzel, M.: Isabelle’s logic: HOL (2009)
UML 2.0 OCL specification (2003). Available as OMG document ptc/03-10-14
UML 2.0 OCL specification (2006). Available as OMG document formal/06-05-01
UML 2.2 infrastructure (2009). Available as OMG document formal/2009-02-04
Richters, M.: A precise approach to validating UML models and OCL constraints. Ph.D. thesis, Universität Bremen, Logos Verlag, BISS Monographs, No. 14 (2002)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2010 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Brucker, A.D., Krieger, M.P., Wolff, B. (2010). Extending OCL with Null-References. In: Ghosh, S. (eds) Models in Software Engineering. MODELS 2009. Lecture Notes in Computer Science, vol 6002. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-642-12261-3_25
Download citation
DOI: https://doi.org/10.1007/978-3-642-12261-3_25
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-642-12260-6
Online ISBN: 978-3-642-12261-3
eBook Packages: Computer ScienceComputer Science (R0)