org.abora.gold.id
Class IDRegion

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.spaces.basic.XnRegion
                    |
                    +--org.abora.gold.id.IDRegion

public class IDRegion
extends XnRegion

If mySpace is NULL, then it is assumed to be global IDSpace.
The non-negative part of myLocalIDs contains the number portion of all IDs in the region
that were generated by the current backend. The negative part contains all IDs which were
generated by the "global" backend.
If myImportedIDs is NULL, it is considered to be empty. If it is non-NULL, it must be
non-empty. It contains the numbers of all IDs in this region which were generated by other
backends. If an entry in the table could be omitted without effect, then it should be
omitted. (i.e. if myIncludesRest and the region is full, or myIncludesRest not and the
region is empty, then the entry should be omitted).
If myIncludesRest is true, then the region includes, in addition to those IDs explictly
listed in myLocalIDs and myImportedIDs, all ID generated by all other backends.


Field Summary
protected  ImmuTable myImportedIDs
           
protected  boolean myIncludesRest
           
protected  IntegerRegion myLocalIDs
           
protected  IDSpace mySpace
           
protected static IntegerRegion TheGlobalNumbers
           
protected static IntegerRegion TheLocalNumbers
           
 
Fields inherited from class org.abora.gold.spaces.basic.XnRegion
CantMixCoordSpacesSignal, EmptyRegionSignal
 
Fields inherited from class org.abora.gold.xpp.basic.Heaper
AllBlasts, BecomeMap, GarbageCount, InGC, InitializedClasses, InitializingClasses, LastMemory, NextClientRequestNumber, NotOneElementSignal, PackageTable, PromiseNameTable, StringHashSBoxes
 
Fields inherited from class org.abora.gold.java.AboraHeaper
ActiveClubs, CurrentAuthor, CurrentBertCanopyCache, CurrentBertCrum, CurrentChunk, CurrentGrandMap, CurrentKeyMaster, CurrentPacker, CurrentSensorCanopyCache, CurrentServer, CurrentSession, CurrentSessions, CurrentTrace, InitialEditClub, InitialOwner, InitialReadClub, InitialSponsor, InsideTransactionFlag
 
Constructor Summary
IDRegion(IDSpace space, IntegerRegion localIDs, ImmuTable importedIDs, boolean includesRest)
           
IDRegion(Rcvr receiver)
           
 
Method Summary
 int actualHashForEqual()
           
 Stepper actualStepper(OrderSpec order)
          Only called if I've already said I'm enumerable in the originally stated order.
 XnRegion asSimpleRegion()
          Return a simple region containing all positions contained by myself.
If I am simple, then the result must be me.
 SequenceRegion backends()
          All backends which have generated IDs in this Region
 XnRegion complement()
          Essential.
 CoordinateSpace coordinateSpace()
          Essential.
 IntegerVar count()
          How many positions do I contain? If I am not 'isFinite', then this message will BLAST.
 ScruSet distinctions()
          Break it up into a set of non-full distinctions.
 XnRegion explicitBackends()
          All backends which are non-empty and are explicitly listed.
 UInt8Array export()
          Essential.
 ImmuTable fetchImportedIDs()
           
 IDRegion fetchInexplicit()
          The region which covers material not in the explicitBackends list, or NULL if there is
none.
 IDSpace fetchSpace()
           
 ImmuTable getImportedIDs()
           
 boolean hasMember(Position position)
          Do I contain this position? More than anything else, the behavior of this message is the
defining characteristic of an XuRegion.
 SequenceRegion identifiers()
          The identifiers of all the IDs in the region.
Note: This is only possible if the region is finite, and even then it takes up much more
space than the IDRegion.
 XnRegion iDNumbersFrom(Sequence backend)
          The numbers of all IDs in this region that were generated by the given backend
static IDRegion importx(PrimIntArray data)
          Essential.
 boolean includesRest()
           
static void info()
          {UInt8Array CLIENT} export
static void initTimeNonInherited()
           
 XnRegion intersect(XnRegion region)
          Essential.
 boolean isEmpty()
          Every coordinate space has exactly one empty region.
 boolean isEqual(Heaper other)
          Two regions are equal iff they contain exactly the same set of positions
 boolean isFinite()
          Essential.
 boolean isFull()
          true if this is the largest possible region in this space -- the region that contains all
positions in the space.
 boolean isSimple()
          Am I a simple region.
 boolean isSubsetOf(XnRegion region)
          I'm a subset of other if I don't have any positions that he doesn't.
static void linkTimeNonInherited()
           
 IntegerRegion localIDs()
           
static Heaper make()
           
static Heaper make(ID iD)
           
static Heaper make(IDSpace space, IntegerRegion localIDs, ImmuTable importedIDs, boolean includesRest)
           
static Heaper make(ScruSet iDs)
           
 void printOn(java.io.PrintWriter oo)
           
 void sendSelfTo(Xmtr xmtr)
          do nothing
 Stepper simpleRegions(OrderSpec order)
          Break myself up into a finite set of non-empty simple regions which, when
unionWith'ed together will yield me.
 XnRegion simpleUnion(XnRegion region)
          The result must contain all positions contained by either of the two
original regions, and the result must be simple.
 Position theOne()
          Iff I contain exactly one position, return it.
 XnRegion unionWith(XnRegion region)
          The result has as members exactly those positions which are members of either of the
original two regions.
static IDRegion usingx(IDSpace space, IntegerRegion localIDs, ImmuTable importedIDs, boolean includesRest)
          For IDSpace constructor only.
 XnRegion with(Position pos)
          the region with one more position.
 
Methods inherited from class org.abora.gold.spaces.basic.XnRegion
asArray, chooseMany, chooseMany, chooseOne, chooseOne, delta, disjointSimpleRegions, disjointSimpleRegions, dox, immuSet, intersects, isDistinction, isEnumerable, isEnumerable, mapping, minus, simpleRegions, stepper, stepper, without
 
Methods inherited from class org.abora.gold.xpp.basic.Heaper
abstractDeclarationFor, abstractTypeFor, addMethodAttributeToInOf, addPackage, addPackageCategory, allClientProtocolOn, argumentTypesFor, arrow, blast, blast, BLAST, cachePromiseNameTable, cachePromiseNameTableIn, canYouBecome, cast, cleanPromiseClasses, cleanupGarbage, clientClassesDo, clientFunctionsOn, clientMethodsOn, clientProtocol, clientProtocolDo, clientProtocolOn, clientProtocolOn, collectibleClasses, compare, compileClientSubclasses, compileConstantPromiseMethods, compileCreateFromRcvr, compileEQ, compileGeneratedClassMethod, compileGeneratedMethod, compileHook, compilePromise, compilePromiseDefaultMethods, compilePromiseFluidDeclarations, compilePromiseHandlers, compilePromiseMethods, compileRequestCreateMsgInArguments, compileRequestEvaluateMsgInReturningArguments, compileRPCSpecialistEvaluateMsgForReturningArguments, compileSendSelfTo, compileSendSelfToSendHook, compileStubbleMethods, compileSubclassStubbleMethods, computeMangle, computePreorder, constantTypeValue, convert, convertCopyDeclarations, convertDeferredDeclarations, convertProxyDeclarations, convertSubclassCopyDeclarations, convertSubclassDeferredDeclarations, convertSubclassProxyDeclarations, copyReferencesToType, create, create, create, create, create, create, create, create, create, create, createRequestClassArguments, definesProxyMethods, delete, deref, destroy, destruct, destructor, enum, enumFlags, equals, exportName, fetchAttribute, fetchPackage, fetchSuperCategory, fileOutClientProtocol, findCategory, findSenderAndReceiverMethods, findTailInto, flushPromiseNameTable, foo, freezeClientClasses, freezeClientProtocol, freezeStProtocol, frozenClasses, garbageCollect, garbageCollectFrom, gcOpportunity, gcOpportunity, generatedCategory, generatePromiseNames, getCategory, getOrMakePackage, getSuperCategory, handlerSignaturesFrom, hash, hashForEqual, hasProxyMethods, info_clientClasses, info_clientSideClasses, info_promiseClasses, info_stProtocol, inGC, initializedClasses, initializingClasses, initPackages, initStringHashSBoxes, inspectPieces, instanceSize, IntegerVar, isByProxy, isConstructed, isDestructed, isEqualOrSubclassOf, isGenerated, isIntType, isKindOf, isRawType, isUnlocked, make, makeClassTable, makeFillTable, makeRequestTable, mangle, markChildren, markCount, markInstances, mayBecome, mayBecomeAnySubclassOf, new1, newX, nonCopyVariables, notWorking, pack, packageClasses, packagingCategory, parseExportName, passe, pointerToStaticMember, pointerToStaticMember, pointerToVirtualMember, preorderMax, preorderNumber, PROBLEM, problems, promiseClass, promiseDefaultValue, promiseName, promiseNameTable, promiseToAbstract, registerPackageCategory, removeGeneratedCode, removeStubbleMethods, removeSubclassGeneratedCode, removeSubclassStubbleMethods, requestProcedure, requestProceduresFrom, returnTypeFor, rootName, scheduleTermination, sendProxyTo, serverNameFor, setGC, signal, signals, smalltalkSelector, stClientProtocol, stubbleSelectorTokenReturnsArguments, subclassNonCopyVariables, takeOop, togglePromiseName, togglePromiseOfParse, unimplemented, unmangle, verifyFreeze, wipeStubble
 
Methods inherited from class org.abora.gold.java.AboraHeaper
asOop, basicInspect, displayString, error, hack, halt, inspect, knownBug, mightNotImplement, REQUIRES, shouldImplement, shouldNotImplement, stubbleForSubclassResponsibility, thingToDo, willNotImplement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mySpace

protected IDSpace mySpace

myLocalIDs

protected IntegerRegion myLocalIDs

myImportedIDs

protected ImmuTable myImportedIDs

myIncludesRest

protected boolean myIncludesRest

TheGlobalNumbers

protected static IntegerRegion TheGlobalNumbers

TheLocalNumbers

protected static IntegerRegion TheLocalNumbers
Constructor Detail

IDRegion

public IDRegion(IDSpace space,
                IntegerRegion localIDs,
                ImmuTable importedIDs,
                boolean includesRest)

IDRegion

public IDRegion(Rcvr receiver)
Method Detail

asSimpleRegion

public XnRegion asSimpleRegion()
Description copied from class: XnRegion
Return a simple region containing all positions contained by myself.
If I am simple, then the result must be me. Otherwise,
the resulting region will contain more positions than I do, but it
must contain all those that I do. It would be good for the resulting
simple region to not contain many more points than it needs in order
to satisfy these constraints; but this is a preference, not a
specification. Particular spaces may specify stronger guarantees,
but as far as class XuRegion is concerned it is correct (though silly)
for this message to always return the full region for the space.

Overrides:
asSimpleRegion in class XnRegion

coordinateSpace

public CoordinateSpace coordinateSpace()
Description copied from class: XnRegion
Essential. The coordinate space in which this is a region

Overrides:
coordinateSpace in class XnRegion

export

public UInt8Array export()
Essential. Export the IDRegion in a form that can be used to recreate it with
IDRegion::import.


theOne

public Position theOne()
Description copied from class: XnRegion
Iff I contain exactly one position, return it. Otherwise BLAST. The idea for this message
is taken from the THE function of ONTIC (reference McAllester)

Overrides:
theOne in class XnRegion

actualHashForEqual

public int actualHashForEqual()
Overrides:
actualHashForEqual in class XnRegion

hasMember

public boolean hasMember(Position position)
Description copied from class: XnRegion
Do I contain this position? More than anything else, the behavior of this message is the
defining characteristic of an XuRegion. All other messages (except for the simplicity
characterization) should be specifiable in terms of the behavior of this message. What an
XuRegion *is* (mostly) is a finite decision procedure for accepting or rejecting any given
position.

Overrides:
hasMember in class XnRegion

isEmpty

public boolean isEmpty()
Description copied from class: XnRegion
Every coordinate space has exactly one empty region. It is the one containing no
positions. It and only it responds 'true' to this message.

Overrides:
isEmpty in class XnRegion

isEqual

public boolean isEqual(Heaper other)
Description copied from class: XnRegion
Two regions are equal iff they contain exactly the same set of positions

Overrides:
isEqual in class XnRegion

isFinite

public boolean isFinite()
Description copied from class: XnRegion
Essential. Do I contain a finite number of positions? If I do, then the 'count' message
will say how many, and I will gladly provide a stepper which will step over all of them.
I.e., isFinite implies isEnumerable.

Overrides:
isFinite in class XnRegion

isFull

public boolean isFull()
Description copied from class: XnRegion
true if this is the largest possible region in this space -- the region that contains all
positions in the space. Note that in a space which has no positions (which is perfectly
valid), the one XuRegion would be both empty (since it has no positions) and full (since
it has all the positions in the space).

Overrides:
isFull in class XnRegion

isSimple

public boolean isSimple()
Description copied from class: XnRegion
Am I a simple region. See XuRegion class comment for implications of being simple.

Overrides:
isSimple in class XnRegion

isSubsetOf

public boolean isSubsetOf(XnRegion region)
Description copied from class: XnRegion
I'm a subset of other if I don't have any positions that he doesn't. Note that if we are
equal, then I am still a subset of him. If you want to know if I'm a strict subset, you
can ask
a->isSubsetOf(b) && !! a->isEqual(b)

Overrides:
isSubsetOf in class XnRegion

actualStepper

public Stepper actualStepper(OrderSpec order)
Description copied from class: XnRegion
Only called if I've already said I'm enumerable in the originally stated order. Also, if
the originally stated order was NULL, I get a guaranteed non-null order. Subclasses which
override 'stepper' to a method which doesn't send 'actualStepper' may override
'actualStepper' to a stub method which always BLASTs.

Overrides:
actualStepper in class XnRegion

count

public IntegerVar count()
Description copied from class: XnRegion
How many positions do I contain? If I am not 'isFinite', then this message will BLAST.

Overrides:
count in class XnRegion

distinctions

public ScruSet distinctions()
Description copied from class: XnRegion
Break it up into a set of non-full distinctions. It is an error to send
this to a non-simple region. A full region will respond with the null
set. Other distinctions will respond with a singleton set containing
themselves, and simple regions will respond with a set of distinctions
which, when intersected together, yield the original region.

Overrides:
distinctions in class XnRegion

simpleRegions

public Stepper simpleRegions(OrderSpec order)
Description copied from class: XnRegion
Break myself up into a finite set of non-empty simple regions which, when
unionWith'ed together will yield me. May be sent to any region. If I
am isEmpty, I will respond with the empty stepper. Otherwise, if I am
simple I will respond with a stepper producing just myself.
Please only use NULL for the 'order' argument for now unless the
documentation for a particular region or coordinate space says that
it will deal with the 'order' argument meaningfully. When no order is
specified then I may return the simple regions in any order. When the
ordering functionality is implemented, then I am constrained to
produce the simple regions in an order consistent with the argument's
ordering of my positions. When the simple regions don't overlap, and
don't surround each other in the ordering, then the meaning is clear.
Otherwise, there are several plausible options for how we should
specify this message.

Overrides:
simpleRegions in class XnRegion

backends

public SequenceRegion backends()
All backends which have generated IDs in this Region


explicitBackends

public XnRegion explicitBackends()
All backends which are non-empty and are explicitly listed. For IDSimpleStepper


fetchImportedIDs

public ImmuTable fetchImportedIDs()

fetchInexplicit

public IDRegion fetchInexplicit()
The region which covers material not in the explicitBackends list, or NULL if there is
none.


fetchSpace

public IDSpace fetchSpace()

getImportedIDs

public ImmuTable getImportedIDs()

iDNumbersFrom

public XnRegion iDNumbersFrom(Sequence backend)
The numbers of all IDs in this region that were generated by the given backend


includesRest

public boolean includesRest()

localIDs

public IntegerRegion localIDs()

complement

public XnRegion complement()
Description copied from class: XnRegion
Essential. Return a region of containing exactly those positions not in this region. The
complement of a distinction must be a distinction.

Overrides:
complement in class XnRegion

intersect

public XnRegion intersect(XnRegion region)
Description copied from class: XnRegion
Essential. The intersection of two simple regions must be simple. The intersection of two
distinctions must therefore be a simple region. The result has exactly those members which
both the original regions have.

Overrides:
intersect in class XnRegion

simpleUnion

public XnRegion simpleUnion(XnRegion region)
Description copied from class: XnRegion
The result must contain all positions contained by either of the two
original regions, and the result must be simple. However, the result
may contain additional positions. See the comment on
'XuRegion::asSimpleRegion'. a->simpleUnion(b) satisfies the same specification
as (a->unionWith(b))->asSimpleRegion(). However, the two results do
not have to be the same region.

Overrides:
simpleUnion in class XnRegion

unionWith

public XnRegion unionWith(XnRegion region)
Description copied from class: XnRegion
The result has as members exactly those positions which are members of either of the
original two regions. No matter how simple the two original regions are, the result may be
non-simple.
The only reason this is called 'unionWith' instead of 'union' is that the latter is a C++
keyword.

Overrides:
unionWith in class XnRegion

with

public XnRegion with(Position pos)
Description copied from class: XnRegion
the region with one more position. Actually, if I already contain pos, then the result is
just me.

Overrides:
with in class XnRegion

printOn

public void printOn(java.io.PrintWriter oo)
Overrides:
printOn in class Heaper

identifiers

public SequenceRegion identifiers()
The identifiers of all the IDs in the region.
Note: This is only possible if the region is finite, and even then it takes up much more
space than the IDRegion. Use with caution. Tentative protocol.


sendSelfTo

public void sendSelfTo(Xmtr xmtr)
Description copied from class: Heaper
do nothing

Overrides:
sendSelfTo in class Heaper

usingx

public static IDRegion usingx(IDSpace space,
                              IntegerRegion localIDs,
                              ImmuTable importedIDs,
                              boolean includesRest)
For IDSpace constructor only. Space had better be NULL if it's the global space


linkTimeNonInherited

public static void linkTimeNonInherited()

make

public static Heaper make()

make

public static Heaper make(ID iD)

make

public static Heaper make(ScruSet iDs)

initTimeNonInherited

public static void initTimeNonInherited()

info

public static void info()
{UInt8Array CLIENT} export


importx

public static IDRegion importx(PrimIntArray data)
Essential. Take some information describing an IDRegion and create the IDRegion it was
exported from.


make

public static Heaper make(IDSpace space,
                          IntegerRegion localIDs,
                          ImmuTable importedIDs,
                          boolean includesRest)


Translation - Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.