yeti said:
What is meant by "correct" behaviour?? is it pre-defined ??
For the purposes of this discussion, it's what the Standard defines.
Whether or not that counts as "pre-defined" is going to depend where
you want to start.
I've forgotten the original point of this digression by now, and
coincidentally it's nearly time to leave for the day. So I'll
summarise as best I can:
The Standard defines some behaviours in some circumstances. An
implementation that doesn't exhibit those behaviours in those
circumstances is non-conforming. The defined behaviours are pretty
much deterministic. Some behaviours are left to the implementation
to define.
In some circumstances, the Standard leaves the behaviour of the
code undefined. An implementation can behave as it wishes in
those circumstances: the Standard places /no/ further requirements
on it. Whether that behaviour is deterministic or not is not
relevant, since either are legal.
Some behaviours that are "unpredictable" and appear non-deterministic
may, when examined in detail, be deterministic after all -- they
may depend on fine details of the machine state, such as the
behaviour of previous programs or the content of disc blocks
or the detailed timing of keystrokes. Since that knowledge is
typically not known (maybe not knowbale) to us when we provoke
the dependant behaviours, calling them "unpredictable" is
reasonable. A machine may have access to quantum noise to
produce behaviour as random as we believe possible.
Either way it doesn't matter: the implementation must
show the required behaviour, when there is some, to be
conformant, and when the behaviour is undefined, may
behave predictably, pseudo-unpredictably, or quantum-
unpredictably, as it finds convenient.
I see I have a certain Paarfian gift for summary.
Perhaps I can hope for his success as well.