A new way to test Haskell software code

SymFC uses configurable semantics to help verify properties in Haskell programs.

Researchers created SymFC, a new symbolic execution method for Haskell. It is an all-paths symbolic execution engine. It can symbolically represent arbitrary types and values in GHC core.

SymFC works as a GHC plugin. It uses embeddings to offer configurable semantics. An embedding is a Haskell function that can use arbitrary code and SMT primitives.

Existing symbolic execution tools for Haskell are restricted to a subset of the language. They exclude real-world applications like IO. They also have a hard time scaling to larger programs.

Existing techniques offer fixed symbolic semantics for SMT base types. This makes it hard to cover more programming constructs and libraries. It also makes it difficult to fine-tune symbolic representations for speed.

SymFC uses Haskell's coercions to integrate embeddings into the type system. These let users transparently convert between a Haskell type and its embedding.

The researchers checked properties of the iproute library and Haskell's container library. They built embeddings for IORef, the Ptr/ForeignPtr interface, and the Clash hardware library. Evaluation reports a 6.25x speedup on G2's own benchmarks.

Key facts

  • SymFC is an all-paths symbolic execution engine for Haskell.
  • The method uses embeddings to support new programming constructs.
  • SymFC achieved a 6.25x speedup on G2's own benchmarks.
  • The tool was implemented as a GHC plugin.

All sections

Edition