Changeset eb5c46 in git


Ignore:
Timestamp:
Sep 9, 2011, 7:51:15 PM (13 years ago)
Author:
Oleksandr Motsak <motsak@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
3bdd16ec578fa0d4fe5456a1190eef2b72620c24
Parents:
6bcd03666caa3b8ab756699b67b73bff50821c70
git-author:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2011-09-09 19:51:15+02:00
git-committer:
Mohamed Barakat <mohamed.barakat@rwth-aachen.de>2011-11-09 16:12:41+01:00
Message:
ADD: added assumes that "RING->cf != NULL" into rField_*
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpolys/polys/monomials/ring.h

    r6bcd036 reb5c46  
    357357static inline bool rIsPluralRing(const ring r)
    358358{
    359   assume(r != NULL);  
     359  assume(r != NULL); assume(r->cf != NULL);  
    360360#ifdef HAVE_PLURAL
    361361  nc_struct *n;
     
    411411#ifdef HAVE_RINGS
    412412static inline BOOLEAN rField_is_Ring_2toM(const ring r)
    413 { assume(r != NULL); return ( getCoeffType(r->cf) == n_Z2m && nCoeff_is_Ring_2toM(r->cf) ); }
     413{ assume(r != NULL); assume(r->cf != NULL); return ( getCoeffType(r->cf) == n_Z2m && nCoeff_is_Ring_2toM(r->cf) ); }
    414414
    415415static inline BOOLEAN rField_is_Ring_ModN(const ring r)
    416 { assume(r != NULL); return ( getCoeffType(r->cf) == n_Zn && nCoeff_is_Ring_ModN(r->cf) ); }
     416{ assume(r != NULL); assume(r->cf != NULL); return ( getCoeffType(r->cf) == n_Zn && nCoeff_is_Ring_ModN(r->cf) ); }
    417417
    418418static inline BOOLEAN rField_is_Ring_PtoM(const ring r)
    419 { assume(r != NULL); return (getCoeffType(r->cf) == n_Zpn && nCoeff_is_Ring_PtoM(r->cf) ); }
     419{ assume(r != NULL); assume(r->cf != NULL); return (getCoeffType(r->cf) == n_Zpn && nCoeff_is_Ring_PtoM(r->cf) ); }
    420420
    421421static inline BOOLEAN rField_is_Ring_Z(const ring r)
    422 { assume(r != NULL); return (getCoeffType(r->cf) == n_Z && nCoeff_is_Ring_Z(r->cf) ); }
     422{ assume(r != NULL); assume(r->cf != NULL); return (getCoeffType(r->cf) == n_Z && nCoeff_is_Ring_Z(r->cf) ); }
    423423
    424424static inline BOOLEAN rField_is_Ring(const ring r)
    425 { assume(r != NULL); return nCoeff_is_Ring(r->cf); }
     425{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Ring(r->cf); }
    426426
    427427static inline BOOLEAN rField_is_Domain(const ring r)
    428 { assume(r != NULL); return nCoeff_is_Domain(r->cf); }
     428{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Domain(r->cf); }
    429429
    430430static inline BOOLEAN rField_has_Units(const ring r)
    431 { assume(r != NULL); return nCoeff_has_Units(r->cf); }
     431{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_Units(r->cf); }
    432432#else
    433433#define rField_is_Ring(A) (0)
     
    441441
    442442static inline BOOLEAN rField_is_Zp(const ring r)
    443 { assume(r != NULL); return (getCoeffType(r->cf) == n_Zp); }
     443{ assume(r != NULL); assume(r->cf != NULL); return (getCoeffType(r->cf) == n_Zp); }
    444444
    445445static inline BOOLEAN rField_is_Zp(const ring r, int p)
    446 { assume(r != NULL); return (getCoeffType(r->cf) == n_Zp) && (r->cf->ch == p); }
     446{ assume(r != NULL); assume(r->cf != NULL); return (getCoeffType(r->cf) == n_Zp) && (r->cf->ch == p); }
    447447
    448448static inline BOOLEAN rField_is_Q(const ring r)
    449 { assume(r != NULL); return nCoeff_is_Q(r->cf); }
     449{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Q(r->cf); }
    450450
    451451static inline BOOLEAN rField_is_numeric(const ring r) /* R, long R, long C */
    452 { assume(r != NULL); return nCoeff_is_numeric(r->cf); }
     452{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_numeric(r->cf); }
    453453
    454454static inline BOOLEAN rField_is_R(const ring r)
    455 { assume(r != NULL); return nCoeff_is_R(r->cf); }
     455{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_R(r->cf); }
    456456
    457457static inline BOOLEAN rField_is_GF(const ring r)
    458 { assume(r != NULL); return nCoeff_is_GF(r->cf); }
     458{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_GF(r->cf); }
    459459
    460460static inline BOOLEAN rField_is_GF(const ring r, int q)
    461 { assume(r != NULL); return nCoeff_is_GF(r->cf, q); }
     461{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_GF(r->cf, q); }
    462462
    463463/* DO NOT USE; just here for compatibility reasons towards
    464464   the SINGULAR svn trunk */
    465465static inline BOOLEAN rField_is_Zp_a(const ring r)
    466 { assume(r != NULL); return nCoeff_is_Zp_a(r->cf); }
     466{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Zp_a(r->cf); }
    467467
    468468/* DO NOT USE; just here for compatibility reasons towards
    469469   the SINGULAR svn trunk */
    470470static inline BOOLEAN rField_is_Zp_a(const ring r, int p)
    471 { assume(r != NULL); return nCoeff_is_Zp_a(r->cf, p); }
     471{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Zp_a(r->cf, p); }
    472472
    473473/* DO NOT USE; just here for compatibility reasons towards
    474474   the SINGULAR svn trunk */
    475475static inline BOOLEAN rField_is_Q_a(const ring r)
    476 { assume(r != NULL); return nCoeff_is_Q_a(r->cf); }
     476{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Q_a(r->cf); }
    477477   
    478478static inline BOOLEAN rField_is_long_R(const ring r)
    479 { assume(r != NULL); return nCoeff_is_long_R(r->cf); }
     479{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_long_R(r->cf); }
    480480
    481481static inline BOOLEAN rField_is_long_C(const ring r)
    482 { assume(r != NULL); return nCoeff_is_long_C(r->cf); }
     482{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_long_C(r->cf); }
    483483
    484484static inline BOOLEAN rField_has_simple_inverse(const ring r)
    485 { assume(r != NULL); return nCoeff_has_simple_inverse(r->cf); }
     485{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_simple_inverse(r->cf); }
    486486
    487487static inline BOOLEAN rField_has_simple_Alloc(const ring r)
    488 { assume(r != NULL); return nCoeff_has_simple_Alloc(r->cf); }
     488{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_has_simple_Alloc(r->cf); }
    489489
    490490/* Z/p, GF(p,n), R: nCopy, nNew, nDelete are dummies*/
    491491static inline BOOLEAN rField_is_Extension(const ring r)
    492 { assume(r != NULL); return nCoeff_is_Extension(r->cf); } /* Z/p(a) and Q(a)*/
     492{ assume(r != NULL); assume(r->cf != NULL); return nCoeff_is_Extension(r->cf); } /* Z/p(a) and Q(a)*/
    493493
    494494n_coeffType rFieldType(const ring r);
     
    512512static inline char* rRingVar(short i, const ring r)
    513513{
    514   assume(r != NULL); return r->names[i];
     514  assume(r != NULL); assume(r->cf != NULL); return r->names[i];
    515515}
    516516static inline BOOLEAN rShortOut(const ring r)
    517517{
    518   assume(r != NULL); return (r->ShortOut);
     518  assume(r != NULL); assume(r->cf != NULL); return (r->ShortOut);
    519519}
    520520
     
    634634
    635635static inline BOOLEAN rIsSyzIndexRing(const ring r)
    636 { assume(r != NULL); return r->order[0] == ringorder_s;}
     636{ assume(r != NULL); assume(r->cf != NULL); return r->order[0] == ringorder_s;}
    637637
    638638static inline int rGetCurrSyzLimit(const ring r)
    639 { assume(r != NULL); return (rIsSyzIndexRing(r)? r->typ[0].data.syz.limit : 0);}
     639{ assume(r != NULL); assume(r->cf != NULL); return (rIsSyzIndexRing(r)? r->typ[0].data.syz.limit : 0);}
    640640
    641641void   rSetSyzComp(int k, const ring r);
     
    689689{
    690690  assume(r != NULL);
     691  assume(r->cf != NULL);
    691692  return ((r->order[0] == ringorder_c || r->order[0] == ringorder_C) &&
    692693          r->order[1] == ringorder_dp &&
Note: See TracChangeset for help on using the changeset viewer.