Lazy Composition of Representations in Java
The separation of concerns has been a core idiom of software engineering for decades. In general, software can be decomposed properly only according to a single concern, other concerns crosscut the prevailing one. This problem is well known as “the tyranny of the dominant decomposition”. Similarly, at the programming level, the choice of a representation drives the implementation of the algorithms. This article explores an alternative approach with no dominant representation. Instead, each algorithm is developed in its “natural” representation and a representation is converted into another one only when it is required. To support this approach, we designed a laziness framework for Java, that performs partial conversions and dynamic optimizations while preserving the execution soundness. Performance evaluations over graph theory examples demonstrates this approach provides a practicable alternative to a naive one.
KeywordsDynamic Optimization Polar Representation Adjacency List Colored Point Partial Conversion
Unable to display preview. Download preview PDF.
- 2.Beldiceanu, N., Flener, P., Lorca, X.: Combining tree partitioning, precedence, and incomparability constraints. Constraints 13(4) (2008)Google Scholar
- 3.Misc: Aosd.net wiki glossaryGoogle Scholar
- 4.Tarr, P., Ossher, H., Harrison, W., Sutton., S.M.: N degrees of separation: multi-dimensional separation of concerns. In: ICSE 1999: Proceedings of the 21st International Conference on Software Engineering, pp. 107–119. IEEE Computer Society Press, Los Alamitos (1999)Google Scholar
- 8.Chamberlin, D.D., Boyce, R.F.: Structured query language (1974)Google Scholar
- 10.Wadler, P.: Views: a way for pattern matching to cohabit with data abstraction. In: POPL 1987: Proceedings of the 14th ACM SIGACT-SIGPLAN symposium on Principles of Programming Languages, pp. 307–313. ACM, New York (1987)Google Scholar
- 13.Warth, A.: LazyJ: Seamless lazy evaluation in Java. In: FOOL/WOOD (2007)Google Scholar
- 16.Matsuda, K., Hu, Z., Nakano, K., Hamana, M., Takeichi, M.: Bidirectionalization transformation based on automatic derivation of view complement functions. In: ICFP 2007: Proceedings of the 12th ACM SIGPLAN International Conference on Functional Programming, pp. 47–58. ACM, New York (2007)CrossRefGoogle Scholar