Giter Site home page Giter Site logo

quickcheck-lockstep's Introduction

quickcheck-lockstep's People

Contributors

edsko avatar jorisdral avatar jasagredo avatar

Stargazers

Amir M. Saeid avatar Larry Diehl avatar Scott Fleischman avatar  avatar Josh Burgess avatar Tim Kersey avatar

Watchers

Andres Löh avatar James Cloos avatar  avatar Mitchell Dalvi Rosen avatar  avatar  avatar Scott Fleischman avatar

quickcheck-lockstep's Issues

printed counter-examples don't produce valid code

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. However quickcheck-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 :-)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.