Flow analysis problem

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

Flow analysis problem

Unread post by Martin Meyer » 10 Mar 2016 21:08

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: 202
Joined: 6 Mar 2000 0:01

Unread post by Paul Cerkez » 11 Mar 2016 15:15

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: 289
Joined: 14 Nov 2002 0:01

Unread post by Martin Meyer » 11 Mar 2016 15:44

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: 1622
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 12 Mar 2016 10:02

That is definitely a bug. We will look at it.
Regards Thomas Linder Puls
PDC

Martin Meyer
VIP Member
Posts: 289
Joined: 14 Nov 2002 0:01

Unread post by Martin Meyer » 24 Jul 2016 16:25

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: 1622
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls » 5 Aug 2016 9:49

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

Post Reply