Test suite

duchier at ps.uni-sb.de duchier at ps.uni-sb.de
Thu May 26 13:00:00 CEST 2005


I can confirm that the bug gets triggered on branch mozart-1-3-0-fixes, but not
in release mozart-1-3-1.  I am attaching the relevant diff below (minus doc
related chunks); it is not big; the main change seems to concern dictionaries.
Kostja, since you wrote that code, could you have a quick look at it again, just
in case you can spot a problem by looking at the diff?

-------------- next part --------------
Index: contrib/os/open.oz
===================================================================
RCS file: /services/mozart/CVS/mozart/contrib/os/open.oz,v
retrieving revision 1.5
retrieving revision 1.5.16.1
diff -u -r1.5 -r1.5.16.1
--- contrib/os/open.oz	27 Aug 1998 00:50:23 -0000	1.5
+++ contrib/os/open.oz	27 Jul 2004 15:12:43 -0000	1.5.16.1
@@ -38,7 +38,7 @@
 \endif
 
       class IOBase
-	 prop native locking
+	 prop locking
 	 attr
 	    !ReadFD	: unit
 	    !ReadLock
Index: platform/emulator/builtins.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/builtins.cc,v
retrieving revision 1.778
retrieving revision 1.778.2.1
diff -u -r1.778 -r1.778.2.1
--- platform/emulator/builtins.cc	8 Apr 2004 01:11:20 -0000	1.778
+++ platform/emulator/builtins.cc	15 Feb 2005 13:33:16 -0000	1.778.2.1
@@ -20,8 +20,8 @@
  *    Christian Schulte, 1997
  * 
  *  Last change:
- *    $Date: 2004/04/08 01:11:20 $ by $Author: popow $
- *    $Revision: 1.778 $
+ *    $Date: 2005/02/15 13:33:16 $ by $Author: raph $
+ *    $Revision: 1.778.2.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -3132,6 +3132,8 @@
 
 #ifdef VAR_PORT
 
+// raph: This implementation is DEPRECATED.  The new builtin
+// BInewPort has now 0 inputs and 2 outputs.
 OZ_BI_define(BInewPort,1,1)
 {
   oz_declareIN(0,val);
@@ -3152,13 +3154,14 @@
 
 #else
 
-OZ_BI_define(BInewPort,1,1)
+OZ_BI_define(BInewPort,0,2)
 {
   OZ_Term strm = oz_newReadOnly(oz_currentBoard());
   OZ_Term port = oz_newPort(strm);
   
-  OZ_out(0)= port;
-  return oz_unify(OZ_in(0),strm);
+  OZ_out(0)= strm;
+  OZ_out(1)= port;
+  return PROCEED;
 } OZ_BI_end
 
 #define FAST_DOPORTSEND
Index: platform/emulator/cac.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/cac.cc,v
retrieving revision 1.76
retrieving revision 1.76.2.2
diff -u -r1.76 -r1.76.2.2
--- platform/emulator/cac.cc	6 Apr 2004 12:27:38 -0000	1.76
+++ platform/emulator/cac.cc	11 Aug 2004 14:49:03 -0000	1.76.2.2
@@ -15,8 +15,8 @@
  *    Organization or Person (Year(s))
  * 
  *  Last change:
- *    $Date: 2004/04/06 12:27:38 $ by $Author: popow $
- *    $Revision: 1.76 $
+ *    $Date: 2004/08/11 14:49:03 $ by $Author: popow $
+ *    $Revision: 1.76.2.2 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -552,9 +552,8 @@
   ret->nextGCStep();
   // an alive board must be copied at every GC step exactly once:
   Assert(ret->isEqGCStep(oz_getGCStep()));
-#else
-  ret->setCopyStep(oz_getCopyStep());
 #endif
+  ret->setCopyStep(oz_getCopyStep());
 
   cacStack.push(ret, PTR_BOARD);
 
@@ -764,52 +763,54 @@
   } else {
     // construct anew, GC"ing keys/values along;
     //
-    int oldSize, newSize;
-    DictNode* old;
-
-    //
-    oldSize = dictHTSizes[sizeIndex];
-    old = table;
+    const int tableSize = dictHTSizes[sizeIndex];
 
     // can be zero too:
-    int tableSize = (int) ((double) entries * GDT_IDEALENTRIES);
-    Assert(tableSize < oldSize);
-    sizeIndex--;
-    while (sizeIndex >= 0 && dictHTSizes[sizeIndex] >= tableSize)
-      sizeIndex--;
-    Assert(sizeIndex < 0 || dictHTSizes[sizeIndex] < tableSize);
-    sizeIndex++;
-    Assert(sizeIndex >= 0 && dictHTSizes[sizeIndex] >= tableSize);
+    int newTableSize = (int) ((double) entries / GDT_IDEALENTRIES);
+    int newSizeIndex = sizeIndex - 1;
+    DictNode* old = table;
+
+    //
+    Assert(newTableSize < tableSize);
+    while (newSizeIndex >= 0 && dictHTSizes[newSizeIndex] >= newTableSize)
+      newSizeIndex--;
+    Assert(newSizeIndex < 0 || dictHTSizes[newSizeIndex] < newTableSize);
+    newSizeIndex++;
+    Assert(newSizeIndex >= 0 && dictHTSizes[newSizeIndex] >= newTableSize);
     // Must not oscillate:
-    Assert(dictHTSizes[sizeIndex] < oldSize);
+    Assert(dictHTSizes[newSizeIndex] < tableSize);
     // Next GC should not attempt compactification:
-    Assert(entries >= (dictHTSizes[sizeIndex] / GDT_MINFULL));
+    Assert(entries >= (dictHTSizes[newSizeIndex] / GDT_MINFULL));
 
     // construct the table anew (keep the 'entries' counter);
-    tableSize = dictHTSizes[sizeIndex];
-    maxEntries = (int) (GDT_MAXENTRIES * tableSize);
-    table = (DictNode *) oz_heapMalloc(tableSize * sizeof(DictNode));
-    for (int i = tableSize; i--; )
-      (void) new (&table[i]) DictNode;
+    newTableSize = dictHTSizes[newSizeIndex];
+
+    //
+    DictHashTable *dht = new DictHashTable(*this);
+    // 'entries' copied;
+    an = (DictNode *) oz_heapMalloc(newTableSize * sizeof(DictNode));
+    for (int i = newTableSize; i--; )
+      (void) new (&an[i]) DictNode;
+    dht->table = an;
+    dht->sizeIndex = newSizeIndex;
+    dht->maxEntries = (int) (GDT_MAXENTRIES * newTableSize);
 
     //
-    for (int i = oldSize; i--; old++) {
+    for (int i = tableSize; i--; old++) {
       if (!old->isEmpty()) {
 	if (!old->isPointer()) {
-	  _cacDictEntry(old);
+	  dht->_cacDictEntry(old);
 	} else {
 	  DictNode *sptr = old->getDictNodeSPtr();
 	  DictNode *eptr = old->getDictNodeEPtr();
 	  do {
-	    _cacDictEntry(sptr++);
+	    dht->_cacDictEntry(sptr++);
 	  } while (sptr < eptr);
 	}
       }
     }
 
     //      
-    DictHashTable *dht = new DictHashTable(*this);
-    dht->table = table;
     return (dht);
   }
   Assert(0);
Index: platform/emulator/componentBuffer.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/componentBuffer.cc,v
retrieving revision 1.29
retrieving revision 1.29.12.1
diff -u -r1.29 -r1.29.12.1
--- platform/emulator/componentBuffer.cc	12 Mar 2002 00:31:50 -0000	1.29
+++ platform/emulator/componentBuffer.cc	11 Aug 2004 14:49:03 -0000	1.29.12.1
@@ -13,8 +13,8 @@
  *    Konstantin Popov 2001
  * 
  *  Last change:
- *    $Date: 2002/03/12 00:31:50 $ by $Author: popow $
- *    $Revision: 1.29 $
+ *    $Date: 2004/08/11 14:49:03 $ by $Author: popow $
+ *    $Revision: 1.29.12.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -277,7 +277,12 @@
 {
   Assert(pbState == PB_Unmarshal);
   DebugCode(pbState = PB_None;);
-  Assert(posMB == last->head() + lastChunkSize);
+  // If zero bytes where read in the last chunk (or, differently put,
+  // the last non-empty chunk was full) - then that last chunk will
+  // never be reached, so 'posMB' will never point to it - because
+  // 'getNext()' advances 'posMB' to a next buffer only when it is
+  // really necessary.
+  Assert(lastChunkSize == 0 || posMB == last->head() + lastChunkSize);
   DebugCode(posMB = (BYTE *) -1;);
   DebugCode(endMB = (BYTE *) -1;);
 }
Index: platform/emulator/dictionary.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/dictionary.cc,v
retrieving revision 1.40
retrieving revision 1.40.4.1
diff -u -r1.40 -r1.40.4.1
--- platform/emulator/dictionary.cc	9 Dec 2003 09:09:34 -0000	1.40
+++ platform/emulator/dictionary.cc	15 Jul 2004 18:56:35 -0000	1.40.4.1
@@ -11,8 +11,8 @@
  *    Konstantin Popov, 2002
  * 
  *  Last change:
- *    $Date: 2003/12/09 09:09:34 $ by $Author: duchier $
- *    $Revision: 1.40 $
+ *    $Date: 2004/07/15 18:56:35 $ by $Author: popow $
+ *    $Revision: 1.40.4.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -214,7 +214,7 @@
   oldEntries = entries;
 
   // can be zero too:
-  int tableSize = (int) ((double) entries * GDT_IDEALENTRIES);
+  int tableSize = (int) ((double) entries / GDT_IDEALENTRIES);
   Assert(tableSize < oldSize);
   sizeIndex--;
   while (sizeIndex >= 0 && dictHTSizes[sizeIndex] >= tableSize)
@@ -345,7 +345,7 @@
   DictNode* acc = out;
 
   //
-  for (int i = dictHTSizes[sizeIndex], ai = 0; i--; ) {
+  for (int i = dictHTSizes[sizeIndex]; i--; ) {
     DictNode* n = &table[i];
     if (!n->isEmpty()) {
       if (!n->isPointer()) {
@@ -429,6 +429,7 @@
 	}
       }
     }
+    Assert(ai == entries);
 
     //
     Order_TaggedRef_By_Feat lt;
@@ -480,6 +481,28 @@
   }
 }
 
+#if defined(DEBUG_CHECK)
+void DictHashTable::verify()
+{
+  int tableSize = dictHTSizes[sizeIndex];
+  int acc = 0;
+
+  for (int i = tableSize; i--; ) {
+    DictNode *n = &table[i];
+    if (!n->isEmpty()) {
+      if (!n->isPointer()) {
+	acc++;
+      } else {
+	DictNode *sptr = n->getDictNodeSPtr();
+	DictNode *eptr = n->getDictNodeEPtr();
+	acc += eptr - sptr;
+      }
+    }
+  }
+  Assert(acc == entries);
+}
+#endif
+
 //  OZ_Term DictHashTable::htFindOutline(OZ_Term key)
 //  {
 //    return (htFind(key));
Index: platform/emulator/dictionary.hh
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/dictionary.hh,v
retrieving revision 1.44
retrieving revision 1.44.8.1
diff -u -r1.44 -r1.44.8.1
--- platform/emulator/dictionary.hh	17 May 2003 13:20:38 -0000	1.44
+++ platform/emulator/dictionary.hh	15 Jul 2004 18:56:35 -0000	1.44.8.1
@@ -11,8 +11,8 @@
  *    Konstantin Popov, 2002
  * 
  *  Last change:
- *    $Date: 2003/05/17 13:20:38 $ by $Author: duchier $
- *    $Revision: 1.44 $
+ *    $Date: 2004/07/15 18:56:35 $ by $Author: popow $
+ *    $Revision: 1.44.8.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -629,6 +629,10 @@
   //
   DictHashTable* gCollect(void);
   DictHashTable* sClone(void);
+
+#if defined(DEBUG_CHECK)
+  void verify();
+#endif
 };
   
 
Index: platform/emulator/mem.hh
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/mem.hh,v
retrieving revision 1.94
retrieving revision 1.94.8.1
diff -u -r1.94 -r1.94.8.1
--- platform/emulator/mem.hh	6 May 2003 08:56:47 -0000	1.94
+++ platform/emulator/mem.hh	30 Jan 2005 10:36:54 -0000	1.94.8.1
@@ -11,8 +11,8 @@
  *    Organization or Person (Year(s))
  * 
  *  Last change:
- *    $Date: 2003/05/06 08:56:47 $ by $Author: popow $
- *    $Revision: 1.94 $
+ *    $Date: 2005/01/30 10:36:54 $ by $Author: glynn $
+ *    $Revision: 1.94.8.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -125,8 +125,7 @@
    *
    */
 
- retry:
-  {
+  while(TRUE) {
     Assert(oz_isHeapAligned(_oz_heap_cur));
     size_t a_sz = oz_alignSize(sz);
 
@@ -142,7 +141,7 @@
     /* _oz_heap_cur might be negative!! */
     if (((unsigned long) _oz_heap_end) > ((unsigned long) _oz_heap_cur)) {
       _oz_getNewHeapChunk(a_sz);
-      goto retry;
+      continue;
     }
 
     return (void*) _oz_heap_cur;
Index: platform/emulator/modPort.spec
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/modPort.spec,v
retrieving revision 1.8
retrieving revision 1.8.12.1
diff -u -r1.8 -r1.8.12.1
--- platform/emulator/modPort.spec	21 Aug 2002 10:18:19 -0000	1.8
+++ platform/emulator/modPort.spec	15 Feb 2005 13:33:16 -0000	1.8.12.1
@@ -8,8 +8,8 @@
 ###   Christian Schulte, 1998
 ###
 ### Last change:
-###   $Date: 2002/08/21 10:18:19 $ by $Author: duchier $
-###   $Revision: 1.8 $
+###   $Date: 2005/02/15 13:33:16 $ by $Author: raph $
+###   $Revision: 1.8.12.1 $
 ###
 ### This file is part of Mozart, an implementation 
 ### of Oz 3:
@@ -30,8 +30,8 @@
 		     out => ['+bool'],
 		     bi  => BIisPort},
 
-     'new'	=> { in  => ['list'],
-		     out => ['+port'],
+     'new'	=> { in  => [],
+		     out => ['list','+port'],
 		     BI  => BInewPort},
 
      'send'	=> { in  => ['+port','value'],
Index: platform/emulator/namer.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/namer.cc,v
retrieving revision 1.14
retrieving revision 1.14.12.1
diff -u -r1.14 -r1.14.12.1
--- platform/emulator/namer.cc	2 Aug 2002 20:20:44 -0000	1.14
+++ platform/emulator/namer.cc	30 Jan 2005 10:39:10 -0000	1.14.12.1
@@ -8,8 +8,8 @@
  *    Organization or Person (Year(s))
  * 
  *  Last change:
- *    $Date: 2002/08/02 20:20:44 $ by $Author: popow $
- *    $Revision: 1.14 $
+ *    $Date: 2005/01/30 10:39:10 $ by $Author: glynn $
+ *    $Revision: 1.14.12.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -30,10 +30,11 @@
 //-----------------------------------------------------------------------------
 // naming variables
 
+template class Namer<OZ_Term, const char *>;
+
 typedef Namer<OZ_Term, const char *> VarNamer;
-template VarNamer;
 
-VarNamer * VarNamer::_head;
+template <> VarNamer * VarNamer::_head = NULL;
 
 VarNamer varNamer; 
 
@@ -94,10 +95,11 @@
 //-----------------------------------------------------------------------------
 // naming propagators
 
-typedef Namer<Propagator *, OZ_Term> PropNamer;
-template PropNamer;
+template class Namer<Propagator *, OZ_Term>;
+
+typedef class Namer<Propagator *, OZ_Term> PropNamer;
 
-PropNamer * PropNamer::_head;
+template <> PropNamer * PropNamer::_head = NULL;
 
 PropNamer propNamer; 
 
Index: platform/emulator/namer.hh
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/namer.hh,v
retrieving revision 1.8
retrieving revision 1.8.18.1
diff -u -r1.8 -r1.8.18.1
--- platform/emulator/namer.hh	2 Jun 1999 22:46:32 -0000	1.8
+++ platform/emulator/namer.hh	30 Jan 2005 10:39:10 -0000	1.8.18.1
@@ -8,8 +8,8 @@
  *    Organization or Person (Year(s))
  * 
  *  Last change:
- *    $Date: 1999/06/02 22:46:32 $ by $Author: schulte $
- *    $Revision: 1.8 $
+ *    $Date: 2005/01/30 10:39:10 $ by $Author: glynn $
+ *    $Revision: 1.8.18.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -123,7 +123,6 @@
 public:
   Namer(void) { 
     GCMeManager::registerObject(this);
-    _head = NULL; 
   }
   static Namer<T_INDEX, T_NAME> * getHead(void) { return _head; }
   static T_NAME getName(T_INDEX index) {
Index: platform/emulator/urlc.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/urlc.cc,v
retrieving revision 1.40
retrieving revision 1.40.18.1
diff -u -r1.40 -r1.40.18.1
--- platform/emulator/urlc.cc	15 Sep 2000 06:54:21 -0000	1.40
+++ platform/emulator/urlc.cc	19 May 2005 17:48:45 -0000	1.40.18.1
@@ -9,8 +9,8 @@
  *    Organization or Person (Year(s))
  * 
  *  Last change:
- *    $Date: 2000/09/15 06:54:21 $ by $Author: annan $
- *    $Revision: 1.40 $
+ *    $Date: 2005/05/19 17:48:45 $ by $Author: duchier $
+ *    $Revision: 1.40.18.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -203,7 +203,7 @@
 /* characters not to be escaped in HTTP requests.
    if I well understood RFC 1945! ##
    */
-static char URLC_hs[] = "%:@&=+$-_.!*'(),;/?";
+static char URLC_hs[] = "%:@&=+$-_.!*'(),;/?#";
 
 /* throw simulators */
 #define th1(reason) { clean(); return (reason); }
Index: platform/emulator/var_ct.hh
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/var_ct.hh,v
retrieving revision 1.27
retrieving revision 1.27.4.1
diff -u -r1.27 -r1.27.4.1
--- platform/emulator/var_ct.hh	18 Dec 2003 15:12:41 -0000	1.27
+++ platform/emulator/var_ct.hh	30 Jan 2005 10:39:54 -0000	1.27.4.1
@@ -9,8 +9,8 @@
  *    Organization or Person (Year(s))
  *
  *  Last change:
- *    $Date: 2003/12/18 15:12:41 $ by $Author: raph $
- *    $Revision: 1.27 $
+ *    $Date: 2005/01/30 10:39:54 $ by $Author: glynn $
+ *    $Revision: 1.27.4.1 $
  *
  *  This file is part of Mozart, an implementation
  *  of Oz 3:
@@ -38,7 +38,7 @@
   friend class OzVariable;
   friend void constrainGlobalVar(OZ_Term *, OZ_Ct *);
   friend OZ_Return tellBasicConstraint(OZ_Term, OZ_Ct *, OZ_CtDefinition *);
-  friend OZ_Boolean OZ_CtVar::tell(void);
+  friend class OZ_CtVar;
   friend void addSuspCtVar(OZ_Term , Suspendable * , OZ_CtWakeUp);
 
 private:
Index: platform/emulator/libdp/comObj.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/libdp/comObj.cc,v
retrieving revision 1.56
retrieving revision 1.56.8.2
diff -u -r1.56 -r1.56.8.2
--- platform/emulator/libdp/comObj.cc	28 Apr 2003 12:32:28 -0000	1.56
+++ platform/emulator/libdp/comObj.cc	22 Feb 2005 14:25:31 -0000	1.56.8.2
@@ -7,8 +7,8 @@
  *  Copyright:
  * 
  *  Last change:
- *    $Date: 2003/04/28 12:32:28 $ by $Author: glynn $
- *    $Revision: 1.56 $
+ *    $Date: 2005/02/22 14:25:31 $ by $Author: valentin $
+ *    $Revision: 1.56.8.2 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -376,8 +376,15 @@
   localRef=FALSE;
   if(hasNeed()) 
     return FALSE;
-  else if(remoteRef)
+  else if(remoteRef) {
+    if(!sentclearref && (state == WORKING)) {
+      MsgContainer *msgC=msgContainerManager->newMsgContainer(NULL);
+      msgC->put_C_CLEAR_REFERENCE();
+      send(msgC);
+      sentclearref=TRUE;
+    }
     return FALSE;
+  }
   else {
     switch(state) {
     case WORKING: {
Index: platform/emulator/libfd/card.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/libfd/card.cc,v
retrieving revision 1.28
retrieving revision 1.28.8.1
diff -u -r1.28 -r1.28.8.1
--- platform/emulator/libfd/card.cc	28 Apr 2003 12:32:28 -0000	1.28
+++ platform/emulator/libfd/card.cc	8 Feb 2005 16:45:09 -0000	1.28.8.1
@@ -9,8 +9,8 @@
  *    Organization or Person (Year(s))
  * 
  *  Last change:
- *    $Date: 2003/04/28 12:32:28 $ by $Author: glynn $
- *    $Revision: 1.28 $
+ *    $Date: 2005/02/08 16:45:09 $ by $Author: raph $
+ *    $Revision: 1.28.8.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -151,6 +151,8 @@
   sum_ops op = getSumOps(OZ_in(2));
 
   // wait for linearity
+  // raph: This is a fix for a bug in the propagator, which is
+  // apparently not correct in the non-linear case.
   OZ_EXPECT(pe, 1, expectVectorLinearVector);
 
   if (op == sum_ops_neq) {
Index: platform/emulator/libfd/complalldist.hh
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/libfd/complalldist.hh,v
retrieving revision 1.16
retrieving revision 1.16.8.1
diff -u -r1.16 -r1.16.8.1
--- platform/emulator/libfd/complalldist.hh	16 May 2003 10:18:42 -0000	1.16
+++ platform/emulator/libfd/complalldist.hh	30 Jan 2005 10:41:43 -0000	1.16.8.1
@@ -9,8 +9,8 @@
  *    Organization or Person (Year(s))
  * 
  *  Last change:
- *    $Date: 2003/05/16 10:18:42 $ by $Author: duchier $
- *    $Revision: 1.16 $
+ *    $Date: 2005/01/30 10:41:43 $ by $Author: glynn $
+ *    $Revision: 1.16.8.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -213,7 +213,7 @@
 #endif
   }
 
-  list<T> (list<T> &E) :generic() {
+  list<T> (const list<T> &E) :generic() {
     dlink<T> *p = E.root;
     dlink<T> *q = NULL;
     dlink<T> *r = NULL;
@@ -873,8 +873,8 @@
 
 /* ------------------------------------------------------------------------ */
 
-inline list<edge> graph::MAX_CARD_BIPARTITE_MATCHING(const list<node>& A, 
-					      const list<node>& B ) {
+  inline list<edge> graph::MAX_CARD_BIPARTITE_MATCHING(const list<node>& A, 
+	 				               const list<node>& B ) {
 
   // G is a bipartite graph with sides A and B, all edges must be directed 
   // from A to B. We compute a matching of maximum cardinality using the 
Index: platform/emulator/libfd/fdaux.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/libfd/fdaux.cc,v
retrieving revision 1.12
retrieving revision 1.12.10.1
diff -u -r1.12 -r1.12.10.1
--- platform/emulator/libfd/fdaux.cc	17 Oct 2002 13:01:44 -0000	1.12
+++ platform/emulator/libfd/fdaux.cc	30 Jan 2005 10:42:35 -0000	1.12.10.1
@@ -9,8 +9,8 @@
  *    Organization or Person (Year(s))
  * 
  *  Last change:
- *    $Date: 2002/10/17 13:01:44 $ by $Author: popow $
- *    $Revision: 1.12 $
+ *    $Date: 2005/01/30 10:42:35 $ by $Author: glynn $
+ *    $Revision: 1.12.10.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -28,8 +28,8 @@
 
 #include "fdaux.hh"
 
-template _OZ_ParamIterator<OZ_Return>;
-template PropagatorController_V_V;
+template class _OZ_ParamIterator<OZ_Return>;
+template class _PropagatorController_V_V<OZ_Return,OZ_FDIntVar,PROCEED,FAILED,SLEEP>;
 
 //-----------------------------------------------------------------------------
 // convert vector to C++ arrays
Index: platform/emulator/libfd/pel_fncts.hh
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/libfd/pel_fncts.hh,v
retrieving revision 1.11
retrieving revision 1.11.10.1
diff -u -r1.11 -r1.11.10.1
--- platform/emulator/libfd/pel_fncts.hh	17 Oct 2002 13:01:44 -0000	1.11
+++ platform/emulator/libfd/pel_fncts.hh	30 Jan 2005 10:40:51 -0000	1.11.10.1
@@ -9,8 +9,8 @@
  *    Organization or Person (Year(s))
  *
  *  Last change:
- *    $Date: 2002/10/17 13:01:44 $ by $Author: popow $
- *    $Revision: 1.11 $
+ *    $Date: 2005/01/30 10:40:51 $ by $Author: glynn $
+ *    $Revision: 1.11.10.1 $
  *
  *  This file is part of Mozart, an implementation
  *  of Oz 3:
@@ -46,8 +46,8 @@
   }
   //
   void print(ENGINE &e) {
-    // kost@ : this code does NOT insntatiate!
-    // I've simpliefied it (below);
+    // kost@ : this code does NOT instantiate!
+    // I've simplified it (below);
     /*
     printf("LessEqOffset x(%s,%d) + c(%d) <= ",
 	   (*(FDVAR *) e[_x])->toString(), _x, _c);
@@ -79,15 +79,15 @@
     : PEL_LessEqOffset<ENGINE,FDVAR,PFDVAR>(y, -c+1, x) {}
   //
   void print(ENGINE &e) {
-    // kost@ : this code does NOT insntatiate!
-    // I've simpliefied it (below);
+    // kost@ : this code does NOT instantiate!
+    // I've simplified it (below);
     /*
     printf("GreaterOffset x(%s,%d) + c(%d) > ",
 	   (*(FDVAR *) e[_y])->toString(), _y, -_c+1);
     printf("y(%s,%d)\n", (*(FDVAR *) e[_x])->toString(), _x);
     */
-    printf("GreaterOffset x(,%d) + c(%d) > ", _y, -_c+1);
-    printf("y(,%d)\n", _x);
+    printf("GreaterOffset x(,%d) + c(%d) > ", this->_y, -(this->_c)+1);
+    printf("y(,%d)\n", this->_x);
   }
 };
 
@@ -132,9 +132,9 @@
 pf_return_t PEL_LessEqOffset<ENGINE, FDVAR, PFDVAR>::propagate(PEL_Engine &e)
 {
   //
-  FDVAR &x = *(FDVAR *) e[_x];
-  int c = _c;
-  FDVAR &y = *(FDVAR *) e[_y];
+  FDVAR &x = *(FDVAR *) e[this->_x];
+  int c = this->_c;
+  FDVAR &y = *(FDVAR *) e[this->_y];
   //
   _PropagatorController_V_V<int,
     FDVAR,pf_entailed,pf_failed,pf_sleep> iter(x, y);
Index: platform/emulator/libfd/pel_internal.hh
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/libfd/pel_internal.hh,v
retrieving revision 1.7
retrieving revision 1.7.10.1
diff -u -r1.7 -r1.7.10.1
--- platform/emulator/libfd/pel_internal.hh	13 Jan 2003 19:21:11 -0000	1.7
+++ platform/emulator/libfd/pel_internal.hh	30 Jan 2005 10:40:51 -0000	1.7.10.1
@@ -9,8 +9,8 @@
  *    Organization or Person (Year(s))
  *
  *  Last change:
- *    $Date: 2003/01/13 19:21:11 $ by $Author: bruni $
- *    $Revision: 1.7 $
+ *    $Date: 2005/01/30 10:40:51 $ by $Author: glynn $
+ *    $Revision: 1.7.10.1 $
  *
  *  This file is part of Mozart, an implementation
  *  of Oz 3:
@@ -88,14 +88,14 @@
 class EnlargeableArrayWithBase : public M {
 private:
   virtual void _gCollect(void) {
-    T * new_array = (T *) alloc(_size * sizeof(T));
+    T * new_array = (T *) this->alloc(_size * sizeof(T));
     for (int i = _size; i--; ) {
       new_array[i] = _array[i];
     }
     _array = new_array;
   }
   virtual void _sClone(void) {
-    T * new_array = (T *) alloc(_size * sizeof(T));
+    T * new_array = (T *) this->alloc(_size * sizeof(T));
     for (int i = _size; i--; ) {
       new_array[i] = _array[i];
     }
@@ -107,7 +107,7 @@
   //
   T * realloc(T * old, int old_n, int new_n) {
     if (old_n < new_n) {
-      T * _new = (T *) alloc(new_n * sizeof(T));
+      T * _new = (T *) this->alloc(new_n * sizeof(T));
       T * _old = old;
       for (int i = old_n; i--; ) {
 	_new[i] = _old[i];
@@ -131,7 +131,7 @@
   }
   //
   EnlargeableArrayWithBase(int s) : _size(s) {
-    _array = s > 0 ? (T *) alloc(s * sizeof(T)) : (T *) NULL;
+    _array = s > 0 ? (T *) this->alloc(s * sizeof(T)) : (T *) NULL;
   }
   //
   T &operator [](int i) {
@@ -148,9 +148,9 @@
   //
 public:
   int push(T &d) {
-    _array[_high] = d;
+    this->_array[_high] = d;
     _high += 1;
-    request(_high);
+    this->request(_high);
     return _high-1;
   }
   //
@@ -168,13 +168,13 @@
   ResizeableArray(void) : EnlargeableArrayWithBase<T,M>() { }
   //
   void resize(int new_size) {
-    if (new_size > _size) {
-      _array = realloc(_array, _size, new_size);
-      _size = new_size;
+    if (new_size > this->_size) {
+      this->_array = realloc(this->_array, this->_size, new_size);
+      this->_size = new_size;
     }
   }
   void reset(void) {
-    _size = 0;
+    this->_size = 0;
   }
 };
 
Index: platform/emulator/libfd/scheduling.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/libfd/scheduling.cc,v
retrieving revision 1.42
retrieving revision 1.42.10.1
diff -u -r1.42 -r1.42.10.1
--- platform/emulator/libfd/scheduling.cc	17 Oct 2002 13:01:44 -0000	1.42
+++ platform/emulator/libfd/scheduling.cc	30 Jan 2005 10:42:35 -0000	1.42.10.1
@@ -9,8 +9,8 @@
  *    Organization or Person (Year(s))
  * 
  *  Last change:
- *    $Date: 2002/10/17 13:01:44 $ by $Author: popow $
- *    $Revision: 1.42 $
+ *    $Date: 2005/01/30 10:42:35 $ by $Author: glynn $
+ *    $Revision: 1.42.10.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -32,7 +32,7 @@
 
 //-----------------------------------------------------------------------------
 #if !defined(MODULES_LINK_STATIC)
-template PropagatorController_V_V;
+template class _PropagatorController_V_V<OZ_Return,OZ_FDIntVar,PROCEED,FAILED,SLEEP>;
 #endif
 
 static inline int intMin(int a, int b) { return a < b ? a : b; }
Index: platform/emulator/libfset/fsaux.cc
===================================================================
RCS file: /services/mozart/CVS/mozart/platform/emulator/libfset/fsaux.cc,v
retrieving revision 1.19
retrieving revision 1.19.8.1
diff -u -r1.19 -r1.19.8.1
--- platform/emulator/libfset/fsaux.cc	3 Sep 2003 13:10:39 -0000	1.19
+++ platform/emulator/libfset/fsaux.cc	30 Jan 2005 10:43:17 -0000	1.19.8.1
@@ -9,8 +9,8 @@
  *    Organization or Person (Year(s))
  * 
  *  Last change:
- *    $Date: 2003/09/03 13:10:39 $ by $Author: popow $
- *    $Revision: 1.19 $
+ *    $Date: 2005/01/30 10:43:17 $ by $Author: glynn $
+ *    $Revision: 1.19.8.1 $
  * 
  *  This file is part of Mozart, an implementation 
  *  of Oz 3:
@@ -28,7 +28,7 @@
 
 #include "fsaux.hh"
 
-template _OZ_ParamIterator<OZ_Return>;
+template class _OZ_ParamIterator<OZ_Return>;
 extern FILE *cpi_fileout;
 
 void oz_fsetdebugprint(char *format, ...)
Index: share/lib/compiler/CheckTupleSyntax.oz
===================================================================
RCS file: /services/mozart/CVS/mozart/share/lib/compiler/CheckTupleSyntax.oz,v
retrieving revision 1.21
retrieving revision 1.21.16.1
diff -u -r1.21 -r1.21.16.1
--- share/lib/compiler/CheckTupleSyntax.oz	10 Oct 2000 23:24:15 -0000	1.21
+++ share/lib/compiler/CheckTupleSyntax.oz	3 Feb 2005 11:50:19 -0000	1.21.16.1
@@ -6,8 +6,8 @@
 %%%   Leif Kornstaedt, 1998
 %%%
 %%% Last change:
-%%%   $Date: 2000/10/10 23:24:15 $ by $Author: duchier $
-%%%   $Revision: 1.21 $
+%%%   $Date: 2005/02/03 11:50:19 $ by $Author: glynn $
+%%%   $Revision: 1.21.16.1 $
 %%%
 %%% This file is part of Mozart, an implementation of Oz 3:
 %%%    http://www.mozart-oz.org
@@ -115,6 +115,8 @@
 	 {Type.ask.int I} {Coord C}
       [] fLoop(E C) then {Phrase E} {Coord C}
       [] fMacro(Es C) then {ForAll Es Phrase} {Coord C}
+      [] fDotAssign(P1 P2 C) then {Phrase P1} {Phrase P2} {Coord C}
+      [] fColonEquals(P1 P2 C) then {Phrase P1} {Phrase P2} {Coord C}
       [] fFOR(Ds B C) then {ForAll Ds ForDecl} {Phrase B} {Coord C}
       else {FDExpression X}
       end
Index: share/lib/cp/FD.oz
===================================================================
RCS file: /services/mozart/CVS/mozart/share/lib/cp/FD.oz,v
retrieving revision 1.59
retrieving revision 1.59.6.1
diff -u -r1.59 -r1.59.6.1
--- share/lib/cp/FD.oz	30 Apr 2003 21:51:32 -0000	1.59
+++ share/lib/cp/FD.oz	8 Feb 2005 16:45:09 -0000	1.59.6.1
@@ -10,8 +10,8 @@
 %%%   Christian Schulte, 1997, 1998
 %%%
 %%% Last change:
-%%%   $Date: 2003/04/30 21:51:32 $ by $Author: duchier $
-%%%   $Revision: 1.59 $
+%%%   $Date: 2005/02/08 16:45:09 $ by $Author: raph $
+%%%   $Revision: 1.59.6.1 $
 %%%
 %%% This file is part of Mozart, an implementation
 %%% of Oz 3
@@ -319,8 +319,20 @@
 	 
       GenSumR   = FdpSumR
       GenSumCR  = FdpSumCR
-      GenSumCNR = FdpSumCNR
-	 
+
+      %% was: GenSumCNR = FdpSumCNR, but the latter blocks until the
+      %% polynom becomes linear (bug fix)
+      proc {GenSumCNR IV DDV Rel D B}
+	 NegRel = NegRelTable.Rel
+      in
+	 {FdBool B}
+	 thread
+	    or B=1 {FdpSumCN IV DDV Rel    D}
+	    [] B=0 {FdpSumCN IV DDV NegRel D}
+	    end
+	 end
+      end
+
       local
 	 proc {MapIntR N T TR Dom}
 	    if N\=0 then
@@ -395,9 +407,7 @@
 			  dom:        FdDomR
 			  sum:        GenSumR
 			  sumC:       GenSumCR
-			  sumCN:      proc {$ A B C D E}
-					 thread {GenSumCNR A B C D E} end
-				      end
+			  sumCN:      GenSumCNR
 			  sumAC:      GenSumACR
 			  sumACN:     GenSumACNR
 			  distance:   DistanceR
-------------- next part --------------

--Denys


More information about the mozart-hackers mailing list