Principled Dynamic Code Improvement
John R. Peterson, Paul Hudak, Gary Shu Ling · 1997
A method for dynamically updating running code is described. The method is principled in that old functionality is not destroyed. Rather, new functionality is added which can selectively and dynamically change the overall behavior of the system, yet all formal properties of the original system are guaranteed to still hold. Higher-order functions are the key to making this work, and an implementation in Hugs, a Haskell byte-code interpreter, is described.