Page 1 of 1

Flow analysis problem

Posted: 10 Mar 2016 21:08
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).

Posted: 11 Mar 2016 15:15
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.

Posted: 11 Mar 2016 15:44
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

Posted: 12 Mar 2016 10:02
by Thomas Linder Puls
That is definitely a bug. We will look at it.

Posted: 24 Jul 2016 16:25
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

Posted: 5 Aug 2016 9:49
by Thomas Linder Puls
This is also a bug. We will look at it.