well-typed / quickcheck-lockstep Goto Github PK
View Code? Open in Web Editor NEWSupport for lockstep-style testing using quickcheck-dynamic
License: BSD 3-Clause "New" or "Revised" License
Support for lockstep-style testing using quickcheck-dynamic
License: BSD 3-Clause "New" or "Revised" License
Older versions of quickcheck-lockstep
that were compatible with quickcheck-dynamic
2.x would produce counter examples like so:
[Var 1 := ANew,
Var 3 := AInsert (GVar (Var 1) OpId) (Right 0) 0,
Var 4 := AInsert (GVar (Var 1) OpId) (Right 1) 0,
Var 8 := AInsert (GVar (Var 1) OpId) (Right 2) 0,
Var 9 := AInsert (GVar (Var 1) OpId) (Right 4) 0,
Var 10 := AInsert (GVar (Var 1) OpId) (Left (GVar (Var 9) OpId)) 0,
Var 13 := AInsert (GVar (Var 1) OpId) (Left (GVar (Var 8) OpId)) 0,
...
These obviously include the variable names.
From quickcheck-dynamic-3.0.0
changelog:
Improved printing of counterexamples in DL - they are now printed as code that can be copied more-or-less verbatim to create a runnable counterexample in code.
So the printing of the counter examples changes. Howeverquickcheck-lockstep
is not compatible with this new method. For example I get:
do action $ ANew
action $ AInsert (GVar var1 OpId) (Right 2) 0
action $ AInsert (GVar var1 OpId) (Right 1) 0
action $ AInsert (GVar var1 OpId) (Right 3) 0
action $ AInsert (GVar var1 OpId) (Right 0) 0
action $ AInsert (GVar var1 OpId) (Left (GVar var20 OpId)) 0
action $ AInsert (GVar var1 OpId) (Left (GVar var3 OpId)) 0
...
obviously the problem here is that variables are used, but never bound, so it's not valid code (and one cannot recover it with a bit of text processing because we never know the variable numbers and they're not sequential in shrunk counter examples).
I understand this is probably because quickcheck-lockstep
has its own notion of variables on top of quickcheck-dynamic
.
Obviously what would be nice is if the printing of counter examples worked somehow. Otherwise it's impractical to run counter examples, and thus impractical to do debugging. I'll go back to the old version for now :-)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.