Replies: 3 comments 1 reply
-
Nice addition to the specification. I particularly like to the part which specifies that clients can actually rely on non-overlapping callback invocations. |
Beta Was this translation helpful? Give feedback.
-
I think we could eliminate the lifetime problem entirely by not returning clauses from the import callback, but allow This shouldn't be too hard to do for IPASIR2 implementations - they could just wrap the callback, or they could copy clauses added during What do you think? |
Beta Was this translation helpful? Give feedback.
-
I just adapted the signature of the import callback to reflect the changes announced above: ipasir2_set_import Now ipasir2_add can be used by the callback in SOLVING state and has one additional parameter to indicate the redundancy type. We now need to think better about specifying redundancy types. It used to be easier to specify the formula F with respect to which the imported clauses must have a particular redundancy property, because then F was simply the formula added by |
Beta Was this translation helpful? Give feedback.
-
Problem
The original IPASIR API (biotomas/ipasir@de0ac2b, SAT Race 2015 publication) does not specify any thread safety requirements. This should be fixed in IPASIR2. For clients, I think the most relevant use case is to be able to set up and run solvers in parallel, but they don't need to be able to call functions in parallel on the same solver object (callback functions complicate this a bit, see below).
For example, the genipafolio example application uses IPASIR solvers in parallel.
Proposal
The following is just a rough idea (2023-08-22, currently for a55e413, work in progress).
Assumptions:
Proposal:
1.1 ...for functions without solver arguments:
ipasir2_init()
,ipasir2_signature()
,ipasir2_options()
may always be called, even in parallel.1.2 ...for
ipasir2_solve
: during the execution a callback viaipasir2_solve()
, the client may call any function on the calling solver object which is allowed in the SOLVING state, but at most one at a time from each callback execution.ipasir_solve()
(default: not allowed). However, solver instances may invoke callback functions independently from other IPASIR2 solvers running at the same time.Remarks
ipasir2_solve()
, clients can call functions allowed during the SOLVING state only while a callback passed to the solver is running.ipasir2_solve
was called.TODOs & open questions:
Beta Was this translation helpful? Give feedback.
All reactions