Static Analysis of Aggregate Programs through Compiler Plugins

Magnani, Francesco (2025) Static Analysis of Aggregate Programs through Compiler Plugins. [Laurea magistrale], Università di Bologna, Corso di Studio in Ingegneria e scienze informatiche [LM-DM270] - Cesena
Documenti full-text disponibili:
[thumbnail of Thesis] Documento PDF (Thesis)
Disponibile con Licenza: Creative Commons: Attribuzione - Non commerciale - Non opere derivate 4.0 (CC BY-NC-ND 4.0)

Download (1MB)

Abstract

Static analysis is crucial in ensuring software quality, detecting potential errors, and enforcing coding standards. However, such tools are often unavailable for novel programming paradigms, limiting their adoption and development. This work explores the application of static analysis in the context of Aggregate Computing, a paradigm for designing and managing distributed systems. Specifically, it focuses on Collektive, a Kotlin-based framework that provides an internal Domain Specific Language (DSL) for Aggregate Computing. To improve the reliability of Collektive programs, a compiler plugin was developed to perform static analysis during compilation. The plugin extends the Kotlin compiler using the new and experimental Frontend Intermediate Representation (FIR) checkers to detect potential issues in aggregate computations, particularly regarding domain alignment and misuse of DSL constructs. Various detection patterns were identified and implemented, using techniques ranging from direct API inspections to tree traversal via the visitor pattern. The development process, testing methodologies, challenges encountered, and the trade-offs of integrating static analysis within the compilation pipeline are discussed. While the plugin provides useful checks and integrates with the development environment, it also highlights the limitations of the approaches explored, suggesting potential directions for further refinement and improvements in static analysis for internal DSL-based frameworks.

Abstract
Tipologia del documento
Tesi di laurea (Laurea magistrale)
Autore della tesi
Magnani, Francesco
Relatore della tesi
Correlatore della tesi
Scuola
Corso di studio
Ordinamento Cds
DM270
Parole chiave
static analysis,compiler plugins,aggregate computing,Kotlin
Data di discussione della Tesi
14 Marzo 2025
URI

Altri metadati

Statistica sui download

Gestione del documento: Visualizza il documento

^