Project

General

Profile

Bug #1384

NewPolyRing and SymbolRange

Added by John Abbott over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Normal
Category:
enhancing/improving
Target version:
Start date:
07 Jan 2020
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

What should SymbolRange do if there are no indets in the range?
What should NewPolyRing do if the result of SymbolRange is empty?

Currently the result is an unhelpful error message.

2020-02 improved error message


Related issues

Related to CoCoA-5 - Bug #1383: NewPolyRing on MS WindowsClosed2020-01-07

Related to CoCoA-5 - Bug #1273: NewPolyRing and SymbolRange together make a crashClosed2019-04-29

History

#1 Updated by John Abbott over 4 years ago

  • Related to Bug #1383: NewPolyRing on MS Windows added

#2 Updated by John Abbott over 4 years ago

Here is a session sample:

>>> NewPolyRing(QQ, SymbolRange("x",2,1));
--> ERROR: Wrong number of indet names when creating a PPMonoid
--> [CoCoALib] NewPolyRing_DMPI pseudo ctor
--> NewPolyRing(QQ, SymbolRange("x",2,1));
--> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Currently SymbolRange returns an empty list, which evidently NewPolyRing does not like.
A KISS solution is simple to give a better error message when arg2 of NewPolyRing is empty.

#3 Updated by Anna Maria Bigatti over 4 years ago

My opinion:

What should SymbolRange do if there are no indets in the range?
empty list (non error)

What should NewPolyRing do if the result of SymbolRange is empty?
Give error

I'm cleaning up (right now) the input sanity checks for polynomial rings, they are quite messy and incoherent in the different implementations.

#4 Updated by Anna Maria Bigatti over 4 years ago

Now using ERR::Empty (maybe not ideal, but better)

/**/ NewPolyRing(QQ, "");
--> ERROR: Empty list or vector
--> [CoCoALib] NewPolyRing_DMPI pseudo ctor
--> NewPolyRing(QQ, "");
--> ^^^^^^^^^^^^^^^^^^^
/**/ NewPolyRing(QQ, []);
--> ERROR: Empty list or vector
--> [CoCoALib] NewPolyRing_DMPI pseudo ctor
--> NewPolyRing(QQ, []);
--> ^^^^^^^^^^^^^^^^^^^

#5 Updated by Anna Maria Bigatti over 4 years ago

Done and cvs-ed.
I cleaned up the code in the 3 files RingDistr.. and ediffed them so they are a little bit more similar (therefore, easier to maintain)

#6 Updated by John Abbott over 4 years ago

  • Status changed from New to Resolved
  • Assignee set to Anna Maria Bigatti
  • % Done changed from 0 to 80

It appears to work fine for me (Linux).

#7 Updated by John Abbott about 4 years ago

  • Status changed from Resolved to Feedback
  • Target version changed from CoCoA-5.4.0 to CoCoA-5.3.0
  • % Done changed from 80 to 90

#8 Updated by Anna Maria Bigatti about 4 years ago

  • Description updated (diff)

#9 Updated by Anna Maria Bigatti about 4 years ago

  • Status changed from Feedback to Closed
  • % Done changed from 90 to 100

#10 Updated by Anna Maria Bigatti about 4 years ago

  • Related to Bug #1273: NewPolyRing and SymbolRange together make a crash added

Also available in: Atom PDF