remove tgba_explicit variants and the old scc_filter

* src/tgba/tgbaexplicit.cc, src/tgba/tgbaexplicit.hh: Delete.
* src/tgba/Makefile.am: Adjust.
* src/tgbaalgos/reductgba_sim.cc, src/tgbaalgos/reductgba_sim.hh:
Delete these obsoleted algorithms.
* src/tgbaalgos/Makefile.am: Adjust.
* src/tgbatest/explicit.cc, src/tgbatest/explicit.test,
src/tgbatest/explicit2.cc, src/tgbatest/explicit2.test,
src/tgbatest/explicit3.cc, src/tgbatest/explicit3.test:
Delete.
* src/tgbatest/Makefile.am: Adjust.
* src/bin/ltl2tgba.cc, src/priv/countstates.cc,
src/tgbaalgos/isweakscc.cc, src/tgbaalgos/lbtt.cc,
src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/minimize.cc,
src/tgbaalgos/minimize.hh, src/tgbaalgos/powerset.cc,
src/tgbaalgos/powerset.hh, src/tgbaalgos/sccfilter.cc,
src/tgbaalgos/sccfilter.hh, src/tgbaalgos/simulation.cc,
src/tgbatest/explprod.cc, src/tgbatest/ltl2tgba.cc,
src/tgbatest/powerset.cc, src/tgbatest/tgbaread.cc,
src/tgbatest/tripprod.cc, wrap/python/ajax/spot.in,
wrap/python/spot.i: Remove all remaining references to
tgba_explicit.
This commit is contained in:
Alexandre Duret-Lutz 2014-08-12 09:16:07 +02:00
parent 6c9d5e4bb3
commit e6ea90e326
32 changed files with 23 additions and 2126 deletions

View file

@ -33,9 +33,6 @@ check_SCRIPTS = defs
check_PROGRAMS = \
bitvect \
complement \
explicit \
explicit2 \
explicit3 \
expldot \
explprod \
intvcomp \
@ -51,9 +48,6 @@ check_PROGRAMS = \
# Keep this sorted alphabetically.
bitvect_SOURCES = bitvect.cc
complement_SOURCES = complementation.cc
explicit_SOURCES = explicit.cc
explicit2_SOURCES = explicit2.cc
explicit3_SOURCES = explicit3.cc
expldot_SOURCES = powerset.cc
expldot_CXXFLAGS = -DDOTTY
explprod_SOURCES = explprod.cc
@ -74,8 +68,6 @@ tripprod_SOURCES = tripprod.cc
TESTS = \
intvcomp.test \
bitvect.test \
explicit.test \
explicit2.test \
ltlcross3.test \
taatgba.test \
tgbaread.test \

View file

@ -1,61 +0,0 @@
// Copyright (C) 2009 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
//
// 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/>.
#include <iostream>
#include <cassert>
#include "ltlenv/defaultenv.hh"
#include "tgba/tgbaexplicit.hh"
#include "tgbaalgos/dotty.hh"
#include "ltlast/allnodes.hh"
int
main()
{
spot::bdd_dict* dict = new spot::bdd_dict();
spot::ltl::default_environment& e =
spot::ltl::default_environment::instance();
spot::tgba_explicit_string* a = new spot::tgba_explicit_string(dict);
typedef spot::state_explicit_string::transition trans;
trans* t1 = a->create_transition("state 0", "state 1");
trans* t2 = a->create_transition("state 1", "state 2");
trans* t3 = a->create_transition("state 2", "state 0");
a->add_condition(t2, e.require("a"));
a->add_condition(t3, e.require("b"));
a->add_condition(t3, e.require("c"));
a->declare_acceptance_condition(e.require("p"));
a->declare_acceptance_condition(e.require("q"));
a->declare_acceptance_condition(e.require("r"));
a->add_acceptance_condition(t1, e.require("p"));
a->add_acceptance_condition(t1, e.require("q"));
a->add_acceptance_condition(t2, e.require("r"));
spot::dotty_reachable(std::cout, a);
delete a;
delete dict;
assert(spot::ltl::atomic_prop::instance_count() == 0);
assert(spot::ltl::unop::instance_count() == 0);
assert(spot::ltl::binop::instance_count() == 0);
assert(spot::ltl::multop::instance_count() == 0);
}

View file

@ -1,45 +0,0 @@
#!/bin/sh
# Copyright (C) 2008, 2009, 2013 Laboratoire de Recherche et Développement
# de l'Epita (LRDE).
# Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de
# Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
# Université Pierre et Marie Curie.
#
# 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
run 0 ../explicit > stdout
cat >expected <<EOF
digraph G {
0 [label="", style=invis, height=0]
0 -> 1
1 [label="state 0"]
1 -> 2 [label="1\n{Acc[q], Acc[p]}"]
2 [label="state 1"]
2 -> 3 [label="a\n{Acc[r]}"]
3 [label="state 2"]
3 -> 1 [label="b & c\n"]
}
EOF
diff stdout expected
rm stdout expected

View file

@ -1,200 +0,0 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012, 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/>.
#include <iostream>
#include <cassert>
#include "ltlenv/defaultenv.hh"
#include "ltlast/allnodes.hh"
#include "ltlvisit/tostring.hh"
#include "tgba/tgbaexplicit.hh"
using namespace spot;
void
create_tgba_explicit_string(bdd_dict* d)
{
tgba_explicit<state_explicit_string>* tgba =
new tgba_explicit<state_explicit_string>(d);
state_explicit_string* s1 = tgba->add_state("toto");
state_explicit_string* s2 = tgba->add_state("tata");
state_explicit_string::transition* t =
tgba->create_transition(s1, s2);
(void) t;
for (auto it: tgba->succ(tgba->get_init_state()))
{
state_explicit_string* se =
down_cast<state_explicit_string*>(it->current_state());
std::cout << se->label() << std::endl;
se->destroy();
}
delete tgba;
}
void
create_tgba_explicit_number(bdd_dict* d)
{
tgba_explicit<state_explicit_number>* tgba =
new tgba_explicit<state_explicit_number>(d);
state_explicit_number* s1 = tgba->add_state(51);
state_explicit_number* s2 = tgba->add_state(69);
state_explicit_number::transition* t =
tgba->create_transition(s1, s2);
(void) t;
for (auto it: tgba->succ(tgba->get_init_state()))
{
state_explicit_number* s =
down_cast<state_explicit_number*>(it->current_state());
std::cout << s->label() << std::endl;
s->destroy();
}
delete tgba;
}
void
create_tgba_explicit_formula(bdd_dict* d, spot::ltl::default_environment& e)
{
tgba_explicit<state_explicit_formula>* tgba =
new tgba_explicit<state_explicit_formula>(d);
state_explicit_formula* s1 = tgba->add_state(e.require("a"));
state_explicit_formula* s2 = tgba->add_state(e.require("b"));
state_explicit_formula::transition* t =
tgba->create_transition(s1, s2);
(void) t;
for (auto it: tgba->succ(tgba->get_init_state()))
{
state_explicit_formula* s =
down_cast<state_explicit_formula*>(it->current_state());
to_string(s->label(), std::cout) << std::endl;
s->destroy();
}
delete tgba;
}
void create_sba_explicit_string(bdd_dict* d)
{
sba_explicit<state_explicit_string>* sba =
new sba_explicit<state_explicit_string>(d);
ltl::formula* acc = ltl::constant::true_instance();
sba->declare_acceptance_condition(acc);
state_explicit_string* s1 = sba->add_state("STATE1");
state_explicit_string* s2 = sba->add_state("STATE2");
state_explicit_string* s3 = sba->add_state("STATE3");
state_explicit_string::transition* t =
sba->create_transition(s1, s2);
sba->add_acceptance_condition(t, acc);
t = sba->create_transition(s1, s3);
sba->add_acceptance_condition(t, acc);
std::cout << "S1 ACCEPTING? " << sba->state_is_accepting(s1) << std::endl;
std::cout << "S2 ACCEPTING? " << sba->state_is_accepting(s2) << std::endl;
std::cout << "S3 ACCEPTING? " << sba->state_is_accepting(s3) << std::endl;
delete sba;
}
void create_sba_explicit_number(bdd_dict* d)
{
sba_explicit<state_explicit_number>* sba =
new sba_explicit<state_explicit_number>(d);
ltl::formula* acc = ltl::constant::true_instance();
sba->declare_acceptance_condition(acc);
state_explicit_number* s1 = sba->add_state(1);
state_explicit_number* s2 = sba->add_state(2);
state_explicit_number::transition* t = sba->create_transition(s1, s2);
sba->add_acceptance_condition(t, acc);
std::cout << "S1 ACCEPTING? " << sba->state_is_accepting(s1) << std::endl;
std::cout << "S2 ACCEPTING? " << sba->state_is_accepting(s2) << std::endl;
delete sba;
}
void
create_sba_explicit_formula(bdd_dict* d, spot::ltl::default_environment& e)
{
sba_explicit<state_explicit_formula>* sba =
new sba_explicit<state_explicit_formula>(d);
ltl::formula* acc = ltl::constant::true_instance();
sba->declare_acceptance_condition(acc);
state_explicit_formula* s1 = sba->add_state(e.require("a"));
state_explicit_formula* s2 = sba->add_state(e.require("b"));
state_explicit_formula* s3 = sba->add_state(e.require("c"));
state_explicit_formula::transition* t = sba->create_transition(s1, s2);
sba->add_acceptance_condition(t, acc);
t = sba->create_transition(s1, s3);
sba->add_acceptance_condition(t, acc);
std::cout << "S1 ACCEPTING? " << sba->state_is_accepting(s1) << std::endl;
std::cout << "S2 ACCEPTING? " << sba->state_is_accepting(s2) << std::endl;
std::cout << "S3 ACCEPTING? " << sba->state_is_accepting(s3) << std::endl;
delete sba;
}
int
main(int argc, char** argv)
{
(void) argc;
(void) argv;
bdd_dict* d = new spot::bdd_dict();
spot::ltl::default_environment& e =
spot::ltl::default_environment::instance();
//check tgba creation
std::cout << "* TGBA explicit string" << std::endl;
create_tgba_explicit_string(d);
std::cout << "* TGBA explicit number" << std::endl;
create_tgba_explicit_number(d);
std::cout << "* TGBA explicit formula" << std::endl;
create_tgba_explicit_formula(d, e);
//check sba creation
std::cout << "* SBA explicit string, 1 accepting state" << std::endl;
create_sba_explicit_string(d);
std::cout << "* SBA explicit number, 1 accepting state" << std::endl;
create_sba_explicit_number(d);
std::cout << "* SBA explicit formula, 1 accepting state" << std::endl;
create_sba_explicit_formula(d, e);
delete d;
assert(spot::ltl::atomic_prop::instance_count() == 0);
assert(spot::ltl::unop::instance_count() == 0);
assert(spot::ltl::binop::instance_count() == 0);
assert(spot::ltl::multop::instance_count() == 0);
}

View file

@ -1,46 +0,0 @@
#!/bin/sh
# Copyright (C) 2012 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
run 0 ../explicit2 >stdout
cat stdout
cat >expected <<EOF
* TGBA explicit string
tata
* TGBA explicit number
69
* TGBA explicit formula
b
* SBA explicit string, 1 accepting state
S1 ACCEPTING? 1
S2 ACCEPTING? 0
S3 ACCEPTING? 0
* SBA explicit number, 1 accepting state
S1 ACCEPTING? 1
S2 ACCEPTING? 0
* SBA explicit formula, 1 accepting state
S1 ACCEPTING? 1
S2 ACCEPTING? 0
S3 ACCEPTING? 0
EOF
cmp expected stdout

View file

@ -1,98 +0,0 @@
// Copyright (C) 2013 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/>.
#include <iostream>
#include <cassert>
#include "ltlenv/defaultenv.hh"
#include "tgba/tgbaexplicit.hh"
#include "tgbaalgos/dotty.hh"
#include "ltlast/allnodes.hh"
#include "tgba/tgbamask.hh"
int
main()
{
spot::ltl::default_environment& e =
spot::ltl::default_environment::instance();
const spot::ltl::formula* a = e.require("a");
const spot::ltl::formula* b = e.require("b");
const spot::ltl::formula* c = e.require("c");
spot::bdd_dict* dict = new spot::bdd_dict();
spot::tgba_explicit_number* aut = new spot::tgba_explicit_number(dict);
typedef spot::state_explicit_number::transition trans;
{
trans* t = aut->create_transition(0, 1);
aut->add_condition(t, a->clone());
}
{
trans* t = aut->create_transition(1, 2);
aut->add_condition(t, a->clone());
}
{
trans* t = aut->create_transition(2, 0);
aut->add_condition(t, a->clone());
}
{
trans* t = aut->create_transition(1, 3);
aut->add_condition(t, b->clone());
}
{
trans* t = aut->create_transition(3, 4);
aut->add_condition(t, c->clone());
}
{
trans* t = aut->create_transition(4, 3);
aut->add_condition(t, c->clone());
aut->declare_acceptance_condition(b->clone());
aut->add_acceptance_condition(t, b->clone());
}
a->destroy();
b->destroy();
c->destroy();
spot::dotty_reachable(std::cout, aut);
spot::state_set s;
s.insert(aut->get_state(0));
s.insert(aut->get_state(1));
s.insert(aut->get_state(2));
const spot::tgba* mk = build_tgba_mask_keep(aut, s);
spot::dotty_reachable(std::cout, mk);
delete mk;
const spot::tgba* mi = build_tgba_mask_ignore(aut, s);
spot::dotty_reachable(std::cout, mi);
delete mi;
const spot::tgba* mi2 = build_tgba_mask_ignore(aut, s, aut->get_state(1));
spot::dotty_reachable(std::cout, mi2);
delete mi2;
delete aut;
delete dict;
assert(spot::ltl::atomic_prop::instance_count() == 0);
assert(spot::ltl::unop::instance_count() == 0);
assert(spot::ltl::binop::instance_count() == 0);
assert(spot::ltl::multop::instance_count() == 0);
}

View file

@ -1,68 +0,0 @@
#!/bin/sh
# Copyright (C) 2013 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
run 0 ../explicit3 | tee stdout
cat >expected <<EOF
digraph G {
0 [label="", style=invis, height=0]
0 -> 1
1 [label="0"]
1 -> 2 [label="a\n"]
2 [label="1"]
2 -> 3 [label="a\n"]
2 -> 4 [label="b\n"]
3 [label="2"]
3 -> 1 [label="a\n"]
4 [label="3"]
4 -> 5 [label="c\n"]
5 [label="4"]
5 -> 4 [label="c\n{Acc[b]}"]
}
digraph G {
0 [label="", style=invis, height=0]
0 -> 1
1 [label="0"]
1 -> 2 [label="a\n"]
2 [label="1"]
2 -> 3 [label="a\n"]
3 [label="2"]
3 -> 1 [label="a\n"]
}
digraph G {
0 [label="", style=invis, height=0]
0 -> 1
1 [label="0"]
}
digraph G {
0 [label="", style=invis, height=0]
0 -> 1
1 [label="1"]
1 -> 2 [label="b\n"]
2 [label="3"]
2 -> 3 [label="c\n"]
3 [label="4"]
3 -> 2 [label="c\n{Acc[b]}"]
}
EOF
cmp expected stdout

View file

@ -23,7 +23,6 @@
#include <iostream>
#include <cassert>
#include <cstdlib>
#include "tgba/tgbaexplicit.hh"
#include "tgba/tgbaproduct.hh"
#include "tgbaparse/public.hh"
#include "tgbaalgos/save.hh"

View file

@ -1301,10 +1301,19 @@ main(int argc, char** argv)
if (scc_filter && (reduction_dir_sim || reduction_rev_sim))
{
auto aa = dynamic_cast<const spot::tgba_digraph*>(a);
bool freeit = false;
if (!aa)
{
freeit = true;
aa = spot::tgba_dupexp_dfs(a);
}
tm.start("SCC-filter post-sim");
delete aut_scc;
aut_scc = a = spot::scc_filter(a, scc_filter_all);
aut_scc = a = spot::scc_filter(aa, scc_filter_all);
tm.stop("SCC-filter post-sim");
if (freeit)
delete aa;
}
if (reduction_dont_care_sim)

View file

@ -23,7 +23,6 @@
#include <iostream>
#include <cassert>
#include <cstdlib>
#include "tgba/tgbaexplicit.hh"
#include "tgbaalgos/powerset.hh"
#include "tgbaparse/public.hh"
#include "tgbaalgos/save.hh"

View file

@ -25,7 +25,6 @@
#include <cstdlib>
#include <cstring>
#include "tgbaparse/public.hh"
#include "tgba/tgbaexplicit.hh"
#include "tgbaalgos/dotty.hh"
#include "ltlast/allnodes.hh"

View file

@ -23,7 +23,6 @@
#include <iostream>
#include <cassert>
#include <cstdlib>
#include "tgba/tgbaexplicit.hh"
#include "tgba/tgbaproduct.hh"
#include "tgbaparse/public.hh"
#include "tgbaalgos/save.hh"