Implementing Dataflow Analysis for an Imperative Programming Language in Trieste

Dataflow analysis is a technique used to analyse code without running it. The problem with implementing this is that analyses are similar, causing repetitive code. Trieste is a compiler tool developed in C++, which provides pattern matching as a declarative approach to writing compilers. This thesis addresses the repetitiveness of dataflow analysis by implementing a dataflow analysis framework for Trieste. The framework is used in a compiler developed in Trieste, targeting the While language. The qualitative evaluation demonstrates that Trieste is suitable for integration with the framework, implementing zero analysis, constant propagation/folding, liveness and dead code elimination. The quantitative analysis shows good performance for all passes except constant propagation. This is a direct result of the implementation of the dataflow analysis framework and is not tied to Trieste, and suggested improvements for this are covered. Future work aims to develop more analyses using the framework and make it a completely generic Trieste framework to be used regardless of the target language.

Publication Details

Journal
KTH Publication Database DiVA (KTH Royal Institute of Technology)
Published
2025-01-01
Primary Topic
Embedded Systems Design Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Implementing Dataflow Analysis for an Imperative Programming Language in Trieste

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Embedded Systems Design Techniques
article

Implementing Dataflow Analysis for an Imperative Programming Language in Trieste

article en

Abstract

Dataflow analysis is a technique used to analyse code without running it. The problem with implementing this is that analyses are similar, causing repetitive code. Trieste is a compiler tool developed in C++, which provides pattern matching as a declarative approach to writing compilers. This thesis addresses the repetitiveness of dataflow analysis by implementing a dataflow analysis framework for Trieste. The framework is used in a compiler developed in Trieste, targeting the While language. The qualitative evaluation demonstrates that Trieste is suitable for integration with the framework, implementing zero analysis, constant propagation/folding, liveness and dead code elimination. The quantitative analysis shows good performance for all passes except constant propagation. This is a direct result of the implementation of the dataflow analysis framework and is not tied to Trieste, and suggested improvements for this are covered. Future work aims to develop more analyses using the framework and make it a completely generic Trieste framework to be used regardless of the target language.

KTH Publication Database DiVA (KTH Royal Institute of Technology)
Quality Education
Openalex Percentile: Top 44%
Embedded Systems Design Techniques
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.