File: eauswert.awk

package info (click to toggle)
eprover 2.6%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 21,288 kB
  • sloc: ansic: 331,111; csh: 12,026; python: 10,178; awk: 5,825; makefile: 461; sh: 389
file content (104 lines) | stat: -rwxr-xr-x 1,704 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#!/opt/local/bin/gawk -f

# Usage: eauswert.awk <result_file>
#
# Copyright 1998 Stephan Schulz, schulz@informatik.tu-muenchen.de
#
# Read a protocol file (as e.g. written by distribute_eprover.awk)
# and summarize it, reporting successes, timeouts, out-of
# memory-failures and potential bugs.
#

BEGIN{
  ttime = 0.0;
  if(!ARGV[2])
  {
    proc_limit = int(1000000); /* Large enough */
  }
  else
  {
    proc_limit = ARGV[2];
    sub("0*", "" , proc_limit);
    proc_limit = int(proc_limit);
  }
  
  if(!ARGV[3])
  {
     timelimit = 1000000.0; /* Large enough */
  }
  else
  {
    timelimit = ARGV[3];
    sub("0*", "" , timelimit);
    timelimit = float(timelimit);
  }
  succ = 0;
  total = 0;
  bugs = 0;
  nomem = 0;
  incomplete=0;
  ARGC=2;
  
  if(ARGV[1]=="-")
    {
      ARGV[1]="";
    }

  if(ARGV[1])
    {
      test1 = getline < ARGV[1];      
      close(ARGV[1]);
      if(test1 == -1)
	{
	  if(!index(ARGV[1],"PROTOCOL"))
	    {
	      if(substr(ARGV[1], length(ARGV[1]))!="/")
		{
		  ARGV[1] = ARGV[1] "/";
		}
	      ARGV[1] = ARGV[1] "PROTOCOL";
	    }
	}
    }
}


function float(x)
{
   return 0.0+x+0.0;
}

!(/^#/) && !(/^%/){
   if((total < proc_limit))
   {
      total++;
      if(($2 == "F")||((float($3))>= timelimit))
      {
	 if($4 == "unknown")
	 {
	    bugs++;
	 }
	 if($4 == "maxmem" && ((float($3)) < timelimit))
	 {
	    nomem++;
	 }
	 if($4 == "incomplete" && ((float($3)) < timelimit))
	 {
	    incomplete++;
	 }
      }
      else
      {
	 /* if(($2 == "N")) */
	 {
	    succ++;
	    ttime+=$3;
	 }
      }
   }
}

END{
  printf "Total : %4d S/F/I/N/B: %5d/%5d/%3d/%3d/%3d Time: %f\n", 
         total, succ, total-succ, incomplete, nomem, bugs, ttime;
}