Skip to content

Commit

Permalink
Case when the greedy fails to empty list
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcere committed Jan 21, 2025
1 parent 5e0297d commit c626b30
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/greedy/ids_from_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

def cfg_block_spec_ids(cfg_block: CFGBlock) -> Tuple[str, float, List[instr_id_T]]:
outcome, time, greedy_ids = greedy_standalone(cfg_block.spec)
cfg_block.greedy_ids = greedy_ids
cfg_block.greedy_ids = greedy_ids if greedy_ids is not None else []
return outcome, time, greedy_ids


Expand Down
1 change: 0 additions & 1 deletion src/solution_generation/reconstruct_bytecode.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def asm_from_ids(sms: SMS_T, id_seq: List[str]) -> List[ASM_bytecode_T]:
"""
Converts the result from the greedy algorithm and the block specification into a list of JSON asm opcodes
"""
print(sms["name"], id_seq)
instr_id_to_instr = {instr['id']: instr for instr in sms['user_instrs']}
return id_seq_to_asm_bytecode(instr_id_to_instr, id_seq)

Expand Down

0 comments on commit c626b30

Please sign in to comment.