12 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
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
Aina Niemetz
488d3d6e25 test: Add tests for missing API coverage. (#11048) 2024-07-13 01:36:56 +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
Aina Niemetz
0a8baa0f0a Update copyright headers. (#9736) 2023-05-09 18:06:18 +00:00
Andrew Reynolds
4df373ae99 Allow SyGuS solver to answer infeasible (#9196)
Due to previous refactoring, the SMT solver called by the SyGuS solver no longer answers unsat when the synthesis problem has a valid solution.

This PR makes it so that unsat from the underlying SMT solver is now interpreted as "infeasible" and is officially returned as such by the SyGuS solver. Note that we return unsat when e.g. a CEGIS refinement lemma is equivalent to false. On the other hand, we do not yet answer unsat when we run out of terms (e.g. for finite grammars), as this is still guarded. A followup PR will address this.

To make the SMT solver answer unsat for infeasible conjectures, we do not guard CEGIS lemmas with the "feasible guard", instead we use the conjecture itself, similar to quantifier instantiation lemmas.

This further removes the "feasible guard" from the internal sygus solver, which was used as a way to prevent unsat due to the infeasibility of CEGIS refinement lemmas.
2022-10-13 15:56:55 +00:00
Gereon Kremer
13d891a718 Add some missing API tests (#8669)
This PR adds a couple of simple API tests for parts of the API that are not covered yet.
2022-04-29 00:47:10 +00:00
Mathias Preiner
d01e59c13b Update copyright headers for release 1.0 (#8539) 2022-04-05 20:38:57 +00:00
Andrew Reynolds
671dc49883 Fix synth result python unit test (#8418) 2022-03-28 17:31:34 +00:00
Andrew Reynolds
bf8ec7d9f1 Update checkSynth and checkSynthNext to return SynthResult (#8382)
Also extends to non-trivial unit test of SynthResult.

Note this also changes the expected output when using --sygus-out=status from unsat/sat/unknown to feasible/infeasible/fail (the option is used mostly just for our regressions). The output mode status-or-def is now equivalent to standard and is hence deleted.
2022-03-25 20:00:14 +00:00
Andrew Reynolds
ba24986fe2 Add SynthResult to the API (#8370)
Does not modify the code to return a SynthResult yet, just adds the class.

Co-authored-by: Aina Niemetz <aina.niemetz@gmail.com>
2022-03-23 21:56:33 +00:00