spot  1.99.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
public.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2013, 2014 Laboratoire de Recherche et Développement
3 // de 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 #pragma once
21 
22 #include "twa/twagraph.hh"
23 #include "misc/location.hh"
24 #include "ltlenv/defaultenv.hh"
25 #include <string>
26 #include <list>
27 #include <utility>
28 #include <iosfwd>
29 #include <misc/bitvect.hh>
30 
31 namespace spot
32 {
35 
37  typedef std::pair<spot::location, std::string> dstar_parse_error;
39  typedef std::list<dstar_parse_error> dstar_parse_error_list;
40 
41  enum dstar_type { Rabin, Streett };
42 
45  struct SPOT_API dstar_aut
46  {
47  // Transition structure of the automaton.
48  // This is encoded as a TGBA without acceptance condition.
49  twa_graph_ptr aut;
51  dstar_type type;
53  size_t accpair_count;
61 
62  ~dstar_aut()
63  {
64  delete accsets;
65  }
66  };
67 
68  typedef std::shared_ptr<dstar_aut> dstar_aut_ptr;
69  typedef std::shared_ptr<const dstar_aut> const_dstar_aut_ptr;
70 
88  SPOT_API dstar_aut_ptr
89  dstar_parse(const std::string& filename,
90  dstar_parse_error_list& error_list,
91  const bdd_dict_ptr& 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 twa_graph_ptr
110  nra_to_nba(const const_dstar_aut_ptr& nra);
111 
116  SPOT_API twa_graph_ptr
117  nra_to_nba(const const_dstar_aut_ptr& nra, const state_set* ignore);
118 
135  SPOT_API twa_graph_ptr
136  dra_to_ba(const const_dstar_aut_ptr& dra, bool* dba_output = 0);
137 
140  SPOT_API twa_graph_ptr
141  nsa_to_tgba(const const_dstar_aut_ptr& nra);
142 
146  SPOT_API twa_graph_ptr
147  dstar_to_tgba(const const_dstar_aut_ptr& dstar);
148 
150 }
Definition: public.hh:31
SPOT_API twa_graph_ptr nra_to_nba(const const_dstar_aut_ptr &nra, const state_set *ignore)
Convert a non-deterministic Rabin automaton into a non-deterministic Büchi automaton.
SPOT_API twa_graph_ptr nsa_to_tgba(const const_dstar_aut_ptr &nra)
Convert a non-deterministic Streett automaton into a non-deterministic tgba.
Definition: bitvect.hh:460
SPOT_API twa_graph_ptr dstar_to_tgba(const const_dstar_aut_ptr &dstar)
Convert a Rabin or Streett automaton into a TGBA.
size_t accpair_count
Number of acceptance pairs.
Definition: public.hh:53
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.
bitvect_array * accsets
acceptance sets encoded as 2*num_state bit-vectors of num_pairs bits
Definition: public.hh:60
dstar_type type
Type of the acceptance.
Definition: public.hh:51
Temporary encoding of an omega automaton produced by ltl2dstar.
Definition: public.hh:45
SPOT_API twa_graph_ptr dra_to_ba(const const_dstar_aut_ptr &dra, bool *dba_output=0)
Convert a deterministic Rabin automaton into a Büchi automaton, deterministic when possible...
std::pair< spot::location, std::string > dstar_parse_error
A parse diagnostic with its location.
Definition: public.hh:37
std::list< dstar_parse_error > dstar_parse_error_list
A list of parser diagnostics, as filled by parse.
Definition: public.hh:39
SPOT_API dstar_aut_ptr dstar_parse(const std::string &filename, dstar_parse_error_list &error_list, const bdd_dict_ptr &dict, ltl::environment &env=ltl::default_environment::instance(), bool debug=false)
Build a spot::twa_graph from ltl2dstar's output.
static default_environment & instance()
Get the sole instance of spot::ltl::default_environment.

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Tue Jun 23 2015 06:55:46 for spot by doxygen 1.8.8