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