Implement bdd2expr function

The function uses an implementation of the find_all_paths algorithm for
binary decision diagrams.