[e-cvs] cvs commit: e/src/jsrc/org/quasiliteral/text EYaccFixer.java

markm@eros.cs.jhu.edu markm@eros.cs.jhu.edu
Tue, 18 Dec 2001 00:24:44 -0500


markm       01/12/18 00:24:44

  Modified:    src      Makefile
               src/jsrc Makefile
               src/jsrc/net/captp/jcomm CapTPConnection.java
                        ImportDesc.java IncomingDesc.java NewFarDesc.java
                        NewRemotePromiseDesc.java NonceLocator.java
               src/jsrc/net/captp/tables SwissTable.java
               src/jsrc/net/vattp/data DataPath.java Decrypt3DES.java
                        Encrypt3DES.java RecvThread.java SendThread.java
                        Suspend.java VatTPConnection.java VatTPMgr.java
               src/jsrc/org/capml/dom Node.java
               src/jsrc/org/erights/e/develop/trace TraceBuffer.java
                        TraceController.java TraceLevelTranslator.java
                        TraceLog.java TraceLogDescriptor.java
                        TraceSubsystemMediator.java TraceVersionNamer.java
               src/jsrc/org/erights/e/elang/syntax ELexer.java EParser.java
                        Makefile URIKit.java e.y
               src/jsrc/org/erights/e/elib/base ClassDesc.java
                        MessageDesc.java ParamDesc.java
               src/jsrc/org/erights/e/elib/prim E.java StaticMaker.java
               src/jsrc/org/erights/e/extern/file ConsoleMaker.java
               src/jsrc/org/erights/e/meta/java/lang ArrayGuardSugar.java
                        ByteGuardSugar.java ClassGuardSugar.java
                        DoubleGuardSugar.java FloatGuardSugar.java
                        IntegerGuardSugar.java InterfaceGuardSugar.java
                        LongGuardSugar.java ShortGuardSugar.java
                        StringGuardSugar.java ThrowableGuardSugar.java
                        VoidGuardSugar.java
               src/jsrc/org/erights/e/meta/java/math
                        BigIntegerGuardSugar.java
               src/jsrc/org/erights/e/meta/org/erights/e/elib/base
                        TypeDescGuardSugar.java
               src/jsrc/org/erights/e/meta/org/erights/e/elib/ref
                        RefGuardSugar.java
               src/jsrc/org/erights/e/meta/org/erights/e/elib/slot
                        SlotGuardGuardSugar.java ValueGuardGuardSugar.java
               src/jsrc/org/erights/e/meta/org/erights/e/elib/tables
                        EListGuardSugar.java
               src/jsrc/org/erights/e/ui/jed EditGroup.java
               src/jsrc/org/quasiliteral/astro AstroTag.java
                        BaseBuilder.java BaseSchema.java
               src/jsrc/org/quasiliteral/quasiterm QuasiBuilderAdaptor.java
               src/jsrc/org/quasiliteral/syntax BaseLexer.java
                        Indenter.java
               src/jsrc/org/quasiliteral/term Term.java TermBuilder.java
  Added:       src/jsrc/org/erights/e/develop/assertion AssertionError.java
                        T.java
               src/jsrc/org/quasiliteral/antlr ASTBuilder.java
                        AstroAST.java AstroLexerSharedInputState.java
                        AstroToken.java
               src/jsrc/org/quasiliteral/text EYaccFixer.java
  Removed:     src/jsrc/org/erights/e/develop/assertion Assertion.java
                        AssertionFailed.java
               src/jsrc/org/erights/e/elib/prim/tests A.java
               src/jsrc/org/quasiliteral/astro ASTBuilder.java
                        AstroAST.java AstroLexerSharedInputState.java
                        AstroToken.java
               src/jsrc/org/quasiliteral/syntax EYaccFixer.java
  Log:
  Rearranged layering to prepare for taming.  Simplified asserts in anticipation of Java 1.4

Revision  Changes    Path
1.130     +2 -2      e/src/Makefile

Index: Makefile
===================================================================
RCS file: /cvs/e/src/Makefile,v
retrieving revision 1.129
retrieving revision 1.130
diff -u -r1.129 -r1.130
--- Makefile	2001/12/17 16:49:47	1.129
+++ Makefile	2001/12/18 05:24:40	1.130
@@ -7,8 +7,8 @@
 
 # Prefix tagging this release's attributes
 PREFIX=E
-DOTVER=0.8.10delta4
-TAGVER=0_8_10delta4
+DOTVER=0.8.10delta5
+TAGVER=0_8_10delta5
 RELEASE=working
 
 TOP=..



1.66      +24 -27    e/src/jsrc/Makefile

Index: Makefile
===================================================================
RCS file: /cvs/e/src/jsrc/Makefile,v
retrieving revision 1.65
retrieving revision 1.66
diff -u -r1.65 -r1.66
--- Makefile	2001/12/17 17:44:01	1.65
+++ Makefile	2001/12/18 05:24:41	1.66
@@ -31,45 +31,40 @@
 	find $(ER)/develop              -name '*.java' > files.tmp
 	$(JCOMPILE) @files.tmp
 
-# space-time-local elib
+# optional: remake the term parser from yacc, or just use the generated
+# one, which is included.
+term_parser:
+	(cd $(TOP)/src/jsrc/org/quasiliteral/term; $(MAKE) all)
+
+# space-time-local elib & quasiliterals up to 'term'
 # depends on develop
 stl_elib:
 	find $(ER)/elib                 -name '*.java' > files.tmp
+	find org/quasiliteral/astro     -name '*.java' >> files.tmp
+	find org/quasiliteral/syntax    -name '*.java' >> files.tmp
+	find org/quasiliteral/quasiterm -name '*.java' >> files.tmp
+	find org/quasiliteral/term      -name '*.java' >> files.tmp
 	find $(ER)/meta/java            -name '*.java' >> files.tmp
 	# find $(ER)/meta/javax         -name '*.java' >> files.tmp
 	find $(ER)/meta/$(ER)/elib      -name '*.java' >> files.tmp
 	$(JCOMPILE) @files.tmp
 
-# Third party parsing and regex tools
-# depends on stl_elib
-third_party:
-	find antlr                      -name '*.java' > files.tmp
-	find org/apache/oro             -name '*.java' >> files.tmp
-	$(JCOMPILE) @files.tmp
-
 # depends on stl_elib
 quasi_1:
 	find org/quasiliteral/base      -name '*.java' > files.tmp
 	find org/quasiliteral/text      -name '*.java' >> files.tmp
 	$(JCOMPILE) @files.tmp
 
-# depends on third_party, quasi_1
-quasi_2:
-	find org/quasiliteral/astro     -name '*.java' > files.tmp
-	find org/quasiliteral/syntax    -name '*.java' >> files.tmp
-	find org/capml                  -name '*.java' >> files.tmp
+# Third party parsing and regex tools
+third_party:
+	find antlr                      -name '*.java' > files.tmp
+	find org/apache/oro             -name '*.java' >> files.tmp
 	$(JCOMPILE) @files.tmp
 
-# optional: remake the term parser from yacc, or just use the generated
-# one, which is included.
-term_parser:
-	(cd $(TOP)/src/jsrc/org/quasiliteral/term; $(MAKE) all)
-
-# space-time-local elang
-# depends on stl_elib, elang_builder
-quasi_3:
-	find org/quasiliteral/quasiterm -name '*.java' > files.tmp
-	find org/quasiliteral/term      -name '*.java' >> files.tmp
+# depends on third_party, quasi_1
+quasi_2:
+	find org/capml                  -name '*.java' > files.tmp
+	find org/quasiliteral/antlr     -name '*.java' >> files.tmp
 	$(JCOMPILE) @files.tmp
 
 # optional: remake the E parser from yacc, or just use the generated
@@ -113,14 +108,16 @@
 	find net/ertp                   -name '*.java' > files.tmp
 	$(JCOMPILE) @files.tmp
 
+
+pre_parsers: setup _develop 
 
-pre_parser: setup _develop stl_elib third_party quasi_1 quasi_2
+twixt_parsers: stl_elib quasi_1 third_party quasi_2
 
-post_parser: stl_elang _elmer _extern _vattp _captp _ertp
+post_parsers: stl_elang _elmer _extern _vattp _captp _ertp
 
-all: pre_parser term_parser quasi_3 elang_parser post_parser
+all: pre_parsers term_parser twixt_parsers elang_parser post_parsers
 
-all_noparse: pre_parser quasi_3 post_parser
+all_noparse: pre_parsers twixt_parsers post_parsers
 
 
 



1.3       +5 -5      e/src/jsrc/net/captp/jcomm/CapTPConnection.java

Index: CapTPConnection.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/CapTPConnection.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- CapTPConnection.java	2001/12/02 06:01:38	1.2
+++ CapTPConnection.java	2001/12/18 05:24:41	1.3
@@ -30,7 +30,7 @@
 import net.vattp.data.MsgHandler;
 import net.vattp.data.VatTPConnection;
 import net.vattp.security.ESecureRandom;
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.exception.ExceptionMgr;
 import org.erights.e.develop.exception.ThrowableSugar;
 import org.erights.e.develop.trace.Trace;
@@ -615,7 +615,7 @@
      */
     public void processMessage(byte[] message, VatTPConnection dataConn) {
         try {
-            Assertion.test(dataConn == myDataConnection,
+            T.require(dataConn == myDataConnection,
                            "message's VatTPConnection doesn't match");
 
             if (myOptProblem != null) {
@@ -635,7 +635,7 @@
 
             /* The message type (the first byte) should *always* be E_MSG */
             if ((byte)bis.read() != Msg.E_MSG) {
-                Assertion.fail
+                T.fail
                   ("CapTPConnection was handed a non-E_MSG message");
             }
 
@@ -717,7 +717,7 @@
                 }
             default:
                 {
-                    Assertion.fail("Invalid command byte " + cmd);
+                    T.fail("Invalid command byte " + cmd);
                 }
         }
     }
@@ -1055,7 +1055,7 @@
      * @see net.vattp.data.MsgHandler
      */
     public void connectionDead(VatTPConnection dataConn, Throwable problem) {
-        Assertion.test(dataConn == myDataConnection,
+        T.require(dataConn == myDataConnection,
                        "dead VatTPConnection doesn't match");
         killConnection(ThrowableSugar.backtrace(problem, "lost " + dataConn),
                        myShuttingDownFlag);



1.9       +2 -2      e/src/jsrc/net/captp/jcomm/ImportDesc.java

Index: ImportDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/ImportDesc.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ImportDesc.java	2001/12/02 06:01:38	1.8
+++ ImportDesc.java	2001/12/18 05:24:41	1.9
@@ -19,8 +19,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.trace.Trace;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 
 /**
@@ -44,7 +44,7 @@
      *
      */
     private void validate() {
-        E.requireSI(myImportPos >= 1,
+        T.requireSI(myImportPos >= 1,
                     "must be positive: ", myImportPos);
     }
 



1.9       +2 -2      e/src/jsrc/net/captp/jcomm/IncomingDesc.java

Index: IncomingDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/IncomingDesc.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- IncomingDesc.java	2001/12/02 06:01:38	1.8
+++ IncomingDesc.java	2001/12/18 05:24:41	1.9
@@ -19,8 +19,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.trace.Trace;
-import org.erights.e.elib.prim.E;
 
 /**
  * The encoding of an remote ref over the wire to the ref's
@@ -45,7 +45,7 @@
      *
      */
     private void validate() {
-        E.requireSI(myIncomingPos != 0,
+        T.requireSI(myIncomingPos != 0,
                     "can't directly reify nonce locator: ", myIncomingPos);
     }
 



1.10      +3 -3      e/src/jsrc/net/captp/jcomm/NewFarDesc.java

Index: NewFarDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/NewFarDesc.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- NewFarDesc.java	2001/12/02 06:01:38	1.9
+++ NewFarDesc.java	2001/12/18 05:24:41	1.10
@@ -19,8 +19,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.trace.Trace;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 
 import java.math.BigInteger;
@@ -50,9 +50,9 @@
      *
      */
     private void validate() {
-        E.requireSI(myImportPos >= 1,
+        T.requireSI(myImportPos >= 1,
                     "importPos must be positive: ", myImportPos);
-        E.require(null != mySwissHash && mySwissHash.signum() >= 1,
+        T.require(null != mySwissHash && mySwissHash.signum() >= 1,
                   "swissHash must be positive: ", mySwissHash);
     }
 



1.7       +4 -4      e/src/jsrc/net/captp/jcomm/NewRemotePromiseDesc.java

Index: NewRemotePromiseDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/NewRemotePromiseDesc.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- NewRemotePromiseDesc.java	2001/12/02 06:01:38	1.6
+++ NewRemotePromiseDesc.java	2001/12/18 05:24:41	1.7
@@ -19,8 +19,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.trace.Trace;
-import org.erights.e.elib.prim.E;
 
 import java.math.BigInteger;
 
@@ -51,11 +51,11 @@
      *
      */
     private void validate() {
-        E.requireSI(myImportPos >= 1,
+        T.requireSI(myImportPos >= 1,
                     "importPos must be positive: ", myImportPos);
-        E.requireSI(myRdrPos <= -1,
+        T.requireSI(myRdrPos <= -1,
                     "rdrPos must be negative: ", myRdrPos);
-        E.require(null != myRdrBase && myRdrBase.signum() >= 1,
+        T.require(null != myRdrBase && myRdrBase.signum() >= 1,
                   "rdrBase must be positive: ", myRdrBase);
     }
 



1.12      +3 -2      e/src/jsrc/net/captp/jcomm/NonceLocator.java

Index: NonceLocator.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/jcomm/NonceLocator.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- NonceLocator.java	2001/12/02 06:01:38	1.11
+++ NonceLocator.java	2001/12/18 05:24:41	1.12
@@ -25,6 +25,7 @@
 import net.captp.tables.PromiseGiftTable;
 import net.captp.tables.SwissTable;
 import net.captp.tables.Vine;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
@@ -100,13 +101,13 @@
                            String recipID,
                            BigInteger nonce,
                            BigInteger swissHash) {
-        E.require(Ref.isNear(gift),
+        T.require(Ref.isNear(gift),
                   "Must be Near: ", gift);
         //If gift isn't Selfish, this will throw an exception,
         //which is as it should be.
         BigInteger giftSwiss = mySwissTable.getIdentity(gift);
         BigInteger giftHash = BigIntegerSugar.cryptoHash(giftSwiss);
-        E.require(giftHash.equals(swissHash),
+        T.require(giftHash.equals(swissHash),
                   "wrong hash: ", swissHash);
         return myNGifts.provideFor(gift, recipID, nonce, swissHash);
     }



1.12      +1 -2      e/src/jsrc/net/captp/tables/SwissTable.java

Index: SwissTable.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/captp/tables/SwissTable.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- SwissTable.java	2001/12/17 16:49:47	1.11
+++ SwissTable.java	2001/12/18 05:24:41	1.12
@@ -24,10 +24,9 @@
 import net.vattp.security.ESecureRandom;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.serial.Persistent;
-import org.erights.e.elib.tables.FlexMap;
+import org.erights.e.elib.tables.FlexSet;
 import org.erights.e.elib.tables.WeakKeyMap;
 import org.erights.e.elib.tables.WeakValueMap;
-import org.erights.e.elib.tables.FlexSet;
 import org.erights.e.elib.util.OneArgFunc;
 import org.erights.e.meta.java.math.BigIntegerSugar;
 



1.11      +6 -5      e/src/jsrc/net/vattp/data/DataPath.java

Index: DataPath.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/DataPath.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- DataPath.java	2001/12/02 06:01:39	1.10
+++ DataPath.java	2001/12/18 05:24:41	1.11
@@ -21,7 +21,7 @@
 // Copyright 1998, Electric Communities, all rights reserved worldwide.
 
 import net.vattp.security.ESecureRandom;
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.prim.Runner;
 import org.erights.e.elib.prim.SynchQueue;
@@ -475,7 +475,7 @@
      */
     /*package*/
     void connectToSelf() {
-        Assertion.test(null == myDataConnection,
+        T.require(null == myDataConnection,
                        "Remote end should not be identitifed");
         shutDownPath();
         myConnMgr.connectToSelf(this);
@@ -798,9 +798,10 @@
             Trace.comm.debugm("registerMsgHandler=" + msgType + "("
                               + handler + ") on " + this);
         }
-        Assertion.test(msgType > 0 || msgType <= Msg.HIGH_MSG_TYPE,
-                       "msgType=" + msgType + " out of range (1 .. " + Msg.HIGH_MSG_TYPE
-                       + ")");
+        T.require(msgType > 0 || msgType <= Msg.HIGH_MSG_TYPE,
+                       "msgType=" + msgType,
+                       " out of range (1 .. " + Msg.HIGH_MSG_TYPE,
+                       ")");
         if (null != myMsgHandlers[msgType]) {
             throw new IOException(myMsgHandlers[msgType]
                                   + " already registered for msgType=" + msgType);



1.8       +2 -2      e/src/jsrc/net/vattp/data/Decrypt3DES.java

Index: Decrypt3DES.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/Decrypt3DES.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Decrypt3DES.java	2001/12/02 06:01:39	1.7
+++ Decrypt3DES.java	2001/12/18 05:24:41	1.8
@@ -22,7 +22,7 @@
 //import cryptix.provider.cipher.DES;
 
 import net.vattp.security.MicroTime;
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.exception.NestedException;
 import org.erights.e.develop.trace.Trace;
 
@@ -90,7 +90,7 @@
     void transform(byte[] buffer, int off, int len) {
 
         long startTime = Trace.comm.timing ? MicroTime.queryTimer() : 0;
-        Assertion.test(0 == (len & 0x7),
+        T.require(0 == (len & 0x7),
                        "Buffer length not a multiple of 8, len = "
                        + len);
 



1.8       +5 -5      e/src/jsrc/net/vattp/data/Encrypt3DES.java

Index: Encrypt3DES.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/Encrypt3DES.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- Encrypt3DES.java	2001/12/02 06:01:39	1.7
+++ Encrypt3DES.java	2001/12/18 05:24:41	1.8
@@ -21,7 +21,7 @@
 //import cryptix.provider.cipher.DES;
 
 import net.vattp.security.MicroTime;
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.exception.NestedException;
 import org.erights.e.develop.trace.Trace;
 
@@ -86,9 +86,8 @@
     /*package*/
     void transform(byte[] buffer, int off, int len) {
         long startTime = Trace.comm.timing ? MicroTime.queryTimer() : 0;
-        if (0 != (len & 7)) {
-            Assertion.test(false, "Length must be a multiple of 8, len=" + len);
-        }
+        T.require(0 == (len & 7),
+                  "Length must be a multiple of 8, len=" + len);
         if (!myIsStandardCBC) {
             System.arraycopy(myIV, 0, myPreviousBlock, 0, 8);
             increment(myIV);
@@ -106,7 +105,8 @@
         }
         if (Trace.comm.timing && Trace.ON) {
             Trace.comm.timingm("Pkt3DESEncrypt(" + buffer.length + "), time "
-                               + (MicroTime.queryTimer() - startTime) + " microseconds");
+                               + (MicroTime.queryTimer() - startTime) +
+                               " microseconds");
         }
     }
 



1.10      +4 -4      e/src/jsrc/net/vattp/data/RecvThread.java

Index: RecvThread.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/RecvThread.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- RecvThread.java	2001/12/02 06:01:39	1.9
+++ RecvThread.java	2001/12/18 05:24:41	1.10
@@ -25,7 +25,7 @@
 // Copyright 1998 Electric Communities. All rights reserved worldwide.
 
 import net.vattp.security.MicroTime;
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.prim.Runner;
 import org.erights.e.elib.util.HexStringUtils;
@@ -177,7 +177,7 @@
         if (Trace.comm.verbose && Trace.ON) {
             Trace.comm.verbosem("ProtocolChange, pp=" + protocolParms);
         }
-        Assertion.test(myChangeProtocolIsOk,
+        T.require(myChangeProtocolIsOk,
                        "Must only be called while caller is processing an input message");
         // For calculating the header length
         int headerLengthIndex = HEADER_INVALID;
@@ -215,12 +215,12 @@
             myIsDoingHMAC = true;
             // end improved E protocol
         } else {
-            Assertion.test(false, "Invalid protocol type " + protocolParms);
+            T.fail("Invalid protocol type " + protocolParms);
         }
         myIsCompressingMsgLengths = myIsAggragating;
 
         int len = theHeaderLengths[headerLengthIndex];
-        Assertion.test(len >= 0, "Invalid header length code");
+        T.require(len >= 0, "Invalid header length code");
         myHeader = new byte[len];
     }
 



1.9       +3 -3      e/src/jsrc/net/vattp/data/SendThread.java

Index: SendThread.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/SendThread.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SendThread.java	2001/12/02 06:01:39	1.8
+++ SendThread.java	2001/12/18 05:24:41	1.9
@@ -24,7 +24,7 @@
 */
 
 import net.vattp.security.MicroTime;
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.exception.NestedIOException;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.prim.Runner;
@@ -731,7 +731,7 @@
                                     + HexStringUtils.byteArrayToReadableHexString(mac));
             }
             System.arraycopy(mac, 0, data, 4, myMacLen);
-            Assertion.test(mac.length == myMacLen, "MAC length error");
+            T.require(mac.length == myMacLen, "MAC length error");
             if (Trace.comm.timing && Trace.ON) {
                 macTime += MicroTime.queryTimer() - startTime;
             }
@@ -751,7 +751,7 @@
                 data[3] = (byte)(commLength & 0x7f);
                 break;
             default:
-                Assertion.fail("Case out of range, offset=" + offset);
+                T.fail("Case out of range, offset=" + offset);
         }
 
         if (null != myTransform) {



1.7       +2 -2      e/src/jsrc/net/vattp/data/Suspend.java

Index: Suspend.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/Suspend.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Suspend.java	2001/12/02 06:01:39	1.6
+++ Suspend.java	2001/12/18 05:24:41	1.7
@@ -20,7 +20,7 @@
 */
 // Copyright 1998, Electric Communities, all rights reserved worldwide.
 
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.util.HexStringUtils;
 
@@ -68,7 +68,7 @@
      * @param connection is the VatTPConnection which died.
      */
     public void processMessage(byte[] message, VatTPConnection connection) {
-        Assertion.test(Msg.SUSPEND == message[0], "Message not a SUSPEND message\n",
+        T.require(Msg.SUSPEND == message[0], "Message not a SUSPEND message\n",
                        HexStringUtils.byteArrayToReadableHexString(message));
         if (1 == message.length) {
             // Message is a shutdown message



1.4       +17 -14    e/src/jsrc/net/vattp/data/VatTPConnection.java

Index: VatTPConnection.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/VatTPConnection.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- VatTPConnection.java	2001/12/02 06:01:39	1.3
+++ VatTPConnection.java	2001/12/18 05:24:41	1.4
@@ -21,7 +21,7 @@
 // Copyright 1998, Electric Communities, all rights reserved worldwide.
 
 import net.vattp.security.ESecureRandom;
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.prim.Runner;
 import org.erights.e.elib.tables.ConstList;
@@ -341,8 +341,10 @@
       throws IOException {
         int ret;    // Our return value
 
-        Assertion.test(remoteVatID.equals(myRemoteVatID), "Wrong VatTPConnection\n  "
-                                                          + this + "\n  " + incomingPath + "\n  " + remoteVatID);
+        T.require(remoteVatID.equals(myRemoteVatID),
+                  "Wrong VatTPConnection\n  ", this, "\n  ",
+                  incomingPath, "\n  ",
+                  remoteVatID);
         if (null == myDataPath) {
             myDataPath = incomingPath;
             myFlattenedRemoteSearchPath
@@ -413,7 +415,7 @@
         }
         if (RUNNING == myState) {
             int sus = myDataPath.getStartupState();
-            Assertion.test(StartUpProtocol.ST_EXPECT_MESSAGE == sus, "state =" + sus);
+            T.require(StartUpProtocol.ST_EXPECT_MESSAGE == sus, "state =" + sus);
             myDataPath.enqueue(message);
         } else {
             if (null == myPendingOutput) myPendingOutput = new Vector(5);
@@ -787,12 +789,13 @@
             Trace.comm.eventm("registerMsgHandler=" + msgType + "("
                               + handler + ") on " + this);
         }
-        Assertion.test(msgType > 0 || msgType <= Msg.HIGH_MSG_TYPE,
-                       "msgType=" + msgType + " out of range (1 .. " + Msg.HIGH_MSG_TYPE
-                       + ")");
-        Assertion.test(STARTING == myState || RESUMING == myState,
-                       "Called after the NewConnectionReactor returns\n  handler="
-                       + handler + "\n  myState=" + myState);
+        T.require(msgType > 0 || msgType <= Msg.HIGH_MSG_TYPE,
+                  "msgType=" + msgType,
+                  " out of range (1 .. " + Msg.HIGH_MSG_TYPE,
+                  ")");
+        T.require(STARTING == myState || RESUMING == myState,
+                  "Called after the NewConnectionReactor returns\n  handler=",
+                  handler, "\n  myState=" + myState);
         if (null != myMsgHandlers[msgType]
           && myMsgHandlers[msgType] != handler) {
             throw new IOException(myMsgHandlers[msgType]
@@ -947,7 +950,7 @@
         if (Trace.comm.event && Trace.ON) {
             Trace.comm.eventm("shutDownConnection " + this);
         }
-        Assertion.test(null != reason, "Must provide a reason for shutdown");
+        T.require(null != reason, "Must provide a reason for shutdown");
         if (RUNNING == myState) {
             myDataPath.enqueue(new byte[]{Msg.SUSPEND});
             myState = DIEING;
@@ -1048,7 +1051,7 @@
       NetAddr localNetAddr,
       int remotePort,
       AuthSecrets authParms) {
-        Assertion.test(myRemoteVatID.equals(remoteVatID),
+        T.require(myRemoteVatID.equals(remoteVatID),
                        "DataPath's remote vatID=", remoteVatID,
                        " not equal my remote vatID=", myRemoteVatID);
         myProtocolParms = authParms;
@@ -1064,8 +1067,8 @@
                 myDataPath.stopStartUpProtocol();
                 myDataPath = myIncomingDataPath;
             } else {
-                Assertion.test(path == myDataPath, path.toString(), "\n",
-                               myDataPath.toString());
+                T.require(path == myDataPath,
+                          path, "\n", myDataPath);
                 myIncomingDataPath.stopStartUpProtocol();
             }
             myIncomingDataPath = null;



1.4       +2 -2      e/src/jsrc/net/vattp/data/VatTPMgr.java

Index: VatTPMgr.java
===================================================================
RCS file: /cvs/e/src/jsrc/net/vattp/data/VatTPMgr.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- VatTPMgr.java	2001/12/02 06:01:39	1.3
+++ VatTPMgr.java	2001/12/18 05:24:41	1.4
@@ -20,7 +20,7 @@
 */
 // Copyright 1998, Electric Communities, all rights reserved worldwide.
 
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.trace.Trace;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.Runner;
@@ -756,7 +756,7 @@
      */
     public void setVatLocationLookup(VatLocationLookup vls) {
         if (myVLS != null) {
-            Assertion.fail("duplicate setVatLocationLookup");
+            T.fail("duplicate setVatLocationLookup");
         }
         myVLS = vls;
     }



1.14      +2 -2      e/src/jsrc/org/capml/dom/Node.java

Index: Node.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/capml/dom/Node.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Node.java	2001/12/14 00:06:00	1.13
+++ Node.java	2001/12/18 05:24:41	1.14
@@ -16,8 +16,8 @@
  * comment.
  */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.eio.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.serial.PassByConstruction;
 import org.erights.e.elib.serial.Persistent;
 import org.erights.e.elib.tables.AssocFunc;
@@ -191,7 +191,7 @@
             //so return an empty Text, since we gotta return something
             return new Text("");
         } else {
-            E.require(result.length == 1,
+            T.require(result.length == 1,
                       "Internal: minimization shouldn't expand: ", this);
             return result[0];
         }



1.1                  e/src/jsrc/org/erights/e/develop/assertion/AssertionError.java

Index: AssertionError.java
===================================================================
package org.erights.e.develop.assertion;

/*
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): ______________________________________.
*/
/**
 * Instances of this class are thrown by failing assertions.
 * <p>
 * Once we commit to Java 1.4, this should be removed, and all usages
 * migrated to java.lang.AssertionError.
 * <p>
 * History: Brian Marick wrote the first version of this class as
 * 'AssertionFailed'.  Mark Miller renamed it in anticipation of Java 1.4.
 *
 * @see Assertion
 * @author Brian Marick
 * @author Mark Miller
 */
public class AssertionError extends Error {

    public AssertionError() {
        super();
    }

    public AssertionError(String msg) {
        super(msg);
    }
}



1.1                  e/src/jsrc/org/erights/e/develop/assertion/T.java

Index: T.java
===================================================================
package org.erights.e.develop.assertion;

/*
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): ______________________________________.
*/

/**
 * This class provides assert and require checks you can add to your program.
 * <p>
 * If the the checks fail, unchecked exceptions of class AssertionError are
 * thrown.
 * <p>
 * Once E can commit to Java 1.4, then calls to static assertion methods of
 * this class (the 'test' methods) should be converted to the new Java 1.4
 * "assert" syntax, in which case they can be switched off, or possibly
 * stripped from the code.  Therefore, the meaning of a program should be
 * insensitive to whether an assertion check (a 'test') is performed.
 * <p>
 * Calls to static 'require' methods of this class are non-optional -- they
 * are considered part of the program, and may not be removed.
 * <p>
 * History: Brian Marick wrote the original as the class 'Assertion', designed
 * to work with his unassert utility, which was unfortunately not open sourced
 * with the rest of E.  Now that Java 1.4 will be providing us an alternative
 * mechanism before we can expect to revive this, Mark Miller removed the
 * stripping support mechanism, while also renaming 'Assertion' to 'T', and
 * duplicated 'test' as 'require' in order to have both kinds of check.  Most
 * previous users of 'test' have been moved to 'require', as it wasn't clear
 * whether the test was optional for them.
 *
 * @see AssertionError
 * @author Brian Marick
 * @author Mark Miller
 */
public class T {

    static private final String prefix = "Internal: ";

    /**
     * If this method is executed, it throws an AssertionError with the
     * message "Internal:  'Unreachable' code was reached."  Plant
     * such assertions in places the program should never reach (such as
     * the default case in a switch).
     */
    static public void fail() throws AssertionError {
        throw new AssertionError(prefix + "'Unreachable' code was reached.");
    }

    /**
     * If this method is executed, it throws an AssertionError with the
     * given explanation, prefixed by "Internal: ".
     */
    static public void fail(String explanation) throws AssertionError {
        throw new AssertionError(prefix + explanation);
    }

    /**
     * If the argument is false, throws an AssertionError with the message
     * "Internal: Assertion failed."
     */
    static public void test(boolean mustBeTrue) throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix + "Assertion failed.");
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation, prefixed by "Internal: ".
     */
    static public void test(boolean mustBeTrue,
                            String explanation)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p>
     * Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void testSI(boolean mustBeTrue,
                              Object explanation0,
                              int explanation1)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p>
     * Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void test(boolean mustBeTrue,
                            Object explanation0,
                            Object explanation1)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void test(boolean mustBeTrue,
                            Object explanation0,
                            Object explanation1,
                            Object explanation2)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void test(boolean mustBeTrue,
                            Object explanation0,
                            Object explanation1,
                            Object explanation2,
                            Object explanation3)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2 +
                                     explanation3);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void test(boolean mustBeTrue,
                            Object explanation0,
                            Object explanation1,
                            Object explanation2,
                            Object explanation3,
                            Object explanation4)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2 +
                                     explanation3 +
                                     explanation4);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void test(boolean mustBeTrue,
                            Object explanation0,
                            Object explanation1,
                            Object explanation2,
                            Object explanation3,
                            Object explanation4,
                            Object explanation5)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2 +
                                     explanation3 +
                                     explanation4 +
                                     explanation5);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void test(boolean mustBeTrue,
                            Object explanation0,
                            Object explanation1,
                            Object explanation2,
                            Object explanation3,
                            Object explanation4,
                            Object explanation5,
                            Object explanation6)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2 +
                                     explanation3 +
                                     explanation4 +
                                     explanation5 +
                                     explanation6);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void test(boolean mustBeTrue,
                            Object explanation0,
                            Object explanation1,
                            Object explanation2,
                            Object explanation3,
                            Object explanation4,
                            Object explanation5,
                            Object explanation6,
                            Object explanation7)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2 +
                                     explanation3 +
                                     explanation4 +
                                     explanation5 +
                                     explanation6 +
                                     explanation7);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation, prefixed by "Internal: ".
     */
    static public void require(boolean mustBeTrue,
                               String explanation)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p>
     * Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void requireSI(boolean mustBeTrue,
                                 Object explanation0,
                                 int explanation1)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p>
     * Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void require(boolean mustBeTrue,
                               Object explanation0,
                               Object explanation1)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void require(boolean mustBeTrue,
                               Object explanation0,
                               Object explanation1,
                               Object explanation2)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void require(boolean mustBeTrue,
                               Object explanation0,
                               Object explanation1,
                               Object explanation2,
                               Object explanation3)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2 +
                                     explanation3);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void require(boolean mustBeTrue,
                               Object explanation0,
                               Object explanation1,
                               Object explanation2,
                               Object explanation3,
                               Object explanation4)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2 +
                                     explanation3 +
                                     explanation4);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void require(boolean mustBeTrue,
                               Object explanation0,
                               Object explanation1,
                               Object explanation2,
                               Object explanation3,
                               Object explanation4,
                               Object explanation5)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2 +
                                     explanation3 +
                                     explanation4 +
                                     explanation5);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void require(boolean mustBeTrue,
                               Object explanation0,
                               Object explanation1,
                               Object explanation2,
                               Object explanation3,
                               Object explanation4,
                               Object explanation5,
                               Object explanation6)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2 +
                                     explanation3 +
                                     explanation4 +
                                     explanation5 +
                                     explanation6);
        }
    }

    /**
     * If the argument is false, throws an AssertionError with the
     * given explanation arguments, concatenated as strings and prefixed
     * by "Internal: ".
     * <p> Use this routine when you need to avoid paying the overhead of
     * string concatenation ("+") on every test.  It does the concatenation
     * only if the test fails.
     */
    static public void require(boolean mustBeTrue,
                               Object explanation0,
                               Object explanation1,
                               Object explanation2,
                               Object explanation3,
                               Object explanation4,
                               Object explanation5,
                               Object explanation6,
                               Object explanation7)
      throws AssertionError {
        if (mustBeTrue == false) {
            throw new AssertionError(prefix +
                                     explanation0 +
                                     explanation1 +
                                     explanation2 +
                                     explanation3 +
                                     explanation4 +
                                     explanation5 +
                                     explanation6 +
                                     explanation7);
        }
    }
}



1.14      +5 -5      e/src/jsrc/org/erights/e/develop/trace/TraceBuffer.java

Index: TraceBuffer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceBuffer.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- TraceBuffer.java	2001/12/02 06:01:42	1.13
+++ TraceBuffer.java	2001/12/18 05:24:42	1.14
@@ -24,7 +24,7 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.exception.PrintStreamWriter;
 
 import java.io.File;
@@ -77,9 +77,9 @@
     }
 
     public synchronized void accept(TraceMessage message) {
-        Assertion.test(start != null);
-        Assertion.test(end != null);
-        Assertion.test(message != null);
+        T.test(start != null);
+        T.test(end != null);
+        T.test(message != null);
 
         currentSize++;
         end.next = message;
@@ -222,7 +222,7 @@
     // except by GC, it is safe for this not to be synchronized.
     /*package*/
     TraceMessage getFirstMessage() {
-        Assertion.test(start != null);
+        T.test(start != null);
         return start;
     }
 



1.11      +4 -4      e/src/jsrc/org/erights/e/develop/trace/TraceController.java

Index: TraceController.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceController.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- TraceController.java	2001/11/10 19:40:39	1.10
+++ TraceController.java	2001/12/18 05:24:42	1.11
@@ -25,7 +25,7 @@
  */
 
 
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 
 import java.util.Enumeration;
 import java.util.Hashtable;
@@ -366,7 +366,7 @@
             String key = (String)keys.nextElement();
             String value = p.getProperty(key);
             // Note that the value cannot be null, but let's check.
-            Assertion.test(value != null);
+            T.test(value != null);
 
             setProperty(key, value);
         }
@@ -382,7 +382,7 @@
     // Note: synchronization is the responsibility of the objects
     // whose properties are being changed.
     static public void setProperty(String key, String value) {
-        Assertion.test(value != null, "Trace property value cannot be null.");
+        T.test(value != null, "Trace property value cannot be null.");
         key = key.trim();
         value = value.trim();
         Trace.trace.debugm("Setting property " + key + " to value " + value);
@@ -463,7 +463,7 @@
                                   String afterFirstUnderbar,
                                   String value) {
         int underbar = afterFirstUnderbar.lastIndexOf('_');
-        Assertion.test(underbar != -1);
+        T.test(underbar != -1);
         String subsystem = afterFirstUnderbar.substring(0, underbar);
         if (value.equalsIgnoreCase("on") ||
           value.equalsIgnoreCase("true")) {



1.8       +2 -2      e/src/jsrc/org/erights/e/develop/trace/TraceLevelTranslator.java

Index: TraceLevelTranslator.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceLevelTranslator.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- TraceLevelTranslator.java	2001/11/10 19:40:39	1.7
+++ TraceLevelTranslator.java	2001/12/18 05:24:42	1.8
@@ -24,7 +24,7 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 
 /**
  * Translate numerical trace levels into strings and vice versa.
@@ -64,7 +64,7 @@
                 retval = "TIM";
                 break;
             default:
-                Assertion.fail("Left level out of TraceLevelTranslator.terse.");
+                T.fail("Left level out of TraceLevelTranslator.terse.");
                 retval = "";    // silence compiler.
                 break;
         }



1.13      +20 -20    e/src/jsrc/org/erights/e/develop/trace/TraceLog.java

Index: TraceLog.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceLog.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- TraceLog.java	2001/12/02 06:01:42	1.12
+++ TraceLog.java	2001/12/18 05:24:42	1.13
@@ -24,7 +24,7 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.exception.PrintStreamWriter;
 
 import java.util.Enumeration;
@@ -131,7 +131,7 @@
      * is the method used to drain that queue.
      */
     private void acceptBypassingQueue(TraceMessage message) {
-        Assertion.test(myCurrent.stream != null,
+        T.test(myCurrent.stream != null,
                        "Trace system has null stream.");
         String output = myStringifier.toString(message);
         myCurrent.stream.println(output);
@@ -156,7 +156,7 @@
      * queue is drained just before the method returns.
      */
     private void beginLogging() {
-        Assertion.test(myCurrent == null);
+        T.test(myCurrent == null);
         try {
             myPending.startUsing(myBackupAction); // rename any existing file.
         } catch (Exception e) {
@@ -167,7 +167,7 @@
             try {
                 myCurrent.startUsing(IRRELEVANT);
             } catch (Exception ignore) {
-                Assertion.fail("Exceptions shouldn't happen opening stdout.");
+                T.fail("Exceptions shouldn't happen opening stdout.");
             }
             drainQueue();
             return;
@@ -189,7 +189,7 @@
      */
     /*package*/
     synchronized void changeBackupFileHandling(String newBehavior) {
-        Assertion.test(newBehavior != null);
+        T.test(newBehavior != null);
         if (newBehavior.equalsIgnoreCase("one") || newBehavior.equals("1")) {
             Trace.trace.eventm("Backup files will be overwritten.");
             myBackupAction = OVERWRITE;
@@ -292,7 +292,7 @@
      */
     /*package*/
     synchronized void changeWrite(String value) {
-        Assertion.test(value != null);
+        T.test(value != null);
         if (value.equalsIgnoreCase("true")) {
             if (myWrite) {
                 Trace.trace.warningm("Log writing enabled twice in a row.");
@@ -319,7 +319,7 @@
                     myCurrent.stopUsing();
                     myCurrent = null;
                 } else {
-                    Assertion.test(myCurrent == null);
+                    T.test(myCurrent == null);
                 }
             }
         } else {
@@ -370,11 +370,11 @@
      * <p>
      * This routine is called only to empty a full logfile.
      */
-    /*                                This turns out to be a useless feature.
+/*                                This turns out to be a useless feature.
     private void shutdownAndRestart() {
-        Assertion.test(myCurrent != null);
-        Assertion.test(myCurrent.stream != null);
-        Assertion.test(!isQueuing());
+        T.test(myCurrent != null);
+        T.test(myCurrent.stream != null);
+        T.test(!isQueuing());
 
         myCurrent.stopUsing();
         startQueuing(); // further messages should go to the new log.
@@ -388,7 +388,7 @@
             try {
                 myCurrent.startUsing(IRRELEVANT);
             } catch (Exception ignore) {
-                Assertion.fail("No exceptions when opening stdout.");
+                T.fail("No exceptions when opening stdout.");
             }
             drainQueue();
             return;
@@ -437,9 +437,9 @@
      * used when explicitly reopening a log file. (TraceLog_reopen=true).
      */
     private void hotSwap() {
-        Assertion.test(myCurrent != null);
-        Assertion.test(myCurrent.stream != null);
-        Assertion.test(!isQueuing());
+        T.test(myCurrent != null);
+        T.test(myCurrent.stream != null);
+        T.test(!isQueuing());
 
         // Finish the old log with a pointer to the new.
         Trace.trace.usagem("Logging will continue on " +
@@ -529,7 +529,7 @@
      * been used, or if the default behavior is to write.
      */
     public synchronized void setupIsComplete() {
-        Assertion.test(isQueuing());
+        T.test(isQueuing());
         Trace.trace.eventm("Logging is being started.");
         if (myWrite) {
             beginLogging();
@@ -554,9 +554,9 @@
      * explicitly reopen the same logfile (via TraceLog_reopen=true).
      */
     private void shutdownAndSwap() {
-        Assertion.test(myCurrent != null);
-        Assertion.test(myCurrent.stream != null);
-        Assertion.test(!isQueuing());
+        T.test(myCurrent != null);
+        T.test(myCurrent.stream != null);
+        T.test(!isQueuing());
 
         // In the old log, say what will happen.  Can't log it
         // while it's happening, because that all goes to the
@@ -580,7 +580,7 @@
             try {
                 myCurrent.startUsing(IRRELEVANT);
             } catch (Exception ignore) {
-                Assertion.fail("No exceptions when opening stdout.");
+                T.fail("No exceptions when opening stdout.");
             }
             drainQueue();
             Trace.trace.worldm("Previous log was " + lastLog + ".");



1.15      +14 -14    e/src/jsrc/org/erights/e/develop/trace/TraceLogDescriptor.java

Index: TraceLogDescriptor.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceLogDescriptor.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- TraceLogDescriptor.java	2001/12/02 06:01:42	1.14
+++ TraceLogDescriptor.java	2001/12/18 05:24:42	1.15
@@ -24,7 +24,7 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.exception.PrintStreamWriter;
 
 import java.io.File;
@@ -98,14 +98,14 @@
      */
     /*package*/
     File backupFile(File file, int clashAction) {
-        Assertion.test(!useStdout);
+        T.test(!useStdout);
 
         if (clashAction == ADD) {
             return TraceVersionNamer.factory(file).nextAvailableVersion();
         } else if (clashAction == OVERWRITE) {
             return TraceVersionNamer.factory(file).firstVersion();
         } else {
-            Assertion.fail("Bad clashAction " + clashAction);
+            T.fail("Bad clashAction " + clashAction);
             return null;
         }
     }
@@ -121,10 +121,10 @@
         try {
             TraceLogDescriptor cl = (TraceLogDescriptor)clone();
             cl.stream = null;
-            Assertion.test(!cl.inUse());
+            T.test(!cl.inUse());
             return cl;
         } catch (CloneNotSupportedException e) {
-            Assertion.fail("Clone IS SO supported.");
+            T.fail("Clone IS SO supported.");
             // Someday I gotta figure out the right way to declare
             // clone.
             return null;
@@ -155,7 +155,7 @@
      * routine if the user wants PrintStreamWriter.out(), not a file.
      */
     private File desiredLogFile() {
-        Assertion.test(!useStdout);
+        T.test(!useStdout);
         if (usePersonalFormat) {
             if ((new File(personalFile)).isAbsolute()) {
                 return new File(personalFile);
@@ -233,14 +233,14 @@
      * @returns true if the rename was successful.
      */
     private boolean renameToBackup(File file, int clashAction) {
-        Assertion.test(clashAction == ADD || clashAction == OVERWRITE);
+        T.test(clashAction == ADD || clashAction == OVERWRITE);
 
         File backupFile = backupFile(file, clashAction);
         if (clashAction == ADD) {
             // backupFile must return a fresh name if the clashAction
             // is ADD.  It *may* return a fresh name if the
             // clashAction is OVERWRITE.
-            Assertion.test(!backupFile.exists());
+            T.test(!backupFile.exists());
         }
 
         Trace.trace.usagem("Renaming previous version of " +
@@ -290,7 +290,7 @@
      */
     /*package*/
     void setDir(String value) {
-        Assertion.test(value != null);
+        T.test(value != null);
         useStdout = false;
         // Don't change value of usePersonalFormat, as the directory
         // is independent of the filename format.
@@ -312,7 +312,7 @@
      */
     /*package*/
     void setName(String value) {
-        Assertion.test(value != null);
+        T.test(value != null);
         if (value.equals("-")) {
             useStdout = true;
             usePersonalFormat = false;
@@ -333,7 +333,7 @@
      */
     /*package*/
     void setTag(String value) {
-        Assertion.test(value != null);
+        T.test(value != null);
         useStdout = false;
         usePersonalFormat = false;
         tag = value;
@@ -357,7 +357,7 @@
      */
     /*package*/
     void startUsing(int clashAction) throws Exception {
-        Assertion.test(!inUse());
+        T.test(!inUse());
 
         if (useStdout) {
             Trace.trace.eventm("Logging has been directed to standard output.");
@@ -365,7 +365,7 @@
             return;
         }
 
-        Assertion.test(clashAction == ADD || clashAction == OVERWRITE);
+        T.test(clashAction == ADD || clashAction == OVERWRITE);
 
         File nextFile = desiredLogFile();
         Trace.trace.eventm("Logging has been directed to '" +
@@ -413,7 +413,7 @@
      */
     /*package*/
     void stopUsing() {
-        Assertion.test(inUse());
+        T.test(inUse());
         if (stream != PrintStreamWriter.out()) {
             // I don't trust finalizers to do it, at least not in time.
             Trace.trace.eventm("Closing " + printName());



1.11      +3 -3      e/src/jsrc/org/erights/e/develop/trace/TraceSubsystemMediator.java

Index: TraceSubsystemMediator.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceSubsystemMediator.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- TraceSubsystemMediator.java	2001/12/02 06:01:42	1.10
+++ TraceSubsystemMediator.java	2001/12/18 05:24:42	1.11
@@ -24,7 +24,7 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 
 import java.util.Date;
 import java.util.Enumeration;
@@ -104,7 +104,7 @@
         try {
             myThresholds = (int[])someThresholds.clone();
         } catch (Exception e) {
-            Assertion.fail("CloneNotSupported should be impossible.");
+            T.fail("CloneNotSupported should be impossible.");
         }
 
         myTimingBooleans = new boolean[NUM_ACCEPTORS];
@@ -306,7 +306,7 @@
                 tr.error = true;
                 break;
             default:
-                Assertion.fail("updateOneThresholdCache switch is missing a case.");
+                T.fail("updateOneThresholdCache switch is missing a case.");
         }
     }
 



1.11      +3 -3      e/src/jsrc/org/erights/e/develop/trace/TraceVersionNamer.java

Index: TraceVersionNamer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/develop/trace/TraceVersionNamer.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- TraceVersionNamer.java	2001/12/02 06:01:42	1.10
+++ TraceVersionNamer.java	2001/12/18 05:24:42	1.11
@@ -24,7 +24,7 @@
  *  Copyright (c) 1997 by Electric Communities.  All Rights Reserved.
  */
 
-import org.erights.e.develop.assertion.Assertion;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.exception.PrintStreamWriter;
 
 import java.io.File;
@@ -66,10 +66,10 @@
     TraceVersionNamer(File aFile) {
         myFile = aFile;
         myName = myFile.getName();
-        Assertion.test(myName != null);
+        T.test(myName != null);
 
         myDir = myFile.getParent();
-        Assertion.test(myDir != null);
+        T.test(myDir != null);
 
         myBasename = fetchBasename();
         Trace.trace.debugm("Finding next version of " +



1.74      +1 -1      e/src/jsrc/org/erights/e/elang/syntax/ELexer.java

Index: ELexer.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/ELexer.java,v
retrieving revision 1.73
retrieving revision 1.74
diff -u -r1.73 -r1.74
--- ELexer.java	2001/12/10 06:11:00	1.73
+++ ELexer.java	2001/12/18 05:24:42	1.74
@@ -23,7 +23,7 @@
 import org.erights.e.elib.eio.TextWriter;
 import org.erights.e.elib.tables.EmptyTwine;
 import org.erights.e.elib.tables.Twine;
-import org.quasiliteral.astro.ASTBuilder;
+import org.quasiliteral.antlr.ASTBuilder;
 import org.quasiliteral.astro.Astro;
 import org.quasiliteral.astro.AstroBuilder;
 import org.quasiliteral.astro.AstroTag;



1.113     +1 -1      e/src/jsrc/org/erights/e/elang/syntax/EParser.java

Index: EParser.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/EParser.java,v
retrieving revision 1.112
retrieving revision 1.113
diff -u -r1.112 -r1.113
--- EParser.java	2001/12/10 20:30:09	1.112
+++ EParser.java	2001/12/18 05:24:42	1.113
@@ -25,8 +25,8 @@
 import org.quasiliteral.astro.Astro;
 import org.quasiliteral.astro.AstroSchema;
 import org.quasiliteral.astro.BaseSchema;
-import org.quasiliteral.syntax.EYaccFixer;
 import org.quasiliteral.syntax.SyntaxException;
+import org.quasiliteral.text.EYaccFixer;
 
 import java.io.IOException;
 import java.io.InputStream;



1.16      +1 -1      e/src/jsrc/org/erights/e/elang/syntax/Makefile

Index: Makefile
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/Makefile,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- Makefile	2001/12/10 20:30:09	1.15
+++ Makefile	2001/12/18 05:24:42	1.16
@@ -46,4 +46,4 @@
 	$(BYACCJ) -jv -f EParser -x EBuilder -s Object e.y
 
 all: e.y _parse
-	$(STLJ) org.quasiliteral.syntax.EYaccFixer . $(TOP)/src/bin/resources
+	$(STLJ) org.quasiliteral.text.EYaccFixer . $(TOP)/src/bin/resources



1.3       +3 -3      e/src/jsrc/org/erights/e/elang/syntax/URIKit.java

Index: URIKit.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/URIKit.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- URIKit.java	2001/12/02 06:01:44	1.2
+++ URIKit.java	2001/12/18 05:24:42	1.3
@@ -19,7 +19,7 @@
 Contributor(s): ______________________________________.
 */
 
-import org.erights.e.elib.prim.E;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.tables.Twine;
 
 /**
@@ -72,7 +72,7 @@
      */
     static public Twine getProtcol(Twine uriText) {
         int colon = uriText.indexOf(":");
-        E.require(colon >= 0, "':' not found: ", uriText);
+        T.require(colon >= 0, "':' not found: ", uriText);
         return (Twine)uriText.run(0, colon);
     }
 
@@ -81,7 +81,7 @@
      */
     static public Twine getBody(Twine uriText) {
         int colon = uriText.indexOf(":");
-        E.require(colon >= 0, "':' not found: ", uriText);
+        T.require(colon >= 0, "':' not found: ", uriText);
         return (Twine)uriText.run(colon + 1, uriText.size());
     }
 



1.103     +1 -1      e/src/jsrc/org/erights/e/elang/syntax/e.y

Index: e.y
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elang/syntax/e.y,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- e.y	2001/12/10 20:30:09	1.102
+++ e.y	2001/12/18 05:24:42	1.103
@@ -42,8 +42,8 @@
 import org.quasiliteral.astro.Astro;
 import org.quasiliteral.astro.AstroSchema;
 import org.quasiliteral.astro.BaseSchema;
-import org.quasiliteral.syntax.EYaccFixer;
 import org.quasiliteral.syntax.SyntaxException;
+import org.quasiliteral.text.EYaccFixer;
 
 import java.io.IOException;
 import java.io.InputStream;



1.35      +4 -4      e/src/jsrc/org/erights/e/elib/base/ClassDesc.java

Index: ClassDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/ClassDesc.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- ClassDesc.java	2001/12/17 16:49:47	1.34
+++ ClassDesc.java	2001/12/18 05:24:42	1.35
@@ -25,6 +25,10 @@
 import org.erights.e.elib.prim.ScriptMaker;
 import org.erights.e.elib.prim.Thrower;
 import org.erights.e.elib.ref.Ref;
+import org.erights.e.elib.slot.BothGuard;
+import org.erights.e.elib.slot.NullOkMaker;
+import org.erights.e.elib.slot.SimpleSlotMaker;
+import org.erights.e.elib.slot.VoidMaker;
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.tables.ConstMap;
 import org.erights.e.elib.tables.EList;
@@ -33,10 +37,6 @@
 import org.erights.e.elib.tables.FlexSet;
 import org.erights.e.elib.util.ClassCache;
 import org.erights.e.elib.util.OneArgFunc;
-import org.erights.e.elib.slot.BothGuard;
-import org.erights.e.elib.slot.NullOkMaker;
-import org.erights.e.elib.slot.SimpleSlotMaker;
-import org.erights.e.elib.slot.VoidMaker;
 import org.erights.e.meta.java.lang.ArrayGuardSugar;
 import org.erights.e.meta.java.lang.InterfaceGuardSugar;
 



1.13      +0 -2      e/src/jsrc/org/erights/e/elib/base/MessageDesc.java

Index: MessageDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/MessageDesc.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- MessageDesc.java	2001/12/16 10:10:29	1.12
+++ MessageDesc.java	2001/12/18 05:24:42	1.13
@@ -22,10 +22,8 @@
 */
 
 import org.erights.e.elib.eio.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.serial.Persistent;
-import org.erights.e.elib.slot.NullOkMaker;
 import org.erights.e.elib.slot.ValueGuard;
 import org.erights.e.elib.slot.VoidMaker;
 import org.erights.e.elib.tables.ConstList;



1.13      +1 -4      e/src/jsrc/org/erights/e/elib/base/ParamDesc.java

Index: ParamDesc.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/base/ParamDesc.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- ParamDesc.java	2001/12/16 10:10:29	1.12
+++ ParamDesc.java	2001/12/18 05:24:42	1.13
@@ -22,13 +22,10 @@
 */
 
 import org.erights.e.elib.eio.TextWriter;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.prim.StaticMaker;
 import org.erights.e.elib.serial.Persistent;
-import org.erights.e.elib.slot.NullOkMaker;
-import org.erights.e.elib.slot.SlotGuard;
-import org.erights.e.elib.slot.ValueGuard;
 import org.erights.e.elib.slot.SimpleSlotMaker;
+import org.erights.e.elib.slot.SlotGuard;
 
 import java.io.IOException;
 



1.64      +3 -56     e/src/jsrc/org/erights/e/elib/prim/E.java

Index: E.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/elib/prim/E.java,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -r1.63 -r1.64
--- E.java	2001/12/06 06:25:08	1.63
+++ E.java	2001/12/18 05:24:42	1.64
@@ -584,6 +584,9 @@
      * If problem coerces to a Thunk, then reassign problem to be the result
      * of calling this thunk with 'run()'.  Then, in either case, coerce this
      * problem to a RuntimeException and throw it.
+     * <p>
+     * This is used by the implementation of the 'require' function in the
+     * E language's universal scope.
      */
     static public void require(boolean cond, Object problem) {
         if (cond) {
@@ -605,61 +608,5 @@
             problem = optThunk.run();
         }
         throw asRTE(problem);
-    }
-
-    /**
-     * If cond isn't true, then 'require(false, prob0 + prob1)'
-     */
-    static public void require(boolean cond,
-                               Object prob0,
-                               Object prob1) {
-        if (cond) {
-            return;
-        }
-        require(false, E.call(prob0, "add", prob1));
-    }
-
-    /**
-     * For use only from Java: Optimizes for a common special case -- require
-     * with a <bold>S</bold>tring and an <bold>i</bold>nt.
-     */
-    static public void requireSI(boolean cond, String prob, int i) {
-        if (cond) {
-            return;
-        }
-        require(false, prob + i);
-    }
-
-    /**
-     * If cond isn't true, then 'require(false, prob0 + prob1 + prob2)'
-     */
-    static public void require(boolean cond,
-                               Object prob0,
-                               Object prob1,
-                               Object prob2) {
-        if (cond) {
-            return;
-        }
-        require(false, E.call(E.call(prob0, "add", prob1),
-                              "add",
-                              prob2));
-    }
-
-    /**
-     * If cond isn't true, then 'require(false, prob0 + prob1 + prob2)'
-     */
-    static public void require(boolean cond,
-                               Object prob0,
-                               Object prob1,
-                               Object prob2,
-                               Object prob3) {
-        if (cond) {
-            return;
-        }
-        require(false, E.call(E.call(E.call(prob0, "add", prob1),
-                                     "add",
-                                     prob2),
-                              "add",
-                              prob3));
     }
 }



1.27      +1 -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.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- StaticMaker.java	2001/12/17 16:49:47	1.26
+++ StaticMaker.java	2001/12/18 05:24:42	1.27
@@ -30,12 +30,11 @@
 import org.erights.e.elib.serial.PassByConstruction;
 import org.erights.e.elib.serial.Persistent;
 import org.erights.e.elib.tables.ConstList;
-import org.erights.e.elib.tables.ConstMap;
+import org.erights.e.elib.tables.ConstSet;
 import org.erights.e.elib.tables.EMap;
 import org.erights.e.elib.tables.FlexList;
 import org.erights.e.elib.tables.FlexMap;
 import org.erights.e.elib.tables.FlexSet;
-import org.erights.e.elib.tables.ConstSet;
 import org.erights.e.elib.util.AlreadyDefinedException;
 import org.erights.e.elib.util.ClassCache;
 



1.9       +1 -1      e/src/jsrc/org/erights/e/extern/file/ConsoleMaker.java

Index: ConsoleMaker.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/extern/file/ConsoleMaker.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- ConsoleMaker.java	2001/11/10 19:40:50	1.8
+++ ConsoleMaker.java	2001/12/18 05:24:43	1.9
@@ -30,7 +30,7 @@
         if (issued) {
             //XXX this would suppress multiple Vats.
             // must do magic powers a different way.
-            //Assertion.fail("ConsoleMaker already issued");
+            //T.fail("ConsoleMaker already issued");
         }
         issued = true;
     }



1.12      +3 -2      e/src/jsrc/org/erights/e/meta/java/lang/ArrayGuardSugar.java

Index: ArrayGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/ArrayGuardSugar.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ArrayGuardSugar.java	2001/12/17 16:49:47	1.11
+++ ArrayGuardSugar.java	2001/12/18 05:24:43	1.12
@@ -21,6 +21,7 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
 import org.erights.e.elib.prim.E;
 import org.erights.e.elib.tables.ConstList;
@@ -42,8 +43,8 @@
      */
     public ArrayGuardSugar(Class clazz) {
         super(clazz);
-        E.require(clazz.isArray(),
-                  "internal: " + clazz + " must be an array type");
+        T.require(clazz.isArray(),
+                  clazz, " must be an array type");
     }
 
     /**



1.12      +3 -3      e/src/jsrc/org/erights/e/meta/java/lang/ByteGuardSugar.java

Index: ByteGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/ByteGuardSugar.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ByteGuardSugar.java	2001/12/02 06:01:49	1.11
+++ ByteGuardSugar.java	2001/12/18 05:24:43	1.12
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
@@ -37,8 +37,8 @@
      */
     public ByteGuardSugar(Class clazz) {
         super(clazz);
-        E.require(Byte.class == clazz,
-                  "internal: " + clazz + " must represent the 'byte' type");
+        T.require(Byte.class == clazz,
+                  clazz, " must represent the 'byte' type");
     }
 
     /**



1.10      +3 -3      e/src/jsrc/org/erights/e/meta/java/lang/ClassGuardSugar.java

Index: ClassGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/ClassGuardSugar.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ClassGuardSugar.java	2001/12/02 06:01:49	1.9
+++ ClassGuardSugar.java	2001/12/18 05:24:43	1.10
@@ -21,9 +21,9 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.Callable;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
@@ -43,8 +43,8 @@
      */
     public ClassGuardSugar(Class clazz) {
         super(clazz);
-        E.require(Class.class == clazz,
-                  "internal: " + clazz + " must be Class.class");
+        T.require(Class.class == clazz,
+                  clazz, " must be Class.class");
     }
 
     /**



1.13      +3 -3      e/src/jsrc/org/erights/e/meta/java/lang/DoubleGuardSugar.java

Index: DoubleGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/DoubleGuardSugar.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- DoubleGuardSugar.java	2001/12/02 06:01:49	1.12
+++ DoubleGuardSugar.java	2001/12/18 05:24:43	1.13
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
@@ -37,8 +37,8 @@
      */
     public DoubleGuardSugar(Class clazz) {
         super(clazz);
-        E.require(Double.class == clazz,
-                  "internal: " + clazz + " must represent the 'double' type");
+        T.require(Double.class == clazz,
+                  clazz, " must represent the 'double' type");
     }
 
     /**



1.13      +3 -3      e/src/jsrc/org/erights/e/meta/java/lang/FloatGuardSugar.java

Index: FloatGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/FloatGuardSugar.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- FloatGuardSugar.java	2001/12/02 06:01:49	1.12
+++ FloatGuardSugar.java	2001/12/18 05:24:43	1.13
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
@@ -37,8 +37,8 @@
      */
     public FloatGuardSugar(Class clazz) {
         super(clazz);
-        E.require(Float.class == clazz,
-                  "internal: " + clazz + " must be a float32 type");
+        T.require(Float.class == clazz,
+                  clazz, " must be a float32 type");
     }
 
     /**



1.12      +3 -3      e/src/jsrc/org/erights/e/meta/java/lang/IntegerGuardSugar.java

Index: IntegerGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/IntegerGuardSugar.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- IntegerGuardSugar.java	2001/12/02 06:01:49	1.11
+++ IntegerGuardSugar.java	2001/12/18 05:24:43	1.12
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
@@ -37,8 +37,8 @@
      */
     public IntegerGuardSugar(Class clazz) {
         super(clazz);
-        E.require(Integer.class == clazz,
-                  "internal: " + clazz + " must be an 'int' (int32) type");
+        T.require(Integer.class == clazz,
+                  clazz, " must be an 'int' (int32) type");
     }
 
     /**



1.13      +3 -3      e/src/jsrc/org/erights/e/meta/java/lang/InterfaceGuardSugar.java

Index: InterfaceGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/InterfaceGuardSugar.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- InterfaceGuardSugar.java	2001/12/02 06:01:49	1.12
+++ InterfaceGuardSugar.java	2001/12/18 05:24:43	1.13
@@ -21,10 +21,10 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.Callable;
 import org.erights.e.elib.base.ClassDesc;
 import org.erights.e.elib.deflect.Deflector;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
@@ -41,8 +41,8 @@
      */
     public InterfaceGuardSugar(Class clazz) {
         super(clazz);
-        E.require(clazz.isInterface(),
-                  "internal: " + clazz + " must be an interface type");
+        T.require(clazz.isInterface(),
+                  clazz, " must be an interface type");
     }
 
     /**



1.12      +3 -3      e/src/jsrc/org/erights/e/meta/java/lang/LongGuardSugar.java

Index: LongGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/LongGuardSugar.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- LongGuardSugar.java	2001/12/02 06:01:49	1.11
+++ LongGuardSugar.java	2001/12/18 05:24:43	1.12
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
@@ -37,8 +37,8 @@
      */
     public LongGuardSugar(Class clazz) {
         super(clazz);
-        E.require(Long.class == clazz,
-                  "internal: " + clazz + " must be a 'long' type");
+        T.require(Long.class == clazz,
+                  clazz, " must be a 'long' type");
     }
 
     /**



1.12      +3 -3      e/src/jsrc/org/erights/e/meta/java/lang/ShortGuardSugar.java

Index: ShortGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/ShortGuardSugar.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ShortGuardSugar.java	2001/12/02 06:01:49	1.11
+++ ShortGuardSugar.java	2001/12/18 05:24:43	1.12
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
@@ -37,8 +37,8 @@
      */
     public ShortGuardSugar(Class clazz) {
         super(clazz);
-        E.require(Short.class == clazz,
-                  "internal: " + clazz + " must be a 'short' type");
+        T.require(Short.class == clazz,
+                  clazz, " must be a 'short' type");
     }
 
     /**



1.11      +3 -3      e/src/jsrc/org/erights/e/meta/java/lang/StringGuardSugar.java

Index: StringGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/StringGuardSugar.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- StringGuardSugar.java	2001/12/02 06:01:49	1.10
+++ StringGuardSugar.java	2001/12/18 05:24:43	1.11
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.tables.Twine;
 import org.erights.e.elib.util.OneArgFunc;
 
@@ -38,8 +38,8 @@
      */
     public StringGuardSugar(Class clazz) {
         super(clazz);
-        E.require(String.class == clazz,
-                  "internal: " + clazz + " must be String.class");
+        T.require(String.class == clazz,
+                  clazz, " must be String.class");
     }
 
     /**



1.6       +3 -3      e/src/jsrc/org/erights/e/meta/java/lang/ThrowableGuardSugar.java

Index: ThrowableGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/ThrowableGuardSugar.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ThrowableGuardSugar.java	2001/12/02 06:01:49	1.5
+++ ThrowableGuardSugar.java	2001/12/18 05:24:43	1.6
@@ -19,9 +19,9 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.develop.exception.NestedException;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.tables.Twine;
 import org.erights.e.elib.util.OneArgFunc;
 import org.erights.e.elib.util.TwineException;
@@ -41,8 +41,8 @@
      */
     public ThrowableGuardSugar(Class clazz) {
         super(clazz);
-        E.require(Throwable.class.isAssignableFrom(clazz),
-                  "internal: " + clazz + " must be a type of Throwable");
+        T.require(Throwable.class.isAssignableFrom(clazz),
+                  clazz, " must be a type of Throwable");
     }
 
     /**



1.10      +3 -3      e/src/jsrc/org/erights/e/meta/java/lang/VoidGuardSugar.java

Index: VoidGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/lang/VoidGuardSugar.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- VoidGuardSugar.java	2001/12/02 06:01:49	1.9
+++ VoidGuardSugar.java	2001/12/18 05:24:43	1.10
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
@@ -37,8 +37,8 @@
      */
     public VoidGuardSugar(Class clazz) {
         super(clazz);
-        E.require(Void.class == clazz,
-                  "internal: " + clazz + " must represent the 'void' type");
+        T.require(Void.class == clazz,
+                  clazz, " must represent the 'void' type");
     }
 
     /**



1.10      +3 -3      e/src/jsrc/org/erights/e/meta/java/math/BigIntegerGuardSugar.java

Index: BigIntegerGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/java/math/BigIntegerGuardSugar.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- BigIntegerGuardSugar.java	2001/12/02 06:01:49	1.9
+++ BigIntegerGuardSugar.java	2001/12/18 05:24:43	1.10
@@ -19,8 +19,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.util.OneArgFunc;
 
 import java.math.BigInteger;
@@ -37,8 +37,8 @@
      */
     public BigIntegerGuardSugar(Class clazz) {
         super(clazz);
-        E.require(BigInteger.class == clazz,
-                  "internal: " + clazz + " must be an integer type");
+        T.require(BigInteger.class == clazz,
+                  clazz, " must be an integer type");
     }
 
     /**



1.9       +3 -3      e/src/jsrc/org/erights/e/meta/org/erights/e/elib/base/TypeDescGuardSugar.java

Index: TypeDescGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/org/erights/e/elib/base/TypeDescGuardSugar.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- TypeDescGuardSugar.java	2001/12/02 06:01:49	1.8
+++ TypeDescGuardSugar.java	2001/12/18 05:24:43	1.9
@@ -21,9 +21,9 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
 import org.erights.e.elib.base.TypeDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.util.OneArgFunc;
 
 /**
@@ -38,8 +38,8 @@
      */
     public TypeDescGuardSugar(Class clazz) {
         super(clazz);
-        E.require(TypeDesc.class.isAssignableFrom(clazz),
-                  "internal: " + clazz + " must be a kind of TypeDesc");
+        T.require(TypeDesc.class.isAssignableFrom(clazz),
+                  clazz, " must be a kind of TypeDesc");
     }
 
     /**



1.6       +3 -3      e/src/jsrc/org/erights/e/meta/org/erights/e/elib/ref/RefGuardSugar.java

Index: RefGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/org/erights/e/elib/ref/RefGuardSugar.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- RefGuardSugar.java	2001/12/02 06:01:49	1.5
+++ RefGuardSugar.java	2001/12/18 05:24:43	1.6
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.ref.Ref;
 import org.erights.e.elib.util.OneArgFunc;
 
@@ -44,8 +44,8 @@
      */
     public RefGuardSugar(Class clazz) {
         super(clazz);
-        E.require(Ref.class.isAssignableFrom(clazz),
-                  "internal: " + clazz + " must be a kind of Ref");
+        T.require(Ref.class.isAssignableFrom(clazz),
+                  clazz, " must be a kind of Ref");
     }
 
     /**



1.10      +3 -3      e/src/jsrc/org/erights/e/meta/org/erights/e/elib/slot/SlotGuardGuardSugar.java

Index: SlotGuardGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/org/erights/e/elib/slot/SlotGuardGuardSugar.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- SlotGuardGuardSugar.java	2001/12/02 06:01:50	1.9
+++ SlotGuardGuardSugar.java	2001/12/18 05:24:43	1.10
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.slot.SlotGuard;
 import org.erights.e.elib.util.OneArgFunc;
 import org.erights.e.meta.java.lang.InterfaceGuardSugar;
@@ -39,8 +39,8 @@
      */
     public SlotGuardGuardSugar(Class clazz) {
         super(SlotGuard.class); //XXX kludge, but must be an interface
-        E.require(SlotGuard.class.isAssignableFrom(clazz),
-                  "internal: " + clazz + " must be a kind of SlotGuard");
+        T.require(SlotGuard.class.isAssignableFrom(clazz),
+                  clazz, " must be a kind of SlotGuard");
     }
 
     /**



1.10      +3 -3      e/src/jsrc/org/erights/e/meta/org/erights/e/elib/slot/ValueGuardGuardSugar.java

Index: ValueGuardGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/org/erights/e/elib/slot/ValueGuardGuardSugar.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ValueGuardGuardSugar.java	2001/12/02 06:01:50	1.9
+++ ValueGuardGuardSugar.java	2001/12/18 05:24:43	1.10
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.slot.ValueGuard;
 import org.erights.e.elib.util.OneArgFunc;
 import org.erights.e.meta.java.lang.InterfaceGuardSugar;
@@ -39,8 +39,8 @@
      */
     public ValueGuardGuardSugar(Class clazz) {
         super(ValueGuard.class);  //XXX kludge, but must be an interface
-        E.require(ValueGuard.class.isAssignableFrom(clazz),
-                  "internal: " + clazz + " must be a kind of ValueGuard");
+        T.require(ValueGuard.class.isAssignableFrom(clazz),
+                  clazz, " must be a kind of ValueGuard");
     }
 
     /**



1.11      +3 -3      e/src/jsrc/org/erights/e/meta/org/erights/e/elib/tables/EListGuardSugar.java

Index: EListGuardSugar.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/meta/org/erights/e/elib/tables/EListGuardSugar.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- EListGuardSugar.java	2001/12/02 06:01:50	1.10
+++ EListGuardSugar.java	2001/12/18 05:24:43	1.11
@@ -21,8 +21,8 @@
 Contributor(s): ______________________________________.
 */
 
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.base.ClassDesc;
-import org.erights.e.elib.prim.E;
 import org.erights.e.elib.tables.ConstList;
 import org.erights.e.elib.tables.EList;
 import org.erights.e.elib.tables.Twine;
@@ -41,8 +41,8 @@
      */
     public EListGuardSugar(Class clazz) {
         super(clazz);
-        E.require(EList.class.isAssignableFrom(clazz),
-                  "internal: " + clazz + " must be a kind of EList");
+        T.require(EList.class.isAssignableFrom(clazz),
+                  clazz, " must be a kind of EList");
     }
 
     /**



1.27      +0 -1      e/src/jsrc/org/erights/e/ui/jed/EditGroup.java

Index: EditGroup.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/erights/e/ui/jed/EditGroup.java,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- EditGroup.java	2001/12/17 16:49:47	1.26
+++ EditGroup.java	2001/12/18 05:24:43	1.27
@@ -19,7 +19,6 @@
 Contributor(s): ______________________________________.
 */
 
-import org.erights.e.elib.tables.FlexMap;
 import org.erights.e.elib.tables.FlexSet;
 import org.erights.e.meta.java.io.FileGetter;
 import org.erights.e.meta.java.io.FileSugar;



1.1                  e/src/jsrc/org/quasiliteral/antlr/ASTBuilder.java

Index: ASTBuilder.java
===================================================================
package org.quasiliteral.antlr;

import org.erights.e.elib.tables.Twine;
import org.quasiliteral.astro.Astro;
import org.quasiliteral.astro.AstroArg;
import org.quasiliteral.astro.AstroSchema;
import org.quasiliteral.astro.AstroTag;
import org.quasiliteral.astro.BaseBuilder;

//This file is hereby placed in the public domain

/**
 * The default implementation (and default superclass) for implementing
 * AstroBuilder simply, for building AstroAST-trees with AstroToken leaves.
 * <p>
 * The type parameterization of AstroBuilder is: <pre>
 *     Leaf is AstroToken
 *     Node is AstroAST
 *     Arg is AstroAST
 *     Args is null (for empty list) or AstroAST (for it and its siblings).
 * </pre>
 *
 * @author <a href="mailto:markm@caplet.com">Mark Miller</a>
 */
public class ASTBuilder extends BaseBuilder {

    /**
     *
     */
    public ASTBuilder(AstroSchema schema) {
        super(schema);
    }

    /**
     *
     */
    public String toString() {
        return "<building ASTs for " + getSchema().getSchemaName() + ">";
    }

    /**
     * @return :AstroToken
     */
    protected Astro leafInternal(AstroTag tag,
                                 Object optData,
                                 Twine source) {
        return new AstroToken(tag, optData, source);
    }

    /**
     * @param functor :(AstroAST | AstroToken)
     * @param optArgs :(AstroAST | null)
     * @return :AstroAST
     */
    public Astro term(Astro functor, Object optArgs) {
        AstroAST result;
        if (functor instanceof AstroAST) {
            result = (AstroAST)functor;
        } else {
            result = new AstroAST((AstroToken)functor);
        }
        //If optArgs is null, this does the right thing.
        //setChild preserves optArgs's right-sibling-chain, as it should
        result.setFirstChild((AstroAST)optArgs);
        return result;
    }

    /**
     * @return null
     */
    public Object list() {
        return null;
    }

    /**
     * Modifies the last sibling in 'list' to be 'next', which itself is
     * modified to not have any further siblings.
     *
     * @param list :(AstroAST | null)
     * @param next :AstroAST
     * @return :AstroAST
     */
    public Object with(Object list, AstroArg next) {
        AstroAST optList = (AstroAST)list;
        AstroAST nextNode = (AstroAST)next;
        nextNode.setNextSibling(null);
        if (null == optList) {
            return nextNode;
        }
        AstroAST sib = optList;
        while (true) {
            AstroAST optNextSib = (AstroAST)sib.getNextSibling();
            if (null == optNextSib) {
                sib.setNextSibling(nextNode);
                return optList;
            }
            sib = optNextSib;
        }
    }
}



1.1                  e/src/jsrc/org/quasiliteral/antlr/AstroAST.java

Index: AstroAST.java
===================================================================
package org.quasiliteral.antlr;

import antlr.BaseAST;
import antlr.CommonToken;
import antlr.Token;
import antlr.collections.AST;
import org.erights.e.develop.assertion.T;
import org.erights.e.elib.tables.ConstList;
import org.erights.e.elib.tables.Twine;
import org.quasiliteral.astro.Astro;
import org.quasiliteral.astro.AstroBuilder;
import org.quasiliteral.astro.AstroSchema;
import org.quasiliteral.astro.AstroTag;

/**
 * AST node implementation which stores tokens explicitly.
 * <p>
 * This is handy if you'd rather derive information from tokens on an
 * as-needed basis instead of snarfing data from a token as an AST
 * is being built.
 * <p>
 * In keeping with the nature of Antlr ASTs, Astros are mutable.  The
 * corresponding immutable, Persistent, & PassByCopy type is the
 * {@link org.quasiliteral.term.Term}.
 *
 * @author <a href="mailto:markm@caplet.com">Mark S Miller</a>
 * @author Based on Danfuzz Bornstein's TokenAST
 */
public class AstroAST extends BaseAST implements Astro {

    /**
     *
     */
    private AstroToken myOptToken;

    /**
     * Construct an instance which (at least initially) is not associated
     * with a token.
     */
    public AstroAST() {
        myOptToken = null;
    }

    /**
     * Construct an instance which is associated with the given token.
     *
     * @param optToken :AstroToken The (optional) token to associate this
     *                 instance with
     */
    public AstroAST(Token optToken) {
        initialize(optToken);
    }

    /**
     *
     */
    public String toString() {
        return "" + myOptToken;
    }

    /**
     * Builds an equivalent of this AST using the building methods of
     * 'builder'.
     * <p>
     * Pattern-wise, the schema functions here as both a visitor and as a
     * factory.
     *
     * @return :Node
     */
    public Astro build(AstroBuilder builder) {
        Astro func = myOptToken.build(builder);

        Object args = builder.list();
        for (AstroAST optSub = (AstroAST)getFirstChild();
             null != optSub;
             optSub = (AstroAST)optSub.getNextSibling()) {

            args = builder.with(args, optSub.build(builder));
        }
        return builder.term(func, args);
    }

    /**
     * Since not all {@link AST}s are Astros, this static method
     * provides the equivalent of the build/1 instance method for ASTs in
     * general.
     * <p>
     * In the understanding of non-Astro ASTs used here, their functor is
     * only according to the AST's type code, for the tag, and the AST's text,
     * for the source.
     * <p>
     * XXX This should probably be made into a sugar-instance-method of AST.
     */
    static public Astro build(AST self, AstroBuilder builder) {
        if (self instanceof AstroAST) {
            return ((AstroAST)self).build(builder);
        } else {
            AstroSchema schema = builder.getSchema();
            short tagCode = AstroTag.typeCode2tagCode(self.getType());
            Astro func = builder.leafTag(schema.getOptTagForCode(tagCode),
                                         Twine.fromString(self.getText()));

            Object args = builder.list();
            for (AST optSub = self.getFirstChild();
                 null != optSub;
                 optSub = optSub.getNextSibling()) {

                args = builder.with(args, build(optSub, builder));
            }
            return builder.term(func, args);
        }
    }

    /**
     * Get the token text for this instance. If there is no token associated
     * with this instance, then this returns the empty string
     * (<code>""</code>), not <code>null</code>.
     *
     * @return non-null; the token text
     */
    public String getText() {
        if (myOptToken == null) {
            return "";
        } else {
            return myOptToken.getText();
        }
    }

    /**
     * Get the token type for this instance. If there is no token associated
     * with this instance, then this returns {@link Token#INVALID_TYPE}.
     *
     * @return the token type
     */
    public int getType() {
        if (myOptToken == null) {
            return Token.INVALID_TYPE;
        } else {
            return myOptToken.getType();
        }
    }

    /**
     * Get the token associated with this instance. If there is no token
     * associated with this instance, then this returns <code>null</code>.
     *
     * @return The token associated with this instance, or <code>mull</code>
     *         if there is no associated token
     */
    public AstroToken getOptToken() {
        return myOptToken;
    }

    /**
     * Set the token associated with this instance.
     *
     * @param optToken The new token (or null) to associate with this
     *                 instance.
     */
    public void setOptToken(AstroToken optToken) {
        myOptToken = optToken;
    }

    /**
     * Initialize this instance with the given non-composite token.
     *
     * @param optToken :AstroToken the non-composite token to associate with
     *                 this instance
     */
    public void initialize(Token optToken) {
        myOptToken = (AstroToken)optToken;
        if (null == myOptToken) {
            return;
        }
        T.require(myOptToken.getTag().isTagForData(myOptToken.getOptData()),
                  "Must break apart composites: ", myOptToken);
    }

    /**
     * Initialize this instance with the given token type and text.
     * This will construct a new {@link CommonToken} with the given
     * parameters and associate this instance with it.
     *
     * @param type the token type
     * @param optText The token text, or null
     */
    public void initialize(int type, String optText) {
        initialize(new CommonToken(type, optText));
    }

    /**
     * Initialize this instance based on the given {@link AST}.
     * If the given <code>AST</code> is in fact an instance of
     * <code>AstroAST</code>, then this instance will be initialized
     * to point at the same token as the given one. If not, then this
     * instance will be initialized with the same token type and text
     * as the given one.
     *
     * @param ast non-null; the <code>AST</code> to base this instance on
     */
    public void initialize(AST ast) {
        if (ast instanceof AstroAST) {
            initialize(((AstroAST)ast).getOptToken());
        } else {
            initialize(ast.getType(), ast.getText());
        }
    }

    /**
     * Set the token text for this node. If this instance is already
     * associated with a token, then that token is destructively modified
     * by this operation. If not, then a new token is constructed with
     * the type {@link Token#INVALID_TYPE} and the given text.
     *
     * @param text the new token text
     */
    public void setText(String text) {
        if (myOptToken == null) {
            initialize(Token.INVALID_TYPE, text);
        } else {
            myOptToken.setText(text);
        }
    }

    /**
     * Set the token type for this node. If this instance is already
     * associated with a token, then that token is destructively modified
     * by this operation. If not, then a new token is constructed with
     * the given type and an empty (<code>""</code>, not <code>null</code>)
     * text string.
     *
     * @param type the new token type
     */
    public void setType(int type) {
        if (myOptToken == null) {
            initialize(type, "");
        } else {
            myOptToken.setType(type);
        }
    }

    public AstroTag getTag() {
        return myOptToken.getTag();
    }

    public short getOptTagCode() {
        return myOptToken.getOptTagCode();
    }

    public Object getOptData() {
        return myOptToken.getOptData();
    }

    public String getOptString() {
        return ((Twine)getOptData()).bare();
    }

    public Object getOptArgData() {
        return ((AstroAST)getFirstChild()).getOptData();
    }

    public Object getOptArgData(short tagCode) {
        T.require(getTag().getOptTagCode() == tagCode,
                  "Tag mismatch: ", getTag(), " vs ",
                  getTag().getSchema().getOptTagForCode(tagCode));
        return getOptArgData();
    }

    public String getOptArgString(short tagCode) {
        return ((Twine)getOptArgData(tagCode)).bare();
    }

    public Twine getSource() {
        return myOptToken.getSource();
    }

    public ConstList getArgs() {
        return myOptToken.getArgs();
    }

    public Astro withoutArgs() {
        if (null == getFirstChild()) {
            return this;
        } else {
            return new AstroAST(myOptToken);
        }
    }

    public Astro withArgs(ConstList args) {
        T.require(null == getFirstChild(),
                  "Must be a leaf: ", this);
        int len = args.size();
        if (0 == len) {
            return this;
        } else {
            AstroAST result = new AstroAST(myOptToken);
            for (int i = 0; i < len; i++) {
                result.addChild((AstroAST)args.get(i));
            }
            return result;
        }
    }
}



1.1                  e/src/jsrc/org/quasiliteral/antlr/AstroLexerSharedInputState.java

Index: AstroLexerSharedInputState.java
===================================================================
package org.quasiliteral.antlr;

import antlr.LexerSharedInputState;

import java.io.InputStream;

/**
 * Extension of {@link LexerSharedInputState} that is aware of
 * file names and can annotate {@link ExtentTokens} with them and
 * with end position information.
 *
 * <p>This file is in the public domain.</p>
 *
 * @author based on Dan Bornstein's ExtentLexerSharedInputState
 * @author Mark Miller
 */
public class AstroLexerSharedInputState extends LexerSharedInputState {

    /** the name of the file this instance refers to */
    private String mySourceURL;

    /**
     * Construct an instance.
     *
     * @param s the input stream to use
     * @param url The file name to associate with this instance
     */
    public AstroLexerSharedInputState(InputStream s, String url) {
        super(s);
        mySourceURL = url;
    }

    /**
     * Construct an instance. The file name is set to <code>null</code>
     * initially.
     *
     * @param s the input stream to use
     */
    public AstroLexerSharedInputState(InputStream s) {
        this(s, null);
    }

    public String toString() {
        if (null == mySourceURL) {
            return "<AstroLexerSharedInputState>";
        } else {
            return "<AstroLexerSharedInputState:" + mySourceURL + ">";
        }
    }

    /**
     * Get the current line of this instance.
     *
     * @return the current line number
     */
    public int getLine() {
        return line;
    }

    /**
     * Get the current column of this instance.
     *
     * @return the current column number
     */
    public int getColumn() {
        return column;
    }

    /**
     * Get the file name of this instance.
     *
     * @return The file name
     */
    public String getSourceURL() {
        return mySourceURL;
    }

    /**
     * Annotate an {@link AstroToken} based on this instance. It sets
     * the end position information as well as the file name.
     *
     * @param token non-null; the token to annotate
     */
    public void annotate(AstroToken token) {
        //XXX does nothing yet.
    }
}



1.1                  e/src/jsrc/org/quasiliteral/antlr/AstroToken.java

Index: AstroToken.java
===================================================================
package org.quasiliteral.antlr;

import antlr.Token;
import org.erights.e.develop.assertion.T;
import org.erights.e.elib.base.SourceSpan;
import org.erights.e.elib.tables.ConstList;
import org.erights.e.elib.tables.EmptyTwine;
import org.erights.e.elib.tables.Twine;
import org.quasiliteral.astro.Astro;
import org.quasiliteral.astro.AstroBuilder;
import org.quasiliteral.astro.AstroSchema;
import org.quasiliteral.astro.AstroTag;

/**
 * A Kind of Antlr {@link Token} that preserves all the information in a
 * {@link Functor}.
 * <p>
 * In keeping with the nature of an Antlr Token, and in order to be usable
 * from within Antlr itself, AstroToken is mutable, but just mutable enough
 * to accomodate Antlr.  Specifically, the various values are settable once.
 *
 * @author <a href="mailto:markm@caplet.com">Mark S Miller</a>
 * @author Based on ValueExtentToken by Danfuzz Bornstein
 */
public class AstroToken extends Token implements Astro {

    /**
     *
     */
    private AstroTag myOptTag;

    /**
     * Must be a null, {@link Character}, {@link BigInteger}, {@link Double},
     * {@link String}, or {@link Twine}.  If not null, then the type must
     * correspond to the tag.
     */
    private final Object myOptData;

    /**
     *
     */
    private Twine myOptSource;

    /**
     * Construct an instance.
     * <p>
     * The instance will have the tag code -1, and have empty (<code>""</code>,
     * not <code>null</code>) source twine.
     */
    public AstroToken() {
        super();
        myOptData = null;
    }

    /**
     * Makes a AstroToken that represents a token in some grammar.
     * <p>
     * The invariants of an AstroToken are not checked here, but rather are
     * enforced by the callers in this class and in ASTBuilder.
     *
     * @param tag Identifies a token type in a particular grammar or set
     *            of related grammars.
     * @param optData null, {@link Character},
     *                {@link BigInteger}, {@link Double},
     *                or {@link Twine} presumably calculated
     *                from lexing this token
     * @param source The source text this token was extracted from.  To
     *               provide no info, use "" rather than null.
     */
    /*package*/
    AstroToken(AstroTag tag, Object optData, Twine source) {
        super(AstroTag.tagCode2typeCode(tag.getOptTagCode()));
        myOptTag = tag;
        myOptData = optData;
        setSource(source);
    }

    /**
     *
     */
    public Astro build(AstroBuilder builder) {
        AstroSchema schema = builder.getSchema();
        if (null == myOptData) {
            return builder.leafTag(getTag(), myOptSource);
        } else if (getTag().isTagForData(myOptData)) {
            return builder.leafData(myOptData, myOptSource);
        } else {
            return builder.composite(getTag(), myOptData, myOptSource);
        }
    }

    /**
     * Since not all {@link Token}s are AstroTokens, this static method
     * provides the equivalent of the build/1 instance method for Tokens in
     * general.
     * <p>
     * In the understanding of non-Astro Tokens used here, they are considered
     * to have no data.
     * <p>
     * XXX This should probably be made into a sugar-instance-method of Token.
     */
    static public Astro build(Token self, AstroBuilder builder) {
        if (self instanceof AstroToken) {
            return ((AstroToken)self).build(builder);
        } else {
            SourceSpan span = new SourceSpan("<unknown>",
                                             false,
                                             self.getLine(),
                                             self.getColumn(),
                                             self.getLine(),
                                             self.getColumn());
            short tagCode = AstroTag.typeCode2tagCode(self.getType());
            AstroTag tag = builder.getSchema().getTagForCode(tagCode);
            return builder.leafTag(tag,
                                   Twine.fromString(self.getText(), span));
        }
    }

    /**
     *
     */
    public AstroTag getTag() {
        T.require(null != myOptTag, "Tag must first be set: ", this);
        return myOptTag;
    }

    /**
     * For when the type-code is already set by generic Antlr code, while
     * Astro-specific knowledge of the schema comes along later.
     * <p>
     * To use this, the type code must already be set, and the tag must not
     * yet be set.
     */
    public void setSchema(AstroSchema schema) {
        T.require(null == myOptTag, "Tag already set");
        T.require(INVALID_TYPE != getType(), "Type-code not yet set");
        myOptTag = schema.getTagForCode(getOptTagCode());
    }

    /**
     * Override to make set-once
     */
    public void setType(int t) {
        T.require(INVALID_TYPE == getType(), "Type-code already set");
        super.setType(t);
    }

    public short getOptTagCode() {
        return AstroTag.typeCode2tagCode(getType());
    }

    /**
     * If this token represents literal data, return that data,
     * else null.
     */
    public Object getOptData() {
        if (getTag().isTagForData(myOptData)) {
            return myOptData;
        } else {
            //the data will be in args[0].  Or it can be directly accessed
            //with getArgData()
            return null;
        }
    }

    public String getOptString() {
        return ((Twine)getOptData()).bare();
    }

    /**
     *
     */
    public Object getOptArgData() {
        T.require(!(getTag().isTagForData(myOptData)),
                  "Not a composite: ", this);
        return myOptData;
    }

    public Object getOptArgData(short tagCode) {
        T.require(getTag().getOptTagCode() == tagCode,
                  "Tag mismatch: ", getTag(), " vs ",
                  getTag().getSchema().getOptTagForCode(tagCode));
        return getOptArgData();
    }

    public String getOptArgString(short tagCode) {
        return ((Twine)getOptArgData(tagCode)).bare();
    }

    /**
     *
     */
    public Twine getSource() {
        if (null == myOptSource) {
            return EmptyTwine.THE_ONE;
        } else {
            return myOptSource;
        }
    }

    /**
     * If 'source' has source-span info, then setSource also sets line and
     * column.
     * <p>
     * If the line&column info are already set, and if 'source' is bare, then
     * 'setSource' should pick up source-span info from line and column and
     * apply it to the source.  XXX bug: Currently, however, if line&column
     * are already set at the time 'setSource' is called, an exception is
     * thrown.
     */
    public void setSource(Twine source) {
        T.require(null == myOptSource, "Source already set");
        myOptSource = source;
    }

    /**
     *
     */
    public String getText() {
        if (null == myOptSource) {
            return null;
        } else {
            return myOptSource.bare();
        }
    }

    /**
     *
     */
    public int getLine() {
        if (null == myOptSource) {
            return 0;
        }
        SourceSpan optSpan = myOptSource.optSourceSpan();
        if (null == optSpan) {
            return 0;
        }
        return optSpan.getStartLine();
    }

    /**
     * Override to make set-once, and so set the source-span info of
     * myOptSource
     */
    public void setLine(int l) {
        T.require(getLine() == 0, "Line already set");
        throw new RuntimeException("XXX setLine not yet implemented");
    }

    /**
     *
     */
    public int getColumn() {
        if (null == myOptSource) {
            return 0;
        }
        SourceSpan optSpan = myOptSource.optSourceSpan();
        if (null == optSpan) {
            return 0;
        }
        return optSpan.getStartCol();
    }

    /**
     * Override to make set-once, and so set the source-span info of
     * myOptSource
     */
    public void setColumn(int c) {
        T.require(getColumn() == 0, "Column already set");
        throw new RuntimeException("XXX setColumn not yet implemented");
    }

    /**
     * Override to make set-once, and to set myOptSource
     */
    public void setText(String s) {
        T.require(null == myOptSource, "Source already set");
        setSource(Twine.fromString(s));
    }

    /**
     *
     */
    public ConstList getArgs() {
        if (getTag().isTagForData(myOptData)) {
            return ConstList.EmptyList;
        } else {
            AstroSchema schema = getTag().getSchema();
            AstroTag litTag = schema.getTypeTag(myOptData.getClass());
            Astro arg = new AstroToken(litTag, myOptData, getSource());
            return ConstList.EmptyList.with(arg);
        }
    }

    /**
     *
     */
    public Astro withoutArgs() {
        if (getTag().isTagForData(myOptData)) {
            return this;
        } else {
            return new AstroToken(getTag(), null, getSource());
        }
    }

    /**
     *
     */
    public Astro withArgs(ConstList args) {
        return new AstroAST(this).withArgs(args);
    }
}



1.8       +9 -8      e/src/jsrc/org/quasiliteral/astro/AstroTag.java

Index: AstroTag.java
===================================================================
RCS file: /cvs/e/src/jsrc/org/quasiliteral/astro/AstroTag.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- AstroTag.java	2001/12/10 20:30:09	1.7
+++ AstroTag.java	2001/12/18 05:24:44	1.8
@@ -1,6 +1,6 @@
 package org.quasiliteral.astro;
 
-import org.erights.e.elib.prim.E;
+import org.erights.e.develop.assertion.T;
 import org.erights.e.elib.serial.PassByConstruction;
 import org.erights.e.elib.serial.Persistent;
 import org.erights.e.elib.tables.Twine;
@@ -37,14 +37,14 @@
      * {@link Token#INVALID_TYPE}
      */
     static public int tagCode2typeCode(short tagCode) {
-        return tagCode +1;
+        return tagCode + 1;
     }
 
     /**
      *
      */
     static public short typeCode2tagCode(int typeCode) {
-        return (short)(typeCode -1);
+        return (short)(typeCode - 1);
     }
 
     /**
@@ -161,15 +161,16 @@
      * @param optDataType Either null, or the kind of data labeled by this
      *                    tag.
      */
-    /*package*/ AstroTag(short optTagCode,
-                         String tagName,
-                         AstroSchema optSchema,
-                         Class optDataType) {
+    /*package*/
+    AstroTag(short optTagCode,
+             String tagName,
+             AstroSchema optSchema,
+             Class optDataType) {
         myOptTagCode = optTagCode;
         myTagName = tagName.intern();
         mySchema = (null == optSche