Open byorgey opened 6 years ago
This should happen as part of the Prop
extension (#217). Properties will no longer be a separate syntactic category, but just terms of type Prop
.
Well, it didn't happen (at least not completely) as part of #217 . The next step is to just look through the code and make a plan for how to clean things up.
Here is the current organization of code related to properties:
Disco.Property
has some utility functions for generating samples and inverting results.Disco.Interpret.CESK
defines ensureProp
, testProperty
, runTest
, + a few other related utility functions. They call CESK stuff (e.g. runTest
calls eval
which calls runCESK
) and in turn CESK evaluation of e.g. holds
will call testProperty
.Disco.Interactive.Commands
defines runAllTests
, which currently returns Sem r Bool
; want to change it to return a summary of results instead of a Bool
. Also has handleTest
which calls runTest
.
Edit: this has likely changed since I wrote that comment. First task would be to just get a survey of how the code is currently organized.
e.g. currently desugaring happens for every single test! There should be a desugaring pass that happens before tests are run. Desugaring can also include translating special properties into universally quantified ones for randomized testing (but keeping the special names around for printing results).
The way we are returning results from testing is also silly, we should cleanly separate the results from printing messages.