Skip to content

Commit ead0132

Browse files
committed
Update the script to generate line counting Table (#2)
Signed-off-by: Xudong Sun <[email protected]>
1 parent 88998b4 commit ead0132

File tree

1 file changed

+44
-7
lines changed

1 file changed

+44
-7
lines changed

tools/gen-table2.py

+44-7
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
1-
import sys
1+
import os
22
import json
33

44

55
def main():
6+
os.system(
7+
"python3 count-lines.py $VERUS_DIR/source/tools/line_count/zookeeper_table zookeeper"
8+
)
9+
os.system(
10+
"python3 count-lines.py $VERUS_DIR/source/tools/line_count/rabbitmq_table rabbitmq"
11+
)
12+
os.system(
13+
"python3 count-lines.py $VERUS_DIR/source/tools/line_count/fluent_table fluent"
14+
)
15+
os.system(
16+
"python3 count-anvil-lines.py $VERUS_DIR/source/tools/line_count/lib_table"
17+
)
618
zk_data = json.load(open("zookeeper-lines.json"))
719
rmq_data = json.load(open("rabbitmq-lines.json"))
820
fb_data = json.load(open("fluent-lines.json"))
21+
anvil_data = json.load(open("anvil-lines.json"))
922
print("ZooKeeper:")
1023
print(
1124
"Liveness & {} & -- & {}".format(
@@ -19,12 +32,12 @@ def main():
1932
)
2033
)
2134
print(
22-
"Reconciliation model & -- & -- & {}".format(
35+
"Controller model & -- & -- & {}".format(
2336
zk_data["reconcile_model"]["Proof"],
2437
)
2538
)
2639
print(
27-
"Reconciliation impl & -- & {} & --".format(
40+
"Controller impl & -- & {} & --".format(
2841
zk_data["reconcile_model"]["Exec"] + zk_data["reconcile_impl"]["Exec"],
2942
)
3043
)
@@ -63,12 +76,12 @@ def main():
6376
)
6477
)
6578
print(
66-
"Reconciliation model & -- & -- & {}".format(
79+
"Controller model & -- & -- & {}".format(
6780
rmq_data["reconcile_model"]["Proof"],
6881
)
6982
)
7083
print(
71-
"Reconciliation impl & -- & {} & --".format(
84+
"Controller impl & -- & {} & --".format(
7285
rmq_data["reconcile_model"]["Exec"] + rmq_data["reconcile_impl"]["Exec"],
7386
)
7487
)
@@ -96,12 +109,12 @@ def main():
96109
)
97110
)
98111
print(
99-
"Reconciliation model & -- & -- & {}".format(
112+
"Controller model & -- & -- & {}".format(
100113
fb_data["reconcile_model"]["Proof"],
101114
)
102115
)
103116
print(
104-
"Reconciliation impl & -- & {} & --".format(
117+
"Controller impl & -- & {} & --".format(
105118
fb_data["reconcile_model"]["Exec"] + fb_data["reconcile_impl"]["Exec"],
106119
)
107120
)
@@ -115,6 +128,30 @@ def main():
115128
fb_data["entry"]["Trusted"],
116129
)
117130
)
131+
print("Anvil:")
132+
print(
133+
"TLA embedding & {} & -- & --".format(
134+
anvil_data["tla_embedding_lines"]["Trusted"]
135+
)
136+
)
137+
print(
138+
"Model & {} & -- & --".format(
139+
anvil_data["other_lines"]["Trusted"]
140+
+ anvil_data["object_model_lines"]["Trusted"]
141+
)
142+
)
143+
print(
144+
"Lemmas & -- & -- & {}".format(
145+
anvil_data["k8s_lemma_lines"]["Proof"]
146+
+ anvil_data["tla_lemma_lines"]["Proof"]
147+
)
148+
)
149+
print(
150+
"Shim layer & {} & -- & --".format(
151+
anvil_data["object_wrapper_lines"]["Trusted"]
152+
+ anvil_data["other_lines"]["Exec"]
153+
)
154+
)
118155

119156

120157
if __name__ == "__main__":

0 commit comments

Comments
 (0)