Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Forking solver implementation #123

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

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