00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef VCSN_ALGORITHMS_LTL_TO_PAIR_HH
00018 # define VCSN_ALGORITHMS_LTL_TO_PAIR_HH
00019
00020 # include <map>
00021 # include <set>
00022 # include <utility>
00023 # include <string>
00024
00025 # include <vaucanson/automata/concept/automata.hh>
00026 # include <vaucanson/automata/concept/transducer.hh>
00027 # include <vaucanson/algebra/concept/freemonoid_product.hh>
00028 # include <vaucanson/algebra/implementation/alphabets/alphabet_set.hh>
00029 # include <vaucanson/algebra/implementation/monoid/free_monoid.hh>
00030
00031
00032 # include <vaucanson/algebra/implementation/letter/couple_letter.hh>
00033
00047
00048
00049
00050 namespace vcsn
00051 {
00054
00055
00056
00057
00058
00059
00060 template <typename S, typename T>
00061 struct mute_ltl_to_pair
00062 {
00063
00064 typedef Element<S, T> automaton_t;
00065
00066
00067 typedef typename automaton_t::monoid_elt_t::set_t monoid_set_elt_t;
00068
00069
00070 typedef typename automaton_t::semiring_t semiring_t;
00071
00072
00073 typedef typename monoid_set_elt_t::
00074 first_monoid_t::alphabet_t first_alphabet_t;
00075
00076
00077 typedef typename monoid_set_elt_t::
00078 second_monoid_t::alphabet_t second_alphabet_t;
00079
00080
00081 typedef typename first_alphabet_t::set_t::letter_t first_letter_t;
00082
00083
00084 typedef typename second_alphabet_t::set_t::letter_t second_letter_t;
00085
00086
00087 typedef std::pair<first_letter_t, second_letter_t> ret_letter_t;
00088
00089
00090
00091
00092 typedef typename algebra::AlphabetSet<ret_letter_t> ret_alphabet_set_t;
00093
00094
00095 typedef std::set<ret_letter_t> ret_alphabet_impl_t;
00096
00097
00098 typedef Element<ret_alphabet_set_t, ret_alphabet_impl_t>
00099 ret_alphabet_t;
00100
00101 typedef algebra::FreeMonoid<ret_alphabet_t> ret_monoid_t;
00102
00103 typedef Element<ret_monoid_t, std::basic_string<ret_letter_t> >
00104 ret_monoid_elt_t;
00105
00106
00107
00108 static ret_alphabet_t
00109 cartesian_product(const first_alphabet_t& A,
00110 const second_alphabet_t& B);
00111
00112
00113
00114
00115 typedef typename algebra::
00116 mute_series_traits<typename automaton_t::series_set_t,
00117 typename automaton_t::semiring_t,
00118 algebra::FreeMonoid<ret_alphabet_t> >::ret
00119 ret_series_set_t;
00120 typedef Automata<ret_series_set_t, typename automaton_t::kind_t> ret_set_t;
00121
00122
00123 typedef typename mute_graph_impl_monoid_traits<typename automaton_t::
00124 value_t, typename ret_monoid_elt_t::value_t, ret_letter_t>::ret
00125 ret_impl_t;
00126
00127
00128 typedef Element<ret_set_t, ret_impl_t> ret;
00129
00130
00131 static ret
00132 make_automaton(const ret_alphabet_t&);
00133
00134 static ret
00135 make_automaton(const automaton_t&);
00136
00137
00138 static typename ret::series_set_elt_t
00139 series_convert(const ret_series_set_t&,
00140 const typename automaton_t::series_set_elt_t&);
00141 };
00142
00143 template <typename S, typename T>
00144 void
00145 ltl_to_pair(const Element<S, T>& ltl,
00146 typename mute_ltl_to_pair<S, T>::ret& res);
00147
00148 template <typename S, typename T>
00149 typename mute_ltl_to_pair<S, T>::ret
00150 ltl_to_pair(const Element<S, T>& ltl);
00151
00153
00156 }
00157
00158 # if !defined VCSN_USE_INTERFACE_ONLY && !defined VCSN_USE_LIB
00159 # include <vaucanson/algorithms/ltl_to_pair.hxx>
00160 # endif // ! VCSN_USE_INTERFACE_ONLY
00161
00162 #endif // ! VCSN_ALGORITHMS_LTL_TO_PAIR_HH