emptiness checks: replace assert-preconditions by exceptions

* spot/twaalgos/couvreurnew.cc, spot/twaalgos/gv04.cc,
spot/twaalgos/magic.cc, spot/twaalgos/se05.cc, spot/twaalgos/tau03.cc,
spot/twaalgos/tau03opt.cc: Throw if precondition on acceptance
condition is not satisfied.
* tests/python/misc-ec.py: New file.
* tests/Makefile.am: Add it.
* NEWS: Mention the change.
This commit is contained in:
Alexandre Duret-Lutz 2017-03-10 14:19:09 +01:00
parent 55b029961b
commit 2e3fc0d4d2
9 changed files with 84 additions and 11 deletions

View file

@ -1,6 +1,6 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2011, 2013, 2014, 2015, 2016 Laboratoire de Recherche
// et Developpement de l'Epita (LRDE).
// Copyright (C) 2011, 2013-2017 Laboratoire de Recherche et
// Developpement de l'Epita (LRDE).
// Copyright (C) 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
@ -58,7 +58,9 @@ namespace spot
: emptiness_check(a, o),
h(size)
{
assert(a->num_sets() > 0);
if (!(a->num_sets() > 0 && a->acc().is_generalized_buchi()))
throw std::runtime_error
("tau03 requires generalized Büchi with at least one set");
}
virtual ~tau03_search()