57 Commits

Author SHA1 Message Date
Andrew Reynolds
fa742c5f92 Add fixed project issues (#10180)
Fixes cvc5/cvc5-projects#666.
Fixes cvc5/cvc5-projects#652.
Fixes cvc5/cvc5-projects#646.
2023-11-29 21:45:16 +00:00
mudathirmahgoub
115d3d200b Add parser to the java api (#10088) 2023-11-28 11:53:30 -06:00
Andrew Reynolds
74443f10ab Adding API checks, unit tests, and examples for the parser API (#10048)
This PR adds the proper checks for the parser API. It furthermore adds examples and unit tests for the parser API.

Note that InputParser::nextCommand and InputParser::nextTerm don't catch exceptions, since we want to throw ParserExceptions containing the parsing information, not API exceptions.

Also, at the moment, the InputParser can throw an exception during initialization, which is not caught either.
2023-10-02 15:51:32 +00:00
Andrew Reynolds
0a10033f67 Be robust to non-constant evaluation in sygus core connective (#9977)
Fixes cvc5/cvc5-projects#655.

Includes one of the fixes from #9976.
2023-09-14 13:43:34 +00:00
Andrew Reynolds
076b556b75 Merge parser API includes to cvc5_parser.h (#9967) 2023-08-29 19:31:05 -05:00
mudathirmahgoub
a22439fcdd Fix soundness issue with bags.card when a child appears multiple times in bag.union_disjoint (#9980)
Fixes #9780.
Fixes cvc5/cvc5-projects#547.
Fixes cvc5/cvc5-projects#566.
Fixes cvc5/cvc5-projects#584.
Fixes cvc5/cvc5-projects#603.
2023-08-29 08:53:19 -05:00
Andrew Reynolds
5b3fb0d4a4 Fix issues related to interpolants (#9976)
Fixes cvc5/cvc5-projects#654.

Fixes include:

sygus-core-connective algorithm should be robust to candidates involving partial functions
sygus interpolation module should avoid repeated variables in input list
sygus interpolation default grammar construction should rely on the internal subsolver. in particular this ensures internal heuristics, e.g. sygus-add-const-grammar are leveraged.
2023-08-28 13:45:26 +00:00
Andrew Reynolds
be76d1140e Remove rewriting for universe set (#9979)
The rewrites had led to complications with the cardinality solver and moreover weren't sound if the universe set was e.g. intersected with a term that was not a subset of elements from set variables.

This furthermore corrects an issue cvc5/cvc5-projects#644, which was triggered by the unsoundness in these rewrites.

Fixes cvc5/cvc5-projects#644.
2023-08-24 19:26:10 +00:00
Andrew Reynolds
b008ced807 Do not prenex into non-standard quantifiers in prenex normal mode (#9974)
Fixes cvc5/cvc5-projects#657.
2023-08-23 18:48:29 +00:00
Aina Niemetz
7a4a17b193 c api: Introduce C/C++ specific handling of public enums. (#9915)
This introduces a general way to use public enums both in the C++ and
the (upcoming) C API. For the C++ case, we now use enum classes rather
than enums for public enums. This also includes definitions for
C API to_string conversions for public enums. C API definitions in
cvc5_types.h are only included from the C API, guarded via a macro
(thus, for now, not included yet when the header is included).
2023-08-22 18:17:16 +00:00
Andrew Reynolds
de944c0db5 Further preparation for parser API (#9955)
Removes an include and sketches the necessary documentation.
2023-08-21 17:40:47 +00:00
Andrew Reynolds
9193bc044f Make symbol manager's interface private (#9946)
This is another step towards the parser API.

It hides the symbol manager's interface entirely. The old implementation is now contained via a new class SymManager.

The last step will be to move this (+ command.h, input_parser.h) from parser/api/cpp/ to include/cvc5/.
2023-08-14 17:39:06 +00:00
Andrew Reynolds
0da85f100e Update unit tests involving ANTLR (#9839)
Furthermore removes parser_builder_black as this utility is no longer needed.

Also corrects a bug in numeral parsing when in strict mode.
2023-06-28 11:53:23 -05:00
Vinícius Camillo
f44dc670c8 Disabling test workaround. (#9805)
The cmake FIXTURES workaround broke the nightly builds in a nondeterministic manner.
As we come up with a different solution, as discussed offline, this PR disables the workaround.
2023-06-19 18:47:37 +00:00
Andrew Reynolds
95da75e90e Refactor expression miner interface (#9796)
This is work towards a major refactor of our algorithms for expression mining (rewrite rule synthesis and verification, query generation). The plan is to make these available via a find-synth command, see the changes in the regressions for examples. Currently, these algorithms are available via options that "hijack" calls to check-sat/check-synth, which is highly non-intuitive and requires modifications to the core of the SyGuS solver.

This changes the interface to expression miner in preparation for this change.

Note this currently removes our support for expression mining via options (which is marked as expert options only). Support for these will be available again when support for find-synth is completed. Several regressions are disabled in the meantime.
2023-06-06 17:36:22 +00:00
Vinícius Camillo
3309ce7ed5 Removed parallel option to ctest. (#9779)
As discussed offline, I propose we do not change the CMAKE_BUILD_PARALLEL_LEVEL property of the "fake test" that builds other tests.
Related to #9750.
2023-05-29 12:23:57 -07:00
Vinícius Camillo
f8c6f02c1b Removed -j option from command that builds tests. (#9772)
The parallel option -j does not seem to be accepted by cmake in some situations. This PR removes this option from commands that build tests. These commands were part of a recent workaround to have 'make test' work (#9750).
2023-05-24 09:53:23 -07:00
Vinícius Camillo
aff8215488 Added CMake fixtures to have 'make test' work when the executable is not built. (#9750)
Fixes #9569.

We must ensure that the cvc5 binary is built before running any tests. In principle, this would just be a matter of adding a dependency on the 'test' target (defined by CTest). However, that built-in targets are not accessible via user code.

This seems to be a legacy cmake bug from +10 years ago (8774, 8438).

In order to have 'make test' work properly I use a CMake feature called FIXTURES to add 'test_setup' as the first test which builds the target 'build-tests'.
2023-05-23 16:29:04 +00:00
Aina Niemetz
0a8baa0f0a Update copyright headers. (#9736) 2023-05-09 18:06:18 +00:00
Andrew Reynolds
a181105dcf Fix interpolation solver for failed solutions (#9632)
Fixes cvc5/cvc5-projects#621.
2023-05-09 16:32:43 +00:00
Andrew Reynolds
94e6d46745 Fix polynomial grammar when no arithmetic terms are present (#9614)
Fixes cvc5/cvc5-projects#580.
2023-05-05 15:01:37 +00:00
Andrew Reynolds
9c149b250f Fix returned result for sygus single invocation solver when unknown (#9616)
Fixes cvc5/cvc5-projects#570.
2023-03-29 21:19:49 +00:00
Andrew Reynolds
415fadbf9e Do not use single invocation solver when side condition for abduction is present (#9630)
Fixes cvc5/cvc5-projects#618.
2023-03-29 13:42:01 -05:00
Andrew Reynolds
9724a84cd4 Check for infeasible side conditions for abduction (#9609)
Otherwise we timeout for get-abduct with unsatisfiable side conditions. Also leads to assertion failures with sygus-core-connective for empty unsat cores.

Fixes cvc5/cvc5-projects#587.
2023-03-28 23:31:28 +00:00
Andrew Reynolds
df41f086ce Make CEGQI single invocation more robust for quantified subqueries (#9613)
Fixes cvc5/cvc5-projects#581.
2023-03-28 20:53:24 +00:00