3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-15 05:18:44 +00:00
Commit graph

1090 commits

Author SHA1 Message Date
Nikolaj Bjorner 09a2ba4931 remove artificial usage of function, it causes another compiler warning to refer to a function without arguments. 2022-10-25 10:28:25 -07:00
Nikolaj Bjorner fc30461828 unused variables
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-20 09:09:06 -07:00
Nikolaj Bjorner d22c86f9fe init spacer_iuc_solver properly
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-10-03 15:53:58 -04:00
Nuno Lopes 47e44c5538 fix build 2022-10-01 12:17:15 +01:00
Nikolaj Bjorner 903cddcaaa fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-09-30 17:10:18 -04:00
Nikolaj Bjorner 107981f099 update proof formats for new core
- update proof format for quantifier instantiation to track original literals
- update proof replay tools with ability to extract proof object

The formats and features are subject to heavy revisions.

Example
```
(set-option :sat.euf true)
(set-option :sat.smt.proof eufproof.smt2)
(declare-fun f (Int) Int)
(declare-const x Int)
(assert (or (= (f (f (f x))) x) (= (f (f x)) x)))
(assert (not (= (f (f (f (f (f (f x)))))) x)))
(check-sat)
```

eufproof.smt2 is:
```
(declare-fun x () Int)
(declare-fun f (Int) Int)
(define-const $24 Int (f x))
(define-const $25 Int (f $24))
(define-const $26 Int (f $25))
(define-const $27 Bool (= $26 x))
(define-const $28 Bool (= $25 x))
(assume $27 $28)
(define-const $30 Int (f $26))
(define-const $31 Int (f $30))
(define-const $32 Int (f $31))
(define-const $33 Bool (= $32 x))
(assume (not $33))
(declare-fun rup () Proof)
(infer (not $33) rup)
(declare-fun euf (Bool Bool Proof Proof Proof Proof) Proof)
(declare-fun cc (Bool) Proof)
(define-const $42 Bool (= $32 $30))
(define-const $43 Proof (cc $42))
(define-const $40 Bool (= $31 $24))
(define-const $41 Proof (cc $40))
(define-const $38 Bool (= $30 $25))
(define-const $39 Proof (cc $38))
(define-const $36 Bool (= $24 $26))
(define-const $37 Proof (cc $36))
(define-const $34 Bool (not $33))
(define-const $44 Proof (euf $34 $28 $37 $39 $41 $43))
(infer (not $28) $33 $44)
(infer (not $28) rup)
(infer $27 rup)
(declare-fun euf (Bool Bool Proof Proof Proof) Proof)
(define-const $49 Bool (= $32 $26))
(define-const $50 Proof (cc $49))
(define-const $47 Bool (= $31 $25))
(define-const $48 Proof (cc $47))
(define-const $45 Bool (= $24 $30))
(define-const $46 Proof (cc $45))
(define-const $51 Proof (euf $34 $27 $46 $48 $50))
(infer $33 $51)
(infer rup)
```

Example of inspecting proof from Python:

```
from z3 import *

def parse(file):
    s = Solver()
    set_option("solver.proof.save", True)
    set_option("solver.proof.check", False)
    s.from_file(file)
    for step in s.proof().children():
        print(step)

parse("../eufproof.smt2")
```

Proof checking (self-validation) is on by default.
Proof saving is off by default.

You can use the proof logs and the proof terms to retrieve quantifier instantiations from the new core.

The self-checker contains a few built-in tuned checkers but falls back to self-checking inferred clauses using SMT.
2022-09-28 10:40:43 -07:00
Arie Gurfinkel eb2b95e5fe spacer: trying to make C++ happy 2022-09-01 15:44:22 -07:00
Arie Gurfinkel d2b618df23
Spacer Global Guidance (#6026)
* Make spacer_sem_matcher::reset() public

* Add .clang-format for src/muz/spacer

* Mark substitution::get_bindings() as const

* Fix in spacer_antiunify

* Various helper methods in spacer_util

Minor functions to compute number of free variables, detect presence of certain
sub-expressions, etc.

The diff is ugly because of clang-format

* Add spacer_cluster for clustering lemmas

A cluster of lemmas is a set of lemmas that are all instances of the same
pattern, where a pattern is a qff formula with free variables.

Currently, the instances are required to be explicit, that is, they are all
obtained by substituting concrete values (i.e., numbers) for free variables of
the pattern.

Lemmas are clustered in cluster_db in each predicate transformer.

* Integrate spacer_cluster into spacer_context

* Custom clang-format pragmas for spacer_context

spacer_context.(cpp|h) are large and have inconsistent formatting. Disable
clang-format for them until merge with main z3 branch and re-format.

* Computation of convex closure and matrix kernel

Various LA functions. The implementations are somewhat preliminary.

Convex closure is simplemented via syntactic convex closure procedure.
Kernel computation considers many common cases.

spacer_arith_kernel_sage implements kernel computation by call external
Sage binary. It is used only for debugging and experiments. There is no
link dependence on Sage. If desired, it can be removed.

* Add spacer_concretize

* Utility methods for spacer conjecture rule

* Add spacer_expand_bnd_generalizer

Generalizes arithmetic inequality literals of the form x <= c,
by changing constant c to other constants found in the problem.

* Add spacer_global_generalizer

Global generalizer checks every new lemma against a cluster
of previously learned lemmas, and, if possible, conjectures
a new pob, that, when blocked, generalizes multiple existing
lemmas.

* Remove fp.spacer.print_json option

The option is used to dump state of spacer into json for debugging.

It has been replaced by `fp.spacer.trace_file` that allows dumping an execution
of spacer. The json file can be reconstructed from the trace file elsewhere.

* Workaround for segfault in spacer_proof_utils

Issue #3 in hgvk94/z3

Segfault in some proof reduction. Avoid by bailing out on reduction.

* Revert bug for incomplete models

* Use local fresh variables in spacer_global_generalizer

* Cleanup of spacer_convex_closure

* Allow arbitrary expressions to name cols in convex_closure

* WIP: convex closure

* WIP: convex closure

* Fix bindings order in spacer_global_generalizer

The matcher creates substitution using std_order, which is
reverse of expected order (variable 0 is last). Adjust the code
appropriately for that.

* Increase verbosity level for smt_context stats

* Dead code in qe_mbp

* bug fixes in spacer_global_generalizer::subsumer

* Partially remove dependence of size of m_alphas

I want m_alphas to potentially be greater than currently used alpha variables.
This is helpful for reusing them across multiple calls to convex closure

* Subtle bug in kernel computation

Coefficient was being passed by reference and, therefore, was
being changed indirectly.

In the process, updated the code to be more generic to avoid rational
computation in the middle of matrix manipulation.

* another test for sparse_matrix_ops::kernel

* Implementation of matrix kernel using Fraction Free Elimination

Ensures that the kernel is int for int matrices. All divisions are exact.

* clang-format sparse_matrix_ops.h

* another implementation of ffe kernel in sparse_matrix_ops

* Re-do arith_kernel and convex_closure

* update spacer_global_generalization for new subsumer

* remove spacer.gg.use_sage parameter

* cleanup of spacer_global_generalizer

* Removed dependency on sage

* fix in spacer_convex_closure

* spacer_sem_matcher: consider an additional semantic matching

disabled until it is shown useful

* spacer_global_generalizer: improve do_conjecture

 - if conjecture does not apply to pob, use lemma instead
 - better normalization
 - improve debug prints

* spacer_conjecture: formatting

* spacer_cluster: improve debug prints

* spacer_context: improve debug prints

* spacer_context: re-queue may pobs

enabled even if global re-queue is disabled

* spacer_cluster print formatting

* reset methods on pob

* cleanup of print and local variable names

* formatting

* reset generalization data once it has been used

* refactored extra pob creation during global guidance

* fix bug copying sparse matrix into spacer matrix

* bug fix in spacer_convex_closure

* formatting change in spacer_context

* spacer_cluster: get_min_lvl

chose level based on pob as well as lemmas

* spacer_context: add desired_level to pob

desired_level indicates at which level pob should be proved.
A pob will be pushed to desired_level if necessary

* spacer_context: renamed subsume stats

the name of success/failed was switched

* spacer_convex_closure: fix prototype of is_congruent_mod()

* spacer_convex_closure: hacks in infer_div_pred()

* spacer_util: do not expand literals with mod

By default, equality literal t=p is expanded into t<=p && t>=p

Disable the expansion in case t contains 'mod' operator since such
expansion is usually not helpful for divisibility

* spacer_util: rename m_util into m_arith

* spacer_util: cleanup normalize()

* spacer_util: formatting

* spacer_context: formatting cleanup on subsume and conjecture

* spacer_context: fix handling may pobs when abs_weakness is enabled

A pob might be undef, so weakness must be bumped up

* spacer_arith_kernel: enhance debug print

* spacer_global_generalizer: improve matching on conjecture

* spacer_global_generalizer: set desired level on conjecture pob

* spacer_global_generalizer: debug print

* spacer_global_generalizer: set min level on new pobs

the new level should not be higher than the pob that was generalized

* spacer_global_generalizer: do no re-create closed pobs

If a generalized pob exist and closed, do not re-create it.

* spacer_context: normalize twice

* spacer_context: forward propagate only same kind of pobs

* sketch of inductive generalizer

A better implementation of inductive generalizer that in addition to dropping
literals also attempts to weaken them.

Current implementation is a sketch to be extended based on examples/requirements.

* fix ordering in spacer_cluster_util

* fix resetting of substitution matcher in spacer_conjecture

Old code would forget to reset the substitution provided to the sem_matcher.
Thus, if the substitution was matched once (i.e., one literal of interest is
found), no other literal would be matched.

* add spacer_util is_normalized() method

used for debugging only

* simplify normalization of pob expressions

pob expressions are normalized to increase syntactic matching.
Some of the normalization rules seem out of place, so removing them for now.

* fix in spacer_global_generalizer

If conjecture fails, do not try other generalization strategies -- they will not apply.

* fix in spacer_context

do not check that may pob is blocked by existing lemmas.
It is likely to be blocked. Our goal is to block it again and generalize
to a new lemma.

This can be further improved by moving directly to generalization when pob is
blocked by existing lemmas...

Co-authored-by: hgvk94 <hgvk94@gmail.com>
2022-08-30 15:47:00 -07:00
Bruce Mitchener 6ba9ada1e2
Fix typos. (#6291) 2022-08-21 12:40:07 -07:00
Bruce Mitchener 5014b1a34d Use = default for virtual constructors. 2022-08-05 18:11:46 +03:00
Bruce Mitchener 1d9345c3de Fix typos. 2022-08-05 07:40:50 +03:00
Bruce Mitchener 82d853e5f8 Use = delete to delete special methods.
This provides a better experience than just marking them as
private and leaving them as undefined symbols.
2022-08-02 09:23:14 +03:00
Jakob Rath 79ee543d25 Move tbv to util 2022-08-01 18:37:11 +03:00
Bruce Mitchener 5d0dea05aa
Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
Bruce Mitchener 3e38bbb009
Make sure all headers do #pragma once. (#6188) 2022-07-23 10:41:14 -07:00
Nuno Lopes 73a24ca0a9 remove '#include <iostream>' from headers and from unneeded places
It's harmful to have iostream everywhere as it injects functions in the compiled files
2022-06-17 14:10:19 +01:00
Nikolaj Bjorner 14214c5a07 exposing user propagators over .Net
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-05-07 11:08:40 -07:00
Nikolaj Bjorner 3cc9d7f443 improve pre-processing 2022-04-15 12:55:26 +02:00
Nikolaj Bjorner 011c1b2dd2 remove refs to bare_str 2022-04-09 12:06:27 +02:00
Nikolaj Bjorner f053daa051 fix #5906
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-20 11:24:42 -07:00
Nikolaj Bjorner a9d7026724 add note about transform
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-18 19:13:35 -07:00
Nikolaj Bjorner 669a1d63da na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-18 16:36:16 -07:00
Nikolaj Bjorner 6010d751ed fix #5903
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-03-18 16:21:47 -07:00
Hari Govind V K f26c12a9ad
fix #5882. Use model true when inlining (#5892) 2022-03-09 12:31:39 -08:00
Lorenzo Veronese e3568d5b47
Handle additional cases in rule_properties::check_accessor (#5821)
* Handle additional cases in rule_properties::check_accessor

* Walk parents depth first in rule_properties::check_accessor
2022-03-07 07:49:59 -08:00
Nikolaj Bjorner bbadd17d56 fix #5874 2022-03-02 08:46:28 -08:00
Nikolaj Bjorner 2b6dadcbc6 fix #5869
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-02-28 17:02:13 -08:00
Nikolaj Bjorner 7f149a36d7 refining model update rules for del_rule #5865 #5866 2022-02-25 08:03:46 -08:00
Nikolaj Bjorner 6be0a66b38 fix #5863 2022-02-22 13:00:20 -08:00
Nikolaj Bjorner c2f1bdc099 fix #5862 2022-02-22 08:05:05 -08:00
Nikolaj Bjorner d06c51d517 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-02-21 17:46:54 -08:00
Nikolaj Bjorner 061e94d723 #5858
COI model converter has to use constraints from the body and work in disjunctive mode. It needs a pre-condition that the body does not depend on other rules, in the case that it is used in a different pre-processing step for in-lining. The in-lined occurrence of the predicate has to correspond to the model construction version.
2022-02-21 17:45:00 -08:00
Nikolaj Bjorner e8d4804dbb
Revert "use horn_subsume_model_converter in coi filter (#5844)" (#5859)
This reverts commit 09da87dc85.
2022-02-21 04:33:52 -08:00
Nikolaj Bjorner d0d4ab7955 #5820 2022-02-20 10:33:29 +02:00
Valentine Sobol 09da87dc85
use horn_subsume_model_converter in coi filter (#5844) 2022-02-16 23:35:58 +02:00
Nikolaj Bjorner f639a7e1bc add marker for top-level expression in rule. 2022-01-24 15:20:44 +01:00
Nikolaj Bjorner 61ab72b6a3 fix #4869 2022-01-24 15:14:47 +01:00
Nikolaj Bjorner 08294d62e5 separate dependencies for qe_lite 2022-01-12 03:26:22 -08:00
Nikolaj Bjorner fc77345bec breaking change. Enforce append semantics everywhere for parameter updates #5744
Replace semantics doesn't work with assumptions made elsewhere in code.
The remedy is to apply append (override) semantics for parameter changes.
2021-12-30 19:11:14 -08:00
Nikolaj Bjorner 6cc9aa3562 prepare user propagator declared functions for likely Clemens use case 2021-12-16 19:37:30 -08:00
Nikolaj Bjorner a099972354 fix #5714
It is not unlike other fuzz bugs: it exercises some behavior that applications are unlikely to expose. In this case, a rule body expanded into a conjunction with more than 1M formulas (with a lot of repetition). The original rule representation assumed silently that the number of constraints in a body would fit within 20 bits, but reality allowed bodies with as many as 2^{32} - 1 constraints.
So "minimizing" the bug as @agurfinkel asks for seems not to make too much sense.

Just running the samples in debug mode  points to the root cause.

Since fuzz bugs are not from applications and fuzz tools have the potential for creating a large number of issues, I find it reasonable to push some basic pro-active asks on filers:

- reproduce bug in debug builds to assess whether a debug assert triggers.
- minimize or keep it simpler when possible (in this case it does not apply)
- perform basic diagnostics/triage. I am basically asking to push this part of the work on to the fuzzer. Otherwise, addressing random bugs doesn't scale. Triaging should have pointed to the root cause.

Now, there tends to be something to learn from bugs. In this case, the question was: "can we avoid constraints with duplications"? In particular, it points to a basic inefficiency of extracting conjunctions (and disjunctions). The function didn't deduplicate. So I added deduplication into this function. It is used throughout z3 code base so could expose latent issues. We will see.
2021-12-16 10:20:53 -08:00
Nikolaj Bjorner 9f2b18cac5 add tactic name
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-07 13:37:57 -08:00
Henrich Lauko 96671cfc73
Add and fix a few general compiler warnings. (#5628)
* rewriter: fix unused variable warnings

* cmake: make missing non-virtual dtors error

* treewide: add missing virtual destructors

* cmake: add a few more checks

* api: add missing virtual destructor to user_propagator_base

* examples: compile cpp example with compiler warnings

* model: fix unused variable warnings

* rewriter: fix logical-op-parentheses warnings

* sat: fix unused variable warnings

* smt: fix unused variable warnings
2021-10-29 15:42:32 +02:00
Alexander Traud 1d45a33163
fix one typo and two misunderstandings for doxygen (#5633) 2021-10-29 15:35:05 +02:00
Alexander Traud d1592c6abf
fix misspelled \brief for doxygen (#5632) 2021-10-29 15:34:28 +02:00
Nikolaj Bjorner b723e1093b misc warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-31 17:16:59 -07:00
Jakob Rath 46f8b15c14
ref/ref_vector minor convenience changes (#5322)
* Add ref_vector_core::push_back(ref<T>&&)

* Make operator bool() explicit
2021-05-31 10:27:46 -07:00
Nuno Lopes f1e0d5dc8a remove a hundred implicit constructors/destructors 2021-05-23 14:25:01 +01:00
Nikolaj Bjorner 4a6083836a call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
Nikolaj Bjorner 15a7621e27 remove template dependency for trail objects 2021-03-19 11:15:05 -07:00
Nuno Lopes 4a3d63f9e4 NNF: dont allocate act_cache separately 2021-02-21 16:34:28 +00:00
Nuno Lopes e773e1e78d fix a few more warnings 2021-02-19 12:16:05 +00:00
Nuno Lopes d6ce9cce95 fix clang warnings 2021-02-19 10:59:22 +00:00
Nuno Lopes 5e034e495f fix compiler warnings 2021-02-19 10:33:41 +00:00
Nikolaj Bjorner 00dab30ea0 remove binary_function
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-02-18 13:18:58 -08:00
Nikolaj Bjorner a152bb1e80 remove template Context dependency in every trail object 2021-02-08 15:41:57 -08:00
Nikolaj Bjorner 0ec567fe15 integrate v2 of lns 2021-02-04 15:47:40 -08:00
Nikolaj Bjorner fb1509d011 expose internal API for set_phase 2021-02-02 14:29:06 -08:00
Nikolaj Bjorner 8f577d3943 remove ast_manager get_sort method entirely 2021-02-02 13:57:01 -08:00
Nikolaj Bjorner 3ae4c6e9de refactor get_sort 2021-02-02 04:45:54 -08:00
Nikolaj Bjorner 4455f6caf8 move to get_sort as method, add opt_lns pass, disable xor simplification unless configured, fix perf bug in model converter update trail 2021-02-02 03:58:19 -08:00
Nikolaj Bjorner 22b0c3aa70 add priority queue to instantiation 2021-01-31 16:17:36 -08:00
Nikolaj Bjorner 8521d2caaa check engine configuration for unsupported engines #4898
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-12-18 14:38:42 -08:00
Nikolaj Bjorner f71204c222 fix #4879 2020-12-12 13:37:25 -08:00
Nikolaj Bjorner 8cb30d0505 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-12-12 12:21:34 -08:00
Nikolaj Bjorner 89fb55a864 fix #4890
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-12-12 12:20:53 -08:00
Nikolaj Bjorner 43ddb08332 fix #4874 2020-12-08 12:08:07 -08:00
Nikolaj Bjorner 430b4ea252 fix #4870 2020-12-07 17:52:56 -08:00
Nikolaj Bjorner 27dac3e1a0 fix #4844 2020-12-07 05:54:50 -08:00
Nikolaj Bjorner 2f756da294
adding dt-solver (#4739)
* adding dt-solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* dt

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* move mbp to self-contained module

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* files

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* Create CMakeLists.txt

* dt

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* rename to bool_var2expr to indicate type class

* mbp

* na
2020-10-18 15:28:21 -07:00
Nikolaj Bjorner 367e5fdd52
delay internalize (#4714)
* adding array solver

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* use default in model construction

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* debug delay internalization

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* bv

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* arrays

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* get rid of implied values and bounds

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* redo egraph

* remove out

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* remove files

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-09-28 19:24:16 -07:00
Nikolaj Bjorner 6f63f8761c
optimizations to bv-solver and euf-egraph (#4698)
* additional bit-vector propagators

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* rename restrict (not a keyword, but well) #4694, tune euf

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* merge

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* add pb rewriting to pb2bv #4697

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-09-20 06:47:27 -07:00
Nikolaj Bjorner 796e2fd9eb
arrays (#4684)
* arrays

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* arrays

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* arrays

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* fill

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* update drat and fix euf bugs

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* const qualifiers

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* reorg ba

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* reorg

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* build warnings

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-09-13 19:29:59 -07:00
Nikolaj Bjorner cfa7c733db
fixing #4670 (#4682)
* fixing #4670

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* init

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* arrays

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* arrays

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* arrays

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* na

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-09-10 04:35:11 -07:00
Nikolaj Bjorner 59d8895d15 add accessors for implied values to API
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-28 19:46:39 -07:00
Nikolaj Bjorner 00491148f0 string
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-20 10:22:57 -07:00
Nuno Lopes bb26f219fe remove unneeded constructors (last round) 2020-07-12 17:41:57 +01:00
Nuno Lopes 23e6adcad3 fix a couple hundred deref-after-free bugs due to .c_str() on a temporary string 2020-07-11 20:24:45 +01:00
Nikolaj Bjorner d0e20e44ff booyah
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-04 15:56:30 -07:00
Arie Gurfinkel 07a1aea689 fix(spacer): bug in assign_bounds to Farkas conversion
The fix is to remove a hack that used a theory rewriter to simplify
the conversion. Now the conversion happens less often than possible.
Will need more thinking to fix properly.

The unsoundness at this point would cause SPACER to generate lemmas
that do not block a proof obligation and then get stuck in an infinite loop
blocking and generating the same lemma.
2020-06-18 21:19:53 -04:00
Nikolaj Bjorner f999c14a1e close #4429
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-04 01:33:28 -07:00
Nikolaj Bjorner 743573aac5 fix #4447, or mask it
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-03 19:32:05 -07:00
Nikolaj Bjorner af90992858 fix #4404
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-03 17:01:36 -07:00
Nikolaj Bjorner f986ae97bd fix build
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-03 15:12:08 -07:00
Nikolaj Bjorner 3a7df2c6ef fix various nullability checks in seq_regex
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-03 12:28:32 -07:00
Nikolaj Bjorner 38176256c4 fix #4434
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-03 10:12:49 -07:00
Nikolaj Bjorner 6e47499e26 fix #4434
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-06-03 10:09:18 -07:00
Andrew V. Jones a23ca1792b
Ensure that Z3 uses the correct SMT-LIB2 syntax for push and pop (#4495)
* When pretty-printing SMTLIB2, ensure that Z3 uses the correct syntax for 'push'

Signed-off-by: Andrew V. Jones <andrew.jones@vector.com>

* When pretty-printing SMTLIB2, ensure that Z3 uses the correct syntax for 'pop'

Signed-off-by: Andrew V. Jones <andrew.jones@vector.com>
2020-06-03 09:35:14 -07:00
Nikolaj Bjorner ea1f50b77e simplify extended contains patterns
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-05-28 19:11:29 -07:00
Hari Govind V K b7d7ff38cb
bug fix. Handle unknown without model (#4443) 2020-05-22 10:12:42 -07:00
Hari Govind V K ed92b8437c
fix #4054 (#4277)
* flag when quantified lemmas are added to smt_context

* When solver returns unknown but cannot create child, return unknown

* handle unknowns when qlemmas and weak_abs are turned on
2020-05-21 09:58:09 -07:00
Nikolaj Bjorner 09d881cce5 na 2020-05-02 15:54:12 -07:00
Nikolaj Bjorner 75859ef4e4 model anomaly fix #4171 2020-05-02 15:53:46 -07:00
Nikolaj Bjorner 397bf2dec6 move windows dependencies down 2020-04-30 19:31:11 -07:00
Hari Govind V K dbfa3dd7f1
[spacer] implement spacer::is_clause() (#4170)
Spacer has a different defintion of is_clause() than ast_util.
It is currently only used in assertions.

Main difference:
  x=y
where x and y are Bool atoms is considered to be an atom, so that
(or (= x y) (not (= z y)))
is a literal

Co-authored-by: Arie Gurfinkel <arie.gurfinkel@uwaterloo.ca>
2020-04-30 14:03:48 -07:00
Nikolaj Bjorner e67112f289 NYI control paths 2020-04-28 20:19:20 -07:00
Nikolaj Bjorner a0de244487 pleay nice with alignment
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-26 23:29:42 -07:00
Nikolaj Bjorner a884201d62 remove using insert_if_not_there2
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-25 15:08:51 -07:00
Nikolaj Bjorner caa5b09046 fix #4050 - have to delay model compression because it may use internal symbols that have to be transformed. model compression is used prior to displaying certificate
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-22 13:33:36 -07:00
Nikolaj Bjorner eded7d023d fix #4006
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-04-19 16:00:03 -07:00