ABSTRACT
An essential tool in object oriented modeling is the specification of cardinalities of associations between classes. In Object Constraint Language (OCL) such constraints are expressed as conditions on the sizes of the collections that correspond to associations. In this paper we present tools and techniques for automated verification of size properties of collection types in OCL. We automatically verify invariants related to the sizes of the collections of a class with respect to the pre and post-conditions of the methods of that class. Our approach is based on a size abstraction that abstracts away the contents of the collections, but preserves the constraints on their sizes. We implemented a tool which automates this abstraction by converting OCL expressions on collections to arithmetic expressions on their sizes. Following this translation, we employ an infinite state model checker, called Action Language Verifier (ALV), for size analysis. Size abstraction reduces the state space of the system and, hence, the cost of automated verification, and by focusing on size properties, enables us to use efficient, domain specific model checking techniques for automated verification. To demonstrate the effectiveness of our approach we conducted a case study on the OCL specification of the Java Card API. The OCL specification of the Java Card API consists of 31 classes and 150 methods. Using our tool, we translated the OCL specification of each class to Action Language and verified the size properties using ALV. Verification with ALV took only a few seconds per class and we revealed errors in 26 out of the 150 method specifications.
- Wolfgang Ahrendt, Thomas Baar, Bernhard Beckert, Richard Bubel, Martin Giese, Reiner Hahnle, Wolfram Menzel, Wojciech Mostowski, Andreas Roth, Steffen Schlager, and Peter H. Schmitt. "The KeY Tool." Software and Systems Modeling vol. 4, no. 1, pp. 32--54, 2005.Google ScholarDigital Library
- Wei-Ngan Chin, Siau-Cheng Khoo, Shengchao Qin, Corneliu Popeea, Huu Hai Nguyen. "Verifying Safety Policies with Size Properties and Alias Controls." In Proc. ICSE '05 St. Louis, MO, USA, pp. 186--195, 2005. Google ScholarDigital Library
- Andy Evans, Robert B. France, Ana M. D. Moreira, Bernhard Rumpe. "Using Alloy and UML/OCL to Specify Run-Time Configuration Management:A Case Study." In Practical UML-Based Rigorous Development Methods UML01 Oct 2001, Toronto, Canada. Google ScholarDigital Library
- Jonathan Edwards, Daniel Jackson, Technology Emina Torlak. "A Type System for Object Models." In Proc. of FSE '04 Newport Beach, CA, pp. 189--199, 2004. Google ScholarDigital Library
- Martin Gogolla, Jorn Bohling, and Mark Richters. "Validation of UML and OCL Models by Automatic Snapshot Generation." In Proc. UML 2003 Springer, Berlin, LNCS 2863, 2003.Google Scholar
- John Hughes, Lars Pareto, Amr Sabry. "Proving the Correctness of Reactive Systems Using Sized Types." In Proc. POPL '96 pp. 410--423, 1996. Google ScholarDigital Library
- Daniel Jackson. "Alloy:A Lightweight Object Modelling Notation." ACM Transactions on Software Engineering and Methodology vol. 11, no. 2, pp. 256--290, 2002. Google ScholarDigital Library
- Viktor Kuncak and Daniel Jackson. "Relational Analysis of Algebraic Datatypes." In Proc. ESEC/FSE 2005 Lisbon, Portugal, September 5-9, 2005. Google ScholarDigital Library
- Daniel Larsson and Wojciech Mostowski. "Specifying Java Card API in OCL." OCL 2. 0 Workshop at UML 2003, San Francisco, Electronic Notes in Theoretical Computer Science vol. 102 pp. 3-19, 2004, Google ScholarDigital Library
- OMG. "Object Constraint Language Specification." In OMG Unified Modeling Language Specification, Version 1. 3, June 1999.Google Scholar
- OMG. "OMG Unified Modeling Language Specification, Version 1.3." Object Management Group, Inc., Framingham, Mass., Internet:http://www.omg.org, 1999.Google Scholar
- Mark Richters and Martin Gogolla. "Validating UML models and OCL constraints." In Proc. UML 2000 Springer, York, UK, LNCS 1939, 2000. Google ScholarDigital Library
- Jos Warmer and Anneke Kleppe. "The Object Constraint Language: Precise Modeling with UML." Addison-Wesley, 1998. Google ScholarDigital Library
- Tuba Yavuz-Kahveci, Constantinos Bartzis, and Tevfik Bultan. "Action Language Verifier, Extended." In Proc. CAV'05 LNCS 3576, pp. 413--427, 2005. Google ScholarDigital Library
Index Terms
- Automated size analysis for OCL
Recommendations
Verification-driven slicing of UML/OCL models
ASE '10: Proceedings of the 25th IEEE/ACM International Conference on Automated Software EngineeringModel defects are a significant concern in the Model-Driven Development (MDD) paradigm, as model transformations and code generation may propagate errors to other notations where they are harder to detect and trace. Formal verification techniques can ...
Transformation of TOCL temporal properties into OCL
MODELS '22: Proceedings of the 25th International Conference on Model Driven Engineering Languages and Systems: Companion ProceedingsSpecifying and verifying the temporal properties of UML-based systems can be challenging. Although there exist some extensions of OCL to support the specification of temporal properties, most of the approaches depend on using non-UML formalisms such as ...
HOL-OCL: a formal proof environment for UML/OCL
FASE'08/ETAPS'08: Proceedings of the Theory and practice of software, 11th international conference on Fundamental approaches to software engineeringWe present the theorem proving environment HOLOCL that is integrated in a Model-driven Engineering (MDE) framework. HOLOCL allows to reason over uml class models annotated with OCL specifications. Thus, HOLOCL strengthens a crucial part of the uml to an ...
Comments