<?xml version="1.0" encoding="utf-8"?>
<TEI xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:hal="http://hal.archives-ouvertes.fr/" xmlns:gml="http://www.opengis.net/gml/3.3/" xmlns:gmlce="http://www.opengis.net/gml/3.3/ce" version="1.1" xsi:schemaLocation="http://www.tei-c.org/ns/1.0 http://api.archives-ouvertes.fr/documents/aofr-sword.xsd">
  <teiHeader>
    <fileDesc>
      <titleStmt>
        <title>HAL TEI export of hal-04414603</title>
      </titleStmt>
      <publicationStmt>
        <distributor>CCSD</distributor>
        <availability status="restricted">
          <licence target="https://creativecommons.org/publicdomain/zero/1.0/">CC0 1.0 - Universal</licence>
        </availability>
        <date when="2026-05-02T08:58:06+02:00"/>
      </publicationStmt>
      <sourceDesc>
        <p part="N">HAL API Platform</p>
      </sourceDesc>
    </fileDesc>
  </teiHeader>
  <text>
    <body>
      <listBibl>
        <biblFull>
          <titleStmt>
            <title xml:lang="en">Controlling the C3 Super Class Linearization Algorithm for Large Hierarchies of Classes</title>
            <author role="aut">
              <persName>
                <forename type="first">Florent</forename>
                <surname>Hivert</surname>
              </persName>
              <email type="md5">47ff8a87d0f424e8b6c4d5843fdce17c</email>
              <email type="domain">lri.fr</email>
              <idno type="idhal" notation="string">florent-hivert</idno>
              <idno type="idhal" notation="numeric">3065</idno>
              <idno type="halauthorid" notation="string">18079-3065</idno>
              <idno type="IDREF">https://www.idref.fr/118402129</idno>
              <idno type="ORCID">https://orcid.org/0000-0002-7531-5985</idno>
              <idno type="ISNI">http://isni.org/isni/0000000358431105</idno>
              <idno type="VIAF">https://viaf.org/viaf/204935359</idno>
              <affiliation ref="#struct-1062147"/>
            </author>
            <author role="aut">
              <persName>
                <forename type="first">Nicolas</forename>
                <forename type="middle">M.</forename>
                <surname>Thiéry</surname>
              </persName>
              <email type="md5">020945b9929864fafcfe0fd2d2457bd7</email>
              <email type="domain">u-psud.fr</email>
              <ptr type="url" target="https://Nicolas.Thiery.name"/>
              <idno type="idhal" notation="string">nthiery</idno>
              <idno type="idhal" notation="numeric">2393</idno>
              <idno type="halauthorid" notation="string">117482-2393</idno>
              <idno type="ORCID">https://orcid.org/0000-0002-2735-8921</idno>
              <idno type="IDREF">https://www.idref.fr/153152400</idno>
              <idno type="VIAF">https://viaf.org/viaf/279977747</idno>
              <affiliation ref="#struct-1062147"/>
            </author>
            <editor role="depositor">
              <persName>
                <forename>Nicolas M.</forename>
                <surname>Thiéry</surname>
              </persName>
              <email type="md5">ce2429e45c94150b2db8db2d607c245d</email>
              <email type="domain">universite-paris-saclay.fr</email>
            </editor>
          </titleStmt>
          <editionStmt>
            <edition n="v1" type="current">
              <date type="whenSubmitted">2024-01-24 13:17:25</date>
              <date type="whenModified">2025-03-21 03:15:29</date>
              <date type="whenReleased">2024-01-24 13:17:25</date>
              <date type="whenProduced">2022-07-15</date>
              <ref type="externalLink" target="http://arxiv.org/pdf/2401.12740"/>
            </edition>
            <respStmt>
              <resp>contributor</resp>
              <name key="106638">
                <persName>
                  <forename>Nicolas M.</forename>
                  <surname>Thiéry</surname>
                </persName>
                <email type="md5">ce2429e45c94150b2db8db2d607c245d</email>
                <email type="domain">universite-paris-saclay.fr</email>
              </name>
            </respStmt>
          </editionStmt>
          <publicationStmt>
            <distributor>CCSD</distributor>
            <idno type="halId">hal-04414603</idno>
            <idno type="halUri">https://hal.science/hal-04414603</idno>
            <idno type="halBibtex">hivert:hal-04414603</idno>
            <idno type="halRefHtml">&lt;i&gt;Order&lt;/i&gt;, 2022, 41, pp.83-98. &lt;a target="_blank" href="https://dx.doi.org/10.1007/s11083-022-09607-5"&gt;&amp;#x27E8;10.1007/s11083-022-09607-5&amp;#x27E9;&lt;/a&gt;</idno>
            <idno type="halRef">Order, 2022, 41, pp.83-98. &amp;#x27E8;10.1007/s11083-022-09607-5&amp;#x27E9;</idno>
            <availability status="restricted"/>
          </publicationStmt>
          <seriesStmt>
            <idno type="stamp" n="CNRS">CNRS - Centre national de la recherche scientifique</idno>
            <idno type="stamp" n="CENTRALESUPELEC">Ecole CentraleSupélec</idno>
            <idno type="stamp" n="UNIV-PARIS-SACLAY">Université Paris-Saclay</idno>
            <idno type="stamp" n="UNIVERSITE-PARIS-SACLAY" corresp="UNIV-PARIS-SACLAY">Université Paris-Saclay</idno>
            <idno type="stamp" n="LISN">Laboratoire Interdisciplinaire des Sciences du Numérique</idno>
            <idno type="stamp" n="GS-COMPUTER-SCIENCE">Graduate School Computer Science</idno>
            <idno type="stamp" n="LISN-GALAC" corresp="LISN">Graphes, Algorithmes et Combinatoire </idno>
          </seriesStmt>
          <notesStmt>
            <note type="commentary">15 pages</note>
            <note type="audience" n="2">International</note>
            <note type="popular" n="0">No</note>
            <note type="peer" n="1">Yes</note>
          </notesStmt>
          <sourceDesc>
            <biblStruct>
              <analytic>
                <title xml:lang="en">Controlling the C3 Super Class Linearization Algorithm for Large Hierarchies of Classes</title>
                <author role="aut">
                  <persName>
                    <forename type="first">Florent</forename>
                    <surname>Hivert</surname>
                  </persName>
                  <email type="md5">47ff8a87d0f424e8b6c4d5843fdce17c</email>
                  <email type="domain">lri.fr</email>
                  <idno type="idhal" notation="string">florent-hivert</idno>
                  <idno type="idhal" notation="numeric">3065</idno>
                  <idno type="halauthorid" notation="string">18079-3065</idno>
                  <idno type="IDREF">https://www.idref.fr/118402129</idno>
                  <idno type="ORCID">https://orcid.org/0000-0002-7531-5985</idno>
                  <idno type="ISNI">http://isni.org/isni/0000000358431105</idno>
                  <idno type="VIAF">https://viaf.org/viaf/204935359</idno>
                  <affiliation ref="#struct-1062147"/>
                </author>
                <author role="aut">
                  <persName>
                    <forename type="first">Nicolas</forename>
                    <forename type="middle">M.</forename>
                    <surname>Thiéry</surname>
                  </persName>
                  <email type="md5">020945b9929864fafcfe0fd2d2457bd7</email>
                  <email type="domain">u-psud.fr</email>
                  <ptr type="url" target="https://Nicolas.Thiery.name"/>
                  <idno type="idhal" notation="string">nthiery</idno>
                  <idno type="idhal" notation="numeric">2393</idno>
                  <idno type="halauthorid" notation="string">117482-2393</idno>
                  <idno type="ORCID">https://orcid.org/0000-0002-2735-8921</idno>
                  <idno type="IDREF">https://www.idref.fr/153152400</idno>
                  <idno type="VIAF">https://viaf.org/viaf/279977747</idno>
                  <affiliation ref="#struct-1062147"/>
                </author>
              </analytic>
              <monogr>
                <idno type="halJournalId" status="VALID">17680</idno>
                <idno type="issn">0167-8094</idno>
                <idno type="eissn">1572-9273</idno>
                <title level="j">Order</title>
                <imprint>
                  <publisher>Springer Verlag</publisher>
                  <biblScope unit="volume">41</biblScope>
                  <biblScope unit="pp">83–98</biblScope>
                  <date type="datePub">2022-07-15</date>
                </imprint>
              </monogr>
              <idno type="arxiv">2401.12740</idno>
              <idno type="doi">10.1007/s11083-022-09607-5</idno>
            </biblStruct>
          </sourceDesc>
          <profileDesc>
            <langUsage>
              <language ident="en">English</language>
            </langUsage>
            <textClass>
              <classCode scheme="classification">MSC 06A06, 68N15</classCode>
              <classCode scheme="halDomain" n="info">Computer Science [cs]</classCode>
              <classCode scheme="halDomain" n="math">Mathematics [math]</classCode>
              <classCode scheme="halTypology" n="ART">Journal articles</classCode>
              <classCode scheme="halOldTypology" n="ART">Journal articles</classCode>
              <classCode scheme="halTreeTypology" n="ART">Journal articles</classCode>
            </textClass>
            <abstract xml:lang="en">
              <p>C3 is an algorithm used by several widely used programming languages such as Python to support multiple inheritance in object oriented programming (OOP): for each class, C3 computes recursively a linear extension of the poset of all its super classes (the Method Resolution Order, MRO) from user-provided local information (an ordering of the direct super classes). This algorithm can fail if the local information is not consistent. For large hierarchies of classes, as encountered when modeling hierarchies of concepts from abstract algebra in the SageMath computational system, maintaining consistent local information by hand does not scale and leads to unpredictable C3 failures. This paper reports on the authors' work to analyze and circumvent this maintenance nightmare. First, we discovered through extensive computer exploration that there exists posets admitting no consistent local information; we exhibit the smallest one which has 10 elements. Then, we provide and analyze an algorithm that, given a poset and a linear extension, automatically builds local information for C3 in such a way that guarantees that it will never fail, at the price of a slight relaxation of the hypotheses. This algorithm has been used in production in SageMath since 2013.</p>
            </abstract>
          </profileDesc>
        </biblFull>
      </listBibl>
    </body>
    <back>
      <listOrg type="structures">
        <org type="researchteam" xml:id="struct-1062147" status="VALID">
          <orgName>Graphes, Algorithmes et Combinatoire - LISN</orgName>
          <orgName type="acronym">GALaC</orgName>
          <date type="start">2021-01-01</date>
          <desc>
            <address>
              <addrLine>Université Paris-Saclay, Bâtiment 650, 91190 Gif-sur-Yvette</addrLine>
              <country key="FR"/>
            </address>
          </desc>
          <listRelation>
            <relation active="#struct-1061259" type="direct"/>
            <relation active="#struct-300009" type="indirect"/>
            <relation active="#struct-411575" type="indirect"/>
            <relation active="#struct-419361" type="indirect"/>
            <relation name="UMR9015" active="#struct-441569" type="indirect"/>
            <relation active="#struct-1065373" type="direct"/>
          </listRelation>
        </org>
        <org type="laboratory" xml:id="struct-1061259" status="VALID">
          <idno type="IdRef">253160316</idno>
          <idno type="RNSR">202123711L</idno>
          <idno type="ROR">https://ror.org/00rd81916</idno>
          <idno type="Wikidata">Q109620676</idno>
          <orgName>Laboratoire Interdisciplinaire des Sciences du Numérique</orgName>
          <orgName type="acronym">LISN</orgName>
          <date type="start">2021-01-01</date>
          <desc>
            <address>
              <addrLine>Campus Universitaire bât 507Rue du Belvédère91405 Orsay cedexet Campus Universitaire bât 6401 rue Raimond Castaing91190 Gif-sur-Yvette</addrLine>
              <country key="FR"/>
            </address>
            <ref type="url">https://www.lisn.upsaclay.fr/</ref>
          </desc>
          <listRelation>
            <relation active="#struct-300009" type="direct"/>
            <relation active="#struct-411575" type="direct"/>
            <relation active="#struct-419361" type="direct"/>
            <relation name="UMR9015" active="#struct-441569" type="direct"/>
          </listRelation>
        </org>
        <org type="institution" xml:id="struct-300009" status="VALID">
          <idno type="ROR">https://ror.org/02kvxyf05</idno>
          <orgName>Institut National de Recherche en Informatique et en Automatique</orgName>
          <orgName type="acronym">Inria</orgName>
          <desc>
            <address>
              <addrLine>Domaine de VoluceauRocquencourt - BP 10578153 Le Chesnay Cedex</addrLine>
              <country key="FR"/>
            </address>
            <ref type="url">http://www.inria.fr/en/</ref>
          </desc>
        </org>
        <org type="institution" xml:id="struct-411575" status="VALID">
          <idno type="IdRef">184443237</idno>
          <idno type="ROR">https://ror.org/019tcpt25</idno>
          <orgName>CentraleSupélec</orgName>
          <desc>
            <address>
              <addrLine>3, rue Joliot Curie,Plateau de Moulon,91192 GIF-SUR-YVETTE Cedex</addrLine>
              <country key="FR"/>
            </address>
            <ref type="url">http://www.centralesupelec.fr</ref>
          </desc>
        </org>
        <org type="institution" xml:id="struct-419361" status="VALID">
          <idno type="IdRef">241345251</idno>
          <idno type="ROR">https://ror.org/03xjwb503</idno>
          <orgName>Université Paris-Saclay</orgName>
          <desc>
            <address>
              <addrLine>Bâtiment Bréguet, 3 Rue Joliot Curie 2e ét, 91190 Gif-sur-Yvette</addrLine>
              <country key="FR"/>
            </address>
            <ref type="url">https://www.universite-paris-saclay.fr/fr</ref>
          </desc>
        </org>
        <org type="regroupinstitution" xml:id="struct-441569" status="VALID">
          <idno type="IdRef">02636817X</idno>
          <idno type="ISNI">0000000122597504</idno>
          <idno type="ROR">https://ror.org/02feahw73</idno>
          <orgName>Centre National de la Recherche Scientifique</orgName>
          <orgName type="acronym">CNRS</orgName>
          <date type="start">1939-10-19</date>
          <desc>
            <address>
              <country key="FR"/>
            </address>
            <ref type="url">https://www.cnrs.fr/</ref>
          </desc>
        </org>
        <org type="department" xml:id="struct-1065373" status="VALID">
          <orgName>Algorithmes, Apprentissage et Calcul</orgName>
          <orgName type="acronym">AAC</orgName>
          <date type="start">2021-01-01</date>
          <desc>
            <address>
              <country key="FR"/>
            </address>
          </desc>
          <listRelation>
            <relation active="#struct-1061259" type="direct"/>
            <relation active="#struct-300009" type="indirect"/>
            <relation active="#struct-411575" type="indirect"/>
            <relation active="#struct-419361" type="indirect"/>
            <relation name="UMR9015" active="#struct-441569" type="indirect"/>
          </listRelation>
        </org>
      </listOrg>
    </back>
  </text>
</TEI>