Source-to-Source Optimizations Validated using Separation Logic - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2024

Source-to-Source Optimizations Validated using Separation Logic

Arthur Charguéraud
Thomas Koehler

Résumé

We present a demo of OptiTrust, an interactive framework for optimizing general-purpose programs via series of programmer-guided, source-to-source transformations. Optimization steps are described in transformation scripts, expressed as OCaml programs. At every step, the programmer may interactively visualize the effect of the transformation as the difference between two pieces of human-readable code. The framework currently applies to C code. That said, our internal AST is based on the imperative lambda-calculus, thus we expect it to be straightforward to extend OptiTrust for optimizing OCaml code. A central question is how to verify that nontrivial transformations preserve the semantics of the code. To that end, we require the programmer to provide Separation Logic annotations, and use them to compute resource usage throughout the code. As we show, this information suffices to justify the correctness of numerous essential source-to-source transformations, such as swapping of instructions, swapping of loops, hoisting of instructions out of loops, etc.
Fichier principal
Vignette du fichier
jfla2024-paper-8.pdf (602.02 Ko) Télécharger le fichier
Origine Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-04406229 , version 1 (19-01-2024)

Licence

Identifiants

  • HAL Id : hal-04406229 , version 1

Citer

Guillaume Bertholon, Arthur Charguéraud, Thomas Koehler. Source-to-Source Optimizations Validated using Separation Logic. 35es Journées Francophones des Langages Applicatifs (JFLA 2024), Jan 2024, Saint-Jacut-de-la-Mer, France. ⟨hal-04406229⟩
90 Consultations
81 Téléchargements

Partager

Gmail Mastodon Facebook X LinkedIn More