algo: Add integration aql test for FA iteration algorithms

This test generates a random automaton, runs both iteration algorithms on
it and then tests that both these automata accept equal language.

This is first of the aql integration tests (which support was added in
commit d79fe028). This should serve as
an example how to write aql integration tests.
Also, this is something that should not be in the unit tests (and it
was removed in the previous commits).
parent d7d2f1a3
begin
declare auto $iter = 100;
while ( -- $iter ) do begin
execute automaton::generate::RandomAutomatonFactory 10 3 true 5 > $aut;
execute automaton::transform::AutomatonIteration $aut | automaton::determinize::Determinize - | automaton::simplify::Trim - | automaton::simplify::Minimize - | automaton::simplify::Normalize - > $iter1;
execute automaton::transform::AutomatonIterationEpsilonTransition $aut | automaton::simplify::EpsilonRemoverIncoming - | automaton::determinize::Determinize - | automaton::simplify::Trim - | automaton::simplify::Minimize - | automaton::simplify::Normalize - > $iter2;
execute compare::AutomatonCompare $iter1 $iter2 > $res;
if ( $res != 1 ) then begin
print "Comparison returned non-OK value:";
print $res;
print $aut | string::Compose -;
print $iter1 | string::Compose -;
print $iter2 | string::Compose -;
quit 1;
end
end
end
Markdown is supported
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