Compiling ASPC and ACSolver on Linux

by Forrest Sheng Bao http://fsbao.net

ACSolver is an ASP-CLP(R) solver. The language AC(R) is extent from CR-Prolog. There are some problems while compiling them on Linux. So I modified part of original code, such as head file or Makefile. The original webpage to ASPC(The inference engine) and ACSolver(solver) is here:http://www.cs.ttu.edu/~mellarko/acsolver.html

The source tar balls that work fine on Ubuntu Linux 7.10 are here:
ASPC: http://narnia.cs.ttu.edu/drupal/files/source/2008/aspc-1.0-Forrest-modified.tar.gz
ACSolver: http://narnia.cs.ttu.edu/drupal/files/source/2008/acsolver-1.56-Forrest-modified.tar.gz

The GCC version here is 4.1.3.
forrest@narnia:~/bin/aspc-1.0/src$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.1.3 --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --enable-checking=release x86_64-linux-gnu
Thread model: posix
gcc version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)

To install ASPC:
  1. tar zxfv aspc-1.0-Forrest-modified.tar.gz
  2. make aspc

Then you should be able to see a new executables called "aspc" in the directory.

To install ACSolver:

  1. tar zxfv acsolver-1.56-Forrest-modified.tar.gz
  2. ./configure
  3. cd src
  4. make
Then you should be able to see a new executable called crmodels in the directory. I don't know why it is not acsolver as expected. So I just copy crmodels into a new file named acsolver in the same directory. And set the path to acsolver and aspc into $PATH environmental variable. Then you can go to the tests directory of acsolver. You can run a test, like this
$ crmodels t1.lp 
acsolver version 1.56
ASPC
Loaded Everything
maxmodels: 1
Number of Rules: 4
Number of Atoms: 5
Answer: 1
Stable Model: a c b 
True
Duration: 0.020
Ground+Load Time: 0.012
Sounds great. The program is:
%test basic functionality
a.
b.
c :- a.
d :- not c.