Illicium A modular transpilation toolchain ...
Document type :
Communication dans un congrès avec actes
Title :
Illicium A modular transpilation toolchain from Pharo to C
Author(s) :
Misse-Chanabier, Pierre [Auteur]
Analyses and Languages Constructs for Object-Oriented Application Evolution [RMOD]
Aranega, Vincent [Auteur]
Analyses and Languages Constructs for Object-Oriented Application Evolution [RMOD]
Polito, Guillermo [Auteur]
Analyses and Languages Constructs for Object-Oriented Application Evolution [RMOD]
Ducasse, Stephane [Auteur]
Analyses and Languages Constructs for Object-Oriented Application Evolution [RMOD]
Analyses and Languages Constructs for Object-Oriented Application Evolution [RMOD]
Aranega, Vincent [Auteur]
Analyses and Languages Constructs for Object-Oriented Application Evolution [RMOD]
Polito, Guillermo [Auteur]
Analyses and Languages Constructs for Object-Oriented Application Evolution [RMOD]
Ducasse, Stephane [Auteur]
Analyses and Languages Constructs for Object-Oriented Application Evolution [RMOD]
Conference title :
IWST19 — International Workshop on Smalltalk Technologies
City :
Köln
Country :
Allemagne
Start date of the conference :
2019-08-27
English keyword(s) :
Transpilation
Pharo
C language
Tools
Pharo
C language
Tools
HAL domain(s) :
Informatique [cs]
Informatique [cs]/Langage de programmation [cs.PL]
Informatique [cs]/Langage de programmation [cs.PL]
English abstract : [en]
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 ...
Show more >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.Show less >
Show more >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.Show less >
Language :
Anglais
Peer reviewed article :
Oui
Audience :
Internationale
Popular science :
Non
Collections :
Source :
Files
- https://hal.archives-ouvertes.fr/hal-02297860/document
- Open access
- Access the document
- https://hal.archives-ouvertes.fr/hal-02297860/document
- Open access
- Access the document
- https://hal.archives-ouvertes.fr/hal-02297860/document
- Open access
- Access the document
- document
- Open access
- Access the document
- final_submission.pdf
- Open access
- Access the document