cvc5.git
2 years agoRemove support for unused `declare-*` commands (#8623)
Andres Noetzli [Mon, 18 Apr 2022 13:30:30 +0000 (06:30 -0700)]
Remove support for unused `declare-*` commands (#8623)

This commit removes support for
declare-sorts/declare-funs/declare-preds. These commands seem to
be a leftover of an earlier SMT-LIB draft [0]. We only had a test for
declare-funs and Z3 doesn't support declare-funs either.

[0] http://homepage.cs.uiowa.edu/~astump/papers/smt-cmd-lang.pdf

2 years agoFix internal type issue for congruence over quantifiers in LFSC post-processor (...
Andrew Reynolds [Thu, 14 Apr 2022 23:25:09 +0000 (18:25 -0500)]
Fix internal type issue for congruence over quantifiers in LFSC post-processor (#8619)

Avoids debug assertions in LFSC proof conversion when doing congruence over closures.

2 years agoImplement internal support for (definitional) satisfiability modulo oracles (#8618)
Andrew Reynolds [Thu, 14 Apr 2022 22:53:28 +0000 (17:53 -0500)]
Implement internal support for (definitional) satisfiability modulo oracles (#8618)

Adds implementation of OracleEngine, which adds lemmas of the form (= (f c) d) on demand for I/O pairs (c,d) from oracle calls.

2 years agoMake LFSC printer robust to internal types (#8616)
Andrew Reynolds [Thu, 14 Apr 2022 21:13:04 +0000 (16:13 -0500)]
Make LFSC printer robust to internal types (#8616)

This makes the LFSC node converter track the "user declared" symbols and types that it encounters.

It furthermore makes the "dry run" phase of proof printing happen before types and symbols are declared, so that all declared symbols are found before the preamble of LFSC proofs are printed.

These changes are specifically to fix cases where a internal type is generated that does not appear in the input. For example, some preprocessing passes may construct auxiliary uninterpreted sorts.

This fixes 6 more LFSC failures from our regressions.

2 years agoImplement internal support for synthesis modulo oracles (#8617)
Andrew Reynolds [Thu, 14 Apr 2022 19:48:23 +0000 (14:48 -0500)]
Implement internal support for synthesis modulo oracles (#8617)

SyMO is implemented as a preprocessor for SMT queries in the verification subsolver of SyGuS.

2 years agoRemove static calls to rewrite involving array constants (#8613)
Andrew Reynolds [Thu, 14 Apr 2022 19:11:57 +0000 (14:11 -0500)]
Remove static calls to rewrite involving array constants (#8613)

The type enumerators for arrays and functions relied on static calls to the rewriter. This is overkill, as the appropriate calls to the utility method normalizeConstant in the array rewriter class suffices.

The eliminates 2 of the remaining static calls to the rewriter.

2 years agoImprovements to phase shifting + purification lemmas (#8598)
Andrew Reynolds [Thu, 14 Apr 2022 18:00:30 +0000 (13:00 -0500)]
Improvements to phase shifting + purification lemmas (#8598)

Makes 3 improvements to phase shifting + purification lemmas:
(1) we use purification skolems when possible, e.g. for exp(t), or sin(c) where -pi <= c <= pi, since it is unnecessary to assert c is in proper phase. This also adds proofs for purification of exp, which is hence trivial.
(2) we make the phase shift variable a real for which is_int holds. This avoids mixed int/real arithmetic, in preparation for eliminating subtyping
(3) the proof checker and sine solver use a common utility for getting the phase shift lemma.

2 years agoRevised partitioning (#8143)
Amalee Wilson [Thu, 14 Apr 2022 15:26:49 +0000 (08:26 -0700)]
Revised partitioning (#8143)

This adds the "revised" partitioning algorithm to the splitter and adds support for collecting literals from the sat solver. There is only one partitioning strategy in this PR, but the others will be added in subsequent PRs.

2 years ago[proofs] [dot] New way to traverse the proof when printing a .dot DAG (#8610)
vinciusb [Thu, 14 Apr 2022 14:00:38 +0000 (11:00 -0300)]
[proofs] [dot] New way to traverse the proof when printing a .dot DAG (#8610)

Change the way cvc5 traverse and print the proof when --proof-dot-dag option is used. The main change is related to the way the printer tracks visited proof nodes. The new conditions are:

- If the proof node has already been visited inside the current scope.
- If the proof node is closed (i.e. does not contains a subproof whose rule is ASSUME) and has already been visited (here the condition is global and the scope doesn't matter).

Signed-off-by: Vinícius Braga Freire vinicius.braga.freire@gmail.com
2 years agoIntegrate oracle checker into quantifiers term registry (#8604)
Andrew Reynolds [Thu, 14 Apr 2022 13:36:38 +0000 (08:36 -0500)]
Integrate oracle checker into quantifiers term registry (#8604)

Also incorporates into sygus term database. For SyMO, oracle function symbols act analogously to recursive function definitions; the oracle checker is used to rewrite terms in the same contexts as when recursive function definitions are evaluated.

2 years agoFix spurious assertion involving subtypes (#8611)
Andrew Reynolds [Thu, 14 Apr 2022 13:16:49 +0000 (08:16 -0500)]
Fix spurious assertion involving subtypes (#8611)

Fixes #8609.

2 years agoUpdate LFSC version (#8614)
Andrew Reynolds [Thu, 14 Apr 2022 04:46:19 +0000 (23:46 -0500)]
Update LFSC version (#8614)

Now has a different expected output ("success" for each check).

2 years agoAdd Relation and Table types to SMTLib parser (#8605)
mudathirmahgoub [Wed, 13 Apr 2022 18:54:27 +0000 (13:54 -0500)]
Add Relation and Table types to SMTLib parser (#8605)

2 years agoFix type issue for FP constants in LFSC node converter (#8612)
Andrew Reynolds [Wed, 13 Apr 2022 14:56:43 +0000 (09:56 -0500)]
Fix type issue for FP constants in LFSC node converter (#8612)

Fixes type errors in debug builds.

2 years agoFix spurious assertion failure caused by subtyping in LFSC proof postprocessor (...
Andrew Reynolds [Tue, 12 Apr 2022 22:35:05 +0000 (17:35 -0500)]
Fix spurious assertion failure caused by subtyping in LFSC proof postprocessor (#8608)

Also removes an old case for parametric datatypes in getBaseType, which is incorrect since datatypes not longer use subtyping.

This avoids more assertion failures in debug mode for LFSC due to subtypes.

2 years agoFix type issue for LFSC null terminator (#8607)
Andrew Reynolds [Tue, 12 Apr 2022 21:54:25 +0000 (16:54 -0500)]
Fix type issue for LFSC null terminator (#8607)

This fixes an assertion failure when producing LFSC proofs in debug mode.

The issue currently does not impact the correctness of the code, although this will be important if subtypes are eliminated.

2 years agoAdd oracle checker utility (#8603)
Andrew Reynolds [Tue, 12 Apr 2022 18:55:05 +0000 (13:55 -0500)]
Add oracle checker utility (#8603)

This is a utility that allocates oracle callers for oracle functions on demand and can be used to convert a term containing oracle function symbols into its evaluated form.

It will be used for both SMTO (for checking consistency of oracle interfaces) and SyMO (as part of refinement lemma evaluation in CEGIS).

2 years agoAdd oracle caller utility (#8599)
Andrew Reynolds [Tue, 12 Apr 2022 14:59:14 +0000 (09:59 -0500)]
Add oracle caller utility (#8599)

The implementation of this class has a placeholder for calling external binaries, which will be filled in a later PR.

2 years agoMaking some benchmarks SMT-LIB compliant for subtypes (#8600)
Andrew Reynolds [Tue, 12 Apr 2022 14:19:53 +0000 (09:19 -0500)]
Making some benchmarks SMT-LIB compliant for subtypes (#8600)

This makes some of our regressions compliant for arithmetic subtyping. This is required to make these benchmarks parsable when subtyping is eliminated.

We should discuss whether we should be permissive for such benchmarks. Regardless, the majority of our regressions should be SMT-LIB compliant.

2 years agoFix more misuses of arithmetic subtypes (#8601)
Andrew Reynolds [Tue, 12 Apr 2022 13:58:18 +0000 (08:58 -0500)]
Fix more misuses of arithmetic subtypes (#8601)

2 years ago[proofs] [dot] Print nodes clusters at dot format (#8574)
vinciusb [Tue, 12 Apr 2022 13:13:56 +0000 (10:13 -0300)]
[proofs] [dot] Print nodes clusters at dot format (#8574)

Add a printer option that allows the dot printer to identify each node type and group them up in node clusters. These cluster are determined according to "part of the proof" whether a node belongs to:

- input
- sat proof
- cnf proof
- theory lemma proof
- preprocessing

Signed-off-by: Vinícius Braga Freire vinicius.braga.freire@gmail.com
2 years agoMore cleaning uses of arithmetic subtyping (#8595)
Andrew Reynolds [Mon, 11 Apr 2022 22:13:46 +0000 (17:13 -0500)]
More cleaning uses of arithmetic subtyping (#8595)

Towards eliminating arithmetic subtyping.

2 years agoAdd oracle engine to quantifiers engine (#8589)
Andrew Reynolds [Mon, 11 Apr 2022 21:06:10 +0000 (16:06 -0500)]
Add oracle engine to quantifiers engine (#8589)

This class is the subsolver of quantifiers engine for handling oracles in SMTO. The implementation of this class will be added in followup PRs.

It also contains a utility method for constructing oracle interfaces.

2 years agoRemove spurious case of ppRewrite (#8596)
Andrew Reynolds [Mon, 11 Apr 2022 15:33:54 +0000 (10:33 -0500)]
Remove spurious case of ppRewrite (#8596)

Constants equal to constants are always rewritten to false.

2 years agoAdd learned literal type and prop learned database (#8582)
Andrew Reynolds [Mon, 11 Apr 2022 14:10:44 +0000 (09:10 -0500)]
Add learned literal type and prop learned database (#8582)

In preparation for deep restart feature, and for extending the get-learned-literal interface to multiple types.

2 years agoSimplify parser (#8592)
Andres Noetzli [Fri, 8 Apr 2022 22:00:23 +0000 (15:00 -0700)]
Simplify parser (#8592)

This commit simplifies our parser by removing code that is not relevant
anymore since the removal of support for SMT-LIB <=2.6.

2 years agoMinor refactoring of smt2 printer (#8588)
Andrew Reynolds [Fri, 8 Apr 2022 21:37:09 +0000 (16:37 -0500)]
Minor refactoring of smt2 printer (#8588)

2 years agoDo not allow unresolved sorts in smt2 (#8587)
Andrew Reynolds [Fri, 8 Apr 2022 21:17:29 +0000 (16:17 -0500)]
Do not allow unresolved sorts in smt2 (#8587)

This simplifies the smt2 parser so that we never parse "inlined" unresolved sorts. This infrastructure was used for accomodating the ad-hoc datatype syntax from SMT-LIB <=2.5, and SyGuS 1.0.

We now assume that sorts are fully declared wherever we parse them.

2 years agoEliminate more uses of CONST_RATIONAL (#8590)
Andrew Reynolds [Fri, 8 Apr 2022 20:58:02 +0000 (15:58 -0500)]
Eliminate more uses of CONST_RATIONAL (#8590)

To eliminate arithmetic subtyping, we require distinguishing CONST_RATIONAL and CONST_INTEGER internally. Code should avoid usage of these kinds and use trusted utilities instead (e.g. mkConstReal, mkConstInst, isConst).

2 years agoProperly parse numerals as real when integers are disabled (#8591)
Andrew Reynolds [Fri, 8 Apr 2022 20:38:52 +0000 (15:38 -0500)]
Properly parse numerals as real when integers are disabled (#8591)

SMT-LIB says numerals are real when integers are not included in the logic.

Due to subtyping, we don't complain internally, although if subtyping is eliminated, this fix is necessary.

2 years agoGeneralization for sygus verify utility (#8586)
Andrew Reynolds [Thu, 7 Apr 2022 22:14:08 +0000 (17:14 -0500)]
Generalization for sygus verify utility (#8586)

This is in preparation for synthesis modulo oracles (SyMO), where the verification loop may run multiple times for a given solution. In a follow up PR, the loop introduced in this PR may run multiple times when oracles are present, since oracle invocations in the subsolver may trigger further simplifications to the rewritten form of the specification.

It also makes it so that candidate models are generated for "unknown" results for subsolvers, which is required for SyMO.

2 years agoInternal representation of oracle interface quantifiers (#8585)
Andrew Reynolds [Thu, 7 Apr 2022 21:32:07 +0000 (16:32 -0500)]
Internal representation of oracle interface quantifiers (#8585)

This is the first step towards supporting SMT and synthesis modulo oracles.

It adds the kind required for specifying "oracle interface quantifiers", or, quantified formulas that specify constraints that depend on an external binary.

2 years agoAdd method to get leaves of a NodeTrie (#8583)
Andrew Reynolds [Thu, 7 Apr 2022 21:04:31 +0000 (16:04 -0500)]
Add method to get leaves of a NodeTrie (#8583)

From the oracles branch.

2 years agoMake sets and bags operators left-associative (#8584)
Andrew Reynolds [Thu, 7 Apr 2022 18:09:14 +0000 (13:09 -0500)]
Make sets and bags operators left-associative (#8584)

Makes it so that we parse n-ary applications of e.g. set.union in smt2.
Left associativity seems to be the case for difference operators in databases.
See
https://docs.microsoft.com/en-us/sql/t-sql/language-elements/set-operators-except-and-intersect-transact-sql?view=sql-server-ver15

2 years agoEliminate SmtSolver dependency on SolverEngineState (#8581)
Andrew Reynolds [Thu, 7 Apr 2022 13:07:39 +0000 (08:07 -0500)]
Eliminate SmtSolver dependency on SolverEngineState (#8581)

This is in preparation for making SmtSolver able to be deep reset (reconstructed) within in a SolverEngine instance.

2 years agoMinor fix for printing nullary operators in smt2 (#8577)
Andrew Reynolds [Thu, 7 Apr 2022 12:48:38 +0000 (07:48 -0500)]
Minor fix for printing nullary operators in smt2 (#8577)

2 years agoFix proof checker for SUBS (#8578)
Andrew Reynolds [Thu, 7 Apr 2022 12:29:53 +0000 (07:29 -0500)]
Fix proof checker for SUBS (#8578)

Could lead to proof checking failures when using `--proof-granularity=rewrite`

2 years agoFixes for LFSC printing and signatures (#8579)
Andrew Reynolds [Wed, 6 Apr 2022 18:43:33 +0000 (13:43 -0500)]
Fixes for LFSC printing and signatures (#8579)

Ensures we recognize some internal FP symbols, adds a missing string operator, fixes seq.unit operator printing (required for CONG over seq.unit), fix for 0-ary tuple printing.

2 years agoStart post-release for 1.0.0
Mathias Preiner [Tue, 5 Apr 2022 23:56:20 +0000 (16:56 -0700)]
Start post-release for 1.0.0

2 years agoBump version to 1.0.0 cvc5-1.0.0
Mathias Preiner [Tue, 5 Apr 2022 23:56:20 +0000 (16:56 -0700)]
Bump version to 1.0.0

2 years agoapi: Fix doc generation for kinds in java API. (#8576)
Aina Niemetz [Tue, 5 Apr 2022 23:55:47 +0000 (16:55 -0700)]
api: Fix doc generation for kinds in java API. (#8576)

Plus some more fixes for docs.

2 years agoUpdate copyright headers for release 1.0 (#8539)
Mathias Preiner [Tue, 5 Apr 2022 20:38:57 +0000 (13:38 -0700)]
Update copyright headers for release 1.0 (#8539)

2 years agoUpdate NEWS for cvc5 1.0. (#8460)
Mathias Preiner [Tue, 5 Apr 2022 20:08:27 +0000 (13:08 -0700)]
Update NEWS for cvc5 1.0. (#8460)

Co-authored-by: Andrew Reynolds <andrew.j.reynolds@gmail.com>
Co-authored-by: Gereon Kremer <nafur42@gmail.com>
Co-authored-by: mudathirmahgoub <mudathirmahgoub@gmail.com>
Co-authored-by: Andres Noetzli <andres.noetzli@gmail.com>
2 years agoMake inst constant attribute robust to purification variables (#8573)
Andrew Reynolds [Tue, 5 Apr 2022 15:45:46 +0000 (10:45 -0500)]
Make inst constant attribute robust to purification variables (#8573)

Fixes #8572.

Certain combinations of cegqi/sygus-inst may be solution unsound when combined with E-matching, due to using skolems that have dependencies on instantiation constants are used in instantiations.

2 years agoMake rewriter more robust against RAN becoming rational (#8564)
Gereon Kremer [Tue, 5 Apr 2022 04:32:43 +0000 (21:32 -0700)]
Make rewriter more robust against RAN becoming rational (#8564)

We use real algebraic number to represent multiplicities of sum terms within the arithmetic rewriter. Unfortunately, such real algebraic numbers can realize that they are in fact rational at awkward times. This makes isRational() unsuitable for checking this, instead we should construct the node and check afterwards.

2 years agoapi: More fixes in the java API. (#8571)
Aina Niemetz [Tue, 5 Apr 2022 04:08:36 +0000 (21:08 -0700)]
api: More fixes in the java API. (#8571)

2 years agoBe permissive for subtyping in function definitions (#8568)
Andrew Reynolds [Tue, 5 Apr 2022 03:39:48 +0000 (22:39 -0500)]
Be permissive for subtyping in function definitions (#8568)

This is to accommodate the Real theory in SMT-LIB, which says that numerals specify reals.

Instead of making our parser for numerals dependent on the logic, we are more permissive.

This fixes several spurious parsing issues in smtlib.

2 years agoapi: More fixes in C++ API docs. (#8570)
Aina Niemetz [Tue, 5 Apr 2022 03:08:05 +0000 (20:08 -0700)]
api: More fixes in C++ API docs. (#8570)

2 years agoWrite-up for Pythonic API quickstart (#8566)
Alex Ozdemir [Tue, 5 Apr 2022 02:49:30 +0000 (19:49 -0700)]
Write-up for Pythonic API quickstart (#8566)

2 years agodocs: Fix mkTerm calls in theory documentation. (#8567)
Mathias Preiner [Tue, 5 Apr 2022 02:14:37 +0000 (19:14 -0700)]
docs: Fix mkTerm calls in theory documentation. (#8567)

2 years agoapi: Fix OptionInfo docs for java API. (#8569)
Aina Niemetz [Tue, 5 Apr 2022 01:53:35 +0000 (18:53 -0700)]
api: Fix OptionInfo docs for java API. (#8569)

2 years agoapi: Fixes in docs for Op. (#8565)
Aina Niemetz [Tue, 5 Apr 2022 01:03:09 +0000 (18:03 -0700)]
api: Fixes in docs for Op. (#8565)

2 years agoapi: Fixes for Grammar docs in java API. (#8563)
Aina Niemetz [Tue, 5 Apr 2022 01:02:47 +0000 (18:02 -0700)]
api: Fixes for Grammar docs in java API. (#8563)

2 years agoapi: Fixes in java api docs. (#8562)
Aina Niemetz [Tue, 5 Apr 2022 01:02:26 +0000 (18:02 -0700)]
api: Fixes in java api docs. (#8562)

2 years agoapi: Fixes in docs for DatatypeConstructor. (#8561)
Aina Niemetz [Tue, 5 Apr 2022 01:01:56 +0000 (18:01 -0700)]
api: Fixes in docs for DatatypeConstructor. (#8561)

2 years agoDocs: remove api from package name in java.rst (#8560)
mudathirmahgoub [Tue, 5 Apr 2022 00:51:47 +0000 (19:51 -0500)]
Docs: remove api from package name in java.rst (#8560)

Fix broken links in https://cvc5.github.io/docs/cvc5-0.0.12/api/java/java.html

2 years agoapi: More fixes in docs. (#8559)
Aina Niemetz [Mon, 4 Apr 2022 23:59:36 +0000 (16:59 -0700)]
api: More fixes in docs. (#8559)

2 years agoapi: First batch of fixes in the api docs. (#8558)
Aina Niemetz [Mon, 4 Apr 2022 22:59:32 +0000 (15:59 -0700)]
api: First batch of fixes in the api docs. (#8558)

Uses `@return <uppercase> .... <period>` and `@param <param> <uppercase> ... <period>`,
plus various fixes in the docs.

2 years agoFix links when converting kinds documentation to python (#8557)
Gereon Kremer [Mon, 4 Apr 2022 22:38:25 +0000 (15:38 -0700)]
Fix links when converting kinds documentation to python (#8557)

This mainly fixes explicit rst links when we convert the kinds comments to python.

2 years agopython api: More fixes. (#8556)
Aina Niemetz [Mon, 4 Apr 2022 21:13:12 +0000 (14:13 -0700)]
python api: More fixes. (#8556)

2 years agoStart post-release for 0.0.12
Mathias Preiner [Mon, 4 Apr 2022 20:52:42 +0000 (13:52 -0700)]
Start post-release for 0.0.12

2 years agoBump version to 0.0.12
Mathias Preiner [Mon, 4 Apr 2022 20:52:42 +0000 (13:52 -0700)]
Bump version to 0.0.12

2 years agoMaintain symlink to docs for latest release (#8555)
Gereon Kremer [Mon, 4 Apr 2022 20:37:24 +0000 (13:37 -0700)]
Maintain symlink to docs for latest release (#8555)

This PR creates/updates a symlink called latest to the last release. This simplifies permalinks into the documentation.

2 years agoRemove duplicate lines (#8552)
Gereon Kremer [Mon, 4 Apr 2022 20:31:54 +0000 (13:31 -0700)]
Remove duplicate lines (#8552)

We remove the arguments from links to solver methods in the Kinds
documentation to turn C++ references into python references. This
oftentimes collapses previously different overload of methods (usually
mkTerm()). This PR generically removes duplicate lines from these
comments using some re magic.

2 years agoBump Pythonic (transcendentals) & exception example (#8553)
Alex Ozdemir [Mon, 4 Apr 2022 20:11:30 +0000 (13:11 -0700)]
Bump Pythonic (transcendentals) & exception example (#8553)

- Bump version of Pythonic API to include transcendentals.
- Document Pythonic API's transcendentals.
- Add exception Pythonic API example.

2 years agoapi: Various fixes in Python documentation. (#8554)
Aina Niemetz [Mon, 4 Apr 2022 19:37:51 +0000 (12:37 -0700)]
api: Various fixes in Python documentation. (#8554)

2 years agoVarious improvements and fixes in the documentation (#8551)
Gereon Kremer [Mon, 4 Apr 2022 19:09:47 +0000 (12:09 -0700)]
Various improvements and fixes in the documentation (#8551)

This PR contains a variety of fixed and improvements to the documentation.

2 years agoRename getInstantiatedConstructorTerm to getInstantiatedTerm (#8549)
Andrew Reynolds [Mon, 4 Apr 2022 18:35:38 +0000 (13:35 -0500)]
Rename getInstantiatedConstructorTerm to getInstantiatedTerm (#8549)

This is in line with the change for non-parametric constructors (getConstructorTerm -> getTerm).

Also adds documentation to make the use of constructors, selectors, testers, updaters more clear.

2 years agoUse raw symbols in proofs (#8550)
Andrew Reynolds [Mon, 4 Apr 2022 17:41:40 +0000 (12:41 -0500)]
Use raw symbols in proofs (#8550)

This ensures we don't quote symbols that should not be quoted, fixing two issues:
(1) Proofs in the internal calculus don't convert `:args` to `|:args|`.
(2) LFSC identifiers for terms are not quoted based on SMT-LIB restrictions.

Work towards https://github.com/cvc5/cvc5-projects/issues/466, quoted TypeNode names still need to be addressed.

2 years ago[proofs] [sat] Make SAT assumption bookeeping robust to incremental (#8536)
Haniel Barbosa [Mon, 4 Apr 2022 14:12:39 +0000 (11:12 -0300)]
[proofs] [sat] Make SAT assumption bookeeping robust to incremental (#8536)

Similarly to what happened with proofs of optimized SAT clauses getting lost (in the sense of inserted at lower assertion levels than the current one, during incremental solving), we need to make the bookeeping of the current SAT assumptions in the SAT proof manager robust to context popping. Not doing so can break the final proof construction, which relies on this information. A regression is added which showed the issue via the openness of a step added to the lazy proof chain (even though this did not lead to issues in the final proof).

This commit extends the OptimizedClausesManager to also optionally track a hash set of nodes to have nodes added to it during popping. This is hooked in the SAT proof manager to the SAT assumptions hash set.

There are four instances of notifications to the SAT proof manager of SAT assumptions: two in the proof CNF stream and two in the SAT solver. We only need to worry about the proof CNF stream ones, since the SAT solver ones are for literals (which do
not have assertion levels) and for some cases of the final conflict clause generated, which is always at the current assertion level. For the proof CNF stream ones it suffices to notify the SAT proof manager when the CNF stream itself is notified that a propagation or clause was inserted at an optimized level, as these are the only possible cases.

2 years agoFix for get-value with empty uninterpreted sort domain (#8547)
Andrew Reynolds [Mon, 4 Apr 2022 10:31:27 +0000 (05:31 -0500)]
Fix for get-value with empty uninterpreted sort domain (#8547)

Alternative for https://github.com/cvc5/cvc5/pull/8546.

We were mistakenly using `mkGroundTerm` instead of `mkGroundValue` to make the domain of an uninterpreted sort non-empty.

This ensures that get-value calls do not throw a spurious exception when there is a declared uninterpreted sort and there are no terms of that sort.

As a result, this also required fixing a few further issues regarding how uninterpreted sort constants are printed in models, and fixing the expected results on 2 more regressions.

2 years agoStart post-release for 0.0.11
Mathias Preiner [Sun, 3 Apr 2022 04:32:04 +0000 (21:32 -0700)]
Start post-release for 0.0.11

2 years agoBump version to 0.0.11
Mathias Preiner [Sun, 3 Apr 2022 04:32:04 +0000 (21:32 -0700)]
Bump version to 0.0.11

2 years agouse one process more than we have cores (#8545)
Gereon Kremer [Sat, 2 Apr 2022 20:03:56 +0000 (22:03 +0200)]
use one process more than we have cores (#8545)

This PR uses one process more than we have cores in the CI. This speeds up the CI jobs when time is spent waiting on IO instead of actually using the CPU.

2 years agoRename mkSygusGrammar to mkGrammar (#8544)
Andrew Reynolds [Sat, 2 Apr 2022 19:40:41 +0000 (14:40 -0500)]
Rename mkSygusGrammar to mkGrammar (#8544)

2 years agoRemove variant of mkDatatypeDecl with one sort parameter (#8543)
Andrew Reynolds [Sat, 2 Apr 2022 19:21:46 +0000 (14:21 -0500)]
Remove variant of mkDatatypeDecl with one sort parameter (#8543)

Subsumed by the vector version.

Also marks more methods as experimetnal.

2 years agoapi: Rename get(Selector|Constructor)Term() to getTerm(). (#8537)
Aina Niemetz [Sat, 2 Apr 2022 18:57:50 +0000 (11:57 -0700)]
api: Rename get(Selector|Constructor)Term() to getTerm(). (#8537)

2 years agoFollow renaming within pythonic API (#8532)
Gereon Kremer [Sat, 2 Apr 2022 18:31:32 +0000 (20:31 +0200)]
Follow renaming within pythonic API (#8532)

We are renaming files in the pythonic API to make it look less like it is somehow part of z3 (but still acknowledge that we took code from z3Py properly). This PR follows the change in cvc5/cvc5_pythonic_api#80.

2 years agoAlways cancel already running CI runs on forks (#8542)
Gereon Kremer [Sat, 2 Apr 2022 18:08:36 +0000 (20:08 +0200)]
Always cancel already running CI runs on forks (#8542)

One effect of our changed concurrency policy is that we never cancel runs on forks. This PR changes this, always allowing the concurrency mechanism to cancel on repositories that are not the main repository.

2 years agoMinor edits in docs. (#8540)
Cesare Tinelli [Sat, 2 Apr 2022 03:09:22 +0000 (22:09 -0500)]
Minor edits in docs. (#8540)

2 years agoIgnore irrelevant exponential terms (#8534)
Andrew Reynolds [Sat, 2 Apr 2022 02:48:35 +0000 (21:48 -0500)]
Ignore irrelevant exponential terms (#8534)

Fixes #8517.

2 years agodocs: Add Python installation instructions for pip. (#8538)
Mathias Preiner [Sat, 2 Apr 2022 02:26:33 +0000 (19:26 -0700)]
docs: Add Python installation instructions for pip. (#8538)

2 years agoapi: Remove DatatypeConstructor::getSelectorTerm(). (#8535)
Aina Niemetz [Sat, 2 Apr 2022 01:53:15 +0000 (18:53 -0700)]
api: Remove DatatypeConstructor::getSelectorTerm(). (#8535)

2 years agoRequire that used model values are constant in CEGQI (#8528)
Andrew Reynolds [Sat, 2 Apr 2022 01:27:01 +0000 (20:27 -0500)]
Require that used model values are constant in CEGQI (#8528)

Fixes #8520.

2 years agoAdd a few miscellaneous pieces of documentation (#8533)
Andrew Reynolds [Sat, 2 Apr 2022 01:02:47 +0000 (20:02 -0500)]
Add a few miscellaneous pieces of documentation (#8533)

2 years agoRemove java API methods that accepts lists as arguments (#8541)
mudathirmahgoub [Sat, 2 Apr 2022 00:40:47 +0000 (19:40 -0500)]
Remove java API methods that accepts lists as arguments (#8541)

This PR removes some unnecessary methods in the Java API that were added to simplify several unit tests that use dynamic arrays. The goal is to make the java API consistent and as small as possible.
Users could use asList, toArray methods to use generic lists if they wish.

2 years agoAdd more explanations in the API (#8493)
Andrew Reynolds [Sat, 2 Apr 2022 00:12:37 +0000 (19:12 -0500)]
Add more explanations in the API (#8493)

This also removes a few references to "first-order constants" (using "free constant" instead) since mkConst can be used to construct higher-order free constants.

2 years agoSimplify the python base API in a few places (#8514)
Gereon Kremer [Fri, 1 Apr 2022 23:53:33 +0000 (01:53 +0200)]
Simplify the python base API in a few places (#8514)

This PR simplifies a few methods in the python base API.

2 years agoSimplifications to the datatypes API (#8511)
Andrew Reynolds [Fri, 1 Apr 2022 23:23:18 +0000 (18:23 -0500)]
Simplifications to the datatypes API (#8511)

This PR makes it so that common users of the datatypes API do not need to use "unresolved" datatypes sorts. Instead, these are automatically inferred by the NodeManager when calling mkMutualDatatypeTypes.

API Changes:
(1) adds addSelectorUnresolved to DatatypeConstructorDecl, which is the sole method needed to specify ordinary recursive selectors.
(2) adds to unit test examples that use this variant instead of using unresolved sorts.
(3) the API method mkUnresolvedSort is renamed to mkUnresolvedDatatypeSort and is marked experimental.

Note that unresolved datatype sorts are still needed to support mixed parametric datatypes and nested recursive datatypes in the smt2 parser, so they cannot be deleted yet.

Followup PR will add to documentation on elaborate further on how to use the datatypes API.

2 years agodocs: Document UnknownExplanation. (#8508)
Mathias Preiner [Fri, 1 Apr 2022 22:53:53 +0000 (15:53 -0700)]
docs: Document UnknownExplanation. (#8508)

2 years agoPrevent using the coverings solver with extended operators (#8523)
Gereon Kremer [Fri, 1 Apr 2022 22:24:16 +0000 (00:24 +0200)]
Prevent using the coverings solver with extended operators (#8523)

The way we construct the model within the nonlinear extension makes using multiple subsolvers that contribute to the model potentially unsound. This PR prevent the coverings solver from being used if extended operators are present, unless --nl-cov-force is given.
Fixes #8515. Fixes #8516.

2 years agoapi kinds: Refactor docs for kinds to properly render in Python. (#8510)
Aina Niemetz [Fri, 1 Apr 2022 22:03:58 +0000 (15:03 -0700)]
api kinds: Refactor docs for kinds to properly render in Python. (#8510)

2 years agoapi: Remove Datatype::getConstructorTerm(). (#8529)
Aina Niemetz [Fri, 1 Apr 2022 21:36:07 +0000 (14:36 -0700)]
api: Remove Datatype::getConstructorTerm(). (#8529)

2 years agoReplace regression by minimized one via ddSMT (#8531)
Haniel Barbosa [Fri, 1 Apr 2022 20:29:41 +0000 (17:29 -0300)]
Replace regression by minimized one via ddSMT (#8531)

2 years agoOnly run pypi packaging when release is published (#8526)
Gereon Kremer [Fri, 1 Apr 2022 20:29:24 +0000 (22:29 +0200)]
Only run pypi packaging when release is published (#8526)

We incorrectly triggered pypi packaging when a release was created or published, i.e. it would run twice.

2 years agomake-release: Clarify instructions for pushing commits and tag. (#8524)
Mathias Preiner [Fri, 1 Apr 2022 20:28:31 +0000 (13:28 -0700)]
make-release: Clarify instructions for pushing commits and tag. (#8524)

2 years ago[proofs] [doc] Document string rules (#8498)
Haniel Barbosa [Fri, 1 Apr 2022 20:27:47 +0000 (17:27 -0300)]
[proofs] [doc] Document string rules (#8498)

Also replaces negation of equality literals by disequality literals.

2 years agoChange CI concurrency policy to not queue on main (#8530)
Gereon Kremer [Fri, 1 Apr 2022 20:26:52 +0000 (22:26 +0200)]
Change CI concurrency policy to not queue on main (#8530)

Previously, we would only allow one job per branch/PR and only cancel old jobs on PRs.
This PR changes this policy to allow multiple jobs at once on main.
The way this is done basically follows https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value.

2 years agoDocument special member functions in python API (#8513)
Gereon Kremer [Fri, 1 Apr 2022 20:12:10 +0000 (22:12 +0200)]
Document special member functions in python API (#8513)

This PR documents relevant special member functions __getitem__ and __iter__ for some classes in the base python API.

2 years agoPython API: Do not rename enumerators. (#8507)
Aina Niemetz [Fri, 1 Apr 2022 19:45:36 +0000 (12:45 -0700)]
Python API: Do not rename enumerators. (#8507)

Co-authored-by: Mathias Preiner <mathias.preiner@gmail.com>
Co-authored-by: mudathirmahgoub <mudathirmahgoub@gmail.com>
Co-authored-by: Gereon Kremer <gkremer@stanford.edu>