3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-08 00:05:46 +00:00
Commit graph

140 commits

Author SHA1 Message Date
Nikolaj Bjorner
b36bc11b85 remove eq constraint, fix gc for external constraints
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-11 20:09:28 +02:00
Nikolaj Bjorner
d514464e30 levels/crit
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-10 16:03:38 +02:00
Nikolaj Bjorner
af0e4d402b merge
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-10 15:43:36 +02:00
Nikolaj Bjorner
516ca06c28 levels take 1
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-10 15:40:25 +02:00
Jakob Rath
b644fe0f3d Add search_iterator 2021-09-10 15:34:31 +02:00
Jakob Rath
8a1a202133 wip 2021-09-10 14:20:07 +02:00
Jakob Rath
64ce6cb5c1 notes 2021-09-08 18:21:09 +02:00
Jakob Rath
75bac21574 Re-integrate forbidden intervals 2021-09-08 16:51:16 +02:00
Jakob Rath
a0570908fb Add support for bailout lemma 2021-09-08 16:37:47 +02:00
Jakob Rath
f2c79b851f propagate at the right level 2021-09-08 16:00:57 +02:00
Jakob Rath
40d62af796 some fixes 2021-09-08 15:46:50 +02:00
Jakob Rath
ff1185891a deactivate constraints when qhead is popped 2021-09-08 15:24:11 +02:00
Jakob Rath
05b846a472 Activate constraints when their boolean literal is propagated 2021-09-08 14:01:41 +02:00
Nikolaj Bjorner
8bcec83ee8 we have to replay in order, otherwise dependencies could become shuffled
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-08 00:06:22 +02:00
Jakob Rath
e74cf72cef fix cjust update when backtracking over boolean decision 2021-09-07 17:03:47 +02:00
Jakob Rath
c7562114ef Merge 2021-09-07 15:04:28 +02:00
Jakob Rath
24f96acf4f build_lemma returns clause_builder; adjust reason in revert_bool_decision 2021-09-07 15:02:29 +02:00
Nikolaj Bjorner
4c7ec75868 add replay
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-09-07 14:58:56 +02:00
Jakob Rath
733c21bb20 update 2021-09-07 14:06:32 +02:00
Jakob Rath
7d58296ad2 Begin reorganizing resolve_value 2021-09-07 11:40:50 +02:00
Jakob Rath
b4e14c31d0 comment 2021-09-07 11:36:45 +02:00
Jakob Rath
eed79df481 resolve_bool should work normally also in bailout mode 2021-09-07 11:35:38 +02:00
Jakob Rath
15c094fa32 Add fallback lemma 2021-09-06 18:00:21 +02:00
Jakob Rath
381d13993c Add TODO notes from discussion 2021-09-06 16:45:20 +02:00
Jakob Rath
ec1e6725de Merge resolve_bailout into resolve_conflict 2021-09-06 16:44:47 +02:00
Jakob Rath
39d42913cf bailout 2021-09-06 15:16:13 +02:00
Jakob Rath
56b33b1b3e resolve_bailout etc. 2021-09-06 14:08:07 +02:00
Jakob Rath
9f387f5738
Polysat: conflict resolution updates (#5534)
* variable elimination / saturation sketch

* conflict resolution updates
2021-09-03 10:17:06 -07:00
Jakob Rath
dc547510db
Polysat: conflict resolution wip (#5529)
* conflict_core doesn't need gc() anymore

* update comments, ensure_bvar for new constraints

* Make sure constraints can only be created through constraint_manager

* fix constraint::display if no boolean variable is assigned

* Move clause into separate file

* Add conflict_core binary resolution

* conflict_core additions

* reactivate conflict resolution outer loop

* wip

* seems commented includes break CI build
2021-09-01 09:10:10 -07:00
Nikolaj Bjorner
978bd9e560 remove scoped
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-31 08:55:48 -07:00
Jakob Rath
dde8fb0c37
Polysat updates (#5524)
* Move boolean resolution into conflict_core

* Move store() into dedup functionality

* comments

* Call gc()

* Add inference_engine sketch
2021-08-31 08:16:45 -07:00
Nikolaj Bjorner
7ea1bf12b6 add code review to constraint
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-30 11:11:55 -07:00
Jakob Rath
0c1e44da77
Polysat: constraint refactor cont'd, deduplicate constraints (#5520)
* Assign boolean variables only to long-lived constraints, and deduplicate constraints when they are created

* scoped_signed_constraint

* update other classes

* fix

* Don't use scoped_ptr<constraint> with dedup()
2021-08-30 10:00:27 -07:00
Jakob Rath
ebaea2159e
Polysat: use constraint_literal and begin move to core-based conflict representation (#5489)
* Rename solver_scope for fixplex tests

(otherwise the wrong constructor is called for polysat's solver_scope)

* Update conflict_core

* simplify

* Be clearer about constraint_literal lifetime

* remove old comment

* Remove status (positive/negative) from constraint

* Use constraint_literal in the solver

* Fix build (constraint -> get_constraint)
2021-08-18 11:02:46 -07:00
Nikolaj Bjorner
be9f172cc0 adding deps
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-08-04 14:02:32 -07:00
Jakob Rath
8a773d2bee
Polysat updates (#5444)
* Simplify adding lemmas

* Remove misleading constructor from tmp_assign.

The idea is that tmp_assign is only created on the stack and
short-lived.  Instead of having a convenience constructor that takes a
constraint_ref, it's clearer to have an explicit .get() at the call
site.

* Remove some log messages

* bugfix

* fix

* Add stub for conflict_core

* wip

* Add example by Clemens
2021-07-30 11:14:19 -07:00
Nikolaj Bjorner
cc4354ffd5 warnings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-07-02 13:27:00 -07:00
Jakob Rath
3436b52c4a
Polysat: refactor constraints (#5372)
* Refactor: remove sign and dep from constraint

* fix some bugs

* improve log messages

* Add missing premises to lemma

* Rename getter in an attempt to fix linux build
2021-06-25 11:04:25 -07:00
Jakob Rath
20a5baeb70
Polysat: expand conflict explanation rules (#5366)
* update example to match slides

* Add normalized view of inequalities

* workaround

* Add a conflict explanation rule

* unit clauses should be asserted at the base level

* Add src constraint to interval

* support non-strict case in first rule

* print conflict constraints only once

* update second rule

* update third rule as well
2021-06-23 10:12:39 -07:00
Nikolaj Bjorner
8f0c408c0a prepare for new viable
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-22 20:44:21 -07:00
Jakob Rath
d7b8ea2f7f
Polysat: minor fixes (#5364)
* update include paths

* bdd fixes

* update/fix some tests

* work around assertion failure when constraint from clause becomes unit

* Remove old code

* use clause_builder

* Verify model when returning SAT

* log

* fix
2021-06-22 09:27:18 -07:00
Nikolaj Bjorner
ce5c8b3066 rename to some saner name
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-21 16:19:37 -07:00
Nikolaj Bjorner
63f3c841d8 remove var_constraint to get rid of bdd dependencies
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-21 16:14:30 -07:00
Nikolaj Bjorner
9173306adc na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-21 16:00:13 -07:00
Nikolaj Bjorner
6f93ed8dc2 moving out viable functionality
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-21 15:50:04 -07:00
Nikolaj Bjorner
4fad0385de tune multiplication slightly
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-20 11:07:06 -07:00
Nikolaj Bjorner
d78313e001 more pp
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-20 10:13:59 -07:00
Nikolaj Bjorner
4066087138 pretty printing
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-20 09:49:31 -07:00
Nikolaj Bjorner
3da37f4fb5 add unit test driver
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-06-18 10:58:42 -07:00
Jakob Rath
c4963f4381
Polysat: add two more prototype rules (#5355)
* Add try_div to PDDs

* x>y is false when x==y

* First version of the other two prototype rules

* More band-aid fixes...
2021-06-18 08:48:50 -07:00