Introduce tgba_explicit_labelled<label> so that we can build
tgba_explicit instances labelled by other objects than strings. * src/tgba/tgbaexplicit.cc, src/tgba/tgbaexplicit.hh: Split tgba_explicit in two levels: tgba_explicit with unlabelled states, and tgba_explicit_labelled templated by the type of the label. Define tgba_explicit_string (with the interface of the former tgba_explicit class) and tgba_explicit_formula for future use in ltl2tgba.cc. * src/tgba/tgbareduc.cc, src/tgba/tgbareduc.hh, src/tgbaalgos/cutscc.cc, src/tgbaalgos/dupexp.cc, src/tgbaalgos/emptiness.cc, src/tgbaalgos/ltl2tgba_fm.cc, src/tgbaalgos/powerset.cc, src/tgbaalgos/randomgraph.cc, src/tgbaparse/public.hh, src/tgbaparse/tgbaparse.yy, src/tgbatest/explicit.cc, src/tgbatest/ltl2tgba.cc: Adjust to use tgba_explicit_string when appropriate.
This commit is contained in:
parent
d3dcecc6c3
commit
4e22bb8b09
15 changed files with 284 additions and 191 deletions
|
|
@ -1,6 +1,6 @@
|
|||
// Copyright (C) 2003, 2004, 2005, 2006 Laboratoire d'Informatique de
|
||||
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
|
||||
// Université Pierre et Marie Curie.
|
||||
// Copyright (C) 2003, 2004, 2005, 2006, 2009 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.
|
||||
//
|
||||
|
|
@ -62,14 +62,14 @@ namespace spot
|
|||
/// was parsed succesfully, check \a error_list for emptiness.
|
||||
///
|
||||
/// \warning This function is not reentrant.
|
||||
tgba_explicit* tgba_parse(const std::string& filename,
|
||||
tgba_parse_error_list& error_list,
|
||||
bdd_dict* dict,
|
||||
ltl::environment& env
|
||||
= ltl::default_environment::instance(),
|
||||
ltl::environment& envacc
|
||||
= ltl::default_environment::instance(),
|
||||
bool debug = false);
|
||||
tgba_explicit_string* tgba_parse(const std::string& filename,
|
||||
tgba_parse_error_list& error_list,
|
||||
bdd_dict* dict,
|
||||
ltl::environment& env
|
||||
= ltl::default_environment::instance(),
|
||||
ltl::environment& envacc
|
||||
= ltl::default_environment::instance(),
|
||||
bool debug = false);
|
||||
|
||||
/// \brief Format diagnostics produced by spot::tgba_parse.
|
||||
/// \param os Where diagnostics should be output.
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ typedef std::map<std::string, bdd> formula_cache;
|
|||
%parse-param {spot::tgba_parse_error_list& error_list}
|
||||
%parse-param {spot::ltl::environment& parse_environment}
|
||||
%parse-param {spot::ltl::environment& parse_envacc}
|
||||
%parse-param {spot::tgba_explicit*& result}
|
||||
%parse-param {spot::tgba_explicit_string*& result}
|
||||
%parse-param {formula_cache& fcache}
|
||||
%union
|
||||
{
|
||||
|
|
@ -233,7 +233,7 @@ tgbayy::parser::error(const location_type& location,
|
|||
|
||||
namespace spot
|
||||
{
|
||||
tgba_explicit*
|
||||
tgba_explicit_string*
|
||||
tgba_parse(const std::string& name,
|
||||
tgba_parse_error_list& error_list,
|
||||
bdd_dict* dict,
|
||||
|
|
@ -249,7 +249,7 @@ namespace spot
|
|||
return 0;
|
||||
}
|
||||
formula_cache fcache;
|
||||
tgba_explicit* result = new tgba_explicit(dict);
|
||||
tgba_explicit_string* result = new tgba_explicit_string(dict);
|
||||
tgbayy::parser parser(error_list, env, envacc, result, fcache);
|
||||
parser.set_debug_level(debug);
|
||||
parser.parse();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue