bddprint.hh 5.01 KB
Newer Older
1
// -*- coding: utf-8 -*-
2
// Copyright (C) 2012, 2013, 2014 Laboratoire de Recherche et Développement
3
4
5
6
// de l'Epita (LRDE).
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
// Université Pierre et Marie Curie.
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
7
8
9
10
11
//
// This file is part of Spot, a model checking library.
//
// Spot is free software; you can redistribute it and/or modify it
// under the terms of the GNU General Public License as published by
12
// the Free Software Foundation; either version 3 of the License, or
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
13
14
15
16
17
18
19
20
// (at your option) any later version.
//
// Spot is distributed in the hope that it will be useful, but WITHOUT
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
// or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
// License for more details.
//
// You should have received a copy of the GNU General Public License
21
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
Alexandre Duret-Lutz's avatar
Alexandre Duret-Lutz committed
22

23
24
25
#ifndef SPOT_TGBA_BDDPRINT_HH
# define SPOT_TGBA_BDDPRINT_HH

26
#include <string>
27
#include <iosfwd>
28
#include "bdddict.hh"
29
30
31
32
#include <bdd.h>

namespace spot
{
33

34
35
36
37
38
39
  /// \brief Print a BDD as a list of literals.
  ///
  /// This assumes that \a b is a conjunction of literals.
  /// \param os The output stream.
  /// \param dict The dictionary to use, to lookup variables.
  /// \param b The BDD to print.
40
  SPOT_API std::ostream&
41
  bdd_print_sat(std::ostream& os, const bdd_dict_ptr& dict, bdd b);
42
43
44
45
46
47
48

  /// \brief Format a BDD as a list of literals.
  ///
  /// This assumes that \a b is a conjunction of literals.
  /// \param dict The dictionary to use, to lookup variables.
  /// \param b The BDD to print.
  /// \return The BDD formated as a string.
49
  SPOT_API std::string
50
  bdd_format_sat(const bdd_dict_ptr& dict, bdd b);
51

52
  /// \brief Print a BDD as a list of acceptance conditions.
53
54
  ///
  /// This is used when saving a TGBA.
55
56
  /// \param os The output stream.
  /// \param dict The dictionary to use, to lookup variables.
57
58
  /// \param b The BDD to print.
  /// \return The BDD formated as a string.
59
  SPOT_API std::ostream&
60
  bdd_print_acc(std::ostream& os, const bdd_dict_ptr& dict, bdd b);
61

62
  /// \brief Print a BDD as a set of acceptance conditions.
63
64
65
66
67
68
  ///
  /// This is used when saving a TGBA.
  /// \param os The output stream.
  /// \param dict The dictionary to use, to lookup variables.
  /// \param b The BDD to print.
  /// \return The BDD formated as a string.
69
  SPOT_API std::ostream&
70
  bdd_print_accset(std::ostream& os, const bdd_dict_ptr& dict, bdd b);
71

72
73
74
75
76
77
  /// \brief Format a BDD as a set of acceptance conditions.
  ///
  /// This is used when saving a TGBA.
  /// \param dict The dictionary to use, to lookup variables.
  /// \param b The BDD to print.
  /// \return The BDD formated as a string.
78
  SPOT_API std::string
79
  bdd_format_accset(const bdd_dict_ptr& dict, bdd b);
80

81
82
83
  /// \brief Print a BDD as a set.
  /// \param os The output stream.
  /// \param dict The dictionary to use, to lookup variables.
84
  /// \param b The BDD to print.
85
  SPOT_API std::ostream&
86
  bdd_print_set(std::ostream& os, const bdd_dict_ptr& dict, bdd b);
87

88
89
  /// \brief Format a BDD as a set.
  /// \param dict The dictionary to use, to lookup variables.
90
  /// \param b The BDD to print.
91
  /// \return The BDD formated as a string.
92
  SPOT_API std::string
93
  bdd_format_set(const bdd_dict_ptr& dict, bdd b);
94

95
96
97
98
  /// \brief Print a BDD as a formula.
  /// \param os The output stream.
  /// \param dict The dictionary to use, to lookup variables.
  /// \param b The BDD to print.
99
  SPOT_API std::ostream&
100
  bdd_print_formula(std::ostream& os, const bdd_dict_ptr& dict, bdd b);
101

102
103
104
105
  /// \brief Format a BDD as a formula.
  /// \param dict The dictionary to use, to lookup variables.
  /// \param b The BDD to print.
  /// \return The BDD formated as a string.
106
  SPOT_API std::string
107
  bdd_format_formula(const bdd_dict_ptr& dict, bdd b);
108

109
110
111
  /// \brief Print a BDD as a diagram in dotty format.
  /// \param os The output stream.
  /// \param dict The dictionary to use, to lookup variables.
112
  /// \param b The BDD to print.
113
  SPOT_API std::ostream&
114
  bdd_print_dot(std::ostream& os, const bdd_dict_ptr& dict, bdd b);
115

116
117
118
  /// \brief Print a BDD as a table.
  /// \param os The output stream.
  /// \param dict The dictionary to use, to lookup variables.
119
  /// \param b The BDD to print.
120
  SPOT_API std::ostream&
121
  bdd_print_table(std::ostream& os, const bdd_dict_ptr& dict, bdd b);
122

123
  /// \brief Enable UTF-8 output for bdd printers.
124
  SPOT_API void enable_utf8();
Thomas Badie's avatar
Thomas Badie committed
125
126
127
128
129
130


  /// \brief Format a BDD as an irredundant sum of product.
  /// \param dict The dictionary to use, to lookup variables.
  /// \param b The BDD to print.
  /// \return The BDD formated as a string.
131
  SPOT_API std::string
132
  bdd_format_isop(const bdd_dict_ptr& dict, bdd b);
Thomas Badie's avatar
Thomas Badie committed
133
134
135
136
137
138


  /// \brief Print a BDD as an irredundant sum of product.
  /// \param os The output stream.
  /// \param dict The dictionary to use, to lookup variables.
  /// \param b The BDD to print.
139
  SPOT_API std::ostream&
140
  bdd_print_isop(std::ostream& os, const bdd_dict_ptr& dict, bdd b);
Thomas Badie's avatar
Thomas Badie committed
141

142
143
144
}

#endif // SPOT_TGBA_BDDPRINT_HH