Skip to content

Commit

Permalink
chore: delete temporary files of update_alive_statements.py (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasgrosser authored May 23, 2024
1 parent fc64834 commit b6e4ede
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions SSA/Projects/InstCombine/update_alive_statements.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ def getStatement(preamble: List[str], id : int, proof: List[str]) -> str:
Uses the preamble to create a valid Lean file.
"""

f = open("AliveTest_" + str(id) + ".lean", "w")
filename = "_AliveTest_" + str(id) + ".lean"
f = open(filename, "w")

f.write("".join(preamble))
rewritten = []
Expand All @@ -70,11 +71,13 @@ def getStatement(preamble: List[str], id : int, proof: List[str]) -> str:
f.close()

x = subprocess.run(
"(cd ../../../; lake build SSA.Projects.InstCombine.AliveTest_" + str(id) + ")",
"(cd ../../../; lake build SSA.Projects.InstCombine._AliveTest_" + str(id) + ")",
shell=True,
capture_output=True,
)

os.remove(filename)

name = "\n\ntheorem " + name + " :\n"

if x.returncode == 0:
Expand Down

0 comments on commit b6e4ede

Please sign in to comment.