Nikolaj Bjorner
806a4772bc
revert effect of filtering unsupported
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-20 17:28:24 -08:00
Nikolaj Bjorner
4e6d498a60
adding placeholder for refining power of 2
2023-01-20 14:37:05 -08:00
Nikolaj Bjorner
0f4f32c5d0
apply relevancy filtering on unsupported ops, fix term construction bug in bv2fpa_converter fix #6548
2023-01-20 13:05:01 -08:00
Nikolaj Bjorner
f3d6856736
remove msf example, add option to make model converter not reduce models
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-19 20:24:31 -08:00
Nikolaj Bjorner
7368f9f7d3
increase build version, better propagation in euf-egraph, handle assumptions in sat.smt
...
- increase build version to 4.12.1. This prepares updated release for MacOs-11 build on x86
- move literal propagation mode in euf-egraph to a callback and traversal of equivalence class. Track antecedent by newest equality instead of root. This makes equality propagation to literals have similar behavior as in legacy solver and appears to result in a speedup (10% fewer conflicts on QF_UF/QG-classification/qg5/iso_icl478.smt2 in preliminary testing)
- fix interaction of pre-processing and assumptions. Pre-processing has to freeze assumption literals so they don't get eliminated. This is similar to dependencies that are already frozen.
2023-01-17 14:07:07 -08:00
Nikolaj Bjorner
dde5218b29
fix mbqi value caching issue raised by Clemens and Martin
2023-01-15 22:47:34 -05:00
Nikolaj Bjorner
4f7f4376b8
fix bug in new core not detecting conflict, fix #6525 , add tactic doc
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-14 17:20:43 -05:00
Nikolaj Bjorner
8970a54eaa
expose parameters to control behavior for #5660
2023-01-10 22:06:19 -08:00
Nikolaj Bjorner
d415f07386
memory leak on proof justifications
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-10 18:58:25 -08:00
Nikolaj Bjorner
c3e31149a5
fix #6530
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-10 13:43:17 -08:00
Nikolaj Bjorner
1ddef117a2
several fixes to proof logging in legacy solver
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-08 16:11:31 -08:00
Nikolaj Bjorner
fcea32344e
add missing tactic descriptions, add rewrite for tamagochi
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2023-01-08 13:32:26 -08:00
Nuno Lopes
d30cb55bae
don't flush stream when printing param vals
2023-01-03 09:35:17 +00:00
Nikolaj Bjorner
f6d411d54b
experimental feature to access congruence closure of SimpleSolver
...
This update includes an experimental feature to access a congruence closure data-structure after search.
It comes with several caveats as pre-processing is free to eliminate terms. It is therefore necessary to use a solver that does not eliminate the terms you want to track for congruence of. This is partially addressed by using SimpleSolver or incremental mode solving.
```python
from z3 import *
s = SimpleSolver()
x, y, z = Ints('x y z')
s.add(x == y)
s.add(y == z)
s.check()
print(s.root(x), s.root(y), s.root(z))
print(s.next(x), s.next(y), s.next(z))
```
2022-12-30 21:41:27 -08:00
Nikolaj Bjorner
c0f1f33898
dampen second setup of theory_bv
2022-12-30 18:47:32 -08:00
Nuno Lopes
47324af210
be nicer when memout is reached in SMT internalize: return undef rather than crashing
2022-12-29 11:08:57 +00:00
Nikolaj Bjorner
fe8034731d
fix #6501
2022-12-19 21:02:55 -08:00
Nuno Lopes
d308b8f555
simplify code + remove unused file
2022-12-11 22:11:19 +00:00
Nikolaj Bjorner
847aec1d30
update dependencies
2022-11-30 22:48:10 -08:00
Nikolaj Bjorner
529f116be0
disable new code until pre-condition gets fixed
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-11-30 22:29:59 -08:00
Nikolaj Bjorner
85f9c7eefa
replace restore_size_trail by more generic restore_vector
...
other updates:
- change signature of advance_qhead to simplify call sites
- have model reconstruction replay work on a tail of dependent_expr state, while adding formulas to the tail.
2022-11-28 11:45:56 +07:00
Nikolaj Bjorner
0a671f2f44
fix #6464
2022-11-23 17:21:51 +07:00
Nikolaj Bjorner
0a28bacd0f
remove debug out
2022-11-23 16:42:36 +07:00
Nikolaj Bjorner
6188c536ef
add logging of propagations to smt core
...
log theory propagations with annotation "smt".
It allows tracking theory propagations (when used in conflicts) in the clause logs similar to the new core.
2022-11-23 11:37:23 +07:00
Nikolaj Bjorner
5374142e3e
continue updates for adding proof-log to smt core
2022-11-23 11:37:23 +07:00
Nikolaj Bjorner
bfae8b2162
set flat_and_or to false in bv rewriter
2022-11-15 05:47:28 -08:00
Nikolaj Bjorner
cbc5b1f4f6
have theory_recfun use recursive function discriminator to control when it is enabled
2022-11-06 12:09:45 -08:00
Nikolaj Bjorner
f004478565
produce tseitin justification for clause proofs when a clause is a "gate".
2022-11-06 12:00:25 -08:00
Nikolaj Bjorner
53b6059276
bypass built-in proof objects for clause trail
...
the build-in proof constructors are not flexible when it comes to allowing alternation of justified lemmas and lemmas without justifications.
2022-11-06 11:59:56 -08:00
Nikolaj Bjorner
84af521514
fixes #6439 #6436
2022-11-04 09:36:06 -07:00
Nikolaj Bjorner
1dca6402fb
move model and proof converters to self-contained module
2022-11-03 05:23:01 -07:00
Nikolaj Bjorner
7eee7914bd
align format of quantifier instantiation with new core
...
So far the format is
(forall ((x Int)) body) (not (body[t/x]))
The alternative could be the clause
(not (forall ((x Int)) body)) body[t/x]
they just better be consistent between engines
2022-10-21 15:26:00 -07:00
Nikolaj Bjorner
ad5fa9433f
add experiment with quot-rem encoding
...
experiment seeks to determine whether quot-rem encoding can substitute the division circuit encoding.
A first test suggests it makes no difference.
2022-10-21 09:25:45 -07:00
Nikolaj Bjorner
842e8057bc
log also quantifier generation (besides binding)
...
We add also logging for quantifier generation.
It is auxiliary information that is of use for diagnostics (axiom profiler).
2022-10-20 17:49:15 -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
07dd1065db
added API to monitor clause inferences
...
See RELEASE_NOTES for more information
examples pending.
2022-10-19 08:34:55 -07:00
Nikolaj Bjorner
464d52babe
fix #6410
...
regression after introducing beta-redex optimization
2022-10-18 12:34:45 -07:00
Nikolaj Bjorner
2449ba93c5
add (disabled) experiment to use quot-rem instead of division circuit
2022-10-13 15:20:43 +02:00
Nikolaj Bjorner
93e1db0b0b
fix #6398
2022-10-13 11:16:14 +02:00
Nikolaj Bjorner
ace727ee0f
fix #6391
2022-10-12 09:34:49 +02:00
Nikolaj Bjorner
4623117af8
wip - proof hints
2022-10-08 20:12:57 +02:00
Nikolaj Bjorner
9f78a96c1d
wip - trim
2022-10-06 18:19:03 +02: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
Clemens Eisenhofer
5ca53f37c0
Throw an exception if the variable in decide-callback is already assigned ( #6362 )
...
* Memory leak in .NET user-propagator
The user-propagator object has to be manually disposed (IDisposable), otherwise it stays in memory forever, as it cannot be garbage collected automatically
* Throw an exception if variable passed to decide is already assigned instead of running in an assertion violation
2022-09-24 09:54:14 -07:00
Nikolaj Bjorner
088898834c
filter length limits to be non-skolems and under concat/""/unit
2022-09-15 07:41:13 -07:00
Nikolaj Bjorner
c47ca341b7
fix #6343
...
The bug was that axiom generation was not enabled on last_index, so no axioms got created to constrain last-index.
With default settings the solver is now very slow on this example. It is related to that the smallest size of a satisfying assignment is above 24. Pending a good heuristic to find initial seeds and increments for iterative deepening, I am adding another parameter smt.seq.min_unfolding that when set to 30 helps for this example.
2022-09-14 10:17:25 -07:00
Nuno Lopes
16ef89905d
fix infinite loop in internalize
2022-09-14 11:50:53 +01:00
Nikolaj Bjorner
34969b71ee
#6340 again - reduce new assertions in fresh iteration
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-09-13 19:58:32 -07:00
Nikolaj Bjorner
fd5448d26b
fix #6340 - again
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-09-13 17:01:51 -07:00
Nikolaj Bjorner
c30b884247
fix #6340
...
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-09-12 11:01:24 -07:00