-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
94 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{ | ||
"name": "swap_element17", | ||
"init_progr_len": 1, | ||
"max_progr_len": 1, | ||
"max_sk_sz": 18, | ||
"vars": [ | ||
"s(0)", | ||
"s(1)", | ||
"s(10)", | ||
"s(11)", | ||
"s(12)", | ||
"s(13)", | ||
"s(14)", | ||
"s(15)", | ||
"s(16)", | ||
"s(17)", | ||
"s(2)", | ||
"s(3)", | ||
"s(4)", | ||
"s(5)", | ||
"s(6)", | ||
"s(7)", | ||
"s(8)", | ||
"s(9)" | ||
], | ||
"src_ws": [ | ||
"s(0)", | ||
"s(1)", | ||
"s(2)", | ||
"s(3)", | ||
"s(4)", | ||
"s(5)", | ||
"s(6)", | ||
"s(7)", | ||
"s(8)", | ||
"s(9)", | ||
"s(10)", | ||
"s(11)", | ||
"s(12)", | ||
"s(13)", | ||
"s(14)", | ||
"s(15)", | ||
"s(16)", | ||
"s(17)" | ||
], | ||
"tgt_ws": [ | ||
"s(17)", | ||
"s(1)", | ||
"s(2)", | ||
"s(3)", | ||
"s(4)", | ||
"s(5)", | ||
"s(6)", | ||
"s(7)", | ||
"s(8)", | ||
"s(9)", | ||
"s(10)", | ||
"s(11)", | ||
"s(12)", | ||
"s(13)", | ||
"s(14)", | ||
"s(15)", | ||
"s(16)", | ||
"s(0)" | ||
], | ||
"user_instrs": [], | ||
"current_cost": 3, | ||
"storage_dependences": [], | ||
"memory_dependences": [], | ||
"dependencies": [], | ||
"is_revert": false, | ||
"rules_applied": false, | ||
"rules": [], | ||
"original_instrs": "SWAP16", | ||
"min_length_instrs": 0, | ||
"min_length_bounds": 0, | ||
"min_length": 0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import glob | ||
|
||
import pytest | ||
from typing import Dict | ||
from parser.cfg_block import CFGBlock | ||
from parser.cfg_instruction import build_instr_spec, build_verbatim_spec, build_push_spec, CFGInstruction | ||
from greedy.greedy_new_version import greedy_from_file, STACK_DEPTH | ||
from analysis.greedy_validation import check_execution_from_ids | ||
|
||
|
||
class TestGreedyPermutation: | ||
|
||
def test_swap_element17(self): | ||
sfs, seq, outcome = greedy_from_file("greedy_permutation_files/swap_element17.json") | ||
print("LEN", len(seq)) | ||
assert check_execution_from_ids(sfs, seq), "Failing SWAP17 tests" |