aboutsummaryrefslogtreecommitdiff
path: root/gfsm/gfsm/src/libgfsm/tests/gfsm-out-degrees.perl
blob: 38caf2d4f4783bdf6824ca6d25e02a3eea63f0c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
#!/usr/bin/perl -w

use Gfsm;

$fsmfile = @ARGV ? shift : '-';
$fsm = Gfsm::Automaton->new();
die("$0: load failed for '$fsmfile': $!") if (!$fsm->load($fsmfile));

foreach $qid (0..($fsm->n_states-1)) {
  print $qid, "\t", $fsm->out_degree($qid), "\n";
}