File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ def calculate_statistics(file_path):
1212 edges = 0
1313 time_millis = 0
1414 rows = 0
15+ unsound = 0
1516
1617 with open (file_path , newline = '' ) as csvfile :
1718 reader = csv .reader (csvfile )
@@ -28,6 +29,8 @@ def calculate_statistics(file_path):
2829 time_millis_index = header .index (" Time (millis)" )
2930
3031 for row in reader :
32+ if int (row [unknown_jumps_index ]) > 0 :
33+ unsound += 1
3134 rows += 1
3235 total_opcodes += int (row [total_opcodes_index ])
3336 total_jumps += int (row [total_jumps_index ])
@@ -50,6 +53,7 @@ def calculate_statistics(file_path):
5053 print (f"Erroneous jumps: { erroneous_jumps } ({ percentuale (erroneous_jumps ,total_jumps )} %)" )
5154 print (f"Total jumps with classification: { classified } ({ 'match' if classified == total_jumps else 'mismatch' } )" )
5255 print (f"Edges: { edges } " )
56+ print (f"Unsound CFGs (only if linking was disabled): { unsound } " )
5357 print (f"Average Time (seconds): { avg_time_millis / 1000 } " )
5458
5559def percentuale (num , den ):
You can’t perform that action at this time.
0 commit comments