hubFS: THE place for F#

. . . are you on The Hub?
Welcome to hubFS: THE place for F# Sign in | Join | Help
in Search

FsCheck 0.2

Last post 11-17-2008, 8:49 by toyvo. 5 replies.
Sort Posts: Previous Next
  •  08-08-2008, 14:49 6553

    FsCheck 0.2

    Hi all,

    I've updated FsCheck, a functional random testing framework, ported from Haskell's QuickCheck.

    More information on my blog:

    http://fortysix-and-two.blogspot.com/2008/08/announcing-fscheck-02.html

    thanks everyone who provided feedback on the previous version!

    Kurt
    http://fortysix-and-two.blogspot.com/
  •  08-15-2008, 3:08 6604 in reply to 6553

    Re: FsCheck 0.2

    Update: I noticed that the download comes with a preliminary version of random.fs, which contained many mistakes! I've now updated the link. Sorry!
    http://fortysix-and-two.blogspot.com/
  •  08-31-2008, 7:02 6763 in reply to 6604

    Re: FsCheck 0.2

    Hi!

    I just posted a new version of FsCheck 0.2 which is compatible with the newly released september CTP, and uses the new project structure etc. Good stuff from the F# team!

    Follow the link above...

    cheers,

    Kurt
    http://fortysix-and-two.blogspot.com/
  •  11-14-2008, 11:34 7734 in reply to 6763

    Re: FsCheck 0.2

    Hi Kurt,

    Thanks for doing this, FsCheck saved my day in debugging one project. I have a few questions.
    • What are the licensing terms?
    • Do you think it's possible to throw some reflection in and get to a point where qcheck (fun a -> a+a = 2*a) would work?
    • Do you intend to keep the structure as Haskell-compatible as possible? I would think there are some shortcuts one can take by not being constrained by immutability.
    Cheers,

    Anton

    --

    Anton Tayanovskyy
    F# Developer

    IntelliFactory, Budapest - Hungary
    www.intellifactory.com
  •  11-15-2008, 6:04 7757 in reply to 7734

    Re: FsCheck 0.2

    Hi Anton,

    - FsCheck has a permissive license, like the FreeBSD license ( http://www.freebsd.org/copyright/freebsd-license.html ), under the condition that the QuickCheck license agrees with this (I'll check this, couldn't find anything on the QuickCheck homepage) I guess the worst that could happen is that it becomes (L)GPL.

    - Yes, in fact I've added some code that determines the generator automatically, based on the type of the arguments. If you would like a sneak preview of that, email me at kurt dot schelfthout at gmail dot com

    Further simplifications I don't see happening; specifically you'll have to keep using 'prop' or 'propl'. Currently the only way out I see is using quotations, which is a huge overkill.

    - I no longer explicitly intend to do that. However I must say that I tried taking one of those shortcuts before (in particular, I tried to use 'stateful' random number generator), but I ended up going back to the immutable, pure Haskell implementation, since I ran into problems (with function generation...). But I'm open to suggestions.

    I'd like to take this opportunity to announce my plans for the next release:

    - smaller bug fixes, some cleaning
    - adding FsCheck.fsi module declaration & comments
    - derive generators from types of arguments (mostly done)
    - ability to group properties in classes, and qcheck the class with one command (mostly done)
    - investigate using FsCheck with unit testing frameworks like MbUnit & co, or generally how to use it in practice (currently active)
    - putting the project on codeplex + clarifying license

    I intend to finalize this before the end of the year.

    Finally, I would like to ask you a question: how are you using FsCheck? I mean, do you have a separate console app that you run, or do you use F# interactive, something else?

    thanks, and hope this helps,

    Kurt
    http://fortysix-and-two.blogspot.com/
  •  11-17-2008, 8:49 7808 in reply to 7757

    Re: FsCheck 0.2

    Hi Kurt,

    Thanks for your reply, very happy it's BSD-licensed.

    So far I used a "test.fsx" file in my project with FsCheck tests inside, not sure how it will scale but it's a start. Anyway - keep up the good work. In particular the float generator was very helpful by reminding about the existence of NaN and infinity values.

    For educational reasons I'm now playing with implementing something like FsCheck from scratch, and I'm doing random generation the impure way. Would be interesting to see if I also run into the issues you mention :)

    --Anton


    --

    Anton Tayanovskyy
    F# Developer

    IntelliFactory, Budapest - Hungary
    www.intellifactory.com
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems