Compiling s(CASP)

Hi Jan

Sorry to bother, I was curious about s(CASP), then I tried

$ git clone
$ cd sCASP
$ make
$ swipl -O -o scasp -c prolog/scasp/
% Disabled autoloading (loaded 41 files)
[Thread 1 (main) at Sun Sep  5 14:56:25 2021] /home/carlo/swipl-devel/src/pl-comp.c:4924: mark_bvar_access___LD: Assertion failed: max >= 0
C-stack trace labeled "assert_fail":
  [0] save_backtrace() at /home/carlo/swipl-devel/src/os/pl-cstack.c:333 [0x7f91a90d5908]
  [1] __assert_fail() at /home/carlo/swipl-devel/src/pl-assert.c:103 [0x7f91a907a757]
  [2] decompile() at /home/carlo/swipl-devel/src/pl-comp.c:5457 [0x7f91a900980f]
  [3] clause() at /home/carlo/swipl-devel/src/pl-comp.c:6605 [0x7f91a9009a52]
  [4] pl_clauseva_va() at /home/carlo/swipl-devel/src/pl-comp.c:6663 [0x7f91a900a042]
  [5] PL_next_solution___LD() at /home/carlo/swipl-devel/src/pl-vmi.c:4754 [0x7f91a8fe8060]
  [6] query_loop() at /home/carlo/swipl-devel/src/pl-pro.c:155 [0x7f91a902cf7c]
  [7] prologToplevel() at /home/carlo/swipl-devel/src/pl-pro.c:499 [0x7f91a902d84b]
  [8] PL_initialise() at /home/carlo/swipl-devel/src/pl-init.c:1215 [0x7f91a9071dc8]
  [9] swipl(+0x6b6) [0x4006b6]
  [10] __libc_start_main() at /build/glibc-S7Ft5T/glibc-2.23/csu/../csu/libc-start.c:325 [0x7f91a8c03840]
  [11] swipl(+0x709) [0x400709]
Makefile:5: recipe for target 'compile_scasp' failed
make: *** [compile_scasp] Aborted (core dumped)

I’m using: SWI-Prolog version 8.3.29, compiled today from source, but maybe I have to upgrade gcc ?

$ gcc -v
gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~16.04)

BTW, the system seems to work if used interactively (i.e. consulting prolog/, not prolog/scasp/, that is

$ swipl prolog/
?- scasp_load('/home/carlo/test/prolog/sCASP/examples/').

?- ?? nqueens(4, Q).
Answer 1	(in [37088] ms):

nqueens(4,[q(1,2),q(2,4),q(3,1),q(4,3)]) :-
    _nqueens(4,4,[],[q(1,2),q(2,4),q(3,1),q(4,3)]) :-

I would also like to know what the small s in s(CASP) means. Does it stand for symbolic ?

Reproduces. Side effect of the fix for dealing with inline unification for head terms :frowning: Will look tomorrow.

Fixed. See also Creating a qlf file gives an error - #2 by jan

There was first “answer set programming” [ASP], then there was “stable model answer set programming” which added predicates to the propositions [s(ASP)], and then there was “stable model constraint answer set programming” [s(CASP)].

So the s means “stable model” and the parentheses are in the direction of a pun.

I think. :slight_smile:

1 Like

Thanks @JasonMorris for your answer. I considered ‘stable model’ as candidate, but since ASP - as described from Wikipedia - is already based on stable models, maybe there is more.

1 Like

I understood the s() is the pun, referring to successor (can’t find the name of the s(0) s(s(0)), numbers). So, s(ASP) to ASP is the same as C++ is to C :slight_smile:


Very plausible, thanks.
I forgot to start my - rusted - sense of humor engine.

Here’s some support for this hypothesis from a lecture by Gupta in 2018 :slight_smile: