spot  1.2.1a
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
public.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2013 Laboratoire de Recherche et Développement de
3 // l'Epita (LRDE).
4 //
5 // This file is part of Spot, a model checking library.
6 //
7 // Spot is free software; you can redistribute it and/or modify it
8 // under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // Spot is distributed in the hope that it will be useful, but WITHOUT
13 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 // License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 
20 #ifndef SPOT_DSTARPARSE_PUBLIC_HH
21 # define SPOT_DSTARPARSE_PUBLIC_HH
22 
23 # include "tgba/tgbaexplicit.hh"
24 # include "misc/location.hh"
25 # include "ltlenv/defaultenv.hh"
26 # include <string>
27 # include <list>
28 # include <utility>
29 # include <iosfwd>
30 # include <misc/bitvect.hh>
31 
32 namespace spot
33 {
36 
38  typedef std::pair<spot::location, std::string> dstar_parse_error;
40  typedef std::list<dstar_parse_error> dstar_parse_error_list;
41 
42  enum dstar_type { Rabin, Streett };
43 
46  struct SPOT_API dstar_aut
47  {
48  // Transition structure of the automaton.
49  // This is encoded as a TGBA without acceptance condition.
52  dstar_type type;
54  size_t accpair_count;
62 
63  ~dstar_aut()
64  {
65  delete aut;
66  delete accsets;
67  }
68  };
69 
70 
88  SPOT_API dstar_aut*
89  dstar_parse(const std::string& filename,
90  dstar_parse_error_list& error_list,
91  bdd_dict* dict,
92  ltl::environment& env = ltl::default_environment::instance(),
93  bool debug = false);
94 
101  SPOT_API bool
102  format_dstar_parse_errors(std::ostream& os,
103  const std::string& filename,
104  dstar_parse_error_list& error_list);
105 
106 
109  SPOT_API tgba*
110  nra_to_nba(const dstar_aut* nra);
111 
116  SPOT_API tgba*
117  nra_to_nba(const dstar_aut* nra, const state_set* ignore);
118 
135  SPOT_API tgba*
136  dra_to_ba(const dstar_aut* dra, bool* dba_output = 0);
137 
140  SPOT_API tgba*
141  nsa_to_tgba(const dstar_aut* nra);
142 
146  SPOT_API tgba*
147  dstar_to_tgba(const dstar_aut* dstar);
148 
149 
151 }
152 
153 #endif // SPOT_DSTARPARSE_PUBLIC_HH
SPOT_API bool format_dstar_parse_errors(std::ostream &os, const std::string &filename, dstar_parse_error_list &error_list)
Format diagnostics produced by spot::dstar_parse.
Definition: bitvect.hh:429
size_t accpair_count
Number of acceptance pairs.
Definition: public.hh:54
SPOT_API tgba * dra_to_ba(const dstar_aut *dra, bool *dba_output=0)
Convert a deterministic Rabin automaton into a Büchi automaton, deterministic when possible...
Definition: tgbaexplicit.hh:758
std::pair< spot::location, std::string > dstar_parse_error
A parse diagnostic with its location.
Definition: public.hh:38
bitvect_array * accsets
acceptance sets encoded as 2*num_state bit-vectors of num_pairs bits
Definition: public.hh:61
dstar_type type
Type of the acceptance.
Definition: public.hh:52
Temporary encoding of an omega automaton produced by ltl2dstar.
Definition: public.hh:46
SPOT_API tgba * nra_to_nba(const dstar_aut *nra)
Convert a non-deterministic Rabin automaton into a non-deterministic Büchi automaton.
SPOT_API tgba * dstar_to_tgba(const dstar_aut *dstar)
Convert a Rabin or Streett automaton into a TGBA.
static default_environment & instance()
Get the sole instance of spot::ltl::default_environment.
std::list< dstar_parse_error > dstar_parse_error_list
A list of parser diagnostics, as filled by parse.
Definition: public.hh:40
SPOT_API dstar_aut * dstar_parse(const std::string &filename, dstar_parse_error_list &error_list, bdd_dict *dict, ltl::environment &env=ltl::default_environment::instance(), bool debug=false)
Build a spot::tgba_explicit from ltl2dstar&#39;s output.
SPOT_API tgba * nsa_to_tgba(const dstar_aut *nra)
Convert a non-deterministic Streett automaton into a non-deterministic tgba.

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Tue Jan 21 2014 16:52:01 for spot by doxygen 1.8.5