caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Simon Cruanes <simon.cruanes.2007@m4x.org>
To: Carl Eastlund <ceastlund@janestreet.com>
Cc: Gabriel Scherer <gabriel.scherer@gmail.com>,
	Yaron Minsky <yminsky@janestreet.com>,
	"caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] Quick Check like testing for OCaml?
Date: Tue, 15 Sep 2015 16:30:45 +0200	[thread overview]
Message-ID: <20150915143044.GA22560@carty> (raw)
In-Reply-To: <CALyFioSuE51OTbx=UUSPgKp-iM_Zs91-mX4ksmTVABZd8X+OeA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3691 bytes --]

I am working on adding shrinking into qtest
(https://github.com/vincent-hugot/iTeML/), and I'm curious about what
design choices you did. Haskell literate mentions

shrink: 'a -> 'a list

to shrink values, but on large counter-examples like large lists, it
might be very slow. I'm trying to use iterators to generate shrunk(?)
values lazily.

Also, do Core users write random generators or shrinking functions
themselves, or do you have a deriver for them? I assume you use "with sexp"
to display counter-examples.

Cheers,

Le Tue, 15 Sep 2015, Carl Eastlund a écrit :
> Glad you like it.  Our Quickcheck implementation is new and its design is
> still somewhat of an experiment, so I can't claim it's a mature library as
> originally asked for in this thread, but of course we appreciate feedback
> from early adopters.  As Yaron said, I'm writing up a blog post that will
> go into more detail about it.
> 
> We just had an intern, Daniel Spencer, implement shrinking.  That will make
> its way to the public release shortly.
> 
> On Tue, Sep 15, 2015 at 10:06 AM, Gabriel Scherer <gabriel.scherer@gmail.com
> > wrote:
> 
> >
> >> https://github.com/janestreet/core_kernel/blob/master/src/quickcheck_generator.mli
> >>
> >> https://github.com/janestreet/core_kernel/blob/master/src/quickcheck_observer.mli
> >>
> >
> > This is very nice.
> > I hope the library will also get shrinking support, because it not so easy
> > to do, and important in practice.
> >
> > On Tue, Sep 15, 2015 at 3:09 PM, Yaron Minsky <yminsky@janestreet.com>
> > wrote:
> >
> >> Core_kernel has a recently added quickcheck library.  Carl Eastlund, who
> >> is the main author, is finishing up a blog post describing it, but you can
> >> start with the documentation in this file:
> >>
> >>
> >> https://github.com/janestreet/core_kernel/blob/master/src/quickcheck_generator.mli
> >>
> >> On Sun, Sep 13, 2015 at 11:52 AM, Simon Cruanes <
> >> simon.cruanes.2007@m4x.org> wrote:
> >>
> >>> There is also qtest (also called iTeML on github) which is a bit
> >>> special: it's a testing framework providing unit testing through OUnit,
> >>> and simple random testing; its specificy is that tests can be written in
> >>> comments within the module to test, so that the code itself has no
> >>> additional
> >>> dependencies or code bloat due to tests. It is very easy to write new
> >>> tests, since you don't have to add specific test modules.
> >>> It is used, afaik, at least in Batteries and in containers.
> >>>
> >>> I am probably going to work on making qtest and qcheck a bit closer, if
> >>> qtest's developper(s) agree.
> >>>
> >>> Cheers,
> >>>
> >>> Le Sun, 13 Sep 2015, Török Edwin a écrit :
> >>> > On 09/13/2015 11:09 AM, Keiko Nakata wrote:
> >>> > > Hi,
> >>> > >
> >>> > > I am looking for (reasonably matured and hopefully easy to install)
> >>> QuickCheck-like property based testing software for OCaml code.
> >>> > >
> >>> > > Any information is appreciated!
> >>> >
> >>> > There is qcheck.0.4, quickcheck.1.0.2 and kaputt.1.2 on opam.
> >>> > qcheck has documentation in the mli, integration with OUnit and quite
> >>> easy to get started with.
> >>> > Kaputt also has reducers (to produce smaller counterexamples), and
> >>> SmallCheck-like enumeration tests.
> >>> >
> >>> > I haven't tried quickcheck, and haven't found an equivalent to
> >>> SmartCheck's counterexample generalization [1]
> >>> >
> >>> > [1] https://www.cs.indiana.edu/~lepike/pubs/smartcheck.pdf
> >>> >


-- 
Simon Cruanes

http://weusepgp.info/
key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3  7D8D 4AC0 1D08 49AA 62B6

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-09-15 14:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-13  8:09 Keiko Nakata
2015-09-13  8:42 ` Török Edwin
2015-09-13 15:52   ` Simon Cruanes
2015-09-15 13:09     ` Yaron Minsky
2015-09-15 14:06       ` Gabriel Scherer
2015-09-15 14:21         ` Carl Eastlund
2015-09-15 14:30           ` Simon Cruanes [this message]
2015-09-15 14:44             ` Carl Eastlund

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150915143044.GA22560@carty \
    --to=simon.cruanes.2007@m4x.org \
    --cc=caml-list@inria.fr \
    --cc=ceastlund@janestreet.com \
    --cc=gabriel.scherer@gmail.com \
    --cc=yminsky@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).