Commit beaa8b82 authored by g.genestier's avatar g.genestier

A new script for SCP

parent 9d358ccf
import sys
toStudy=open("erreur_"+sys.argv[1]+".txt",'r')
res=[]
every=[[],[],[],[],[],[]]
for line in toStudy:
if line.find("SUCCESS File")==0:
res.append([line.split("'")[1],every])
every=[[],[],[],[],[],[]]
elif line.find(" Proved terminating")==0:
every[0]=line.strip().split('[m ')[1].split(' , ')
elif line.find(" Not proved terminating")==0:
every[1]=line.strip().split('[m ')[1].split(' , ')
elif line.find(" Pattern matching on defined symbol")==0:
every[2]=line.strip().split('[m ')[1].split(' , ')
elif line.find(" Critical pair")==0:
every[3]=line.strip().split('[m ')[1].split(' , ')
elif line.find("ERROR The symbol ")==0:
every[4]=line.strip().split('[m ')[1].split(' , ')
elif line.find(" Use brackets")==0:
every[5]=line.strip().split('[m ')[1].split(' , ')
elif line.find(" Not strictly positive")==0:
every[5]=line.strip().split('[m ')[1].split(' , ')
else:
print(line)
toStudy.close()
toFill=open("../../Bureau/Resultats/TabRes_"+sys.argv[1]+".csv",'w')
toFill.write(";;"+sys.argv[1]+";;\n;;;;\n")
def printlist(couple):
if couple[1]==[]:
toFill.write(";;"+couple[0]+" contains a symbol not strictly positive;;\n")
elif couple[1]==[[]]:
toFill.write(";;"+couple[0]+" contains a not handled type level rewriting;;\n")
else:
toFill.write(";;"+couple[0]+";;\n")
toFill.write("Accepted;Refused;Pattern Matching;Non-linear;Brackets\n")
longueur=0
for i in range(5):
a=len(couple[1][i])
if a>longueur:
longueur=a
for i in range(longueur):
for j in range(5):
if len(couple[1][j])>i:
toFill.write(couple[1][j][i])
if j==4:
toFill.write('\n')
else:
toFill.write(";")
toFill.write(";;;;;;;\n")
for c in res:
printlist(c)
toFill.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment