Discussions related to Visual Prolog
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Flow analysis problem

Unread post by Martin Meyer »

Hello Thomas,

please check the below construction. It compiles and output some number (in VIP 7502).

Many regards
Martin

Code: Select all

domains     t = t(unsigned).   class predicates     u : (t, t) procedure (t(o), t(o)). clauses     u(X, Y) :-         X = Y.   clauses     run() :-         u(t(A), t(A)),         stdIo::write(A).
Paul Cerkez
VIP Member
Posts: 106
Joined: 6 Mar 2000 0:01

Unread post by Paul Cerkez »

don't know for sure but it looks like it will just pull what ever is currently store in the memory location for the variable.

Sort of surprised though that you are not getting an 'unbound variable' error at compile time.
AI Rules!
P.
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Unread post by Martin Meyer »

Yes, Paul. The intended reaction is probably, that the compiler throws errors "Variable 'X' not completely bound" and "Variable 'Y' not completely bound".

Regards
Martin
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

That is definitely a bug. We will look at it.
Regards Thomas Linder Puls
PDC
Martin Meyer
VIP Member
Posts: 328
Joined: 14 Nov 2002 0:01

Unread post by Martin Meyer »

Another example, maybe it goes back to the same bug:

Code: Select all

class predicates     p : (unsigned*) procedure ([o]). clauses         p(_).   clauses     run() :-         p([X]),         stdIO::write(X).
Regards
Martin
User avatar
Thomas Linder Puls
VIP Member
Posts: 1398
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

This is also a bug. We will look at it.
Regards Thomas Linder Puls
PDC
Post Reply