problem with once in yap

View: New views
3 Messages — Rating Filter:   Alert me  

problem with once in yap

by Ingo Thon-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When loading with yap -l  a file containing

p(X) :- format('a~n',[]),once(X),format('b~n',[]).
q(X) :- format('a~n',[]),once(( (X) ; X )),format('b~n',[]).
q2(X) :- format('a~n',[]),once(( once(X) ; X )),format('b~n',[]).
r(X) :- format('a~n',[]),once((format('g~n',[]);format('g~n',
[]))),format('b~n',[]).
:-p(format('goal ~n',[])).
:-q(format('goal ~n',[])).
:-q2(format('goal ~n',[])).
:-r(format('goal ~n',[])).


q fails like being undefined.
:- user:q(format(goal ~n,[])) failed.
But no error msg about its definition

all other predicates succeeds.

Yap version is 5.1.3

Ingo

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: problem with once in yap

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Ingo

Sorry for the delay. This looks like a bug in the compilation of once
(another one :( ). Hopefully it should be easy to fix.

Thanks!

Vitor

On Sun, Oct 26, 2008 at 3:37 PM, Ingo Thon <ingo.thon@...> wrote:

> When loading with yap -l  a file containing
>
> p(X) :- format('a~n',[]),once(X),format('b~n',[]).
> q(X) :- format('a~n',[]),once(( (X) ; X )),format('b~n',[]).
> q2(X) :- format('a~n',[]),once(( once(X) ; X )),format('b~n',[]).
> r(X) :- format('a~n',[]),once((format('g~n',[]);format('g~n',
> []))),format('b~n',[]).
> :-p(format('goal ~n',[])).
> :-q(format('goal ~n',[])).
> :-q2(format('goal ~n',[])).
> :-r(format('goal ~n',[])).
>
>
> q fails like being undefined.
> :- user:q(format(goal ~n,[])) failed.
> But no error msg about its definition
>
> all other predicates succeeds.
>
> Yap version is 5.1.3
>
> Ingo
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Yap-users mailing list
> Yap-users@...
> https://lists.sourceforge.net/lists/listinfo/yap-users
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users

Re: problem with once in yap

by Vitor Santos Costa-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Ingo


>> q(X) :- format('a~n',[]),once(( (X) ; X )),format('b~n',[]).

This was a bug: I had forgotten to put a var test. It is fixed on gitorious.

Sorry for the delay and thanks!

Vitor

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Yap-users mailing list
Yap-users@...
https://lists.sourceforge.net/lists/listinfo/yap-users