Skip to content

Commit

Permalink
Merge branch 'main' into second_version_greedy
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcere committed Jan 16, 2025
2 parents b5c9254 + b948c5a commit a2dd061
Show file tree
Hide file tree
Showing 7,722 changed files with 133,671 additions and 162,983 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

{".code":[{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"2A"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"2A"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"STOP","source":-1}],"sourceList":["examples/ambiguous_names/ambiguous_names.cfg"]}
Error: Option --optimize is not supported with --import-asm-json.
2 changes: 2 additions & 0 deletions examples/ambiguous_names/ambiguous_names-asm-solc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


{
".code": [
{
Expand Down
3 changes: 3 additions & 0 deletions examples/ambiguous_names/ambiguous_names.cfg
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@

======= prueba/ambiguous_names/ambiguous_names.yul (EVM) =======
Yul Control Flow Graph:

{
"object": {
"blocks": [
Expand Down
34 changes: 34 additions & 0 deletions examples/ambiguous_names/ambiguous_names_standard_input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"language": "Yul",
"sources": {
"ambiguous_names.yul": {
"content": "{\n a()\n c()\n function a() {\n let x := 42\n sstore(x,x)\n b()\n function b() {}\n }\n function c() {\n let x := 21\n mstore(x,x)\n b()\n function b() {}\n }\n}\n// ----\n// digraph CFG {\n// nodesep=0.7;\n// node[shape=box];\n//\n// Entry [label=\"Entry\"];\n// Entry -> Block0;\n// Block0 [label=\"\\\n// a: [ RET[a] ] => [ ]\\l\\\n// c: [ RET[c] ] => [ ]\\l\\\n// \"];\n// Block0Exit [label=\"MainExit\"];\n// Block0 -> Block0Exit;\n//\n// FunctionEntry_a_1 [label=\"function a()\"];\n// FunctionEntry_a_1 -> Block1;\n// Block1 [label=\"\\\n// Assignment(x): [ 0x2a ] => [ x ]\\l\\\n// sstore: [ x x ] => [ ]\\l\\\n// b: [ RET[b] ] => [ ]\\l\\\n// \"];\n// Block1Exit [label=\"FunctionReturn[a]\"];\n// Block1 -> Block1Exit;\n//\n// FunctionEntry_b_2 [label=\"function b()\"];\n// FunctionEntry_b_2 -> Block2;\n// Block2 [label=\"\\\n// \"];\n// Block2Exit [label=\"FunctionReturn[b]\"];\n// Block2 -> Block2Exit;\n//\n// FunctionEntry_c_3 [label=\"function c()\"];\n// FunctionEntry_c_3 -> Block3;\n// Block3 [label=\"\\\n// Assignment(x): [ 0x15 ] => [ x ]\\l\\\n// mstore: [ x x ] => [ ]\\l\\\n// b: [ RET[b] ] => [ ]\\l\\\n// \"];\n// Block3Exit [label=\"FunctionReturn[c]\"];\n// Block3 -> Block3Exit;\n//\n// FunctionEntry_b_4 [label=\"function b()\"];\n// FunctionEntry_b_4 -> Block4;\n// Block4 [label=\"\\\n// \"];\n// Block4Exit [label=\"FunctionReturn[b]\"];\n// Block4 -> Block4Exit;\n//\n// }\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200,
"details": {
"peephole": false,
"inliner": false,
"jumpdestRemover": false,
"orderLiterals": false,
"deduplicate": false,
"cse": false,
"constantOptimizer": false
}
},
"outputSelection": {
"*": {
"*": [
"abi",
"metadata",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers"
]
}
}
}
}
2 changes: 2 additions & 0 deletions examples/ambiguous_names/notes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Key, SOLC GAS, SOLC BYTES, SOLC NUM INS, GREEDY GAS, GREEDY BYTES, GREEDY NUM INS, DIFF GAS, DIFF BYTES, DIFF NUM INS
code,5006,6,4,5006,8,4,0,-2,0
34 changes: 34 additions & 0 deletions examples/ambiguous_names/object_asm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
".code": [
{
"name": "PUSH",
"begin": -1,
"end": -1,
"source": -1,
"value": "2A"
},
{
"name": "PUSH",
"begin": -1,
"end": -1,
"source": -1,
"value": "2A"
},
{
"name": "SSTORE",
"begin": -1,
"end": -1,
"source": -1
},
{
"name": "STOP",
"begin": -1,
"end": -1,
"source": -1
}
],
".data": {},
"sourceList": [
"/Users/pablo/Repositorios/ethereum/grey/scripts/prueba/ambiguous_names/ambiguous_names.cfg"
]
}
3 changes: 1 addition & 2 deletions examples/break/break-asm-json-importer.json
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

{".code":[{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"202"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"2"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"101"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"1"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"1"},{"begin":-1,"end":-1,"name":"JUMP","source":-1},{"begin":-1,"end":-1,"name":"tag","source":-1,"value":"1"},{"begin":-1,"end":-1,"name":"JUMPDEST","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"3"},{"begin":-1,"end":-1,"name":"SLOAD","source":-1},{"begin":-1,"end":-1,"name":"ISZERO","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"2"},{"begin":-1,"end":-1,"name":"JUMPI","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"505"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"5"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"6"},{"begin":-1,"end":-1,"name":"SLOAD","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"3"},{"begin":-1,"end":-1,"name":"JUMPI","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"808"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"8"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"9"},{"begin":-1,"end":-1,"name":"SLOAD","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"5"},{"begin":-1,"end":-1,"name":"JUMPI","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"B0B"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"B"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"6"},{"begin":-1,"end":-1,"name":"JUMP","source":-1},{"begin":-1,"end":-1,"name":"tag","source":-1,"value":"6"},{"begin":-1,"end":-1,"name":"JUMPDEST","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"404"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"4"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"1"},{"begin":-1,"end":-1,"name":"JUMP","source":-1},{"begin":-1,"end":-1,"name":"tag","source":-1,"value":"5"},{"begin":-1,"end":-1,"name":"JUMPDEST","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"A0A"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"A"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"6"},{"begin":-1,"end":-1,"name":"JUMP","source":-1},{"begin":-1,"end":-1,"name":"tag","source":-1,"value":"3"},{"begin":-1,"end":-1,"name":"JUMPDEST","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"707"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"7"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"4"},{"begin":-1,"end":-1,"name":"JUMP","source":-1},{"begin":-1,"end":-1,"name":"tag","source":-1,"value":"4"},{"begin":-1,"end":-1,"name":"JUMPDEST","source":-1},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"C0C"},{"begin":-1,"end":-1,"name":"PUSH","source":-1,"value":"C"},{"begin":-1,"end":-1,"name":"SSTORE","source":-1},{"begin":-1,"end":-1,"name":"STOP","source":-1},{"begin":-1,"end":-1,"name":"tag","source":-1,"value":"2"},{"begin":-1,"end":-1,"name":"JUMPDEST","source":-1},{"begin":-1,"end":-1,"name":"PUSH [tag]","source":-1,"value":"4"},{"begin":-1,"end":-1,"name":"JUMP","source":-1}],"sourceList":["examples/break/break.cfg"]}
Error: Option --optimize is not supported with --import-asm-json.
2 changes: 2 additions & 0 deletions examples/break/break-asm-solc.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@


{
".code": [
{
Expand Down
4 changes: 4 additions & 0 deletions examples/break/break.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@

======= prueba/break/break.yul (EVM) =======
Yul Control Flow Graph:

{
"object": {
"blocks": [
Expand Down
34 changes: 34 additions & 0 deletions examples/break/break_standard_input.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"language": "Yul",
"sources": {
"break.yul": {
"content": "{\n sstore(0x01, 0x0101)\n for { sstore(0x02, 0x0202) } sload(0x03) { sstore(0x04, 0x0404) } {\n sstore(0x05, 0x0505)\n if sload(0x06) { sstore(0x07,0x0707) break }\n sstore(0x08, 0x0808)\n if sload(0x09) { sstore(0x0A,0x0A0A) continue }\n sstore(0x0B, 0x0B0B)\n }\n sstore(0x0C, 0x0C0C)\n}\n// ----\n// digraph CFG {\n// nodesep=0.7;\n// node[shape=box];\n//\n// Entry [label=\"Entry\"];\n// Entry -> Block0;\n// Block0 [label=\"\\\n// sstore: [ 0x0101 0x01 ] => [ ]\\l\\\n// sstore: [ 0x0202 0x02 ] => [ ]\\l\\\n// \"];\n// Block0 -> Block0Exit [arrowhead=none];\n// Block0Exit [label=\"Jump\" shape=oval];\n// Block0Exit -> Block1;\n//\n// Block1 [label=\"\\\n// sload: [ 0x03 ] => [ TMP[sload, 0] ]\\l\\\n// \"];\n// Block1 -> Block1Exit;\n// Block1Exit [label=\"{ TMP[sload, 0]| { <0> Zero | <1> NonZero }}\" shape=Mrecord];\n// Block1Exit:0 -> Block2;\n// Block1Exit:1 -> Block3;\n//\n// Block2 [label=\"\\\n// sstore: [ 0x0c0c 0x0c ] => [ ]\\l\\\n// \"];\n// Block2Exit [label=\"MainExit\"];\n// Block2 -> Block2Exit;\n//\n// Block3 [label=\"\\\n// sstore: [ 0x0505 0x05 ] => [ ]\\l\\\n// sload: [ 0x06 ] => [ TMP[sload, 0] ]\\l\\\n// \"];\n// Block3 -> Block3Exit;\n// Block3Exit [label=\"{ TMP[sload, 0]| { <0> Zero | <1> NonZero }}\" shape=Mrecord];\n// Block3Exit:0 -> Block4;\n// Block3Exit:1 -> Block5;\n//\n// Block4 [label=\"\\\n// sstore: [ 0x0808 0x08 ] => [ ]\\l\\\n// sload: [ 0x09 ] => [ TMP[sload, 0] ]\\l\\\n// \"];\n// Block4 -> Block4Exit;\n// Block4Exit [label=\"{ TMP[sload, 0]| { <0> Zero | <1> NonZero }}\" shape=Mrecord];\n// Block4Exit:0 -> Block6;\n// Block4Exit:1 -> Block7;\n//\n// Block5 [label=\"\\\n// sstore: [ 0x0707 0x07 ] => [ ]\\l\\\n// \"];\n// Block5 -> Block5Exit [arrowhead=none];\n// Block5Exit [label=\"Jump\" shape=oval];\n// Block5Exit -> Block2;\n//\n// Block6 [label=\"\\\n// sstore: [ 0x0b0b 0x0b ] => [ ]\\l\\\n// \"];\n// Block6 -> Block6Exit [arrowhead=none];\n// Block6Exit [label=\"Jump\" shape=oval];\n// Block6Exit -> Block8;\n//\n// Block7 [label=\"\\\n// sstore: [ 0x0a0a 0x0a ] => [ ]\\l\\\n// \"];\n// Block7 -> Block7Exit [arrowhead=none];\n// Block7Exit [label=\"Jump\" shape=oval];\n// Block7Exit -> Block8;\n//\n// Block8 [label=\"\\\n// sstore: [ 0x0404 0x04 ] => [ ]\\l\\\n// \"];\n// Block8 -> Block8Exit [arrowhead=none];\n// Block8Exit [label=\"BackwardsJump\" shape=oval];\n// Block8Exit -> Block1;\n//\n// }\n"
}
},
"settings": {
"optimizer": {
"enabled": true,
"runs": 200,
"details": {
"peephole": false,
"inliner": false,
"jumpdestRemover": false,
"orderLiterals": false,
"deduplicate": false,
"cse": false,
"constantOptimizer": false
}
},
"outputSelection": {
"*": {
"*": [
"abi",
"metadata",
"evm.bytecode",
"evm.deployedBytecode",
"evm.methodIdentifiers"
]
}
}
}
}
2 changes: 2 additions & 0 deletions examples/break/notes.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Key, SOLC GAS, SOLC BYTES, SOLC NUM INS, GREEDY GAS, GREEDY BYTES, GREEDY NUM INS, DIFF GAS, DIFF BYTES, DIFF NUM INS
code,51444,104,59,51477,113,65,-33,-9,-6
Loading

0 comments on commit a2dd061

Please sign in to comment.