summaryrefslogtreecommitdiff
path: root/src/api
AgeCommit message (Collapse)Author
2021-05-14Add Result.java to the java API (#6385)mudathirmahgoub
This PR adds Result.java ResultTest.java and cvc5_Result.cpp to the java api.
2021-05-13Add std::hash overloads for Node, TNode and TypeNode. (#6534)Mathias Preiner
Eliminates NodeHashFunction, TNodeHashFunction and TypeNodeHashFunction.
2021-05-13Adding functions to the python API and testing them -- part 2 (#6517)yoni206
This PR adds some functions that are missing in the python API, along with unit tests for them. The unit tests are translated from https://github.com/cvc5/cvc5/blob/master/test/unit/api/term_black.cpp
2021-05-13Fix error message in toPythonObj (#6524)Alex Ozdemir
2021-05-10Add doc to Kind.java (#6498)mudathirmahgoub
This PR adds documentation to java kinds.
2021-05-08Adding functions to the python API and testing them (#6477)yoni206
This PR adds some functions that are missing in the python API, along with unit tests for them. Subsequent PR will include additional missing functions. Also includes a yapf run to reformat the test file. Co-authored-by: Makai Mann makaim@stanford.edu
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-05-07Fix for toPythonObj of integer value with real sort (#6505)makaimann
2021-05-05Save block comments associated with each kind when parsing kinds file (#6489)makaimann
This PR adds features to the KindsParser for saving and looking up the documentation comment associated with each Kind. This PR does not make use of it yet, but future PRs can query for the comment to automatically add it to language binding documentation (e.g., Python / Java bindings).
2021-05-04Improve generation of python API documentation (#6482)Gereon Kremer
This PR makes generating the python part of our API documentation more reliable. If python bindings are enabled, it makes the docs target depend on pycvc5 and renders a warning into the documentation if python bindings are disabled. To make the dependency on pycvc5 work properly, it changes the python bindings build so that the library is directly put in the right place and avoid the manual rename, so that the pycvc5 target actually points to the correct file. Unfortunately, this means we need to build libcvc5 when building docs with python bindings enabled.
2021-04-28Remove exception headers from options.h (#6456)Gereon Kremer
This PR removes two headers for exceptions from options.h, and instead pushes the includes to a couple of source files.
2021-04-27Initial setup for docs of python API (#6445)Gereon Kremer
This PR adds the basic setup for including the python API in our sphinx documentation and shows how it works using the Datatype class as an example. In detail - it enables sphinx.ext.autodoc and makes sure the generated pycvc5 is in the search path - adds a index page for the python API - adds a page for the Datatype class - adds docstrings for the Datatype class - does some finetuning (remove source locations, but adds signature information)
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-22Add API documentation for statistics (#6364)Gereon Kremer
This PR adds documentation for api::Statistics and api::Stat, as well as further explanations in sphinx. It also adds a custom css to our sphinx theme that slightly changes how inline code blocks look.
2021-04-22Reconciling proofs and unsat cores (#6405)Haniel Barbosa
This commit changes how defaults are set and how the SMT solver is initialized so that proofs can be used fully with (new) unsat cores. Three modes of unsat cores are established now: the upcoming assumption-based cores, which are incompatible with producing proofs (but enable proofs for preprocessing) cores based on the SAT proof, which are incompatible with producing proofs (but enable proofs for preprocessing and the SAT solver) cores based on the full proof, which are unrestricted All the modes activate proofs but lead to errors if the user requires proofs but is not in the full proofs mode for cores.
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-21Add getNumIndices to Op (#6386)mudathirmahgoub
Add getNumIndices to Op
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-20python API sorts: adding functions and tests (#6361)yoni206
This PR does the following: 1. removes old python sort API test 2. creates a new python sort API test, obtained by translating the (entire) cpp unit test https://github.com/CVC4/CVC4/blob/master/test/unit/api/sort_black.cpp 3. adds support for bags and datatype selectors/testers domain/codomain in the python API.
2021-04-16Replace SExpr class by simpler conversion routines (#6363)Gereon Kremer
This PR finally removes the SExpr class. SMT-LIB compatible output is retained by using new on-the-fly conversion to s-expression strings. This finally allows us to remove includes to integer and rational from smt_engine.h. In detail: - a new set of toSExpr() methods is implemented that converts certain types to s-expression strings (without an intermediate class representing s-expressions) - SmtEngine::getInfo() returns a string instead of SExpr and uses the new toSExpr methods - SmtEngine::getStatistic() is removed - SExpr class is removed - d_commandVerbosity uses int instead of Integer
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-15Fix printing of stats when aborted. (#6362)Gereon Kremer
This PR improves/fixes printing of statistics when the solver has been aborted, i.e. when we use printSafe(), and a few other minor issues with the new statistics setup. add toString() methods for TypeConstant, api::Kind to allow for automatic printing by print_safe<>() improve kindToString() to avoid std::stringstream fix newlines between statistics in printSafe() make printing of histograms consistent make --stats-all, --stats-expert and --stats-every-check automatically enable --stats (and vice versa)
2021-04-14Improve documentation for FP rounding mode, add bibliography (#6343)Gereon Kremer
Co-authored-by: Aina Niemetz <aina.niemetz@gmail.com>
2021-04-14Improve documentation of API kinds (#6341)Gereon Kremer
This PR improves the documentation of the api::Kind enum. Note that the docs for many of the enum values should still be improved. This PR merely makes sure that everything that is already there is actually output (/* vs /**) and properly rendered (missing spacing between lists, some formulas, etc).
2021-04-14Improve documentation for API exceptions (#6340)Gereon Kremer
2021-04-14Refactor / reimplement statistics (#6162)Gereon Kremer
This PR refactors how we collect statistics. It splits the current statistic values into the values and a proxy object. The actual values now live inside the registry (making the ownership model way easier) while the proxy object are handed to whoever wants to collect a new statistic. It also extends the C++ API to obtain and inspect the statistics. To change the ownership, this PR needs to touch every single statistic in the whole codebase and change how it is registered.
2021-04-14Rename public and private headers in src/include. (#6352)Aina Niemetz
2021-04-14[unsat-cores] Improving new unsat cores (#6356)Haniel Barbosa
This commit adds a new option to produce unsat cores based on our proof infrastructure (whereas previously we could only do so if we were also checking unsat cores) and the corresponding changes to the default settings to account for it. Since now options::unsatCores() and options::produceProofs() are incompatible, several parts of the code where we tested if we were in "old unsat cores mode", by testing the former and the negation of the latter options, are updated accordingly. This commit also changes how SMT engine sets things by disabling proofs in the theory engine if we are in unsat core mode.
2021-04-13Fix sexpr bug with AST output language. (#6329)Abdalrhman Mohamed
When a command is invoked, its result/status may be printed depending on its current verbosity, which (for probably an outdated reason) is stored in SMTEngine. One of my previous PRs modified the SMTEngine to return the verbosity as an sexpr. The modification works correctly when the output language is SMT2, but it breaks down with the AST output language, which prints sexprs in a different way. This PR fixes this bug by making SMTEngine return options as strings instead of sexpr.
2021-04-12Fix computation of whether a type is finite (#6312)Andrew Reynolds
This PR generalizes TypeNode::isFinite / TypeNode::isInterpretedFinite with TypeNode::getCardinalityClass. It then uses this method to fix our computation of when a type should be treated as finite. Fixes #4260, fixes #6100 (that benchmark now says unknown without an error).
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-09New C++ Api: Initial layout of Api documentation. (#6325)Aina Niemetz
2021-04-07New C++ Api: Rename and move checks.h. (#6306)Aina Niemetz
2021-04-07New C++ Api: Initial setup of Api documentation. (#6295)Aina Niemetz
This configures the initial setup for generating Api documentation with Sphinx via Breathe and Doxygen. All fixes in the documentation of the cvc5.h header are for the purpose of eliminating warnings. This PR does not check for completeness of the documentation, and does not yet tweak the documentation to be nice, beautiful and consistent, which is postponed to future PRs. Configure with `--docs`, and then make. This will generate a `docs` directory in the build directory. The Sphinx documentation can be found at `build/docs/sphinx/index.html`. Doxygen documentation is only generated as xml under `build/docs/doxygen`. This PR further proposes a new style for copyright headers. If this style is approved, I will submit a PR to update the update_copyright.pl script.
2021-04-07cmake: Do not always regenerate cvc4kinds.{pxi,pxd}. (#6300)Mathias Preiner
Only regenerate files if dependencies changed. This avoids unnecessary rebuilds of the Cython code.
2021-04-06Remove template argument from `NodeBuilder` (#6290)Andres Noetzli
Currently, NodeBuilder takes a single template argument: An integer that determines the expected number of arguments. This argument is used to determine the size of the d_inlineNvChildSpace array. This array is used to construct nodes inline. The advantage of this is that we don't have to allocate a NodeValue on the heap for the node under construction until we are sure that the node is new. While templating the array size may save some stack space (or avoid a heap allocation if we statically know that we a fixed number of children and that number is greater than 10), it complicates the code and leads to longer compile times. Thus, this commit removes the template argument and moves some of the NodeBuilder code to a source file for faster compilation. CPU build time before change (debug build): 2429.68s CPU build time after change (debug build): 2228.44s Signed-off-by: Andres Noetzli noetzli@amazon.com
2021-04-06genkinds: Do not use relative paths to find src directory. (#6293)Mathias Preiner
2021-04-05New C++ Api: Rename and move headers. (#6292)Aina Niemetz
2021-04-05parsekinds: Remove DEFAULT_HEADER. (#6294)Mathias Preiner
DEFAULT_HEADER in src/api/parsekinds.py is essentially unused since both genkinds.py scripts pass the kinds header to the script. The current value of DEFAULT_HEADER does not work for the scripts since the working directory for genkinds.py is in src/api/{java,python}.
2021-04-05python: Fix type casting in mkBitVector (#6261)NicolaasWeideman
Fixes #6260. Signed-off-by: Nicolaas <nweidema@usc.edu>
2021-04-02Minor refactoring (#6273)Gereon Kremer
This PR does some minor refactorings in preparation for the new statistics: some renamings, removal of now obsolete code and usage of references instead of pointers.
2021-04-02Cleaning up friend relationships for commands (#6254)Andrew Reynolds
2021-04-01FP: Factor out symfpu traits. (#6246)Aina Niemetz
This is in preparation for a MPFR floating-point literal implementation. We will need to have both literal kinds return a symFPU unpacked float via `getSymUF()` in order to be able to plug it into the fp_converter. For this, it makes sense to have the traits implemented and to be included separately, so that they can also be included in the MPFR implementation.
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-01Refactor CLN dependency & Cleanup (#6251)Gereon Kremer
This PR migrates CLN to a new Find script and adds the possibility to install CLN if not found in the system. Also, it does a bit of cleanup.
2021-04-01Rename namespace CVC5 to cvc5. (#6258)Aina Niemetz
2021-04-01Make ResetCommand go through APISolver (#6172)Gereon Kremer
This PR changes ResetCommand to not call SmtEngine::reset but instead reconstruct the api::Solver object. This makes SmtEngine::reset obsolete and removes it, and moves the original options from SmtEngine to api::Solver. The motivation for this change is twofold: The ResetCommand should not use SmtEngine directly, but only through the API (i.e. Solver). As soon as the statistics data lives within the registry, we need to re-register statistics after resetting the SmtEngine. We can now do this within the api::Solver constructor.
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