ksmt icon indicating copy to clipboard operation
ksmt copied to clipboard

Forking solver implementation

Open dee-tree opened this issue 2 years ago • 0 comments

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

  1. Forking solver manager (KForkingSolverManager) provides shared resources for the solvers group. It allows to create KForkingSolver instance that lifetime upper bounded by the manager's life.
  2. KForkingSolver is 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

dee-tree avatar Jul 29 '23 21:07 dee-tree