Changeset e06ef94 in git


Ignore:
Timestamp:
Nov 4, 1998, 6:32:26 PM (26 years ago)
Author:
Olaf Bachmann <obachman@…>
Branches:
(u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', 'c7af8613769b29c741d6c338945669719f1fc4f8')
Children:
ef9012388a0946179667c3422d71730fdeefe8b6
Parents:
e977d9c7904d8296ffba12e887b32b6ea65b9a00
Message:
* added rTest which checks rings if RDEBUG is on
* fixed bug in ring-handling of mpsr stuff


git-svn-id: file:///usr/local/Singular/svn/trunk@2633 2c84dea3-7e68-4137-9b89-c4e89433aadc
Location:
Singular
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Singular/mpsr_GetMisc.cc

    re977d9 re06ef94  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: mpsr_GetMisc.cc,v 1.9 1998-06-13 12:44:45 krueger Exp $ */
     4/* $Id: mpsr_GetMisc.cc,v 1.10 1998-11-04 17:32:23 obachman Exp $ */
    55
    66/***************************************************************
     
    259259  mlv1->r = r;
    260260
     261#ifdef RDEBUG
     262  if (r!= NULL) rTest(r);
     263#endif
    261264  // this is an optimization for the mpsr_rDefault routines
    262265  currRing = r;
     
    359362  }
    360363 
     364  rTest(r);
    361365  // try to find an idhdl which is an equal ring
    362366  while (h != NULL)
  • Singular/mpsr_GetPoly.cc

    re977d9 re06ef94  
    33****************************************/
    44
    5 /* $Id: mpsr_GetPoly.cc,v 1.18 1998-10-15 11:46:04 obachman Exp $ */
     5/* $Id: mpsr_GetPoly.cc,v 1.19 1998-11-04 17:32:24 obachman Exp $ */
    66
    77/***************************************************************
     
    553553    Warn("GetOrderingAnnot: using unspec ordering");
    554554
     555  rComplete(r);
     556
    555557  if (GetDefRelsAnnot(node, r) != mpsr_Success)
    556558    Warn("GetDefRelsAnnot: using no defining relations");
     
    571573
    572574  // complete ring constructions
    573   rComplete(r);
    574575  return mpsr_Success;
    575576}
  • Singular/ring.cc

    re977d9 re06ef94  
    22*  Computer Algebra System SINGULAR     *
    33****************************************/
    4 /* $Id: ring.cc,v 1.35 1998-11-04 15:55:35 obachman Exp $ */
     4/* $Id: ring.cc,v 1.36 1998-11-04 17:32:25 obachman Exp $ */
    55
    66/*
     
    5252{
    5353  /*------------ set global ring vars --------------------------------*/
     54  rTest(r);
    5455  currRing = r;
    5556  currQuotient=NULL;
     
    833834void rKill(ring r)
    834835{
     836  rTest(r);
    835837  if ((r->ref<=0)&&(r->order!=NULL))
    836838  {
     
    18941896  return 3; /* could not find var v*/
    18951897}
     1898
     1899#ifdef RDEBUG
     1900// This should eventually become a full-fledge ring check, like pTest
     1901BOOLEAN rDBTest(ring r, char* fn, int l)
     1902{
     1903  if (r == NULL)
     1904  {
     1905    Werror("Null ring in %s:%l\n", fn, l);
     1906    return false;
     1907  }
     1908
     1909  if (r->N == 0) return true;
     1910 
     1911  if (r->VarOffset == NULL)
     1912  {
     1913    Werror("Null ring VarOffset -- no rComplete (?) in n %s:%l\n", fn, l);
     1914    assume(0);
     1915    return false;
     1916  }
     1917 
     1918  int 
     1919    VarCompIndex = r->VarCompIndex,
     1920    VarLowIndex  = r->VarLowIndex,
     1921    VarHighIndex = r->VarHighIndex,
     1922    i;
     1923  BOOLEAN ok = false;
     1924  int* VarOffset = r->VarOffset;
     1925 
     1926  rComplete(r);
     1927 
     1928  if (   VarCompIndex != r->VarCompIndex ||
     1929         VarLowIndex  != r->VarLowIndex ||
     1930         VarHighIndex != r->VarHighIndex)
     1931  {
     1932    Werror("Wrong ring VarIndicies -- no rComplete (?) in n %s:%l\n", fn, l);
     1933    assume(0);
     1934    ok = FALSE;
     1935  }
     1936 
     1937  for (i=0; i<=r->N; i++)
     1938  {
     1939    if (VarOffset[i] != r->VarOffset[i])
     1940    {
     1941      Werror("Wrong VarOffset value at %d in %s:%l\n", i, fn, l);
     1942      assume(0);
     1943      ok = FALSE;
     1944    }
     1945  }
     1946  Free(VarOffset, (r->N + 1)*sizeof(int));
     1947  return ok;
     1948}
     1949#endif
     1950
     1951
  • Singular/ring.h

    re977d9 re06ef94  
    77* ABSTRACT - the interpreter related ring operations
    88*/
    9 /* $Id: ring.h,v 1.17 1998-08-25 13:33:21 krueger Exp $ */
     9/* $Id: ring.h,v 1.18 1998-11-04 17:32:26 obachman Exp $ */
    1010
    1111/* includes */
     
    8888#ifdef RDEBUG
    8989extern short rNumber; /* current ring id (r->no) */
     90#define rTest(r)    rDBTest(r, __FILE__, __LINE__)
     91extern BOOLEAN rDBTest(ring r, char* fn, int l);
     92#else
     93#define rTest(r)
    9094#endif
    9195
Note: See TracChangeset for help on using the changeset viewer.