Commit 77ca9e24 authored by Jerome Galtier's avatar Jerome Galtier
Browse files

=== New letter traits ===

Add the kind() and dim() letter traits, to supplement the lack of useful monoid traits.

	* include/vaucanson/algebra/concept/letter.hh,
	* include/vaucanson/algebra/concept/letter.hxx,
	* include/vaucanson/algebra/implementation/letter/int_letter.hxx,
	* include/vaucanson/algebra/implementation/letter/couple_letter.hh,
	* include/vaucanson/algebra/implementation/letter/char_letter.hxx: New traits.

=== Improve input_projection_helper and output_projection_helper traits ===

Add new fmp_*_projection_traits to correctly construct the projection types. Fix
non-working input_projection_helper.

	* include/vaucanson/automata/concept/transducer.hh: Improve traits.
	* include/vaucanson/automata/concept/transducer_base.hh: New traits.
	* include/vaucanson/automata/implementation/bmig_graph_impl.hh,
	* include/vaucanson/automata/implementation/listg_graph_impl.hh: New trait,
	update existing one.

=== Add support for letters of type std::pair<U, V> ===

Create instances for U and V in {char, int}. It closes ticket #152. Create four
new vcsn contexts.

	* configure.ac: Add new taf-kit instances.
	* include/Makefile.am: Add new context to the distribution.
	* include/vaucanson/automata/generic_contexts/char_char_boolean_automaton.hh: New.
	* include/vaucanson/automata/generic_contexts/char_char_boolean_automaton_structures.hh: New.
	* include/vaucanson/automata/generic_contexts/char_int_boolean_automaton.hh: New.
	* include/vaucanson/automata/generic_contexts/char_int_boolean_automaton_structures.hh: New.
	* include/vaucanson/automata/generic_contexts/int_char_boolean_automaton.hh: New.
	* include/vaucanson/automata/generic_contexts/int_char_boolean_automaton_structures.hh: New.
	* include/vaucanson/automata/generic_contexts/int_int_boolean_automaton.hh: New.
	* include/vaucanson/automata/generic_contexts/int_int_boolean_automaton_structures.hh: New.
	* include/vaucanson/contexts/char_char_letter.thh: New.
	* include/vaucanson/contexts/char_int_letter.thh: New.
	* include/vaucanson/contexts/int_char_letter.thh: New.
	* include/vaucanson/contexts/int_int_letter.thh: New.
	* include/vaucanson/misc/hash.hh,
	* include/vaucanson/misc/hash.hxx: Add new hash for pair letters.
	* taf-kit/src/Makefile.am: Add four new instances.
	* taf-kit/tests/Makefile.am: New tests.
	* taf-kit/tests/vcsn-char-char-b.test: New.
	* taf-kit/tests/vcsn-char-int-b.test: New.
	* taf-kit/tests/vcsn-int-char-b.test: New.
	* taf-kit/tests/vcsn-int-int-b.test: New.

=== XML support for letters of type std::pair<U, V> ===

	* include/vaucanson/xml/xmleq.hh,
	* include/vaucanson/xml/xmleq.hxx,
	* include/vaucanson/xml/regexp.hh,
	* include/vaucanson/xml/regexp.hxx,
	* include/vaucanson/xml/builders.hh,
	* include/vaucanson/xml/builders.hxx: Add support for monCompGen
	markup.

=== XML cleanup (this pointer removal) ===

Use '''using''' syntax to better show handler dependencies, cleanup the code,
and normalize syntax.

	* include/vaucanson/xml/contexts/fmp.hh,
	* include/vaucanson/xml/contexts/fmp.hxx,
	* include/vaucanson/xml/contexts/rw.hh,
	* include/vaucanson/xml/contexts/rw.hxx,
	* include/vaucanson/xml/handlers_base.hxx,
	* include/vaucanson/xml/parsers.hxx,
	* include/vaucanson/xml/printers.hxx,
	* include/vaucanson/xml/regexp.hh,
	* include/vaucanson/xml/regexp.hxx,
	* include/vaucanson/xml/xml_exp_visitor.hxx: Here.

=== Link Taf-Kit instances to their respective libraries ===

Add missing algorithms to some vcsn libraries and '''really''' link all taf-kit
instances to them.

	* include/vaucanson/algorithms/composition_cover.hh,
	* include/vaucanson/algorithms/domain.hh,
	* include/vaucanson/algorithms/evaluation_fmp.hh,
	* include/vaucanson/algorithms/invert.hh,
	* include/vaucanson/algorithms/normalized_composition.hh,
	* include/vaucanson/algorithms/sub_normalize.hh: Add missing INTERFACE.
	* lib/Makefile.am: Add four new library.
	* lib/generate_libvcsn.rb: Add two new type. Fix filtering and update it.
	* taf-kit/src/Makefile.am: Use correct flags and libraries.

=== Miscellaneous ===

	* doc/manual/generate-automata.sh: Be more portable to check
	existence of executable in PATH (ala autotools).
	* include/vaucanson/algebra/implementation/letter/couple_letter.hh: Add missing
	literal_to_letter, change defaults for OPAR, CPAR, epsilon and zero.
	* include/vaucanson/algebra/implementation/letter/couple_letter.hxx: Improve
	op_parse.
	* include/vaucanson/algorithms/evaluation_fmp.hxx,
	* include/vaucanson/algorithms/evaluation_fmp.hh: Reorder template arguments.
	* taf-kit/src/edition_commands.hxx,
	* include/vaucanson/algorithms/invert.hxx: Typo.
	* vaucanswig/expand.sh: Add some filtering, now that FMP only algorithms
	got INTERFACE.
	* include/vaucanson/tools/fsm_load.hxx: Be more generic w.r.t. letter type.
	* src/demos/algorithms/equivalent_functions.cc: Reorder headers inclusion.
	* src/tests/include/tests/algebra/series/krat/main/krat_exp_linearize_structure_test.hh:
	Fix a bug now that more letter types are supported.
	* taf-kit/src/b_commands.cc,
	* taf-kit/src/z_commands.cc: Update copyright notice.
parent d40093b9
2008-08-27 Jerome Galtier <jerome.galtier@lrde.epita.fr>
=== New letter traits ===
Add the kind() and dim() letter traits, to supplement the lack of useful monoid traits.
* include/vaucanson/algebra/concept/letter.hh,
* include/vaucanson/algebra/concept/letter.hxx,
* include/vaucanson/algebra/implementation/letter/int_letter.hxx,
* include/vaucanson/algebra/implementation/letter/couple_letter.hh,
* include/vaucanson/algebra/implementation/letter/char_letter.hxx: New traits.
=== Improve input_projection_helper and output_projection_helper traits ===
Add new fmp_*_projection_traits to correctly construct the projection types. Fix
non-working input_projection_helper.
* include/vaucanson/automata/concept/transducer.hh: Improve traits.
* include/vaucanson/automata/concept/transducer_base.hh: New traits.
* include/vaucanson/automata/implementation/bmig_graph_impl.hh,
* include/vaucanson/automata/implementation/listg_graph_impl.hh: New trait,
update existing one.
=== Add support for letters of type std::pair<U, V> ===
Create instances for U and V in {char, int}. It closes ticket #152. Create four
new vcsn contexts.
* configure.ac: Add new taf-kit instances.
* include/Makefile.am: Add new context to the distribution.
* include/vaucanson/automata/generic_contexts/char_char_boolean_automaton.hh: New.
* include/vaucanson/automata/generic_contexts/char_char_boolean_automaton_structures.hh: New.
* include/vaucanson/automata/generic_contexts/char_int_boolean_automaton.hh: New.
* include/vaucanson/automata/generic_contexts/char_int_boolean_automaton_structures.hh: New.
* include/vaucanson/automata/generic_contexts/int_char_boolean_automaton.hh: New.
* include/vaucanson/automata/generic_contexts/int_char_boolean_automaton_structures.hh: New.
* include/vaucanson/automata/generic_contexts/int_int_boolean_automaton.hh: New.
* include/vaucanson/automata/generic_contexts/int_int_boolean_automaton_structures.hh: New.
* include/vaucanson/contexts/char_char_letter.thh: New.
* include/vaucanson/contexts/char_int_letter.thh: New.
* include/vaucanson/contexts/int_char_letter.thh: New.
* include/vaucanson/contexts/int_int_letter.thh: New.
* include/vaucanson/misc/hash.hh,
* include/vaucanson/misc/hash.hxx: Add new hash for pair letters.
* taf-kit/src/Makefile.am: Add four new instances.
* taf-kit/tests/Makefile.am: New tests.
* taf-kit/tests/vcsn-char-char-b.test: New.
* taf-kit/tests/vcsn-char-int-b.test: New.
* taf-kit/tests/vcsn-int-char-b.test: New.
* taf-kit/tests/vcsn-int-int-b.test: New.
=== XML support for letters of type std::pair<U, V> ===
* include/vaucanson/xml/xmleq.hh,
* include/vaucanson/xml/xmleq.hxx,
* include/vaucanson/xml/regexp.hh,
* include/vaucanson/xml/regexp.hxx,
* include/vaucanson/xml/builders.hh,
* include/vaucanson/xml/builders.hxx: Add support for monCompGen
markup.
=== XML cleanup (this pointer removal) ===
Use '''using''' syntax to better show handler dependencies, cleanup the code,
and normalize syntax.
* include/vaucanson/xml/contexts/fmp.hh,
* include/vaucanson/xml/contexts/fmp.hxx,
* include/vaucanson/xml/contexts/rw.hh,
* include/vaucanson/xml/contexts/rw.hxx,
* include/vaucanson/xml/handlers_base.hxx,
* include/vaucanson/xml/parsers.hxx,
* include/vaucanson/xml/printers.hxx,
* include/vaucanson/xml/regexp.hh,
* include/vaucanson/xml/regexp.hxx,
* include/vaucanson/xml/xml_exp_visitor.hxx: Here.
=== Link Taf-Kit instances to their respective libraries ===
Add missing algorithms to some vcsn libraries and '''really''' link all taf-kit
instances to them.
* include/vaucanson/algorithms/composition_cover.hh,
* include/vaucanson/algorithms/domain.hh,
* include/vaucanson/algorithms/evaluation_fmp.hh,
* include/vaucanson/algorithms/invert.hh,
* include/vaucanson/algorithms/normalized_composition.hh,
* include/vaucanson/algorithms/sub_normalize.hh: Add missing INTERFACE.
* lib/Makefile.am: Add four new library.
* lib/generate_libvcsn.rb: Add two new type. Fix filtering and update it.
* taf-kit/src/Makefile.am: Use correct flags and libraries.
=== Miscellaneous ===
* doc/manual/generate-automata.sh: Be more portable to check
existence of executable in PATH (ala autotools).
* include/vaucanson/algebra/implementation/letter/couple_letter.hh: Add missing
literal_to_letter, change defaults for OPAR, CPAR, epsilon and zero.
* include/vaucanson/algebra/implementation/letter/couple_letter.hxx: Improve
op_parse.
* include/vaucanson/algorithms/evaluation_fmp.hxx,
* include/vaucanson/algorithms/evaluation_fmp.hh: Reorder template arguments.
* taf-kit/src/edition_commands.hxx,
* include/vaucanson/algorithms/invert.hxx: Typo.
* vaucanswig/expand.sh: Add some filtering, now that FMP only algorithms
got INTERFACE.
* include/vaucanson/tools/fsm_load.hxx: Be more generic w.r.t. letter type.
* src/demos/algorithms/equivalent_functions.cc: Reorder headers inclusion.
* src/tests/include/tests/algebra/series/krat/main/krat_exp_linearize_structure_test.hh:
Fix a bug now that more letter types are supported.
* taf-kit/src/b_commands.cc,
* taf-kit/src/z_commands.cc: Update copyright notice.
2008-08-23 Jerome Galtier <jerome.galtier@lrde.epita.fr>
Bump to version 1.2.91.
......
......@@ -215,6 +215,10 @@ VCSN_CONFIG_WRAPPER([vcsn-int-b])
VCSN_CONFIG_WRAPPER([vcsn-int-fmp-b])
VCSN_CONFIG_WRAPPER([vcsn-int-fmp-z])
VCSN_CONFIG_WRAPPER([vcsn-int-z])
VCSN_CONFIG_WRAPPER([vcsn-char-char-b])
VCSN_CONFIG_WRAPPER([vcsn-char-int-b])
VCSN_CONFIG_WRAPPER([vcsn-int-int-b])
VCSN_CONFIG_WRAPPER([vcsn-int-char-b])
......
......@@ -12,7 +12,7 @@ generate_one_section ()
EOF
! which $vcsn > /dev/null 2>&1 && exit 1
($vcsn --version > /dev/null) || exit 1
$vcsn list-automata |
sed -n 's/ *- *//p' |
while read a
......
......@@ -26,6 +26,10 @@ vaucanson/contexts/automaton.thh \
vaucanson/contexts/boolean_semiring.thh \
vaucanson/contexts/char_letter.thh \
vaucanson/contexts/int_letter.thh \
vaucanson/contexts/char_char_letter.thh \
vaucanson/contexts/char_int_letter.thh \
vaucanson/contexts/int_int_letter.thh \
vaucanson/contexts/int_char_letter.thh \
vaucanson/contexts/dynamic_alphabet.thh \
vaucanson/contexts/free_monoid.thh \
vaucanson/contexts/free_monoid_product.thh \
......@@ -451,17 +455,25 @@ vaucanson/automata/generic_contexts/int_z_transducer_structures.hh \
vaucanson/automata/generic_contexts/int_boolean_automaton.hh \
vaucanson/automata/generic_contexts/int_boolean_automaton_structures.hh \
vaucanson/automata/generic_contexts/int_boolean_transducer.hh \
vaucanson/automata/generic_contexts/int_boolean_transducer_structures.hh \
vaucanson/automata/generic_contexts/int_boolean_transducer_structures.hh \
vaucanson/automata/generic_contexts/int_fmp_transducer.hh \
vaucanson/automata/generic_contexts/int_fmp_transducer_structures.hh \
vaucanson/automata/generic_contexts/int_z_automaton.hh \
vaucanson/automata/generic_contexts/int_z_automaton_structures.hh \
vaucanson/automata/generic_contexts/int_z_max_plus_automaton.hh \
vaucanson/automata/generic_contexts/int_z_max_plus_automaton_structures.hh \
vaucanson/automata/generic_contexts/int_z_max_plus_automaton_structures.hh \
vaucanson/automata/generic_contexts/int_z_min_plus_automaton.hh \
vaucanson/automata/generic_contexts/int_z_min_plus_automaton_structures.hh \
vaucanson/automata/generic_contexts/int_z_min_plus_automaton_structures.hh \
vaucanson/automata/generic_contexts/int_z_fmp_transducer.hh \
vaucanson/automata/generic_contexts/int_z_fmp_transducer_structures.hh \
vaucanson/automata/generic_contexts/int_z_fmp_transducer_structures.hh \
vaucanson/automata/generic_contexts/char_char_boolean_automaton.hh \
vaucanson/automata/generic_contexts/char_int_boolean_automaton.hh \
vaucanson/automata/generic_contexts/int_int_boolean_automaton.hh \
vaucanson/automata/generic_contexts/int_char_boolean_automaton.hh \
vaucanson/automata/generic_contexts/char_char_boolean_automaton_structures.hh \
vaucanson/automata/generic_contexts/char_int_boolean_automaton_structures.hh \
vaucanson/automata/generic_contexts/int_int_boolean_automaton_structures.hh \
vaucanson/automata/generic_contexts/int_char_boolean_automaton_structures.hh \
vaucanson/automata/implementation/automaton_view.hh \
vaucanson/automata/implementation/automaton_view.hxx \
vaucanson/automata/implementation/bmig/bmig_functors.hh \
......
......@@ -42,6 +42,11 @@ namespace vcsn {
/// A class modeling the letter concept must have the
/// following traits:
/// A tag to describe the kind of letter (simple or tuple + dim)
// FIXME: we must add traits to monoids to handle this better
static std::string kind();
static int dim();
/// Provide a way to create a letter from its literal
/// representation:
static L literal_to_letter(const std::string&);
......
......@@ -27,6 +27,22 @@ namespace vcsn {
namespace algebra {
// Dummy implementation.
template <typename L>
std::string
letter_traits<L>::kind()
{
return 0;
}
// Dummy implementation.
template <typename L>
int
letter_traits<L>::dim()
{
return 0;
}
// Dummy implementation.
template <typename L>
L
......
......@@ -71,6 +71,11 @@ namespace vcsn {
str = str + c;
return str;
}
// A char is "simple" with dimension 1.
static std::string kind() { return "simple"; }
static int dim() { return 1; }
};
template <typename S, typename CharContainer>
......
......@@ -2,7 +2,8 @@
//
// Vaucanson, a generic library for finite state machines.
//
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 The Vaucanson Group.
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008 The Vaucanson
// Group.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
......@@ -51,17 +52,27 @@ namespace vcsn
cardinal = INT_MAX
};
LETTER_DEFAULT(open_par, "(")
LETTER_DEFAULT(close_par, ")")
LETTER_DEFAULT(open_par, "[")
LETTER_DEFAULT(close_par, "]")
LETTER_DEFAULT(plus, "+")
LETTER_DEFAULT(times, ".")
LETTER_DEFAULT(star, "*")
LETTER_DEFAULT(epsilon, "1")
LETTER_DEFAULT(zero, "0")
LETTER_DEFAULT(epsilon, "eps")
LETTER_DEFAULT(zero, "zero")
LETTER_DEFAULT(open_weight, "{")
LETTER_DEFAULT(close_weight, "}")
LETTER_DEFAULT(space, " ")
static
std::pair<U, V>
literal_to_letter(const std::string& str)
{
std::stringstream sstr(str);
std::pair<U, V> ret;
sstr >> ret;
return ret;
}
static
std::string
letter_to_literal(const std::pair<U, V>& c)
......@@ -71,6 +82,10 @@ namespace vcsn
return sstr.str();
}
// A pair is a "tuple" with dimension 2.
static std::string kind() { return "tuple"; }
static int dim() { return 2; }
};
} // ! algebra
......
......@@ -2,7 +2,8 @@
//
// Vaucanson, a generic library for finite state machines.
//
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 The Vaucanson Group.
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008 The Vaucanson
// Group.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
......@@ -17,6 +18,7 @@
#ifndef VCSN_ALGEBRA_IMPLEMENTATION_LETTER_COUPLE_LETTER_HXX
# define VCSN_ALGEBRA_IMPLEMENTATION_LETTER_COUPLE_LETTER_HXX
# include <stdexcept>
# include <sstream>
# include <vaucanson/algebra/implementation/letter/couple_letter.hh>
......@@ -26,33 +28,53 @@ namespace vcsn {
namespace algebra {
// Specialization for pairs.
// FIXME: we should share the taf-kit parser with letters op_parse.
// FIXME: this parser is very weak.
template <typename S, typename U, typename V, typename CharContainer>
bool op_parse (const algebra::FreeMonoidBase<S>& set,
std::basic_string< std::pair<U, V> >& v,
const std::string& s,
typename std::string::const_iterator& i,
const CharContainer&)
bool op_parse(const algebra::FreeMonoidBase<S>& set,
std::basic_string< std::pair<U, V> >& v,
const std::string& s,
typename std::string::const_iterator& i,
const CharContainer&)
{
typename std::string::const_iterator j = i;
while (i != s.end ()) {
while (i != s.end())
{
if (*i != '(')
break ;
std::string sub (i, s.end ());
std::istringstream is (sub);
std::string sub(i, s.end());
std::stringstream is(sub);
std::pair<U,V> p;
is >> p;
if (!set.alphabet ().contains (p))
break ;
int inc = sub.size () - is.str ().size ();
for (int k = 0; k < inc; k++, i++) ;
int pos = is.tellg();
// We didn't parse anything.
if (pos == 0)
break;
// Unknown letter.
if (!set.alphabet().contains(p))
{
std::stringstream sstr;
sstr << p;
throw std::logic_error(std::string("Letter not in the alphabet: ") + sstr.str());
}
// Advance the iterator.
for (int k = 0; k < pos; ++k)
++i;
// Concatenate the letter.
v += p;
}
return (i != j);
return (i == s.end());
}
} // algebra
} // vcsn
} // ! algebra
} // ! vcsn
namespace std
{
......@@ -91,7 +113,6 @@ namespace std
return i;
}
} // std
} // ! std
#endif // ! VCSN_ALGEBRA_IMPLEMENTATION_LETTER_COUPLE_LETTER_HXX
......@@ -68,6 +68,11 @@ namespace vcsn {
sstr << c;
return sstr.str();
}
// An int is "simple" with dimension 1.
static std::string kind() { return "simple"; }
static int dim() { return 1; }
};
template <typename S, typename CharContainer>
......
......@@ -2,7 +2,7 @@
//
// Vaucanson, a generic library for finite state machines.
//
// Copyright (C) 2006 The Vaucanson Group.
// Copyright (C) 2006, 2008 The Vaucanson Group.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
......@@ -32,6 +32,11 @@
*/
/** @} */
// INTERFACE: Automaton composition_cover(const Automaton& a1) { return vcsn::composition_cover(*a1); }
// INTERFACE: GenAutomaton composition_cover(const GenAutomaton& a1) { return vcsn::composition_cover(*a1); }
// INTERFACE: Automaton composition_co_cover(const Automaton& a1) { return vcsn::composition_co_cover(*a1); }
// INTERFACE: GenAutomaton composition_co_cover(const GenAutomaton& a1) { return vcsn::composition_co_cover(*a1); }
namespace vcsn {
/** @addtogroup algorithms *//** @{ */
......
......@@ -2,7 +2,7 @@
//
// Vaucanson, a generic library for finite state machines.
//
// Copyright (C) 2006 The Vaucanson Group.
// Copyright (C) 2006, 2008 The Vaucanson Group.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
......@@ -27,6 +27,8 @@
*/
/** @} */
// INTERFACE: void domain(const Automaton& a1, InputProjection& a2) { return vcsn::domain(*a1, *a2); }
# include <vaucanson/automata/concept/automata.hh>
# include <vaucanson/algebra/implementation/free_monoid/words.hh>
# include <vaucanson/algebra/concept/freemonoid_product.hh>
......
......@@ -2,7 +2,7 @@
//
// Vaucanson, a generic library for finite state machines.
//
// Copyright (C) 2005, 2006 The Vaucanson Group.
// Copyright (C) 2005, 2006, 2008 The Vaucanson Group.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
......@@ -32,6 +32,8 @@
*/
/** @} */
// INTERFACE: void evaluation_fmp(const Automaton& a1, const InputProjection& a2, OutputProjection& a3) { return vcsn::evaluation_fmp(*a1, *a2, *a3); }
namespace vcsn {
/** @addtogroup algorithms *//** @{ */
......@@ -41,13 +43,13 @@ namespace vcsn {
* as automata over a free monoid product.
*/
template<typename SA, typename TA,
typename ST, typename TT,
typename SARET, typename TARET>
template<typename ST, typename TT,
typename SA, typename TA,
typename SARES, typename TARES>
void
evaluation_fmp(const Element<ST, TT>&,
const Element<SA, TA>&,
Element<SARET, TARET>&);
Element<SARES, TARES>&);
/// @}
......
......@@ -2,7 +2,7 @@
//
// Vaucanson, a generic library for finite state machines.
//
// Copyright (C) 2005, 2006 The Vaucanson Group.
// Copyright (C) 2005, 2006, 2008 The Vaucanson Group.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
......@@ -42,9 +42,9 @@ namespace vcsn
image(res_composition, res);
}
template<typename SA, typename TA,
typename ST, typename TT,
// FIXME: we should empty res.
template<typename ST, typename TT,
typename SA, typename TA,
typename SARES, typename TARES>
void
evaluation_fmp(const Element<ST, TT>& trans,
......
......@@ -2,7 +2,7 @@
//
// Vaucanson, a generic library for finite state machines.
//
// Copyright (C) 2006 The Vaucanson Group.
// Copyright (C) 2006, 2008 The Vaucanson Group.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
......@@ -18,6 +18,8 @@
#ifndef VCSN_ALGORITHMS_INVERT_HH
# define VCSN_ALGORITHMS_INVERT_HH
# include <vaucanson/design_pattern/design_pattern.hh>
/**
* @file invert.hh
*
......@@ -33,7 +35,10 @@
* @see invert()
*/
# include <vaucanson/design_pattern/design_pattern.hh>
// FIXME: the return type must be InvertAutomaton (but alas there is no invert_traits_helper
// as for now)
// FIXME: the algorithm shouldn't return a reference
// INTERFACE: Automaton& invert(const Automaton& a1) { return vcsn::invert(*a1); }
namespace vcsn {
......
......@@ -146,9 +146,9 @@ namespace vcsn
}
/*----------------------------------.
| Specialization for transducers. |
`----------------------------------*/
/*-------------------------------------.
| Specialization for FMP transducers. |
`-------------------------------------*/
// Invert `label' and store the result in `res'.
......@@ -221,9 +221,9 @@ namespace vcsn
/*---------------------------.
| Dispatch for tranducers. |
`---------------------------*/
/*------------------------------.
| Dispatch for FMP tranducers. |
`------------------------------*/
template<typename S, typename T,
typename M1, typename M2>
......
......@@ -2,7 +2,7 @@
//
// Vaucanson, a generic library for finite state machines.
//
// Copyright (C) 2005, 2006 The Vaucanson Group.
// Copyright (C) 2005, 2006, 2008 The Vaucanson Group.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
......@@ -33,6 +33,11 @@
*/
/** @} */
// FIXME: The return type must be ComposedAutomaton (but we need a trait, composed_traits_automaton,
// wich will check if the two type are composable)
// Do a1 and a2 need to be the same type?
// INTERFACE: Automaton u_compose(const Automaton& a1, const Automaton& a2) { return vcsn::u_compose(*a1, *a2); }
namespace vcsn {
/** @addtogroup algorithms *//** @{ */
......
......@@ -2,7 +2,7 @@
//
// Vaucanson, a generic library for finite state machines.
//
// Copyright (C) 2005, 2006 The Vaucanson Group.
// Copyright (C) 2005, 2006, 2008 The Vaucanson Group.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
......@@ -32,6 +32,10 @@
*/
/** @} */
// INTERFACE: Automaton sub_normalize(const Automaton& a1) { return vcsn::sub_normalize(*a1); }
// INTERFACE: void sub_normalize_here(Automaton& a1) { return vcsn::sub_normalize_here(*a1); }
// INTERFACE: bool is_sub_normalized(const Automaton& a1) { return vcsn::is_sub_normalized(*a1); }
# include <vaucanson/algebra/concept/freemonoid_product.hh>
# include <vaucanson/automata/concept/copy.hh>
# include <vaucanson/algorithms/cut_up.hh>
......
......@@ -2,7 +2,7 @@
//
// Vaucanson, a generic library for finite state machines.
//
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 The Vaucanson Group.
// Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008 The Vaucanson Group.
//
// This program is free software; you can redistribute it and/or
// modify it under the terms of the GNU General Public License
......@@ -65,18 +65,21 @@ namespace vcsn {
};
/*-------------------------.
/*------------------------.
| INPUT PROJECTION TRAITS |
`-------------------------*/
`------------------------*/
template <class S, class T>
struct input_projection_helper
{ };
template <class S, class T>
struct input_projection_helper<Transducer<S>, T>
{
typedef typename S::series_set_t::semiring_t
typedef typename Transducer<S>::series_set_t::semiring_t
typeof_auto_series_set_t;
/// @todo FIXME: check this typedef