Analyzing Scale-Free Properties in Erlang and Scala

  • Gábor Oláh
  • Gergely Nagy
  • Zoltán PorkolábEmail author
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10094)


The optimal modularization and the right level of coupling between components are important for the overall quality of software systems. Although the generic suggestion is to minimize the coupling between modules, earlier research on object-oriented programming showed that there is a natural limit to eliminating dependencies between classes. In our research we extend these findings for non-OOP systems and show that this limitation seems to be paradigm-independent. For this purpose we define paradigm-agnostic metrics for coupling and evaluate them. Our results, measuring Scala and Erlang sources, prove that the coupling behavior shows scale-free properties. Our contribution could be useful to avoid unnecessary or harmful code refactors to chase overall low coupling in systems.


  1. 1.
    Stevens, W.P., Myers, G.J., Constantine, L.L.: Structured design. IBM Syst. J. 13(2), 115–139 (1974)CrossRefGoogle Scholar
  2. 2.
    Porkoláb, Z., Zsók, V.: Teaching multiparadigm programming based on object-oriented experiences. Teach. Math. Comput. Sci. 5(1), 171–182 (2006)CrossRefGoogle Scholar
  3. 3.
    Odersky, M., Spoon, L., Venners, B.: Scala (2011). Accessed 28 Aug 2012
  4. 4.
    Armstrong, J.: Programming Erlang: Software for a Concurrent World. Pragmatic Bookshelf, Raleigh (2007)Google Scholar
  5. 5.
    Newman, M.E.J., Barabási, A., Watts, D.J.: The Structure and Dynamics of Networks. Princeton University Press, Princeton (2006)zbMATHGoogle Scholar
  6. 6.
    Barabási, A.: Emergence of scaling in random networks. Science 286(5439), 509–512 (1999)MathSciNetCrossRefGoogle Scholar
  7. 7.
    Erdős, P., Rényi, A.: On the evolution of random graphs. Publ. Math. Inst. Hung. Acad. Sci. 5, 17–61 (1960)MathSciNetzbMATHGoogle Scholar
  8. 8.
    de Moura, A.P.S., Lai, Y.-C., Motter, A.E.: Signatures of small-world and scale-free properties in large computer programs. Phys. Rev. E 68, 017102 (2003)CrossRefGoogle Scholar
  9. 9.
    Yao, Y., Huang, S., Liu, X., Ren, Z.: Scale-free property in large scale object-oriented software and its significance on software engineering. In: Information and Computing Science, ICIC 2009 (2009)Google Scholar
  10. 10.
    Bokor, A., Burcsi, P., Kátai-Pál, G., Kovács, A., Nagy, P., Tátrai, A.: Complexity of the AXD301 software. ELTE eScience Regional Knowledge Center, ELTE CNL, Internal Research Report (personal communication) (2004)Google Scholar
  11. 11.
    Szabados, K.: Structural analysis of large TTCN-3 projects. In: Núñez, M., Baker, P., Merayo, M.G. (eds.) FATES/TestCom 2009. LNCS, vol. 5826, pp. 241–246. Springer, Heidelberg (2009). Scholar
  12. 12.
    Onnela, J.-P., et al.: Structure and tie strengths in mobile communication networks. Proc. Natl. Acad. Sci. 104(18), 7332–7336 (2007)CrossRefGoogle Scholar
  13. 13.
    Cohen, R., Erez, K., ben Avraham, D., Havlin, S.: Resilience of the internet to random breakdowns. Phys. Rev. Lett. 85, 4626–4628 (2000)CrossRefGoogle Scholar
  14. 14.
    Cohen, R., Erez, K., ben Avraham, D., Havlin, S.: Breakdown of the internet under intentional attack. Phys. Rev. Lett. 86, 3682–3685 (2001)CrossRefGoogle Scholar
  15. 15.
    Callaway, D.S., Newman, M.E.J., Strogatz, S.H., Watts, D.J.: Network robustness and fragility: percolation on random graphs. Phys. Rev. Lett. 85, 5468–5471 (2000)CrossRefGoogle Scholar
  16. 16.
    Taube-Schock, C., Walker, R.J., Witten, I.H.: Can we avoid high coupling? In: Mezini, M. (ed.) ECOOP 2011. LNCS, vol. 6813, pp. 204–228. Springer, Heidelberg (2011). Scholar
  17. 17.
    Clauset, A., Shalizi, C.R., Newman, M.E.J.: Power-law distributions in empirical data. SIAM Rev. 51(4), 661–703 (2009)MathSciNetCrossRefGoogle Scholar
  18. 18.
    McCabe, T.J.: A complexity measure. IEEE Trans. Softw. Eng. 2(4), 308–320 (1976)MathSciNetCrossRefGoogle Scholar
  19. 19.
    Weyuker, E.J.: Evaluating software complexity measures. IEEE Trans. Softw. Eng. 14(9), 1357–1365 (1988)MathSciNetCrossRefGoogle Scholar
  20. 20.
    Briand, L.C., Morasca, S., Basili, V.R.: Property-based software engineering measurement. IEEE Trans. Softw. Eng. 22(1), 68–86 (1996). Scholar
  21. 21.
    RefactorErl webpage (2015).
  22. 22.
    Erlang OTP homepage (2015).
  23. 23.
    Horpácsi, D., Kőszegi, J.: Static analysis of function calls in Erlang. Refining the static function call graph with dynamic call information by using data-flow analysis. e-Informatica Softw. Eng. J. 7(1), 65–76 (2013)Google Scholar
  24. 24.
    Scala repository on GitHub (2015).
  25. 25.
    Fehér, G., Békés, A.G.: ECT: an object-oriented extension to Erlang. In: Proceedings of the 8th ACM SIGPLAN Workshop on ERLANG, ERLANG 2009, pp. 51–62. ACM, New York (2009)Google Scholar

Copyright information

© Springer Nature Switzerland AG 2019

Authors and Affiliations

  1. 1.Department of Programming Languages and CompilersEötvös Loránd UniversityBudapestHungary

Personalised recommendations