common: introduce SPOT_UNREACHABLE and SPOT_UNIMPLEMENTED.
* src/misc/common.hh (SPOT_UNIMPLEMENTED, SPOT_UNREACHABLE, SPOT_UNREACHABLE_BUILTIN): New macros. * src/bin/dstar2tgba.cc, src/bin/ltlcross.cc, src/dstarparse/dstar2tgba.cc, src/eltlparse/eltlparse.yy, src/ltlast/binop.cc, src/ltlast/bunop.cc, src/ltlast/constant.cc, src/ltlast/formula_tree.cc, src/ltlast/multop.cc, src/ltlast/nfa.cc, src/ltlast/unop.cc, src/ltlvisit/dotty.cc, src/ltlvisit/lbt.cc, src/ltlvisit/lunabbrev.cc, src/ltlvisit/mark.cc, src/ltlvisit/randomltl.cc, src/ltlvisit/simpfg.cc, src/ltlvisit/simplify.cc, src/ltlvisit/snf.cc, src/ltlvisit/tostring.cc, src/misc/intvcomp.cc, src/misc/minato.cc, src/tgba/bdddict.cc, src/tgba/formula2bdd.cc, src/tgba/tgbasafracomplement.cc, src/tgbaalgos/eltl2tgba_lacim.cc, src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/ltl2tgba_lacim.cc, src/tgbaalgos/simulation.cc, src/tgbatest/ltl2tgba.cc: Use them. * src/sanity/style.test: Catch assert(0) and assert(!"text");
This commit is contained in:
parent
c93b41a2c7
commit
2beacc3924
33 changed files with 190 additions and 227 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2009, 2010, 2012, 2013 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
// Copyright (C) 2009, 2010, 2012, 2013, 2014 Laboratoire de Recherche
|
||||
// et Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
//
|
||||
|
|
@ -103,11 +103,9 @@ namespace spot
|
|||
case constant::False:
|
||||
return;
|
||||
case constant::EmptyWord:
|
||||
assert(!"unsupported operator");
|
||||
return;
|
||||
SPOT_UNIMPLEMENTED();
|
||||
}
|
||||
/* Unreachable code. */
|
||||
assert(0);
|
||||
SPOT_UNREACHABLE();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -134,7 +132,7 @@ namespace spot
|
|||
}
|
||||
case unop::F:
|
||||
case unop::G:
|
||||
assert(0); // TBD
|
||||
SPOT_UNIMPLEMENTED(); // TBD
|
||||
return;
|
||||
case unop::Not:
|
||||
// Done in recurse
|
||||
|
|
@ -144,17 +142,15 @@ namespace spot
|
|||
case unop::Closure:
|
||||
case unop::NegClosure:
|
||||
case unop::NegClosureMarked:
|
||||
assert(!"unsupported operator");
|
||||
return;
|
||||
SPOT_UNIMPLEMENTED();
|
||||
}
|
||||
/* Unreachable code. */
|
||||
assert(0);
|
||||
SPOT_UNREACHABLE();
|
||||
}
|
||||
|
||||
void
|
||||
visit(const bunop*)
|
||||
{
|
||||
assert(!"unsupported operator");
|
||||
SPOT_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -254,14 +250,12 @@ namespace spot
|
|||
case binop::Xor:
|
||||
case binop::Implies:
|
||||
case binop::Equiv:
|
||||
assert(0); // TBD
|
||||
case binop::UConcat:
|
||||
case binop::EConcat:
|
||||
case binop::EConcatMarked:
|
||||
assert(!"unsupported operator");
|
||||
SPOT_UNIMPLEMENTED();
|
||||
}
|
||||
/* Unreachable code. */
|
||||
assert(0);
|
||||
SPOT_UNREACHABLE();
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -335,18 +329,15 @@ namespace spot
|
|||
case multop::AndNLM:
|
||||
case multop::AndRat:
|
||||
case multop::OrRat:
|
||||
assert(!"unsupported operator");
|
||||
return;
|
||||
SPOT_UNIMPLEMENTED();
|
||||
}
|
||||
/* Unreachable code. */
|
||||
assert(0);
|
||||
SPOT_UNREACHABLE();
|
||||
}
|
||||
|
||||
void
|
||||
visit(const automatop* node)
|
||||
visit(const automatop*)
|
||||
{
|
||||
(void) node;
|
||||
assert(!"unsupported operator");
|
||||
SPOT_UNIMPLEMENTED();
|
||||
}
|
||||
|
||||
ltl2taa_visitor
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue