YosysHQ / imctk

Incremental Model Checking Toolkit
Other
1 stars 1 forks source link

Utilities for dealing with CNF formulas #9

Open jix opened 1 week ago

jix commented 1 week ago

Some methods to be implemented in and/or used from imctk inherently work with CNF representations. This might be of the full design or something auxiliary like an invariant, over/under-approximation of an invariant, tracking already covered or outstanding cases or something else entirely. Sometimes this might also be DNF, but since by de Morgan they're equivalent under negation, that makes little difference for generic utility code.

Important use cases for CNF include PDR and the invariants it produces as well as general interfacing with non-circuit SAT solvers.

Basic utilities should include:

More involved are tools for extracting and recovering the dependency and/or circuit structure from a CNF formula. This is useful for moving back from CNF to the IR, but also a useful primitive to have while staying in the CNF representation.

This consists of:

jix commented 1 week ago

I have at least prototyped large parts of this, but some of it in a very quick and dirty way, so this will need quite a bit of cleanup before turning into a PR