Commit b6a790b3 authored by Sarah O'Connor's avatar Sarah O'Connor
Browse files

2005-06-22 Sarah O'Connor <sarah.o-connor@lrde.epita.fr>

	* include/vaucanson/z_transducer.hh,
	* include/vaucanson/boolean_transducer.hh: Add AUTOMATON_CONTEXT macro,
	as already done in fmp_transducer and z_fmp_transducer headers.

	* include/vaucanson/contexts/fmp_transducer_functions.thh,
	* include/vaucanson/contexts/fmp_transducer_functions.thxx,
	* include/vaucanson/contexts/transducer_functions.thxx: Modify the
	evaluation functions to give a more user friendly result.
parent 619b6b9c
2005-06-22 Sarah O'Connor <sarah.o-connor@lrde.epita.fr>
* include/vaucanson/z_transducer.hh,
* include/vaucanson/boolean_transducer.hh: Add AUTOMATON_CONTEXT macro,
as already done in fmp_transducer and z_fmp_transducer headers.
* include/vaucanson/contexts/fmp_transducer_functions.thh,
* include/vaucanson/contexts/fmp_transducer_functions.thxx,
* include/vaucanson/contexts/transducer_functions.thxx: Modify the
evaluation functions to give a more user friendly result.
2005-06-22 Sarah O'Connor <sarah.o-connor@lrde.epita.fr>
 
* include/vaucanson/algorithms/normalized_composition.hxx: Fix a huge
......
......@@ -35,6 +35,7 @@
# include <vaucanson/boolean_automaton.hh>
# define VCSN_CONTEXT_NAMESPACE boolean_transducer
# define AUTOMATON_CONTEXT boolean_automaton
# include <vaucanson/contexts/char_letter.thh>
# include <vaucanson/contexts/dynamic_alphabet.thh>
......
......@@ -68,7 +68,7 @@ namespace vcsn
typename TransImpl,
typename ArgStruct,
typename ArgImpl>
AUTOMATON_CONTEXT::series_set_elt_t
AUTOMATON_CONTEXT::rat_exp_t
evaluation(const Element<TransStruct, TransImpl>& t,
const Element<ArgStruct, ArgImpl>& input);
......
......@@ -32,6 +32,10 @@
//
# include <vaucanson/algorithms/evaluation_fmp.hh>
# include <vaucanson/algorithms/minimization_hopcroft.hh>
# include <vaucanson/algorithms/aut_to_exp.hh>
# include <vaucanson/algorithms/trim.hh>
# include <vaucanson/algorithms/realtime.hh>
namespace vcsn
{
......@@ -117,7 +121,7 @@ namespace vcsn
typename SeriesImpl,
typename S,
typename T>
AUTOMATON_CONTEXT::series_set_elt_t
AUTOMATON_CONTEXT::rat_exp_t
do_evaluation(const vcsn::AutomataBase<TransStruct>&,
const TransImpl&,
const SeriesStruct&,
......@@ -132,8 +136,9 @@ namespace vcsn
new_automaton(t.structure().series()
.monoid().second_monoid().alphabet());
standard_of(w, input);
evaluation_fmp(t, w, result);
return aut_to_exp(result);
evaluation_fmp(t, quotient(w), result);
return aut_to_exp(generalized(quotient(realtime(trim(result)))),
DMChooser());
}
......@@ -141,7 +146,7 @@ namespace vcsn
typename TransImpl,
typename ArgStruct,
typename ArgImpl>
AUTOMATON_CONTEXT::series_set_elt_t
AUTOMATON_CONTEXT::rat_exp_t
evaluation(const Element<TransStruct, TransImpl>& t,
const Element<ArgStruct, ArgImpl>& input)
{
......
......@@ -32,6 +32,10 @@
//
# include <vaucanson/algorithms/evaluation.hh>
# include <vaucanson/algorithms/minimization_hopcroft.hh>
# include <vaucanson/algorithms/trim.hh>
# include <vaucanson/algorithms/aut_to_exp.hh>
# include <vaucanson/algorithms/realtime.hh>
namespace vcsn
{
......@@ -113,12 +117,12 @@ namespace vcsn
const Element<TransStruct, TransImpl>& t,
const Element<SeriesStruct, SeriesImpl>&)
{
boolean_automaton::automaton_t w = boolean_automaton::
AUTOMATON_CONTEXT::automaton_t w = AUTOMATON_CONTEXT::
new_automaton(t.structure().series().monoid().alphabet());
boolean_automaton::gen_automaton_t result (w.structure());
AUTOMATON_CONTEXT::gen_automaton_t result (w.structure());
standard_of(w, input);
evaluation(w, t, result);
return aut_to_exp(result);
evaluation(quotient(w), t, result);
return aut_to_exp(quotient(realtime(trim(result))), DMChooser());
}
......
......@@ -37,6 +37,7 @@
# include <vaucanson/boolean_automaton.hh>
# define VCSN_CONTEXT_NAMESPACE z_transducer
# define AUTOMATON_CONTEXT z_automaton
# include <vaucanson/contexts/char_letter.thh>
# include <vaucanson/contexts/dynamic_alphabet.thh>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment