0.5.0
Well, this is a big one... We are adding several new major features:
Highlights
- We now support arbitrary expressions as arguments to uninterpreted function calls. For example,
f(g(a,b), c | d)
is now a valid update function. - We have significantly reworked the mechanism behind
inline_inputs
andinline_variable
to be safer, faster, and hopefully easier to understand. - We now support symbolic inlining at the level of
SymbolicAsyncGraph
, i.e. without computing the actual function expression. - We now support basic
Space
percolation. - We can now compute minimal and maximal trap spaces, similar to fixed-point computation (see
TrapSpaces
API object). We can also represent arbitrary sets of spaces symbolically usingNetworkSpaces
andNetworkColoredSpaces
.
Unfortunately, this required a bunch of breaking changes:
- [breaking contract] Conversion
FnUpdate::to_string
now produces fewer parentheses around nested&
/|
. The result is still semantically the same function, but(a & b) & c
anda & (b & c)
are technically different functions that now resolve to the same string representation (i.e.a & b & c
). This helps a lot with readability of DNF/CNF update functions. - [breaking contract] A variable with no incoming/outgoing regulations can exist in an
.aeon
file, as long as it has a specified update function (this function can depend on the logical parameters). While this is rather useless in practice, it can be a reasonable result of a network reduction. It is breaking because a previously invalid model can now be valid. - [breaking contract] In
.bnet
files, thetargets,factors
header is now treated as case-insensitive. Again, this only makes previously invalid models valid. - [breaking API] The signature of
FnUpdate::Param
changed from(ParameterId, Vec<VariableId>)
to(ParameterId, Vec<FnUpdate>)
. This means the arguments of an uninterpreted function can now be general expressions, not just variables. This required several API changes:FnUpdate::mk_param
now accepts&[FnUpdate]
instead of&[VariableId]
. As an alternative, we provideFnUpdate::mk_basic_param
, which is essentially the old function.FnUpdate::as_param
now returns&[FnUpdate]
.FnUpdate::is_specialisation_of
removed, as it was never that useful in the first place and became very unclear with the new features.FnUpdate::substitute
changed toFnUpdate::rename_all
, with more flexible argument types (a map instead of a vector).FnUpdate::eval_in_space
removed, as it was also rather useless in the long term.- This also changes the signature of several methods in
SymbolicContext
to use&[FnUpdate]
instead of&[VariableId]
.
- [breaking API] New algorithms for inlining in
BooleanNetwork
. This changes the signature/semantics of existing methods and adds a few new ones:- Added
BooleanNetwork::prune_unused_parameters
, as it is often required after inlining. BooleanNetwork::infer_valid_graph
is now much more robust w.r.t. uninterpreted functions (it can preserve existing constraints and even simplify the update functions a little bit).- Changed the signature of
BooleanNetwork::inline_inputs
. Now it takes two parameters. One determines if the inputs should be detected semantically (instead of syntactically), the other determines if the RG should be repaired after the inlining (e.g. remove unused regulations). - Changed the signature of
BooleanNetwork::inline_variable
. Now it also takes arepair_graph
argument which ensured the returned RG is logically consistent. It can also handle uninterpreted functions much better. - Added
BooleanNetwork::inline_constants
, which is similar toBooleanNetwork::inline_inputs
, but for constants. It is essentially percolation at the level of the Boolean network.
- Added
- [breaking API] Changed internal structure of
SymbolicAsyncGraph
to allow a graph with no underlyingBooleanNetwork
to exist. This had some relatively minor but wide-ranging consequences:SymbolicAsyncGraph::new
andSymbolicAsyncGraph::with_custom_context
now only need a reference to aBooleanNetwork
.SymbolicAsyncGraph::as_network
now returnsOption<&BooleanNetwork>
.- Changed the way witnesses are generated. Each witness should still use DNF instantiation of an update function, but will now have inferred regulatory graph instead of copying the original BN.
- Renamed
SymbolicAsyncGraph::empty_vertices/mk_empty_vertices
toSymbolicAsyncGraph::empty_colored_vertices/mk_empty_colored_vertices
. Added actualSymbolicAsyncGraph::empty_vertices/mk_empty_vertices/unit_vertices/mk_unit_vertices
methods. - Added
SymbolicAsyncGraph::new_raw
, which allowsSymbolicAsyncGraph
to be constructed from raw update function BDDs. - Added a bunch of utility methods that now provide the most important introspection about the
SymbolicAsyncGraph
(which was previously done by examining theBooleanNetwork
):- Added
SymbolicAsyncGraph::get_variable_name
as well asSymbolicContext::get_network_variable_name
. - Added
SymbolicAsyncGraph::num_vars
andSymbolicAsyncGraph::variables
as well asSymbolicContext::network_variables
. - Added
SymbolicContext::find_network_variable
andSymbolicContext::find_state_variable
.
- Added
- [breaking API] Removed
Space::is_trap_space
as it was not correct for general update functions. - [breaking API] Removed
bdd_params
andasync_graph
modules. These have been deprecated for a long time and were incompatible with the new features. - [breaking API] The
bin/dump_graph.rs
binary is disabled. Someone can probably re-implement it if we ever need it again. - [deprecation]
GraphVertices::materialize
and theIterableVertices
struct are now deprecated. You can instead use standardGraphVertices::iter
orGraphVertices::into_iter
.
Other API changes that are not breaking:
- Added symbolic representation of network spaces using "dual" encodings:
- Added
SymbolicSpaceContext
, which implements the actual translation necessary for the encoding (and extends the functionality of a normalSymbolicContext
). - Added a
NetworkSpaces
symbolic set, which is analogous toGraphVertices
. - Added a
NetworkColoredSpaces
symbolic relation, which is analogous toGraphColoredVertices
.
- Added
- Added an API object
TrapSpaces
which implements minimal/maximal/essential trap space search. - Added
OwnedRawSymbolicIterator
, which has (roughly) the same features asRawSymbolicIterator
, but actually owns the underlying symbolic set and can be thus moved/shared without a lifetime reference. - Added
From<Option<bool>>
forExtendedBoolean
. - Added
RegulatoryGraph::variable_names
to easily obtain an owned list of variable names. - Added
RegulatoryGraph::add_raw_regulation
which can add a regulation using theRegulation
object, not strings/IDs. - Added
Space::new_raw
which can create aSpace
object with just variable count. - Added
Space::count_fixed
as a counterpart toSpace::count_any
. - Added
bin/bench_trap_spaces_minimal.rs
to test the new trap space feature. - Added
GraphVertices::iter
andGraphVertices::into_iter
based on raw symbolic projections. - Added
FnUpdate::mk_conjunction
andFnUpdate::mk_disjunction
that simulate n-ary operators. - Added
FnUpdate::simplify_constants
, which eliminates true/false from a function. - Added
RegulationContraint
API object which implementsRegulationConstraint::mk_observability
,RegulationConstraint::mk_activation
, andRegulationConstraint::mk_inhibition
, as well asRegulationConstraint::infer_sufficient_regulation
andRegulationConstraint::fix_regulation
. These can be used to repair regulation graphs using BDD analysis. These are not new functions, but a refactoring of old code that can be now made public. - Added
SymbolicContext::mk_instantiated_fn_update
which can build aFnUpdate
from aBddValuation
. - Added
SymbolicAsyncGraph::space_has_var_false
andSymbolicAsyncGraph::space_has_var_true
as well asSymbolicAsyncGraph::percolate_space
. These can be used to implement percolation. - Added
SymbolicAsyncGraph::with_space_context
to create anSymbolicAsyncGraph
that can be used for space and state exploration at the same time. - Added
SymbolicAsyncGraph::get_symbolic_fn_update
to retrieve the "raw" underlying update function. - Added
SymbolicAsyncGraph::inline_symbolic
, which can inline a variable at the BDD level, without constructing the underlying network. Also addedSymbolicContext::eliminate_network_variable
which is required here. - Fixed a bug in
GraphColoredVertices::is_singleton
andGraphColoredVertices::pick_singleton
which did not account for possible extra variables.