Illicium A modular transpilation toolchain from Pharo to C - Archive ouverte HAL Access content directly
Conference Papers Year :

Illicium A modular transpilation toolchain from Pharo to C

(1) , (1) , (1) , (1)
1

Abstract

The Pharo programming language runs on the OpenSmalltalk-VM. This Virtual Machine (VM) is mainly written in Slang, a subset of the Smalltalk language dedicated to VM development. Slang is transpiled to C using the Slang-to-C transpiler. The generated C is then compiled to produce the VM exe-cutable binary code. Slang is a powerful dialect for generating C because it benefits from the tools of the Smalltalk environment, including a simulator that runs and debugs the VM. However, the Slang-to-C transpiler is often too permissive. For example, the Slang-to-C transpiler generates invalid C code from some Smalltalk concepts it does not support. This makes the Slang code hard to debug as the errors are caught very late during the development process, which is worsen by the loss of the mapping between the generated C code and Slang. The Slang-to-C transpiler is also hard to extend or adapt to modify part of the translation process. In this paper we present Illicium, a new modular transpila-tion toolchain based on a subset of Pharo targeting C through AST transformations. This toolchain translates the Pharo AST into a C AST to generate C code. Using ASTs as source and target artifacts enables analysis, modification and validation at different levels during the translation process. The main translator is split into smaller and replaceable translators to increase modularity. Illicium also allows the possibility to introduce new translators and to chain them together, increasing reusability. To evaluate our approach, we show with a use case how to extend the transpilation process with a translation that requires changes not considered in the original C AST.
Fichier principal
Vignette du fichier
final_submission.pdf (612.15 Ko) Télécharger le fichier
Origin : Files produced by the author(s)
Loading...

Dates and versions

hal-02297860 , version 1 (26-09-2019)

Identifiers

  • HAL Id : hal-02297860 , version 1

Cite

Pierre Misse-Chanabier, Vincent Aranega, Guillermo Polito, Stéphane Ducasse. Illicium A modular transpilation toolchain from Pharo to C. IWST19 — International Workshop on Smalltalk Technologies, Aug 2019, Köln, Germany. ⟨hal-02297860⟩
250 View
311 Download

Share

Gmail Facebook Twitter LinkedIn More