Opened 15 years ago

Closed 15 years ago

#81 closed bug (fixed)

ring attributes are not copied!

Reported by: Oleksandr Owned by: hannes
Priority: critical Milestone: Release 3-1-0
Component: singular-kernel Version: 3-0-5
Keywords: attrib, ring, basering Cc:


It seems that Singular has a problem with ring attribues:

ring r; attrib(r, "a", 2);

// attr:global, type int // BUG! no attribute "a"!!!

attrib(r, "a"); 
// 2 // ok!

def R = r;  // COPY
// attr:global, type int // BUG: no "a" attribute!!!

attrib(R, "a"); // BUG: NO OUTPUT!!!

proc T(R){ attrib(R); "A: ", attrib(R, "a"); };
T(r); // attr:global, type int, A: // BUG: same here!

I noticed that this works for _all_ _other_ datatypes: int, poly, ideal, module and even proc! There seems to be no reason to disable this feature especially for rings...

Change History (3)

comment:1 Changed 15 years ago by hannes

Resolution: fixed
Status: newclosed
  • listing of attributes fixed
  • attributes in assignment: fixed

comment:2 Changed 15 years ago by Oleksandr

Keywords: basering added
Resolution: fixed
Status: closedreopened

Thanks, it works now! Unfortunately there is still something strange related to the above: it seems that one cannot read attributes of basering using attrib(basering)...

ring r;
attrib(r); // gives: attr:global, type int
attrib(r, "a", 1); 

attrib(r); // gives: 
// attr:global, type int
// attr:a, type int    <----- OK!!!!

// r

attrib(basering); // gives: 
// attr:global, type int  <---- BUG!

// Moreover:
attrib(basering, "b", 111); attrib(basering);
// attr:global, type int  <---- BUG!
// attr:global, type int
// attr:b, type int       <----- !!!! OK !!!!
// attr:a, type int 

// Furthermore
proc T(){ nameof(basering); attrib(basering); }; T();
// r
// attr:global, type int   <--- BUG!

comment:3 Changed 15 years ago by hannes

Resolution: fixed
Status: reopenedclosed

fixed - works now also for aliases (like basering etc.)

Note: See TracTickets for help on using tickets.