GithubHelp home page GithubHelp logo

janet-minipbt-translation's Introduction

janet-minipbt-translation

A translation into Janet of parts of MiniPBT -- code from a series of articles about property-based-testing by kurtschelfthout.

Motivation

I've thought for some time that it would be nice to have an appropriate generative testing library for Janet. I thought to port Hypothesis but after trying to understand its source and related papers on a number of occasions, eventually put things on hold as I did not reach a point where felt I understood it well enough to go through with trying to implement (and maintain) it.

Somewhat later, I came across a series of articles about property-based testing in which the author was kind enough to build up three simple implementations (with working code even!).

The first two were based on familiar approaches [1] but the third one in the article series was not. Allegedly, it was even simpler to understand than Hypothesis and there seemed to be some hope of delivering decent enough results.

This repository is primarily about a Janet translation of the code in this "new found" approach.

Some Details

The approach of interest was covered in the Random All the Way Down article (the sixth in the series) and the file, random-based.janet, contains a translation attempt.

There is also another file, vintage.janet, which is a translation of code from the second article, The Essentials of Vintage QuickCheck. This is included for comparison purposes and might be a better starting point for understanding as it's simpler and the code has a fair bit of overlap with what's in random-based.janet.

Suggestions

If this repository and/or the related ideas are of interest, I recommend reading at least the first two articles of the series (starting with this one) plus the sixth one, and then either attempting your own translation or taking a look at what's in this repository.

Alternatively (or additionally), you might take a look at the Random testing parts of CsCheck -- the library that inspired the sixth article.

Credits

Many thanks go out to the following folks:

  • AnthonyLoyd - author of CsCheck, the library that the sixth article in the series was inspired by.
  • DRMacIver - creator of Hypothesis, the system I studied (and applied successfully) but failed to understand well enough to translate.
  • kurtschelfthout - author of article series, related code, and FsCheck.

Footnotes

[1] The three implementations are inspired by:

janet-minipbt-translation's People

Stargazers

 avatar

Watchers

 avatar

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.