cvc5.git
2 years agoRemove assertSkeleton for bag elements during model building (#7538)
mudathirmahgoub [Sun, 31 Oct 2021 13:50:38 +0000 (08:50 -0500)]
Remove  assertSkeleton for bag elements during model building   (#7538)

This PR fixes a bug found by cvc5 fuzzy sygus.

2 years agoFix proof of nl lemma for a corner case (#7530)
Gereon Kremer [Fri, 29 Oct 2021 22:37:39 +0000 (15:37 -0700)]
Fix proof of nl lemma for a corner case (#7530)

This PR fixes the proof generated for the nonlinear monomial bounds check lemmas. In some cases, it implies an equality (multiplied by a monomial) not from the equality but from the two weak inequalities. We now properly detect this special case and add a rather involved proof.
Fixes cvc5/cvc5-projects#326.

2 years agoStart post-release for 0.0.3
Mathias Preiner [Fri, 29 Oct 2021 22:25:01 +0000 (15:25 -0700)]
Start post-release for 0.0.3

2 years agoBump version to 0.0.3
Mathias Preiner [Fri, 29 Oct 2021 22:25:01 +0000 (15:25 -0700)]
Bump version to 0.0.3

2 years agoRemove options::X__numValues (#7419)
Gereon Kremer [Fri, 29 Oct 2021 19:05:05 +0000 (12:05 -0700)]
Remove options::X__numValues (#7419)

This PR removes yet another special purpose options detail that is only used in a single place: X__numValues currently holds the number of modes for an option, that is the number of elements of the respective enums. It is solely used to obtain the size of the std::bitset used to store the flags passed to the -o option. However, it can easily be replaced using the last mode.

This PR also improves a bit on options-related documentation.

2 years agoMinor cleanup of proof messages (#7494)
Andrew Reynolds [Fri, 29 Oct 2021 18:33:30 +0000 (13:33 -0500)]
Minor cleanup of proof messages (#7494)

Also deletes unused code encountered in TheoryArrays while investigating cyclic proofs.

2 years agoFix model construction for higher order involving irrelevant function terms (#7526)
Andrew Reynolds [Fri, 29 Oct 2021 17:50:59 +0000 (12:50 -0500)]
Fix model construction for higher order involving irrelevant function terms (#7526)

This fixes a bug in HO model construction where we were communicating information about irrelevant function terms to the model, leading to incorrect models.

2 years agoAdd PfRule ARITH_POLY_NORM (#7501)
Andrew Reynolds [Fri, 29 Oct 2021 16:36:26 +0000 (11:36 -0500)]
Add PfRule ARITH_POLY_NORM (#7501)

This is a coarse grained proof rule for showing that two terms are equivalent up to polynomial normalization. It will be used as a hard coded case in proof reconstruction with DSL granularity.

2 years agoImprovements for LFSC proof conversion (#7524)
Andrew Reynolds [Fri, 29 Oct 2021 13:32:06 +0000 (08:32 -0500)]
Improvements for LFSC proof conversion (#7524)

Includes miscellaneous improvements and fixes to the LFSC proof conversion from proof-new in preparation for CI on master.

2 years agoRemove static access to options in decision folder (#7527)
Gereon Kremer [Fri, 29 Oct 2021 00:28:29 +0000 (17:28 -0700)]
Remove static access to options in decision folder (#7527)

This PR replaces static accesses to options (options::foo()) by using the options object provided via the environment.

2 years agoFix proof for xor in circuit propagator (#7525)
Gereon Kremer [Thu, 28 Oct 2021 22:03:07 +0000 (15:03 -0700)]
Fix proof for xor in circuit propagator (#7525)

This PR fixes another double negation issue in the circuit propagator.
Fixes cvc5/cvc5-projects#332.

2 years agoCombine `--static` and `--static-binary` (#7520)
Gereon Kremer [Thu, 28 Oct 2021 19:30:13 +0000 (12:30 -0700)]
Combine `--static` and `--static-binary` (#7520)

This PR combines the two configure flags --static and --static-binary into a single --static. Consequently, the two corresponding cmake variables are combined as well. The two variables have been implying each other for some time now and were only used to build not-completely-static binaries for MacOS, which is now done automatically anyway.

2 years ago[proofs] Fix assertion in EqProof conversion (#7522)
Haniel Barbosa [Thu, 28 Oct 2021 18:59:43 +0000 (15:59 -0300)]
[proofs] Fix assertion in EqProof conversion  (#7522)

Also improves a few traces.

Fixes cvc5/cvc5-projects#330

2 years agoAdd support for checking if a `-Wno` flag exists before using it (#7514)
Andrew V. Jones [Thu, 28 Oct 2021 18:06:38 +0000 (19:06 +0100)]
Add support for checking if a `-Wno` flag exists before using it (#7514)

This PR resolves that issue by checking that a -W<error-class> flag exists before trying to use the -Wno-<error-class> flag.

2 years agoAdd a `define-fun` command for each `:named` term. (#7308)
Abdalrhman Mohamed [Thu, 28 Oct 2021 17:04:06 +0000 (12:04 -0500)]
Add a `define-fun` command for each `:named` term. (#7308)

This PR is step towards enabling -o raw-benchmark for regressions. It creates a define-fun command for each named term. This allows us to reparse dumped benchmarks containing named terms, but we still lose track of those terms and do not print them in response to (get-assignment) and (get-unsat-core) commands. This PR also simplifies the interface for DefineFunCommand interface and removes support for (define ...) command.

2 years agoProperly guard proof construction for STRINGS_EXTF_EQ_REW (#7519)
Andrew Reynolds [Thu, 28 Oct 2021 15:45:19 +0000 (10:45 -0500)]
Properly guard proof construction for STRINGS_EXTF_EQ_REW (#7519)

Fixes one of the issues raised in cvc5/cvc5-projects#331, the other involves missing skolem definitions for str.replace_all_re @4tXJ7f .

This properly guards cases of proof reconstruction for STRINGS_EXTF_EQ_REW where an intermediate step in the proof checker inferring something stronger than what it is asked to prove. In particular, substitution+rewriting is more powerful than congruence+rewriting:
s=x => (str.<= t s) ----> (= r "") since (str.<= t "") ----> (= r "")
but additionally:
(str.<= t s) * { s -> x } ----> true, which is possible if s occurs as a subterm of t.

The proof reconstruction for STRINGS_EXTF_EQ_REW is not precise as there are several other aspects that are not covered. After this PR, we properly guard and fail to reconstruct if the above issue arises, so the assertion failure will not throw.

2 years agoLFSC signature for linear arithmetic (#7445)
Andrew Reynolds [Thu, 28 Oct 2021 15:31:29 +0000 (10:31 -0500)]
LFSC signature for linear arithmetic (#7445)

2 years agoLFSC signature for CNF (#7444)
Andrew Reynolds [Thu, 28 Oct 2021 15:12:34 +0000 (10:12 -0500)]
LFSC signature for CNF (#7444)

2 years agoLFSC signature for Booleans (#7443)
Andrew Reynolds [Thu, 28 Oct 2021 14:53:49 +0000 (09:53 -0500)]
LFSC signature for Booleans (#7443)

2 years agoLFSC signature for equality (#7442)
Andrew Reynolds [Thu, 28 Oct 2021 14:39:07 +0000 (09:39 -0500)]
LFSC signature for equality (#7442)

2 years agoFix `(set-info <sexpr>)` parsing and printing bugs. (#7427)
Abdalrhman Mohamed [Thu, 28 Oct 2021 11:26:49 +0000 (06:26 -0500)]
Fix `(set-info <sexpr>)` parsing and printing bugs. (#7427)

Given
```smt2
(set-info :source (0 1 True False x ""))
```
`cvc5` currently prints the command below with `-o raw-benchmark`
```smt2
(set-info : |(0 1 True False x )|)
```
This PR ensures that `cvc5` correctly prints the command by
- Parsing and storing keywords eagerly before parsing their values.
- Removing pre-processing steps done to symbols and string literals.

2 years agoRemove separate cpp docs for UnknownExplanation (#7516)
Gereon Kremer [Thu, 28 Oct 2021 10:07:59 +0000 (03:07 -0700)]
Remove separate cpp docs for UnknownExplanation (#7516)

This removes the separate documentation for the `UnknownExplanation` enum, as it is already included in the documentation of the `Result` class.

2 years agoBuild shared and static in CI (#7472)
Gereon Kremer [Thu, 28 Oct 2021 01:08:13 +0000 (18:08 -0700)]
Build shared and static in CI (#7472)

This PR changes our strategy to deal with shared vs. static builds in CI jobs.
All jobs now build cvc5 both shared and static by default. The builds happen in different build directories (build-shared and build-static), and we configure ccache such that these two build directories share a common cache.

2 years agoAdd missing API checks to getValue (#7475)
Andrew Reynolds [Wed, 27 Oct 2021 23:52:44 +0000 (18:52 -0500)]
Add missing API checks to getValue (#7475)

Fixes cvc5/cvc5-projects#307.

2 years agoAdd comments for arith type rules. (#7488)
Gereon Kremer [Wed, 27 Oct 2021 23:40:31 +0000 (16:40 -0700)]
Add comments for arith type rules. (#7488)

Add comments for the arithmetic type rules.

Fixes cvc5/cvc5-projects#273.

2 years agoAdd documentation on output tags (#7499)
Gereon Kremer [Wed, 27 Oct 2021 23:27:31 +0000 (16:27 -0700)]
Add documentation on output tags (#7499)

This PR adds documentation on how users can use -o. After some offline discussion, we decided it makes sense to generate them automatically in mkoptions.py and also include example outputs.

2 years ago[Regression Script] Fix use of undefined variables (#7510)
Andres Noetzli [Wed, 27 Oct 2021 23:15:56 +0000 (16:15 -0700)]
[Regression Script] Fix use of undefined variables (#7510)

Fixes #7504.

2 years agoFix patching for poly on windows (#7513)
Gereon Kremer [Wed, 27 Oct 2021 19:58:48 +0000 (12:58 -0700)]
Fix patching for poly on windows (#7513)

This PR is another step to fix our windows nightlies.
It moves the patch steps for libpoly in a separate script. Apparently, it is impossible to properly escape this stuff to work on all platforms and all cmake versions.

2 years agoRequire ITE branches to be first class types (#7508)
Andres Noetzli [Wed, 27 Oct 2021 19:46:24 +0000 (12:46 -0700)]
Require ITE branches to be first class types (#7508)

Fixes cvc5/cvc5-projects#316.

2 years agoFix care graph computation for higher-order (#7474)
Andrew Reynolds [Wed, 27 Oct 2021 18:40:18 +0000 (13:40 -0500)]
Fix care graph computation for higher-order (#7474)

Since we apply a lazy schema for app completion, this may omit terms from the care graph that are relevant for theory combination. This corrects the care graph for UF when higher-order is enabled by considering the HO_APPLY version of all partially and fully applied prefixes of APPLY_UF terms during TheoryUF::computeCareGraph.

Fixes #5741. Fixes #5744. Fixes #5201. Fixes #5078. Fixes #4758.

2 years agoFix model unsoundness for relation join (#7511)
Andrew Reynolds [Wed, 27 Oct 2021 18:02:52 +0000 (13:02 -0500)]
Fix model unsoundness for relation join  (#7511)

This fixes a model unsoundness issue in the theory solver for relations.

2 years agoPython api documentation for sorts (#7440)
yoni206 [Wed, 27 Oct 2021 17:41:24 +0000 (20:41 +0300)]
Python api documentation for sorts (#7440)

This PR adds documentation for the Sort python API.

2 years agoAvoid non-terminating check with assumptions in strings rewriter (#7503)
Andrew Reynolds [Wed, 27 Oct 2021 16:07:19 +0000 (11:07 -0500)]
Avoid non-terminating check with assumptions in strings rewriter (#7503)

These rewrites introduce the possibility of non-termination in the rewriter, as demonstrated in the included regression.

Instead, these rewrites are now moved to the extended rewriter.

2 years agoDeterministic variables for RE elim (#7489)
Andrew Reynolds [Wed, 27 Oct 2021 15:27:30 +0000 (10:27 -0500)]
Deterministic variables for RE elim (#7489)

Fixes #6766.

2 years agoFix mac compile errors in sort.cpp (#7507)
mudathirmahgoub [Wed, 27 Oct 2021 10:05:43 +0000 (05:05 -0500)]
Fix mac compile errors in sort.cpp (#7507)

This fixes compile errors in Mac for the java api  where `jlong` means `long long`.

2 years agoMake --version exit (#7506)
Gereon Kremer [Wed, 27 Oct 2021 06:12:00 +0000 (23:12 -0700)]
Make --version exit (#7506)

This PR adds the missing handler declaration for the --version option.
Fixes #7505.

2 years agoFix libpoly build on windows (#7502)
Gereon Kremer [Wed, 27 Oct 2021 00:18:23 +0000 (17:18 -0700)]
Fix libpoly build on windows (#7502)

This PR should finally resolve the current issues with libpoly and windows cross compilation.

2 years ago[proofs] Fix singleton check in MACRO_RES post-processing (#7498)
Haniel Barbosa [Tue, 26 Oct 2021 20:59:31 +0000 (17:59 -0300)]
[proofs] Fix singleton check in MACRO_RES post-processing (#7498)

Previously the check for whether the original conclusion of the MACRO_RESOULTION step was a singleton was incomplete. Now the test is made the proper way.

Depends on #7497.

Fixes cvc5/cvc5-projects#318

2 years ago[proofs] Modularize check for whether a clause is singleton (#7497)
Haniel Barbosa [Tue, 26 Oct 2021 20:46:46 +0000 (17:46 -0300)]
[proofs] Modularize check for whether a clause is singleton (#7497)

Essentially moves the code for this check from the Alethe post-processor. A further PR will include a new use of this method.

2 years ago[proofs] Reset local var in SatProofManager since incremental exists (#7500)
Haniel Barbosa [Tue, 26 Oct 2021 20:27:39 +0000 (17:27 -0300)]
[proofs] Reset local var in SatProofManager since incremental exists (#7500)

Fixes cvc5/cvc5-projects#317

2 years agoDisable automatic symmetry in proofs of theory explanations (#7493)
Andrew Reynolds [Tue, 26 Oct 2021 20:08:19 +0000 (15:08 -0500)]
Disable automatic symmetry in proofs of theory explanations (#7493)

This avoids cyclic proofs in a rare case where theory explanations involve an equality and its symmetric form.

This PR disables auto-symmetry on lazy proofs used for theory explanations, which is slightly less convenient but avoids potentials for cyclic proofs. Note this complication would not arise if the theory engine did not allow non-rewritten equalities to be propagated between theories.

Fixes cvc5/cvc5-projects#311.

2 years ago[proofs] Fix and simplify CHAIN_RESOLUTION checker (#7492)
Haniel Barbosa [Tue, 26 Oct 2021 19:42:14 +0000 (16:42 -0300)]
[proofs] Fix and simplify CHAIN_RESOLUTION checker (#7492)

Fixes cvc5/cvc5-projects#319

2 years agoAdd regressions for fixed issues (#7495)
Andrew Reynolds [Tue, 26 Oct 2021 17:10:50 +0000 (12:10 -0500)]
Add regressions for fixed issues (#7495)

Fixes #4656. Fixes #5234. These do not occur on master.

2 years agoDisable sygus-inst when incremental (#7485)
Andrew Reynolds [Tue, 26 Oct 2021 16:24:31 +0000 (11:24 -0500)]
Disable sygus-inst when incremental (#7485)

Fixes #7385.

Option --sygus-inst relies on the quantifier-free sygus extension of datatypes, which does not support incremental mode. Updating it to support incremental is a long term project.

Until this is complete, --sygus-inst should not be run in incremental mode.

2 years ago[proofs] Alethe: Translate Block of clause pattern rule (#7406)
Lachnitt [Tue, 26 Oct 2021 14:14:01 +0000 (07:14 -0700)]
[proofs] Alethe: Translate Block of clause pattern rule (#7406)

Implementation of the translation of a number of rules that follow the clause pattern into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years ago[proofs] Alethe: Translate AND_INTRO rule (#7405)
Lachnitt [Tue, 26 Oct 2021 14:00:55 +0000 (07:00 -0700)]
[proofs] Alethe: Translate AND_INTRO rule (#7405)

Implementation of the translation of EQ_RESOLVE rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years ago[proofs] Alethe: Translate AND_ELIM rule (#7404)
Lachnitt [Tue, 26 Oct 2021 13:40:07 +0000 (06:40 -0700)]
[proofs] Alethe: Translate AND_ELIM rule  (#7404)

Implementation of the translation of AND_ELIM rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years ago[proofs] Alethe: Translate CONTRA rule (#7403)
Lachnitt [Tue, 26 Oct 2021 13:21:26 +0000 (06:21 -0700)]
[proofs] Alethe: Translate CONTRA rule (#7403)

Implementation of the translation of CONTRA rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years agoUpload docs for tags to docs-releases (#7415)
Gereon Kremer [Tue, 26 Oct 2021 12:25:00 +0000 (05:25 -0700)]
Upload docs for tags to docs-releases (#7415)

This automatically uploads the generated docs to a new repository docs-releases (which should eventually become docs). In contrast to docs-ci, we only store docs for releases there.

2 years agoFix frequent rebuild of options target (#7450)
Gereon Kremer [Tue, 26 Oct 2021 12:10:10 +0000 (05:10 -0700)]
Fix frequent rebuild of options target (#7450)

The mkoptions.py script only updates its output files if their content would actually change. This avoid a full rebuild on every run, and makes sure that only parts that actually change are rebuild.
Unfortunately this interacts badly with how cmake/make/... do inter-target dependency tracking.
This PR adds a stamp file options.stamp that is always updated by mkoptions.py and used by cmake as main output.

2 years agoFix Configuration::isStaticBuild (#7456)
Gereon Kremer [Tue, 26 Oct 2021 11:58:53 +0000 (04:58 -0700)]
Fix Configuration::isStaticBuild (#7456)

This PR fixes a minor issue in Configuration::isStaticBuild() which would always return true. Note that CVC5_STATIC_BUILD is always defined via #cmakedefine01 in cvc5config.h.

2 years ago[proofs] Alethe: Translate NOT_NOT_ELIM rule (#7402)
Lachnitt [Tue, 26 Oct 2021 11:46:26 +0000 (04:46 -0700)]
[proofs] Alethe: Translate NOT_NOT_ELIM rule (#7402)

Implementation of the translation of NOT_NOT_ELIM rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years ago[proofs] Alethe: Translate MODUS_PONENS rule (#7401)
Lachnitt [Mon, 25 Oct 2021 22:24:04 +0000 (15:24 -0700)]
[proofs] Alethe: Translate MODUS_PONENS rule (#7401)

Implementation of the translation of MODUS_PONENS rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years agoAdd new method for enumerating unsat queries with SyGuS (#7459)
Andrew Reynolds [Mon, 25 Oct 2021 21:39:02 +0000 (16:39 -0500)]
Add new method for enumerating unsat queries with SyGuS (#7459)

This adds a new option for --sygus-query-gen=unsat to generate unsat queries (previously, only satisfiable queries were supported).

The algorithm can be seen as a variant of abduction where we conjoin predicates that both (1) refine the current model and (2) avoid repeated unsat cores.

It does some minor refactoring of ExprMinerManager to support the new module.

2 years ago[proofs] Alethe: Translate EQ_RESOLVE rule (#7400)
Lachnitt [Mon, 25 Oct 2021 21:23:48 +0000 (14:23 -0700)]
[proofs] Alethe: Translate EQ_RESOLVE rule (#7400)

Implementation of the translation of EQ_RESOLVE rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years agoFix spurious checks to closed proofs (#7484)
Andrew Reynolds [Mon, 25 Oct 2021 20:38:28 +0000 (15:38 -0500)]
Fix spurious checks to closed proofs (#7484)

This leads to issues when (1) proofs are enabled, (2) unsat cores are enabled and full proofs are disabled in a subsolver.

This is the case for the abduction algorithm that uses unsat core learning, when proofs are explicitly enabled. This led to spurious assertion failures when testing proof new.

2 years agoJava and python unit tests for mkCardinalityConstraint (#7486)
Andrew Reynolds [Mon, 25 Oct 2021 20:23:31 +0000 (15:23 -0500)]
Java and python unit tests for mkCardinalityConstraint (#7486)

Adds leftover missing unit tests for new API call for mkCardinalityConstraint from eeb78c8.

2 years agoFix more missing uses of CDProof::isSame (#7491)
Andrew Reynolds [Mon, 25 Oct 2021 20:08:28 +0000 (15:08 -0500)]
Fix more missing uses of CDProof::isSame (#7491)

Fixes cvc5/cvc5-projects#306.

2 years agoFix support for global declarations (#7480)
Andrew Reynolds [Mon, 25 Oct 2021 18:23:39 +0000 (13:23 -0500)]
Fix support for global declarations (#7480)

Previously, we asserted global declarations as substitutions/formulas just before check-sat. This is not ideal since the current set of assertions can be preprocessed without having knowledge of definitions of defined functions. Moreover, this could lead to model unsoundness if it were the case that a defined symbol was solved during preprocessing.

Fixes #7479. In that example, y was solved for true and then we failed to overwrite y with its definition (> x 0), hence dropping the definition. Now, y is defined as (> x 0) before we preprocess.

2 years agoRemove HOL/fmf bound messages in set defaults (#7487)
Andrew Reynolds [Mon, 25 Oct 2021 17:15:43 +0000 (12:15 -0500)]
Remove HOL/fmf bound messages in set defaults (#7487)

This block is misleading after the last commit.

2 years agoAdd inference for count map (#7264)
mudathirmahgoub [Mon, 25 Oct 2021 16:36:35 +0000 (11:36 -0500)]
Add inference for count map (#7264)

2 years agoReenable proofs on some regressions (#7483)
Andrew Reynolds [Mon, 25 Oct 2021 15:32:16 +0000 (10:32 -0500)]
Reenable proofs on some regressions (#7483)

2 years ago[proofs] Alethe: Translate SPLIT rule (#7399)
Lachnitt [Mon, 25 Oct 2021 13:26:40 +0000 (06:26 -0700)]
[proofs] Alethe: Translate SPLIT rule  (#7399)

Implementation of the translation of SPLIT rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years ago[Regression Script] Support older Python versions (#7482)
Andres Noetzli [Mon, 25 Oct 2021 11:59:53 +0000 (04:59 -0700)]
[Regression Script] Support older Python versions (#7482)

This removes two uses of f-strings, which are not supported by Python
<3.6.

2 years agoDelete redundant file option_Info.cpp (#7477)
mudathirmahgoub [Sun, 24 Oct 2021 20:59:26 +0000 (15:59 -0500)]
Delete redundant file option_Info.cpp (#7477)

2 years agoAdd new eager conflict detection in strings for integer equivalence classes (#7453)
Andrew Reynolds [Sun, 24 Oct 2021 18:31:56 +0000 (13:31 -0500)]
Add new eager conflict detection in strings for integer equivalence classes (#7453)

Required to address Zelkova bottlenecks.

This generalizes the methods for eager prefix/suffix conflicts for strings to do eager lower/upper bound conflicts for integer equivalence classes based on string-specific reasoning about length terms. This avoids cases where Simplex fails to show a concise conflict due to not having access to string reasoning (e.g. strings::ArithEntail) for arithmetic bounds.

The approach can still be improved by inferring fixed length for regular expression memberships, analogous to what is done for prefix/suffix conflicts.

It also changes EqcInfo to store (str.len x) instead of x for length terms.

2 years agoRemove spurious assertoin (#7458)
Andrew Reynolds [Sat, 23 Oct 2021 01:27:14 +0000 (20:27 -0500)]
Remove spurious assertoin (#7458)

Fixes #7439. That benchmark is now "unknown".

2 years agoAdd requires libpoly to regression (#7467)
Andrew Reynolds [Fri, 22 Oct 2021 23:28:09 +0000 (18:28 -0500)]
Add requires libpoly to regression (#7467)

Required to avoid timeout in non-libpoly builds.

FYI @dddejan .

2 years agoRefactor java package name from cvc5 to io.github.cvc5.api (#7340)
mudathirmahgoub [Fri, 22 Oct 2021 23:00:06 +0000 (18:00 -0500)]
Refactor java package name from cvc5 to io.github.cvc5.api (#7340)

This PR refactors java package name from cvc5 to io.github.cvc5.api.
It also refactor the names of cpp and java files.

2 years agoRemove options::X__name (#7414)
Gereon Kremer [Fri, 22 Oct 2021 22:32:33 +0000 (15:32 -0700)]
Remove options::X__name (#7414)

This PR removes the static strings options::module::X__name that hold the primary long option name. We used them to figure out which option an handler function was called on for certain handler functions. This was always a weird way, and the past refactorings have eliminated all these cases.
This also removes the need to the two arguments option and flag to all option handlers.

2 years agoRemove stale pointer to proof node manager from skolemize utility (#7471)
Andrew Reynolds [Fri, 22 Oct 2021 22:21:02 +0000 (17:21 -0500)]
Remove stale pointer to proof node manager from skolemize utility (#7471)

Issue was introduced when cleaning this utility to the new style (to not take explicit pnm).

2 years ago[proof] Fixing CHAIN_RESOLUTION checker (#7465)
Haniel Barbosa [Fri, 22 Oct 2021 22:08:27 +0000 (19:08 -0300)]
[proof] Fixing CHAIN_RESOLUTION checker (#7465)

Previously the checker was doing things in a smart way that could lead to issues when a clause coincided with a singleton clause as a literal of another clause within the chain.

Fixes cvc5/cvc5-projects#310

2 years agoFix out-of-sync pruning in CDCAC proofs (#7470)
Gereon Kremer [Fri, 22 Oct 2021 21:49:50 +0000 (14:49 -0700)]
Fix out-of-sync pruning in CDCAC proofs (#7470)

This PR resolves a subtle issue with CDCAC proofs.
The CDCAC proof is maintained as a tree where (mostly) every node corresponds to an (infeasible) interval generated within the CDCAC method. We prune these intervals regularly to get rid of redundant intervals, which also sorts intervals. The pruning however relied on a stable ordering of both intervals and child nodes within the proof tree, as there was no easy way to map nodes back to intervals.
This PR adds an objectId field to the proof tree nodes and assigns ids to the CDCAC intervals. This allows for a robust mapping between the two, even if the interval list is reordered.

Fixes cvc5/cvc5-projects#313.

2 years agoFix another double negation proof issue (#7468)
Gereon Kremer [Fri, 22 Oct 2021 21:37:54 +0000 (14:37 -0700)]
Fix another double negation proof issue (#7468)

This PR fixes another subtle proof issue in the circuit propagator concerning negated ites.
Fixes cvc5/cvc5-projects#309.

2 years agoRemove `--uf-ho` option (#7463)
Andrew Reynolds [Fri, 22 Oct 2021 21:25:37 +0000 (16:25 -0500)]
Remove `--uf-ho` option (#7463)

This option was previously a way of knowing whether higher-order was enabled, which now should be queried via LogicInfo::isHigherOrder.

It also adds an optimization to hasFreeVar required for QCF to be robust and not take a performance hit due to HO operators.

2 years agoFix symmetry issue in theory engine conflicts (#7469)
Andrew Reynolds [Fri, 22 Oct 2021 21:01:37 +0000 (16:01 -0500)]
Fix symmetry issue in theory engine conflicts (#7469)

Fixes --check-proofs on proof-new on regress0/strings/issue5384-double-conflict.smt2.

2 years agoAdd more abduction regressions (#7461)
Andrew Reynolds [Fri, 22 Oct 2021 20:48:25 +0000 (15:48 -0500)]
Add more abduction regressions (#7461)

Fixes #5848.

This also fixes an issue leftover from #6605 where a spurious assertion failure was thrown.

Also introduces subfolder regress/regress1/abduction.

2 years ago[proofs] Alethe: Translate FACTORING rule (#7398)
Lachnitt [Fri, 22 Oct 2021 19:00:52 +0000 (12:00 -0700)]
[proofs] Alethe: Translate FACTORING rule (#7398)

Implementation of the translation of FACTORING rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years ago[proofs] Alethe: Translate CHAIN_RESOLUTION rule (#7397)
Lachnitt [Fri, 22 Oct 2021 18:38:47 +0000 (11:38 -0700)]
[proofs] Alethe: Translate CHAIN_RESOLUTION rule (#7397)

Implementation of the translation of RESOLUTION and CHAIN_RESOLUTION rules into the Alethe calculus.

Co-authored-by: Haniel Barbosa <hanielbbarbosa@gmail.com>
2 years agoMake CAD proofs user context dependent (#7466)
Gereon Kremer [Fri, 22 Oct 2021 18:08:33 +0000 (11:08 -0700)]
Make CAD proofs user context dependent (#7466)

Given that arithmetic lemmas can survive the current (sat) context by being buffered in the inference manager, their proofs need to do as well. This PR changes the CAD proofs to be user context dependent.

Fixes cvc5/cvc5-projects#315.

2 years agoRefactor theory inference manager constructor (#7457)
Andrew Reynolds [Fri, 22 Oct 2021 16:56:05 +0000 (11:56 -0500)]
Refactor theory inference manager constructor (#7457)

Eliminates a style where proof node manager was passed as an argument to indicate proofs enabled if non-null. All theory inference managers now check Env::isTheoryProofProducing instead.

Since BV did not pass a proof node manager to its inference manager, this PR also incidentally enables equality engine proofs for BV.

2 years agoMaking `IntBlaster` inherit from `EnvObj` (#7431)
yoni206 [Fri, 22 Oct 2021 14:56:39 +0000 (17:56 +0300)]
Making `IntBlaster` inherit from `EnvObj` (#7431)

This PR makes the IntBlaster class inherit from EnvObj, along with derived modifications.

2 years agoDo not use global proxy variable attribute for strings (#7460)
Andrew Reynolds [Fri, 22 Oct 2021 14:39:26 +0000 (09:39 -0500)]
Do not use global proxy variable attribute for strings (#7460)

Fixes #6180.

2 years agoFix memory management of `ErrorInformation` (#7388)
Andres Noetzli [Fri, 22 Oct 2021 00:43:54 +0000 (17:43 -0700)]
Fix memory management of `ErrorInformation` (#7388)

Fixes
https://scan6.coverity.com/reports.htm#v37053/p11644/fileInstanceId=125548448&defectInstanceId=32441274&mergedDefectId=1453884.

2 years agoAdd missing methods to Solver.java (#7299)
mudathirmahgoub [Fri, 22 Oct 2021 00:22:00 +0000 (19:22 -0500)]
Add missing methods to Solver.java (#7299)

A life of solver object was simple before summer. Then it got complicated with getDifficulty, optional proofs getProof, more assumptions addSygusAssume, and finally different options to choose from OptionInfo.
This PR attempts to prepare solver objects for this new life.

2 years agoMake expression mining use configurable options and logic (#7426)
Andrew Reynolds [Fri, 22 Oct 2021 00:04:21 +0000 (19:04 -0500)]
Make expression mining use configurable options and logic (#7426)

Required for doing options-specific internal fuzzing using SyGuS.

2 years agodocs: Use light gray for background on the right. (#7438)
Aina Niemetz [Thu, 21 Oct 2021 21:37:05 +0000 (14:37 -0700)]
docs: Use light gray for background on the right. (#7438)

2 years agoAlso fix case of negated ite (#7454)
Gereon Kremer [Thu, 21 Oct 2021 21:07:08 +0000 (14:07 -0700)]
Also fix case of negated ite (#7454)

This PR follows #7452 and fixes the proofs generated for backward propagation of negated ite terms.

2 years agoFix symmetric proof issue for ITE in circuit propagator (#7452)
Gereon Kremer [Thu, 21 Oct 2021 19:10:26 +0000 (12:10 -0700)]
Fix symmetric proof issue for ITE in circuit propagator (#7452)

This PR goes back to #7446 and implements a proper fix that handles both symmetrical cases.

2 years agoSplit utilites from CEGIS core connective module (#7441)
Andrew Reynolds [Thu, 21 Oct 2021 18:48:56 +0000 (13:48 -0500)]
Split utilites from CEGIS core connective module (#7441)

Towards a new module for enumerating unsat queries via SyGuS.

2 years ago[Regression Script] Fix printing of error diff (#7451)
Andres Noetzli [Thu, 21 Oct 2021 18:13:52 +0000 (11:13 -0700)]
[Regression Script] Fix printing of error diff (#7451)

2 years ago[proofs] Fix open proof in SAT solver due to cycles (#7448)
Haniel Barbosa [Thu, 21 Oct 2021 17:14:24 +0000 (14:14 -0300)]
[proofs] Fix open proof in SAT solver due to cycles (#7448)

2 years agoAdd regression (#7447)
Gereon Kremer [Thu, 21 Oct 2021 16:48:47 +0000 (09:48 -0700)]
Add regression (#7447)

This PR fixes a proof for an xor term that failed to eliminate a double negation.

Fixes cvc5/cvc5-projects#304

2 years agoFix incorrect proof from ITE in circuit propagator (#7446)
Gereon Kremer [Thu, 21 Oct 2021 16:33:23 +0000 (09:33 -0700)]
Fix incorrect proof from ITE in circuit propagator (#7446)

This PR fixes an incorrect proof in the circuit propagator related to back-propagation of an ite term.
Fixes cvc5/cvc5-projects#305.

2 years agoRefactor regressions script (#7249)
Andres Noetzli [Thu, 21 Oct 2021 15:34:26 +0000 (08:34 -0700)]
Refactor regressions script (#7249)

This makes the regression script more modular by refactoring all the
different checks into separate classes, which makes it easier to add
additional tests and to run only a subset of the tests.

2 years agoMake cardinality constraint a nullary operator (#7333)
Andrew Reynolds [Thu, 21 Oct 2021 14:11:57 +0000 (09:11 -0500)]
Make cardinality constraint a nullary operator (#7333)

This makes cardinality constraints nullary operators. This eliminates hacks for supporting these previously.

It also removes an unimplemented kind CARDINALITY_VALUE.

Notice that the parser and printer now do not use a common syntax for cardinality constraints, this will be resolved on followup PRs.

2 years agoWorking on windows builds (#7381)
Gereon Kremer [Thu, 21 Oct 2021 12:31:59 +0000 (05:31 -0700)]
Working on windows builds (#7381)

This makes a push to fix our windows nightly builds. It does a couple of things:
- remove `CVC5_WINDOWS_BUILD` and check `CMAKE_SYSTEM_NAME` instead
- use `CMAKE_SHARED_LIBRARY_SUFFIX` instead of `so`
- properly set `IMPORTED_IMPLIB` on imported shared libraries
- fix the GMP build, where the header is different for shared and static builds
- fix the find&sed patching for libpoly
- add `CVC5_EXPORT` to nested types in the API
- remove `CVC5_EXPORT` from enums
- add `-Dcvc5_obj_EXPORTS` to actually enable exports
- Fix how template function `safe_print` is exported.

2 years agoAdd setup to generate graphs for cmake target dependencies (#7383)
Gereon Kremer [Thu, 21 Oct 2021 12:10:20 +0000 (05:10 -0700)]
Add setup to generate graphs for cmake target dependencies (#7383)

This adds the target `target-graphs` that generated graphs of cmake dependencies based on `cmake --graphviz`. It is a nice to tool to debug the cmake setup in some cases.

2 years agoEnable and fix dump test (#7387)
Andres Noetzli [Thu, 21 Oct 2021 01:31:52 +0000 (18:31 -0700)]
Enable and fix dump test (#7387)

Fixes #1649. The test was not enabled before and was still expecting
CVC-style output.

2 years agoFix (#7437)
Gereon Kremer [Thu, 21 Oct 2021 01:22:55 +0000 (18:22 -0700)]
Fix (#7437)

This PR reintroduces support for the (deprecated) option interactive-mode. It was erroneously removed in #7295.

Fixes #7379.