Advertisement

Generating Code for Associations Supporting Operations on Multiple Instances

  • Mayer Goldberg
  • Guy Wiener
Part of the Communications in Computer and Information Science book series (CCIS, volume 230)

Abstract

Associations between objects are one of the most fundamental concepts in object-oriented design. The choices of how to implement associations determine how operations on the associated instances are performed: Sequentially or in parallel, with or without cached results, and with a transient or persistent effect. In this work, we propose a scheme that allows for generated code to support different methods of operating on associated instances, without requiring changes to the client code. These methods include using indices, traversing the association in parallel, or using a database. Instead of the sequential iterator interface, we propose to use an interface that include operations over multiple instances: Foreach, Filter, Map and Fold. This interface allows for realizing designs that involve sending messages to multiple associated instances, such as UML sequence and communication diagrams. The realization does not depend on the implementation details of the associations.

Keywords

Sequence Diagram Multiple Instance Aggregator Operation Sequential Implementation Public Class 
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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Rumbaugh, J., Jacobson, I., Booch, G.: Unified Modeling Language Reference Manual, 2nd edn. Pearson Higher Education, London (2004)Google Scholar
  2. 2.
    Object Management Group: OCL 2.0 Specification. Formal specification (2005)Google Scholar
  3. 3.
    Warmer, J., Kleppe, A.: The Object Constraint Language: Getting Your Models Ready for MDA. Addison-Wesley Longman Publishing Co., Inc., Boston (2003)Google Scholar
  4. 4.
    Martin, J., Odell, J.J.: Object-oriented analysis and design. Prentice-Hall, Inc., Upper Saddle River (1992)Google Scholar
  5. 5.
    Larman, C.: Applying UML and patterns: an introduction to object-oriented analysis and design and iterative development. Prentice Hall PTR, Upper Saddle River (2004)Google Scholar
  6. 6.
    Fowler, M.: UML Distilled: A Brief Guide to the Standard Object Modeling Language. Addison-Wesley Longman Publishing Co., Inc., Boston (2003)Google Scholar
  7. 7.
    Gessenharter, D.: Mapping the UML2 semantics of associations to a Java code generation model. In: Czarnecki, K., Ober, I., Bruel, J.M., Uhl, A., Völter, M. (eds.) MODELS 2008. LNCS, vol. 5301, pp. 813–827. Springer, Heidelberg (2008)CrossRefGoogle Scholar
  8. 8.
    Akehurst, D., Howells, G., McDonald-Maier, K.: Implementing associations: UML 2.0 to Java 5. Software and Systems Modeling 6(1), 3–35 (2007)CrossRefGoogle Scholar
  9. 9.
    Harrison, W., Barton, C., Raghavachari, M.: Mapping UML designs to Java. ACM SIGPLAN Notices 35(10), 178–187 (2000)CrossRefGoogle Scholar
  10. 10.
    Pigoski, T.M.: Practical Software Maintenance: Best Practices for Managing Your Software Investment. John Wiley & Sons, Inc., New York (1996)Google Scholar
  11. 11.
    Martin, J., McClure, C.: Software Maintenance: The Problems and Its Solutions. Prentice Hall Professional Technical Reference (1983)Google Scholar
  12. 12.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc., Boston (1995)zbMATHGoogle Scholar
  13. 13.
    Allen, J.: Anatomy of LISP. McGraw-Hill Book Company, New York (1978)zbMATHGoogle Scholar
  14. 14.
    Iverson, K.E.: A Programming Language. John Wiley & Sons, Inc., Chichester (1962)CrossRefzbMATHGoogle Scholar
  15. 15.
    Blaha, M., Premerlani, W.: Object-oriented modeling and design for database applications. Prentice-Hall, Inc., Upper Saddle River (1997)zbMATHGoogle Scholar
  16. 16.
    Giacaman, N., Sinnen, O.: Parallel iterator for parallelising object-oriented applications. Technical Report 669, University of Auckland (November 2008)Google Scholar
  17. 17.
    Rogers, P., Janssen, R., Otto, A., Pleus, R., Salla, A., Sokal, V.: Storage management software and hardware. ABCs of z/OS System Programming, vol. 3. IBM Redbooks (2010)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Mayer Goldberg
    • 1
  • Guy Wiener
    • 1
  1. 1.Ben-Gurion UniversityBeershebaIsrael

Personalised recommendations