2.7 Fragments and Compiled Code

A BETA pattern is declared in some fragment of the BETA fragment system. The fragment in turn is part of a fragment group, corresponding to a BETA source file. For a description of the fragment system, see [MIA 90-2]. To identify the pattern from which a persistent object was created, the object has a reference to the fragment in which the pattern is declared. The fragment is unique in the sense that it is the version used for generating the code that instantiated the object. In order to load an object into the memory of some program execution, the program loading the object must be compiled from and linked with the same version of the fragment from which the object was originally created. Note that this does not prevent exchange of objects between different platforms, since it is the fragments that must correspond, not the compiled code.

The current implementation does NOT check if the fragments used for creating a persistent object has been changed since the object was created. It is currently the responsibility of the user to keep track of this.

It should be obvious that changes to a fragment may cause inconsistencies with previously generated persistent objects. Neither is it allowed to change other fragments within the same fragment group.

The fragment used for generating a persistent object is currently identified using the name without path of the fragment group in which the pattern is declared. This means that a BETA program using persistence cannot contain two source files with the same name. If this restriction is violated, the program will stop with an error message as soon as the first persistent store is opened.

Multiple equally named BETA source files are not allowed when using persistence and distribution libraries.

The above problems related to the unique identification of patterns will be avoided in future versions of the persistent store.


Persistence in BETA - Reference Manual
© 1991-2002 Mjølner Informatics
[Modified: Monday October 23rd 2000 at 22:18]