summaryrefslogtreecommitdiff
path: root/src/parser
AgeCommit message (Collapse)Author
2021-10-07Fix linking ANTLR3 on some systemsfixAmazonAndres Noetzli
Fixes #7318. This changes how we link ANTLR3 to more closely resemble what we do for, e.g., GMP. This fixes the issue on Amazon Linux 2 (tested using a Docker image) with CMake 3.13.3.
2021-10-01Fix ascription check for return types on ordinary functions (#7290)Andrew Reynolds
Fixes #7274.
2021-09-30Rename SmtEngine to SolverEngine. (#7282)Aina Niemetz
2021-09-30Refactor our static builds (#7251)Gereon Kremer
This PR does a major refactoring on how we organize our builds to allow both shared and static builds. We now build the libraries using object libraries to allow building the libraries both dynamically and statically in the same build folder, though the static library is optional (ENABLE_STATIC_LIBRARY). The binary is linked either dynamically or statically (depending on ENABLE_STATIC_BINARY).
2021-09-30Simplify the syntax and representation of the separation logic empty heap ↵Andrew Reynolds
constraint (#7268) Since ~1 year ago, we insist that the location and data types of the separation logic heap are set upfront, analogous to the set-logic command. This means that the separation logic empty heap constraint does not need to be annotated with its types. This makes SEP_EMP a nullary Boolean operator instead of binary predicate (taking dummy arguments whose types specify the heap type). It changes the smt2 extended syntax from (_ emp T1 T2) to sep.emp.
2021-09-29Remove support for extended `(check-sat <term>)` command. (#7270)Abdalrhman Mohamed
This commit removes support for the extended `(check-sat <term>)` command which overlaps in functionality with the standard `(check-sat-assuming (<prop_literal>*))` command.
2021-09-29Update the syntax for tuples in smt2 (#7265)Andrew Reynolds
This changes mkTuple -> tuple and tupSel -> tuple_select. This is in line with the most recent syntax for tuples in preparation for the theory of tables in smt2.
2021-09-22Remove CVC language support (#7219)Mathias Preiner
This commit removes the support for the CVC language and converts all *.cvc regression tests to SMT-LIBv2.
2021-09-22Minimal fixing version for tuple update parsing (#7228)Andrew Reynolds
This takes the essential changes from #7218 so that the current ANTLR issues are avoided.
2021-09-14Add get-difficulty to the API (#7194)Andrew Reynolds
Adds smt2 parsing, printing and API support for get-difficulty. Adds unit tests.
2021-09-14Support sygus version 2.1 command assume (#7081)Andrew Reynolds
Adds support for global assumptions in sygus files. Also guards against cases of declare-const, which should be prohibited in sygus.
2021-09-01No longer use direct access to options in driver (#7094)Gereon Kremer
This PR refactors the driver to no longer directly access the Options object, but instead use Solver::getOption() or Solver::getOptionInfo().
2021-08-30Add kind BAG_MAP and its type rule to bags (#6503)mudathirmahgoub
This PR adds kind BAG_MAP to bags.
2021-08-27Handle languages as strings in driver (#7074)Gereon Kremer
This PR moves the first chunk of code in the driver to use the proper options API for the language options. It is now handled as a string.
2021-08-26Consolidate language types (#7065)Gereon Kremer
This PR combines the two enums InputLanguage and OutputLanguage into a single Language type. It makes sure that AST is not used as input language using a predicate whenever the option is set.
2021-08-23api: Require size argument for mkBitVector. (#6998)Aina Niemetz
This removes support for creating bit-vectors from a string without a size argument. We further also now require that the base argument is always given (it has no default value).
2021-08-20Simplify how user-provided quantifier attributes are handled (#6963)Andrew Reynolds
This makes INST_ATTRIBUTE (optionally) take multiple children, giving a way for the user to set attributes on quantified formulas, which does not require a new API command. This is a special case of term annotations that occur as the body of a quantified formula. If we need to extend our API to support further user-provided attributes, we should use a similar approach, e.g. a new kind ANNOTATE.
2021-08-19Support sygus standard command syntax set-feature (#7040)Andrew Reynolds
This currently has no effect other than giving an unsupported warning. In the future, set-feature will be implemented via the appropriate call to Solver::setOption if necessary. Fixes #6182.
2021-08-03Remove "inUnsatCore" flag throughout (#6964)Andrew Reynolds
The internal solver no longer cares about what assertions are named / are in the unsat core. This simplifies the code so that the (now unused) `inUnsatCore` flag is removed from all interfaces. This eliminates another external use of `getSmtEngine`.
2021-07-07Rename operator pow2 to int.pow2. (#6849)Aina Niemetz
This name is the name of the symbol we parse. Internally, we still call it POW2. This is a fix for the problem that `pow2` may clash (and already does clash on SMT-LIB benchmarks) with user-defined symbols.
2021-06-25pow2 -- final changes (#6800)yoni206
This commit adds the remaining changes for a working and integrated `pow2` solver. In particular, it adds a rewrite and a lemma that identify `pow2(x)` with `0` whenever `x<0`. Regressions are added as well, including `pow2-native-0.smt2` that shows the semantics of `pow2` on negative values. The next steps are new rewrites and and more lemma schemas.
2021-06-23[parser] [hol] Fix parser check for allowing functions when HOL is enabled ↵Haniel Barbosa
(#6790) Fixes #6526
2021-06-15Remove public option wrappers (#6716)Gereon Kremer
This PR gets rid of almost all remaining public option wrappers. It does so by - making base, main and parser options public such that they can directly be used from the driver and the parser - moving incremental and the resource limiting options to base - moving dumping options to main After this PR, the only option wrapper left is becoming obsolete as well after (the follow-up of) #6697.
2021-06-11Better support for HOL parsing and set up (#6697)Haniel Barbosa
This commit adds a new parser option, --hol, which marks that HOL is being used. This option has the effect of prepending the problem's logic with "HO_", which teels the solver that the logic is higher order. The parser builder, base parser, and SMT2 and TPTP parsers are all updated to work with this new setting, as is the logic info class. For now this parser option is enabling the --uf-ho option for internal use, since for now higher-order solving relies it. In a future PR this dependency will be removed (since this information is already given to the SMT solver via the logic).
2021-06-03Simplify automatic set-logic in smt2 parser (#6678)Andrew Reynolds
This simplifies the smt2 parser so that automatically setting the logic is done directly instead of being buffered as a command. This prevents spurious errors for features that require (A) checking the logic is set and (B) fully intialize the underlying SMT engine. `declare-pool` is an example of an smt2 command where the user will get an error (instead of a warning) when set-logic is not used due to setting the logic, after fully initing SMT engine and then executing the buffered set-logic command. Note this should also make dump=raw-benchmark more accurate (no set-logic is included when dumping benchmarks with no set-logic command).
2021-06-02Move public wrapper functions out of options class (#6600)Gereon Kremer
This PR moves options wrapper functions out of the Options class. These wrapper functions are meant to be called by "external" code that should not access the options modules. This PR thereby significantly reduces the interface of the Options class.
2021-05-27Fix `str.replace_re` and `str.replace_re_all` (#6615)Andres Noetzli
Fixes #6057. The reductions of `str.replace_re` and `str.replace_re_all` were not correctly enforcing that the operations replace the _first_ occurrence of some regular expression in a string. This commit fixes the issue by introducing a new operator `str.indexof_re(s, r, n)`, which, analoguously to `str.indexof`, returns the index of the first match of the regular expression `r` in `s`. The commit adds basic rewrites for evaluating the operator as well as its reduction. Additionally, it converts the reductions of `str.replace_re` and `str.replace_re_all` to use that new operator. This simplifies the reductions of the two operators and ensures that the semantics are consistent between the two.
2021-05-27FP: Rename FLOATINGPOINT_PLUS to FLOATINGPOINT_ADD. (#6628)Aina Niemetz
This is to make it consistent with the name of the SMT-LIB operator (fp.add).
2021-05-21BV: Rename BITVECTOR_PLUS to BITVECTOR_ADD. (#6589)Aina Niemetz
2021-05-20Minor improvements to the API (#6585)Gereon Kremer
This PR does some minor improvements to the API: - remove getConstSequenceElements(), use getSequenceValue() instead - improve documentation for Term
2021-05-20Add more getters for api::Term (#6496)Gereon Kremer
This PR adds more getter functions for api::Term to retrieve values from constant terms (and terms that the average API use might consider constant). It also introduces std::wstring as regular representation for string constants instead of std::vector<uint32> for the SMT-LIB parser and the String class.
2021-05-19Improve handling of `:named` attributes (#6549)Andres Noetzli
Currently, when a :named attribute is used in a binder, the parser complains about an illegal argument. This is because an argument check in the SymbolManager fails. This is not very user friendly. This commit makes the error message clearer for the user: Cannot name a term in a binder (e.g., quantifiers, definitions) To do this, the commit changes the return type for SymbolManager::setExpressionName to include more information that can then be used by the parser to generate an appropriate error message. The commit also changes define-fun to not push/pop the local scope if it has zero arguments because it is semantically equivalent to a define-const, which allows :named terms.
2021-05-14Decouple parser creation from input selection (#6533)Andres Noetzli
This commit decouples the creation of a `Parser` instance from creating an `Input` and setting the `Input` on the parser. This is a first step in refactoring the parser infrastructure. A future PR will split the parser class into three classes: `Parser`, `ParserState`, and `InputParser`. The `Parser` and `InputParser` classes will be the public-facing classes. The new `Parser` class will have methods to create `InputParser`s from files, streams, and strings. `InputParser`s will have methods to get commands/exprs from a given input. The `ParserState` class will keep track of the state of the parser and will be the internal interface for the parsers. The current `Parser` class is used both publicly and internally, which is messy.
2021-05-13Always parse streams with line buffer (#6532)Andres Noetzli
When cvc5 was compiled in competition mode (but not for the application track), then it had a special behavior when reading from stdin. When it received input from stdin, it would read all of stdin and then parse the input as a string because it assumed that the full input is directly available on stdin. However, the non-application tracks of SMT-COMP do not use stdin anymore. They pass a filename to the solver. This special case is not used as a result. Usually, cvc5 parses from stdin using the line buffer, so this commit makes it so that this is always the case, which simplifies the code.
2021-05-07Add support for datatype update (#6449)Andrew Reynolds
This removes the special case of TUPLE_UPDATE and RECORD_UPDATE in favor of the more general datatype update. Datatype update is handled analogously to APPLY_SELECTOR / APPLY_TESTER.
2021-04-27Use std::hash for API types (#6432)Gereon Kremer
This PR replaces all api::*HashFunction objects by specializations of std::hash. std::hash is meant to be extended in this way, and it allows for a much cleaner usage of std::unordered_set and std::unordered_map with these types.
2021-04-21Goodbye CVC4, hello cvc5! (#6371)Mathias Preiner
This commits changes the build system to cvc5 and removes the remaining occurrences of CVC4. It further cleans up outdated/unused scripts in contrib/.
2021-04-20Add instantiation pool feature to the API (#6358)Andrew Reynolds
This adds the command declare-pool to the public API. It also adds parsing support for this feature, lifts the internal kinds to public kinds, adds an example regression, and a unit test for the new declare-pool solver method.
2021-04-19Remove linking against gmp and cln in tests and parser (#6376)Gereon Kremer
Finally, we no longer need to link against GMP and CLN for the parser and the tests. To actually achieve this, this PR also removes some dead code and unused includes from some parser files.
2021-04-15Rename occurrences of CVC4 to CVC5. (#6351)Aina Niemetz
This renames everything but GitHub links and build system related macros. Switching the build system to cvc5 will be the last step in the renaming process.
2021-04-14Rename public and private headers in src/include. (#6352)Aina Niemetz
2021-04-12Refactor and update copyright headers. (#6316)Aina Niemetz
2021-04-09Rename CVC4_ macros to CVC5_. (#6327)Aina Niemetz
2021-04-09Rename CVC4__ header guards to CVC5__. (#6326)Aina Niemetz
2021-04-08Initial support for parametric datatypes in sygus (#6304)Andrew Reynolds
Fixes #6298. Enables parsing of par in the sygus parser, and adds support for default grammar construction. Also fixes a bug related to single invocation for non-function types.
2021-04-06Fix tptp parser for negative rational (#6297)Andrew Reynolds
2021-04-05New C++ Api: Rename and move headers. (#6292)Aina Niemetz
2021-04-01Fix type rule for to_real (#6257)Andrew Reynolds
This fixes the type rule for to_real to match SMT-LIB: its argument must be an integer. This required fixing the TPTP parser which has a more relaxed semantics for to_real / to_rat. This also fixes Solver::isReal, which should return false if we are the integer type. Fixes #6208.
2021-04-01Rename namespace CVC5 to cvc5. (#6258)Aina Niemetz
2021-03-31Rename namespace CVC4 to CVC5. (#6249)Aina Niemetz
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback