QuickChick / QuickChick

Randomized Property-Based Testing Plugin for Coq
Other
253 stars 46 forks source link

Having problems getting QuickChick to work with Emacs/ProofGeneral and VSCoq #367

Closed EliasC closed 4 months ago

EliasC commented 5 months ago

I downloaded the latest version of the QuickCheck chapter of Software Foundations and I'm having trouble getting it to work:

I am able to use QuickChick successfully in CoqIDE, but either of the two choices above would be preferrable. When compiling the source files in the chapter in a terminal with the Makefile, everything builds and prints correct output from the QuickCheck commands, but the file QuickChickInterface.v fails with the message:

File "./QuickChickInterface.v", line 190, characters 15-22:
Error: The reference OrdType was not found in the current environment.

When troubleshooting I cloned this GitHub repo. Running make also gives an error message related to QuickChickInterface.v:

coqc -R src QuickChick -I plugin QuickChickInterface.v
Error: Can't find file ./QuickChickInterface.v

As far as I can see that file is in the doc directory, which does not seem to be in the include path.

Finally, running the quickChick command line tool immediately fails with

Parse error when reading file: ./QuickChickInterface.v
Fatal error: exception Dune__exe__QuickChickToolParser.MenhirBasics.Error

I am guessing this has to do with the same errors from compiling the file.

I am running an M1 Mac with MacOS 14.2.1, Coq 8.19.1 and QuickChick 2.0.3 (both built from opam). I have also tried with Coq versions 8.18.0 and 8.17.0.

Any help is appreciated!

liyishuai commented 5 months ago

368 should fix the documentation check failure.

@lemonidas Some insights into the Emacs problem?

lemonidas commented 5 months ago

I'll try to see if I can replicate this tomorrow, hopefully it's not an M1 thing.

EliasC commented 4 months ago

@lemonidas FWIW, QuickChick started working for me in Proof General after updating Emacs to 23.9. I still can't see any output when using VSCoq, but that is not a show stopper for me personally.