Skip to content

Commit 9c677a7

Browse files
committed
Add LOC counting script
1 parent ab2786f commit 9c677a7

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

count.rb

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
COMPCOMP=ARGV[0]
2+
3+
RTLS=["backend/Tailcallproof", "backend/Inliningproof", "backend/Renumberproof", "backend/Constpropproof",
4+
"backend/CSEproof", "backend/Deadcodeproof", "backend/Unusedglobproof", "backend/Allocproof"]
5+
BACKENDS=["backend/Selectionproof", "backend/RTLgenproof", "backend/Tunnelingproof", "backend/Linearizeproof",
6+
"backend/CleanupLabelsproof", "backend/Debugvarproof"]
7+
STACKNIG=["backend/Stackingproof"]
8+
WHOLE=["x86/Asmgenproof", "cfrontend/Cminorgenproof", "cfrontend/Cshmgenproof", "cfrontend/SimplLocalsproof", "cfrontend/SimplExprproof"]
9+
#NOTE: Cstrategy is omitted because it contains semantics/other proofs (bigstep) too
10+
11+
RTLS.map!{|i| i + if COMPCOMP then "C.v" else ".v" end}
12+
BACKENDS.map!{|i| i + if COMPCOMP then "C.v" else ".v" end}
13+
WHOLE.map!{|i| i + if COMPCOMP then "C.v" else ".v" end}
14+
15+
puts
16+
puts "<<<RTLS>>>"
17+
puts
18+
system("tokei -f #{RTLS.join(" ")}")
19+
20+
puts
21+
puts "<<<BACKENDS - STACKING>>>"
22+
puts
23+
system("tokei -f #{RTLS.join(" ")} #{BACKENDS.join(" ")}")
24+
25+
puts
26+
puts "<<<WHOLE - STACKING>>>"
27+
puts
28+
system("tokei -f #{RTLS.join(" ")} #{BACKENDS.join(" ")} #{WHOLE.join(" ")}")

count_dir.sh

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
for d in ./*/ ; do (cd "$d" && pwd && loc --files && echo && echo); done

0 commit comments

Comments
 (0)