Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update the script to generate line counting Table #2

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 44 additions & 7 deletions tools/gen-table2.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
import sys
import os
import json


def main():
os.system(
"python3 count-lines.py $VERUS_DIR/source/tools/line_count/zookeeper_table zookeeper"
)
os.system(
"python3 count-lines.py $VERUS_DIR/source/tools/line_count/rabbitmq_table rabbitmq"
)
os.system(
"python3 count-lines.py $VERUS_DIR/source/tools/line_count/fluent_table fluent"
)
os.system(
"python3 count-anvil-lines.py $VERUS_DIR/source/tools/line_count/lib_table"
)
zk_data = json.load(open("zookeeper-lines.json"))
rmq_data = json.load(open("rabbitmq-lines.json"))
fb_data = json.load(open("fluent-lines.json"))
anvil_data = json.load(open("anvil-lines.json"))
print("ZooKeeper:")
print(
"Liveness & {} & -- & {}".format(
Expand All @@ -19,12 +32,12 @@ def main():
)
)
print(
"Reconciliation model & -- & -- & {}".format(
"Controller model & -- & -- & {}".format(
zk_data["reconcile_model"]["Proof"],
)
)
print(
"Reconciliation impl & -- & {} & --".format(
"Controller impl & -- & {} & --".format(
zk_data["reconcile_model"]["Exec"] + zk_data["reconcile_impl"]["Exec"],
)
)
Expand Down Expand Up @@ -63,12 +76,12 @@ def main():
)
)
print(
"Reconciliation model & -- & -- & {}".format(
"Controller model & -- & -- & {}".format(
rmq_data["reconcile_model"]["Proof"],
)
)
print(
"Reconciliation impl & -- & {} & --".format(
"Controller impl & -- & {} & --".format(
rmq_data["reconcile_model"]["Exec"] + rmq_data["reconcile_impl"]["Exec"],
)
)
Expand Down Expand Up @@ -96,12 +109,12 @@ def main():
)
)
print(
"Reconciliation model & -- & -- & {}".format(
"Controller model & -- & -- & {}".format(
fb_data["reconcile_model"]["Proof"],
)
)
print(
"Reconciliation impl & -- & {} & --".format(
"Controller impl & -- & {} & --".format(
fb_data["reconcile_model"]["Exec"] + fb_data["reconcile_impl"]["Exec"],
)
)
Expand All @@ -115,6 +128,30 @@ def main():
fb_data["entry"]["Trusted"],
)
)
print("Anvil:")
print(
"TLA embedding & {} & -- & --".format(
anvil_data["tla_embedding_lines"]["Trusted"]
)
)
print(
"Model & {} & -- & --".format(
anvil_data["other_lines"]["Trusted"]
+ anvil_data["object_model_lines"]["Trusted"]
)
)
print(
"Lemmas & -- & -- & {}".format(
anvil_data["k8s_lemma_lines"]["Proof"]
+ anvil_data["tla_lemma_lines"]["Proof"]
)
)
print(
"Shim layer & {} & -- & --".format(
anvil_data["object_wrapper_lines"]["Trusted"]
+ anvil_data["other_lines"]["Exec"]
)
)


if __name__ == "__main__":
Expand Down
Loading