Skip to content
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

Merged
merged 7 commits into from Sep 29, 2022
Merged

Univariate root finding #9115

merged 7 commits into from Sep 29, 2022

Conversation

alex-ozdemir
Copy link
Member

No description provided.

@alex-ozdemir alex-ozdemir self-assigned this Sep 5, 2022
@4tXJ7f 4tXJ7f self-assigned this Sep 8, 2022
return o.str();
}

// sorting based on strings because CoCoA doesn't cmp
Copy link
Member

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?

Copy link
Member Author

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.

@alex-ozdemir
Copy link
Member Author

Following up on our discussion, the global manager must be created exactly once.

Creating it multiple times does cause an error.

Copy link
Member

@ajreynol ajreynol left a 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;
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

@ajreynol ajreynol left a comment

Choose a reason for hiding this comment

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

LGTM

@ajreynol ajreynol enabled auto-merge (squash) September 29, 2022 14:43
@ajreynol ajreynol merged commit 0925937 into cvc5:main Sep 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants