Advertisement

An Approach to Testing Java Implementation against Its UML Class Model

  • Hector M. Chavez
  • Wuwei Shen
  • Robert B. France
  • Benjamin A. Mechling
Part of the Lecture Notes in Computer Science book series (LNCS, volume 8107)

Abstract

Model Driven Engineering (MDE) aims to expedite the software development process by providing support for transforming models to running systems. Many modeling tools provide forward engineering features that automatically translate a model into a skeletal program that developers must complete. Inconsistencies between a design model and its implementation can result as a consequence of manually-added code. Manually checking that an implementation conforms to the model is a daunting task. Thus, there is a need for MDE tools that developers can use to check whether an implementation conforms to a model, especially when generated code is manually modified. This paper presents an approach for testing that an implementation satisfies the constraints specified in its design model. We also describe a prototypical tool that supports the approach, and we describe how its application to two Eclipse UML2 projects uncovered errors.

Keywords

UML Class diagram Java Model checking 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Systems, R.: Software Testing and Validation with Reactis (2013), http://www.reactive-systems.com/ (accessed June 7, 2013)
  2. 2.
    Omg: OMG Unified Modeling Language (OMG UML), Superstructure Specification (Version 2.4.1). Tech. rep., Object Management Group (2011), http://www.omg.org/spec/UML/2.4.1/ (accessed June 7, 2013)
  3. 3.
    Omg: OMG Object Constraint Language (OCL) Version 2.3.1. Tech. rep (2012), http://www.omg.org/spec/OCL/2.3.1/ (accessed June 7, 2013)
  4. 4.
    IBM: IBM Rational Software and Systems Delivery (2013), http://www-01.ibm.com/software/rational/ (accessed June 7, 2013)
  5. 5.
    Warmer, J., Kleppe, A.: The Object Constraint Language: Getting Your Models Ready for MDA, 2nd edn. Addison-Wesley Longman Publishing Co., Inc., Boston (2003)Google Scholar
  6. 6.
    Kannan, Y., Sen, K.: Universal Symbolic Execution and its Application to Likely Data Structure Invariant Generation. In: Proceedings of the 2008 International Symposium on Software Testing and Analysis, New York, NY, USA, pp. 283–294 (2008)Google Scholar
  7. 7.
    Ammann, P., Offutt, J.: Introduction to Software Testing, 1st edn. Cambridge University Press, New York (2008)CrossRefzbMATHGoogle Scholar
  8. 8.
    Foundation, T.: Eclipse Modeling - MDT - Home (2013), http://www.eclipse.org/modeling/mdt/ (accessed June 7, 2013)
  9. 9.
    Foundation, T.: Eclipse Modeling - MDT - OCL (2013), http://www.eclipse.org/modeling/mdt/downloads/?project=ocl (accessed June 7, 2013)
  10. 10.
    Consortium, O.: ASM Home Page (2013), http://asm.ow2.org/ (accessed June 7, 2013)
  11. 11.
    Le Berre, D., Parrain, A.: The Sat4j Library, Release 2.2. Journal on Satisfiability, Boolean Modeling and Computation 7, 59–64 (2010)Google Scholar
  12. 12.
    Barbier, F., Henderson-Sellers, B., Le Parc-Lacayrelle, A., Bruel, J.-M.: Formalization of the Whole-Part Relationship in the Unified Modeling Language. IEEE Trans. Softw. Eng. 29(5), 459–470 (2003)CrossRefGoogle Scholar
  13. 13.
    Boyapati, C., Liskov, B., Shrira, L.: Ownership Types for Object Encapsulation. In: Proceedings of the 30th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, New York, NY, USA, pp. 213–223 (2003)Google Scholar
  14. 14.
    Guhneuc, Y.-G., Albin-Amiot, H.: Recovering Binary Class Relationships: Putting Icing on the UML Cake. In: Proceedings of the 19th Annual ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, New York, NY, USA, pp. 301–314 (2004)Google Scholar
  15. 15.
    Darga, P., Boyapati, C.: Efficient Software Model Checking of Data Structure Properties. In: Proceedings of the 21st Annual ACM SIGPLAN Conference on Object-oriented Programming Systems, Languages, and Applications, New York, NY, USA, pp. 363–382 (2006)Google Scholar
  16. 16.
    Boyapati, C., Khurshid, S., Marinov, D.: Korat: Automated Testing Based on Java Predicates. In: Proceedings of the 2002 ACM SIGSOFT International Symposium on Software Testing and Analysis, New York, NY, USA, pp. 123–133 (2002)Google Scholar
  17. 17.
    Abdurazik, A., Offutt, J.: Using UML Collaboration Diagrams for Static Checking and Test Generation. In: Proceedings of the 3rd International Conference on The Unified Modeling Language: Advancing the Standard, Berlin, Heidelberg, pp. 383–395 (2000)Google Scholar
  18. 18.
    Roychoudhury, A., Goel, A., Sengupta, B.: Symbolic Message Sequence Charts. ACM Trans. Softw. Eng. Methodol. 12, 12:1–12:44 (2012)Google Scholar
  19. 19.
    Akehurst, D., Howells, G., McDonald-Maier, K.: Implementing associations: UML 2.0 to Java 5. 0 to Java 5. Software & Systems Modeling 6(1), 3–35 (2007)CrossRefGoogle Scholar
  20. 20.
    Milanova, A.: Precise Identification of Composition Relationships for UML Class Diagrams. In: Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering, New York, NY, USA, pp. 76–85 (2005)Google Scholar
  21. 21.
    KeY Project: Integrated Deductive Software Design (2013), http://www.key-project.org/ (accessed June 7, 2013)

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  • Hector M. Chavez
    • 1
  • Wuwei Shen
    • 1
  • Robert B. France
    • 2
  • Benjamin A. Mechling
    • 1
  1. 1.Department of Computer ScienceWestern Michigan UniversityUSA
  2. 2.Department of Computer ScienceColorado State UniversityUSA

Personalised recommendations