In this work, we discuss an exotic alternative to compiler/transpiler development. The alternative takes form in the *piler (read starpiler), a novel compiler infrastructure rooted in the popular search algorithm A*. While traditional compilers are defined as ordered sequences of compilation passes, the *piler autonomously reconstruct the order information, and the compilation is the result of a search step (powered by A*) from all the available passes. This choice simplifies the language development by transparently reusing already available compilation passes. The main result allowing for fast searches is the development of metric a metric space embedding programs, consequently a non-overestimating heuristic can be derived. To test the *piler capabilities, we develop three simple programming languages S, S++, and S# mimicking C, C++, and C# respectively. We show that the *piler equipped with the proposed heuristic is capable of achieving compilation/transpilation between S, S++, and S# in less than a second while a naive search would require more than 40 minutes to be completed. Furthermore, we discuss possible variants of the proposed framework that, by changing initial assumptions, result in different overall properties.
*PILER: NOT A VM TO RULE NO ONE / F. Bertolotti ; advisor: W. Cazzola. - Dipartimento di Informatica Giovanni Degli Antoni. Dipartimento di Informatica Giovanni Degli Antoni, 2023. 36. ciclo, Anno Accademico 2023.
*PILER: NOT A VM TO RULE NO ONE
F. Bertolotti
2024
Abstract
In this work, we discuss an exotic alternative to compiler/transpiler development. The alternative takes form in the *piler (read starpiler), a novel compiler infrastructure rooted in the popular search algorithm A*. While traditional compilers are defined as ordered sequences of compilation passes, the *piler autonomously reconstruct the order information, and the compilation is the result of a search step (powered by A*) from all the available passes. This choice simplifies the language development by transparently reusing already available compilation passes. The main result allowing for fast searches is the development of metric a metric space embedding programs, consequently a non-overestimating heuristic can be derived. To test the *piler capabilities, we develop three simple programming languages S, S++, and S# mimicking C, C++, and C# respectively. We show that the *piler equipped with the proposed heuristic is capable of achieving compilation/transpilation between S, S++, and S# in less than a second while a naive search would require more than 40 minutes to be completed. Furthermore, we discuss possible variants of the proposed framework that, by changing initial assumptions, result in different overall properties.| File | Dimensione | Formato | |
|---|---|---|---|
|
phd_unimi_R12898.pdf
accesso aperto
Tipologia:
Post-print, accepted manuscript ecc. (versione accettata dall'editore)
Dimensione
1.06 MB
Formato
Adobe PDF
|
1.06 MB | Adobe PDF | Visualizza/Apri |
Pubblicazioni consigliate
I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.




