Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
alan23273850 committed Oct 17, 2024
1 parent 0c9f4e8 commit 1afa6d5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
4 changes: 2 additions & 2 deletions POPL25/Evaluation/non-parameterized/gen_table_correct.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ def json_to_latex_table(tool_list, latex_filename):
assert data['result'] != 'V'
assert data['total'].count('/') == data['result'].count('/')
if '/' in data['total']:
print(data['total'], data['result'])
# print(data['total'], data['result'])
data['result'] = format_duration(parse_duration(str(data['total'].split('/')[0])) + parse_duration(data['result'].split('/')[0])) + '/' + format_duration(parse_duration(str(data['total'].split('/')[1])) + parse_duration(data['result'].split('/')[1]))
print(data['result'])
# print(data['result'])
else:
data['result'] = format_duration(parse_duration(str(data['total'])) + parse_duration(data['result']))
del data['total']
Expand Down
14 changes: 8 additions & 6 deletions POPL25/Evaluation/non-parameterized/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def LSTA(root, semaphore, lock, counter):
##############################################
append_key_value_to_json_file('lsta.json', root, data)
counter.value += 1
print(LSTA.__name__, root, data, str(counter.value), flush=True)
print(LSTA.__name__, root, data, flush=True)
##############################################
lock.release()
def TA(root, semaphore, lock, counter):
Expand Down Expand Up @@ -192,7 +192,7 @@ def TA(root, semaphore, lock, counter):
##############################################
append_key_value_to_json_file('autoq.json', root, data)
counter.value += 1
print(TA.__name__, root, data, str(counter.value), flush=True)
print(TA.__name__, root, data, flush=True)
##############################################
lock.release()
def svsim(root, semaphore, lock, counter):
Expand Down Expand Up @@ -222,7 +222,7 @@ def svsim(root, semaphore, lock, counter):
##############################################
append_key_value_to_json_file('svsim.json', root, data)
counter.value += 1
print(svsim.__name__, root, data, str(counter.value), flush=True)
print(svsim.__name__, root, data, flush=True)
##############################################
lock.release()
symqvMap = {'BV': 'BVsingle', 'GHZall': 'GHZall', 'GHZzero': 'GHZsingle', 'Grover': 'GroverSingle', 'H2': 'H2all', 'HXH': 'HXHall', 'MCToffoli': 'MCXall', 'MOBV_reorder': 'BVall', 'MOGrover': 'GroverAll', 'OEGrover': 'OEGrover'}
Expand Down Expand Up @@ -261,13 +261,14 @@ def symqv(root, semaphore, lock, counter):
else:
data['total'] = '%.1fs' % total_time
else:
print(p.stdout.decode('utf-8').splitlines())
data['total'] = str(round(end - begin, 1))
data['result'] = 'X'
lock.acquire()
##############################################
append_key_value_to_json_file('symqv.json', root, data)
counter.value += 1
print(symqv.__name__, root, data, str(counter.value), flush=True)
print(symqv.__name__, root, data, flush=True)
##############################################
lock.release()
CaALMap = {'MOBV_reorder': 'BVallBug', 'BV': 'BVsingleBug', 'GHZall': 'GHZallBug', 'GHZzero': 'GHZsingleBug', 'MOGrover': 'GroverAllBug', 'Grover': 'GroverSingleBug', 'H2': 'H2allBug', 'HXH': 'HXHallBug', 'MCToffoli': 'MCXallBug', 'OEGrover': 'OEGroverBug'}
Expand Down Expand Up @@ -306,6 +307,7 @@ def CaAL(root, semaphore, lock, counter, CPU):
data['total'] = total_time.split()[-1]
data['result'] = 'O'
else:
print(p.stdout.decode('utf-8').splitlines())
data['total'] = str(round(end - begin, 1))
data['result'] = 'X'
else:
Expand All @@ -315,7 +317,7 @@ def CaAL(root, semaphore, lock, counter, CPU):
##############################################
append_key_value_to_json_file('caal.json', root, data)
counter.value += 1
print(CaAL.__name__, root, data, str(counter.value), flush=True)
print(CaAL.__name__, root, data, flush=True)
##############################################
lock.release()
def SliQSim(root, semaphore, lock, counter):
Expand Down Expand Up @@ -346,7 +348,7 @@ def SliQSim(root, semaphore, lock, counter):
##############################################
append_key_value_to_json_file('sliqsim.json', root, data)
counter.value += 1
print(SliQSim.__name__, root, data, str(counter.value), flush=True)
print(SliQSim.__name__, root, data, flush=True)
##############################################
lock.release()

Expand Down
4 changes: 2 additions & 2 deletions POPL25/Kick-the-Tires/non-parameterized/gen_table_correct.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ def json_to_latex_table(tool_list, latex_filename):
assert data['result'] != 'V'
assert data['total'].count('/') == data['result'].count('/')
if '/' in data['total']:
print(data['total'], data['result'])
# print(data['total'], data['result'])
data['result'] = format_duration(parse_duration(str(data['total'].split('/')[0])) + parse_duration(data['result'].split('/')[0])) + '/' + format_duration(parse_duration(str(data['total'].split('/')[1])) + parse_duration(data['result'].split('/')[1]))
print(data['result'])
# print(data['result'])
else:
data['result'] = format_duration(parse_duration(str(data['total'])) + parse_duration(data['result']))
del data['total']
Expand Down
14 changes: 8 additions & 6 deletions POPL25/Kick-the-Tires/non-parameterized/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def LSTA(root, semaphore, lock, counter):
##############################################
append_key_value_to_json_file('lsta.json', root, data)
counter.value += 1
print(LSTA.__name__, root, data, str(counter.value), flush=True)
print(LSTA.__name__, root, data, flush=True)
##############################################
lock.release()
def TA(root, semaphore, lock, counter):
Expand Down Expand Up @@ -192,7 +192,7 @@ def TA(root, semaphore, lock, counter):
##############################################
append_key_value_to_json_file('autoq.json', root, data)
counter.value += 1
print(TA.__name__, root, data, str(counter.value), flush=True)
print(TA.__name__, root, data, flush=True)
##############################################
lock.release()
def svsim(root, semaphore, lock, counter):
Expand Down Expand Up @@ -222,7 +222,7 @@ def svsim(root, semaphore, lock, counter):
##############################################
append_key_value_to_json_file('svsim.json', root, data)
counter.value += 1
print(svsim.__name__, root, data, str(counter.value), flush=True)
print(svsim.__name__, root, data, flush=True)
##############################################
lock.release()
symqvMap = {'BV': 'BVsingle', 'GHZall': 'GHZall', 'GHZzero': 'GHZsingle', 'Grover': 'GroverSingle', 'H2': 'H2all', 'HXH': 'HXHall', 'MCToffoli': 'MCXall', 'MOBV_reorder': 'BVall', 'MOGrover': 'GroverAll', 'OEGrover': 'OEGrover'}
Expand Down Expand Up @@ -261,13 +261,14 @@ def symqv(root, semaphore, lock, counter):
else:
data['total'] = '%.1fs' % total_time
else:
print(p.stdout.decode('utf-8').splitlines())
data['total'] = str(round(end - begin, 1))
data['result'] = 'X'
lock.acquire()
##############################################
append_key_value_to_json_file('symqv.json', root, data)
counter.value += 1
print(symqv.__name__, root, data, str(counter.value), flush=True)
print(symqv.__name__, root, data, flush=True)
##############################################
lock.release()
CaALMap = {'MOBV_reorder': 'BVallBug', 'BV': 'BVsingleBug', 'GHZall': 'GHZallBug', 'GHZzero': 'GHZsingleBug', 'MOGrover': 'GroverAllBug', 'Grover': 'GroverSingleBug', 'H2': 'H2allBug', 'HXH': 'HXHallBug', 'MCToffoli': 'MCXallBug', 'OEGrover': 'OEGroverBug'}
Expand Down Expand Up @@ -306,6 +307,7 @@ def CaAL(root, semaphore, lock, counter, CPU):
data['total'] = total_time.split()[-1]
data['result'] = 'O'
else:
print(p.stdout.decode('utf-8').splitlines())
data['total'] = str(round(end - begin, 1))
data['result'] = 'X'
else:
Expand All @@ -315,7 +317,7 @@ def CaAL(root, semaphore, lock, counter, CPU):
##############################################
append_key_value_to_json_file('caal.json', root, data)
counter.value += 1
print(CaAL.__name__, root, data, str(counter.value), flush=True)
print(CaAL.__name__, root, data, flush=True)
##############################################
lock.release()
def SliQSim(root, semaphore, lock, counter):
Expand Down Expand Up @@ -346,7 +348,7 @@ def SliQSim(root, semaphore, lock, counter):
##############################################
append_key_value_to_json_file('sliqsim.json', root, data)
counter.value += 1
print(SliQSim.__name__, root, data, str(counter.value), flush=True)
print(SliQSim.__name__, root, data, flush=True)
##############################################
lock.release()

Expand Down

0 comments on commit 1afa6d5

Please sign in to comment.