Skip to content

Fix for the d interface problem in Issue 1984#4361

Merged
d-torrance merged 4 commits into
Macaulay2:developmentfrom
ddale27:issue-1984
Jun 9, 2026
Merged

Fix for the d interface problem in Issue 1984#4361
d-torrance merged 4 commits into
Macaulay2:developmentfrom
ddale27:issue-1984

Conversation

@ddale27

@ddale27 ddale27 commented May 23, 2026

Copy link
Copy Markdown
Member

One of the problems that Claude identified in Issue #1984 was that C++ exceptions were propagating up to the d interface through certain RingElement operations, causing unrecoverable errors. This pull request partially fixes this issue by converting these C++ exceptions into ERROR throws, which the d interpreter can recover from.

It does not fix the issue of monomialOrderDecodeToActualExponents blindly using the block of memory allocated for tmpexp, which seems to be the core cause of the exception throws. It also does not fix any of the identified problems in the superRing package.

I would be happy to implement a fix for the issue with monomialOrderDecodeToActualExponents, but I am not interested in working on superRing.

Additionally, I did not write any unit tests for this issue, since I was unable to reproduce it on my machines.

AI Disclosure

These changes were based on code and code analysis written by Claude at #1984.

@d-torrance d-torrance added the Engine Macaulay2/e label May 23, 2026
@d-torrance

Copy link
Copy Markdown
Member

This should probably wait until the great sort (#4347) is merged and rebased on top of that with the new file locations

@d-torrance d-torrance left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ddale27 - Would you fix the conflicts now that the "Great Sort" PR has been merged?

@ddale27

ddale27 commented Jun 7, 2026

Copy link
Copy Markdown
Member Author

Sure, I'll fix them tomorrow.

@ddale27

ddale27 commented Jun 9, 2026

Copy link
Copy Markdown
Member Author

The conflicts should be fixed.

@d-torrance d-torrance left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@d-torrance d-torrance merged commit 05d2bac into Macaulay2:development Jun 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Engine Macaulay2/e

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants