translate: remove arbitrary restriction on -U and -D
* src/twaalgos/translate.cc, src/bin/ltl2tgba.cc: Do not assume that unambiguous is incompatible with deterministic.
This commit is contained in:
parent
0786e068ae
commit
1ef3e5f3ff
2 changed files with 6 additions and 31 deletions
|
|
@ -181,24 +181,6 @@ main(int argc, char** argv)
|
||||||
if (int err = argp_parse(&ap, argc, argv, ARGP_NO_HELP, 0, 0))
|
if (int err = argp_parse(&ap, argc, argv, ARGP_NO_HELP, 0, 0))
|
||||||
exit(err);
|
exit(err);
|
||||||
|
|
||||||
// Using both --unambiguous --deterministic do not really make
|
|
||||||
// sense.
|
|
||||||
if (unambiguous)
|
|
||||||
{
|
|
||||||
if (type == spot::postprocessor::Monitor)
|
|
||||||
{
|
|
||||||
// We do not now how to make unambiguous monitors, other
|
|
||||||
// than deterministic monitors.
|
|
||||||
unambiguous = false;
|
|
||||||
pref = spot::postprocessor::Deterministic;
|
|
||||||
}
|
|
||||||
else if (pref == spot::postprocessor::Deterministic)
|
|
||||||
{
|
|
||||||
error(2, 0,
|
|
||||||
"--unambiguous and --deterministic are incompatible options");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (jobs.empty())
|
if (jobs.empty())
|
||||||
error(2, 0, "No formula to translate? Run '%s --help' for usage.",
|
error(2, 0, "No formula to translate? Run '%s --help' for usage.",
|
||||||
program_name);
|
program_name);
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
// -*- coding: utf-8 -*-
|
// -*- coding: utf-8 -*-
|
||||||
// Copyright (C) 2013, 2014 Laboratoire de Recherche et Développement
|
// Copyright (C) 2013, 2014, 2015 Laboratoire de Recherche et Développement
|
||||||
// de l'Epita (LRDE).
|
// de l'Epita (LRDE).
|
||||||
//
|
//
|
||||||
// This file is part of Spot, a model checking library.
|
// This file is part of Spot, a model checking library.
|
||||||
|
|
@ -64,20 +64,13 @@ namespace spot
|
||||||
|
|
||||||
twa_graph_ptr translator::run(const ltl::formula** f)
|
twa_graph_ptr translator::run(const ltl::formula** f)
|
||||||
{
|
{
|
||||||
if (unambiguous_)
|
if (unambiguous_ && type_ == postprocessor::Monitor)
|
||||||
{
|
{
|
||||||
if (type_ == postprocessor::Monitor)
|
// Deterministic monitor are unambiguous, so the unambiguous
|
||||||
{
|
// option is not really relevant for monitors.
|
||||||
// Deterministic monitor are unambiguous, so the
|
|
||||||
// unambiguous option is not really relevant for monitors.
|
|
||||||
unambiguous_ = false;
|
unambiguous_ = false;
|
||||||
set_pref(postprocessor::Deterministic);
|
set_pref(postprocessor::Deterministic);
|
||||||
}
|
}
|
||||||
else if (pref_ == postprocessor::Deterministic)
|
|
||||||
{
|
|
||||||
unambiguous_ = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const ltl::formula* r = simpl_->simplify(*f);
|
const ltl::formula* r = simpl_->simplify(*f);
|
||||||
(*f)->destroy();
|
(*f)->destroy();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue