powerset: deal with accepting sinks more effectively

Part of #444.

* spot/twaalgos/powerset.cc, spot/twaalgos/powerset.hh: Implement
accepting sink handling.
* spot/twaalgos/minimize.cc (minimize_wdba): Pass sinks to
tgba_powerset.
* spot/misc/bitvect.hh: Add an interesects method.
* tests/core/ltl2tgba2.test: More tests.
* NEWS: Mention this new feature.
This commit is contained in:
Alexandre Duret-Lutz 2020-12-08 17:55:50 +01:00
parent eeaed5592f
commit 48edfd80c2
6 changed files with 75 additions and 8 deletions

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2013-2019 Laboratoire de Recherche et Développement
// Copyright (C) 2013-2020 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -255,6 +255,16 @@ namespace spot
return *this;
}
bool intersects(const bitvect& other)
{
SPOT_ASSERT(other.size_ <= size_);
unsigned m = std::min(other.block_count_, block_count_);
for (size_t i = 0; i < m; ++i)
if (storage_[i] & other.storage_[i])
return true;
return false;
}
bitvect& operator^=(const bitvect& other)
{
SPOT_ASSERT(other.size_ <= size_);