Generating Code for Associations Supporting Operations on Multiple Instances
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.
KeywordsSequence Diagram Multiple Instance Aggregator Operation Sequential Implementation Public Class
Unable to display preview. Download preview PDF.
- 1.Rumbaugh, J., Jacobson, I., Booch, G.: Unified Modeling Language Reference Manual, 2nd edn. Pearson Higher Education, London (2004)Google Scholar
- 2.Object Management Group: OCL 2.0 Specification. Formal specification (2005)Google Scholar
- 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.Martin, J., Odell, J.J.: Object-oriented analysis and design. Prentice-Hall, Inc., Upper Saddle River (1992)Google Scholar
- 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.Fowler, M.: UML Distilled: A Brief Guide to the Standard Object Modeling Language. Addison-Wesley Longman Publishing Co., Inc., Boston (2003)Google Scholar
- 10.Pigoski, T.M.: Practical Software Maintenance: Best Practices for Managing Your Software Investment. John Wiley & Sons, Inc., New York (1996)Google Scholar
- 11.Martin, J., McClure, C.: Software Maintenance: The Problems and Its Solutions. Prentice Hall Professional Technical Reference (1983)Google Scholar
- 16.Giacaman, N., Sinnen, O.: Parallel iterator for parallelising object-oriented applications. Technical Report 669, University of Auckland (November 2008)Google Scholar
- 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