Commit 01590273 authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz

simulation: get rid of the "don't care" simulation reductions

Those where never really publicized because they were slow and we failed
to fix what we hopped to fix with them.  They where never used by
default.  Getting rid of them will make it easier to cleanup the
simulation code.

* src/tgbaalgos/simulation.cc, src/tgbaalgos/simulation.hh: Remove
the simulation code.
* src/tgbaalgos/postproc.cc, src/tgbaalgos/postproc.hh,
src/tgbatest/ltl2tgba.cc: Do not call it.
* src/bin/spot-x.cc: Update doc.
* src/tgbatest/sim.test: Delete this file.
* src/tgbatest/Makefile.am: Adjust.
* src/tgbatest/spotlbtt.test, bench/ltl2tgba/tools.sim:
Remove uses to don't care simulation.
parent 1d724bea
## -*- coding: utf-8; mode: sh -*-
## Copyright (C) 2013 Laboratoire de Recherche et Développement de
## l'Epita (LRDE).
## Copyright (C) 2013, 2015 Laboratoire de Recherche et Développement
## de l'Epita (LRDE).
##
## This file is part of Spot, a model checking library.
##
......@@ -25,11 +25,9 @@ set dummy \
"$LTL2TGBA --lbtt -x simul=1 %f >%T" \
"$LTL2TGBA --lbtt -x simul=2 %f >%T" \
"$LTL2TGBA --lbtt -x simul=3 %f >%T" \
"$LTL2TGBA --lbtt -x simul=4 %f >%T" \
"$LTL2TGBA --lbtt --ba -x simul=0 %f >%T" \
"$LTL2TGBA --lbtt --ba -x simul=1 %f >%T" \
"$LTL2TGBA --lbtt --ba -x simul=2 %f >%T" \
"$LTL2TGBA --lbtt --ba -x simul=3 %f >%T" \
"$LTL2TGBA --lbtt --ba -x simul=4 %f >%T" \
--timeout=300
shift
// -*- coding: utf-8 -*-
// Copyright (C) 2013, 2014 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2013, 2014, 2015 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
......@@ -86,15 +86,8 @@ with more states.") },
{ DOC("simul", "Set to 0 to disable simulation-based reductions. \
Set to 1 to use only direct simulation. Set to 2 to use only reverse \
simulation. Set to 3 to iterate both direct and reverse simulations. \
Set to 4 to apply only \"don't care\" direct simulation. Set to 5 to \
iterate \"don't care\" direct simulation and reverse simulation. The \
default is 3, except when option --low is specified, in which case the \
default is 1.") },
{ DOC("simul-limit", "Can be set to a positive integer to cap the \
number of \"don't care\" transitions considered by the \
\"don't care\"-simulation algorithm. A negative value (the default) \
does not enforce any limit. Note that if there are N \"don't care\" \
transitions, the algorithm may potentially test 2^N configurations.") },
The default is 3, except when option --low is specified, in which case \
the default is 1.") },
{ DOC("ba-simul", "Set to 0 to disable simulation-based reductions \
on the Büchi automaton (i.e., after degeneralization has been performed). \
Set to 1 to use only direct simulation. Set to 2 to use only reverse \
......
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et
// Copyright (C) 2012, 2013, 2014, 2015 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
......@@ -48,7 +48,6 @@ namespace spot
degen_cache_ = opt->get("degen-lcache", 1);
degen_lskip_ = opt->get("degen-lskip", 1);
simul_ = opt->get("simul", -1);
simul_limit_ = opt->get("simul-limit", -1);
scc_filter_ = opt->get("scc-filter", -1);
ba_simul_ = opt->get("ba-simul", -1);
tba_determinisation_ = opt->get("tba-det", 0);
......@@ -87,10 +86,6 @@ namespace spot
case 3:
default:
return iterated_simulations(a);
case 4:
return dont_care_simulation(a, simul_limit_);
case 5:
return dont_care_iterated_simulations(a, simul_limit_);
}
}
......
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et
// Copyright (C) 2012, 2013, 2014, 2015 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
......@@ -117,7 +117,6 @@ namespace spot
int degen_cache_;
bool degen_lskip_;
int simul_;
int simul_limit_;
int scc_filter_;
int ba_simul_;
bool tba_determinisation_;
......
This diff is collapsed.
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et
// Copyright (C) 2012, 2013, 2014, 2015 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
......@@ -79,8 +79,8 @@ namespace spot
/// one state are included in the prefixes leading to one, the former
/// state can be merged into the latter.
///
/// Reverse simulation is discussed in the following paper, bu
/// following paper, but generalized to handle TGBA directly.
/// Reverse simulation is discussed in the following paper,
/// but generalized to handle TGBA directly.
/** \verbatim
@InProceedings{ somenzi.00.cav,
author = {Fabio Somenzi and Roderick Bloem},
......@@ -144,19 +144,6 @@ namespace spot
iterated_simulations_sba(const const_tgba_ptr& automaton);
/// @}
// FIXME: Remove: dont_care_*_simulation is broken since the move to
// bitset acceptance, has never been really used, and really useful
// (nor really well tested and understood), so we should remove it.
SPOT_API tgba_digraph_ptr
dont_care_simulation(const const_tgba_ptr& t, int limit = -1);
SPOT_API tgba_digraph_ptr
dont_care_iterated_simulations(const const_tgba_ptr& t, int limit = -1);
/// @}
} // End namespace spot.
......
## -*- coding: utf-8 -*-
## Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Laboratoire de
## Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Laboratoire de
## Recherche et Développement de l'Epita (LRDE).
## Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
## Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
......@@ -138,8 +138,6 @@ TESTS = \
randpsl.test \
cycles.test
XFAIL_TESTS = sim.test
EXTRA_DIST = $(TESTS)
distclean-local:
......
......@@ -210,8 +210,6 @@ syntax(char* prog)
<< std::endl
<< " -RIS iterate both direct and reverse simulations"
<< std::endl
<< " -RDCS reduce the automaton with direct simulation"
<< std::endl
<< " -Rm attempt to WDBA-minimize the automaton" << std::endl
<< std::endl
<< " -RM attempt to WDBA-minimize the automaton unless the "
......@@ -390,9 +388,6 @@ checked_main(int argc, char** argv)
bool reduction_dir_sim = false;
bool reduction_rev_sim = false;
bool reduction_iterated_sim = false;
bool reduction_dont_care_sim = false;
int limit_dont_care_sim = 0;
bool reduction_iterated_dont_care_sim = false;
bool opt_bisim_ta = false;
bool ta_opt = false;
bool tgta_opt = false;
......@@ -719,18 +714,6 @@ checked_main(int argc, char** argv)
{
reduction_iterated_sim = true;
}
else if (!strncmp(argv[formula_index], "-RDCS", 5))
{
reduction_dont_care_sim = true;
if (argv[formula_index][5] == '=')
limit_dont_care_sim = to_int(argv[formula_index] + 6);
}
else if (!strncmp(argv[formula_index], "-RDCIS", 6))
{
reduction_iterated_dont_care_sim = true;
if (argv[formula_index][6] == '=')
limit_dont_care_sim = to_int(argv[formula_index] + 7);
}
else if (!strcmp(argv[formula_index], "-rL"))
{
simpltl = true;
......@@ -1218,8 +1201,6 @@ checked_main(int argc, char** argv)
// When the minimization succeed, simulation is useless.
reduction_dir_sim = false;
reduction_rev_sim = false;
reduction_iterated_dont_care_sim = false;
reduction_dont_care_sim = false;
reduction_iterated_sim = false;
assume_sba = true;
}
......@@ -1242,14 +1223,6 @@ checked_main(int argc, char** argv)
}
if (reduction_iterated_dont_care_sim)
{
tm.start("don't care iterated simulation");
a = spot::dont_care_iterated_simulations(a, limit_dont_care_sim);
tm.stop("don't care iterated simulation");
assume_sba = false;
}
if (reduction_iterated_sim)
{
tm.start("Reduction w/ iterated simulations");
......@@ -1265,23 +1238,6 @@ checked_main(int argc, char** argv)
tm.stop("SCC-filter post-sim");
}
if (reduction_dont_care_sim)
{
tm.start("don't care simulation");
a = spot::dont_care_simulation(a, limit_dont_care_sim);
tm.stop("don't care simulation");
if (scc_filter)
{
auto aa = std::static_pointer_cast<const spot::tgba_digraph>(a);
assert(aa);
tm.start("SCC-filter on don't care");
a = spot::scc_filter(aa, true);
tm.stop("SCC-filter on don't care");
}
assume_sba = false;
}
unsigned int n_acc = a->acc().num_sets();
if (echeck_inst
&& degeneralize_opt == NoDegen
......
#! /bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2013, 2014 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
#
# This file is part of Spot, a model checking library.
#
# Spot is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# Spot is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. ./defs
set -e
cat >in.tgba <<EOF
acc = "1";
"i", "x", "b",;
"i", "d2", "b",;
"x", "ed", "a", "1";
"ed", "ed", "a & b", "1";
"d2", "d", "a",;
"d", "d", "a", "1";
EOF
run 0 ../ltl2tgba -X -RDCS -b in.tgba > out.tgba
cat >expected.tgba <<EOF
acc = "0";
"0", "1", "b",;
"1", "1", "a", "0";
EOF
diff out.tgba expected.tgba
run 0 ../ltl2tgba -RDCIS -b XXXXGFa > out.tgba
cat >expected.tgba <<EOF
acc = "0";
"0", "0", "a", "0";
"0", "0", "!a",;
EOF
diff out.tgba expected.tgba
run 0 ../ltl2tgba -RDCIS -kt 'Fp U Gq' > out
cat >expected <<EOF
sub trans.: 12
transitions: 6
states: 3
nondeterministic states: 1
EOF
diff out expected
run 0 ../ltl2tgba -R3 -x -RDCS -kt 'F(a & GFa)' > out
run 0 ../ltl2tgba -R3f -x -RDCS -kt 'F(a & GFa)' > out2
diff out out2
f='FG((Fp0 & (!p0 R (F!p1 U !p1))) | (G!p0 & (p0 U (Gp1 R p1))))'
run 0 ../ltl2tgba -R3f -x -RDS -kt "$f" | grep -v sub > out
run 0 ../ltl2tgba -R3f -x -RDCS -kt "$f" | grep -v sub > out2
diff out out2
run 0 ../ltl2tgba -R3f -x -RDCS -kt "$f" > out2
cat >expected <<EOF
sub trans.: 13
transitions: 8
states: 3
nondeterministic states: 1
EOF
diff out2 expected
#!/bin/sh
# -*- coding: utf-8 -*-
# Copyright (C) 2009, 2010, 2011, 2012, 2014 Laboratoire de Recherche
# et Développement de l'Epita (LRDE).
# Copyright (C) 2009, 2010, 2011, 2012, 2014, 2015 Laboratoire de
# Recherche et Développement de l'Epita (LRDE).
# Copyright (C) 2003, 2004, 2005, 2006, 2007 Laboratoire
# d'Informatique de Paris 6 (LIP6), département Systèmes Répartis
# Coopératifs (SRC), Université Pierre et Marie Curie.
......@@ -134,23 +134,6 @@ Algorithm
Enabled = yes
}
Algorithm
{
Name = "Spot (Couvreur -- FM), don't care simulation"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot '../ltl2tgba -F -f -t -RDCS -r4 -R3f'"
Enabled = no
}
Algorithm
{
Name = "Spot (Couvreur -- FM), don't care iterated simulation"
Path = "${LBTT_TRANSLATE}"
Parameters = "--spot '../ltl2tgba -F -f -t -RDCIS -r4 -R3f'"
Enabled = no
}
Algorithm
{
Name = "Spot (Couvreur -- FM), cosimulated"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment