Brent,
Thank you for resurrecting the Shootout!
Others will no doubt provide a better answer, but
just to get you unstuck, I note that this no-op kludge
run_list([Arg|Args]) :-
name(Arg,ArgStr), name(ArgN,ArgStr), % Kludge
fibo(ArgN,Val),
write(Val), nl, halt.
works around the problem on my Ciao-Prolog 1.9 #344.
Fyi.
Thanks again for your work.
Mitchell Charity
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Hello,
Came across this documentation of persistent predicate database.
ciao_html/ciao_141.html#SEC548
"The concept of persistent predicates provided by this library
essentially implements a light-weight, simple, and at the same time
powerful form of relational database (a deductive database),..."
Does ciao support deductive database features like handling of recursive
rules using tabling etc? (as done by XSB e.g?)
Regards,
Mayuresh.
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
Hi guys,
I've got a bit of a problem with aborting computations. It only appears
to work once, then if I re-run the computation I can't abort it and have
to kill the ciao process. Take the following example:
nzeros( 0,[]).
nzeros( N,[0|Zs] ) :-
NN is N-1,
nzeros( NN,Zs ).
So this code has a bug in that the first and second instances of the
predicate don't have mutually exclusive guards. If I ask it to generate
a list in the ciao shell:
:- nzeros(5,X).
I get the correct answer first, and then ask it to backtrack at which
point ciao correctly goes into an infinite loop trying the second call
to nzeros with negative values of N. I can then ^c^c and hit a to abort
this.
If I now execute the same call again ':- nzeros(5,x).' and again ask it
to backtrack then I can no longer abort the computation. ^c^c is ignored
and I get no response, the only way out is to kill the ciao process. Is
this a bug in ciao?
Amoss
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
I'm trying to get Ciao running in my revised Programming Language
Shootout (http://shootout.alioth.debian.org). Unfortunately, I'm having
trouble handling input from the command line.
Here's a simple (naive) Fibonacci implementation:
:- module(fibo,[main/1],[]).
:- use_module(library(write)).
fibo(0,1).
fibo(1,1).
fibo(N,Val) :- nonvar(N),!,integer(N),N > 0,
N1 is N - 1, fibo(N1,Val1),
N2 is N - 2, fibo(N2,Val2),
Val is Val1 + Val2.
main(Argv) :-
run_list(Argv).
run_list([Arg|Args]) :-
fibo(Arg,Val),
write(Val), nl, halt.
I compile this like so:
# ciaoc -o fibo fibo.pl
{Reading /opt/shootout/shootout/bench/fibo/fibo.pl
WARNING: (lns 17-20) [Args] - singleton variables in run_list/1
}
# ./fibo 3
{Program ended with failure}
#
Any idea what I'm doing wrong? I added in the various type checks based
on the fibonacci.pl example in the distribution, but I'm not having much
luck. What am I overlooking?
Version: Ciao-Prolog 1.9 #351: Sun Jun 27 19:50:42 PDT 2004
Thanks,
-Brent
==============================================================================
Message: Address: Action:
help majordomo(a)clip.dia.fi.upm.es Info. on useful commands
subscribe ciao-users-request(a)clip.dia.fi.upm.es Subscribe to this list
unsubscribe ciao-users-request(a)clip.dia.fi.upm.es Unsubscribe from this list
<whatever> ciao-users(a)clip.dia.fi.upm.es Send message to list
-----------------------------------------------------------------------------
Archived messages: http://www.clip.dia.fi.upm.es/Mail/ciao-users/
-----------------------------------------------------------------------------
1
0
Incidencia de virus
by [SERVER_MADRID] Panda Antivirus for Exchange Server
18 Jun '04
18 Jun '04
Panda Antivirus ha encontrado los siguientes virus en el mensaje:
Server : SERVER_MADRID
Enviado por : contacternsales(a)nero.com
Dirección : contacternsales(a)nero.com
Para : ciao-users-lstpr(a)clip.dia.fi.upm.es
Asunto : Re: List
Fecha : 18/06/2004 08:52:36
Virus encontrado en el correo y se ha eliminado
Fichero : details.txt
.pif dentro de: my_list01.zip
Virus : W32/Netsky.P.worm - Borrado
http://www.pandasoftware.es
1
0
Incidencia de virus
by [SERVER_MADRID] Panda Antivirus for Exchange Server
18 Jun '04
18 Jun '04
Panda Antivirus ha encontrado los siguientes virus en el mensaje:
Server : SERVER_MADRID
Enviado por : contacternsales(a)nero.com
Dirección : contacternsales(a)nero.com
Para : ciao-users-lstpr(a)clip.dia.fi.upm.es
Asunto : Re: List
Fecha : 18/06/2004 08:52:36
Virus encontrado en el correo y se ha eliminado
Fichero : details.txt
.pif dentro de: my_list01.zip
Virus : W32/Netsky.P.worm - Borrado
http://www.pandasoftware.es
1
0
Incidencia de virus
by [SERVER_MADRID] Panda Antivirus for Exchange Server
18 Jun '04
18 Jun '04
Panda Antivirus ha encontrado los siguientes virus en el mensaje:
Server : SERVER_MADRID
Enviado por : contacternsales(a)nero.com
Dirección : contacternsales(a)nero.com
Para : ciao-users-lstpr(a)clip.dia.fi.upm.es
Asunto : Re: List
Fecha : 18/06/2004 08:52:36
Virus encontrado en el correo y se ha eliminado
Fichero : details.txt
.pif dentro de: my_list01.zip
Virus : W32/Netsky.P.worm - Borrado
http://www.pandasoftware.es
1
0
Incidencia de virus
by [SERVER_MADRID] Panda Antivirus for Exchange Server
18 Jun '04
18 Jun '04
Panda Antivirus ha encontrado los siguientes virus en el mensaje:
Server : SERVER_MADRID
Enviado por : john.bowden(a)anu.edu.au
Dirección : john.bowden(a)anu.edu.au
Para : ciao-users-lstpr(a)clip.dia.fi.upm.es
Asunto : Mail Delivery (failure
ciao-users-lstpr(a)clip.dia.fi.upm.es)
Fecha : 18/06/2004 08:52:22
Virus encontrado en el correo y se ha eliminado
Fichero : message.scr
Virus : W32/Netsky.P.worm - Borrado
http://www.pandasoftware.es
1
0
Incidencia de virus
by [SERVER_MADRID] Panda Antivirus for Exchange Server
18 Jun '04
18 Jun '04
Panda Antivirus ha encontrado los siguientes virus en el mensaje:
Server : SERVER_MADRID
Enviado por : contacternsales(a)nero.com
Dirección : contacternsales(a)nero.com
Para : ciao-users-lstpr(a)clip.dia.fi.upm.es
Asunto : Re: List
Fecha : 18/06/2004 08:29:38
Virus encontrado en el correo y se ha eliminado
Fichero : details.txt
.pif dentro de: my_list01.zip
Virus : W32/Netsky.P.worm - Borrado
http://www.pandasoftware.es
1
0
Incidencia de virus
by [SERVER_MADRID] Panda Antivirus for Exchange Server
18 Jun '04
18 Jun '04
Panda Antivirus ha encontrado los siguientes virus en el mensaje:
Server : SERVER_MADRID
Enviado por : Yahoo! Groupes
Dirección : notify(a)yahoogroupes.fr
Para : ciao-users-lstpr(a)clip.dia.fi.upm.es
Asunto : Impossible d'envoyer votre message
Fecha : 18/06/2004 08:26:12
Virus encontrado en el correo y se ha eliminado
Fichero : website_genidf.txt.exe dentro de: Re: Re: thanks!/
Virus : W32/Netsky.P.worm - Borrado
http://www.pandasoftware.es