diku-dk / futhark

:boom::computer::boom: A data-parallel functional programming language
http://futhark-lang.org
ISC License
2.41k stars 166 forks source link

Property-based testing #2163

Open athas opened 4 months ago

athas commented 4 months ago

It is time to develop a property-based testing system for Futhark. The main challenge is that Futhark itself is not rich enough to directly implement a QuickCheck-like system, so the actual driver loop has to be external. It would still be preferable for generators (and perhaps even shrinkers) to be Futhark entry points.

Last time we tried it, we didn't have the server protocol, so we were quite limited in which kinds of values we could manipulate externally. This is no longer the case.

Perhaps we can directly piggyback on an existing Haskell library (e.g. possibly QuickCheck itself), but it must not be dependent on a Haskell compiler at run time.