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
BERTOLOTTI, FRANCESCO
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
Dimensione
1.06 MB
Formato
Adobe PDF
|
1.06 MB | Adobe PDF | Visualizza/Apri |
I documenti in UNITESI sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/20.500.14242/84685
URN:NBN:IT:UNIMI-84685