sybila / biodivine-lib-param-bn

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

Faster BDD evaluation of `FnUpdate` objects #35

Open daemontus opened 1 year ago

daemontus commented 1 year ago

For some very large models, the creation of each update function BDD can take a long time. For example, take the model considered here. Technically, the functions "only" take several hundred thousand nodes at most. But it takes a very long time to evaluate them, and it also could be memory consuming.

One possible solution is given in faster-fnupdate-eval branch, where a smarter, greedy evaluation algorithm is proposed. Instead of following the AST of the formula exactly, it first evaluates smaller chunks of the tree (in terms of symbolic size). Also, it applies distributive laws during evaluation to simplify the formula once it is partially evaluated (if we were to apply them from the start, the formula would explode).

Another possible solution would be to consider more advanced variable ordering techniques, since there doesn't seem to be anything fundamentally problematic about these particular functions.

Finally, it may be possible to "explode" the model using two approaches: