contains: fix the semantics

spot::contains(a, b) should test a⊇b.  It was testing a⊆b instead.

* NEWS: Mention the bug.
* spot/twaalgos/contains.cc, spot/twaalgos/contains.hh: Fix the
code and documentation.
* tests/python/contains.ipynb: Adjust description and expected
results.
* python/spot/__init__.py: Also swap the argument of
language_containment_checker.contains()
* bin/autfilt.cc: Adjust usage.
This commit is contained in:
Alexandre Duret-Lutz 2018-08-01 17:17:25 +02:00
parent 4ce0d92896
commit 23722c031f
6 changed files with 27 additions and 50 deletions

View file

@ -1411,7 +1411,7 @@ namespace
matched &= !aut->intersects(opt->included_in);
if (opt->equivalent_pos)
matched &= !aut->intersects(opt->equivalent_neg)
&& spot::contains(opt->equivalent_pos, aut);
&& spot::contains(aut, opt->equivalent_pos);
if (matched && !opt->acc_words.empty())
for (auto& word_aut: opt->acc_words)