9 Commits

Author SHA1 Message Date
Daniel Larraz
29ca6e63b0 python: Define explicit __init__ constructors for Cython classes (#12159)
Cython `cdef` classes without an explicit `__init__` constructor have an
implicit `__init__` that accepts any number of arguments. (Python
classes, by contrast, default to an `__init__` that takes no arguments.)
This can lead to confusing situations where arguments appear to be
accepted but are discarded. This PR fixes the issue by adding explicit
`__init__` methods to the Cython classes.

Additionally, this PR removes some unnecessary field initializations in
the Cython classes.
2025-10-02 14:41:03 +00:00
Andrew Reynolds
e067b5261b Make unit tests for proofs more robust wrt rewrite rules (#11601)
The helper method `create_rewrite_proof` no longer generates rewrite
rule holes on my dev branch, since the given rewrite is handled by
ARITH_POLY_NORM now.
2025-02-10 22:35:29 +00:00
Aina Niemetz
0647c4c107 Update copyright headers. (#11561)
Co-authored-by: Daniel Larraz <daniel-larraz@users.noreply.github.com>
2025-01-23 17:54:20 +00:00
Hans-Jörg
bd2d37404b Change author name from "Hans-Jörg" to "Hans-Joerg" (#11155)
The later uses only ASCII letters instead of Unicode characters. This
currently leads to a build issue with the Java headers on FreeBSD:
https://github.com/cvc5/cvc5/issues/11145
2024-08-13 09:24:21 +00:00
Abdalrhman Mohamed
2c5e476aa3 Expose API for hashing proofs. (#10391)
This PR exposes hashing and equality of proofs in the API to avoid
reconstructing the same proof step multiple times from the Lean side.

Notes:
- Proof equality in this PR is referential, not syntactical. However,
this is still useful for caching (and better than nothing).
- A default constructor, `Proof()`, is added to the Java API to mirror
the C++ and Python APIs and the `Term()` constructor in the Java API.
2024-06-06 23:18:28 +00:00
Abdalrhman Mohamed
9d1e1a15a4 Expose DSL Proof Rules. (#10568)
This PR implements one approach to exposing DSL Proof rules to the user: by making the DSL rule enum public.

Notes:

The safe toString method is not included in safe_print.h because it's generated by the RARE parser.
To test the hash and toString, for all enum values, a "last" enum value is needed. However, the current last enum value (DISTINCT_BINARY_ELIM) used in the test is generated by the RARE parser and may change in the future. Potential fixes include: adding LAST enum value, moving NONE to the end, or defining a LAST whose value is generated by the RARE parser.
2024-04-18 15:09:59 +00:00
Aina Niemetz
1a3a935fb5 Python API: Refactor to expose TermManager. (#10488)
This refactors the base Python API to expose TermManager (related to
previous refactor of the C++ API to expose TermManager in #10426).
2024-03-14 14:34:58 -07:00
Aina Niemetz
fdf9ce7138 Update copyright headers. (#10459) 2024-03-12 09:35:09 -07:00
Hans-Jörg
ce64f348d3 Add API for Proofs (#9895)
This pull requests adds support to get Proofs as proper objects from the API.

To do so it adds an object Proof that encapsulates a ProofNode. Furthermore, it adds a function proofsToString to the Solver object that prints (a vector of) proofs. Finally, it modifies the getProof function of the Solver object to return proofs.

Proof rules are returned as strings.

One thing I don't quite like is that the proof component configuration must be given to both the getProof and proofsToString method and must be the same.
2023-10-12 12:05:01 -05:00