spot  2.14.5
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 
24 namespace spot
25 {
26  struct SPOT_API mtdtwa
27  {
28  public:
29  mtdtwa(const bdd_dict_ptr& dict) noexcept
30  : dict_(dict)
31  {
32  }
33 
34  ~mtdtwa()
35  {
36  dict_->unregister_all_my_variables(this);
37  }
38 
39  std::vector<bdd> states;
40  acc_cond acc;
41  bdd_dict_ptr dict_;
42  std::vector<std::pair<acc_cond::mark_t, unsigned>> terminal_data;
43 
44  unsigned num_roots() const
45  {
46  return states.size();
47  }
48 
49  // unsigned num_states() const
50  // {
51  // bool has_true = false;
52  // // FIXME: I'd like a BuDDy function that checks if a BDD node
53  // // can be reached from a given set of BDD nodes. Returning just
54  // // a boolean will be more efficient than creating the array of
55  // // leaves.
56  // for (bdd b: leaves_of(states))
57  // if (b == bddtrue)
58  // {
59  // has_true = true;
60  // break;
61  // }
62  // return states.size() + has_true;
63  // }
64 
65  // Print the MTBDD. If index >= 0, print only one state.
66  std::ostream& print_dot(std::ostream& os) const;
67 
68  // convert to twa
69  // twa_graph_ptr as_twa(bool state_based = false, bool labels = true) const;
70  };
71 
72 
73  typedef std::shared_ptr<mtdtwa> mtdtwa_ptr;
74  typedef std::shared_ptr<const mtdtwa> const_mtdtwa_ptr;
75 
76  SPOT_API mtdtwa_ptr dtwa_to_mtdtwa(const twa_graph_ptr& aut);
77 }
An acceptance condition.
Definition: acc.hh:61
Definition: automata.hh:26
Definition: mtdtwa.hh:27

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