bench/gspn-ssp/: New directory.

This commit is contained in:
Alexandre Duret-Lutz 2008-08-07 15:37:57 +02:00
parent d3b5e5bdad
commit 35bf9b5345
47 changed files with 1717 additions and 2 deletions

232
bench/gspn-ssp/sum Executable file
View file

@ -0,0 +1,232 @@
#!/usr/bin/env perl
use warnings;
use strict;
my %C = (
e2 => [
"formulae",
"unique states visited",
"SCC in search stack",
"max. depth",
"removed components",
"states",
"transitions",
"vmsize",
"real",
"user",
"sys",
".mark size",
".event size",
"mem total",
],
e4 => [
"formulae",
"unique states visited",
"SCC in search stack",
"contained map size",
"find_state count",
"max. depth",
"removed components",
"states",
"transitions",
"vmsize",
"real",
"user",
"sys",
".mark size",
".event size",
"mem total",
],
e45 => [
"formulae",
"unique states visited",
"SCC in search stack",
"contained map size",
"inclusion count heap",
"inclusion count stack",
"max. depth",
"removed components",
"states",
"transitions",
"vmsize",
"real",
"user",
"sys",
".mark size",
".event size",
"mem total",
],
e5 => [
"formulae",
"unique states visited",
"SCC in search stack",
"contained map size",
"inclusion count heap",
"inclusion count stack",
"max. depth",
"removed components",
"states",
"transitions",
"vmsize",
"real",
"user",
"sys",
".mark size",
".event size",
"mem total",
],
e6 => [
"formulae",
"unique states visited",
"SCC in search stack",
"contained map size",
"inclusion count heap",
"inclusion count stack",
"max. depth",
"removed components",
"states",
"transitions",
"vmsize",
"real",
"user",
"sys",
".mark size",
".event size",
"mem total",
],
);
my %filter = (states => 1, transitions => 1, user => 1);
my %order = (e2 => 2, e6 => 3, e5 => 4, e4 => 5);
my %H;
my %S;
my %P;
while (<>)
{
my @l = split (/,/);
push @l, ($l[-1] + $l[-2] + $l[-6] * 4096)/1024;
my $e = shift @l;
$e =~ s/non empty/non e./;
$ARGV =~ /([\w.]+).RES-(\w+)/;
my $name = $1;
my $meth = $2;
$meth =~ s/[nL]$//;
$P{$name}{$e}{$meth} = 1;
if (!exists $H{$meth}{$ARGV}{$e})
{
$H{$meth}{$ARGV}{$e} = [1, @l];
$S{$meth} = 1 + @l;
}
else
{
$H{$meth}{$ARGV}{$e}->[0]++;
for (my $i = 0; $i < @l; ++$i)
{
$H{$meth}{$ARGV}{$e}->[$i + 1] += $l[$i];
}
}
}
sub model_sort ($$)
{
my ($a, $b) = @_;
$a =~ s/\.rg//;
$a =~ s/.*(\d)$/$1$&/;
$b =~ s/\.rg//;
$b =~ s/.*(\d)$/$1$&/;
return $a cmp $b;
};
if (exists $ENV{FORTETABLE})
{
foreach my $e ("non e.", "empty")
{
foreach my $model (sort model_sort keys %P)
{
if (exists $P{$model}{$e})
{
foreach my $meth (sort { $order{$a} <=> $order{$b} }
keys %{$P{$model}{$e}})
{
my $n = "results/$model.RES-$meth-f";
next unless exists $H{$meth}{$n}{$e};
my @l = @{$H{$meth}{$n}{$e}};
print " "x17 . "% $model $meth $e\n";
my $st = $l[-5]/$l[0];
my $tr = $l[-4]/$l[0];
my $T = $l[-2]/$l[0];
my $res = $T >= 10 ? 1 : 2;
$res = 0 if $T >= 100;
printf "%17s& %.0f & %.0f & %.${res}f\n", "", $st, $tr, $T;
}
}
}
}
#if not exists $filter{$C{$meth}->[$i]};
exit 0;
}
foreach my $meth (sort keys %H)
{
printf "%21s", "";
foreach my $n (sort keys %{$H{$meth}})
{
$n =~ s,.*/,,;
$n =~ s,\.RES,,;
$n =~ s,-f,,;
printf "%18s", $n;
}
print "\n";
printf "%21s", "";
foreach my $n (sort keys %{$H{$meth}})
{
my $x = 2;
foreach my $k (keys %{$H{$meth}{$n}})
{
printf "%9s", $k;
$x--;
}
print " " x (9*$x);
}
print "\n";
for (my $i = 0; $i < $S{$meth}; ++$i)
{
printf "%-22s", $C{$meth}->[$i];
foreach my $n (sort keys %{$H{$meth}})
{
my $x = 2;
foreach my $k (keys %{$H{$meth}{$n}})
{
my @l = @{$H{$meth}{$n}{$k}};
if ($i)
{
printf "%8.2f ", $l[$i]/$l[0];
}
else
{
printf "%5dx ", $l[$i];
}
$x--
}
print " " x (9*$x);
}
print "\n";
}
}