13 Commits

Author SHA1 Message Date
Daniel Larraz
11f33df65d Export ParserEndOfFileException class (#11836)
Fixes #10414 and duplicate #11146.

The function `InteractiveShell::readAndExecCommands()` is designed to
catch `ParserEndOfFile` exceptions thrown by `Lexer::parseError`.
However, if the exception class is not exported and the cvc5 binary is
linked against a shared version of the cvc5 parser library, the
exception is interpreted as its exported superclass, `ParserException`.
This results in unintended behavior.
2025-04-23 14:45:42 +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
Daniel Larraz
49296865b9 Install Python dependencies automatically in venv (#10700)
This creates a Python virtual environment and installs the Python dependencies in it if they are not already present.
2024-05-06 14:32:58 +00:00
Aina Niemetz
fdf9ce7138 Update copyright headers. (#10459) 2024-03-12 09:35:09 -07:00
Andrew Reynolds
949dca8ba7 Properly support multi-line define-fun-rec commands in interactive mode (#10404)
Fixes #10398.

Ensures that invoking the command is ultimately responsible for binding the function.
2024-02-22 16:30:39 +00:00
Daniel Larraz
e5848ce786 Make binary test more robust (#10406)
This PR updates test/binary/interactive_shell_parser_inc.py so that the sendline function does not match and ignore previous output. The revised Python script also prints the found output when an assertion fails.
2024-02-20 08:13:34 -06:00
Daniel Larraz
32e135c630 Add regression test for issue #10258 (#10283) 2024-01-17 14:32:55 -06:00
Andrew Reynolds
d89e0d5d1a Revert behavior changes to interactive shell (#10268)
The commit 68fc815 changed the behavior of the interactive shell to use setStringInput instead of setIncrementalStringInput / appendIncrementalStringInput. This change introduces a new private method to replicate the old behavior, where we do not reallocate a parser each line, which leads to issues (which happened to be found in #10258).

It furthermore corrects an issue in incremental when using the parser API, where multiple "outermost contexts" could be pushed on a symbol manager, which leads to synchronization issues concerning scope levels in symbol manager.

Also adds a test for the interactive shell that would have caught this.
2024-01-11 15:04:20 +00:00
Aina Niemetz
0a8baa0f0a Update copyright headers. (#9736) 2023-05-09 18:06:18 +00:00
Andrew Reynolds
fd0df78ad4 Enable flex smt2 parser by default (#9499)
Includes several fixes found during testing:

A check to avoid assertion failure in the flex parser
Changes atomic SEXPR to symbols instead of constant strings to avoid spurious error messages for non-standard characters
Changes to options configuration for Flex for performance (as a result, this does not fix check-synth doesn't flush output #9257).
Fix for --stdin-input-per-line to not set incremental by default for non-interactive inputs.
Note that TPTP parsing still uses the ANTLR parser.

Fixes #9258.
Fixes #8374.
Fixes #1862.
Fixes #791.
Fixes cvc5/cvc5-wishues#142.
2023-03-01 17:39:32 +00:00
Vinícius Camillo
1fc0f6416f Fixed CI actions on macOS. (#9448)
I increased cmake's minimum version in order to use the FindPython module, which allows the build system to specify python versions that are supported. Currently the support is extended to 3.6 through 3.10. I also removed some backward compatible conditions that do not apply anymore provided that cmake's minimum version is guaranteed to be 3.12.

MacOS builds are reenabled in ci.yml.
2023-01-24 19:01:36 +00:00
Mathias Preiner
d01e59c13b Update copyright headers for release 1.0 (#8539) 2022-04-05 20:38:57 +00:00
yoni206
40272d5f3a Translating API tests to Python — part 1 (#7597)
This PR translates some of the API tests from here to Python. The other tests are translated in a private branch and will be added in a separate PR.
2021-11-16 18:56:37 +00:00