Revert "Add never claim parser."

Such changes should not be pushed to master before they are finished
(this doesn't pass distcheck).

This reverts commit 9aaa638b27.
This commit is contained in:
Alexandre Duret-Lutz 2010-06-21 17:41:20 +02:00
parent 9aaa638b27
commit 498b44f742
13 changed files with 41 additions and 743 deletions

View file

@ -39,7 +39,6 @@ check_PROGRAMS = \
explprod \
ltlprod \
mixprod \
neverclaimread \
powerset \
readsave \
reductgba \
@ -59,7 +58,6 @@ explprod_SOURCES = explprod.cc
ltl2tgba_SOURCES = ltl2tgba.cc
ltlprod_SOURCES = ltlprod.cc
mixprod_SOURCES = mixprod.cc
neverclaimread_SOURCES = neverclaimread.cc
powerset_SOURCES = powerset.cc
randtgba_SOURCES = randtgba.cc
readsave_SOURCES = readsave.cc
@ -77,7 +75,6 @@ TESTS = \
explicit.test \
taatgba.test \
tgbaread.test \
neverclaimread.test \
readsave.test \
ltl2tgba.test \
ltl2neverclaim.test \

View file

@ -1,85 +0,0 @@
// Copyright (C) 2008 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// Copyright (C) 2003, 2004, 2006 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 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.
#include <iostream>
#include <cassert>
#include <cstdlib>
#include <cstring>
#include "neverclaimparse/public.hh"
#include "tgba/tgbaexplicit.hh"
#include "tgbaalgos/dotty.hh"
#include "ltlast/allnodes.hh"
void
syntax(char* prog)
{
std::cerr << prog << " [-d] filename" << std::endl;
exit(2);
}
int
main(int argc, char** argv)
{
if (argc < 2)
syntax(argv[0]);
bool debug = false;
int filename_index = 1;
if (!strcmp(argv[1], "-d"))
{
debug = true;
if (argc < 3)
syntax(argv[0]);
filename_index = 2;
}
spot::bdd_dict* dict = new spot::bdd_dict();
spot::ltl::environment& env(spot::ltl::default_environment::instance());
spot::neverclaim_parse_error_list pel;
spot::tgba_explicit* a = spot::neverclaim_parse(argv[filename_index],
pel, dict, env, debug);
if (spot::format_neverclaim_parse_errors(std::cerr, argv[filename_index],
pel))
return 2;
if (a)
{
spot::dotty_reachable(std::cout, a);
delete a;
}
else
{
return 1;
}
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);
return 0;
}

View file

@ -1,70 +0,0 @@
#!/bin/sh
# 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 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
cat >input <<EOF
never {
T2_init:
if
:: (1) -> goto T2_init
:: (p1 && p0) -> goto T1
fi;
T1:
if
:: (p1 && (! p0)) -> goto accept_all
:: (p1) -> goto T1
fi;
accept_all:
skip
}
EOF
run 0 ../neverclaimread input > stdout
cat >expected <<EOF
digraph G {
0 [label="", style=invis, height=0]
0 -> 1
1 [label="T2_init"]
1 -> 2 [label="p0 & p1\n"]
1 -> 1 [label="1\n"]
2 [label="T1"]
2 -> 2 [label="p1\n"]
2 -> 3 [label="p1 & !p0\n"]
3 [label="accept_all"]
3 -> 3 [label="1\n"]
}
EOF
# Sort out some possible inversions in the output.
# (The order is not guaranteed by SPOT.)
sed -e 's/!p0 & p1/p1 \& !p0/g' -e 's/p1 & p0/p0 \& p1/g' stdout \
> tmp_ && mv tmp_ stdout
diff stdout expected
rm input stdout expected