Working on new sCASP implementation. Can you share programs?

I’m working on a new implementation for sCASP, for now called ssCASP (s is the successor symbol :slight_smile: ). This is work mostly done with Claude code. Current status:

  • Built a pretty extensive test set of small programs as well as random programs with a simple (slow) oracle. This process found quite a few minor quirks in the current implementation that are fixed.
  • Started a fresh implementation:
    • Completely from scratch, based on the design analysis of the old code and the literature.
    • It compiles sCASP predicates to normal Prolog predicates. This is faster and allows for profiling, coverage test, debugger, etc.
    • It uses dif/2 rather than its own disequality constraint. This allows for disequality on a larger set of terms.
  • Main results:
    • The implementation seems pretty reliable as it stands. I’ll review it carefully as some point to eliminate some poor Prolog coding style issues and possibly some design choices. Then re-review by AI. I’ve done that before and it results in pretty good code.
    • It is about 2 times faster on the current set of “golden” tests. The event calculus tests are slower, one even 440 times :frowning: . The old version was unsound though.

The new implementation adds support for domains, using e.g.

:- domain day_of_the_week = [monday, tuesday, ...].
:- pred p(day_of_the_week).
p(X) :- ...

The domains are used to simplify the forall processing in dual rules. The pred/1 is not ambiguous as the descriptions use :- pred Goal :: Description. This however will be deprecated and replaced by :- describe Goal :: Description.

The repo will soon come online.

Seeking programs

Do you have interesting sCASP programs you can share? Larger programs are better tests than the small stuff we have now! Also problematic programs are interesting as we can see whether we can improve them. Please include queries.

3 Likes