GENERATING FLEXIBLE CODE FOR ASSOCIATIONS
Mayer Goldberg, Guy Wiener
2010
Abstract
Generating code for associations is one of the most fundamental requirements from a model-based code generator. There are several approaches for implementing associations, ranging from using basic collections frameworks to using a database. The choice between them derive from the current requirements of the software: Whether parallelism, caching or persistency required for a relation. Hard-coding a specific design choice makes it difficult to alter it later. In this work, we propose a scheme that allows for automatic code generations of associations with different features, without requiring manual changes to the code. These features include using indices, traversing the association in parallel, or using an external database. Instead of the sequential iterator interface, we propose to use an interface that is based on operations over collections, such as Foreach, Filter, Map and Fold. This interface allows for writing operations that traverse the association without being dependent on the implementation details of the generated code.
References
- Akehurst, D., Howells, G., and McDonald-Maier, K. (2007). Implementing associations: UML 2.0 to Java 5. Software and Systems Modeling, 6(1):3-35.
- Allen, J. (1978). Anatomy of LISP. McGraw-Hill Book Company.
- Blaha, M. and Premerlani, W. (1997). Object-oriented modeling and design for database applications. PrenticeHall, Inc. Upper Saddle River, NJ, USA.
- Bloch, J. (1995). The Java Tutorials: Collections. http://java.sun.com/docs/books/tutorial/collections.
- Fowler, M. (2003). UML Distilled: A Brief Guide to the Standard Object Modeling Language. AddisonWesley Longman Publishing Co., Inc., Boston, MA, USA.
- Gamma, E., Helm, R., Johnson, R., and Vlissides, J. (1995). Design patterns: elements of reusable object-oriented software. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA.
- Gessenharter, D. (2008). Mapping the UML2 semantics of associations to a Java code generation model. In Czarnecki, K., Ober, I., Bruel, J.-M., Uhl, A., and Völter, M., editors, MoDELS, volume 5301 of Lecture Notes in Computer Science, pages 813-827. Springer.
- Giacaman, N. and Sinnen, O. (2008a). Parallel iterator for parallelising object-oriented applications. Technical Report 669, University of Auckland.
- Giacaman, N. and Sinnen, O. (2008b). Parallel iterator for parallelising object oriented applications. In Proceedings of the 7th WSEAS International Conference on Software Engineering, Parallel and Distributed Systems, pages 44-49. World Scientific and Engineering Academy and Society (WSEAS).
- Harrison, W., Barton, C., and Raghavachari, M. (2000). Mapping UML designs to Java. ACM SIGPLAN Notices, 35(10):178-187.
- Iverson, K. E. (1962). A Programming Language. John Wiley & Sons, Inc.
- Larman, C. (2004). Applying UML and patterns: an introduction to object-oriented analysis and design and iterative development. Prentice Hall PTR Upper Saddle River, NJ, USA.
- Martin, J. and McClure, C. (1983). Software Maintenance: The Problems and Its Solutions. Prentice Hall Professional Technical Reference.
- Martin, J. and Odell, J. J. (1992). Object-oriented analysis and design. Prentice-Hall, Inc., Upper Saddle River, NJ, USA.
- OMG (2005). OCL 2.0 Specification. Formal specification, Object Management Group.
- Pigoski, T. M. (1996). Practical Software Maintenance: Best Practices for Managing Your Software Investment. John Wiley & Sons, Inc., New York, NY, USA.
- Rumbaugh, J., Jacobson, I., and Booch, G. (2004). Unified Modeling Language Reference Manual, The (2nd Edition). Pearson Higher Education.
- Warmer, J. and Kleppe, A. (2003). The Object Constraint Language: Getting Your Models Ready for MDA. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA.
Paper Citation
in Harvard Style
Goldberg M. and Wiener G. (2010). GENERATING FLEXIBLE CODE FOR ASSOCIATIONS . In Proceedings of the Fifth International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE, ISBN 978-989-8425-21-8, pages 96-104. DOI: 10.5220/0002999700960104
in Bibtex Style
@conference{enase10,
author={Mayer Goldberg and Guy Wiener},
title={GENERATING FLEXIBLE CODE FOR ASSOCIATIONS},
booktitle={Proceedings of the Fifth International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE,},
year={2010},
pages={96-104},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0002999700960104},
isbn={978-989-8425-21-8},
}
in EndNote Style
TY - CONF
JO - Proceedings of the Fifth International Conference on Evaluation of Novel Approaches to Software Engineering - Volume 1: ENASE,
TI - GENERATING FLEXIBLE CODE FOR ASSOCIATIONS
SN - 978-989-8425-21-8
AU - Goldberg M.
AU - Wiener G.
PY - 2010
SP - 96
EP - 104
DO - 10.5220/0002999700960104