Comparing two Approaches for Language Agnostic Compiler Fuzzing

Alexandra Sennblad · Diva portal (Dalarna University Library) · 2026

When developing a compiler, it is important to test it in order to discover any unwanted behaviour. However, manually writing tests is time consuming. Compiler fuzzers are able to automatically generate programs which can be used to test compilers, avoiding the additional work of test writing. Fuzzers are often made for producing programs in a specific programming language, but can also use a language agnostic approach, being able to generate programs for any language. This thesis evaluates two such language agnostic compilers, Trieste and StarSmith, comparing them based mainly on code coverage and discussing their different approaches to fuzzing. As concrete case studies we test compilers for the languages While and MiniML. We implement StarSmith specifications for both languages, and compare them to existing implementations using Trieste. To achieve this, we implement two languages, While and MiniML, into StarSmith. Implementations for these already exists for Trieste. We measure line coverage and branch coverage for the two fuzzers, using five different test counts. The results show that both tools are effective in different areas, with Trieste’s strength being its per pass testing mode and StarSmith providing good coverage for end to end testing of the compiler.

Read the paper · More papers on PaperTik