summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-07Fix and add missing REQUIRE labels for FP regression tests. (#6506)Aina Niemetz
2021-05-07Integrate documentation build with the regular CI workflow (#6490)Gereon Kremer
The new documentation workflow requires building CVC5 again in a separate workflow, which takes quite some time. This PR integrates building the documentation with the regular CI workflow.
2021-05-07Properly printing INST_PATTERN_LIST by itself (#6507)Haniel Barbosa
Previously the SMT2 printer would print pattern lists wrong when they were not printed as part of a binder containing it. This commit fixes this by removing an unused hardcoded restriction that led to issues when printing the ASTs of proof nodes containing patterns.
2021-05-07Simplifications to expand definitions (#6487)Andrew Reynolds
This removes the expandOnly flag from expandDefinitions. The use of expandOnly = true is equivalent to applying top-level substitutions only, which should be done explicitly via Env::getTopLevelSubstitutions. It updates the trust substitutions utility to distinguish apply vs applyTrusted for convenience for this purpose. This also breaks several dependencies in e.g. expand definitions module.
2021-05-07Fix for toPythonObj of integer value with real sort (#6505)makaimann
2021-05-06[proof-new] Updating documentation for Subs/Rw ids (#6502)Haniel Barbosa
2021-05-06Discard duplicate terms in patterns (#6501)Andrew Reynolds
Fixes #6495.
2021-05-06Update README.md and remove last CVC4 references. (#6497)Mathias Preiner
2021-05-06Use constant folding for evaluating BV eager atom (#6494)Andrew Reynolds
This is work towards unifying top-level substitutions with model substitutions. Currently, for model evaluation, BV eager atom preprocessing pass adds mappings (BV_EAGER_ATOM X) -> X to say how (BV_EAGER_ATOM X) should be evaluated in the model. This is not necessary since a rewrite rule (BV_EAGER_ATOM c) -> c for constant c would suffice. This eliminates the call to addModelSubstitution in that preprocessing pass. It also makes it so that we don't make true/false themselves into eager atoms.
2021-05-05Do not have quantifiers model inherit from theory model (#6493)Andrew Reynolds
This is work towards making the initialization of theory engine, theory models, quantifiers engine more flexible. This makes it so that the specialized quantifiers models classes (FirstOrderModel) do not inherit from TheoryModel. There is no longer any reason for this, since FirstOrderModel does not have any override methods. As a result of this PR, there is only one kind of TheoryModel and it is constructed immediately when ModelManager is constructed. This required refactoring the initialization of when FirstOrderModel is constructed in ModelBuilder classes in quantifiers. This also avoids the need for casting TheoryModel to FirstOrderModel.
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-05Add helper functions for multi-objective optimization + refactoring (#6473)Ouyancheng
add 3 helper functions judge whether a node is optimizable make strong improvement expression according to optimization objective make weak improvement expression according to optimization objective optChecker is now created by optimizationSolver instead of the minimize/maximize functions Slightly refactors function signatures so that they are accepting OptimizationObjective instead of accepting target, type in separate parameters.
2021-05-04Move current decision engine to decision engine old (#6466)Andrew Reynolds
The decision engine is the class that contains strategies for doing e.g. justification heuristic. The current implementation is hardcoded for the old implementation of justification heuristic. Since both implementations will be maintained in the short term, this splits the parts of DecisionEngine that are specific to the old implementation to a class DecisionEngineOld. It refactors the interface of DecisionEngine in a way that is compatible with both implementations.
2021-05-04Move env into smt solver, theory engine, prop engine (#6486)Andrew Reynolds
This is work towards eliminating singletons. Also, TheoryModel should use the same substitution map as the preprocessor. This is work towards unifying these things, which will be done in a future PR.
2021-05-04Do not use proof CNF stream with assumptions-based cores (#6488)Haniel Barbosa
Previously using proof CNF stream together with assumptions-based unsat cores added unnecessary performance overhead. Co-authored-by: Mathias Preiner mathias.preiner@gmail.com
2021-05-04Use proper commit hash for PRs (#6485)Gereon Kremer
For PRs, the automatically generated documentation is stored under the current master commit hash instead of the hash of the latest commit on the PR. This PR fixes this issue by exporting the commit hash (much like the name of the PR or branch).
2021-05-04cmake: Fix ninja build. (#6481)Mathias Preiner
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-05-04FP: Move removal of generic to_fp operations to rewriter. (#6480)Aina Niemetz
2021-05-04FP: Move type check from expandDefinitions. (#6479)Aina Niemetz
2021-05-03FP: Rewrite to_fp conversion from signed bit-vector. (#6472)Aina Niemetz
SymFPU does not allow to_fp conversion from signed bv of size 1. This adds rewrites for this case. Rewrites for the constant and the non-constant cases were tested in isolation.
2021-05-03Add missing --auto-download in CI (#6478)Gereon Kremer
This PR adds --auto-download for the CI job that builds the documentation. Also makes sure that the documentation workflow never fails.
2021-05-03Add CI jobs to build docs (#6413)Gereon Kremer
This PR adds CI jobs to automatically build documentation for branches on the main repository and for pull request. The first job builds the documentation for every push and pr and stores the generated documentation in cvc5.github.io/docs-ci. All versions are stored and for every branch and PR a symbolic link to the most recent version is maintained. Note that the PR jobs are run by the pull_request_target trigger that allows access to repository secrets, but runs in the context of the target branch and we thus need to (carefully!) pull in the relevant changes manually. The second job runs once a week and prunes the docs-ci repository: all directories that have not been touched for a month are removed, and all commits older than a month are squashed into a single commit. This retains the full history for the last month, but effectively removes everything older than that.
2021-05-03SymFPU: Automatically apply patch from 2020-11-14. (#6471)Aina Niemetz
This automatically applies @martin-cs's working patch from 2020-11-14. It fixes several issues, all covered open issues are added as regression tests. Fixes #3582. Fixes #5511. Fixes #6164.
2021-05-03Python API tests for terms -- Part 1 (#6468)yoni206
This PR removes the old python api tests for terms from test/api/python/test_term.py and replaces it with a new test file test/python/unit/api/test_term.py. The new test file is obtained by translating test/unit/api/term_black.cpp. In this PR I only include the tests that pass without requiring any change to the python API. The next PR will add functions to the python API that are currently not supported, along with corresponding tests. Comment: This was originally done in #6460 on the wrong fork. Now it is re-opened, and addresses all comments given there.
2021-04-30bv: Refactor ppAssert and move to TheoryBV. (#6470)Mathias Preiner
This PR refactors ppAssert from the lazy BV solver and moves it to TheoryBV.
2021-04-30Add parameter name for argument `isPreRewrite` for FP rewrites. (#6469)Aina Niemetz
2021-04-30Refactor optimization result and objective classes + add preliminary support ↵Ouyancheng
for multiple objectives (#6459) This PR is one part of multiple. Preliminary support means currently only supports single objective. It supports queue-ing up objectives and it always optimizes the first. Multiple-obj optimization algorithm will be up next. * Refactor optimization result and objective classes * Add preliminary support for multiple objectives * The unit tests are now comparing node values instead of node addresses
2021-04-30Use substitutions for implementing defined functions (#6437)Andrew Reynolds
This eliminates explicit tracking of defined functions, and instead makes define-fun add to preprocessing substitutions. In other words, the effect of: (define-fun f X t) is to add f -> (lambda X t) to the set of substitutions known by the preprocessor. This is essentially the same as when (= f (lambda X t)) was an equality solved by non-clausal simplification The motivation for this change is both uniformity and for performance, as fewer traversals of the input formula. In this PR: define-fun are now conceptually higher-order equalities provided to smt::Assertions. These assertions are always added as substitutions instead of being pushed to AssertionPipeline. Top-level substitutions are moved from PreprocessingContext to Env, since they must be accessed by Assertions. Proofs for this class are enabled dynamically during SmtEngine::finishInit. The expandDefinitions preprocessing step is replaced by apply-substs. The process assertions module no longer needs access to expand definitions. The proof manager does not require a special case of using the define-function maps. Define-function maps are eliminated from SmtEngine. Further work will reorganize the relationship between the expand definitions module and the rewriter, after which global calls to SmtEngine::expandDefinitions can be cleaned up. There is also further work necessary to better integrate theory expand definitions and top-level substitutions, which will be done on a followup PR.
2021-04-29Add assertion list utility for justification heuristic (#6414)Andrew Reynolds
2021-04-29Simplify generated code for getOption() and setOption() (#6462)Gereon Kremer
This PR simplifies the generated code for Options::getOption() and Options::setOption(). It now uses less string streams, less temporary vectors and the new options[...] syntax (instead of options::...().
2021-04-29Add missing include. (#6463)Gereon Kremer
This PR fixes an issue with one of our nightlies.
2021-04-29Avoid exponential explosion of small constant in CEGQI (#6461)Gereon Kremer
This PR fixes an issue that can lead to an exponential explosion of a rational constant for repeated calls to the cegqi instantiation strategy. The d_small_const variable was squared regularly, we now simply multiply it with its original value.
2021-04-28Fix BV Optimization Boundary Condition when lower bound = upper bound + 1 ↵Ouyancheng
(#6452) If lb = ub + 1 then (lb+ub)/2 =pivot == lb since it's rounding to -infinity. and lb <= x < pivot will always be UNSAT. We need to handle this differently. And this only happens in minimization.
2021-04-28Refactor resource manager options (#6446)Gereon Kremer
This PR refactors how the resource manager options are used. It moves options relevant for the resource manager into its own file (making the number of smt options a bit smaller) and uses the Options object directly instead of using the old static accessors.
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-28Make sure reference stats are reset properly (#6457)Gereon Kremer
This PR adds a reset() method to the ReferenceStat class. It then uses it to properly reset such statistics in the minisat solvers where lifetime is an issue.
2021-04-28Clean up options holder class (#6458)Gereon Kremer
This PR does some cleanup on the options class: it puts the option defaults into the member declaration and removes the explicit constructor; it puts the holder into a unique_ptr; it uses the regular struct copy operation instead of reconstructing the holder object; it moves some macros required for option defaults into the option holder header. Also, this PR removes some obsolete code related to suggestions for typos.
2021-04-28Cleanup DidYouMean (#6454)Gereon Kremer
This PR does a bit of cleanup on our didyoumean code.
2021-04-27Add internal support for datatype update (#6450)Andrew Reynolds
2021-04-27Move slow regression to regress3 (#6451)Andrew Reynolds
Benchmark is taking 40 seconds on production, due to the configuration that tests --check-unsat-cores.
2021-04-27Fix refutational soundness bug in quantifier prenexing (#6448)Andrew Reynolds
This bug can be triggered by define-fun, quantifier macros or inferred substitutions whose RHS contain quantified formulas. This corrects the issue by ensuring that bound variables introduced for prenexing are fresh for distinct quantified formula subterms that may share quantified variables. This was reported by Geoff Sutcliffe via a TPTP run.
2021-04-27Simplify making function types (#6447)Andrew Reynolds
Previously, we were conditionally checking whether a function was "flat" e.g. did not have a function type as the range type. The original motivation for this was to catch cases where the user made a declare-fun that had function return type, which is not permitted. All these checks are already done at the API level https://github.com/CVC4/CVC4/blob/master/src/api/cpp/cvc5_checks.h#L441. However, internally we should have no such restriction. This is required for simplifying the LFSC term processor.
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-27Bool: Move implementation of type rules to cpp. (#6420)Aina Niemetz
2021-04-26Generate docs conf.py by cmake (#6441)Gereon Kremer
This PR makes cmake generate the sphinx configuration file. This will simplify dynamically modifying this file in the future, for example to add custom paths within the build directory (for the python API).
2021-04-26Protect int stats methods (#6442)Gereon Kremer
This PR protects two methods of the IntStat class in case statistics are disabled.
2021-04-26First part of options refactoring (#6428)Gereon Kremer
This PR does a first round of refactoring and gets rid of a significant portion of generated code. In particular - it removes options::optionName.wasSetByUser() (we still have Options::wasSetByUser()) - it removes options::optionName.set() (we still have Options::set()) - it removes options::optionName.getName() in favor of options::optionName.name - it removes the specializations of Options::assign() and Options::assignBool() from the headers - it eliminates runHandlerAndPredicates() and runBoolPredicates() The removed methods are only used in few places with are changed to using Options::current().X() instead. In the future, we also want to get rid of options::optionName() and use Options::operator[]() instead, and furthermore not use Options::current() but use the options from the Env object. This PR already adds Env::getOption() as a shorthand for Env::getOptions()[...] and uses it as a proof of concept within SmtEngine.
2021-04-26Fix theoryOf for Boolean equalities (#6444)Andrew Reynolds
Required for fixing a bug in CNF stream's ensureLiteral, which was crashing when combined with unsat-cores-mode=assumptions. With this PR, we assign a formula like (= (= x y) (= z w)) to have theoryOf THEORY_BOOL. Previously, it mistaken was assigned THEORY_UF if e.g. x,y z, w were terms whose type was an uninterpreted sort. We should retest unsat-cores-mode=assumptions after this PR is merged.
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback