[e-cvs] cvs commit: e/src/jsrc/org/erights/e/elib/tables Equalizer.java Selfless.java
markm@eros.cs.jhu.edu
markm@eros.cs.jhu.edu
Thu, 16 Aug 2001 23:11:33 -0400
markm 01/08/16 23:11:33
Modified: src Makefile
src/csrc/setup Makefile
src/esrc/scripts replaceall.e
src/jsrc/net/captp/jcomm Introducer.java ProxyMgr.java
ProxyOutputStream.java SturdyRef.java
src/jsrc/net/vattp/data ConnectionsMgr.java
DataConnection.java VatIdentity.java
src/jsrc/org/erights/e/elang/interp InteractiveInterp.java
src/jsrc/org/erights/e/elib/prim StaticMaker.java
src/jsrc/org/erights/e/elib/ref DisconnectedRef.java
FarRef.java LocalResolver.java ProxyResolver.java
Ref.java RemoteVow.java Resolver.java
SwitchableRef.java
src/jsrc/org/erights/e/elib/serial PassByConstruction.java
Serializer.java Unserializer.java
src/jsrc/org/erights/e/elib/tables Equalizer.java
Selfless.java
Added: src/jsrc/org/erights/e/elib/ref UnconnectedRef.java
Removed: src/jsrc/org/erights/e/elib/ref BrokenRef.java
Log:
cleaned up brokenRef handling. Made Equalizer.simplify() private to equality issues -- captp now uses non-simplified types, which, ironically, is the simpler thing to do.
Revision Changes Path
1.106 +3 -2 e/src/Makefile
Index: Makefile
===================================================================
RCS file: /cvs/e/src/Makefile,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- Makefile 2001/08/13 22:07:52 1.105
+++ Makefile 2001/08/17 03:11:32 1.106
@@ -7,8 +7,8 @@
# Prefix tagging this release's attributes
PREFIX=tl-E
-DOTVER=0.8.9za
-TAGVER=0_8_9za
+DOTVER=0.8.9zc
+TAGVER=0_8_9zc
RELEASE=working
TOP=..
@@ -29,6 +29,7 @@
echo $(DOTVER) > $(TOP)/dist/eVersion.txt
cp -r $(TOP)/src/bin $(TOP)/dist/bin
cp -r $(TOP)/src/esrc/scripts $(TOP)/dist/scripts
+ cp -r $(TOP)/src/elisp/* $(TOP)/dist/scripts
-rm -rf `find $(TOP)/dist -name CVS`
mkdir $(TOP)/dist/bin/$(PLATDIR)
(cd csrc/byaccj; $(MAKE) all install)
1.5 +1 -1 e/src/csrc/setup/Makefile
Index: Makefile
===================================================================
RCS file: /cvs/e/src/csrc/setup/Makefile,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- Makefile 2001/02/09 01:15:07 1.4
+++ Makefile 2001/08/17 03:11:32 1.5
@@ -12,4 +12,4 @@
install:
cp e-template.txt eprops-template.txt README.txt $(TOP)/dist/
-
+ cp updoc-hash-cache.txt $(TOP)/dist/
1.2 +4 -7 e/src/esrc/scripts/replaceall.e
Index: replaceall.e
===================================================================
RCS file: /cvs/e/src/esrc/scripts/replaceall.e,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- replaceall.e 2001/03/31 06:47:33 1.1
+++ replaceall.e 2001/08/17 03:11:32 1.2
@@ -1,21 +1,18 @@
#!/usr/bin/env e
-def subst := <import:org.erights.e.tools.text.subst>
-
-
-def replaceall(filedir, ext, oldstr, newstr) {
+def replaceAll(filedir, ext, oldstr, newstr) {
if (filedir isDirectory()) {
for sub in filedir {
- replaceall(sub, ext, oldstr, newstr)
+ replaceAll(sub, ext, oldstr, newstr)
}
} else if (filedir getName() endsWith(ext)) {
- filedir setText(subst(filedir getText(), oldstr, newstr))
+ filedir setText(filedir getText() replaceAll(oldstr, newstr))
}
}
if (interp getArgs() =~ [rootName, ext, oldstr, newstr]) {
- replaceall(<file: rootName>, ext, oldstr, newstr)
+ replaceAll(<file: rootName>, ext, oldstr, newstr)
} else {
throw("usage: replaceall.e rootname extension oldstr newstr")
}
1.11 +117 -46 e/src/jsrc/net/captp/jcomm/Introducer.java
Index: Introducer.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/Introducer.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- Introducer.java 2001/07/22 05:29:55 1.10
+++ Introducer.java 2001/08/17 03:11:32 1.11
@@ -21,6 +21,7 @@
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.UnknownHostException;
+import java.security.KeyPair;
import net.captp.tables.SwissTable;
import net.vattp.data.EARL;
import net.vattp.data.NetConfig;
@@ -38,17 +39,33 @@
* This object is in the E-language programmer's top level namespace as the
* representative of the CapTP system.
*
+ * An Introducer may already have an identity assigned, in which case it's
+ * identified, or not, in which case it's unidentified. Introducers start
+ * off unidentified, but once identified, always identified.
+ *
+ * An Introducer may be on-the-air or off-the-air. If an unidentified
+ * Introducer goes on-the-air, it will first (privately) generate an identity
+ * to identify itself. Since only an identified Introducer may be
+ * on-the-air, we have three states altogether. For now, an on-the-air
+ * Introducer doesn't yet have a way to go back off-the-air, but we expect to
+ * add such an operation.
+ *
* @author Mark S. Miller, markm@caplet.com
*/
public class Introducer implements PassByProxy, Persistent {
+ /** Changes by going on-the-air */
NetConfig myNetConfig;
- VatIdentity myOptVatIdentity = null;
- SwissTable myOptSwissTable = null;
- LocatorUnum myOptLocatorUnum = null;
ESecureRandom myEntropy;
Timer myPersistentTimer;
+ /** if identified */
+ KeyPair myOptVatIdentity = null;
+ /** if identified */
+ SwissTable myOptSwissTable = null;
+ /** if on-the-air */
+ LocatorUnum myOptLocatorUnum = null;
+
/**
*
*/
@@ -62,7 +79,7 @@
}
/**
- *
+ * Returns a pair of a new Introducer and its corresponding Sturdifier.
*/
static public Object[] newPair(ConstMap optProps,
ESecureRandom entropy,
@@ -75,14 +92,6 @@
}
/**
- * Same as sturdyFromURI, but named get/1 so the introducer can be used
- * as a URIGetter.
- */
- public SturdyRef get(String uriBody) throws MalformedURLException {
- return sturdyFromURI(uriBody);
- }
-
- /**
* Configuration parameter read as a JavaBeans property.
*/
public NetConfig getNetConfig() { return myNetConfig; }
@@ -93,17 +102,102 @@
*/
public void setNetConfig(NetConfig newNetConfig) {
if (isOnTheAir()) {
- throw new RuntimeException
+ throw new SecurityException
("Must be off the air to change NetConfig parameters");
}
myNetConfig = newNetConfig;
}
+
+ /**
+ * Is this Introducer's identity (and therefore, this vat's identity)
+ * already determined?
+ */
+ public boolean hasIdentity() {
+ return null != myOptVatIdentity;
+ }
+
+ /**
+ * If no identity has yet been determined, generate a new one, and return
+ * its public/private key pair.
+ * <p>
+ * This pair conveys the authority to claim to be this vat, so guard it
+ * well.
+ *
+ * @exception SecurityException if an identity has already been
+ * determined.
+ */
+ public KeyPair newVatIdentity() {
+ if (hasIdentity()) {
+ throw new SecurityException("Already identified");
+ }
+ myOptVatIdentity = VatIdentity.generateKeyPair(myEntropy);
+ myOptSwissTable = new SwissTable(myEntropy);
+ return myOptVatIdentity;
+ }
/**
+ * If no identity has yet been determined, become identified as the
+ * identity represented by this key pair.
+ * <p>
+ * To implement identity-persistence, the birth incarnation of a vat
+ * should do a newVatIdentity and remember the resulting key pair.
+ * Reincarnations of the "same" vat should then do a setVatIdentity with
+ * the saved identity, in order to be the reincarnation of the previous
+ * vat.
+ *
+ * @exception SecurityException if an identity has already been
+ * determined.
+ */
+ public void setVatIdentity(KeyPair identity) {
+ if (hasIdentity()) {
+ throw new SecurityException("Already identified");
+ }
+ myOptVatIdentity = identity;
+ //XXX since we're not using it to generate a key pair, is there
+ //anything else we need to do so myEntropy will be ready?
+ myOptSwissTable = new SwissTable(myEntropy);
+ }
+
+ /**
+ * For use by the Sturdifier
+ */
+ /*package*/ SwissTable getSwissTable() {
+ if (! hasIdentity()) {
+ throw new SecurityException("not yet identified");
+ }
+ return myOptSwissTable;
+ }
+
+ /**
+ * The fingerprint of the public key of this Introducers identity (and
+ * therefore, this vat's identity). <p>
+ *
+ * An identity must have already been determined.
+ */
+ public String getVatID() {
+ if (! hasIdentity()) {
+ throw new SecurityException("not yet identified");
+ }
+ return VatIdentity.calculateVatID(myOptVatIdentity.getPublic());
+ }
+
+ /**
+ * Is this vat able to send and receive inter-vat messages?
+ */
+ public boolean isOnTheAir() {
+ return null != myOptLocatorUnum;
+ }
+
+ /**
* Become able to communicate. <p>
*
* Change NetConfig according to the listen addresses we actually
- * acquired. Return the list of negotiable protocols.
+ * acquired. Return the list of negotiable protocols. <p>
+ *
+ * If not yet identified, this will privately generate a new vat
+ * identity, but not reveal it through any public protocol. Therefore,
+ * applications that wish to do their own identity-persistence must first
+ * call either newVatIdentity() or setVatIdentity(..).
*/
public ConstList onTheAir()
throws UnknownHostException, IOException {
@@ -111,15 +205,10 @@
return negotiable();
}
- if (null == myOptVatIdentity) {
- myOptVatIdentity = new VatIdentity(myEntropy);
+ if (! hasIdentity()) {
+ newVatIdentity();
}
- String vatID = myOptVatIdentity.getVatID();
- if (null == myOptSwissTable) {
- myOptSwissTable = new SwissTable(myEntropy);
- }
-
/* Turn on the comm system... */
ProxyMgr proxyMgr = new ProxyMgr(myOptVatIdentity,
myNetConfig,
@@ -134,29 +223,18 @@
*
*/
/*package*/ LocatorUnum getLocatorUnum() {
- if (isOnTheAir()) {
- return myOptLocatorUnum;
- } else {
- throw new RuntimeException("not yet onTheAir");
+ if (! isOnTheAir()) {
+ throw new SecurityException("not yet onTheAir");
}
+ return myOptLocatorUnum;
}
- /**
- * For use by the Sturdifier
- */
- /*package*/ SwissTable getSwissTable() {
- if (isOnTheAir()) {
- return myOptSwissTable;
- } else {
- throw new RuntimeException("not yet onTheAir");
- }
- }
-
/**
- *
+ * Same as sturdyFromURI, but named get/1 so the introducer can be used
+ * as a URIGetter.
*/
- /*package*/ String getVatID() {
- return myOptVatIdentity.getVatID();
+ public SturdyRef get(String uriBody) throws MalformedURLException {
+ return sturdyFromURI(uriBody);
}
/**
@@ -184,13 +262,6 @@
*/
public String sturdyToURI(SturdyRef ref) {
return ref.exportRef();
- }
-
- /**
- *
- */
- public boolean isOnTheAir() {
- return null != myOptLocatorUnum;
}
/**
1.11 +4 -16 e/src/jsrc/net/captp/jcomm/ProxyMgr.java
Index: ProxyMgr.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/ProxyMgr.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- ProxyMgr.java 2001/08/04 06:56:52 1.10
+++ ProxyMgr.java 2001/08/17 03:11:32 1.11
@@ -21,12 +21,12 @@
import java.io.IOException;
import java.net.UnknownHostException;
+import java.security.KeyPair;
import net.captp.tables.SwissTable;
import net.vattp.data.ConnectionsMgr;
import net.vattp.data.DataConnection;
import net.vattp.data.NetConfig;
import net.vattp.data.NewConnectionReactor;
-import net.vattp.data.VatIdentity;
import net.vattp.data.VatLocationLookup;
import net.vattp.security.ESecureRandom;
import org.erights.e.develop.exception.ExceptionMgr;
@@ -53,9 +53,6 @@
/** map from DataConnections to ProxyConnections */
private FlexMap myProxyConnections = null;
- /** The vat that created me */
- private VatIdentity myVat = null;
-
/** The connections manager to talk to */
private ConnectionsMgr myConnMgr = null;
@@ -76,15 +73,14 @@
* @param swissTable Associates swissNumbers with references.
* @param entropy Provides new unguessable numbers.
*/
- public ProxyMgr(VatIdentity vat,
+ public ProxyMgr(KeyPair identityKeys,
NetConfig netConfig,
SwissTable swissTable,
ESecureRandom entropy)
throws UnknownHostException, IOException {
- myVat = vat;
- myConnMgr = new ConnectionsMgr(vat, netConfig);
-
+ myConnMgr = new ConnectionsMgr(identityKeys, netConfig);
+
myConnMgr.addNewConnectionReactor(this);
mySwissTable = swissTable;
@@ -98,7 +94,6 @@
if (Trace.captp.debug && Trace.ON) {
Trace.captp.debugm("Create ProxyMgr " + this +
- " vat=" + vat +
" connMgr=" + myConnMgr);
}
}
@@ -238,12 +233,5 @@
*/
public void setVatLocationLookup(VatLocationLookup vls) {
myConnMgr.setVatLocationLookup(vls);
- }
-
- /**
- * Return our vat ID
- */
- public String vatID() {
- return myVat.getVatID();
}
}
1.12 +1 -1 e/src/jsrc/net/captp/jcomm/ProxyOutputStream.java
Index: ProxyOutputStream.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/ProxyOutputStream.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ProxyOutputStream.java 2001/08/04 06:56:52 1.11
+++ ProxyOutputStream.java 2001/08/17 03:11:32 1.12
@@ -70,7 +70,7 @@
* sure we're actually permitted to pass it by construction.
*/
protected Object replaceObject(Object ref) throws IOException {
- ref = Equalizer.simplify(ref);
+ ref = Ref.resolution(ref);
//the following sequence of tests are cribbed from Ref.isPBC, except
//that we don't guard it with an isNear test, so as to include broken
1.9 +8 -1 e/src/jsrc/net/captp/jcomm/SturdyRef.java
Index: SturdyRef.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/SturdyRef.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SturdyRef.java 2001/07/26 15:28:07 1.8
+++ SturdyRef.java 2001/08/17 03:11:32 1.9
@@ -128,11 +128,18 @@
* Return a (live) reference to the object which this SturdyRef designates.
* The result may be either a direct or eventual reference.
*/
- public Object promiseRef() throws IOException {
+ public Object liveRef() throws IOException {
return myLocatorUnum.promiseResolve(mySearchPath,
myHostID,
mySwissNum,
null);
+ }
+
+ /**
+ * @deprecated Use liveRef() instead.
+ */
+ public Object promiseRef() throws IOException {
+ return liveRef();
}
/**
1.6 +6 -8 e/src/jsrc/net/vattp/data/ConnectionsMgr.java
Index: ConnectionsMgr.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/ConnectionsMgr.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ConnectionsMgr.java 2001/05/03 06:07:50 1.5
+++ ConnectionsMgr.java 2001/08/17 03:11:32 1.6
@@ -47,10 +47,8 @@
* which lets the higher layers connect themselves to connections
* which have completed the startup protocol.
*
- * <p>An instance of the ConnectionMgr is available from the VatIdentity
- * object
- * @see VatIdentity
* @author Bill Frantz
+ * @author Mark S. Miller
*/
public class ConnectionsMgr {
@@ -134,9 +132,9 @@
* @param netConfig holds the configuration parameters for configuring
* how we interact with the network.
*/
- public ConnectionsMgr(VatIdentity vat, NetConfig netConfig)
+ public ConnectionsMgr(KeyPair identityKeys, NetConfig netConfig)
throws UnknownHostException, IOException {
- this(vat, netConfig, Runner.currentRunner());
+ this(identityKeys, netConfig, Runner.currentRunner());
}
/*
@@ -154,13 +152,13 @@
* how we interact with the network.
* @param runner is the Runner to use to synchronize the connections.
*/
- /*package*/ ConnectionsMgr(VatIdentity vat,
+ /*package*/ ConnectionsMgr(KeyPair identityKeys,
NetConfig netConfig,
Runner runner)
throws UnknownHostException, IOException {
- myIdentityKeys = vat.getIdentityKeys();
+ myIdentityKeys = identityKeys;
myVLS = null;
- myLocalVatID = vat.getVatID();
+ myLocalVatID = VatIdentity.calculateVatID(identityKeys.getPublic());
if (Trace.comm.debug && Trace.ON) {
Trace.comm.debugm("netConfig is " + E.toString(netConfig));
1.3 +1 -3 e/src/jsrc/net/vattp/data/DataConnection.java
Index: DataConnection.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/DataConnection.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DataConnection.java 2001/02/20 05:33:43 1.2
+++ DataConnection.java 2001/08/17 03:11:32 1.3
@@ -432,9 +432,7 @@
}
/**
- * Get the vatID of the local end. That is, the vatID of the
- * VatIdentity object which created the ConnectionsMgr which created
- * this DataConnection.
+ * Get the vatID of the local end.
*
* @return the vatID of the local identity as a string.
*/
1.4 +8 -66 e/src/jsrc/net/vattp/data/VatIdentity.java
Index: VatIdentity.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/VatIdentity.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- VatIdentity.java 2001/04/08 21:15:12 1.3
+++ VatIdentity.java 2001/08/17 03:11:32 1.4
@@ -22,7 +22,6 @@
import java.io.IOException;
import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
import java.math.BigInteger;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
@@ -36,41 +35,26 @@
/**
- * This class represents the identity of the vat. It is a separate
- * class from the ConnectionsMgr to ease the upgrade problem. It is
- * expected that this class will be very stable, while the
- * ConnectionsMgr will probably change much more frequently. Since
- * this class re-instantitates a new ConnectionsMgr every time the
- * application is re-started, the internals of the ConnectionMgr can
- * change. Meanwhile, the important thing to save, the identity of
- * the vat, will be serialized by this class. <p>
+ * Useful functions for manipulating the public key pair representing a vat's
+ * identity.
*
- * Thanks to Arturo Bejar for suggesting this separation.
- *
* @author Bill Frantz
+ * @author Mark S. Miller
*/
-public class VatIdentity implements Persistent {
+public class VatIdentity {
/** VatID to use for connecting to unknown vats at a specific IP
* address */
static /*package*/ String WHOEVER = "0";
-
- /**
- * Should be persistent.
- */
- private transient KeyPair myIdentityKeys;
- /**
- * @serial XXX Should make myVatID transient and make
- * myIdentityKeys persistent.
- */
- private String myVatID;
+ /** prevent instantiation */
+ private VatIdentity() {}
/**
* Make a new VatIdentity object. Constructing this object will
* create a new keypair which will define a new identity.
*/
- public VatIdentity(ESecureRandom entropy) {
+ static public KeyPair generateKeyPair(ESecureRandom entropy) {
KeyPairGenerator gen = null;
try {
@@ -82,18 +66,10 @@
}
gen.initialize(1024, entropy);
- myIdentityKeys = gen.generateKeyPair();
- myVatID = calculateVatID(myIdentityKeys.getPublic());
+ return gen.generateKeyPair();
}
/**
- *
- */
- /*package*/ KeyPair getIdentityKeys() {
- return myIdentityKeys;
- }
-
- /**
* Calculate the vatID from a public key.
*
* The vatID is the SHA1 hash of the public key expressed as a base 64
@@ -117,39 +93,5 @@
+ " from PublicKey " + key);
}
return vid;
- }
-
- /**
- * Return the vatID of this identity
- *
- * @return the vatID calculated from the public key of this identity.
- */
- public String getVatID() {
- return myVatID;
- }
-
- /**
- * Writes out all of the default fields of the object. Part of the
- * Serializable contract which we inherit from the Persistent interface.
- * XXX kill this.
- */
- private void writeObject(ObjectOutputStream out) throws IOException {
- out.defaultWriteObject();
- out.writeObject(myIdentityKeys.getPublic());
- out.writeObject(myIdentityKeys.getPrivate());
- }
-
- /**
- * Reads in the sturdy info and reconstructs the transient info. Part of
- * the Serializable contract which we inherit from the Persistent
- * interface.
- * XXX Should only restore myVatID from my public key.
- */
- private void readObject(ObjectInputStream in)
- throws IOException, ClassNotFoundException {
- in.defaultReadObject();
- PublicKey pubkey = (PublicKey)in.readObject();
- PrivateKey privkey = (PrivateKey)in.readObject();
- myIdentityKeys = new KeyPair(pubkey, privkey);
}
}
1.3 +0 -2 e/src/jsrc/org/erights/e/elang/interp/InteractiveInterp.java
Index: InteractiveInterp.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/interp/InteractiveInterp.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- InteractiveInterp.java 2001/08/13 01:47:03 1.2
+++ InteractiveInterp.java 2001/08/17 03:11:33 1.3
@@ -60,8 +60,6 @@
*/
public class InteractiveInterp implements Interpreter, InterpLoop {
- static boolean uiInititialized = false;
-
static EExpr[] SubstArgs = null;
static private void initSubst() {
1.11 +0 -2 e/src/jsrc/org/erights/e/elib/prim/StaticMaker.java
Index: StaticMaker.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/prim/StaticMaker.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- StaticMaker.java 2001/07/14 12:57:23 1.10
+++ StaticMaker.java 2001/08/17 03:11:33 1.11
@@ -79,8 +79,6 @@
"org.erights.e.elib.quasi.FirstCharSplitter",
"org.erights.e.elib.quasi.Identifiers",
"org.erights.e.elib.quasi.Substituter",
- "org.erights.e.elib.ref.DisconnectedRef",
- "org.erights.e.elib.ref.FarRef",
"org.erights.e.elib.ref.Ref",
"org.erights.e.elib.prim.E",
"org.erights.e.elib.prim.Thrower",
1.3 +21 -7 e/src/jsrc/org/erights/e/elib/ref/DisconnectedRef.java
Index: DisconnectedRef.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/ref/DisconnectedRef.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- DisconnectedRef.java 2001/07/31 13:09:14 1.2
+++ DisconnectedRef.java 2001/08/17 03:11:33 1.3
@@ -25,11 +25,17 @@
import org.erights.e.elib.serial.Persistent;
/**
- * What a FarRef becomes when it breaks -- a BROKEN Ref with identity. <p>
- *
+ * What a FarRef becomes when it breaks -- a BROKEN Ref with identity.
+ * <p>
* Maintains the same()ness identity and sameness hash of the FarRef. A
- * DisconnectedRef is an HONORARY Selfless object (it encapsulates its identity,
- * so it isn't transparent), is PassByConstruction, and is Persistent.
+ * DisconnectedRef is listed as an HONORARY Selfless object for
+ * implementation reasons only: (HONORARY because it encapsulates its
+ * identity, so it isn't transparent).
+ * <p>
+ * A DisconnectedRef's contents must be transitively transparently Selfless
+ * and passable by construction. DisconnectedRef is listed as implementing
+ * PassByConstruction for implementation reasons only. Not being NEAR, by
+ * definition it is not a PassByContruction object.
*
* @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
*/
@@ -49,6 +55,8 @@
*
* If the problem is not a Throwable, it is stingified and made into a
* Throwable using "E.toThrowable()".
+ *
+ * identity must itself be an honorary Selfless object.
*/
/*package*/ DisconnectedRef(Object problem, Object identity) {
myProblem = E.toThrowable(problem);
@@ -57,7 +65,10 @@
/**
* As an HONORARY Selfless object, my .equals() and .hashCode()
- * determine sameness. NOTE: Uses myIdentity's .equals().
+ * determine sameness.
+ * <p>
+ * NOTE: Uses myIdentity's .equals(), which is safe, as myIdentity must
+ * be an honorary Selfless object.
*/
public boolean equals(Object other) {
if (other instanceof FarRef) {
@@ -71,7 +82,10 @@
/**
* As an HONORARY Selfless object, my .equals() and .hashCode()
- * determine sameness. NOTE: Uses myIdentity's .hashCode().
+ * determine sameness.
+ *
+ * NOTE: Uses myIdentity's .hashCode(), which is safe, as myIdentity must
+ * be an honorary Selfless object.
*/
public int hashCode() {
return myIdentity.hashCode();
@@ -134,7 +148,7 @@
*/
public Ref sendAll(String verb, Object[] args) {
doBreakage(verb, args);
- return new BrokenRef(myProblem);
+ return new UnconnectedRef(myProblem);
}
/**
1.13 +4 -2 e/src/jsrc/org/erights/e/elib/ref/FarRef.java
Index: FarRef.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/ref/FarRef.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- FarRef.java 2001/05/11 02:30:59 1.12
+++ FarRef.java 2001/08/17 03:11:33 1.13
@@ -52,7 +52,8 @@
* As an HONORARY Selfless object, my .equals() and .hashCode()
* determine sameness. <p>
*
- * NOTE: Uses myIdentity's .equals().
+ * NOTE: Uses myIdentity's .equals(), which is safe, as myIdentity must
+ * be an honorary Selfless object.
*/
public boolean equals(Object other) {
if (other instanceof FarRef) {
@@ -68,7 +69,8 @@
* As an HONORARY Selfless object, my .equals() and .hashCode()
* determine sameness. <p>
*
- * NOTE: Uses myIdentity's .hashCode().
+ * NOTE: Uses myIdentity's .hashCode(), which is safe, as myIdentity must
+ * be an honorary Selfless object.
*/
public int hashCode() {
return myIdentity.hashCode();
1.5 +2 -2 e/src/jsrc/org/erights/e/elib/ref/LocalResolver.java
Index: LocalResolver.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/ref/LocalResolver.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- LocalResolver.java 2001/01/18 04:18:33 1.4
+++ LocalResolver.java 2001/08/17 03:11:33 1.5
@@ -76,14 +76,14 @@
/**
* Breaks the promise, reporting 'problem' as the reason. If not yet
* done, "r smash(p)" is equivalent to
- * "r resolve(BrokenRef new(p))". If isDone(), returns
+ * "r resolve(Ref broken(p))". If isDone(), returns
* false rather than throwing an exception. Will be isDone() afterwards.
*/
public boolean smash(Object problem) {
if (null == myOptRef) {
return false;
} else {
- resolve(new BrokenRef(problem));
+ resolve(new UnconnectedRef(problem));
return true;
}
}
1.5 +23 -7 e/src/jsrc/org/erights/e/elib/ref/ProxyResolver.java
Index: ProxyResolver.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/ref/ProxyResolver.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- ProxyResolver.java 2001/07/08 02:13:05 1.4
+++ ProxyResolver.java 2001/08/17 03:11:33 1.5
@@ -22,6 +22,7 @@
import java.io.IOException;
import org.erights.e.elib.base.TextWriter;
import org.erights.e.elib.prim.WeakPtr;
+import org.erights.e.elib.tables.Selfless;
/**
* A maker on demand of a Proxy as well as the resolver of this Proxy. <p>
@@ -57,16 +58,30 @@
static /*package*/ final Object[] NO_ARGS = {};
/**
- *
+ * optIdentity defaults to null.
*/
public ProxyResolver(ProxyHandler handler) {
this(handler, null);
}
/**
- *
+ * @param handler Delegates delegatable eventual-ref behavior to the
+ * handler.
+ * @param optIdentity If null, the handled reference will be unresolved
+ * (a RemoteVow). If non-null, the optIdentity must be an honorary {@link
+ * Selfless} object. This includes {@link java.math.BigInteger} and
+ * {@link net.captp.jcomm.ObjectID}. The identity object serves as the
+ * basis for the sameness identity of the resulting handled resolved
+ * reference (FarRef).
*/
public ProxyResolver(ProxyHandler handler, Object optIdentity) {
+ optIdentity = Ref.resolution(optIdentity);
+ if (null != optIdentity &&
+ ! Selfless.HONORARY.has(optIdentity.getClass()))
+ {
+ throw new RuntimeException
+ ("" + optIdentity + " must be an honorary Selfless object");
+ }
myOptHandler = handler;
myOptIdentity = optIdentity;
myOptRefPtr = null;
@@ -169,16 +184,17 @@
}
/**
- * Breaks the Ref, reporting 'problem' as the reason. If not yet
- * done, "r smash(p)" is equivalent to
- * "r resolve(BrokenRef new(p))". If isDone(), returns
- * false rather than throwing an exception. Will be isDone() afterwards.
+ * Breaks the Ref, reporting 'problem' as the reason.
+ * <p>
+ * If not yet done, "r smash(p)" is equivalent to
+ * "r resolve(Ref broken(p))". If isDone(), returns false rather than
+ * throwing an exception. Will be isDone() afterwards.
*/
public boolean smash(Object problem) {
if (isDone()) {
return false;
} else {
- resolve(new BrokenRef(problem));
+ resolve(new UnconnectedRef(problem));
return true;
}
}
1.20 +12 -22 e/src/jsrc/org/erights/e/elib/ref/Ref.java
Index: Ref.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/ref/Ref.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- Ref.java 2001/08/06 17:21:20 1.19
+++ Ref.java 2001/08/17 03:11:33 1.20
@@ -70,8 +70,8 @@
* The canonical reference BROKEN by TheViciousMarker. Used to
* detect vicious forwarding cycles.
*/
- static /*package*/ final BrokenRef TheViciousRef
- = new BrokenRef(ViciousCycleException.TheViciousMarker);
+ static /*package*/ final UnconnectedRef TheViciousRef
+ = new UnconnectedRef(ViciousCycleException.TheViciousMarker);
static /*package*/ final Object[] NO_ARGS = {};
@@ -148,19 +148,11 @@
/**
* Return a Ref broken allegedly because of problem.
*/
- static public BrokenRef broken(Object problem) {
- return new BrokenRef(problem);
+ static public Ref broken(Object problem) {
+ return new UnconnectedRef(problem);
}
/**
- * Return a ref broken allegedly because of problem, but retaining its
- * identity.
- */
- static public DisconnectedRef broken(Object problem, Object identity) {
- return new DisconnectedRef(problem, identity);
- }
-
- /**
* Does this reference designate an object in this vat?
*
* @see #state(Object)
@@ -348,17 +340,15 @@
/**
* A Selfless object only has value-based sameness. <p>
*
- * Selfless objects are necessarily transparent (they reveal all their
- * internal state in their client interface -- they encapsulate
- * nothing), immutable, and compare for sameness based only on their type
- * and state. As a result, an E implementation can transparently copy or
- * merge copies of Selfless objects at will, with no effect visible from
- * the E language. (XXX talk about rational tree comparison.) <p>
+ * Selfless objects are immutable, and compare for sameness based only on
+ * their type and state. As a result, an E implementation can
+ * transparently copy or merge copies of Selfless objects at will, with
+ * no effect visible from the E language. (XXX talk about rational tree
+ * comparison.) <p>
*
* isSelfless of a non-NEAR reference is false. This is a bit weird for
- * FarRef, DisconnectedRef, and BrokenRef, as they are listed (for
- * implementation reasons) as Selfless objects (either actual or
- * HONORARY).
+ * FarRef, and DisconnectedRef, as they are listed (for implementation
+ * reasons) as Selfless objects (either actual or HONORARY).
*
* @see org.erights.e.elib.tables.Selfless
*/
@@ -457,7 +447,7 @@
* which should be transparent to the E language programmer. <p>
*
* isPBC on a non-NEAR reference is false, which is a bit wierd for
- * BrokenRef and DisconnectedRef, as (for implementation reasons) they
+ * UnconnectedRef and DisconnectedRef, as (for implementation reasons) they
* are listed as PassByConstruction.
*/
static public boolean isPBC(Object ref) {
1.3 +1 -1 e/src/jsrc/org/erights/e/elib/ref/RemoteVow.java
Index: RemoteVow.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/ref/RemoteVow.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- RemoteVow.java 2001/05/11 02:30:59 1.2
+++ RemoteVow.java 2001/08/17 03:11:33 1.3
@@ -65,7 +65,7 @@
newTarget = newTarget.resolutionRef();
if (newTarget == TheViciousRef) {
myOptTarget =
- new BrokenRef(new ViciousCycleException("Ref loop"));
+ new UnconnectedRef(new ViciousCycleException("Ref loop"));
} else {
myOptTarget = newTarget;
}
1.4 +1 -1 e/src/jsrc/org/erights/e/elib/ref/Resolver.java
Index: Resolver.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/ref/Resolver.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Resolver.java 2000/11/14 11:15:34 1.3
+++ Resolver.java 2001/08/17 03:11:33 1.4
@@ -41,7 +41,7 @@
/**
* Breaks the promise, reporting 'problem' as the reason. If not yet
* done, "r smash(p)" is equivalent to
- * "r resolve(BrokenRef new(p))". If isDone(), returns
+ * "r resolve(Ref broken(p))". If isDone(), returns
* false rather than throwing an exception. A Resolver will be
* isDone() following a smash().
*/
1.4 +4 -3 e/src/jsrc/org/erights/e/elib/ref/SwitchableRef.java
Index: SwitchableRef.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/ref/SwitchableRef.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SwitchableRef.java 2001/07/18 20:54:34 1.3
+++ SwitchableRef.java 2001/08/17 03:11:33 1.4
@@ -143,13 +143,13 @@
*/
/*package*/ void setTarget(Ref newTarget) {
if (myIsSwitchable) {
- //since, while I'm switchable, my resolutionRef() is myself, the
+ //since, while I'm switchable, my resolutionRef() is myself, the
//only problematic cycle case is that his resolutionRef() turns
//out to be me.
myTarget = newTarget.resolutionRef();
if (this == myTarget) {
Throwable th = new ViciousCycleException("Ref loop");
- myTarget = new BrokenRef(th);
+ myTarget = new UnconnectedRef(th);
}
} else {
throw new RuntimeException("No longer switchable");
@@ -168,7 +168,8 @@
myIsSwitchable = false;
newTarget = newTarget.resolutionRef();
if (newTarget == TheViciousRef) {
- myTarget = new BrokenRef(new ViciousCycleException("Ref loop"));
+ myTarget =
+ new UnconnectedRef(new ViciousCycleException("Ref loop"));
} else {
myTarget = newTarget;
}
1.1 e/src/jsrc/org/erights/e/elib/ref/UnconnectedRef.java
Index: UnconnectedRef.java
===================================================================
package org.erights.e.elib.ref;
/*
The contents of this file are subject to the Electric Communities E Open
Source Code License Version 1.0 (the "License"); you may not use this file
except in compliance with the License. You may obtain a copy of the License
at http://www.communities.com/EL/.
Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
the specific language governing rights and limitations under the License.
The Original Code is the Distributed E Language Implementation, released
July 20, 1998.
The Initial Developer of the Original Code is Electric Communities.
Copyright (C) 1998 Electric Communities. All Rights Reserved.
Contributor(s): ______________________________________.
*/
import org.erights.e.develop.exception.ExceptionMgr;
import org.erights.e.elib.tables.Selfless;
import org.erights.e.elib.prim.E;
import org.erights.e.elib.prim.Message;
import org.erights.e.elib.serial.PassByConstruction;
import org.erights.e.elib.serial.Persistent;
/**
* If an unresolved reference becomes Broken without first being Resolved, it
* becomes an <a
* href="http://www.erights.org/elib/equality/same-ref.html"
* >UnconnectedRef</a> (an Unsettled Broken reference).
* <p>
* A UnconnectedRef will never designate an object, but provides a Throwable
* explaining why not (the problem). An UnconnectedRef is not
* sameness-comparable to anything else, including itself. A UnconnectedRef
* is forever Broken by the same problem and without any sameness identity.
* <p>
* A UnconnectedRef's contents must be transitively transparently Selfless
* and passable by construction. UnconnectedRef is listed as implementing
* PassByConstruction for implementation reasons only. Not being NEAR, by
* definition it is not a PassByContruction object.
*
* @author <a href="mailto:markm@erights.org">Mark S. Miller</a>
*/
/*package*/ class UnconnectedRef
extends Ref implements PassByConstruction, Persistent {
/** @serial The Throwable that caused or explains why I'm broken */
private final Throwable myProblem;
/**
* Makes a Ref that will never designate an object because of problem.
* If the problem is not a Throwable, it is stingified and made into a
* Throwable using "E.toThrowable()".
*/
/*package*/ UnconnectedRef(Object problem) {
myProblem = E.toThrowable(problem);
}
/**
* @return our problem
*/
public Throwable optProblem() {
return myProblem;
}
/**
* @return 'this'
*/
/*package*/ Ref resolutionRef() {
return this;
}
/**
* @return BROKEN
*/
public String state() {
return BROKEN;
}
/**
* Should be called only if the state is already BROKEN.
* Takes care of whenMoreResolved(reactor) and whenBroken(reactor). If you
* know verb/args aren't one of these, you don't need to call doBreakage()
*/
private void doBreakage(String verb, Object[] args) {
if (args.length == 1
&& (verb.equals("whenMoreResolved") || verb.equals("whenBroken")))
{
E.sendOnly(args[0], "run", this);
}
}
/**
* To be called once the state becomes BROKEN. Expands into
* doBreakage/2, and uses this as the outcome of the message.
*/
private void doBreakage(Message msg) {
doBreakage(msg.verb(), msg.args());
msg.resolver().resolve(this);
}
/**
* This default implementation switches on state() and either
* synchronously forward the message, if we're NEAR, or complains.
*/
public Object callAll(String verb, Object[] args) {
doBreakage(verb, args);
throw ExceptionMgr.asSafe(myProblem);
}
/**
*
*/
public Ref sendAll(String verb, Object[] args) {
doBreakage(verb, args);
//clever Danfuzz
return this;
}
/**
*
*/
public void sendAllOnly(String verb, Object[] args) {
doBreakage(verb, args);
}
/**
*
*/
public boolean isResolved() {
return true;
}
/**
*
*/
/*package*/ void setTarget(Ref newTarget) {
throw new RuntimeException("Not switchable");
}
/**
*
*/
/*package*/ void commit() {
//already committed, do nothing.
}
}
1.8 +21 -9 e/src/jsrc/org/erights/e/elib/serial/PassByConstruction.java
Index: PassByConstruction.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/serial/PassByConstruction.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- PassByConstruction.java 2001/05/03 06:07:50 1.7
+++ PassByConstruction.java 2001/08/17 03:11:33 1.8
@@ -29,23 +29,35 @@
public interface PassByConstruction extends Serializable {
/**
- * List of Java library classes that can be passed by contruction. This is
- * because, since they are JavaSoft's, we obviously can't go back and
- * modify them to implement the PassByConstruction interface, but we equally
- * obviously want people to be able to use them as if we had. <p>
- *
- * This is just the list of post-simplify types.
+ * List of Java library classes that can be passed by contruction.
+ * <p>
+ * This is because, since they are JavaSoft's, we obviously can't go back
+ * and modify them to implement the PassByConstruction interface, but we
+ * equally obviously want people to be able to use them as if we had.
*/
static final String HONORED_NAMES[] = {
+ //also Transparent & Selfless, and so PassByCopy
"java.lang.Boolean",
"java.lang.Character",
- "java.lang.Double",
"java.lang.String",
+
+ //also Transparent & Selfless, and so PassByCopy
+ "java.lang.Float",
+ "java.lang.Double",
+ "java.lang.Byte",
+ "java.lang.Short",
+ "java.lang.Integer",
+ "java.lang.Long",
"java.math.BigInteger",
+
+ //also Selfless, but not Transparent or PassByCopy
"net.captp.api.SturdyRef",
- "org.erights.e.elib.ref.DisconnectedRef",
- "org.erights.e.elib.ref.FarRef",
+ //We would like Throwable to be transitively PassByCopy, but it
+ //doesn't provide its own equals() and hashCode(), so it can't be
+ //made even honorarily Selfless, it's not really transparent because
+ //of the stack trace, and we currently have no way to enforce the
+ //transitive adherence to any rules by Throwable subclasses.
"java.lang.Throwable",
};
1.4 +1 -2 e/src/jsrc/org/erights/e/elib/serial/Serializer.java
Index: Serializer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/serial/Serializer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Serializer.java 2000/11/14 11:15:34 1.3
+++ Serializer.java 2001/08/17 03:11:33 1.4
@@ -68,8 +68,7 @@
*/
static public byte[] record(Object specimen,
OneArgFunc replacer)
- throws IOException
- {
+ throws IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
Serializer ser = new Serializer(out, replacer);
ser.writeObject(specimen);
1.4 +1 -2 e/src/jsrc/org/erights/e/elib/serial/Unserializer.java
Index: Unserializer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/serial/Unserializer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Unserializer.java 2000/11/14 11:15:34 1.3
+++ Unserializer.java 2001/08/17 03:11:33 1.4
@@ -65,8 +65,7 @@
*/
static public Object play(byte[] recording,
OneArgFunc resolver)
- throws IOException, ClassNotFoundException
- {
+ throws IOException, ClassNotFoundException {
ByteArrayInputStream inp = new ByteArrayInputStream(recording);
Unserializer uns = new Unserializer(inp, resolver);
Object result = uns.readObject();
1.23 +9 -6 e/src/jsrc/org/erights/e/elib/tables/Equalizer.java
Index: Equalizer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/tables/Equalizer.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Equalizer.java 2001/08/13 22:07:52 1.22
+++ Equalizer.java 2001/08/17 03:11:33 1.23
@@ -30,7 +30,7 @@
/**
* A random guess at a good value
*/
- static private final int HASH_DEPTH = 5;
+ static private final int HASH_DEPTH = 20;
/**
* All instances of the left hand (key) types simplify (for purposes of
@@ -134,13 +134,16 @@
/**
*
*/
- static public Object simplify(Object ref) {
- ref = Ref.resolution(ref);
- Class simpClass = OptSimplification(ref.getClass());
- if (null == simpClass) {
+ static private Object simplify(Object ref) {
+ ref = Ref.resolution(ref); //probably not necessary
+ if (null == ref) { //probably not necessary
+ return null;
+ }
+ Class optSimpClass = OptSimplification(ref.getClass());
+ if (null == optSimpClass) {
return ref;
} else {
- return E.as(ref, simpClass);
+ return E.as(ref, optSimpClass);
}
}
1.9 +35 -9 e/src/jsrc/org/erights/e/elib/tables/Selfless.java
Index: Selfless.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/tables/Selfless.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- Selfless.java 2001/05/03 06:07:50 1.8
+++ Selfless.java 2001/08/17 03:11:33 1.9
@@ -77,24 +77,50 @@
Object[] getCanonicalState();
/**
- * List of Java library classes that are compared using .equals(). This
- * is because, since they are JavaSoft's, we obviously can't go back and
- * modify them to implement the Selfless interface, but we also
- * obviously want people to be able to use them as if we had.
- *
- * This is just the list of post-simplify types.
+ * List of Java library classes that are compared using equals() and
+ * hashCode().
+ * <p>
+ * This is because, since they are JavaSoft's, we obviously can't go back
+ * and modify them to implement the Selfless interface, but we also
+ * obviously want people to be able to use them as if we had.
*/
static final String HONORED_NAMES[] = {
+ //also Transparent & PassByConstruction, and so PassByCopy
"java.lang.Boolean",
"java.lang.Character",
- "java.lang.Double",
"java.lang.String",
+
+ //also Transparent & PassByConstruction, and so PassByCopy
+ "java.lang.Float",
+ "java.lang.Double",
+ "java.lang.Byte",
+ "java.lang.Short",
+ "java.lang.Integer",
+ "java.lang.Long",
"java.math.BigInteger",
+
+ //also Transparent & PassByConstruction, and so PassByCopy
+ //made HONORARY for speed, and so it can be used as a FarRef identity.
+ "net.captp.jcomm.ObjectID",
+
+ //also PassByConstruction, but not Transparent or PassByCopy
"net.captp.jcomm.SturdyRef",
- "org.erights.e.elib.ref.DisconnectedRef",
- "org.erights.e.elib.ref.FarRef",
+
+ //Not really Selfless, but does its own sameness
"org.erights.e.elib.tables.Equalizer",
+
+ //Not really Selfless, but does its own sameness
"org.erights.e.elib.tables.WeakKey",
+
+
+ //Not Near, and therefore not actually Selfless, but does its own
+ //sameness comparison.
+ //also PassByConstruction, but not Transparent or PassByCopy
+ "org.erights.e.elib.ref.DisconnectedRef",
+
+ //Not Near, and therefore not actually Selfless, but does its own
+ //sameness comparison.
+ "org.erights.e.elib.ref.FarRef",
};
/**