May 2002
Stability in a Dynamic Reflective Environment
Overview
Stability is not a concern when dealing with stable systems, but when an application is under development, or is not trusted, then we must have a protocol to deal with the expected failure.
Stability becomes a concern when dealing with a dynamically compiled and reflective environment because there are cases where the unstable subroutine is part of environment itself. For example: What should happen when a prototype compiler is being built for an existing language AND the that same language is being used to build the compiler? What should happen when the subroutines responsible for persistence require persistence, yet there is a bug? What I see happening is both these situations is a complete and utter failure of the entire system. The errors in the dependency loop feed back on themselves and cause a crash.
Contingency
This fatal end does not happen in normal development because there is always a contingency environment to handle the expected failure. During Linux kernel development tests are run on a machine simulator. During beta testing, a crash of the OS just requires the user to use a new boot disk. This latter example shows that the contingency environment need not be an software environment, it can also be the real world.
The Common Lisp interpreter allows the user to fall back to another input loop in the event of a failure. It allows the user to suffer an arbitrary number of failures in his program without leaving the lisp environment.
We would like to do a similar thing. If we see each session as part of a transaction, then we can rollback the transaction in the event of failure. With the implication that the main input loop will just reset itself if it too fails.
Transactions
Any changes being done on the environment itself are contained within a transaction . If the programmer introduces a bug, then rollback is always an option.
This discussion leads us to a discussion on transactions, and will be covered in another document.
Mar 2005: changed a couple of words
May 2002: First writing