## Near optimal hierarchical encoding of types (1997)

### Cached

### Download Links

- [www.cs.purdue.edu]
- [www.cs.purdue.edu]
- [www.csr.uvic.ca]
- [www.informatik.uni-rostock.de]
- [www.complang.tuwien.ac.at]
- DBLP

### Other Repositories/Bibliography

Venue: | In Proc. European Conference on Object-Oriented Programming, ECOOP'97, Lecture Notes in Computer Science |

Citations: | 25 - 3 self |

### BibTeX

@INPROCEEDINGS{Krall97nearoptimal,

author = {Andreas Krall and Jan Vitek and R. Nigel Horspool},

title = {Near optimal hierarchical encoding of types},

booktitle = {In Proc. European Conference on Object-Oriented Programming, ECOOP'97, Lecture Notes in Computer Science},

year = {1997},

pages = {128--145},

publisher = {Springer-Verlag}

}

### Years of Citing Articles

### OpenURL

### Abstract

Abstract. A type inclusion test is a procedure to decide whether two types are related by a given subtyping relationship. An efficient implementation of the type inclusion test plays an important role in the performance of object oriented programming languages with multiple subtyping like C++, Eiffel or Java. There are well-known methods for performing fast constant time type inclusion tests that use a hierarchical bit vector encoding of the partial ordered set representing the type hierarchy. The number of instructions required by the type inclusion test is proportional to the length of those bit vectors. We present a new algorithm based on graph coloring which computes a near optimal hierarchical encoding of type hierarchies. The new algorithm improves significantly on previous results – it is faster, simpler and generates smaller bit vectors. 1

### Citations

133 |
Coloring heuristics for register allocation
- Briggs, Cooper, et al.
- 1989
(Show Context)
Citation Context ...es and 200000 edges (see table 6). There is, however, a class of very fast heuristic algorithms which give good results on most graphs and are used, for example, in graph coloring register allocators =-=[BCKT93]-=-. These sequential vertex coloring algorithms [MMI72] have a run time which is linear in the numberofvertices plus the number of edges in the con ict graph [MB83]. All these algorithms order the verti... |

118 | Efficient Implementation of Lattice Operations
- Aït-Kaci, Boyer, et al.
- 1989
(Show Context)
Citation Context ... to single inheritance hierarchies. Caseau took a di erent path based on hierarchical top down encoding. He was inspired by a method originally developed for fast implementation of lattice operations =-=[ABLN89]-=- based on hierarchical bottom up encoding and adapted it to the type inclusion problem[Cas93]. Caseau's scheme computes a bit vector for each type. The bit vector represents a set of genes, where a ge... |

91 |
Genetic and hybrid algorithms for graph coloring
- Fleurent, Ferland
- 1996
(Show Context)
Citation Context ...matic number for very small graphs (up to 100 vertices), there are probabilistic algorithms with almost polynomial run time [EL89] and there are genetic, tabu and hybrid algorithms for graph coloring =-=[FF95]-=-. But all these algorithms are unusable for the large con ict graphs which wemust construct for type hierarchies. The graphs may have 2000 vertices and 200000 edges (see table 6). There is, however, a... |

59 |
Smallest-last ordering and clustering and graph coloring algorithms
- Matula, Beck
- 1983
(Show Context)
Citation Context ... graph coloring register allocators [BCKT93]. These sequential vertex coloring algorithms [MMI72] have a run time which is linear in the numberofvertices plus the number of edges in the con ict graph =-=[MB83]-=-. All these algorithms order the vertices according to some predetermined criteria and color the vertices in this order. If no color, out of those used so far, can be reused for the current vertex, th... |

52 | Type extensions
- Wirth
- 1988
(Show Context)
Citation Context ... = 101 f2g = 010 , d e f f1g = 001 , , , @ @ @ , @ , @ @ f3g = 100 Fig. 2. Hierarchical encoding (bottom up) One `obvious' algorithm for implementing the type inclusion test is that described by Wirth=-=[Wir88]-=-. To test if x<:y, the algorithm proceeds up the inheritance hierarchy starting from x to see if y is an ancestor. However, the algorithm does not run in constant time, which is a problem if the hiera... |

47 |
Efficient handling of multiple inheritance hierarchies
- Caseau
- 1993
(Show Context)
Citation Context ... encoding. He was inspired by a method originally developed for fast implementation of lattice operations [ABLN89] based on hierarchical bottom up encoding and adapted it to the type inclusion problem=-=[Cas93]-=-. Caseau's scheme computes a bit vector for each type. The bit vector represents a set of genes, where a gene is represented by a natural number. Each type that has only one parent in the hierarchy ha... |

33 |
Graph coloring algorithms
- Matula, Marble, et al.
- 1972
(Show Context)
Citation Context ...a class of very fast heuristic algorithms which give good results on most graphs and are used, for example, in graph coloring register allocators [BCKT93]. These sequential vertex coloring algorithms =-=[MMI72]-=- have a run time which is linear in the numberofvertices plus the number of edges in the con ict graph [MB83]. All these algorithms order the vertices according to some predetermined criteria and colo... |

28 |
Type-extension type tests can be performed in constant time. Programming languages and systems 13(4
- Cohen
- 1991
(Show Context)
Citation Context ...-up in the matrix much slower [DDH84].) Cohen showed how the type inclusion test can be implemented in constant time using the concept of displays to precompute paths through the inheritance hierarchy=-=[Coh91]-=-. However, Cohen's method uses more memory than Wirth's and, in its original form, is applicable only to single inheritance hierarchies. Caseau took a di erent path based on hierarchical top down enco... |

24 |
Optimization of parser tables for portable compilers
- Dencker, Dürre, et al.
- 1984
(Show Context)
Citation Context ...an be very large. If there are 2000 types, the matrix will consume nearly 500 KB. (There are a number of schemes for compacting the matrix at the expense of making a look-up in the matrix much slower =-=[DDH84]-=-.) Cohen showed how the type inclusion test can be implemented in constant time using the concept of displays to precompute paths through the inheritance hierarchy[Coh91]. However, Cohen's method uses... |

20 |
the Java Team. The Java Application Programming Interface
- Gosling, Yellin
- 1996
(Show Context)
Citation Context ...er approaches. As test data, we used a 11scollection of class libraries compiled by Karel Driesen. We also obtained the Laure type hierarchy from Yves Caseau [Cas93] and the Java API library from Sun =-=[GYT96]-=-. Table 2 presents the relevant characteristics of those libraries. The number of classes varies from 225 to 1956, representing both big applications and libraries. The depth of the hierarchy ranges f... |

3 |
A Las Vegas graph coloring algorithm
- Ellis, Lepolesa
- 1989
(Show Context)
Citation Context ...lete problem. There exist backtracking algorithms which can compute the chromatic number for very small graphs (up to 100 vertices), there are probabilistic algorithms with almost polynomial run time =-=[EL89]-=- and there are genetic, tabu and hybrid algorithms for graph coloring [FF95]. But all these algorithms are unusable for the large con ict graphs which wemust construct for type hierarchies. The graphs... |

3 |
and Lhouari Nourine. Tree structure for distributive lattices and its applications
- Habib
- 1996
(Show Context)
Citation Context ...ncorrect encoding produced by Caseau's algorithm Habib and Nourine showed that constructing an optimal bit vector encoding for partially ordered sets is NP-hard [HN94]. They also showed in [HN94] and =-=[HN96]-=- that there exist some classes of lattices (distributive and simplicial lattices) where, for an optimal solution, all genes have to be di erent. For these classes of lattices, therefore, an optimal so... |

1 |
and Lhouari Nourine. Bit-vector encoding for partially ordered sets
- Habib
- 1994
(Show Context)
Citation Context ... @ @ @ @ @ , , f2,3g f2,4g Fig. 3. An incorrect encoding produced by Caseau's algorithm Habib and Nourine showed that constructing an optimal bit vector encoding for partially ordered sets is NP-hard =-=[HN94]-=-. They also showed in [HN94] and [HN96] that there exist some classes of lattices (distributive and simplicial lattices) where, for an optimal solution, all genes have to be di erent. For these classe... |