Dr. Mayer Goldberg

Know all about my research

Generating flexible code for associations

Mayer Goldberg, Guy Wiener

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.

Publication language English
Pages 96-104
Publication status Published - 01.12.2010

Keywords

Associations
Code generation
Meta-programming
Model-driven architecture

ASJC Scopus subject areas

Software
Other files and links
Link to publication in Scopus