Closed daemontus closed 7 months ago
Attention: 66 lines
in your changes are missing coverage. Please review.
Comparison is base (
354cd36
) 78.10% compared to head (7a0a299
) 78.11%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR allows nested calls to uninterpreted functions. Additionally, it greatly improves
BooleanNetwork
inlining mechanism. Specifically:Nested function calls
FnUpdate::Param
now refers to a list ofFnUpdate
instead ofVariableId
in order to support general expressions. A bunch of utility methods have minor breaking changes related to this. But these are mostly used internally.FnUpdate::is_specialisation_of
was removed because no one was using it and it was confusing.FnUpdate::substitute(&[VariableId], &[ParameterId])
changed toFnUpdate::rename_all(&HashMap<VariabledId, VariableId>, &HashMap<ParameterId, ParameterId>)
. This is easier to understand and more flexible.FnUpdate::substitute_variable
is now infallible, since every possible substitution is now allowed.FnUpdate::eval_in_space
andSpace::is_trap_space
. These were confusing and didn't really work that well anyway.bin/dump_graph
is disabled because it was using the old deprecated API.async_graph
andbdd_params
modules as these would not really work with the new functionality.Inlining changes
RegulationsConstraints::fix_regulation
, which only ensures "local" validity, but can transfer existing constraints to the new regulation if they are applicable. In general, this is closer to what we typically want when we are "repairing" a regluation.FnUpdate::simplify_constants
. Self explanatory.BooleanNetwork::rename_parameter
, but this is only internal for now.BooleanNetwork::prune_unused_parameters
. This is public, but probably won't be used that often. It is mostly relevant only for the inlining methods.BooleanNetwork::infer_valid_graph
so that it actually works for any combination of update functions (as opposed to failing for specific combinations of parameters and regulations). Also, the newRegulationsConstraints::fix_regulation
semantics are now applied, but this should only affect uninterpreted functions.BooleanNetwork::inline_variable
now has two modes: either it will not alter regulations at all, or it will repair the regulatory graph using BDDs. Furthermore, countless bugs and unspecified edge-cases were discovered and taken care of. In the future, we should refactor this into something more reasonable, but for now, it'll do.BooleanNetwork::inline_inputs
to reflect the new inlining semantics, and addedBooleanNetwork::inline_constants
. Both methods can either detect inputs/constants syntactically, or semantically using BDDs.Misc changes
.aeon
file, a variable with no regulations is still valid as long as it has an update function (the function can still use uninterpreted functions). Technically, this was never disallowed, but no one ever used it because such variable is useless.RegulatoryGraph::variable_names
to make it easier to obtain the list of all variable names in order.