A Dynamic to Static DSL Compiler for Image Processing Applications - Mines Paris Accéder directement au contenu
Pré-Publication, Document De Travail Année :

A Dynamic to Static DSL Compiler for Image Processing Applications


High-level interpreted programming languages, such as Python, are widely used because of their concise syntax and dynamic type system, which allow programmers to efficiently develop applications. However, they cannot offer the same guarantees provided by lower-level languages such as C in terms of portability on embedded systems. Is it possible for dynamic applications to benefit from lower-level compilation toolchain in order to increase their portability onto specialized hardware targets? We present in this paper (1) a methodology to convert a dynamic Domain-Specific Language (DSL) into a static one that preserves programmability, (2) a working implementation that takes care of types, memory allocation, polymorphism and API adaptation between the two DSLs, (3) and experimental results on portability and performance that show the efficiency of our approach. We illustrate our methodology with two image processing libraries: SMIL and FREIA. The SMIL library is a C++ image processing library offering ease of programming with a Python wrapper. However, SMIL applications also have to be executed on embedded platforms such as FPGAs on which a Python interpreter is not available. The generic answer to such an issue is to re-code the original Python applications in C or C++, which will be then optimized for every hardware target, or to try to compile Python into native code using tools such as Cython. The approach we suggest here is to ease portability of applications written in a DSL embedded in C (the FREIA API) by using specific optimizations such as image expressions evaluation, removal of temporary variables or image tiling.
Fichier principal
Vignette du fichier
A-670.pdf (283.97 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-01665055 , version 1 (12-01-2018)


  • HAL Id : hal-01665055 , version 1


Pierre Guillou, Benoît Pin, Fabien Coelho, François Irigoin. A Dynamic to Static DSL Compiler for Image Processing Applications. 2017. ⟨hal-01665055⟩
433 Consultations
405 Téléchargements


Gmail Facebook Twitter LinkedIn More