diff --git a/spot/twaalgos/forq_contains.cc b/spot/twaalgos/forq_contains.cc index adf7c597a..ccb635839 100644 --- a/spot/twaalgos/forq_contains.cc +++ b/spot/twaalgos/forq_contains.cc @@ -630,7 +630,7 @@ namespace spot "acceptance conditions."); if (lhs->get_dict() != rhs->get_dict()) throw std::runtime_error - ("The two input graphs must utilize the same twa_dict."); + ("The two input automata must use the same twa_dict."); if (lhs->ap() != rhs->ap()) throw std::runtime_error("The two input graphs must use the same set " "of APs"); @@ -648,7 +648,7 @@ namespace spot bool contains_forq(forq::const_graph lhs, forq::const_graph rhs) { - return !difference_word_forq(lhs, rhs); + return !difference_word_forq(rhs, lhs); } } diff --git a/spot/twaalgos/forq_contains.hh b/spot/twaalgos/forq_contains.hh index 3d49c5498..9e7c792af 100644 --- a/spot/twaalgos/forq_contains.hh +++ b/spot/twaalgos/forq_contains.hh @@ -41,10 +41,10 @@ namespace spot /// \ingroup containment /// \brief Returns a boolean value indicating - /// whether \a left is included in the language of \a right. + /// whether the language of \a left includes in the language of \a right. /// /// This implements a FORQ-based language containment algorithm - /// to check whether L(left)⊆L(right). \cite doveri.22.cav + /// to check whether L(left)⊇L(right). \cite doveri.22.cav /// /// \pre Automata \a left and \a right should be non-alternating /// Büchi-automata. diff --git a/tests/python/forq_contains.py b/tests/python/forq_contains.py index be510e66c..3e47bec87 100644 --- a/tests/python/forq_contains.py +++ b/tests/python/forq_contains.py @@ -23,7 +23,7 @@ from unittest import TestCase tc = TestCase() def do_test(subset, superset, expected=True): - result = spot.contains_forq(subset, superset) + result = spot.contains_forq(superset, subset) truth = spot.contains(superset, subset) tc.assertTrue(truth == expected) tc.assertTrue(result == truth) @@ -324,4 +324,3 @@ State: 11 {0} --END--""") do_symmetric_test(subset, superset) -