tgbaexplicit: execute the test
* src/tgbatest/explicit2.test: New file. * src/tgbatest/Makefile.am: Add it. * src/tgbatest/explicit2.cc: Print the LTL formula as text.
This commit is contained in:
parent
37a6b601c1
commit
8269ae9cee
3 changed files with 51 additions and 2 deletions
|
|
@ -78,6 +78,7 @@ TESTS = \
|
||||||
intvcomp.test \
|
intvcomp.test \
|
||||||
eltl2tgba.test \
|
eltl2tgba.test \
|
||||||
explicit.test \
|
explicit.test \
|
||||||
|
explicit2.test \
|
||||||
taatgba.test \
|
taatgba.test \
|
||||||
tgbaread.test \
|
tgbaread.test \
|
||||||
neverclaimread.test \
|
neverclaimread.test \
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,7 @@
|
||||||
|
|
||||||
#include "ltlenv/defaultenv.hh"
|
#include "ltlenv/defaultenv.hh"
|
||||||
#include "ltlast/allnodes.hh"
|
#include "ltlast/allnodes.hh"
|
||||||
|
#include "ltlvisit/tostring.hh"
|
||||||
|
|
||||||
#include "tgba/tgbaexplicit.hh"
|
#include "tgba/tgbaexplicit.hh"
|
||||||
|
|
||||||
|
|
@ -60,7 +61,6 @@ create_tgba_explicit_number(bdd_dict* d)
|
||||||
|
|
||||||
state_explicit_number* s1 = tgba->add_state(51);
|
state_explicit_number* s1 = tgba->add_state(51);
|
||||||
state_explicit_number* s2 = tgba->add_state(69);
|
state_explicit_number* s2 = tgba->add_state(69);
|
||||||
|
|
||||||
state_explicit_number::transition* t =
|
state_explicit_number::transition* t =
|
||||||
tgba->create_transition(s1, s2);
|
tgba->create_transition(s1, s2);
|
||||||
(void) t;
|
(void) t;
|
||||||
|
|
@ -96,7 +96,7 @@ create_tgba_explicit_formula(bdd_dict* d, spot::ltl::default_environment& e)
|
||||||
for (it->first(); !it->done(); it->next())
|
for (it->first(); !it->done(); it->next())
|
||||||
{
|
{
|
||||||
state_explicit_formula* s = it->current_state();
|
state_explicit_formula* s = it->current_state();
|
||||||
std::cout << s->label() << std::endl;
|
to_string(s->label(), std::cout) << std::endl;
|
||||||
s->destroy();
|
s->destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
48
src/tgbatest/explicit2.test
Executable file
48
src/tgbatest/explicit2.test
Executable file
|
|
@ -0,0 +1,48 @@
|
||||||
|
#!/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 2 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 Spot; see the file COPYING. If not, write to the Free
|
||||||
|
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||||
|
# 02111-1307, USA.
|
||||||
|
|
||||||
|
. ./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, no accepting state
|
||||||
|
S1 ACCEPTING? 0
|
||||||
|
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
|
||||||
Loading…
Add table
Add a link
Reference in a new issue