defaultenv: simplify usage
* src/ltlenv/defaultenv.hh, src/ltlenv/defaultenv.cc (require): Return an atomic_prop*, not a formula*. * src/bin/randaut.cc, src/bin/randltl.cc, src/ltlvisit/apcollect.cc, src/tgbatest/ltl2tgba.cc, src/tgbatest/randtgba.cc: Do not cast the return of require().
This commit is contained in:
parent
e6e416e1e1
commit
4f1535c8fe
7 changed files with 12 additions and 20 deletions
|
|
@ -386,7 +386,7 @@ checked_main(int argc, char** argv)
|
|||
bool opt_stutterize = false;
|
||||
bool spin_comments = false;
|
||||
const char* hoa_opt = 0;
|
||||
spot::ltl::environment& env(spot::ltl::default_environment::instance());
|
||||
auto& env = spot::ltl::default_environment::instance();
|
||||
spot::ltl::atomic_prop_set* unobservables = 0;
|
||||
spot::tgba_ptr system_aut = 0;
|
||||
auto dict = spot::make_bdd_dict();
|
||||
|
|
@ -846,8 +846,7 @@ checked_main(int argc, char** argv)
|
|||
const char* tok = strtok(argv[formula_index] + 2, ", \t;");
|
||||
while (tok)
|
||||
{
|
||||
unobservables->insert
|
||||
(static_cast<const spot::ltl::atomic_prop*>(env.require(tok)));
|
||||
unobservables->insert(env.require(tok));
|
||||
tok = strtok(0, ", \t;");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,6 @@
|
|||
#include "tgbaalgos/save.hh"
|
||||
#include "tgbaalgos/stats.hh"
|
||||
#include "ltlenv/defaultenv.hh"
|
||||
#include "ltlast/atomic_prop.hh"
|
||||
#include "tgbaalgos/dotty.hh"
|
||||
#include "tgbaparse/public.hh"
|
||||
#include "misc/random.hh"
|
||||
|
|
@ -586,7 +585,7 @@ main(int argc, char** argv)
|
|||
|
||||
spot::option_map options;
|
||||
|
||||
spot::ltl::environment& env(spot::ltl::default_environment::instance());
|
||||
auto& env = spot::ltl::default_environment::instance();
|
||||
spot::ltl::atomic_prop_set* ap = new spot::ltl::atomic_prop_set;
|
||||
auto dict = spot::make_bdd_dict();
|
||||
|
||||
|
|
@ -794,8 +793,7 @@ main(int argc, char** argv)
|
|||
}
|
||||
else
|
||||
{
|
||||
ap->insert(static_cast<const spot::ltl::atomic_prop*>
|
||||
(env.require(argv[argn])));
|
||||
ap->insert(env.require(argv[argn]));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -886,7 +884,7 @@ main(int argc, char** argv)
|
|||
spot::ltl::atomic_prop_collect(f);
|
||||
for (spot::ltl::atomic_prop_set::iterator i = tmp->begin();
|
||||
i != tmp->end(); ++i)
|
||||
apf->insert(dynamic_cast<const spot::ltl::atomic_prop*>
|
||||
apf->insert(down_cast<const spot::ltl::atomic_prop*>
|
||||
((*i)->clone()));
|
||||
f->destroy();
|
||||
delete tmp;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue