Proving and Visualizing OCL Invariant Independence by Automatically Generated Test Cases

  • Martin Gogolla
  • Lars Hamann
  • Mirco Kuhlmann
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6143)


Within model-driven development, class invariants play a central role. An essential property of a collection of invariants is the independence of each single invariant, i.e., the invariant at hand cannot be deduced from the other invariants. The paper explains with three example models the details of an approach for automatically proving and representing invariant independence on the basis of a script constructing large test cases for the underlying model. Analysis of invariant independence is visualized by means of several diagrams like a ‘test configuration and result’ diagram, an ‘invariant dependence detail’ diagram, and an ‘invariant dependence overview’ diagram. The paper also discusses how to build the test case construction script in a systematic way. The test case construction script is written by the model developer, but a general construction frame for the script is outlined.


Object Constraint Language Test Case Generation Object Diagram Object Constraint Language Expression Object Constraint Language Constraint 
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. [AFC08]
    Avila, C., Flores, G., Cheon, Y.: A Library-Based Approach to Translating OCL Constraints to JML Assertions for Runtime Checking. In: Arabnia, H.R., Reza, H. (eds.) Software Engineering Research and Practice, pp. 403–408. CSREA Press (2008)Google Scholar
  2. [AS05]
    Aichernig, B.K., Salas, P.A.P.: Test Case Generation by OCL Mutation and Constraint Solving. In: QSIC, pp. 64–71. IEEE Computer Society, Los Alamitos (2005)Google Scholar
  3. [BC06]
    Baruzzo, A., Comini, M.: Static Verification of UML Model Consistency. In: Hearnden, D., Süß, J.G., Baudry, B., Rapin, N. (eds.) Proc. 3rd Workshop on Model Design and Validation, University of Queensland, pp. 111–126 (2006)Google Scholar
  4. BGL+07.
    Bouquet, F., Grandpierre, C., Legeard, B., Peureux, F., Vacelet, N., Utting, M.: A Subset of Precise UML for Model-Based Testing. In: A-MOST, pp. 95–104. ACM, New York (2007)CrossRefGoogle Scholar
  5. [BHS07]
    Beckert, B., Hähnle, R., Schmitt, P.H. (eds.): Verification of Object-Oriented Software: The KeY Approach. LNCS (LNAI), vol. 4334. Springer, Heidelberg (2007)Google Scholar
  6. [BW09]
    Brucker, A.D., Wolff, B.: Semantics, Calculi, and Analysis for Object-Oriented Specifications. Acta Informatica 46, 255–284 (2009)zbMATHCrossRefMathSciNetGoogle Scholar
  7. [CGQ+08]
    Costal, D., Gómez, C., Queralt, A., Raventós, R., Teniente, E.: Improving the Definition of General Constraints in UML. Journal of Software and System Modeling 7, 469–486 (2008)CrossRefGoogle Scholar
  8. [Gau95]
    Gaudel, M.C.: Testing can be Formal, too. In: Mosses, P.D., Schwartzbach, M.I., Nielsen, M. (eds.) CAAP 1995, FASE 1995, and TAPSOFT 1995. LNCS, vol. 915, pp. 82–96. Springer, Heidelberg (1995)Google Scholar
  9. [GBR05]
    Gogolla, M., Bohling, J., Richters, M.: Validating UML and OCL Models in USE by Automatic Snapshot Generation. Journal on Software and System Modeling 4, 386–398 (2005)CrossRefGoogle Scholar
  10. [GHK07]
    Gogolla, M., Büttner, F., Richters, M.: USE: A UML-Based Specification Environment for Validating UML and OCL. Science of Computer Programming 69, 27–34 (2007)zbMATHCrossRefMathSciNetGoogle Scholar
  11. [GHK10]
    Gogolla, M., Hamann, L., Kuhlmann, M.: Detailed Test Cases for ‘Proving OCL Invariant Independence by Automatically Generated Test Cases’ (2010),
  12. [GHK09]
    Gogolla, M., Kuhlmann, M., Hamann, L.: Consistency, Independence and Consequences in UML and OCL Models. In: Dubois, C. (ed.) TAP 2009. LNCS, vol. 5668, pp. 90–104. Springer, Heidelberg (2009)Google Scholar
  13. [Har87]
    Harel, D.: Statecharts: A Visual Formalism for Complex Systems. Science of Computer Programming 8, 231–274 (1987)zbMATHCrossRefMathSciNetGoogle Scholar
  14. [Jac06]
    Jackson, D.: Software Abstractions: Logic, Language, and Analysis. MIT Press, Cambridge (2006)Google Scholar
  15. [JLDM09]
    Jagannath, V., Lee, Y.Y., Daniel, B., Marinov, D.: Reducing the costs of bounded-exhaustive testing. In: Chechik, M., Wirsing, M. (eds.) FASE 2009. LNCS, vol. 5503, pp. 171–185. Springer, Heidelberg (2009)CrossRefGoogle Scholar
  16. [MKL02]
    Marcano-Kamenoff, R., Lévy, N.: Transformation Rules of OCL Constraints into B Formal Expressions. In: Workshop Critical Systems Development (CSDUML 2002) with UML at 5th Int. Conf. Unified Modeling Language (2002)Google Scholar
  17. [Orm97]
    Orman, L.V.: Relational Database Constraints as Counterexamples. Acta Informatica 34, 167–189 (1997)zbMATHCrossRefMathSciNetGoogle Scholar
  18. [OS98]
    Oakasha, H., Saake, G.: Foundations for Integrity Independence in Relational Databases. In: FMLDO, pp. 143–165 (1998)Google Scholar
  19. [SCH01]
    Shen, W., Compton, K., Huggins, J.: A Toolset for Supporting UML Static and Dynamic Model Checking. In: Proc. 16th IEEE Int. Conf. Automated Software Engineering (ASE), pp. 147–152. IEEE, Los Alamitos (2001)Google Scholar
  20. [SWK+10]
    Soeken, M., Wille, R., Kuhlmann, M., Gogolla, M., Drechsler, R.: Verifying UML/OCL Models Using Boolean Satisfiability. In: Müller, W. (ed.) Proc. Design, Automation and Test in Europe (DATE 2010). IEEE, Los Alamitos (2010)Google Scholar
  21. [SYC+04]
    Sullivan, K.J., Yang, J., Coppit, D., Khurshid, S., Jackson, D.: Software assurance by bounded exhaustive testing. In: Avrunin, G.S., Rothermel, G. (eds.) ISSTA, pp. 133–142. ACM, New York (2004)CrossRefGoogle Scholar
  22. [TGF+05]
    Trong, T.D., Ghosh, S., France, R.B., Hamilton, M., Wilkins, B.: UMLAnT: An Eclipse Plugin for Animating and Testing UML Designs. In: Proc. OOPSLA Workshop on Eclipse Technology Exchange (Eclipse 2005), pp. 120–124. ACM Press, New York (2005)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Martin Gogolla
    • 1
  • Lars Hamann
    • 1
  • Mirco Kuhlmann
    • 1
  1. 1.Informatik, AG DatenbanksystemeUniversität BremenBremen

Personalised recommendations