Skip to main content

A linear algorithm to decompose inheritance graphs into modules


Inheritance graphs of object-oriented languages can be decomposed into independent subgraphs, or modules, which are inheritance graphs themselves. This paper is devoted to the study of efficient algorithms of decomposition into modules similar to substitution decomposition algorithms. For 2-connected inheritance graphs we search for maximal modules (under inclusion), whereas we show that the significant modules of non-2-connected graphs are the biconnected components. For the 2-connected case, a method based upon a property of greedy linear extensions is proposed. However, in both cases a linear-time complexity algorithm is provided to decompose into modules. Furthermore, the algorithm can be inserted into the inheritance mechanism (such as in CLOS [14]).

This is a preview of subscription content, access via your institution.


  1. A. V. Aho, M. R. Garey, J. D. Ullman, The transitive reduction of a directed graph,SIAM J. Comput.,1 (1972), 131–137.

    Google Scholar 

  2. A. V. Aho, J. E. Hopcroft, J. D. Ullman,The Design and Analysis of Computer Algorithms, Addison-Wesley, Reading, MA, 1975.

    Google Scholar 

  3. H. Aït-Kaci, R. Boyer, P. Lincoln, R. Nasr, Efficient implementation of lattice operations,ACM Trans. Programming Languages and Systems,11 (1989), 115–146.

    Google Scholar 

  4. V. Bouchitté, M. Habib, The calculation of invariants for ordered sets, inAlgorithms and Order (I. Rival, ed.), Kluwer, Dordrecht, 1989, pp. 231–279.

    Google Scholar 

  5. O. Cogis, M. Habib, Nombre de sauts et graphes série-parallèles,RAIRO Inform. Théor. Inform.,13 (1979), 3–18.

    Google Scholar 

  6. G. Di Battista, R. Tamassia, L. G. Tollis, Area requirement and symmetry display in drawing graphs.Proc. ACM Symposium on Computational Geometry, 1989.

  7. R. Ducournau,Y3, version 3, SEMA-GROUP, Paris, 1988.

    Google Scholar 

  8. R. Ducournau, M. Habib, La multiplicité de l'héritage dans les langages à objets,Tech. Sci. Inform.,8 (1989), 41–62.

    Google Scholar 

  9. M. Habib, M. Huchard, A linear algorithm to decompose inheritance graphs into modules. Rapport de recherche CRIM no. 81, 1990.

  10. M. Habib, M. C. Maurer, On theX-join decomposition for undirected graphs,Discrete Appl. Math.,1 (1979), 201–207.

    Google Scholar 

  11. M. Huchard, Sur quelques questions algorithmiques de l'hℰitage multiple. Thèse de doctorat, Université Montpellier II, 1992.

  12. M. Huchard, M. L. Mugnier, M. Habib, R. Ducournau, Towards a unique multiple inheritance linearisation,Proc. EurOOp'e 91, Bratislava, 1991.

  13. H. A. Kierstead, W. T. Trotter, The number of depth-first searches of an ordered set,Order,6 (1990), 295–304.

    Google Scholar 

  14. L. G. de Michiel, R. P. Gabriel, The common lisp object system: an overview.Proc. ECOOP '87, 1987, pp. 201–202.

  15. J. H. Muller, J. Spinrad, Incremental modular decomposition,J. Assoc. Comput. Mach.,36 (1989), 1–19.

    Google Scholar 

  16. O. Pretzel, Problem submitted at the Oberwolfach Conference on Combinatorics and Ordered Sets, 1985.

  17. J. Spinrad, P4-Trees and the substitution decomposition,Discrete Appl. Math. 39 (1992), 263–291.

    Google Scholar 

  18. R. E. Tarjan, Depth-first search and linear graph algorithms.SIAM J. Comput.,1 (1972), 146–160.

    Google Scholar 

  19. J. Valdes, R. E. Tarjan, E. L. Lawlers, The recognition of series parallel digraphs,SIAM J. Comput.,11 (1982), 298–314.

    Google Scholar 

  20. P. Wegner, Concepts and paradigms of object-oriented programming,OOPS Messenger,1(1) (1990).

Download references

Author information

Authors and Affiliations


Additional information

Communicated by J.-D. Boissonnat.

Rights and permissions

Reprints and Permissions

About this article

Cite this article

Habib, M., Huchard, M. & Spinrad, J. A linear algorithm to decompose inheritance graphs into modules. Algorithmica 13, 573–591 (1995).

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI:

Key words