Build the benchmark in bench/gspn-ssp/ using makefiles

This commit is contained in:
Alexandre Duret-Lutz 2008-08-08 10:26:21 +02:00
parent b83349d416
commit 56d1dbc610
20 changed files with 8643 additions and 146 deletions

238
bench/gspn-ssp/tools/sum Executable file
View file

@ -0,0 +1,238 @@
#!/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",
"inclusion count",
"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",
],
);
$C{e45} = $C{e5};
$C{e54} = $C{e5};
$C{e5L} = $C{e5};
$C{e5n} = $C{e5};
$C{e45n} = $C{e5};
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.]+)\.(e.*)-f\.all$/;
my $name = $1;
my $meth = $2;
$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 = "$model.$meth";
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,\.all,,;
$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";
}
}