forked from AbsInt/CompCert
-
Notifications
You must be signed in to change notification settings - Fork 1
/
count_locs.py
executable file
·45 lines (38 loc) · 1.12 KB
/
count_locs.py
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
#!/usr/bin/env python
import os, subprocess
if __name__ == "__main__":
sum = 0
difffiles = \
["backend/Renumberproof",
"backend/Constpropproof",
"backend/Deadcodeproof",
"backend/CSEproof",
"backend/Tailcallproof",
"backend/Inliningproof",
"backend/Selectionproof",
"backend/ValueAnalysis",
"cfrontend/SimplExprproof"]
otherfiles = \
["Linker",
"Linkerproof",
"common/Language",
"common/Linksub",
"common/LinkerBasicproof",
"common/LinkerProp",
"common/SepcompRel",
"common/Sig",
"lib/Coqlib_sepcomp",
"lib/Maps_sepcomp",
"lib/Tree",
"lib/WFType"]
for filename in difffiles:
num = int(subprocess.check_output("diff ../%s.v %s_sepcomp.v | grep \"^>\" | wc -l" % (filename, filename), shell=True))
print("%s:\t%d (*)" % (filename, num))
sum += num
print("")
for filename in otherfiles:
num = int(subprocess.check_output("cat %s.v | wc -l" % filename, shell=True))
print("%s:\t%d" % (filename, num))
sum += num
print("")
print("%s:\t%d" % ("\tTotal", sum))