The Beauty and the Beast: Separating Design from Algorithm

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".

[1]  Rüdiger Lincke,et al.  Comparing software metrics tools , 2008, ISSTA '08.

[2]  David F. Bacon,et al.  Fast static analysis of C++ virtual function calls , 1996, OOPSLA '96.

[3]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[4]  G. Ramalingam,et al.  On loops, dominators, and dominance frontiers , 2002, TOPL.

[5]  Steven Skiena,et al.  Compiler optimization by detecting recursive subprograms , 1985, ACM '85.

[6]  Edith Schonberg,et al.  Four Trends Leading to Java Runtime Bloat , 2010, IEEE Software.

[7]  Dirk Riehle Design pattern density defined , 2009, OOPSLA.

[8]  Guang R. Gao,et al.  Identifying loops using DJ graphs , 1996, TOPL.

[9]  Paul Havlak,et al.  Nesting of reducible and irreducible loops , 1997, TOPL.

[10]  Fred P. Brooks,et al.  The Mythical Man-Month , 1975, Reliable Software.

[11]  Jeffrey D. Ullman,et al.  Flow graph reducibility , 1972, SIAM J. Comput..

[12]  Jr. Frederick P. Brooks,et al.  The mythical man-month (anniversary ed.) , 1995 .

[13]  Matthias Hauswirth,et al.  Characterizing the design and performance of interactive java applications , 2010, 2010 IEEE International Symposium on Performance Analysis of Systems & Software (ISPASS).

[14]  Bjarne Steensgaard Sequentializing Program Dependence Graphs for Irreducible Programs , 1993 .

[15]  Jing Li,et al.  The Qualitas Corpus: A Curated Collection of Java Code for Empirical Studies , 2010, 2010 Asia Pacific Software Engineering Conference.

[16]  Amer Diwan,et al.  The DaCapo benchmarks: java benchmarking development and analysis , 2006, OOPSLA '06.

[17]  Anas N. Al-Rabadi,et al.  A comparison of modified reconstructability analysis and Ashenhurst‐Curtis decomposition of Boolean functions , 2004 .

[18]  D. L. Parnas,et al.  On the criteria to be used in decomposing systems into modules , 1972, Software Pioneers.

[19]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .