spot  2.16
mtdtwa.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) by the Spot authors, see the AUTHORS file for details.
3 //
4 // This file is part of Spot, a model checking library.
5 //
6 // Spot is free software; you can redistribute it and/or modify it
7 // under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 3 of the License, or
9 // (at your option) any later version.
10 //
11 // Spot is distributed in the hope that it will be useful, but WITHOUT
12 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14 // License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program. If not, see <http://www.gnu.org/licenses/>.
18 
19 #pragma once
20 
21 #include <spot/twa/twagraph.hh>
22 #include <spot/misc/bddlt.hh>
23 #include <unordered_map>
24 
25 namespace spot
26 {
29  typedef std::pair<acc_cond::mark_t, unsigned> terminal_data_t;
32  typedef std::vector<terminal_data_t> terminal_data_map_t;
33 
36  struct SPOT_API mtdtwa: public std::enable_shared_from_this<mtdtwa>
37  {
38  public:
40  mtdtwa(const bdd_dict_ptr& dict) noexcept
41  : dict_(dict)
42  {
43  }
44 
45  ~mtdtwa()
46  {
47  dict_->unregister_all_my_variables(this);
48  }
49 
50  std::vector<bdd> states;
55 
60  unsigned num_roots() const
61  {
62  return states.size();
63  }
64 
66  std::ostream& print_dot(std::ostream& os) const;
67 
69  twa_graph_ptr as_twa(bool state_based = false, bool labels = true) const;
70  };
71 
72 
75  typedef std::shared_ptr<mtdtwa> mtdtwa_ptr;
78  typedef std::shared_ptr<const mtdtwa> const_mtdtwa_ptr;
79 
82  SPOT_API mtdtwa_ptr dtwa_to_mtdtwa(const twa_graph_ptr& aut);
83 }
An acceptance condition.
Definition: acc.hh:54
mtdtwa_ptr dtwa_to_mtdtwa(const twa_graph_ptr &aut)
Convert a deterministic TωA to an MTDTwA.
std::pair< acc_cond::mark_t, unsigned > terminal_data_t
Data associated with a terminal BDD node.
Definition: mtdtwa.hh:29
std::vector< terminal_data_t > terminal_data_map_t
Map from terminal BDD values to terminal data.
Definition: mtdtwa.hh:32
std::shared_ptr< const mtdtwa > const_mtdtwa_ptr
Shared pointer to a const mtdtwa.
Definition: mtdtwa.hh:78
std::shared_ptr< mtdtwa > mtdtwa_ptr
Shared pointer to an mtdtwa.
Definition: mtdtwa.hh:75
std::shared_ptr< bdd_dict > bdd_dict_ptr
Shared pointer to a bdd_dict.
Definition: bdddict.hh:304
std::shared_ptr< twa_graph > twa_graph_ptr
Shared pointer to a mutable twa_graph.
Definition: fwd.hh:44
Definition: automata.hh:26
A multi-terminal decision diagram representation of a TωA.
Definition: mtdtwa.hh:37
bdd_dict_ptr dict_
Definition: mtdtwa.hh:52
twa_graph_ptr as_twa(bool state_based=false, bool labels=true) const
Convert to a twa_graph.
mtdtwa(const bdd_dict_ptr &dict) noexcept
Construct an MTDTwA with the given BDD dictionary.
Definition: mtdtwa.hh:40
acc_cond acc
Acceptance condition of the automaton.
Definition: mtdtwa.hh:51
std::ostream & print_dot(std::ostream &os) const
Print the MTBDD in dot format.
terminal_data_map_t terminal_data_map
Map from terminal BDD values to data.
Definition: mtdtwa.hh:54
unsigned num_roots() const
Return the number of root states.
Definition: mtdtwa.hh:60
std::vector< bdd > states
BDD transitions for each root state.
Definition: mtdtwa.hh:50

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.
Generated on Fri Feb 27 2015 10:00:07 for spot by doxygen 1.9.1