acd: do not recompute identical subtrees
* spot/twaalgos/zlktree.cc, spot/twaalgos/zlktree.hh (acd::build_): When processing a node identical to a node previously seen, simply copy the children of that other node, and share its vectors.
This commit is contained in:
parent
2c435c6c11
commit
60225fd139
2 changed files with 125 additions and 33 deletions
|
|
@ -261,7 +261,10 @@ namespace spot
|
|||
bool node_acceptance(unsigned n) const;
|
||||
|
||||
/// Return the level of a node.
|
||||
unsigned node_level(unsigned n);
|
||||
unsigned node_level(unsigned n) const;
|
||||
|
||||
/// Return the colors of a node.
|
||||
const acc_cond::mark_t& node_colors(unsigned n) const;
|
||||
|
||||
/// \brief Whether the ACD corresponds to a min even or min odd
|
||||
/// parity acceptance in SCC \a scc.
|
||||
|
|
@ -349,6 +352,8 @@ namespace spot
|
|||
unsigned first_child = 0;
|
||||
unsigned level;
|
||||
unsigned scc;
|
||||
acc_cond::mark_t colors;
|
||||
unsigned minstate;
|
||||
bitvect& edges;
|
||||
bitvect& states;
|
||||
acd_node(bitvect& e, bitvect& s) noexcept
|
||||
|
|
@ -362,7 +367,7 @@ namespace spot
|
|||
// Likewise for bitvectors: this is the support for all edge vectors
|
||||
// and state vectors used in acd_node.
|
||||
std::deque<std::unique_ptr<bitvect>> bitvectors;
|
||||
// Information about a tree of the ACD. Each tree correspond
|
||||
// Information about a tree of the ACD. Each treinserte correspond
|
||||
// to an SCC.
|
||||
struct scc_data
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue