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.
26-gen-2024
In questo lavoro proponiamo una alternativa allo sviluppo di compilatori e transpilatori. L'alternative prende il nome di *piler (starpiler). Lo *piler sfrutta il famoso algoritmo di ricerca A* per ottenere compilazioni e transpilazioni. Tradizionalmente i compilatori sono definiti come una sequenza ordinata di passi di compilazione, invece lo *piler ricostruisce autonomamente l'informazione riguardante l'ordine facendo una ricerca sui possibili passi di compilazione. Questo permette di riutilizzare transparentemente passi di compilazione già esistenti e sviluppati per altri linguaggi. Tutto questo è reso possibile dallo spazio metrico nel quale i programmi sono immersi; infatti, dallo spazio metrico proposto possiamo derivare una euristica per l'algoritmo A*. Per dimostrare le abilità dello *piler abbiamo sviluppato tre semplici linguaggi di programmazione S, S++, e S# che imitano i rispettivi C, C++, e C#. Lo *piler è in grado di fare transpilazioni tra S, S++, e S# in meno di un secondo, mentre una ricerca naive richiederebbe più di 40 minuti. Per completare la discussione, proponiamo dei cambiamenti sulle assunzioni iniziali dello *piler che risultano in proprietà differenti dell'architettura.
https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4564658
https://www.sciencedirect.com/science/article/pii/S0164121223000997
CAZZOLA, WALTER
SASSI, ROBERTO
Doctoral Thesis
*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.
File in questo prodotto:
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.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/2434/1021772
Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus ND
  • ???jsp.display-item.citation.isi??? ND
  • OpenAlex ND
social impact