36 research outputs found

    Code Translation with Compiler Representations

    Full text link
    In this paper, we leverage low-level compiler intermediate representations (IR) to improve code translation. Traditional transpilers rely on syntactic information and handcrafted rules, which limits their applicability and produces unnatural-looking code. Applying neural machine translation (NMT) approaches to code has successfully broadened the set of programs on which one can get a natural-looking translation. However, they treat the code as sequences of text tokens, and still do not differentiate well enough between similar pieces of code which have different semantics in different languages. The consequence is low quality translation, reducing the practicality of NMT, and stressing the need for an approach significantly increasing its accuracy. Here we propose to augment code translation with IRs, specifically LLVM IR, with results on the C++, Java, Rust, and Go languages. Our method improves upon the state of the art for unsupervised code translation, increasing the number of correct translations by 11% on average, and up to 79% for the Java -> Rust pair with greedy decoding. With beam search, it increases the number of correct translations by 5.5% in average. We extend previous test sets for code translation, by adding hundreds of Go and Rust functions. Additionally, we train models with high performance on the problem of IR decompilation, generating programming source code from IR, and study using IRs as intermediary pivot for translation.Comment: 9 page

    Flight program language requirements. Volume 1: Executive summary

    Get PDF
    The activities and results of a study for the definition of flight program language requirements are described. A set of detailed requirements are presented for a language capable of supporting onboard application programming for the Marshall Space Flight Center's anticipated future activities in the decade of 1975-85. These requirements are based, in part, on the evaluation of existing flight programming language designs to determine the applicability of these designs to flight programming activities which are anticipated. The coding of benchmark problems in the selected programming languages is discussed. These benchmarks are in the form of program kernels selected from existing flight programs. This approach was taken to insure that the results of the study would reflect state of the art language capabilities, as well as to determine whether an existing language design should be selected for adaptation

    Language history : A tale of two countries

    Get PDF
    This paper looks at the relationships between industry computer languages and those taught in universities. By considering the differences between two of the first countries to embrace programmable computers (USA and Australia) we find patterns that seem culturally independent. History shows a set of recurring problems for academics in choosing languages. This study shows that academics should be informed by history when making those decisions.2nd IFIP Conference on the History of Computing and EducationRed de Universidades con Carreras en Informática (RedUNCI

    Decompiler Front-End Optimizations

    Get PDF
    Zpětný překladač je nástroj reverzního inženýrství umožňující rekonstrukci strojového kódu na některý z vyšších programovacích jazyků. Tato práce se zaobírá popisem tohoto nástroje, přičemž se soustředí hlavně na zpětný překladač projektu Lissom. Je tu navrhnutých několik technik pro optimalizaci překladu jako statická interpretace LLVM IR kódu a paměť pro výsledky interpretace. Další optimalizace se týkají rozšíření funkcionality přední části překladače, podporu delay slotů a detekci rozložení paměti a endianity. Implementované techniky jsou nakonec demonstrované na generovaném kódu.Decompiler is a reverse engineering tool for translation of binary codes into one of the higher level languages. This bachelor thesis describes such a tool paying special attention on decompiler of the Lissom project. There are proposed several techniques for translation optimalization like static LLVM IR code interpretation and memory for its results. Other optimalizations are conserning addition of platform dependent features like delay slot support or memory datalayout and endianness detection. Finally implemented techniques are demostrated on several examples.

    Decompilation of PowerPC Applications

    Get PDF
    Tato práce se zabývá přidáním podpory pro architekturu PowerPC do přední části zpětného překladače. Nacházejí se v ní základní informace o reverzním inženýrství, jeho využití a významu v informačních technologiích. Práce také obsahuje souhrn znalostí o architektuře PowerPC a informace o zpětném překladači projektu Lissom, hlavně jeho přední části. Cílem práce bylo implementovat podporu dekompilace binárnich souborů pro architekuru PowerPC v přední části zpětného překladače. Výsledkem práce je implementace řady analýz ve formě tříd jazyka C++ a úprava existujících části kódu tak, aby byla podporována požadovaná funkčnost.This bachelor thesis deals with the implementing of decompilation of PowerPC applications feature into a decompiler´s front-end. It also contains basic information about PowerPC architecture and information about the Lissom decompiler, especially its front-end. The goal of this work is to implement a feature into the front-end of the decompiler, which provides decompilation of  PowerPC binaries. As a result of this bachelor thesis I have created and implemented a couple of analyses as a C++ classes and I have also fixed some earlier implemented code to achieve the required functionality.

    Research Achievements Review Series no. 20 - Mathematics and computation research

    Get PDF
    Computational mathematics, perturbed orbit three-body problem, and periodic trajectories solutions through computer method

    Language history : A tale of two countries

    Get PDF
    This paper looks at the relationships between industry computer languages and those taught in universities. By considering the differences between two of the first countries to embrace programmable computers (USA and Australia) we find patterns that seem culturally independent. History shows a set of recurring problems for academics in choosing languages. This study shows that academics should be informed by history when making those decisions.2nd IFIP Conference on the History of Computing and EducationRed de Universidades con Carreras en Informática (RedUNCI
    corecore