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

c++ api: Expose TermManager to the API. #10426

Merged
merged 11 commits into from
Mar 8, 2024
Merged

c++ api: Expose TermManager to the API. #10426

merged 11 commits into from
Mar 8, 2024

Conversation

aniemetz
Copy link
Member

@aniemetz aniemetz commented Feb 24, 2024

This introduces a TermManager object, which will, in the future, be the sole object responsible for handling/managing terms and sorts. For now, all corresponding functions in cvc5::Solver are marked as deprecated, as is constructor cvc5::Solver::Solver(), since in the future a solver instance must be constructed from a term manager instance. Currently, we maintain a static thread_local term manager instance to not break the API and continue providing constructor cvc5::Solver::Solver().

Note that this already converts all C++ unit tests to use the TermManager except for a single test getStatistics() in test/unit/api/cpp/solver_black.cpp. Statistics handling is currently still maintained on the solver level. The statistics we maintain, however, concern terms only and will eventually be refactored to be tracked in the NodeManager.

Further note that the Java and Python APIs will be refactored in separate PRs.

This introduces a TermManager object, which will, in the future, be the
sole object responsible for handling/managing terms and sorts. For now,
all corresponding functions in `cvc5::Solver` are marked as deprecated, as
is constructor `cvc5::Solver::Solver()`, since in the future a solver
instance must be constructed from a term manager instance. Currently, we
maintain a static thread_local term manager instance to not break the
API and continue providing constructor `cvc5::Solver::Solver()`.

Note that this already converts all C++ unit tests to use the
TermManager except for a single test `getStatistics()` in
`test/unit/api/cpp/solver_black.cpp`. Statistics handling is currently
still maintained on the solver level. The statistics we maintain,
however, concern terms only and will eventually be refactored to be
tracked in the NodeManager.

Further note that the Java API will be refactored in a separate PR.
include/cvc5/cvc5.h Outdated Show resolved Hide resolved
src/api/cpp/cvc5.cpp Outdated Show resolved Hide resolved
src/api/cpp/cvc5.cpp Outdated Show resolved Hide resolved
src/api/cpp/cvc5.cpp Outdated Show resolved Hide resolved
src/api/cpp/cvc5.cpp Outdated Show resolved Hide resolved
docs/api/cpp/solver.rst Outdated Show resolved Hide resolved
include/cvc5/cvc5.h Show resolved Hide resolved
src/parser/parser_state.cpp Outdated Show resolved Hide resolved
src/parser/smt2/smt2_state.cpp Outdated Show resolved Hide resolved
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

@aniemetz aniemetz enabled auto-merge (squash) March 8, 2024 18:40
@aniemetz aniemetz merged commit 58d7c6d into cvc5:main Mar 8, 2024
10 checks passed
aniemetz added a commit to aniemetz/cvc5 that referenced this pull request Mar 8, 2024
This refactors the base Python API to expose TermManager (related to
previous refactor of the C++ API to expose TermManager in cvc5#10426).
aniemetz added a commit that referenced this pull request Mar 14, 2024
This refactors the base Python API to expose TermManager (related to
previous refactor of the C++ API to expose TermManager in #10426).
aniemetz added a commit to aniemetz/cvc5 that referenced this pull request Mar 20, 2024
This is related to the previous refactor of the C++ API in cvc5#10426.
aniemetz added a commit to aniemetz/cvc5 that referenced this pull request Mar 21, 2024
This is related to the previous refactor of the C++ API in cvc5#10426.
aniemetz added a commit to aniemetz/cvc5 that referenced this pull request Apr 2, 2024
This is related to the previous refactor of the C++ API in cvc5#10426.
aniemetz added a commit that referenced this pull request Apr 2, 2024
This is related to the previous refactor of the C++ API in
#10426.
daniel-raffler added a commit to sosy-lab/java-smt that referenced this pull request Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complex Complexity normal Priority
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants