ksmt
ksmt copied to clipboard
Forking solver implementation
A forking solver presents an ability to create children with existed parental assertions memory efficiently as possible. Also, it has lazy assertions initialization.
It is draft implementation requiring following reviews.
Notes
- Forking solver manager (
KForkingSolverManager) provides shared resources for the solvers group. It allows to createKForkingSolverinstance that lifetime upper bounded by the manager's life. -
KForkingSolveris a solver, which can be branched in assertions and push-levels.
Usage
KZ3ForkingSolverManager(ctx).use { man ->
val parent = man.createForkingSolver()
parent.assert(formula)
val child = parent.fork()
println(child.checkSat())
}
Currently implemented:
- [x] Core interfaces:
KForkingSolver,KForkingSolverManager - [x] cvc5 forking impl
- [x] Z3 forking impl
- [x] Yices forking impl + uninterpreted sort values tracking
- [x] Bitwuzla forking impl + uninterpreted sort values tracking
TODO:
- [ ] Portfolio forking solver impl
- [ ] Process runner forking solver impl