News for hackers. Stuff that matters.
Re:Prolog Coding Horror by xlii on Monday May 18, 2026 @03:28AM (#48176486)
My last use case: Testing Scenario Generator.

I have a application that has actions and actions can happen pretty much in any order. By default all scenarios should be an error except for ones that are in the boundary of logical steps, e.g.

   login  -> ...[!logout]... -> logout
   login  -> ...[!logout]... -> dashboard
   upload -> ...             -> view_file
Of course you can immediately see problem with this scope - what happens when non-logged-in user tries to upload or user logouts after upload etc.

So I have ~50 actions, ~30 constraints which generate >200 scenarios which then are transformed into test suite.

Yet in short: Prolog is useful everywhere it's simple to express a rule but not that easy to implement it.

There are no comments on this comment yet.