Modules, Segments & Versions - A Proposal (was: An uncomfortable question)

Anthony Hannan ajh18 at cornell.edu
Fri Nov 1 03:48:26 UTC 2002


Anthony Hannan <ajh18 at cornell.edu> wrote:
> Each segment has different versions.  However, each version must contain
> the same roots (interface) so they are backwards and forward compatible.
>  Out-pointers specify which other segments they point to, but not which
> version.  The user determines which version to load.

I overlooked the fact that different versions can have very different
behavior, even if they have the same interface, and client segments
will want to specify which version to use.  So change the above to the
following:

Each segment is a version that must be compatible with its previous
version (backward compatible), so it must have the same roots but may
have more.  Out-pointers of client segments specify the import segment
needed and its version number.

A configuration (aka image) is a set of compatible segment versions that
work together.  When loading segments you are loading into a specific
configuration.  When a higher version of an imported segment is
required, it is allowed to replace the lower version as long as its on
the same fork.  If lower version is required the higher one stays as
long as its on the same fork.  If they are on different forks of the
version tree then the load is aborted and the user is prompted to load
into a new empty configuration.

Every process runs under a specific configuration, when the VM runs a
process that requires a different configuration, its segments are swapped
in.

Upon save, segments that have changed for the first time are written out
as new versions.  Segments that already have new versions are just
rewritten.  Segment versions can be rewritten like this until they are
closed.  And only closed segments can be copied and shared.

Cheers,
Anthony



More information about the Squeak-dev mailing list