This Article 
 Bibliographic References 
 Add to: 
An Experimental Investigation of Formality in UML-Based Development
October 2005 (vol. 31 no. 10)
pp. 833-849
The Object Constraint Language (OCL) was introduced as part of the Unified Modeling Language (UML). Its main purpose is to make UML models more precise and unambiguous by providing a constraint language describing constraints that the UML diagrams alone do not convey, including class invariants, operation contracts, and statechart guard conditions. There is an ongoing debate regarding the usefulness of using OCL in UML-based development, questioning whether the additional effort and formality is worth the benefit. It is argued that natural language may be sufficient, and using OCL may not bring any tangible benefits. This debate is in fact similar to the discussion about the effectiveness of formal methods in software engineering, but in a much more specific context. This paper presents the results of two controlled experiments that investigate the impact of using OCL on three software engineering activities using UML analysis models: detection of model defects through inspections, comprehension of the system logic and functionality, and impact analysis of changes. The results show that, once past an initial learning curve, significant benefits can be obtained by using OCL in combination with UML analysis diagrams to form a precise UML analysis model. But, this result is however conditioned on providing substantial, thorough training to the experiment participants.

[1] E. Arisholm and D. Sjøberg, “Evaluating the Effect of a Delegated versus Centralized Control Style on the Maintainability of Object-Oriented Software,” IEEE Trans. Software Eng., vol. 30, no. 8, pp. 521-534, Aug. 2004.
[2] D.M. Berry, “Formal Methods, the Very Idea, Some Thoughts on Why They Work When They Work,” Science of Computer Programming, vol. 42, no. 1, pp. 11-27, 2002.
[3] D.M. Berry and W.F. Tichy, “Comments on ”Formal Methods Application: An Empirical Tale of Software Development,” IEEE Trans. Software Eng., vol. 29, no. 6, pp. 567-571, June 2003.
[4] G. Booch, J. Rumbaugh, and I. Jacobson, The Unified Modeling Language User Guide. Addison Wesley, 1999.
[5] L.C. Briand, Y. Labiche, M. Di Penta, and H.-D. Yan, “An Experimental Investigation of Formality in UML-Based Development,” Technical Report SCE-03-22, Carleton Univ., http://www.sce.carleton.caSquall, Jan. 2004.
[6] L.C. Briand, Y. Labiche, L. O'Sullivan, and M. Sowka, “Automated Impact Analysis of UML Models,” J. Systems and Software, to be published.
[7] L.C. Briand, Y. Labiche, and H. Sun, “Investigating the Use of Analysis Contracts to Improve the Testability of Object-Oriented Code,” Software— Practice and Experience, vol. 33, no. 7, pp. 637-672, 2003.
[8] B. Bruegge and A.H. Dutoit, Object-Oriented Software Engineering Using UML, Patterns, and Java, second ed. Prentice Hall, 2004.
[9] D.T. Campbell and J.C. Stanley, Experimental and Quasi-Experimental Designs for Research. Houghton Mifflin, 1990.
[10] S. Cook, A. Kleppe, R. Mitchell, B. Rumpe, J. Warmer, and A. Wills, “Amsterdam Manifesto on OCL,” Object Modeling with the OCL, The Rationale Behind the Object Constraint Language, 2002.
[11] J.L. Devore and N. Farnum, Applied Statistics for Engineers and Scientists. Duxbury, 1999.
[12] M. Fowler, UML Distilled: A Brief Guide to the Standard Object Modeling Language, third ed. Addison Wesley, 2003.
[13] H. Gomaa, Designing Concurrent, Distributed, and Real-Time Applications with UML. Addison Wesley, 2000.
[14] A. Hall, “Using Formal Methods to Develop an ATC Information System,” IEEE Software, vol. 13, no. 2, pp. 66-76, 1996.
[15] P. Henderson, “Mathematical Reasoning in Software Engineering Education,” Comm. ACM, vol. 46, no. 9, pp. 45-50, 2003.
[16] G. Iversen and H. Norpoth, Analysis of Variance, second ed. Sage Publications, 1987.
[17] A. Kleppe, J. Warmer, and W. Bast, MDA Explained— The Model Driven Architecture: Practice and Promise. Addison-Wesley, 2003.
[18] C. Larman, Applying UML and Patterns— An Introduction to Object-Oriented Analysis and Design and the Unified Process. second ed. Prentice Hall, 2002.
[19] B.H. Liskov and J.M. Wing, “A Behavioral Notion of Subtyping,” ACM Trans. Programming Languages and Systems, vol. 16, no. 6, pp. 1811-1841, 1994.
[20] OMG, “Unified Modeling Language (UML),” Object Management Group V1.4,, 2001.
[21] OMG, “OCL 2.0 Specification,” Object Management Group, Final Adopted Specification ptc/03-10-14, 2003.
[22] OMG, “UML 2.0 Superstructure Specification,” Object Management Group, Final Adopted Specification ptc/03-08-02, 2003.
[23] A.N. Oppenheim, Questionnaire Design, Interviewing and Attitude Measurement. Pinter Publishers, 1992.
[24] S.L. Pfleeger, “Understanding and Improving Technology Transfer in Software Engineering,” J. Systems and Software, vol. 47, nos. 2-3, pp. 111-124, 1999.
[25] S.L. Pfleeger and L. Hatton, “Investigating the Influence of Formal Methods,” Computer, vol. 30, no. 2, pp. 33-43, 1997.
[26] M. Satpathy, C. Snook, R. Harrison, M. Butler, and P. Krause, “A Comparative Study of Formal and Informal Specifications of a Case Study from Industry,” Proc. IEEE/IFIP Joint Workshop Formal Specifications of Computer-Based Systems, pp. 133-137, Apr. 2001.
[27] A.E.K. Sobel and M.R. Clarkson, “Formal Methods Application: An Empirical Tale of Software Development,” IEEE Trans. Software Eng., vol. 28, no. 3, pp. 308-320, Mar. 2002.
[28] J. Warmer and A. Kleppe, The Object Constraint Language, Addison-Wesley, html , 1999.
[29] C. Wohlin, P. Runeson, M. Host, M.C. Ohlsson, B. Regnell, and A. Wesslen, Experimentation in Software Engineering— An Introduction. Kluwer, 2000.

Index Terms:
Index Terms- Comprehension of software models, software engineering experimentation, UML, OCL.
Lionel C. Briand, Yvan Labiche, Massimiliano Di Penta, Han (Daphne) Yan-Bondoc, "An Experimental Investigation of Formality in UML-Based Development," IEEE Transactions on Software Engineering, vol. 31, no. 10, pp. 833-849, Oct. 2005, doi:10.1109/TSE.2005.105
Usage of this product signifies your acceptance of the Terms of Use.