Commit bed078cc authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Implement support.

* taf-kit/src/cmd_wt.cc (support_command): New command.
* taf-kit/tests/vcsn-char-z.test: Add a new test.
parent a2ee5820
2011-09-13 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Implement support.
* taf-kit/src/cmd_wt.cc (support_command): New command.
* taf-kit/tests/vcsn-char-z.test: Add a new test.
2011-09-13 Alexandre Duret-Lutz <adl@lrde.epita.fr>
 
Implement w-image and w-domain.
......
......@@ -237,6 +237,17 @@ characteristic_command(const arguments_t& args)
return 0;
}
static int
support_command(const arguments_t& args)
{
automaton_t a = get_aut(args, 1);
BOOL_CONTEXT::automaton_t res =
BOOL_CONTEXT::make_automaton(a.structure().series().monoid().alphabet());
characteristic(res, a);
g_res.keep(res);
return 0;
}
BEGIN_COMMAND_GROUP(cmd_gen,
"2. Operations on weighted automata and expressions over free monoids:");
COMMAND_ENTRY(transpose, Aut, "Transpose the automaton `aut'.");
......@@ -265,5 +276,6 @@ COMMAND_ENTRY(shuffle, AutAut, "Build the shuffle product of two automata.");
COMMAND_ENTRY(infiltration, AutAut, "Build the infiltration product of two automata.");
COMMAND_ENTRY(power, AutInt, "Build the `n'th power of `aut'.");
COMMAND_ENTRY(characteristic, Aut, "Build an automaton from the Boolean automaton `aut'.");
COMMAND_ENTRY(support, Aut, "Build a Boolean automaton from `aut'.");
COMMAND_ENTRY(star_alphabet, None, "Build an automaton recognizing the free monoid generated by the alphabet.");
END_COMMAND_GROUP
......@@ -237,4 +237,8 @@ test "`$VCSN -aab expand '(ab+a)(a+ba)'`" = "aa+{2} aba+abba"
test "`$VCSN -aab expand '(aa+a)(a+aa)'`" = "aa+{2} aaa+aaaa"
test "`$VCSN -aab expand '(aa+a)(1+a)'`" = "a+{2} aa+aaa"
x=`$VCSN support c1.xml \| characteristic - \| aut-to-exp -`
y=`$VCSN support c1.xml | vcsn-char-b aut-to-exp -`
test "$x" = "$y"
exit 0
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