skip to main content
10.1145/1287624.1287671acmconferencesArticle/Chapter ViewAbstractPublication PagesfseConference Proceedingsconference-collections
Article

Automated size analysis for OCL

Authors Info & Claims
Published:07 September 2007Publication History

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle Scholar
  6. John Hughes, Lars Pareto, Amr Sabry. "Proving the Correctness of Reactive Systems Using Sized Types." In Proc. POPL '96 pp. 410--423, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Daniel Jackson. "Alloy:A Lightweight Object Modelling Notation." ACM Transactions on Software Engineering and Methodology vol. 11, no. 2, pp. 256--290, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. Viktor Kuncak and Daniel Jackson. "Relational Analysis of Algebraic Datatypes." In Proc. ESEC/FSE 2005 Lisbon, Portugal, September 5-9, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. OMG. "Object Constraint Language Specification." In OMG Unified Modeling Language Specification, Version 1. 3, June 1999.Google ScholarGoogle Scholar
  11. OMG. "OMG Unified Modeling Language Specification, Version 1.3." Object Management Group, Inc., Framingham, Mass., Internet:http://www.omg.org, 1999.Google ScholarGoogle Scholar
  12. Mark Richters and Martin Gogolla. "Validating UML models and OCL constraints." In Proc. UML 2000 Springer, York, UK, LNCS 1939, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Jos Warmer and Anneke Kleppe. "The Object Constraint Language: Precise Modeling with UML." Addison-Wesley, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Tuba Yavuz-Kahveci, Constantinos Bartzis, and Tevfik Bultan. "Action Language Verifier, Extended." In Proc. CAV'05 LNCS 3576, pp. 413--427, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Automated size analysis for OCL

          Recommendations

          Comments

          Login options

          Check if you have access through your login credentials or your institution to get full access on this article.

          Sign in
          • Published in

            cover image ACM Conferences
            ESEC-FSE '07: Proceedings of the the 6th joint meeting of the European software engineering conference and the ACM SIGSOFT symposium on The foundations of software engineering
            September 2007
            638 pages
            ISBN:9781595938114
            DOI:10.1145/1287624

            Copyright © 2007 ACM

            Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

            Publisher

            Association for Computing Machinery

            New York, NY, United States

            Publication History

            • Published: 7 September 2007

            Permissions

            Request permissions about this article.

            Request Permissions

            Check for updates

            Qualifiers

            • Article

            Acceptance Rates

            Overall Acceptance Rate112of543submissions,21%

            Upcoming Conference

            FSE '24

          PDF Format

          View or Download as a PDF file.

          PDF

          eReader

          View online with eReader.

          eReader