Authors:
Mayer Goldberg
and
Guy Wiener
Affiliation:
Ben-Gurion University, Israel
Keyword(s):
Associations, Code generation, Model-driven Architecture, Meta-programming.
Related
Ontology
Subjects/Areas/Topics:
Architectural Design and Meta Architectures
;
Cross-Feeding between Data and Software Engineering
;
Meta Programming Systems and Meta-Modeling
;
Model-Driven Engineering
;
Paradigm Trends
;
Software Engineering
;
Software Engineering Methods and Techniques
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 o
n the implementation details of the generated code.
(More)