RUGE [1] is another open source PROLOG framework for functional and load testing. Brendon McCarthy originally developed it for testing financial applications at American Express.<p>Brendon presented it at the 2013 Workshop on Domain-Specific Languages for Financial Systems [2]. One observation made by the Haskellers was that PROLOG approaches such as these are attempting to solve a problem that has already been solved by QuickCheck [3].<p>[1] <a href="http://bmccarthy.bitbucket.org/ruge/faq.html" rel="nofollow">http://bmccarthy.bitbucket.org/ruge/faq.html</a>
[2] <a href="http://dslfin.org/" rel="nofollow">http://dslfin.org/</a>
[3] <a href="https://en.wikipedia.org/wiki/QuickCheck" rel="nofollow">https://en.wikipedia.org/wiki/QuickCheck</a>
Findall is just a cartesian product...something easily available in pretty much any language out there. Not that I think Prolog is a bad fit for test data generation, just that this example is entirely too simple to show its power.<p>Where Prolog becomes really powerful for this use case is modeling the underlying business rules and selectively creating test cases that acknowledge those rules. A tiny bit of familiarity with Prolog goes a long way here. I've modeled about 95% of the underlying logic of 50k SLOC Java business rule systems using less than a hundred lines of Prolog. And the ability to infer both forward and backwards is extremely powerful (ex. if you have created F(X,Y) = Z, then you implicitly have a rule for determining X given Y and Z).
so the trick is to use findall? and the problem is that nobody knows prolog?<p>why not then just implement findall for other languages? it's like 2 or 3 loops anyway, if you don't care about performance. which you don't since this generates test data