OCL-Based Runtime Monitoring of Applications with Protocol State Machines

  • Lars Hamann
  • Oliver Hofrichter
  • Martin Gogolla
Part of the Lecture Notes in Computer Science book series (LNCS, volume 7349)


This paper presents an approach that enables users to monitor and verify the behavior of an application running on a virtual machine (like the Java virtual machine) at an abstract model level. Models for object-oriented implementations are often used as a foundation for formal verification approaches. Our work allows the developer to verify whether a model corresponds to a concrete implementation by validating assumptions about model structure and behavior. In previous work, we focused on (a) the validation of static model properties by monitoring invariants and (b) basic dynamic properties by specifying pre- and postconditions of an operation. In this paper, we extend our work in order to verify and validate advanced dynamic properties, i.,e., properties of sequences of operation calls. This is achieved by integrating support for monitoring UML protocol state machines into our basic validation engine.


Virtual Machine Model Check State Invariant Symbolic Execution Java Modeling Language 
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.
    Anand, S., Păsăreanu, C.S., Visser, W.: JPF–SE: A Symbolic Execution Extension to Java PathFinder. In: Grumberg, O., Huth, M. (eds.) TACAS 2007. LNCS, vol. 4424, pp. 134–138. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  2. 2.
    Avila, C., Sarcar, A., Cheon, Y., Yeep, C.: Runtime Constraint Checking Approaches for OCL, A Critical Comparison. In: SEKE (2010)Google Scholar
  3. 3.
    Balasubramanian, D., Pasareanu, C.S., Whalen, M.W., Karsai, G., Lowry, M.R.: Polyglot: modeling and analysis for multiple Statechart formalisms. In: Dwyer, M.B., Tip, F. (eds.) ISSTA, pp. 45–55. ACM (2011)Google Scholar
  4. 4.
    Balz, M., Striewe, M., Goedicke, M.: Monitoring Model Specifications in Program Code Patterns. In: Proc. of the 5th Int. WS Models@run.time, pp. 60–71 (2010)Google Scholar
  5. 5.
    Bodden, E.: Stateful breakpoints: a practical approach to defining parameterized runtime monitors. In: ESEC/FSE 2011. ACM, New York (2011)Google Scholar
  6. 6.
    Bodden, E., Hendren, L.J., Lam, P., Lhoták, O., Naeem, N.A.: Collaborative Runtime Verification with Tracematches. J. Log. Comput. 20(3), 707–723 (2010)zbMATHCrossRefGoogle Scholar
  7. 7.
    Cabot, J., Teniente, E.: Incremental integrity checking of UML/OCL conceptual schemas. Journal of Systems and Software 82(9), 1459–1478 (2009)CrossRefGoogle Scholar
  8. 8.
    Demuth, B., Wilke, C.: Model and object verification by using Dresden OCL. In: Proceedings of the Russian-German Workshop Innovation Information Technologies: Theory and Practice, Ufa, Russia, pp. 687–690 (2009)Google Scholar
  9. 9.
    Dzidek, W.J., Briand, L.C., Labiche, Y.: Lessons Learned from Developing a Dynamic OCL Constraint Enforcement Tool for Java. In: Bruel, J.-M. (ed.) MoDELS 2005. LNCS, vol. 3844, pp. 10–19. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  10. 10.
    Froihofer, L., Glos, G., Osrael, J., Goeschka, K.M.: Overview and Evaluation of Constraint Validation Approaches in Java. In: Proc. of ICSE 2007, pp. 313–322. IEEE Computer Society, Washington, DC (2007)Google Scholar
  11. 11.
    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)MathSciNetzbMATHCrossRefGoogle Scholar
  12. 12.
    Gogolla, M., Hamann, L., Xu, J., Zhang, J.: Exploring (Meta-)Model Snapshots by Combining Visual and Textual Techniques. In: Proc. 10th Int. Workshop on Graph Transformation and Visual Modeling Techniques (GT-VMT 2011) (2011)Google Scholar
  13. 13.
    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)CrossRefGoogle Scholar
  14. 14.
    Gopinathan, M., Rajamani, S.K.: Runtime Monitoring of Object Invariants with Guarantee. In: Leucker, M. (ed.) RV 2008. LNCS, vol. 5289, pp. 158–172. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  15. 15.
    Hamann, L., Gogolla, M., Kuhlmann, M.: OCL-Based Runtime Monitoring of JVM Hosted Applications. In: Proc. WS OCL and Textual Modelling. ECEASST (2011)Google Scholar
  16. 16.
    Hamann, L., Vidács, L., Gogolla, M., Kuhlmann, M.: Abstract Runtime Monitoring with USE. In: Proc. CSMR 2012, pp. 549–552 (2012)Google Scholar
  17. 17.
    Katoen, J.P., Baier, C.: Principles of Model Checking. MIT Press (2008)Google Scholar
  18. 18.
    Leavens, G.T., Cheon, Y., Clifton, C., Ruby, C., Cok, D.R.: How the design of JML accommodates both runtime assertion checking and formal verification. Sci. Comput. Program. 55(1-3), 185–208 (2005)MathSciNetzbMATHCrossRefGoogle Scholar
  19. 19.
    Moffett, Y., Beaulieu, A., Dingel, J.: Verifying UML-RT Protocol Conformance Using Model Checking. In: Whittle, J., Clark, T., Kühne, T. (eds.) MODELS 2011. LNCS, vol. 6981, pp. 410–424. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  20. 20.
    UML Superstructure 2.2. Object Management Group (OMG) (February 2009),
  21. 21.
    Object Constraint Language 2.2. Object Management Group (OMG) (February 2010),
  22. 22.
    Oracle: JavaTMPlatform Debugger Architecture - Structure Overview (2011),
  23. 23.
    Porres, I., Rauf, I.: From Nondeterministic UML Protocol Statemachines to Class Contracts. In: Int. Conf. on Software Testing, Verification, and Validation, pp. 107–116. IEEE Computer Society, Los Alamitos (2010)CrossRefGoogle Scholar
  24. 24.
    Shah, S.M.A., Anastasakis, K., Bordbar, B.: From UML to Alloy and Back Again. In: Ghosh, S. (ed.) MODELS 2009. LNCS, vol. 6002, pp. 158–171. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  25. 25.
    Soeken, M., Wille, R., Drechsler, R.: Encoding OCL Data Types for SAT-Based Verification of UML/OCL Models. In: Gogolla, M., Wolff, B. (eds.) TAP 2011. LNCS, vol. 6706, pp. 152–170. Springer, Heidelberg (2011)CrossRefGoogle Scholar
  26. 26.
    Song, H., Huang, G., Chauvel, F., Sun, Y.: Applying MDE Tools at Runtime: Experiments upon Runtime Models. In: Models@run.time, pp. 25–36 (2010)Google Scholar
  27. 27.
    Visser, W., Havelund, K., Brat, G.P., Park, S., Lerda, F.: Model Checking Programs. Autom. Softw. Eng. 10(2), 203–232 (2003)CrossRefGoogle Scholar
  28. 28.
    Warmer, J., Kleppe, A.: The Object Constraint Language: Precise Modeling with UML, 2nd edn. Addison-Wesley (2003)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2012

Authors and Affiliations

  • Lars Hamann
    • 1
  • Oliver Hofrichter
    • 1
  • Martin Gogolla
    • 1
  1. 1.Computer Science Department, Database Systems GroupUniversity of BremenBremenGermany

Personalised recommendations