Open SSoelvsten opened 3 years ago
I wonder whether the "every node is identified by referencing its linenumber" is not extremely tedious, since adding a node in the middle will result in having to shift all other numbers? Yet, otherwise it is pretty much just a condensed version of the blif format.
The corresponding issue on Tom's Sylvan repo is here: https://github.com/trolando/sylvan/issues/20
Alternatively, one can also investigate the lib-bdd format. A parser is implemented in https://github.com/SSoelvsten/bdd-benchmark/blob/main/src/apply.cpp. By making it use signed values, one can make it future-proof for complement edges.
File Format
Tom van Dijk has suggested the following format for a BDD:
Parsing a file
This feature might be blocked until we support attributed edges.
The simplest way to implement this would be to do the following:
{ source_line, target_line }
to atpie::merge_sorter
.By use of a b-tree we could also store the id of all prior nodes and then that way skip the merge sorter. Most likely this will not run as fast as using the sorter. Furthermore, it also takes up much more space
The "reference another bdd" also makes things much more complicated. At that point one probably has to first check whether some reference like this exists to then "inline" the other BDD inside of this one and then run the actual Reduce algorithm.
Comments
Notice, while this is quite close to #126 , it also is quite disjoint (both in terms of how to do these and the usecase they are solving. The purpose of this is to have a common file format that can be used between different BDD packages, while the other is supposed to be used for Adiar alone by using the least amount of space.