Reachability-based Persistence

When the persistence system is writing out a page, if it encounters a pointer to a transient object that is not a pivot, then something must be done -- after all, a persistent page cannot have a pointer to a transient object except as allowed by the pivot mechanism.

The default behavior depends on what kind of object it is. Most normal data-structuring objects will be implicitly copied into the store (ie, made persistent). These are objects like lists, vectors, strings, regular application objects, etc. Because of this, the basic persistence metaphor is one of reachability-based persistence; that is, the root object and any object reachable from it will be made persistent.

One consequence of copying objects into the store to make them persistent is that object identity of transient objects is lost across a commit. If you hold on to a pointer to a transient object which is reachable from the root of the store, then after the commit, that pointer will no longer refer to the object within the store. [Need a picture here!]

Symbols are turned into pivots, in order to preserve the usual meaning of symbols (so that when the image is later loaded, the symbols will maintain the correct object identity.)

A class object that is encountered, however, probably denotes an application error -- presumably either a failure to declare the class as a pivot, or the installation of an unexpected kind of object into the persistent data structure. (Note that class objects can't be automatically turned into pivots the way symbols can, because there isn't a well-known, fixed way of naming them.)