overhaul the stutter-invariance checks
* spot/twaalgos/stutter.cc, spot/twaalgos/stutter.hh: Cleanup and document the api. * spot/twa/twa.hh, doc/mainpage.dox: Add a stutter-invariant section. * tests/python/stutter-inv-states.ipynb: Rename as ... * tests/python/stutter-inv.ipynb: ... this, and add more comments. * tests/Makefile.am, doc/org/tut.org: Adjust renaming. * bench/stutter/stutter_invariance_randomgraph.cc, bench/stutter/stutter_invariance_formulas.cc, bench/stutter/Makefile.am: Make it compile again. * bin/autfilt.cc: Call inplace variants. * NEWS: Mention the overhaul.
This commit is contained in:
parent
2222661f98
commit
6459877a1a
12 changed files with 1169 additions and 882 deletions
|
|
@ -1,5 +1,5 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
## Copyright (C) 2014, 2015 Laboratoire de Recherche et Développement
|
||||
## Copyright (C) 2014, 2015, 2017 Laboratoire de Recherche et Développement
|
||||
## de l'Epita (LRDE).
|
||||
##
|
||||
## This file is part of Spot, a model checking library.
|
||||
|
|
@ -24,7 +24,8 @@ AM_CXXFLAGS = $(WARNING_CXXFLAGS)
|
|||
LDADD = \
|
||||
$(top_builddir)/bin/libcommon.a \
|
||||
$(top_builddir)/lib/libgnu.la \
|
||||
$(top_builddir)/spot/libspot.la
|
||||
$(top_builddir)/spot/libspot.la \
|
||||
$(top_builddir)/buddy/src/libbddx.la
|
||||
|
||||
bin_PROGRAMS = stutter_invariance_randomgraph \
|
||||
stutter_invariance_formulas
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2014, 2015, 2016 Laboratoire de Recherche et
|
||||
// Copyright (C) 2014, 2015, 2016, 2017 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -66,9 +66,8 @@ namespace
|
|||
spot::twa_graph_ptr a = trans.run(f);
|
||||
spot::twa_graph_ptr na = trans.run(spot::formula::Not(f));
|
||||
spot::atomic_prop_set* ap = spot::atomic_prop_collect(f);
|
||||
bdd apdict = spot::atomic_prop_collect_as_bdd(f, a);
|
||||
|
||||
std::cout << formula << ',' << ap->size() << ',';
|
||||
delete ap;
|
||||
stats.print(a);
|
||||
stats.print(na);
|
||||
|
||||
|
|
@ -82,9 +81,9 @@ namespace
|
|||
sw.start();
|
||||
bool res = spot::is_stutter_invariant(std::move(dup_a),
|
||||
std::move(dup_na),
|
||||
apdict, algo);
|
||||
algo);
|
||||
auto time = sw.stop();
|
||||
std::cout<< time << ',';
|
||||
std::cout << time << ',';
|
||||
|
||||
if (algo > 1 && prev != res)
|
||||
{
|
||||
|
|
@ -96,7 +95,6 @@ namespace
|
|||
prev = res;
|
||||
}
|
||||
std::cout << prev << '\n';
|
||||
delete ap;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2014, 2015 Laboratoire de Recherche et
|
||||
// Copyright (C) 2014, 2015, 2017 Laboratoire de Recherche et
|
||||
// Développement de l'Epita (LRDE).
|
||||
//
|
||||
// This file is part of Spot, a model checking library.
|
||||
|
|
@ -77,8 +77,7 @@ main(int argc, char** argv)
|
|||
do
|
||||
{
|
||||
spot::srand(++seed);
|
||||
a = spot::random_graph(states_n, d, &ap, dict, 2, 0.1, 0.5,
|
||||
true);
|
||||
a = spot::random_graph(states_n, d, &ap, dict, 2, 0.1, 0.5, true);
|
||||
}
|
||||
while (a->is_empty());
|
||||
auto na = spot::remove_fin(spot::dualize(a));
|
||||
|
|
@ -102,7 +101,7 @@ main(int argc, char** argv)
|
|||
sw.start();
|
||||
bool res = spot::is_stutter_invariant(std::move(dup_a),
|
||||
std::move(dup_na),
|
||||
apdict, algo);
|
||||
algo);
|
||||
auto time = sw.stop();
|
||||
std::cout << time;
|
||||
if (algo > 1 && res != prev)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue