sybila / biodivine-lib-param-bn

Rust library for working with parametrised Boolean networks.
MIT License
2 stars 2 forks source link

Implementation of infer_regulatory_graph can use too much memory #30

Closed daemontus closed 7 months ago

daemontus commented 2 years ago

The problem is that infer_regulatory_graph must technically completely rewrite the Boolean expressions that describe the update functions. The reason is that the update functions may use non-observable variables that are no longer used by the regulatory graph.

However, for some reasonably large update functions, the BDD translates to a very ugly Boolean expression even if the function is described in a reasonable format in the original model. As such, we need to come up with a different way of computing this equivalent Boolean expression.

A potential way I can imagine now is building a DNF of the BDD, but I can't seem to think of an algorithm that would produce a reasonably small enough DNF for now. Other option is to use the current implication-based scheme, but instead of using the BDD variable ordering, pick one dynamically using some greedy optimisation.

For now, this issue is mitigated by first trying the old update function and then stringifying only if the old function is reported as invalid in the new network.

daemontus commented 7 months ago

This is mostly fixed now, due to #52. The issues is still there to some extent, but update functions are now almost never rewritten fully.