|
One thing that I must point out is that the compilation and machine execution environment is very fragile and finicky. I discovered that, sometimes, the environment is left in a strange state after encountering bugs, such that, after fixing the bug bad behaviors continue to occur, even though the bug has been fixed. I spent a lot of time tracking down a subtle bug, then finally exiting scheme and re-entering, only to find that the bug was no longer there.
More insidious and dangerous is the opposite behavior. A corrupt environment can lead to correct behavior, even when bugs still exist in the code. An example of this was when I discovered that set-car! was left out of the list of primitive functions. I modified eceval-support.scm to add it, reloaded machine-shell.scm, ran it, and it worked! Then, I exited scheme, entered it again, re-ran the same machine-shell, and got a new complaint that set-cdr! was missing!!! How did it work before, after fixing only set-car!? I have no idea.
I am suspecting that a lot of the testing I performed yesterday was against a corrupt environment, because I was able to run s450.scm successfully, even when some primitives were missing, and when let->appl was not working properly. I know that I tested the (define a 1) yesterday and saw it succeed, but this morning after reading professor XXXX, retested and saw that it was definitely broken. It is also possible that an error dropped me out of the s450 environment and on to regular scheme where, naturally, everything worked just fine... Who knows...
|