{"id":17998074,"url":"https://github.com/solodon4/cou","last_synced_at":"2025-10-20T05:51:20.343Z","repository":{"id":80975062,"uuid":"45967781","full_name":"solodon4/COU","owner":"solodon4","description":"Large, real-world class hierarchy benchmark","archived":false,"fork":false,"pushed_at":"2019-07-19T08:56:48.000Z","size":953,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-09T17:41:48.421Z","etag":null,"topics":["benchmark","classes","hierarchical-data","hierarchies-benchmark"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solodon4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-11-11T07:58:21.000Z","updated_at":"2022-12-31T16:50:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"c8bcfdd6-ffe0-4f13-8ccc-ac88c666749d","html_url":"https://github.com/solodon4/COU","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solodon4%2FCOU","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solodon4%2FCOU/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solodon4%2FCOU/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solodon4%2FCOU/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solodon4","download_url":"https://codeload.github.com/solodon4/COU/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247130771,"owners_count":20888651,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","classes","hierarchical-data","hierarchies-benchmark"],"created_at":"2024-10-29T21:23:47.976Z","updated_at":"2025-10-20T05:51:20.293Z","avatar_url":"https://github.com/solodon4.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"Class Hierarchies Benchmark  [![Build Status: Linux, OSX](https://travis-ci.org/solodon4/COU.svg?branch=master)](https://travis-ci.org/solodon4/COU) \n===========================\n\nThis project contains a large, real-world class hierarchy benchmark with 15246\nclasses and 63963 different derivation paths. [The benchmark](cou) was previously\nused in the literature to study efficiency of type inclusion testing and dispatching \ntechniques [1,2,3,4] and was maintained by Karel Driesen (see his original \n[readme](cou/README)).\n \nWhile working on [Mach7](http://bit.ly/Mach7) [5,6] we've tried to find this benchmark \nfor our own experiments, but the original links were broken. Eventually we could \ndig up a version of it from \n[archive.org](http://web.archive.org/web/20050403120458/http://www.cs.ucsb.edu/labs/oocsb/),\nWe revive it here for researchers to use, along with the translator to C++, we \nwrote for our own experiments.\n\nCOU to C++ Translator\n---------------------\n\nWhile all the hierarchies were man-made, not all class hierarchies originated \nfrom C++, and sometimes used certain kinds of inheritance, not allowed in C++.\nThis is why during conversion to C++, [COU parser](parser) prunes inaccessible base classes \n(direct base class that is already an indirect base class) when used with repeated \ninheritance in order to satisfy semantic requirements of C++. It maintains \nthe same number of virtual functions present in each class as well as the number \nof data members; the benchmarks, however, did not preserve the exact types of those.\n\nStats on Class Hierarchies in the Benchmark\n-------------------------------------------\n\nThe following table shows various parameters of the class hierarchies in each benchmark, after their adoption to C++: \n\n|Library | Language    | Classes| Paths| Height| Roots| Leafs| Both| Prnt(avg) | Prnt(max) | Chld(avg) | Chld(max) | Name              |\n|:-------|:------------|-------:|-----:|------:|-----:|-----:|----:|:----------|----------:|----------:|----------:|:------------------|\n|    DG2 | Smalltalk   |     534|   534|     11|     2|   381|    1| 1         |          1|       3.48|         59| digitalk2         |\n|    DG3 | Smalltalk   |    1356|  1356|     13|     2|   923|    1| 1         |          1|       3.13|        142| digitalk3         |\n|    ET+ | C++         |     370|   370|      8|    87|   289|   79| 1         |          1|       3.49|         51| et++              |\n|    GEO | Eiffel      |    1318| 13798|     14|     1|   732|    0| 1.89      |         16|       4.75|        323| geode             |\n|    JAV | Java        |     604|   792|     10|     1|   445|    0| 1.08      |          3|       4.64|        210| java              |\n|    LOV | Eiffel      |     436|  1846|     10|     1|   218|    0| 1.72      |         10|       3.55|         78| lov-object-editor |\n|    NXT | Objective-C |     310|   310|      7|     2|   246|    1| 1         |          1|       4.81|        142| nextstep          |\n|    SLF | Self        |    1801| 36420|     17|    51|  1134|    0| 1.05      |          9|       2.76|        232| self              |\n|    UNI | C++         |     613|   633|      9|   147|   481|  117| 1.02      |          2|       3.61|         39| unidraw           |\n|        |             |      51|    51|      7|     1|    29|    0| 1.00      |          1|       2.27|          5| v1-collection     |\n|        |             |      18|    18|      5|     1|    11|    0| 1.00      |          1|       2.43|          5| v1-magnitude      |\n|        |             |     383|   383|      9|     1|   244|    0| 1.00      |          1|       2.75|         86| v1-object-nometa  |\n|        |             |       9|     9|      5|     1|     4|    0| 1.00      |          1|       1.60|          2| v1-set            |\n|        |             |      16|    16|      7|     1|     7|    0| 1.00      |          1|       1.67|          2| v1-stream         |\n|        |             |      53|    53|      8|     1|    31|    0| 1.00      |          1|       2.36|          7| v1-visualcomponent|\n|    VA2a| Smalltalk   |    3241|  3241|     14|     1|  2582|    0| 1         |          1|       4.92|        249| visualage2.all    |\n|    VA2k| Smalltalk   |    2320|  2320|     13|     1|  1868|    0| 1         |          1|       5.13|        240| visualage2.kern   |\n|    VW1 | Smalltalk   |     387|   387|      9|     1|   246|    0| 1         |          1|       2.74|         87| visualworks1      |\n|    VW2 | Smalltalk   |    1956|  1956|     15|     1|  1332|    0| 1         |          1|       3.13|        181| visualworks2      |\n|        |             |       6|     9|      4|     2|     1|    0| 1.50      |          2|       1.20|          2| vtbl              |\n|        | **OVERALLS**|   15246| 63963|     17|   298| 10877|  199| 1.11      |         16|       3.89|        323| Overalls          |\n\nThe number of paths represents the number of distinct inheritance paths from the \nclasses in the hierarchy to the roots of the hierarchy. This number reflects the number of possible subobjects in the \nhierarchy. The roots listed in the table are classes with no base classes. We \nwill subsequently use the term \"non-leaf\" to refer to the possible root of \na subhierarchy. Leafs are classes with no children, while \"both\" refers to \nutility classes that are both roots and leafs and thus neither have base nor \nderived classes. The average for the number of parents and the number of \nchildren were computed only among the classes having at least one parent or at \nleast one child correspondingly.\n\n71% of the classes in the entire benchmarks suite were leaf classes. \nOut of the 4369 non-leaf classes, 36% were spawning a subhierarchy of only \n2 classes (including the root), 15% -- a subhierarchy of 3 classes, \n10% of 4, 7% of 5 and so forth. Turning this into a cumulative distribution, \nM of subhierarchies had more than N classes in them:\n\n M |  1% |  3% | 5% | 10% | 20% | 25% | 50% | 64% | 100%\n---|-----|-----|----|-----|-----|-----|-----|-----|-----\n N | 700 | 110 | 50 |  20 |  10 |   7 |   3 |   2 |    1\n\nWhich means 1% of subhierarchies had more than 700 classes in them, 3% of subhierarchies \nhad more than 110 classes, 5% of subhierarchies had more than 50 classes, 10% \nof subhierarchies had more than 20 classes, 20% of subhierarchies had more than \n10 classes, 25% of hierarchies had more than 7 classes, only 50% of \nhierarchies had more than 3 classes and 64% -- more than 2.\n\nReferences\n----------\n\n1. J. Vitek, R. N. Horspool, and A. Krall. Efficient type inclusion tests. In Proc. of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, OOPSLA '97, pages 142-157, New York, NY, USA, 1997. ACM.\n2. A. Krall, J. Vitek, and R. N. Horspool. Near optimal hierarchical encoding of types. In In Proc. European Conference on Object-Oriented Programming, ECOOP'97, Lecture Notes in Computer Science, pages 128-145. Springer-Verlag, 1997.\n3. Y. Zibin and J. Y. Gil. Efficient subtyping tests with PQencoding. In Proc. of the 16th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, OOPSLA '01, pages 96-107, New York, NY, USA, 2001. ACM.\n4. R. Ducournau. Perfect hashing as an almost perfect subtype test. ACM Trans. Program. Lang. Syst., 30(6):33:1-33:56, Oct. 2008. ISSN 0164-0925.\n5. Y. Solodkyy, G. Dos Reis, and B. Stroustrup. Open and efficient type switch for C++. In Proc. OOPSLA'12, pp 963-982. ACM.\n6. Y. Solodkyy, G. Dos Reis, and B. Stroustrup. Open pattern matching for C++. In Proc. GPCE'13. ACM, October 2013.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolodon4%2Fcou","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolodon4%2Fcou","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolodon4%2Fcou/lists"}