
Hello!
Qualche giorno fa ho scaricato e installato l'ultima (0.6.1) versione della PPL, e sto facendo qualche esperimento usando la sua interfaccia verso Sicstus Prolog. In particolare sono interessato agli operatori di rimozione di dimensioni:
1) ppl_Polyhedron_remove_higher_dimensions/2 2) ppl_Polyhedron_remove_dimensions/2
Tutto bene con il primo, meno con il secondo, che sembra non eliminare la variabile voluta e che mantiene quindi la dimensione del poliedro originale.
Puo' darsi che mi sbagli, ma per prudenza ho pensato di mandarvi questa mail e di allegare anche un piccolo programma cosicche' possiate riprodurre il mio 'esperimento'. L'output del programma allegato segue in fondo a questa mail. Spero possiate verificare se sia io a scrivere codice sbagliato o se non vi sia qualche sorta di bug nell'API verso Sicstus.
Vi ringrazio molto,
Jacopo Mantovani Artificial Intelligence Laboratory DIST - University of Genova http://www.ai.dist.unige.it/jacopo
SICStus 3.10.0 (x86-linux-glibc2.2): Tue Dec 17 15:24:21 CET 2002 Licensed to dist.unige.it | ?- yes % source_info | ?- compile(prova). % compiling /home/staff/jacopo/work/ppl/prova.pl... % compiling /usr/lib/ppl/ppl_sicstus.pl... % loading foreign resource /usr/lib/ppl/ppl_sicstus.so in module user % compiled /usr/lib/ppl/ppl_sicstus.pl in module user, 30 msec 16112 bytes % compiled /home/staff/jacopo/work/ppl/prova.pl in module user, 30 msec 22076 bytes yes % source_info | ?- init. PPL versione 0.6.1 This is the Parma Polyhedra Library (PPL) version 0.6.1. Copyright (C) 2001-2004 Roberto Bagnara bagnara@cs.unipr.it. The PPL is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Compiled by the GNU C++ compiler version 3.3.4 (Debian 1:3.3.4-13). Report bugs to ppl-devel@cs.unipr.it. For the most up-to-date information see the Parma Polyhedra Library site: http://www.cs.unipr.it/ppl/ .
-- Using ppl_Polyhedron_remove_higher_dimensions --
Constraints before: [1*A>=0,1*B>=0,-1*B>= -2,-1*A>= -2] Generators before: [point(2*A+2*B),point(2*A),point(2*B),point(0)] Dimension before: 2 Constraints after: [1*A>=0,-1*A>= -2] Generators after: [point(2*A),point(0)] Dimension after: 1
-- Using ppl_Polyhedron_remove_dimensions --
Constraints before: [1*A>=0,1*B>=0,-1*B>= -2,-1*A>= -2] Generators before: [point(2*A+2*B),point(2*A),point(2*B),point(0)] Dimension before: 2 Constraints after: [1*A>=0,1*B>=0,-1*B>= -2,-1*A>= -2] Generators after: [point(2*A+2*B),point(2*A),point(2*B),point(0)] Dimension after: 2 yes % source_info | ?-

Jacopo Mantovani wrote:
Qualche giorno fa ho scaricato e installato l'ultima (0.6.1) versione della PPL, e sto facendo qualche esperimento usando la sua interfaccia verso Sicstus Prolog. In particolare sono interessato agli operatori di rimozione di dimensioni:
- ppl_Polyhedron_remove_higher_dimensions/2
- ppl_Polyhedron_remove_dimensions/2
Tutto bene con il primo, meno con il secondo, che sembra non eliminare la variabile voluta e che mantiene quindi la dimensione del poliedro originale.
Puo' darsi che mi sbagli, ma per prudenza ho pensato di mandarvi questa mail e di allegare anche un piccolo programma cosicche' possiate riprodurre il mio 'esperimento'. L'output del programma allegato segue in fondo a questa mail. Spero possiate verificare se sia io a scrivere codice sbagliato o se non vi sia qualche sorta di bug nell'API verso Sicstus.
[...]
-- Using ppl_Polyhedron_remove_dimensions --
Constraints before: [1*A>=0,1*B>=0,-1*B>= -2,-1*A>= -2] Generators before: [point(2*A+2*B),point(2*A),point(2*B),point(0)] Dimension before: 2 Constraints after: [1*A>=0,1*B>=0,-1*B>= -2,-1*A>= -2] Generators after: [point(2*A+2*B),point(2*A),point(2*B),point(0)] Dimension after: 2 yes % source_info | ?-
Dear Jacopo,
I reply to you in English because this is the official language of the list (in this particular case this is especially important because the main maintainer of the Prolog interface is Pat Hill).
I have tried to reproduce the problem you observe, but I could not. I am using SICStus 3.11.1 because that is the only version I have at the moment, and the release 0.6.1 of the PPL: the same you use. Below the signature you can find the output I get. By the way: what is the "% source_info" string you have in your output?
The first thing to do is the following: after compiling the PPL with `make', please run the regression tests with `make check' and see if you see any failure. Then come back to us and we will proceed from there. Ciao,
Roberto
P.S. I attach your test program again in case someone on this list has SICStus 3.10.0 handy. The attachment in your message was filtered out due to a misconfiguration of our mailing list software (just fixed). The attached program is identical to yours with the exception that it assumes the most common installation path (`/usr/local' instead of `/usr').

Hello again,
Roberto Bagnara wrote:
The first thing to do is the following: after compiling the PPL with `make', please run the regression tests with `make check' and see if you see any failure. Then come back to us and we will proceed from there.
I followed your instructions, and I attach here the (final) results of the check phase. Actually, three so-called 'expected failures' are reported, and I suppose that they can be the cause of the wrong behaviour of my version of the PPL.. Meanwhile, I try to install the PPL on some other machine here in the lab.
Thank you very much,
Jacopo.

Jacopo Mantovani wrote:
Roberto Bagnara wrote:
The first thing to do is the following: after compiling the PPL with `make', please run the regression tests with `make check' and see if you see any failure. Then come back to us and we will proceed from there.
I followed your instructions, and I attach here the (final) results of the check phase. Actually, three so-called 'expected failures' are reported, and I suppose that they can be the cause of the wrong behaviour of my version of the PPL..
Hi Jacopo,
no, the three expected failures are OK.
What is wrong, instead, is the following fragment of the file you attached:
[...] Making check in SICStus make[3]: Entering directory `/root/ppl-0.6.1/interfaces/Prolog/SICStus' make[4]: Entering directory `/root/ppl-0.6.1/interfaces/Prolog/SICStus' make check-local make[5]: Entering directory `/root/ppl-0.6.1/interfaces/Prolog/SICStus' make[5]: Nothing to be done for `check-local'. make[5]: Leaving directory `/root/ppl-0.6.1/interfaces/Prolog/SICStus' make[4]: Leaving directory `/root/ppl-0.6.1/interfaces/Prolog/SICStus' make[3]: Leaving directory `/root/ppl-0.6.1/interfaces/Prolog/SICStus' [...]
This is not what is supposed to happen: there is regression testing code in the SICStus directory and this is executed, _unless_ the presence of SICStus was not detected at library configuration time. At some stage, the configure script will print
checking for sicstus...
What does it print afterwards? Can you also please send the file `config.log' that was created by the `configure' script?
Ciao,
Roberto

Hi again (and sorry for bothering so much)
Roberto Bagnara wrote:
This is not what is supposed to happen: there is regression testing code in the SICStus directory and this is executed, _unless_ the presence of SICStus was not detected at library configuration time. At some stage, the configure script will print
checking for sicstus...
What does it print afterwards?
Oh, you're absolutely right! It seems that the configure script could NOT detect Sicstus! And this was because of a stupid error of mine: I did not set the PATH variable properly. Anyway, now it works, but my original problem still remains. According to the config.log file, now the problem is the following:
- Sicstus is now detected. - A header file called sicstus.h is NOT detected.
I checked, and that header is located at
/usr/local/software/sicstus/include/sicstus/
which is already in the PATH.
Can you also please send the file `config.log' that was created by the `configure' script?
Yes, sure! I attach it here.
Thank you very much indeed!!
Jacopo.

Jacopo Mantovani wrote:
According to the config.log file, now the problem is the following:
- Sicstus is now detected.
- A header file called sicstus.h is NOT detected.
I checked, and that header is located at
/usr/local/software/sicstus/include/sicstus/
which is already in the PATH.
If by `PATH' you mean the environment variable with the same name, this would not help, as this is for executables only. You must make sure your `sicstus.h' is found by the C and C++ compilers you are using (notice that the SICStus interface is written partly in C and partly in C++).
You have several ways out. The most convenient ones are the following:
1) You can decide that including <sicstus/sicstus.h> from C/C++ programs is something generally useful in your site, in which case you should create a symbolic link to `/usr/local/software/sicstus/include/sicstus' in a place that is normally searched by your compilers, such as `/usr/local/include/sicstus'.
2) Alternatively, you can use the `CPPFLAGS' environment variable as explained in the output of PPL's `configure --help'. So you would configure with a command like
CPPFLAGS=-I/usr/local/software/sicstus/include /usr/local/src/ppl-0.6.1/configure ...
When this is fixed, please run `make check' again and pay speciall attention to what happens in the `interface/Prolog/SICStus' directory. Ciao,
Roberto

Hi again!
Now it works!
I just copied all the header files in
/usr/local/software/sicstus/include/sicstus/
to
/usr/local/include/sicstus/
and everything went fine!!
Thank you very much, now it's time to enjoy using the PPL :-)
ciao ciao,
Jacopo.

Jacopo Mantovani wrote:
Thank you very much, now it's time to enjoy using the PPL :-)
Good!
In case you find yourself in need for more speed, remember to ask us about PPL 0.7. Ciao,
Roberto
participants (2)
-
Jacopo Mantovani
-
Roberto Bagnara