New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Univariate root finding #9115
Univariate root finding #9115
Conversation
src/theory/ff/roots.cpp
Outdated
return o.str(); | ||
} | ||
|
||
// sorting based on strings because CoCoA doesn't cmp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, the documentation seems to suggest that cmp
exists for CoCoA::RingElem
? Am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's a natural question. Unfortunately, comparison only works for elements of 'ordered' rings: i.e., a ring R
for which CoCoA::IsOrderedDomain(R)
returns true. Most rings that CoCoA implements do not satisfy this, including prime fields.
I've expanded the comment a bit.
Following up on our discussion, the global manager must be created exactly once. Creating it multiple times does cause an error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a request to doc the singleton pointer.
|
||
namespace cvc5::internal { | ||
|
||
extern CoCoA::GlobalManager* s_cocoaGlobalManager; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you comment on the details of why this needs to be static?
Also, mention how this works if multiple solvers are created, e.g. I assume that this pointer is initialize on demand then it is not a problem to share between multiple solvers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep! Just did it. I put most of the documentation at the top of the header.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
No description provided.