Closed daemontus closed 1 year ago
@ondrej33: Can you please review this PR to check that it is indeed sufficient for your implementation of the HCTL model checker? (Also, feel free to merge it after the review, so that you are the one who commits it to master and thus appears in the list of contributors ;))
Base: 76.64% // Head: 76.90% // Increases project coverage by +0.25%
:tada:
Coverage data is based on head (
1687a62
) compared to base (d23032d
). Patch coverage: 74.10% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
This PR should mostly generalise the work completed as part of
dev-hctl
by @ondrej33, such that the resultingSymbolicContext
can be also used for other applications that assume multiple BDD variables associated to every network variable.Overall, there shouldn't be any breaking changes, however, there is a minor adjustment to how symbolic set operations are implemented which I wanted to do for quite some time.
SymbolicContext::with_extra_state_variables
, which you can use to create a symbolic context with an arbitrary number of extra BDD variables.SymbolicContext::all_extra_state_variables
,SymbolicContext::extra_state_variables
,SymbolicContext::extra_state_variables_by_offset
,SymbolicContext::get_extra_state_variable
, andSymbolicContext::mk_extra_state_variable_is_true
.SymbolicContext::num_state_variables
,SymbolicContext::num_parameter_variables
, andSymbolicContext::num_extra_state_variables
.SymbolicAsyncGraph::with_custom_context
that you can use to create a graph with a specific context and "unit" symbolic universe. There are several caveats as to how theSymbolicAsyncGraph
can break if you mix the extra symbolic variables into the existing data structures, but as long as you use them outside of theSymbolicAsyncGraph
API, you should be fine.SymbolicAsyncGraph::existential_extra_variable_projection
andSymbolicAsyncGraph::universal_extra_variable_projection
which project a symbolic set that uses extra state variables onto a normal set that is guaranteed to be compatible with this symbolic graph.approx_cardinality
andexact_cardinality
has been adjusted to account for extra symbolic variables.BddSet
which now provides default implementations for most common symbolic operations (including the wholeSet
trait). This removes a lot of redundant code, but some of the old methods are still included to avoid breaking compatibility. Later, we should deprecate them and remove them from the library.