Symbolic Reasoning as a Library
Date
relationships.isAuthorOf
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
The increasing complexity of software systemsdemands robust methods for ensuring correctness and performance.
As systems scale, traditional approaches are insufficient for uncovering subtle bugs or optimization opportunities,
and automated reasoning has emerged as a critical but challenging solution.
%Building effective automated reasoning tools is challenging.
However, advances in constraint solvers have shifted the engineering burden to
symbolic compilation systems that translate program semantics into efficiently solvable constraints. This dissertation introduces \grisette,a symbolic compilation framework
designed as a statically-typed, purely functional, monadic Haskell library
for building domain-specific symbolic compilers.
Its Ordered Guards (ORG) representation
enables all-path symbolic evaluation while merging symbolic values into a compact normal form.
This approach significantly reduces
symbolic evaluation time ($6.1\times$ speedup),
constraint size ($79.2\%$ reduction),
and solving time ($2.4\times$ speedup) compared to traditional representations.
Beyond performance, \grisette avoids complications of lifting host languages into the symbolic domain.
Its functional design enables memoization,
while its monadic interface handles computational effects.
We evaluate \grisette on diverse benchmarks,
including \textsc{Rosette} applications.
\grisette's monadic design further enables symbolic reasoning for benchmarks
beyond existing tools,
like those with continuations and coroutines.
It also serves as the core engine for \tensorright,
an automated verification system for tensor graph rewrites. To demonstrate \grisette's versatility,this dissertation also presents \hierasynth,
a parallel framework for super-optimization built upon \grisette.
Super-optimizers synthesize high-performance code
but face a trade-off between program length ($k$) and instruction set size ($n$).
\hierasynth{} introduces a decomposition strategy that adaptively, hierarchically partitions
the search space along dimension $n$ rather than $k$.
It employs component-based synthesis with embedded instruction choices,
translated into SMT constraints via \grisette,
using parallel divide-and-conquer with efficient unrealizability pruning.
A RISC-V Vector super-optimizer built with \hierasynth
synthesizes programs of greater length ($k \approx 8$)
for larger instruction sets ($n \approx 700$) than previously feasible,
discovering programs that are both provably optimal under a cost model
and empirically superior to human-designed code,
while achieving substantial synthesis scalability.
Description
Thesis (Ph.D.)--University of Washington, 2025
