<?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 tel-03852612</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-25T05:10:30+02:00"/>
      </publicationStmt>
      <sourceDesc>
        <p part="N">HAL API Platform</p>
      </sourceDesc>
    </fileDesc>
  </teiHeader>
  <text>
    <body>
      <listBibl>
        <biblFull>
          <titleStmt>
            <title xml:lang="en">Unsupervised Translation of Programming Languages</title>
            <title xml:lang="fr">Traduction Non Supervisée de Langages de Programmation</title>
            <author role="aut">
              <persName>
                <forename type="first">Baptiste</forename>
                <surname>Roziere</surname>
              </persName>
              <idno type="idhal" notation="numeric">1186922</idno>
              <idno type="halauthorid" notation="string">2053149-1186922</idno>
              <idno type="IDREF">https://www.idref.fr/265262380</idno>
              <affiliation ref="#struct-989"/>
            </author>
            <editor role="depositor">
              <persName>
                <forename>ABES</forename>
                <surname>STAR</surname>
              </persName>
              <email type="md5">f5aa7f563b02bb6adbba7496989af39a</email>
              <email type="domain">abes.fr</email>
            </editor>
          </titleStmt>
          <editionStmt>
            <edition n="v1" type="current">
              <date type="whenSubmitted">2022-11-15 10:01:22</date>
              <date type="whenModified">2026-04-07 06:46:53</date>
              <date type="whenReleased">2022-11-15 10:01:26</date>
              <date type="whenProduced">2022-07-12</date>
              <date type="whenEndEmbargoed">2022-11-15</date>
              <ref type="file" target="https://theses.hal.science/tel-03852612v1/document">
                <date notBefore="2022-11-15"/>
              </ref>
              <ref type="file" subtype="author" n="1" target="https://theses.hal.science/tel-03852612v1/file/2022UPSLD015.pdf" id="file-3852612-3369169">
                <date notBefore="2022-11-15"/>
              </ref>
            </edition>
            <respStmt>
              <resp>contributor</resp>
              <name key="131274">
                <persName>
                  <forename>ABES</forename>
                  <surname>STAR</surname>
                </persName>
                <email type="md5">f5aa7f563b02bb6adbba7496989af39a</email>
                <email type="domain">abes.fr</email>
              </name>
            </respStmt>
          </editionStmt>
          <publicationStmt>
            <distributor>CCSD</distributor>
            <idno type="halId">tel-03852612</idno>
            <idno type="halUri">https://theses.hal.science/tel-03852612</idno>
            <idno type="halBibtex">roziere:tel-03852612</idno>
            <idno type="halRefHtml">Neural and Evolutionary Computing [cs.NE]. Université Paris sciences et lettres, 2022. English. &lt;a target="_blank" href="https://www.theses.fr/2022UPSLD015"&gt;&amp;#x27E8;NNT : 2022UPSLD015&amp;#x27E9;&lt;/a&gt;</idno>
            <idno type="halRef">Neural and Evolutionary Computing [cs.NE]. Université Paris sciences et lettres, 2022. English. &amp;#x27E8;NNT : 2022UPSLD015&amp;#x27E9;</idno>
            <availability status="restricted">
              <licence target="https://about.hal.science/hal-authorisation-v1/">HAL Authorization<ref corresp="#file-3852612-3369169"/></licence>
            </availability>
          </publicationStmt>
          <seriesStmt>
            <idno type="stamp" n="CNRS">CNRS - Centre national de la recherche scientifique</idno>
            <idno type="stamp" n="UNIV-DAUPHINE">Université Paris Dauphine - Paris IX</idno>
            <idno type="stamp" n="STAR">STAR - Dépôt national des thèses électroniques</idno>
            <idno type="stamp" n="LAMSADE-DAUPHINE" corresp="UNIV-DAUPHINE">LAMSADE (Laboratoire d'Analyse et de Modélisation des Systèmes pour l'Aide à la Décision)</idno>
            <idno type="stamp" n="PSL">Université Paris sciences et lettres</idno>
            <idno type="stamp" n="UNIV-DAUPHINE-PSL" corresp="PSL">Université Paris Dauphine - PSL</idno>
          </seriesStmt>
          <notesStmt/>
          <sourceDesc>
            <biblStruct>
              <analytic>
                <title xml:lang="en">Unsupervised Translation of Programming Languages</title>
                <title xml:lang="fr">Traduction Non Supervisée de Langages de Programmation</title>
                <author role="aut">
                  <persName>
                    <forename type="first">Baptiste</forename>
                    <surname>Roziere</surname>
                  </persName>
                  <idno type="idhal" notation="numeric">1186922</idno>
                  <idno type="halauthorid" notation="string">2053149-1186922</idno>
                  <idno type="IDREF">https://www.idref.fr/265262380</idno>
                  <affiliation ref="#struct-989"/>
                </author>
              </analytic>
              <monogr>
                <idno type="nnt">2022UPSLD015</idno>
                <imprint>
                  <date type="dateDefended">2022-07-12</date>
                </imprint>
                <authority type="institution">Université Paris sciences et lettres</authority>
                <authority type="school">Ecole doctorale SDOSE (Paris)</authority>
                <authority type="supervisor">Tristan Cazenave</authority>
                <authority type="jury">Albert Henri Cohen [Président]</authority>
                <authority type="jury">François Fleuret [Rapporteur]</authority>
                <authority type="jury">Rachel Bawden</authority>
                <authority type="jury">Élisa Fromont</authority>
                <authority type="jury">Olivier Teytaud</authority>
                <authority type="jury">Ronan Collobert</authority>
              </monogr>
            </biblStruct>
          </sourceDesc>
          <profileDesc>
            <langUsage>
              <language ident="en">English</language>
            </langUsage>
            <textClass>
              <keywords scheme="author">
                <term xml:lang="en">Translation</term>
                <term xml:lang="en">Deep learning</term>
                <term xml:lang="en">Neural networks</term>
                <term xml:lang="en">Program synthesis</term>
                <term xml:lang="en">Programming languages</term>
                <term xml:lang="en">Transcompilation</term>
                <term xml:lang="fr">Apprentissage profond</term>
                <term xml:lang="fr">Réseaux de neurones</term>
                <term xml:lang="fr">Traduction</term>
                <term xml:lang="fr">Synthèse de code</term>
                <term xml:lang="fr">Langages de programmation</term>
                <term xml:lang="fr">Transcompilation</term>
              </keywords>
              <classCode scheme="halDomain" n="info.info-ne">Computer Science [cs]/Neural and Evolutionary Computing [cs.NE]</classCode>
              <classCode scheme="halTypology" n="THESE">Theses</classCode>
              <classCode scheme="halOldTypology" n="THESE">Theses</classCode>
              <classCode scheme="halTreeTypology" n="THESE">Theses</classCode>
            </textClass>
            <abstract xml:lang="en">
              <p>A transcompiler, also known as source-to-source translator, is a system that converts source code from a high-level programming language (such as C++ or Python) to another. Transcompilers are primarily used for interoperability, and to port codebases written in an obsolete or deprecated language (e.g. COBOL, Python2) to a modern one. They typically rely on handcrafted rewrite rules, applied to the source code abstract syntax tree. Unfortunately, the resulting translations often lack readability, fail to respect the target language conventions, and require manual modifications in order to work properly. The overall translation process is time-consuming and requires expertise in both the source and target languages, making code-translation projects expensive. Although neural models significantly outperform their rule-based counterparts in the context of natural language translation, their applications to transcompilation have been limited due to the scarcity of parallel data in this domain. In this thesis, we propose methods to train effective and fully unsupervised neural transcompilers.Natural language translators are evaluated with metrics based on token co-occurences between the translation and the reference. We identify that they do not capture the semantics of programming languages. Hence, we build and release a test set composed of 852 parallel functions, along with unit tests to check the semantic correctness of translations. We first leverage objectives designed for natural languages to learn multilingual representations of source code, and train a model to translate, using source code from open source GitHub projects. This model outperforms rule-based methods for translating functions between C++, Java, and Python. Then, we develop an improved pre-training method, which leads the model to learn deeper semantic representations of source code. It results in enhanced performances on several tasks including unsupervised code translation. Finally, we use automated unit tests to automatically create examples of program translations. Training on these examples leads to significant improvements in the performance of our neural transcompilers. Our methods rely exclusively on monolingual source code, require no expertise in the source or target languages, and can easily be generalized to other programming languages.</p>
            </abstract>
            <abstract xml:lang="fr">
              <p>Un transcompilateur est un système qui convertit le code source d'un langage de programmation de haut niveau (tel que C++ ou Python) vers un autre. Les transcompilateurs sont principalement utilisés pour l'interopérabilité et pour transférer des bases de code écrites dans un langage obsolète (par exemple COBOL ou Python2) vers un langage plus moderne. Ils reposent généralement sur des règles de réécriture manuelles, appliquées à l'arbre de syntaxe abstraite du code source. Malheureusement, les traductions qui en résultent manquent souvent de lisibilité, ne respectent pas les conventions du langage cible et nécessitent des modifications manuelles pour fonctionner correctement. Le processus global de traduction prend du temps et nécessite une expertise à la fois dans les langages source et cible, ce qui rend les projets de traduction de code coûteux. Bien que les modèles neuronaux surpassent considérablement leurs homologues basés sur des règles dans le cadre de la traduction en langues naturelles, leurs applications à la transcompilation ont été limitées en raison de la rareté des données parallèles dans ce domaine. Nous proposons des méthodes pour entraîner des transcompilateurs neuronaux efficaces sans données supervisées. Les traducteurs de langues naturelles sont évalués avec des métriques basées sur la cooccurrence de tokens entre la traduction et la référence. Nous remarquons que ces métriques ne capturent pas la sémantique des langages de programmation. Nous construisons et publions donc une base de données de tests composée de 852 fonctions parallèles, ainsi que de tests unitaires pour vérifier l'exactitude sémantique des traductions. Nous exploitons d'abord les objectifs conçus pour les langues naturelles afin d'apprendre des représentations multilingues du code source, et entraînons un modèle à traduire, en utilisant seulement le code monolingue de projets open source GitHub. Ce modèle surpasse les méthodes basées sur des règles pour la traduction de fonctions entre C++, Java et Python. Ensuite, nous développons une méthode de pré-entraînement, amenant le modèle à apprendre des représentations sémantiques du code. Cela conduit à des performances améliorées sur plusieurs tâches, y compris la traduction de code non supervisée. Enfin, nous utilisons des tests unitaires automatisés pour créer des exemples de traductions de programmes. Entraîner un modèle sur ces exemples conduit à des améliorations significatives des performances de nos transcompilateurs neuronaux. Nos méthodes reposent exclusivement sur du code source monolingue, ne nécessitent aucune expertise dans les langues source ou cible, et peuvent facilement être généralisées à d'autres langages.</p>
            </abstract>
          </profileDesc>
        </biblFull>
      </listBibl>
    </body>
    <back>
      <listOrg type="structures">
        <org type="laboratory" xml:id="struct-989" status="VALID">
          <idno type="IdRef">030107156</idno>
          <idno type="ISNI">0000 0001 2097 7052</idno>
          <idno type="RNSR">201120462Y</idno>
          <idno type="ROR">https://ror.org/052bz7812</idno>
          <idno type="Wikidata">Q3214405</idno>
          <orgName>Laboratoire d'analyse et modélisation de systèmes pour l'aide à la décision</orgName>
          <orgName type="acronym">LAMSADE</orgName>
          <desc>
            <address>
              <addrLine>Place de Lattre de Tassigny 75775 PARIS CEDEX 16</addrLine>
              <country key="FR"/>
            </address>
            <ref type="url">http://www.lamsade.dauphine.fr/</ref>
          </desc>
          <listRelation>
            <relation active="#struct-300302" type="direct"/>
            <relation active="#struct-564132" type="indirect"/>
            <relation name="UMR7243 / FRE3234 / UMR7024" active="#struct-441569" type="direct"/>
          </listRelation>
        </org>
        <org type="institution" xml:id="struct-300302" status="VALID">
          <idno type="IdRef">027787109</idno>
          <idno type="ISNI">0000000120977052</idno>
          <idno type="ROR">https://ror.org/052bz7812</idno>
          <idno type="Wikidata">Q1546437</idno>
          <orgName>Université Paris Dauphine-PSL</orgName>
          <desc>
            <address>
              <addrLine>Place du Maréchal de Lattre de Tassigny75775 PARIS Cedex 16</addrLine>
              <country key="FR"/>
            </address>
            <ref type="url">https://dauphine.psl.eu/</ref>
          </desc>
          <listRelation>
            <relation active="#struct-564132" type="direct"/>
          </listRelation>
        </org>
        <org type="regroupinstitution" xml:id="struct-564132" status="VALID">
          <idno type="IdRef">241597595</idno>
          <idno type="ISNI">0000 0004 1784 3645</idno>
          <idno type="ROR">https://ror.org/013cjyk83</idno>
          <orgName>Université Paris Sciences et Lettres</orgName>
          <orgName type="acronym">PSL</orgName>
          <desc>
            <address>
              <addrLine>60 rue Mazarine 75006 Paris</addrLine>
              <country key="FR"/>
            </address>
            <ref type="url">https://www.psl.eu/</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>
      </listOrg>
    </back>
  </text>
</TEI>