Improving Code Generation for Associations: Enforcing Multiplicity Constraints and Ensuring Referential Integrity

  • Omar Badreddin
  • Andrew Forward
  • Timothy C. Lethbridge
Part of the Studies in Computational Intelligence book series (SCI, volume 496)

Abstract

UML classes involve three key elements: attributes, associations, and methods. Current object-oriented languages, like Java, do not provide a distinction between attributes and associations. Tools that generate code from associations currently provide little support for the rich semantics available to modellers such as enforcing multiplicity constraints or maintaining referential integrity. In this paper, we introduce a syntax for describing associations using a model-oriented language called Umple. We show source code from existing code-generation tools and highlight how the issues above are not adequately addressed. We outline code generation patterns currently available in Umple that resolve these difficulties and address the issues of multiplicity constraints and referential integrity.

Keywords

Associations Model Driven Development UML Code Generation Umple Reverse Engineering 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Costal, D., Gómez, C.: On the use of association redefinition in UML class diagrams. In: Embley, D.W., Olivé, A., Ram, S. (eds.) ER 2006. LNCS, vol. 4215, pp. 513–527. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  2. 2.
    Object-Oriented Software Engineering: Practical Software Development using UML and Java. McGraw-Hill (2005) Google Scholar
  3. 3.
    Badreddin, O., Forward, A., Lethbridge, T.C.: Exploring a Model-Oriented and Executable Syntax for UML Attributes. Accepted in SERA 2013 (2013)Google Scholar
  4. 4.
    Object-Oriented Software Engineering: Practical Software Development using UML and Java. McGraw Hill (2001)Google Scholar
  5. 5.
    UmpleOnline, http://www.try.umple.org (accessed 2013)
  6. 6.
    Executable UML: A Foundation for Model-Driven Architectures. Addison-Wesley, Boston (2002)Google Scholar
  7. 7.
    Umple Language, http://cruise.site.uottawa.ca/umple/ (accessed 2013)
  8. 8.
    Forward, A., Lethbridge, T.C., Brestovansky, D.: Improving program comprehension by enhancing program constructs: An analysis of the umple language, pp. 311–312 (2009)Google Scholar
  9. 9.
    Umple language online, http://cruise.site.uottawa.ca/umpleonline/ (accessed 2013)
  10. 10.
    Norton, D.: Open-Source Modeling Tools Maturing, but Need Time to Reach Full Potential, Gartner, Inc., Tech. Rep. G00146580 (April 20, 2007)Google Scholar
  11. 11.
    Wikipedia Listing of UML modeling tools, http://en.wikipedia.org/wiki/List_of_UML_tools (accessed 2013)
  12. 12.
    Bourdeau, R.H., Cheng, B.H.C.: A formal semantics for object model diagrams. IEEE Trans. Software Eng. 21, 799–821 (1995)CrossRefGoogle Scholar
  13. 13.
    Diskin, Z., Dingel, J.: Mappings, maps and tables: Towards formal semantics for associations in UML2. In: Wang, J., Whittle, J., Harel, D., Reggio, G. (eds.) MoDELS 2006. LNCS, vol. 4199, pp. 230–244. Springer, Heidelberg (2006)CrossRefGoogle Scholar
  14. 14.
    France, R.: A problem-oriented analysis of basic UML static requirements modeling concepts. ACM SIGPLAN Notices 34, 57–69 (1999)CrossRefGoogle Scholar
  15. 15.
    Overgaard, G.: A formal approach to relationships in the unified modeling language. In: Proceedings PSMT (1998)Google Scholar
  16. 16.
    Overgaard, G.: Formal specification of object-oriented ModellingConcepts. PhD Thesis, Dept. of Teleinformatics, Royal Inst. of Technology, Stockholm, Sweden (November 2000) Google Scholar
  17. 17.
    Stevens, P.: On the interpretation of binary associations in the Unified Modelling Language. Software and Systems Modeling 1, 68–79 (2002)Google Scholar
  18. 18.
    Genova, G., Llorens, J., Fuentes, J.M.: UML associations: A structural and contextual view. Journal of Object Technology 3, 83–100 (2004)CrossRefGoogle Scholar
  19. 19.
    Miliev, D.: On the semantics of associations and association ends in UML. IEEE Trans. Software Eng., 231–258 (2007)Google Scholar
  20. 20.
    Wang, K., Shen, W.: Runtime checking of UML association-related constraints. In: Proceedings of the 5th International Workshop on Dynamic Analysis (2007)Google Scholar
  21. 21.
    Osterbye, K.: Design of a class library for association relationships. In: Proceedings of the 2007 Symposium on Library-Centric Software Design, pp. 67–75 (2007)Google Scholar
  22. 22.
    Badreddin, O.: Empirical Evaluation of Research Prototypes at Variable Stages of Maturity. In: ICSE Workshop on User Evaluation for Software Engineering Researchers, USER (to appear, 2013)Google Scholar
  23. 23.
    Badreddin, O., Lethbridge, T.C.: Combining experiments and grounded theory to evaluate a research prototype: Lessons from the umple model-oriented programming technology. In: User Evaluation for Software Engineering Researchers (USER). IEEE (2012)Google Scholar
  24. 24.
    Badreddin, O., Forward, A., Lethbridge, T.C.: Model oriented programming: an empirical study of comprehension. In: Proceedings of the 2012 Conference of the Center for Advanced Studies on Collaborative Research. IBM Corp. (2012)Google Scholar
  25. 25.
    Badreddin, O., Lethbridge, T.C., Elassar, M.: Modeling Practices in Open Source Software. In: OSS 2013, 9th International Conference on Open Source Systems (to appear, 2013)Google Scholar

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  • Omar Badreddin
    • 1
  • Andrew Forward
    • 1
  • Timothy C. Lethbridge
    • 1
  1. 1.School of Electrical Engineering and Computer ScienceUniversity of OttawaOttawaCanada

Personalised recommendations