Skip to content

Conversation

dee-tree
Copy link
Contributor

@dee-tree dee-tree commented Jul 29, 2023

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:

  • Core interfaces: KForkingSolver, KForkingSolverManager
  • cvc5 forking impl
  • Z3 forking impl
  • Yices forking impl + uninterpreted sort values tracking
  • Bitwuzla forking impl + uninterpreted sort values tracking

TODO:

  • Portfolio forking solver impl
  • Process runner forking solver impl

forking solver;
Wrapped missing native throwable functions;
Tracks of assertion clear on pop
…yices - forking solver init exceptions wrapper, forking solver close fix,

all solvers - ScopedLinkedFrame.pop fix
@dee-tree dee-tree requested a review from Saloed August 28, 2023 14:12
@dee-tree dee-tree marked this pull request as ready for review August 30, 2023 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants