The Beauty and the Beast: Separating Design from Algorithm

  • Dmitrijs Zaparanuks
  • Matthias Hauswirth
Part of the Lecture Notes in Computer Science book series (LNCS, volume 6813)

Abstract

We present an approach that partitions a software system into its algorithmically essential parts and the parts that manifest its design. Our approach is inspired by the notion of an algorithm and its asymptotic complexity. However, we do not propose a metric for measuring asymptotic complexity (efficiency). Instead, we use the one aspect of algorithms that drives up their asymptotic complexity – repetition, in the form of loops and recursions – to determine the algorithmically essential parts of a software system. Those parts of a system that are not algorithmically essential represent aspects of the design. A large fraction of inessential parts is indicative of “overdesign”, where a small fraction indicates a lack of modularization. We present a metric, relative essence, to quantify the fraction of the program that is algorithmically essential. We evaluate our approach by studying the algorithmic essence of a large corpus of software system, and by comparing the measured essence to an intuitive view of design “overhead”.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Bacon, D.F., Sweeney, P.F.: Fast static analysis of c++ virtual function calls. In: OOPSLA 1996: Proceedings of the 11th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications, pp. 324–341. ACM, New York (1996)Google Scholar
  2. 2.
    Blackburn, S.M., Garner, R., Hoffman, C., Khan, A.M., McKinley, K.S., Bentzur, R., Diwan, A., Feinberg, D., Frampton, D., Guyer, S.Z., Hirzel, M., Hosking, A., Jump, M., Lee, H., Moss, J.E.B., Phansalkar, A., Stefanović, D., VanDrunen, T., von Dincklage, D., Wiedermann, B.: The DaCapo benchmarks: Java benchmarking development and analysis. In: OOPSLA 2006: Proceedings of the 21st annual ACM SIGPLAN conference on Object-Oriented Programing, Systems, Languages, and Applications, oct 2006, pp. 169–190. ACM Press, New York (2006)CrossRefGoogle Scholar
  3. 3.
    Brooks Jr., F.P.: The mythical man-month. (anniversary ed.)Addison-Wesley Longman Publishing Co., Inc., Boston (1995)Google Scholar
  4. 4.
    Chidamber, S.R., Kemerer, C.F.: A metrics suite for object oriented design. IEEE Trans. Softw. Eng. 20(6), 476–493 (1994)CrossRefGoogle Scholar
  5. 5.
    Fowler, M.: Refactoring: improving the design of existing code. Addison-Wesley Longman Publishing Co., Inc., Boston (1999)MATHGoogle Scholar
  6. 6.
    Gamma, E., Helm, R., Johnson, R., Vlissides, J.: Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, Boston (1995)MATHGoogle Scholar
  7. 7.
    Havlak, P.: Nesting of reducible and irreducible loops. ACM Trans. Prog. Lang. Syst. 19(4), 557–567 (1997)CrossRefGoogle Scholar
  8. 8.
    Hecht, M.S., Ullman, J.D.: Flow graph reducibility. In: STOC 1972: Proceedings of the Fourth Annual ACM Symposium on Theory of Computing, pp. 238–250. ACM, New York (1972)CrossRefGoogle Scholar
  9. 9.
    Lincke, R., Lundberg, J., Löwe, W.: Comparing software metrics tools. In: Proceedings of the 2008 International Symposium on Software Testing and Analysis, ISSTA 2008, pp. 131–142. ACM, New York (2008)CrossRefGoogle Scholar
  10. 10.
    McCabe, T.: A complexity measure. IEEE Transactions on Softw. Eng. SE-2(4), 308–320 (1976)CrossRefMATHMathSciNetGoogle Scholar
  11. 11.
    Mitchell, N., Schonberg, E., Sevitsky, G.: Four trends leading to java runtime bloat. IEEE Software 27(1), 56–63 (2010)CrossRefGoogle Scholar
  12. 12.
    ObjectWeb. ASM. Web pages at, http://asm.objectweb.org/
  13. 13.
    Parnas, D.L.: On the criteria to be used in decomposing systems into modules. Commun. ACM 15, 1053–1058 (1972)CrossRefGoogle Scholar
  14. 14.
    Ramalingam, G.: On loops, dominators, and dominance frontiers. ACM Trans. Program. Lang. Syst. 24(5), 455–490 (2002)CrossRefGoogle Scholar
  15. 15.
    Riehle, D.: Design pattern density defined. In: OOPSLA 2009: Proceeding of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications, pp. 469–480. ACM, New York (2009)CrossRefGoogle Scholar
  16. 16.
    Skiena, S.S.: Compiler optimization by detecting recursive subprograms. In: ACM 1985: Proceedings of the 1985 ACM Annual Conference on The Range of computing: mid-80’s Perspective, pp. 403–411. ACM, New York (1985)Google Scholar
  17. 17.
    SPEC. SPECjvm2008 (Java Virtual Machine Benchmark), http://www.spec.org/jvm2008/
  18. 18.
    Sreedhar, V.C., Gao, G.R., Lee, Y.-F.: Identifying loops using dj graphs. ACM Trans. Program. Lang. Syst. 18(6), 649–658 (1996)CrossRefGoogle Scholar
  19. 19.
    Steensgaard, B.: Sequentializing program dependence graphs for irreducible programs. Technical Report MSR-TR-93-14, Microsoft Research (October 1993)Google Scholar
  20. 20.
    Tempero, E., Anslow, C., Dietrich, J., Han, T., Li, J., Lumpe, M., Melton, H., Noble, J.: Qualitas corpus: A curated collection of java code for empirical studies. In: 2010 Asia Pacific Software Engineering Conference (APSEC 2010) (December 2010)Google Scholar
  21. 21.
    Zaparanuks, D., Hauswirth, M.: Characterizing the design and performance of interactive java applications. In: IEEE International Symposium on Performance Analysis of Systems Software (ISPASS 2010), March 28-30, pp. 23–32 (2010)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • Dmitrijs Zaparanuks
    • 1
  • Matthias Hauswirth
    • 1
  1. 1.University of LuganoLuganoSwitzerland

Personalised recommendations