C
Clark S. Cox III
yeti said:Ah.. futility of reason. Well my mistake. I thought "flying of demons
from my nose" was rather an unproabable event and if it did happen then
the behaviour would not be deterministic for demons at least may have
mood swings.
Where do the lines above say about the bahaviour of the computer. It is
basic assumption for all programming languages (including assembly and
machine code) that computers should have perfectly predictable
bahaviour.
Yes, but the factors leading to that behavior may not be knowable.
Without this asumption you won't be sure what a computer would do after
you gave it an instruction to execute.
And the words ".. by providing a definition of the officially
undefined behavior .." in fact suggests that what is left undefined by
the standard need not be inherently unpredictable, for a particular
implementation can define it anyway.
Yes, an implementation can define it, but they are under no requirement
to do so; an implementation would be perfectly within its rights to
replace any instance of undefined behavior with:
int n = call_out_to_hardware_random_number_generator();
if(n < 0) exit(0);
LoL...behaviour will still be perfectly predictable (if not easy to
predict). If you take the same computer with same intial state and run
the same crap code which messes up the control information then you
WILL end up with the same sequence of instruction and output EVERYTIME.
What about quantum effects?