From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id ABDF37F736 for ; Tue, 15 Sep 2015 16:31:09 +0200 (CEST) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=Neutral smtp.pra=simon.cruanes.2007@m4x.org; spf=Pass smtp.mailfrom=SRS0=eUB6=JV=m4x.org=simon.cruanes.2007@bounces.m4x.org; spf=Pass smtp.helo=postmaster@mx1.polytechnique.org Received-SPF: Neutral (mail3-smtp-sop.national.inria.fr: domain of simon.cruanes.2007@m4x.org does not assert whether or not 129.104.30.34 is permitted sender) identity=pra; client-ip=129.104.30.34; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="SRS0=eUB6=JV=m4x.org=simon.cruanes.2007@bounces.m4x.org"; x-sender="simon.cruanes.2007@m4x.org"; x-conformance=sidf_compatible; x-record-type="spf2.0" Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of SRS0=eUB6=JV=m4x.org=simon.cruanes.2007@bounces.m4x.org designates 129.104.30.34 as permitted sender) identity=mailfrom; client-ip=129.104.30.34; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="SRS0=eUB6=JV=m4x.org=simon.cruanes.2007@bounces.m4x.org"; x-sender="SRS0=eUB6=JV=m4x.org=simon.cruanes.2007@bounces.m4x.org"; x-conformance=sidf_compatible; x-record-type="spf2.0" Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of postmaster@mx1.polytechnique.org designates 129.104.30.34 as permitted sender) identity=helo; client-ip=129.104.30.34; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="SRS0=eUB6=JV=m4x.org=simon.cruanes.2007@bounces.m4x.org"; x-sender="postmaster@mx1.polytechnique.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0B1BABZKvhVnCIeaIFdFoNhaYJksUiLKoJBhHQ7EQEBAQEBAQERAQEBAQEIFAlPQQSDXwEDAgwXBFIQCQIOCgkhAgIPBQ0bIROIGQMSBAmYep0rjzYNhGkMIBmLV4JQHoE2g1kvgRQFlVUHhRCGBYFqgheRNoc9N4I9HIFWbwEBhwmDHwEBAQ X-IPAS-Result: A0B1BABZKvhVnCIeaIFdFoNhaYJksUiLKoJBhHQ7EQEBAQEBAQERAQEBAQEIFAlPQQSDXwEDAgwXBFIQCQIOCgkhAgIPBQ0bIROIGQMSBAmYep0rjzYNhGkMIBmLV4JQHoE2g1kvgRQFlVUHhRCGBYFqgheRNoc9N4I9HIFWbwEBhwmDHwEBAQ X-IronPort-AV: E=Sophos;i="5.17,536,1437429600"; d="asc'?scan'208";a="147385485" Received: from mx1.polytechnique.org ([129.104.30.34]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-GCM-SHA384; 15 Sep 2015 16:31:08 +0200 Received: from carty (hc584-1-88-180-84-34.fbx.proxad.net [88.180.84.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ssl.polytechnique.org (Postfix) with ESMTPSA id 48E761408EEE4; Tue, 15 Sep 2015 16:31:07 +0200 (CEST) Date: Tue, 15 Sep 2015 16:30:45 +0200 From: Simon Cruanes To: Carl Eastlund Cc: Gabriel Scherer , Yaron Minsky , "caml-list@inria.fr" Message-ID: <20150915143044.GA22560@carty> References: <55F536EE.5010901@etorok.net> <20150913155224.GE16946@carty> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23.1 (2014-03-12) X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Tue Sep 15 16:31:07 2015 +0200 (CEST)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.000024, queueID=CEB4F1408EEED X-Org-Mail: simon.cruanes.2007@polytechnique.org Subject: Re: [Caml-list] Quick Check like testing for OCaml? --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 =C3=A9crit : > 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. >=20 > We just had an intern, Daniel Spencer, implement shrinking. That will ma= ke > its way to the public release shortly. >=20 > On Tue, Sep 15, 2015 at 10:06 AM, Gabriel Scherer > wrote: >=20 > > > >> https://github.com/janestreet/core_kernel/blob/master/src/quickcheck_g= enerator.mli > >> > >> https://github.com/janestreet/core_kernel/blob/master/src/quickcheck_o= bserver.mli > >> > > > > This is very nice. > > I hope the library will also get shrinking support, because it not so e= asy > > to do, and important in practice. > > > > On Tue, Sep 15, 2015 at 3:09 PM, Yaron Minsky > > wrote: > > > >> Core_kernel has a recently added quickcheck library. Carl Eastlund, w= ho > >> 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_g= enerator.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 OUni= t, > >>> 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=C3=B6r=C3=B6k Edwin a =C3=A9crit : > >>> > On 09/13/2015 11:09 AM, Keiko Nakata wrote: > >>> > > Hi, > >>> > > > >>> > > I am looking for (reasonably matured and hopefully easy to instal= l) > >>> 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 qui= te > >>> 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 > >>> > --=20 Simon Cruanes http://weusepgp.info/ key 49AA62B6, fingerprint 949F EB87 8F06 59C6 D7D3 7D8D 4AC0 1D08 49AA 62B6 --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJV+CuSAAoJEErAHQhJqmK26zsQAJRiiNHpQi1Fyb0+MWrvDAOz g/3iEYZn+KtMM6ZkrQA2aBFgyqikgtER5nx9xKR7qMf0xqigAEZCAPBxOr7xa+AJ zMQ5epkbJx843dqHjbb76Uv/RlwGcUGzRBG6mVJZacy9yp5qNcJU7X6F2wmoUYY2 NIzIiJWC5VR5u09GKhlab1iqIKgRgOEUyi2azh34VHKQUe8CvjLCHx5XnRPD7fNQ vArJo9PBb0sHYJxpjqHfQMLlmugWnnStvEjhUFfSj9/nmb+ikgSgBJfKW21PMJxq OYXqnyOPuy9YblbhnBjYhThL4pnDlrUmjaVBbGhS1yGusasXMiMseW9ijYxlkV6O ycyohSzxAnNLDqnQW4kkGUOBW85X7tvJZqs+B7OCsPyHtLcc0+NOyQS2S9L48hRd 73tIB99uYD7WDY9Nd3iqCtr9P1tjRrYwkGjzTn56OG5lNdRTx13oUrLCAOivBJda jdx6xZetIDXlsvIZPvRtqGpx9hK4Ca+kv1wKSQKF9wSXIiIr0J3MNKtNO+U0GMqf JMFi2Y8agPpy7bdTlORJyzSsoFyTh1jXhhFz2IHFLTu+oyTodJy7AeTpNrh3gU5q ANgK+IfVdpZiNiHBdI4Pqzsd7gDV0ukvTsQUcJ/J+xWYHoD0yyiTk2Xsn8/hUfQO uvF2/6H/60vHgOeEqPlQ =dWqS -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM--