Lazy Composition of Representations in Java

  • Rémi Douence
  • Xavier Lorca
  • Nicolas Loriant
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5634)


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.


Dynamic Optimization Polar Representation Adjacency List Colored Point Partial Conversion 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Mehlhorn, K., Sanders, P.: Algorithms and Data Structures. Springer, Heidelberg (2008)zbMATHGoogle Scholar
  2. 2.
    Beldiceanu, N., Flener, P., Lorca, X.: Combining tree partitioning, precedence, and incomparability constraints. Constraints 13(4) (2008)Google Scholar
  3. 3.
    Misc: wiki glossaryGoogle Scholar
  4. 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
  5. 5.
    Harrison, W., Ossher, H.: Subject-oriented programming: a critique of pure objects. In: OOPSLA 1993: Proceedings of the eighth annual conference on Object-Oriented Programming Systems, Languages, and Applications, pp. 411–428. ACM, New York (1993)CrossRefGoogle Scholar
  6. 6.
    Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Lopes, C.V., Loingtier, J.-M., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)CrossRefGoogle Scholar
  7. 7.
    Batory, D., O’Malley, S.: The design and implementation of hierarchical software systems with reusable components. ACM Transactions on Software Engineering and Methodology 1(4), 355–398 (1992)CrossRefGoogle Scholar
  8. 8.
    Chamberlin, D.D., Boyce, R.F.: Structured query language (1974)Google Scholar
  9. 9.
    Jackson, D.: Structuring Z specifications with views. ACM Transactions on Software Engineering and Methodology 4(4), 365–389 (1995)CrossRefGoogle Scholar
  10. 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
  11. 11.
    Gill, A., Launchbury, J., Peyton Jones, S.L.: A short cut to deforestation. In: FPCA 1993: Proceedings of the conference on Functional Programming Languages and Computer Architecture, pp. 223–232. ACM, New York (1993)CrossRefGoogle Scholar
  12. 12.
    Hughes, J.: Why Functional Programming Matters. Computer Journal 32(2), 98–107 (1989)CrossRefGoogle Scholar
  13. 13.
    Warth, A.: LazyJ: Seamless lazy evaluation in Java. In: FOOL/WOOD (2007)Google Scholar
  14. 14.
    Shankar, A., Bodík, R.: DITTO: automatic incrementalization of data structure invariant checks (in Java). In: PLDI 2007: Proceedings of the 2007 ACM SIGPLAN conference on Programming Language Design and Implementation, pp. 310–319. ACM, New York (2007)CrossRefGoogle Scholar
  15. 15.
    Acar, U.A., Ahmed, A., Blume, M.: Imperative self-adjusting computation. SIGPLAN Not. 43(1), 309–322 (2008)CrossRefzbMATHGoogle Scholar
  16. 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
  17. 17.
    Foster, J.N., Greenwald, M.B., Moore, J.T., Pierce, B.C., Schmitt, A.: Combinators for bi-directional tree transformations: a linguistic approach to the view update problem. SIGPLAN Not. 40(1), 233–246 (2005)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2009

Authors and Affiliations

  • Rémi Douence
    • 1
  • Xavier Lorca
    • 2
  • Nicolas Loriant
    • 3
  1. 1.École des Mines de NantesINRIA, LINA UMR 6241Nantes Cedex 3
  2. 2.École des Mines de NantesLINA UMR 6241Nantes Cedex 3
  3. 3.INRIA, LaBRITalence Cedex

Personalised recommendations