3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-11 09:44:43 +00:00
Commit graph

39 commits

Author SHA1 Message Date
Clemens Eisenhofer
4cb158a79b
User Propagator: Return if propagated lemma is redundant (#6791)
* Give users ability to see if propagation failed

* Skip propagations in the new core if they are already satisfied
2023-07-07 09:58:41 -07:00
Clemens Eisenhofer
82667bd86b
Fix UP's decide callback (#6707)
* Query Boolean Assignment in the UP

* UP's decide ref arguments => next_split

* Fixed wrapper

* More fixes
2023-06-02 09:52:54 +02:00
Clemens Eisenhofer
98d3fabc24
Bugfix relevancy propagation + UP (old core) (#6678)
* Some UP bugfixes in the new core

* Bugfix relevancy propagation + UP (old core)

* Revert smt_context.cpp
2023-04-10 12:57:59 -07:00
Nikolaj Bjorner
9f78a96c1d wip - trim 2022-10-06 18:19:03 +02: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
63f48f8fd4 add options for logging learned lemmas and theory axioms
- add solver.axioms2files
  - prints negated theory axioms to files. Each file should be unsat
- add solver.lemmas2console
  - prints lemmas to the console.
- remove option smt.arith.dump_lemmas. It is replaced by solver.axioms2files
2022-08-08 11:18:56 +03:00
Nikolaj Bjorner
5c2c0ae900 force-push on new_eq, new_diseq in user propagator, other fixes to Python bindings for user propagator
This update allows the python bindings for user-propagator to handle functions that are declared to be registered with the user propagator plugin. It fixes a bug in UserPropagateBase.add to allow registering terms dynamically during search.
It also fixes a bug in theory_user_propagate as scopes were not fully pushed when the solver gets the callbacks for new equalities and new disequalities.
It also adds equality and disequality interfaces to the sat/smt solver version (which isn't being exercised in earnest yet)
2022-07-25 03:42:29 +02:00
Nikolaj Bjorner
fd8ee34564 add logging 2022-06-29 08:20:01 -07:00
Clemens Eisenhofer
2fa60aa43c
Added function to select the next variable to split on (User-Propagator) (#6096)
* Added function to select the next variable to split on

* Fixed typo

* Small fixes

* uint -> int
2022-06-19 10:49:25 -07:00
Nikolaj Bjorner
6a1193eebd reorg if-then-else structure 2022-06-08 10:00:45 -07:00
Clemens Eisenhofer
81189d6fdd
Added bit2bool to the API (#5992)
* Fixed registering expressions in push/pop

* Reused existing function

* Reverted reusing can_propagate

* Added decide-callback to user-propagator

* Refactoring

* Fixed index

* Added bit2bool to the API
Fixed bug in user-propagator's decide callback

* Fixed typo
2022-04-22 09:54:21 +01:00
Nikolaj Bjorner
f4c500c519 fix build
reference types are not part of C
2022-04-16 15:16:53 +02:00
Clemens Eisenhofer
e11496bc65
Added decide-callback to user-propagator (#5978)
* Fixed registering expressions in push/pop

* Reused existing function

* Reverted reusing can_propagate

* Added decide-callback to user-propagator

* Refactoring

* Fixed index
2022-04-15 20:07:17 +02:00
Clemens Eisenhofer
b264e6c290
Reverted reusing can_propagate (#5966)
* Fixed registering expressions in push/pop

* Reused existing function

* Reverted reusing can_propagate
2022-04-12 12:29:53 +02:00
Clemens Eisenhofer
b0d8b27f37
Fixed registering expressions in push/pop (#5964)
* Fixed registering expressions in push/pop

* Reused existing function
2022-04-11 16:50:13 +02:00
Nikolaj Bjorner
0fa0feb979 allow add_expr during pop
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-04-06 16:27:10 +02:00
Clemens Eisenhofer
7bb969ab52
Fixed problem with registering bitvector functions (#5923) 2022-03-26 16:36:15 -10:00
Nikolaj Bjorner
deaad86d6a nit 2022-03-01 12:11:10 -08:00
Clemens Eisenhofer
412b05076c
User-functions fix (#5868) 2022-02-26 09:21:01 -08:00
Nikolaj Bjorner
2e00f2f32d
Propagator (#5845)
* user propagator without ids

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

* user propagator without ids

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

* fix signature

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

* references #5818

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

* fix c++ build

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

* switch to vs 2022

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

* switch 2022

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

* Update propagator example (I) (#5835)

* fix #5829

* na

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

* switch to vs 2022

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

* Adapted the example to the changes in the propagator

Co-authored-by: Nikolaj Bjorner <nbjorner@microsoft.com>

* context goes out of scope in stack allocation, so can't used scoped context when passing objects around

* parameter check

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

* add rewriter

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

* Fixed bug in user-propagator "created" (#5843)

Co-authored-by: Clemens Eisenhofer <56730610+CEisenhofer@users.noreply.github.com>
2022-02-17 09:21:41 +02:00
Nikolaj Bjorner
c6539deb61 fixing null check
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-25 17:25:42 +01:00
Nikolaj Bjorner
435f79eab0 tup
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-25 16:40:55 +01:00
Nikolaj Bjorner
bf6454dccc throw error if created-eh has not been registered
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-25 13:01:57 +01:00
Nikolaj Bjorner
af9ae35984 term
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-20 14:43:16 +01:00
Nikolaj Bjorner
c527fda0b6 term
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-20 14:41:27 +01:00
Nikolaj Bjorner
f1a302bba7 term
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-20 14:38:34 +01:00
Nikolaj Bjorner
7a8c969033 ensure b_internalized
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-20 13:27:23 +01:00
Nikolaj Bjorner
e5767bf2b8 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-19 15:19:07 +01:00
Nikolaj Bjorner
0f03ef4ab0 for Clemens: ensure fixed values are propagated after registration
Also allow to register expressions that the rewriter changes to ensure they get picked up.
2022-01-19 14:38:11 +01:00
Nikolaj Bjorner
055732423c ensure enode without recursion
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2022-01-11 08:35:25 -08:00
Nikolaj Bjorner
f0740bdf60 move user propagte declare to context level
declaration of user propagate functions are declared at context level instead of at solver scope.
2021-12-18 10:56:42 -08:00
Nikolaj Bjorner
9c8800bdde adding a new toy for Clemens
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-17 10:45:59 -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
1e95fb44d1 add ability to register expressions during callback 2021-12-07 09:47:05 -08:00
Nikolaj Bjorner
71cbb160d2 fix regression from today, see #5676
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-01 14:29:53 -08:00
Nikolaj Bjorner
c6a5aa0cc4 try th_lemma, update documentation of api functions for creating strings
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-12-01 09:21:02 -08:00
Nikolaj Bjorner
3b4f976118 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-30 19:15:03 -08:00
Nikolaj Bjorner
4daba290b1 change user propagation to apply scheme similar to theory_recfun
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-11-30 19:12:15 -08:00
Nikolaj Bjorner
959f4c9440 rename files to theory_user_propagator 2021-11-29 19:44:58 -08:00
Renamed from src/smt/user_propagator.cpp (Browse further)