# Liveness-Driven Random Program Generation

arXiv: https://arxiv.org/abs/1709.04421 · HTML: https://mlsanity.com/paper/1709.04421/

## Key facts

- Cited by 4 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 13 Sep 2017.

## Built on by (most cited first, 4 of 4)

- [High-Level Synthesis Performance Prediction using GNNs: Benchmarking, Modeling, and Advancing](https://mlsanity.com/paper/2201.06848/) (2022)
- [Neurogenetic Programming Framework for Explainable Reinforcement Learning](https://mlsanity.com/paper/2102.04231/) (2021)
- [wa-hls4ml: A Benchmark and Surrogate Models for hls4ml Resource and Latency Estimation](https://mlsanity.com/paper/2511.05615/) (2025)
- [Program-to-Circuit: Exploiting GNNs for Program Representation and Circuit Translation](https://mlsanity.com/paper/2109.06265/) (2021)

## Abstract (arXiv)

Randomly generated programs are popular for testing compilers and program analysis tools, with hundreds of bugs in real-world C compilers found by random testing. However, existing random program generators may generate large amounts of dead code (computations whose result is never used). This leaves relatively little code to exercise a target compiler's more complex optimizations. To address this shortcoming, we introduce liveness-driven random program generation. In this approach the random program is constructed bottom-up, guided by a simultaneous structural data-flow analysis to ensure that the generator never generates dead code. The algorithm is implemented as a plugin for the Frama-C framework. We evaluate it in comparison to Csmith, the standard random C program generator. Our tool generates programs that compile to more machine code with a more complex instruction mix.
