spot 2.3.3

- Main Page
- Related Pages
- Modules
- Classes
- Files

- File List

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
translate.hh
1 // -*- coding: utf-8 -*-
2 // Copyright (C) 2013-2017 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 <spot/twaalgos/postproc.hh>
23 #include <spot/tl/simplify.hh>
24
25 namespace spot
26 {
64 class SPOT_API translator: protected postprocessor
65 {
66 public:
67 translator(tl_simplifier* simpl, const option_map* opt = nullptr)
68 : postprocessor(opt), simpl_(simpl), simpl_owned_(nullptr)
69 {
70 SPOT_ASSERT(simpl);
71 setup_opt(opt);
72 }
73
74 translator(const bdd_dict_ptr& dict, const option_map* opt = nullptr)
75 : postprocessor(opt)
76 {
77 build_simplifier(dict);
78 setup_opt(opt);
79 }
80
81 translator(const option_map* opt = nullptr)
82 : postprocessor(opt)
83 {
84 build_simplifier(make_bdd_dict());
85 setup_opt(opt);
86 }
87
88 ~translator()
89 {
90 // simpl_owned_ is 0 if simpl_ was supplied to the constructor.
91 delete simpl_owned_;
92 }
93
94 using postprocessor::output_type;
95
96 void
97 set_type(output_type type)
98 {
99 this->postprocessor::set_type(type);
100 }
101
102 using postprocessor::output_pref;
103
104 void
105 set_pref(output_pref pref)
106 {
107 this->postprocessor::set_pref(pref);
108 }
109
110 using postprocessor::optimization_level;
111
112 void
113 set_level(optimization_level level)
114 {
115 level_ = level;
116 if (simpl_owned_)
117 {
118 auto d = simpl_owned_->get_dict();
119 delete simpl_owned_;
120 build_simplifier(d);
121 }
122 }
123
127 twa_graph_ptr run(formula f);
128
133 twa_graph_ptr run(formula* f);
134
135 protected:
136 void setup_opt(const option_map* opt);
137 void build_simplifier(const bdd_dict_ptr& dict);
138
139 private:
140 tl_simplifier* simpl_;
141 tl_simplifier* simpl_owned_;
142 int comp_susp_;
143 int early_susp_;
144 int skel_wdba_;
145 int skel_simul_;
146 };
148 }
spot
Definition: graph.hh:33
spot::option_map
Manage a map of options.
Definition: optionmap.hh:37
spot::formula
Main class for temporal logic formula.
Definition: formula.hh:669
spot::postprocessor::set_type
void set_type(output_type type)
Select the desired output type.
Definition: postproc.hh:107
spot::translator
Translate an LTL formula into an optimized spot::tgba.
Definition: translate.hh:64
spot::tl_simplifier
Rewrite or simplify f in various ways.
Definition: simplify.hh:97
spot::postprocessor::set_pref
void set_pref(output_pref pref)
Select the desired characteristics of the output automaton.
Definition: postproc.hh:162
spot::postprocessor
Wrap TGBA/BA/Monitor post-processing algorithms in an easy interface.
Definition: postproc.hh:66

Please direct any question, comment, or bug report to the Spot mailing list at spot@lrde.epita.fr.