IceDust 2

Derived Bidirectional Relations and Calculation Strategy Composition

Conference Paper (2017)
Author(s)

Daco Harkes (TU Delft - Programming Languages)

Eelco Visser (TU Delft - Programming Languages)

Research Group
Programming Languages
Copyright
© 2017 D.C. Harkes, Eelco Visser
DOI related publication
https://doi.org/10.4230/LIPIcs.ECOOP.2017.14
More Info
expand_more
Publication Year
2017
Language
English
Copyright
© 2017 D.C. Harkes, Eelco Visser
Research Group
Programming Languages
Pages (from-to)
1-29
ISBN (print)
978-3-95977-035-4
Reuse Rights

Other than for strictly personal use, it is not permitted to download, forward or distribute the text or part of it, without the consent of the author(s) and/or copyright holder(s), unless the work is under an open content license such as Creative Commons.

Abstract

Derived values are values calculated from base values. They can be expressed with views in relational databases, or with expressions in incremental or reactive programming. However, relational views do not provide multiplicity bounds, and incremental and reactive programming require significant boilerplate code in order to encode bidirectional derived values. Moreover, the composition of various strategies for calculating derived values is either disallowed, or not checked for producing derived values which will be consistent with the derived values they depend upon. In this paper we present IceDust2, an extension of the declarative data modeling language IceDust with derived bidirectional relations with multiplicity bounds and support for statically checked composition of calculation strategies. Derived bidirectional relations, multiplicity bounds, and calculation strategies all influence runtime behavior of changes to data, leading to hundreds of possible behavior definitions. IceDust2 uses a product-line based code generator to avoid explicitly defining all possible combinations, making it easier to reason about correctness. The type system allows only sound composition of strategies and guarantees multiplicity bounds. Finally, our case studies validate the usability of IceDust2 in applications.