From a6685c0292717685a46a3f3bab9d71a797899cfc Mon Sep 17 00:00:00 2001 From: James Wenzel Date: Wed, 2 Jul 2025 11:30:22 -0700 Subject: [PATCH] add delete-emit-mutation --- benchmarks/MultipleContracts/C.sol | 5 +- .../AssignmentMutation.sol_json.ast | 519 +---- .../AssignmentMutation.sol_json.ast.json | 519 +---- .../input_json/BinaryOpMutation.sol_json.ast | 1184 +--------- .../BinaryOpMutation.sol_json.ast.json | 1184 +--------- .../DeleteExpressionMutation.sol_json.ast | 441 +--- ...DeleteExpressionMutation.sol_json.ast.json | 441 +--- .../ElimDelegateMutation.sol_json.ast | 998 +-------- .../ElimDelegateMutation.sol_json.ast.json | 998 +-------- .../FunctionCallMutation.sol_json.ast | 459 +--- .../FunctionCallMutation.sol_json.ast.json | 459 +--- .../IfStatementMutation.sol_json.ast | 249 +-- .../IfStatementMutation.sol_json.ast.json | 249 +-- .../input_json/RequireMutation.sol_json.ast | 440 +--- .../RequireMutation.sol_json.ast.json | 440 +--- ...SwapArgumentsFunctionMutation.sol_json.ast | 459 +--- ...rgumentsFunctionMutation.sol_json.ast.json | 459 +--- ...SwapArgumentsOperatorMutation.sol_json.ast | 1932 +---------------- ...rgumentsOperatorMutation.sol_json.ast.json | 1932 +---------------- .../UnaryOperatorMutation.sol_json.ast | 795 +------ .../UnaryOperatorMutation.sol_json.ast.json | 795 +------ .../gambit_results.json | 14 +- .../input_json/C.sol_json.ast | 1829 +--------------- .../input_json/C.sol_json.ast.json | 1829 +--------------- .../multiple-contracts-1.gconf/mutants.log | 14 +- .../mutants/1/MultipleContracts/C.sol | 5 +- .../mutants/2/MultipleContracts/C.sol | 5 +- .../mutants/3/MultipleContracts/C.sol | 5 +- .../mutants/4/MultipleContracts/C.sol | 5 +- .../mutants/5/MultipleContracts/C.sol | 5 +- .../mutants/6/MultipleContracts/C.sol | 5 +- .../mutants/7/MultipleContracts/C.sol | 5 +- .../mutants/8/MultipleContracts/C.sol | 5 +- .../gambit_results.json | 12 +- .../input_json/C.sol_json.ast | 1829 +--------------- .../input_json/C.sol_json.ast.json | 1829 +--------------- .../multiple-contracts-2.gconf/mutants.log | 12 +- .../mutants/1/MultipleContracts/C.sol | 5 +- .../mutants/10/MultipleContracts/C.sol | 5 +- .../mutants/2/MultipleContracts/C.sol | 5 +- .../mutants/3/MultipleContracts/C.sol | 5 +- .../mutants/4/MultipleContracts/C.sol | 5 +- .../mutants/5/MultipleContracts/C.sol | 5 +- .../mutants/6/MultipleContracts/C.sol | 5 +- .../mutants/7/MultipleContracts/C.sol | 5 +- .../mutants/8/MultipleContracts/C.sol | 5 +- .../mutants/9/MultipleContracts/C.sol | 5 +- .../gambit_results.json | 35 +- .../input_json/C.sol_json.ast | 1829 +--------------- .../input_json/C.sol_json.ast.json | 1829 +--------------- .../multiple-contracts-3.gconf/mutants.log | 27 +- .../mutants/1/MultipleContracts/C.sol | 5 +- .../mutants/10/MultipleContracts/C.sol | 5 +- .../mutants/11/MultipleContracts/C.sol | 5 +- .../mutants/12/MultipleContracts/C.sol | 5 +- .../mutants/13/MultipleContracts/C.sol | 5 +- .../mutants/14/MultipleContracts/C.sol | 5 +- .../mutants/15/MultipleContracts/C.sol | 9 +- .../mutants/16/MultipleContracts/C.sol | 9 +- .../mutants/17/MultipleContracts/C.sol | 9 +- .../mutants/18/MultipleContracts/C.sol | 9 +- .../mutants/19/MultipleContracts/C.sol | 44 + .../mutants/2/MultipleContracts/C.sol | 5 +- .../mutants/3/MultipleContracts/C.sol | 5 +- .../mutants/4/MultipleContracts/C.sol | 5 +- .../mutants/5/MultipleContracts/C.sol | 5 +- .../mutants/6/MultipleContracts/C.sol | 5 +- .../mutants/7/MultipleContracts/C.sol | 5 +- .../mutants/8/MultipleContracts/C.sol | 5 +- .../mutants/9/MultipleContracts/C.sol | 5 +- .../gambit_results.json | 8 +- .../input_json/C.sol_json.ast | 1829 +--------------- .../input_json/C.sol_json.ast.json | 1829 +--------------- .../multiple-contracts-4.gconf/mutants.log | 8 +- .../mutants/1/MultipleContracts/C.sol | 5 +- .../mutants/2/MultipleContracts/C.sol | 5 +- .../mutants/3/MultipleContracts/C.sol | 5 +- .../mutants/4/MultipleContracts/C.sol | 5 +- .../mutants/5/MultipleContracts/C.sol | 5 +- .../mutants/6/MultipleContracts/C.sol | 5 +- .../mutants/7/MultipleContracts/C.sol | 5 +- .../mutants/8/MultipleContracts/C.sol | 5 +- .../input_json/BinaryOpMutation.sol_json.ast | 1184 +--------- .../BinaryOpMutation.sol_json.ast.json | 1184 +--------- .../input_json/TenPower.sol_json.ast | 335 +-- .../input_json/TenPower.sol_json.ast.json | 335 +-- .../input_json/TenPower.sol_json.ast | 335 +-- .../input_json/TenPower.sol_json.ast.json | 335 +-- .../test3.gconf/input_json/C.sol_json.ast | 1829 +--------------- .../input_json/C.sol_json.ast.json | 1829 +--------------- .../input_json/TenPower.sol_json.ast | 335 +-- .../input_json/TenPower.sol_json.ast.json | 335 +-- .../test4.gconf/input_json/C.sol_json.ast | 1829 +--------------- .../input_json/C.sol_json.ast.json | 1829 +--------------- .../input_json/TenPower.sol_json.ast | 335 +-- .../input_json/TenPower.sol_json.ast.json | 335 +-- .../test5.gconf/input_json/C.sol_json.ast | 1829 +--------------- .../input_json/C.sol_json.ast.json | 1829 +--------------- .../input_json/TenPower.sol_json.ast | 335 +-- .../input_json/TenPower.sol_json.ast.json | 335 +-- .../mutants/10/MultipleContracts/C.sol | 5 +- .../mutants/11/MultipleContracts/C.sol | 5 +- .../mutants/7/MultipleContracts/C.sol | 5 +- .../mutants/8/MultipleContracts/C.sol | 5 +- .../mutants/9/MultipleContracts/C.sol | 5 +- src/mutation.rs | 32 + src/test_util.rs | 1 + tests/integration_tests.rs | 66 +- 108 files changed, 436 insertions(+), 46379 deletions(-) create mode 100644 resources/regressions/multiple-contracts-3.gconf/mutants/19/MultipleContracts/C.sol diff --git a/benchmarks/MultipleContracts/C.sol b/benchmarks/MultipleContracts/C.sol index 23a12eb1..68737897 100644 --- a/benchmarks/MultipleContracts/C.sol +++ b/benchmarks/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -29,9 +31,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/all.gconf/input_json/AssignmentMutation.sol_json.ast b/resources/regressions/all.gconf/input_json/AssignmentMutation.sol_json.ast index 26ee0b68..ae273fcc 100644 --- a/resources/regressions/all.gconf/input_json/AssignmentMutation.sol_json.ast +++ b/resources/regressions/all.gconf/input_json/AssignmentMutation.sol_json.ast @@ -1,518 +1 @@ -{ - "absolutePath": "benchmarks/AssignmentMutation/AssignmentMutation.sol", - "exportedSymbols": - { - "AssignmentMutation": - [ - 37 - ] - }, - "id": 38, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "AssignmentMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 37, - "linearizedBaseContracts": - [ - 37 - ], - "name": "AssignmentMutation", - "nameLocation": "109:18:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "0c55699c", - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "149:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "134:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "134:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "a56dfe4a", - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "156:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "156:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "c5d7802e", - "id": 8, - "mutability": "mutable", - "name": "z", - "nameLocation": "193:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "178:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 7, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "178:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "0dbe671f", - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "212:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "200:13:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 9, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "200:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "4df7e3d0", - "id": 12, - "mutability": "mutable", - "name": "b", - "nameLocation": "231:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "219:13:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 11, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "219:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 35, - "nodeType": "Block", - "src": "253:146:0", - "statements": - [ - { - "expression": - { - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 15, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "256:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "3432", - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "260:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_42_by_1", - "typeString": "int_const 42" - }, - "value": "42" - }, - "src": "256:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18, - "nodeType": "ExpressionStatement", - "src": "256:6:0" - }, - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 19, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "281:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "3133", - "id": 20, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "285:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_13_by_1", - "typeString": "int_const 13" - }, - "value": "13" - }, - "src": "281:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 22, - "nodeType": "ExpressionStatement", - "src": "281:6:0" - }, - { - "expression": - { - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 23, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "306:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "33313130", - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "310:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_3110_by_1", - "typeString": "int_const 3110" - }, - "value": "3110" - }, - "src": "306:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 26, - "nodeType": "ExpressionStatement", - "src": "306:8:0" - }, - { - "expression": - { - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "335:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "74727565", - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "339:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "335:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 30, - "nodeType": "ExpressionStatement", - "src": "335:8:0" - }, - { - "expression": - { - "id": 33, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 31, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "364:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "66616c7365", - "id": 32, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "368:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "364:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 34, - "nodeType": "ExpressionStatement", - "src": "364:9:0" - } - ] - }, - "id": 36, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 13, - "nodeType": "ParameterList", - "parameters": [], - "src": "250:2:0" - }, - "returnParameters": - { - "id": 14, - "nodeType": "ParameterList", - "parameters": [], - "src": "253:0:0" - }, - "scope": 37, - "src": "239:160:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 38, - "src": "100:301:0", - "usedErrors": [] - } - ], - "src": "41:361:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/AssignmentMutation/AssignmentMutation.sol","exportedSymbols":{"AssignmentMutation":[37]},"id":38,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"AssignmentMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":37,"linearizedBaseContracts":[37],"name":"AssignmentMutation","nameLocation":"109:18:0","nodeType":"ContractDefinition","nodes":[{"constant":false,"functionSelector":"0c55699c","id":4,"mutability":"mutable","name":"x","nameLocation":"149:1:0","nodeType":"VariableDeclaration","scope":37,"src":"134:16:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"134:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"a56dfe4a","id":6,"mutability":"mutable","name":"y","nameLocation":"171:1:0","nodeType":"VariableDeclaration","scope":37,"src":"156:16:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"156:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"c5d7802e","id":8,"mutability":"mutable","name":"z","nameLocation":"193:1:0","nodeType":"VariableDeclaration","scope":37,"src":"178:16:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7,"name":"uint256","nodeType":"ElementaryTypeName","src":"178:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"0dbe671f","id":10,"mutability":"mutable","name":"a","nameLocation":"212:1:0","nodeType":"VariableDeclaration","scope":37,"src":"200:13:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":9,"name":"bool","nodeType":"ElementaryTypeName","src":"200:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"public"},{"constant":false,"functionSelector":"4df7e3d0","id":12,"mutability":"mutable","name":"b","nameLocation":"231:1:0","nodeType":"VariableDeclaration","scope":37,"src":"219:13:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":11,"name":"bool","nodeType":"ElementaryTypeName","src":"219:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"public"},{"body":{"id":35,"nodeType":"Block","src":"253:146:0","statements":[{"expression":{"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":15,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"256:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"hexValue":"3432","id":16,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"260:2:0","typeDescriptions":{"typeIdentifier":"t_rational_42_by_1","typeString":"int_const 42"},"value":"42"},"src":"256:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":18,"nodeType":"ExpressionStatement","src":"256:6:0"},{"expression":{"id":21,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":19,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"281:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"hexValue":"3133","id":20,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"285:2:0","typeDescriptions":{"typeIdentifier":"t_rational_13_by_1","typeString":"int_const 13"},"value":"13"},"src":"281:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":22,"nodeType":"ExpressionStatement","src":"281:6:0"},{"expression":{"id":25,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":23,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":8,"src":"306:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"hexValue":"33313130","id":24,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"310:4:0","typeDescriptions":{"typeIdentifier":"t_rational_3110_by_1","typeString":"int_const 3110"},"value":"3110"},"src":"306:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":26,"nodeType":"ExpressionStatement","src":"306:8:0"},{"expression":{"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"335:1:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"hexValue":"74727565","id":28,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"339:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"335:8:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":30,"nodeType":"ExpressionStatement","src":"335:8:0"},{"expression":{"id":33,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":31,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":12,"src":"364:1:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"hexValue":"66616c7365","id":32,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"368:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"false"},"src":"364:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":34,"nodeType":"ExpressionStatement","src":"364:9:0"}]},"id":36,"implemented":true,"kind":"constructor","modifiers":[],"name":"","nameLocation":"-1:-1:-1","nodeType":"FunctionDefinition","parameters":{"id":13,"nodeType":"ParameterList","parameters":[],"src":"250:2:0"},"returnParameters":{"id":14,"nodeType":"ParameterList","parameters":[],"src":"253:0:0"},"scope":37,"src":"239:160:0","stateMutability":"nonpayable","virtual":false,"visibility":"public"}],"scope":38,"src":"100:301:0","usedErrors":[],"usedEvents":[]}],"src":"41:361:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/AssignmentMutation.sol_json.ast.json b/resources/regressions/all.gconf/input_json/AssignmentMutation.sol_json.ast.json index 26ee0b68..ae273fcc 100644 --- a/resources/regressions/all.gconf/input_json/AssignmentMutation.sol_json.ast.json +++ b/resources/regressions/all.gconf/input_json/AssignmentMutation.sol_json.ast.json @@ -1,518 +1 @@ -{ - "absolutePath": "benchmarks/AssignmentMutation/AssignmentMutation.sol", - "exportedSymbols": - { - "AssignmentMutation": - [ - 37 - ] - }, - "id": 38, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "AssignmentMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 37, - "linearizedBaseContracts": - [ - 37 - ], - "name": "AssignmentMutation", - "nameLocation": "109:18:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "0c55699c", - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "149:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "134:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "134:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "a56dfe4a", - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "156:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "156:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "c5d7802e", - "id": 8, - "mutability": "mutable", - "name": "z", - "nameLocation": "193:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "178:16:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 7, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "178:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "0dbe671f", - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "212:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "200:13:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 9, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "200:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "4df7e3d0", - "id": 12, - "mutability": "mutable", - "name": "b", - "nameLocation": "231:1:0", - "nodeType": "VariableDeclaration", - "scope": 37, - "src": "219:13:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 11, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "219:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 35, - "nodeType": "Block", - "src": "253:146:0", - "statements": - [ - { - "expression": - { - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 15, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "256:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "3432", - "id": 16, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "260:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_42_by_1", - "typeString": "int_const 42" - }, - "value": "42" - }, - "src": "256:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 18, - "nodeType": "ExpressionStatement", - "src": "256:6:0" - }, - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 19, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "281:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "3133", - "id": 20, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "285:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_13_by_1", - "typeString": "int_const 13" - }, - "value": "13" - }, - "src": "281:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 22, - "nodeType": "ExpressionStatement", - "src": "281:6:0" - }, - { - "expression": - { - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 23, - "name": "z", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "306:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "33313130", - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "310:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_3110_by_1", - "typeString": "int_const 3110" - }, - "value": "3110" - }, - "src": "306:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 26, - "nodeType": "ExpressionStatement", - "src": "306:8:0" - }, - { - "expression": - { - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "335:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "74727565", - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "339:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "src": "335:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 30, - "nodeType": "ExpressionStatement", - "src": "335:8:0" - }, - { - "expression": - { - "id": 33, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 31, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 12, - "src": "364:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "hexValue": "66616c7365", - "id": 32, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "368:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "src": "364:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 34, - "nodeType": "ExpressionStatement", - "src": "364:9:0" - } - ] - }, - "id": 36, - "implemented": true, - "kind": "constructor", - "modifiers": [], - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 13, - "nodeType": "ParameterList", - "parameters": [], - "src": "250:2:0" - }, - "returnParameters": - { - "id": 14, - "nodeType": "ParameterList", - "parameters": [], - "src": "253:0:0" - }, - "scope": 37, - "src": "239:160:0", - "stateMutability": "nonpayable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 38, - "src": "100:301:0", - "usedErrors": [] - } - ], - "src": "41:361:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/AssignmentMutation/AssignmentMutation.sol","exportedSymbols":{"AssignmentMutation":[37]},"id":38,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"AssignmentMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":37,"linearizedBaseContracts":[37],"name":"AssignmentMutation","nameLocation":"109:18:0","nodeType":"ContractDefinition","nodes":[{"constant":false,"functionSelector":"0c55699c","id":4,"mutability":"mutable","name":"x","nameLocation":"149:1:0","nodeType":"VariableDeclaration","scope":37,"src":"134:16:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"134:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"a56dfe4a","id":6,"mutability":"mutable","name":"y","nameLocation":"171:1:0","nodeType":"VariableDeclaration","scope":37,"src":"156:16:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"156:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"c5d7802e","id":8,"mutability":"mutable","name":"z","nameLocation":"193:1:0","nodeType":"VariableDeclaration","scope":37,"src":"178:16:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":7,"name":"uint256","nodeType":"ElementaryTypeName","src":"178:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"0dbe671f","id":10,"mutability":"mutable","name":"a","nameLocation":"212:1:0","nodeType":"VariableDeclaration","scope":37,"src":"200:13:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":9,"name":"bool","nodeType":"ElementaryTypeName","src":"200:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"public"},{"constant":false,"functionSelector":"4df7e3d0","id":12,"mutability":"mutable","name":"b","nameLocation":"231:1:0","nodeType":"VariableDeclaration","scope":37,"src":"219:13:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":11,"name":"bool","nodeType":"ElementaryTypeName","src":"219:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"public"},{"body":{"id":35,"nodeType":"Block","src":"253:146:0","statements":[{"expression":{"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":15,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"256:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"hexValue":"3432","id":16,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"260:2:0","typeDescriptions":{"typeIdentifier":"t_rational_42_by_1","typeString":"int_const 42"},"value":"42"},"src":"256:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":18,"nodeType":"ExpressionStatement","src":"256:6:0"},{"expression":{"id":21,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":19,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"281:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"hexValue":"3133","id":20,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"285:2:0","typeDescriptions":{"typeIdentifier":"t_rational_13_by_1","typeString":"int_const 13"},"value":"13"},"src":"281:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":22,"nodeType":"ExpressionStatement","src":"281:6:0"},{"expression":{"id":25,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":23,"name":"z","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":8,"src":"306:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"hexValue":"33313130","id":24,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"310:4:0","typeDescriptions":{"typeIdentifier":"t_rational_3110_by_1","typeString":"int_const 3110"},"value":"3110"},"src":"306:8:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":26,"nodeType":"ExpressionStatement","src":"306:8:0"},{"expression":{"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"335:1:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"hexValue":"74727565","id":28,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"339:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"src":"335:8:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":30,"nodeType":"ExpressionStatement","src":"335:8:0"},{"expression":{"id":33,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":31,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":12,"src":"364:1:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"hexValue":"66616c7365","id":32,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"368:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"false"},"src":"364:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":34,"nodeType":"ExpressionStatement","src":"364:9:0"}]},"id":36,"implemented":true,"kind":"constructor","modifiers":[],"name":"","nameLocation":"-1:-1:-1","nodeType":"FunctionDefinition","parameters":{"id":13,"nodeType":"ParameterList","parameters":[],"src":"250:2:0"},"returnParameters":{"id":14,"nodeType":"ParameterList","parameters":[],"src":"253:0:0"},"scope":37,"src":"239:160:0","stateMutability":"nonpayable","virtual":false,"visibility":"public"}],"scope":38,"src":"100:301:0","usedErrors":[],"usedEvents":[]}],"src":"41:361:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/BinaryOpMutation.sol_json.ast b/resources/regressions/all.gconf/input_json/BinaryOpMutation.sol_json.ast index b02050bb..1ac3f74f 100644 --- a/resources/regressions/all.gconf/input_json/BinaryOpMutation.sol_json.ast +++ b/resources/regressions/all.gconf/input_json/BinaryOpMutation.sol_json.ast @@ -1,1183 +1 @@ -{ - "absolutePath": "benchmarks/BinaryOpMutation/BinaryOpMutation.sol", - "exportedSymbols": - { - "BinaryOpMutation": - [ - 87 - ] - }, - "id": 88, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "BinaryOpMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 87, - "linearizedBaseContracts": - [ - 87 - ], - "name": "BinaryOpMutation", - "nameLocation": "109:16:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "204:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "214:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "214:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "207:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "141:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "160:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "152:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "152:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "163:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "163:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "151:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "195:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "195:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "194:9:0" - }, - "scope": 87, - "src": "132:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "307:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "317:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "317:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "310:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "241:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "263:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "255:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "255:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "274:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "266:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "266:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "254:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "298:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "298:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "297:9:0" - }, - "scope": 87, - "src": "232:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "413:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "423:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "427:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "423:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "416:12:0" - } - ] - }, - "functionSelector": "6831fd12", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myMultiplication", - "nameLocation": "344:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "369:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "361:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "361:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "372:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "372:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "360:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "404:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "404:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "403:9:0" - }, - "scope": 87, - "src": "335:100:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "513:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "523:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "527:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "523:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "516:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "450:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "469:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "461:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "461:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "480:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "472:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "472:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "460:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "504:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "504:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "503:9:0" - }, - "scope": 87, - "src": "441:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "611:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "621:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "625:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "621:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "614:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "550:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "567:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "559:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "559:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "578:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "570:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "570:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "558:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "602:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "602:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "601:9:0" - }, - "scope": 87, - "src": "541:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "717:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "727:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "732:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "727:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "720:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "648:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "673:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "665:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "665:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "684:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "676:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "676:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "664:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "708:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 78, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "708:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "707:9:0" - }, - "scope": 87, - "src": "639:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 88, - "src": "100:643:0", - "usedErrors": [] - } - ], - "src": "41:703:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/BinaryOpMutation/BinaryOpMutation.sol","exportedSymbols":{"BinaryOpMutation":[87]},"id":88,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"BinaryOpMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":87,"linearizedBaseContracts":[87],"name":"BinaryOpMutation","nameLocation":"109:16:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":15,"nodeType":"Block","src":"204:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":13,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":11,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"214:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":12,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"218:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"214:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":10,"id":14,"nodeType":"Return","src":"207:12:0"}]},"functionSelector":"04b53fe4","id":16,"implemented":true,"kind":"function","modifiers":[],"name":"myAddition","nameLocation":"141:10:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"160:1:0","nodeType":"VariableDeclaration","scope":16,"src":"152:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"152:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"y","nameLocation":"171:1:0","nodeType":"VariableDeclaration","scope":16,"src":"163:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"163:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"151:22:0"},"returnParameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":16,"src":"195:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint256","nodeType":"ElementaryTypeName","src":"195:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"194:9:0"},"scope":87,"src":"132:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":29,"nodeType":"Block","src":"307:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":27,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":25,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"317:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"id":26,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"321:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"317:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":24,"id":28,"nodeType":"Return","src":"310:12:0"}]},"functionSelector":"b3d09aaa","id":30,"implemented":true,"kind":"function","modifiers":[],"name":"mySubtraction","nameLocation":"241:13:0","nodeType":"FunctionDefinition","parameters":{"id":21,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"x","nameLocation":"263:1:0","nodeType":"VariableDeclaration","scope":30,"src":"255:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"255:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":20,"mutability":"mutable","name":"y","nameLocation":"274:1:0","nodeType":"VariableDeclaration","scope":30,"src":"266:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":19,"name":"uint256","nodeType":"ElementaryTypeName","src":"266:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"254:22:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[{"constant":false,"id":23,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":30,"src":"298:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":22,"name":"uint256","nodeType":"ElementaryTypeName","src":"298:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"297:9:0"},"scope":87,"src":"232:97:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":43,"nodeType":"Block","src":"413:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":41,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":39,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":32,"src":"423:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"id":40,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":34,"src":"427:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"423:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":38,"id":42,"nodeType":"Return","src":"416:12:0"}]},"functionSelector":"6831fd12","id":44,"implemented":true,"kind":"function","modifiers":[],"name":"myMultiplication","nameLocation":"344:16:0","nodeType":"FunctionDefinition","parameters":{"id":35,"nodeType":"ParameterList","parameters":[{"constant":false,"id":32,"mutability":"mutable","name":"x","nameLocation":"369:1:0","nodeType":"VariableDeclaration","scope":44,"src":"361:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":31,"name":"uint256","nodeType":"ElementaryTypeName","src":"361:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":34,"mutability":"mutable","name":"y","nameLocation":"380:1:0","nodeType":"VariableDeclaration","scope":44,"src":"372:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":33,"name":"uint256","nodeType":"ElementaryTypeName","src":"372:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"360:22:0"},"returnParameters":{"id":38,"nodeType":"ParameterList","parameters":[{"constant":false,"id":37,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":44,"src":"404:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":36,"name":"uint256","nodeType":"ElementaryTypeName","src":"404:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"403:9:0"},"scope":87,"src":"335:100:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":57,"nodeType":"Block","src":"513:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":53,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":46,"src":"523:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"id":54,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":48,"src":"527:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"523:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":52,"id":56,"nodeType":"Return","src":"516:12:0"}]},"functionSelector":"9d4f4e60","id":58,"implemented":true,"kind":"function","modifiers":[],"name":"myDivision","nameLocation":"450:10:0","nodeType":"FunctionDefinition","parameters":{"id":49,"nodeType":"ParameterList","parameters":[{"constant":false,"id":46,"mutability":"mutable","name":"x","nameLocation":"469:1:0","nodeType":"VariableDeclaration","scope":58,"src":"461:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":45,"name":"uint256","nodeType":"ElementaryTypeName","src":"461:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":48,"mutability":"mutable","name":"y","nameLocation":"480:1:0","nodeType":"VariableDeclaration","scope":58,"src":"472:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":47,"name":"uint256","nodeType":"ElementaryTypeName","src":"472:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"460:22:0"},"returnParameters":{"id":52,"nodeType":"ParameterList","parameters":[{"constant":false,"id":51,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":58,"src":"504:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":50,"name":"uint256","nodeType":"ElementaryTypeName","src":"504:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"503:9:0"},"scope":87,"src":"441:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":71,"nodeType":"Block","src":"611:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":69,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":67,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"621:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"id":68,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":62,"src":"625:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"621:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":66,"id":70,"nodeType":"Return","src":"614:12:0"}]},"functionSelector":"dc6092a8","id":72,"implemented":true,"kind":"function","modifiers":[],"name":"myModulo","nameLocation":"550:8:0","nodeType":"FunctionDefinition","parameters":{"id":63,"nodeType":"ParameterList","parameters":[{"constant":false,"id":60,"mutability":"mutable","name":"x","nameLocation":"567:1:0","nodeType":"VariableDeclaration","scope":72,"src":"559:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":59,"name":"uint256","nodeType":"ElementaryTypeName","src":"559:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":62,"mutability":"mutable","name":"y","nameLocation":"578:1:0","nodeType":"VariableDeclaration","scope":72,"src":"570:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":61,"name":"uint256","nodeType":"ElementaryTypeName","src":"570:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"558:22:0"},"returnParameters":{"id":66,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":72,"src":"602:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64,"name":"uint256","nodeType":"ElementaryTypeName","src":"602:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"601:9:0"},"scope":87,"src":"541:92:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":85,"nodeType":"Block","src":"717:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":83,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":81,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":82,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":76,"src":"732:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"727:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":80,"id":84,"nodeType":"Return","src":"720:13:0"}]},"functionSelector":"df159c7b","id":86,"implemented":true,"kind":"function","modifiers":[],"name":"myExponentiation","nameLocation":"648:16:0","nodeType":"FunctionDefinition","parameters":{"id":77,"nodeType":"ParameterList","parameters":[{"constant":false,"id":74,"mutability":"mutable","name":"x","nameLocation":"673:1:0","nodeType":"VariableDeclaration","scope":86,"src":"665:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"665:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":76,"mutability":"mutable","name":"y","nameLocation":"684:1:0","nodeType":"VariableDeclaration","scope":86,"src":"676:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":75,"name":"uint256","nodeType":"ElementaryTypeName","src":"676:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"664:22:0"},"returnParameters":{"id":80,"nodeType":"ParameterList","parameters":[{"constant":false,"id":79,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":86,"src":"708:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":78,"name":"uint256","nodeType":"ElementaryTypeName","src":"708:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"707:9:0"},"scope":87,"src":"639:101:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":88,"src":"100:643:0","usedErrors":[],"usedEvents":[]}],"src":"41:703:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/BinaryOpMutation.sol_json.ast.json b/resources/regressions/all.gconf/input_json/BinaryOpMutation.sol_json.ast.json index b02050bb..1ac3f74f 100644 --- a/resources/regressions/all.gconf/input_json/BinaryOpMutation.sol_json.ast.json +++ b/resources/regressions/all.gconf/input_json/BinaryOpMutation.sol_json.ast.json @@ -1,1183 +1 @@ -{ - "absolutePath": "benchmarks/BinaryOpMutation/BinaryOpMutation.sol", - "exportedSymbols": - { - "BinaryOpMutation": - [ - 87 - ] - }, - "id": 88, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "BinaryOpMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 87, - "linearizedBaseContracts": - [ - 87 - ], - "name": "BinaryOpMutation", - "nameLocation": "109:16:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "204:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "214:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "214:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "207:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "141:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "160:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "152:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "152:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "163:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "163:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "151:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "195:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "195:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "194:9:0" - }, - "scope": 87, - "src": "132:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "307:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "317:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "317:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "310:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "241:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "263:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "255:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "255:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "274:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "266:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "266:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "254:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "298:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "298:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "297:9:0" - }, - "scope": 87, - "src": "232:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "413:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "423:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "427:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "423:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "416:12:0" - } - ] - }, - "functionSelector": "6831fd12", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myMultiplication", - "nameLocation": "344:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "369:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "361:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "361:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "372:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "372:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "360:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "404:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "404:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "403:9:0" - }, - "scope": 87, - "src": "335:100:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "513:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "523:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "527:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "523:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "516:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "450:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "469:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "461:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "461:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "480:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "472:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "472:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "460:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "504:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "504:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "503:9:0" - }, - "scope": 87, - "src": "441:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "611:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "621:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "625:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "621:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "614:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "550:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "567:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "559:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "559:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "578:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "570:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "570:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "558:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "602:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "602:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "601:9:0" - }, - "scope": 87, - "src": "541:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "717:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "727:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "732:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "727:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "720:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "648:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "673:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "665:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "665:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "684:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "676:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "676:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "664:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "708:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 78, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "708:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "707:9:0" - }, - "scope": 87, - "src": "639:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 88, - "src": "100:643:0", - "usedErrors": [] - } - ], - "src": "41:703:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/BinaryOpMutation/BinaryOpMutation.sol","exportedSymbols":{"BinaryOpMutation":[87]},"id":88,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"BinaryOpMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":87,"linearizedBaseContracts":[87],"name":"BinaryOpMutation","nameLocation":"109:16:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":15,"nodeType":"Block","src":"204:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":13,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":11,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"214:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":12,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"218:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"214:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":10,"id":14,"nodeType":"Return","src":"207:12:0"}]},"functionSelector":"04b53fe4","id":16,"implemented":true,"kind":"function","modifiers":[],"name":"myAddition","nameLocation":"141:10:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"160:1:0","nodeType":"VariableDeclaration","scope":16,"src":"152:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"152:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"y","nameLocation":"171:1:0","nodeType":"VariableDeclaration","scope":16,"src":"163:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"163:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"151:22:0"},"returnParameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":16,"src":"195:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint256","nodeType":"ElementaryTypeName","src":"195:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"194:9:0"},"scope":87,"src":"132:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":29,"nodeType":"Block","src":"307:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":27,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":25,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"317:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"id":26,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"321:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"317:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":24,"id":28,"nodeType":"Return","src":"310:12:0"}]},"functionSelector":"b3d09aaa","id":30,"implemented":true,"kind":"function","modifiers":[],"name":"mySubtraction","nameLocation":"241:13:0","nodeType":"FunctionDefinition","parameters":{"id":21,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"x","nameLocation":"263:1:0","nodeType":"VariableDeclaration","scope":30,"src":"255:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"255:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":20,"mutability":"mutable","name":"y","nameLocation":"274:1:0","nodeType":"VariableDeclaration","scope":30,"src":"266:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":19,"name":"uint256","nodeType":"ElementaryTypeName","src":"266:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"254:22:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[{"constant":false,"id":23,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":30,"src":"298:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":22,"name":"uint256","nodeType":"ElementaryTypeName","src":"298:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"297:9:0"},"scope":87,"src":"232:97:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":43,"nodeType":"Block","src":"413:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":41,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":39,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":32,"src":"423:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"id":40,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":34,"src":"427:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"423:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":38,"id":42,"nodeType":"Return","src":"416:12:0"}]},"functionSelector":"6831fd12","id":44,"implemented":true,"kind":"function","modifiers":[],"name":"myMultiplication","nameLocation":"344:16:0","nodeType":"FunctionDefinition","parameters":{"id":35,"nodeType":"ParameterList","parameters":[{"constant":false,"id":32,"mutability":"mutable","name":"x","nameLocation":"369:1:0","nodeType":"VariableDeclaration","scope":44,"src":"361:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":31,"name":"uint256","nodeType":"ElementaryTypeName","src":"361:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":34,"mutability":"mutable","name":"y","nameLocation":"380:1:0","nodeType":"VariableDeclaration","scope":44,"src":"372:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":33,"name":"uint256","nodeType":"ElementaryTypeName","src":"372:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"360:22:0"},"returnParameters":{"id":38,"nodeType":"ParameterList","parameters":[{"constant":false,"id":37,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":44,"src":"404:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":36,"name":"uint256","nodeType":"ElementaryTypeName","src":"404:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"403:9:0"},"scope":87,"src":"335:100:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":57,"nodeType":"Block","src":"513:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":53,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":46,"src":"523:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"id":54,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":48,"src":"527:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"523:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":52,"id":56,"nodeType":"Return","src":"516:12:0"}]},"functionSelector":"9d4f4e60","id":58,"implemented":true,"kind":"function","modifiers":[],"name":"myDivision","nameLocation":"450:10:0","nodeType":"FunctionDefinition","parameters":{"id":49,"nodeType":"ParameterList","parameters":[{"constant":false,"id":46,"mutability":"mutable","name":"x","nameLocation":"469:1:0","nodeType":"VariableDeclaration","scope":58,"src":"461:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":45,"name":"uint256","nodeType":"ElementaryTypeName","src":"461:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":48,"mutability":"mutable","name":"y","nameLocation":"480:1:0","nodeType":"VariableDeclaration","scope":58,"src":"472:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":47,"name":"uint256","nodeType":"ElementaryTypeName","src":"472:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"460:22:0"},"returnParameters":{"id":52,"nodeType":"ParameterList","parameters":[{"constant":false,"id":51,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":58,"src":"504:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":50,"name":"uint256","nodeType":"ElementaryTypeName","src":"504:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"503:9:0"},"scope":87,"src":"441:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":71,"nodeType":"Block","src":"611:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":69,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":67,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"621:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"id":68,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":62,"src":"625:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"621:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":66,"id":70,"nodeType":"Return","src":"614:12:0"}]},"functionSelector":"dc6092a8","id":72,"implemented":true,"kind":"function","modifiers":[],"name":"myModulo","nameLocation":"550:8:0","nodeType":"FunctionDefinition","parameters":{"id":63,"nodeType":"ParameterList","parameters":[{"constant":false,"id":60,"mutability":"mutable","name":"x","nameLocation":"567:1:0","nodeType":"VariableDeclaration","scope":72,"src":"559:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":59,"name":"uint256","nodeType":"ElementaryTypeName","src":"559:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":62,"mutability":"mutable","name":"y","nameLocation":"578:1:0","nodeType":"VariableDeclaration","scope":72,"src":"570:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":61,"name":"uint256","nodeType":"ElementaryTypeName","src":"570:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"558:22:0"},"returnParameters":{"id":66,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":72,"src":"602:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64,"name":"uint256","nodeType":"ElementaryTypeName","src":"602:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"601:9:0"},"scope":87,"src":"541:92:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":85,"nodeType":"Block","src":"717:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":83,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":81,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":82,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":76,"src":"732:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"727:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":80,"id":84,"nodeType":"Return","src":"720:13:0"}]},"functionSelector":"df159c7b","id":86,"implemented":true,"kind":"function","modifiers":[],"name":"myExponentiation","nameLocation":"648:16:0","nodeType":"FunctionDefinition","parameters":{"id":77,"nodeType":"ParameterList","parameters":[{"constant":false,"id":74,"mutability":"mutable","name":"x","nameLocation":"673:1:0","nodeType":"VariableDeclaration","scope":86,"src":"665:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"665:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":76,"mutability":"mutable","name":"y","nameLocation":"684:1:0","nodeType":"VariableDeclaration","scope":86,"src":"676:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":75,"name":"uint256","nodeType":"ElementaryTypeName","src":"676:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"664:22:0"},"returnParameters":{"id":80,"nodeType":"ParameterList","parameters":[{"constant":false,"id":79,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":86,"src":"708:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":78,"name":"uint256","nodeType":"ElementaryTypeName","src":"708:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"707:9:0"},"scope":87,"src":"639:101:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":88,"src":"100:643:0","usedErrors":[],"usedEvents":[]}],"src":"41:703:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/DeleteExpressionMutation.sol_json.ast b/resources/regressions/all.gconf/input_json/DeleteExpressionMutation.sol_json.ast index 12301920..b8058d09 100644 --- a/resources/regressions/all.gconf/input_json/DeleteExpressionMutation.sol_json.ast +++ b/resources/regressions/all.gconf/input_json/DeleteExpressionMutation.sol_json.ast @@ -1,440 +1 @@ -{ - "absolutePath": "benchmarks/DeleteExpressionMutation/DeleteExpressionMutation.sol", - "exportedSymbols": - { - "DeleteExpressionMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "DeleteExpressionMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "DeleteExpressionMutation", - "nameLocation": "109:24:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "202:98:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "result", - "nameLocation": "213:6:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "205:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "205:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "222:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "205:18:0" - }, - { - "body": - { - "id": 26, - "nodeType": "Block", - "src": "258:20:0", - "statements": - [ - { - "expression": - { - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "265:9:0", - "subExpression": - { - "id": 23, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "265:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 25, - "nodeType": "ExpressionStatement", - "src": "265:9:0" - } - ] - }, - "condition": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 17, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": - { - "id": 18, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "250:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "246:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 27, - "initializationExpression": - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "i", - "nameLocation": "239:1:0", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "231:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "231:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 16, - "initialValue": - { - "hexValue": "30", - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "243:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "231:13:0" - }, - "loopExpression": - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "253:3:0", - "subExpression": - { - "id": 20, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "253:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 22, - "nodeType": "ExpressionStatement", - "src": "253:3:0" - }, - "nodeType": "ForStatement", - "src": "226:52:0" - }, - { - "expression": - { - "id": 28, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "287:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 29, - "nodeType": "Return", - "src": "280:13:0" - } - ] - }, - "functionSelector": "380a9a54", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myIdentity", - "nameLocation": "150:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "169:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "161:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "161:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "160:11:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "193:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "193:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "192:9:0" - }, - "scope": 32, - "src": "141:159:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:202:0", - "usedErrors": [] - } - ], - "src": "41:262:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/DeleteExpressionMutation/DeleteExpressionMutation.sol","exportedSymbols":{"DeleteExpressionMutation":[32]},"id":33,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"DeleteExpressionMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":32,"linearizedBaseContracts":[32],"name":"DeleteExpressionMutation","nameLocation":"109:24:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":30,"nodeType":"Block","src":"202:98:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"result","nameLocation":"213:6:0","nodeType":"VariableDeclaration","scope":30,"src":"205:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"205:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"222:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"205:18:0"},{"body":{"id":26,"nodeType":"Block","src":"258:20:0","statements":[{"expression":{"id":24,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"265:9:0","subExpression":{"id":23,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"265:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":25,"nodeType":"ExpressionStatement","src":"265:9:0"}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":19,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":17,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"id":18,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"250:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"246:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":27,"initializationExpression":{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"i","nameLocation":"239:1:0","nodeType":"VariableDeclaration","scope":27,"src":"231:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"231:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":16,"initialValue":{"hexValue":"30","id":15,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"243:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"231:13:0"},"isSimpleCounterLoop":true,"loopExpression":{"expression":{"id":21,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"253:3:0","subExpression":{"id":20,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"253:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":22,"nodeType":"ExpressionStatement","src":"253:3:0"},"nodeType":"ForStatement","src":"226:52:0"},{"expression":{"id":28,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"287:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":29,"nodeType":"Return","src":"280:13:0"}]},"functionSelector":"380a9a54","id":31,"implemented":true,"kind":"function","modifiers":[],"name":"myIdentity","nameLocation":"150:10:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"169:1:0","nodeType":"VariableDeclaration","scope":31,"src":"161:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"161:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"160:11:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":31,"src":"193:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"193:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"192:9:0"},"scope":32,"src":"141:159:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":33,"src":"100:202:0","usedErrors":[],"usedEvents":[]}],"src":"41:262:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/DeleteExpressionMutation.sol_json.ast.json b/resources/regressions/all.gconf/input_json/DeleteExpressionMutation.sol_json.ast.json index 12301920..b8058d09 100644 --- a/resources/regressions/all.gconf/input_json/DeleteExpressionMutation.sol_json.ast.json +++ b/resources/regressions/all.gconf/input_json/DeleteExpressionMutation.sol_json.ast.json @@ -1,440 +1 @@ -{ - "absolutePath": "benchmarks/DeleteExpressionMutation/DeleteExpressionMutation.sol", - "exportedSymbols": - { - "DeleteExpressionMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "DeleteExpressionMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "DeleteExpressionMutation", - "nameLocation": "109:24:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "202:98:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "result", - "nameLocation": "213:6:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "205:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "205:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "222:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "205:18:0" - }, - { - "body": - { - "id": 26, - "nodeType": "Block", - "src": "258:20:0", - "statements": - [ - { - "expression": - { - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "265:9:0", - "subExpression": - { - "id": 23, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "265:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 25, - "nodeType": "ExpressionStatement", - "src": "265:9:0" - } - ] - }, - "condition": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 17, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": - { - "id": 18, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "250:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "246:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 27, - "initializationExpression": - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "i", - "nameLocation": "239:1:0", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "231:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "231:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 16, - "initialValue": - { - "hexValue": "30", - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "243:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "nodeType": "VariableDeclarationStatement", - "src": "231:13:0" - }, - "loopExpression": - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "253:3:0", - "subExpression": - { - "id": 20, - "name": "i", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "253:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 22, - "nodeType": "ExpressionStatement", - "src": "253:3:0" - }, - "nodeType": "ForStatement", - "src": "226:52:0" - }, - { - "expression": - { - "id": 28, - "name": "result", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "287:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 29, - "nodeType": "Return", - "src": "280:13:0" - } - ] - }, - "functionSelector": "380a9a54", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myIdentity", - "nameLocation": "150:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "169:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "161:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "161:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "160:11:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "193:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "193:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "192:9:0" - }, - "scope": 32, - "src": "141:159:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:202:0", - "usedErrors": [] - } - ], - "src": "41:262:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/DeleteExpressionMutation/DeleteExpressionMutation.sol","exportedSymbols":{"DeleteExpressionMutation":[32]},"id":33,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"DeleteExpressionMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":32,"linearizedBaseContracts":[32],"name":"DeleteExpressionMutation","nameLocation":"109:24:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":30,"nodeType":"Block","src":"202:98:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"result","nameLocation":"213:6:0","nodeType":"VariableDeclaration","scope":30,"src":"205:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"205:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"222:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"205:18:0"},{"body":{"id":26,"nodeType":"Block","src":"258:20:0","statements":[{"expression":{"id":24,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"265:9:0","subExpression":{"id":23,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"265:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":25,"nodeType":"ExpressionStatement","src":"265:9:0"}]},"condition":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":19,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":17,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"id":18,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"250:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"246:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":27,"initializationExpression":{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"i","nameLocation":"239:1:0","nodeType":"VariableDeclaration","scope":27,"src":"231:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"231:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":16,"initialValue":{"hexValue":"30","id":15,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"243:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"nodeType":"VariableDeclarationStatement","src":"231:13:0"},"isSimpleCounterLoop":true,"loopExpression":{"expression":{"id":21,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"253:3:0","subExpression":{"id":20,"name":"i","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"253:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":22,"nodeType":"ExpressionStatement","src":"253:3:0"},"nodeType":"ForStatement","src":"226:52:0"},{"expression":{"id":28,"name":"result","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"287:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":29,"nodeType":"Return","src":"280:13:0"}]},"functionSelector":"380a9a54","id":31,"implemented":true,"kind":"function","modifiers":[],"name":"myIdentity","nameLocation":"150:10:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"169:1:0","nodeType":"VariableDeclaration","scope":31,"src":"161:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"161:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"160:11:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":31,"src":"193:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"193:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"192:9:0"},"scope":32,"src":"141:159:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":33,"src":"100:202:0","usedErrors":[],"usedEvents":[]}],"src":"41:262:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/ElimDelegateMutation.sol_json.ast b/resources/regressions/all.gconf/input_json/ElimDelegateMutation.sol_json.ast index c75ab1a3..19492a9b 100644 --- a/resources/regressions/all.gconf/input_json/ElimDelegateMutation.sol_json.ast +++ b/resources/regressions/all.gconf/input_json/ElimDelegateMutation.sol_json.ast @@ -1,997 +1 @@ -{ - "absolutePath": "benchmarks/ElimDelegateMutation/ElimDelegateMutation.sol", - "exportedSymbols": - { - "A": - [ - 68 - ], - "B": - [ - 28 - ] - }, - "id": 69, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "41:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "B", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 28, - "linearizedBaseContracts": - [ - 28 - ], - "name": "B", - "nameLocation": "76:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "4e70b1dc", - "id": 3, - "mutability": "mutable", - "name": "num", - "nameLocation": "96:3:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "84:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 2, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "84:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "67e404ce", - "id": 5, - "mutability": "mutable", - "name": "sender", - "nameLocation": "120:6:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "105:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 4, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "105:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "3fa4f245", - "id": 7, - "mutability": "mutable", - "name": "value", - "nameLocation": "144:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "132:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "132:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 26, - "nodeType": "Block", - "src": "199:83:0", - "statements": - [ - { - "expression": - { - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 12, - "name": "num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "209:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 13, - "name": "_num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "215:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "209:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15, - "nodeType": "ExpressionStatement", - "src": "209:10:0" - }, - { - "expression": - { - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 16, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "229:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 17, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "238:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "238:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "229:19:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 20, - "nodeType": "ExpressionStatement", - "src": "229:19:0" - }, - { - "expression": - { - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 21, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "258:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 22, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "266:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "266:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "258:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 25, - "nodeType": "ExpressionStatement", - "src": "258:17:0" - } - ] - }, - "functionSelector": "6466414b", - "id": 27, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setVars", - "nameLocation": "165:7:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "_num", - "nameLocation": "178:4:0", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "173:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "173:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "172:11:0" - }, - "returnParameters": - { - "id": 11, - "nodeType": "ParameterList", - "parameters": [], - "src": "199:0:0" - }, - "scope": 28, - "src": "156:126:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 69, - "src": "67:217:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "A", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 68, - "linearizedBaseContracts": - [ - 68 - ], - "name": "A", - "nameLocation": "295:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "4e70b1dc", - "id": 30, - "mutability": "mutable", - "name": "num", - "nameLocation": "315:3:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "303:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 29, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "303:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "67e404ce", - "id": 32, - "mutability": "mutable", - "name": "sender", - "nameLocation": "339:6:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "324:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 31, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "324:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "3fa4f245", - "id": 34, - "mutability": "mutable", - "name": "value", - "nameLocation": "363:5:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "351:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "351:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "f95ec93b", - "id": 36, - "mutability": "mutable", - "name": "delegateSuccessful", - "nameLocation": "386:18:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "374:30:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 35, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "374:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "2bb14104", - "id": 38, - "mutability": "mutable", - "name": "myData", - "nameLocation": "423:6:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "410:19:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes" - }, - "typeName": - { - "id": 37, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "410:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 66, - "nodeType": "Block", - "src": "503:195:0", - "statements": - [ - { - "assignments": - [ - 46, - 48 - ], - "declarations": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "success", - "nameLocation": "519:7:0", - "nodeType": "VariableDeclaration", - "scope": 66, - "src": "514:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 45, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "514:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "data", - "nameLocation": "541:4:0", - "nodeType": "VariableDeclaration", - "scope": 66, - "src": "528:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": - { - "id": 47, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "528:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 57, - "initialValue": - { - "arguments": - [ - { - "arguments": - [ - { - "hexValue": "736574566172732875696e7432353629", - "id": 53, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "609:18:0", - "typeDescriptions": - { - "typeIdentifier": "t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e", - "typeString": "literal_string \"setVars(uint256)\"" - }, - "value": "setVars(uint256)" - }, - { - "id": 54, - "name": "_num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "629:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e", - "typeString": "literal_string \"setVars(uint256)\"" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": - { - "id": 51, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "585:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "src": "585:23:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "585:49:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": - { - "id": 49, - "name": "_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "549:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "src": "549:22:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "549:95:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "513:131:0" - }, - { - "expression": - { - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 58, - "name": "delegateSuccessful", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 36, - "src": "647:18:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 59, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "668:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "647:28:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 61, - "nodeType": "ExpressionStatement", - "src": "647:28:0" - }, - { - "expression": - { - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 62, - "name": "myData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "678:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 63, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "687:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "678:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "678:13:0" - } - ] - }, - "functionSelector": "d1e0f308", - "id": 67, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setVars", - "nameLocation": "450:7:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 43, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 40, - "mutability": "mutable", - "name": "_contract", - "nameLocation": "466:9:0", - "nodeType": "VariableDeclaration", - "scope": 67, - "src": "458:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 39, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "458:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 42, - "mutability": "mutable", - "name": "_num", - "nameLocation": "482:4:0", - "nodeType": "VariableDeclaration", - "scope": 67, - "src": "477:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 41, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "477:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "457:30:0" - }, - "returnParameters": - { - "id": 44, - "nodeType": "ParameterList", - "parameters": [], - "src": "503:0:0" - }, - "scope": 68, - "src": "441:257:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 69, - "src": "286:414:0", - "usedErrors": [] - } - ], - "src": "41:660:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/ElimDelegateMutation/ElimDelegateMutation.sol","exportedSymbols":{"A":[68],"B":[28]},"id":69,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"41:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"B","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":28,"linearizedBaseContracts":[28],"name":"B","nameLocation":"76:1:0","nodeType":"ContractDefinition","nodes":[{"constant":false,"functionSelector":"4e70b1dc","id":3,"mutability":"mutable","name":"num","nameLocation":"96:3:0","nodeType":"VariableDeclaration","scope":28,"src":"84:15:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2,"name":"uint","nodeType":"ElementaryTypeName","src":"84:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"67e404ce","id":5,"mutability":"mutable","name":"sender","nameLocation":"120:6:0","nodeType":"VariableDeclaration","scope":28,"src":"105:21:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4,"name":"address","nodeType":"ElementaryTypeName","src":"105:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"public"},{"constant":false,"functionSelector":"3fa4f245","id":7,"mutability":"mutable","name":"value","nameLocation":"144:5:0","nodeType":"VariableDeclaration","scope":28,"src":"132:17:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint","nodeType":"ElementaryTypeName","src":"132:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"body":{"id":26,"nodeType":"Block","src":"199:83:0","statements":[{"expression":{"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":12,"name":"num","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3,"src":"209:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":13,"name":"_num","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":9,"src":"215:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"209:10:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":15,"nodeType":"ExpressionStatement","src":"209:10:0"},{"expression":{"id":19,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":16,"name":"sender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5,"src":"229:6:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":17,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"238:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":18,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"242:6:0","memberName":"sender","nodeType":"MemberAccess","src":"238:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"229:19:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":20,"nodeType":"ExpressionStatement","src":"229:19:0"},{"expression":{"id":24,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":21,"name":"value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"258:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":22,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"266:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":23,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"270:5:0","memberName":"value","nodeType":"MemberAccess","src":"266:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"258:17:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":25,"nodeType":"ExpressionStatement","src":"258:17:0"}]},"functionSelector":"6466414b","id":27,"implemented":true,"kind":"function","modifiers":[],"name":"setVars","nameLocation":"165:7:0","nodeType":"FunctionDefinition","parameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"_num","nameLocation":"178:4:0","nodeType":"VariableDeclaration","scope":27,"src":"173:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint","nodeType":"ElementaryTypeName","src":"173:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"172:11:0"},"returnParameters":{"id":11,"nodeType":"ParameterList","parameters":[],"src":"199:0:0"},"scope":28,"src":"156:126:0","stateMutability":"payable","virtual":false,"visibility":"public"}],"scope":69,"src":"67:217:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"A","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":68,"linearizedBaseContracts":[68],"name":"A","nameLocation":"295:1:0","nodeType":"ContractDefinition","nodes":[{"constant":false,"functionSelector":"4e70b1dc","id":30,"mutability":"mutable","name":"num","nameLocation":"315:3:0","nodeType":"VariableDeclaration","scope":68,"src":"303:15:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":29,"name":"uint","nodeType":"ElementaryTypeName","src":"303:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"67e404ce","id":32,"mutability":"mutable","name":"sender","nameLocation":"339:6:0","nodeType":"VariableDeclaration","scope":68,"src":"324:21:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":31,"name":"address","nodeType":"ElementaryTypeName","src":"324:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"public"},{"constant":false,"functionSelector":"3fa4f245","id":34,"mutability":"mutable","name":"value","nameLocation":"363:5:0","nodeType":"VariableDeclaration","scope":68,"src":"351:17:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":33,"name":"uint","nodeType":"ElementaryTypeName","src":"351:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"f95ec93b","id":36,"mutability":"mutable","name":"delegateSuccessful","nameLocation":"386:18:0","nodeType":"VariableDeclaration","scope":68,"src":"374:30:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":35,"name":"bool","nodeType":"ElementaryTypeName","src":"374:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"public"},{"constant":false,"functionSelector":"2bb14104","id":38,"mutability":"mutable","name":"myData","nameLocation":"423:6:0","nodeType":"VariableDeclaration","scope":68,"src":"410:19:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes"},"typeName":{"id":37,"name":"bytes","nodeType":"ElementaryTypeName","src":"410:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"visibility":"public"},{"body":{"id":66,"nodeType":"Block","src":"503:195:0","statements":[{"assignments":[46,48],"declarations":[{"constant":false,"id":46,"mutability":"mutable","name":"success","nameLocation":"519:7:0","nodeType":"VariableDeclaration","scope":66,"src":"514:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":45,"name":"bool","nodeType":"ElementaryTypeName","src":"514:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"},{"constant":false,"id":48,"mutability":"mutable","name":"data","nameLocation":"541:4:0","nodeType":"VariableDeclaration","scope":66,"src":"528:17:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":47,"name":"bytes","nodeType":"ElementaryTypeName","src":"528:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"visibility":"internal"}],"id":57,"initialValue":{"arguments":[{"arguments":[{"hexValue":"736574566172732875696e7432353629","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"609:18:0","typeDescriptions":{"typeIdentifier":"t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e","typeString":"literal_string \"setVars(uint256)\""},"value":"setVars(uint256)"},{"id":54,"name":"_num","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":42,"src":"629:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e","typeString":"literal_string \"setVars(uint256)\""},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"id":51,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-1,"src":"585:3:0","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":52,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberLocation":"589:19:0","memberName":"encodeWithSignature","nodeType":"MemberAccess","src":"585:23:0","typeDescriptions":{"typeIdentifier":"t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$","typeString":"function (string memory) pure returns (bytes memory)"}},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"585:49:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"expression":{"id":49,"name":"_contract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":40,"src":"549:9:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":50,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"559:12:0","memberName":"delegatecall","nodeType":"MemberAccess","src":"549:22:0","typeDescriptions":{"typeIdentifier":"t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$","typeString":"function (bytes memory) returns (bool,bytes memory)"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"549:95:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_bytes_memory_ptr_$","typeString":"tuple(bool,bytes memory)"}},"nodeType":"VariableDeclarationStatement","src":"513:131:0"},{"expression":{"id":60,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":58,"name":"delegateSuccessful","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":36,"src":"647:18:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":59,"name":"success","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":46,"src":"668:7:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"647:28:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":61,"nodeType":"ExpressionStatement","src":"647:28:0"},{"expression":{"id":64,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":62,"name":"myData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":38,"src":"678:6:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":63,"name":"data","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":48,"src":"687:4:0","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"src":"678:13:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"id":65,"nodeType":"ExpressionStatement","src":"678:13:0"}]},"functionSelector":"d1e0f308","id":67,"implemented":true,"kind":"function","modifiers":[],"name":"setVars","nameLocation":"450:7:0","nodeType":"FunctionDefinition","parameters":{"id":43,"nodeType":"ParameterList","parameters":[{"constant":false,"id":40,"mutability":"mutable","name":"_contract","nameLocation":"466:9:0","nodeType":"VariableDeclaration","scope":67,"src":"458:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":39,"name":"address","nodeType":"ElementaryTypeName","src":"458:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":42,"mutability":"mutable","name":"_num","nameLocation":"482:4:0","nodeType":"VariableDeclaration","scope":67,"src":"477:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":41,"name":"uint","nodeType":"ElementaryTypeName","src":"477:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"457:30:0"},"returnParameters":{"id":44,"nodeType":"ParameterList","parameters":[],"src":"503:0:0"},"scope":68,"src":"441:257:0","stateMutability":"payable","virtual":false,"visibility":"public"}],"scope":69,"src":"286:414:0","usedErrors":[],"usedEvents":[]}],"src":"41:660:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/ElimDelegateMutation.sol_json.ast.json b/resources/regressions/all.gconf/input_json/ElimDelegateMutation.sol_json.ast.json index c75ab1a3..19492a9b 100644 --- a/resources/regressions/all.gconf/input_json/ElimDelegateMutation.sol_json.ast.json +++ b/resources/regressions/all.gconf/input_json/ElimDelegateMutation.sol_json.ast.json @@ -1,997 +1 @@ -{ - "absolutePath": "benchmarks/ElimDelegateMutation/ElimDelegateMutation.sol", - "exportedSymbols": - { - "A": - [ - 68 - ], - "B": - [ - 28 - ] - }, - "id": 69, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "41:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "B", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 28, - "linearizedBaseContracts": - [ - 28 - ], - "name": "B", - "nameLocation": "76:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "4e70b1dc", - "id": 3, - "mutability": "mutable", - "name": "num", - "nameLocation": "96:3:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "84:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 2, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "84:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "67e404ce", - "id": 5, - "mutability": "mutable", - "name": "sender", - "nameLocation": "120:6:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "105:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 4, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "105:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "3fa4f245", - "id": 7, - "mutability": "mutable", - "name": "value", - "nameLocation": "144:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "132:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "132:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 26, - "nodeType": "Block", - "src": "199:83:0", - "statements": - [ - { - "expression": - { - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 12, - "name": "num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 3, - "src": "209:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 13, - "name": "_num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 9, - "src": "215:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "209:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 15, - "nodeType": "ExpressionStatement", - "src": "209:10:0" - }, - { - "expression": - { - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 16, - "name": "sender", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 5, - "src": "229:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 17, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "238:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 18, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "238:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "229:19:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 20, - "nodeType": "ExpressionStatement", - "src": "229:19:0" - }, - { - "expression": - { - "id": 24, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 21, - "name": "value", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 7, - "src": "258:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 22, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "266:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "value", - "nodeType": "MemberAccess", - "src": "266:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "258:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 25, - "nodeType": "ExpressionStatement", - "src": "258:17:0" - } - ] - }, - "functionSelector": "6466414b", - "id": 27, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setVars", - "nameLocation": "165:7:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "_num", - "nameLocation": "178:4:0", - "nodeType": "VariableDeclaration", - "scope": 27, - "src": "173:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "173:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "172:11:0" - }, - "returnParameters": - { - "id": 11, - "nodeType": "ParameterList", - "parameters": [], - "src": "199:0:0" - }, - "scope": 28, - "src": "156:126:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 69, - "src": "67:217:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "A", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 68, - "linearizedBaseContracts": - [ - 68 - ], - "name": "A", - "nameLocation": "295:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "constant": false, - "functionSelector": "4e70b1dc", - "id": 30, - "mutability": "mutable", - "name": "num", - "nameLocation": "315:3:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "303:15:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 29, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "303:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "67e404ce", - "id": 32, - "mutability": "mutable", - "name": "sender", - "nameLocation": "339:6:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "324:21:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 31, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "324:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "3fa4f245", - "id": 34, - "mutability": "mutable", - "name": "value", - "nameLocation": "363:5:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "351:17:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "351:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "f95ec93b", - "id": 36, - "mutability": "mutable", - "name": "delegateSuccessful", - "nameLocation": "386:18:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "374:30:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 35, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "374:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "public" - }, - { - "constant": false, - "functionSelector": "2bb14104", - "id": 38, - "mutability": "mutable", - "name": "myData", - "nameLocation": "423:6:0", - "nodeType": "VariableDeclaration", - "scope": 68, - "src": "410:19:0", - "stateVariable": true, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes" - }, - "typeName": - { - "id": 37, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "410:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "public" - }, - { - "body": - { - "id": 66, - "nodeType": "Block", - "src": "503:195:0", - "statements": - [ - { - "assignments": - [ - 46, - 48 - ], - "declarations": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "success", - "nameLocation": "519:7:0", - "nodeType": "VariableDeclaration", - "scope": 66, - "src": "514:12:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 45, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "514:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "data", - "nameLocation": "541:4:0", - "nodeType": "VariableDeclaration", - "scope": 66, - "src": "528:17:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes" - }, - "typeName": - { - "id": 47, - "name": "bytes", - "nodeType": "ElementaryTypeName", - "src": "528:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage_ptr", - "typeString": "bytes" - } - }, - "visibility": "internal" - } - ], - "id": 57, - "initialValue": - { - "arguments": - [ - { - "arguments": - [ - { - "hexValue": "736574566172732875696e7432353629", - "id": 53, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "string", - "lValueRequested": false, - "nodeType": "Literal", - "src": "609:18:0", - "typeDescriptions": - { - "typeIdentifier": "t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e", - "typeString": "literal_string \"setVars(uint256)\"" - }, - "value": "setVars(uint256)" - }, - { - "id": 54, - "name": "_num", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 42, - "src": "629:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e", - "typeString": "literal_string \"setVars(uint256)\"" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "expression": - { - "id": 51, - "name": "abi", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -1, - "src": "585:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_abi", - "typeString": "abi" - } - }, - "id": 52, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "memberName": "encodeWithSignature", - "nodeType": "MemberAccess", - "src": "585:23:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$", - "typeString": "function (string memory) pure returns (bytes memory)" - } - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "585:49:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - ], - "expression": - { - "id": 49, - "name": "_contract", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 40, - "src": "549:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 50, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "delegatecall", - "nodeType": "MemberAccess", - "src": "549:22:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "function (bytes memory) returns (bool,bytes memory)" - } - }, - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "549:95:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$_t_bool_$_t_bytes_memory_ptr_$", - "typeString": "tuple(bool,bytes memory)" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "513:131:0" - }, - { - "expression": - { - "id": 60, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 58, - "name": "delegateSuccessful", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 36, - "src": "647:18:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 59, - "name": "success", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "668:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "src": "647:28:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "id": 61, - "nodeType": "ExpressionStatement", - "src": "647:28:0" - }, - { - "expression": - { - "id": 64, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "id": 62, - "name": "myData", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 38, - "src": "678:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "id": 63, - "name": "data", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "687:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_memory_ptr", - "typeString": "bytes memory" - } - }, - "src": "678:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_bytes_storage", - "typeString": "bytes storage ref" - } - }, - "id": 65, - "nodeType": "ExpressionStatement", - "src": "678:13:0" - } - ] - }, - "functionSelector": "d1e0f308", - "id": 67, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "setVars", - "nameLocation": "450:7:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 43, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 40, - "mutability": "mutable", - "name": "_contract", - "nameLocation": "466:9:0", - "nodeType": "VariableDeclaration", - "scope": 67, - "src": "458:17:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 39, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "458:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 42, - "mutability": "mutable", - "name": "_num", - "nameLocation": "482:4:0", - "nodeType": "VariableDeclaration", - "scope": 67, - "src": "477:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 41, - "name": "uint", - "nodeType": "ElementaryTypeName", - "src": "477:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "457:30:0" - }, - "returnParameters": - { - "id": 44, - "nodeType": "ParameterList", - "parameters": [], - "src": "503:0:0" - }, - "scope": 68, - "src": "441:257:0", - "stateMutability": "payable", - "virtual": false, - "visibility": "public" - } - ], - "scope": 69, - "src": "286:414:0", - "usedErrors": [] - } - ], - "src": "41:660:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/ElimDelegateMutation/ElimDelegateMutation.sol","exportedSymbols":{"A":[68],"B":[28]},"id":69,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"41:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"B","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":28,"linearizedBaseContracts":[28],"name":"B","nameLocation":"76:1:0","nodeType":"ContractDefinition","nodes":[{"constant":false,"functionSelector":"4e70b1dc","id":3,"mutability":"mutable","name":"num","nameLocation":"96:3:0","nodeType":"VariableDeclaration","scope":28,"src":"84:15:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":2,"name":"uint","nodeType":"ElementaryTypeName","src":"84:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"67e404ce","id":5,"mutability":"mutable","name":"sender","nameLocation":"120:6:0","nodeType":"VariableDeclaration","scope":28,"src":"105:21:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":4,"name":"address","nodeType":"ElementaryTypeName","src":"105:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"public"},{"constant":false,"functionSelector":"3fa4f245","id":7,"mutability":"mutable","name":"value","nameLocation":"144:5:0","nodeType":"VariableDeclaration","scope":28,"src":"132:17:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint","nodeType":"ElementaryTypeName","src":"132:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"body":{"id":26,"nodeType":"Block","src":"199:83:0","statements":[{"expression":{"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":12,"name":"num","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":3,"src":"209:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":13,"name":"_num","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":9,"src":"215:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"209:10:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":15,"nodeType":"ExpressionStatement","src":"209:10:0"},{"expression":{"id":19,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":16,"name":"sender","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":5,"src":"229:6:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":17,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"238:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":18,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"242:6:0","memberName":"sender","nodeType":"MemberAccess","src":"238:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"229:19:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":20,"nodeType":"ExpressionStatement","src":"229:19:0"},{"expression":{"id":24,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":21,"name":"value","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":7,"src":"258:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":22,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"266:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":23,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"270:5:0","memberName":"value","nodeType":"MemberAccess","src":"266:9:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"258:17:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":25,"nodeType":"ExpressionStatement","src":"258:17:0"}]},"functionSelector":"6466414b","id":27,"implemented":true,"kind":"function","modifiers":[],"name":"setVars","nameLocation":"165:7:0","nodeType":"FunctionDefinition","parameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"_num","nameLocation":"178:4:0","nodeType":"VariableDeclaration","scope":27,"src":"173:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint","nodeType":"ElementaryTypeName","src":"173:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"172:11:0"},"returnParameters":{"id":11,"nodeType":"ParameterList","parameters":[],"src":"199:0:0"},"scope":28,"src":"156:126:0","stateMutability":"payable","virtual":false,"visibility":"public"}],"scope":69,"src":"67:217:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"A","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":68,"linearizedBaseContracts":[68],"name":"A","nameLocation":"295:1:0","nodeType":"ContractDefinition","nodes":[{"constant":false,"functionSelector":"4e70b1dc","id":30,"mutability":"mutable","name":"num","nameLocation":"315:3:0","nodeType":"VariableDeclaration","scope":68,"src":"303:15:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":29,"name":"uint","nodeType":"ElementaryTypeName","src":"303:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"67e404ce","id":32,"mutability":"mutable","name":"sender","nameLocation":"339:6:0","nodeType":"VariableDeclaration","scope":68,"src":"324:21:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":31,"name":"address","nodeType":"ElementaryTypeName","src":"324:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"public"},{"constant":false,"functionSelector":"3fa4f245","id":34,"mutability":"mutable","name":"value","nameLocation":"363:5:0","nodeType":"VariableDeclaration","scope":68,"src":"351:17:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":33,"name":"uint","nodeType":"ElementaryTypeName","src":"351:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"public"},{"constant":false,"functionSelector":"f95ec93b","id":36,"mutability":"mutable","name":"delegateSuccessful","nameLocation":"386:18:0","nodeType":"VariableDeclaration","scope":68,"src":"374:30:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":35,"name":"bool","nodeType":"ElementaryTypeName","src":"374:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"public"},{"constant":false,"functionSelector":"2bb14104","id":38,"mutability":"mutable","name":"myData","nameLocation":"423:6:0","nodeType":"VariableDeclaration","scope":68,"src":"410:19:0","stateVariable":true,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes"},"typeName":{"id":37,"name":"bytes","nodeType":"ElementaryTypeName","src":"410:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"visibility":"public"},{"body":{"id":66,"nodeType":"Block","src":"503:195:0","statements":[{"assignments":[46,48],"declarations":[{"constant":false,"id":46,"mutability":"mutable","name":"success","nameLocation":"519:7:0","nodeType":"VariableDeclaration","scope":66,"src":"514:12:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":45,"name":"bool","nodeType":"ElementaryTypeName","src":"514:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"},{"constant":false,"id":48,"mutability":"mutable","name":"data","nameLocation":"541:4:0","nodeType":"VariableDeclaration","scope":66,"src":"528:17:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes"},"typeName":{"id":47,"name":"bytes","nodeType":"ElementaryTypeName","src":"528:5:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage_ptr","typeString":"bytes"}},"visibility":"internal"}],"id":57,"initialValue":{"arguments":[{"arguments":[{"hexValue":"736574566172732875696e7432353629","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"string","lValueRequested":false,"nodeType":"Literal","src":"609:18:0","typeDescriptions":{"typeIdentifier":"t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e","typeString":"literal_string \"setVars(uint256)\""},"value":"setVars(uint256)"},{"id":54,"name":"_num","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":42,"src":"629:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_stringliteral_6466414b2df4a685dcec3eaa0cc18042949f0e7e43c9cb945cbd507ff227de7e","typeString":"literal_string \"setVars(uint256)\""},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"expression":{"id":51,"name":"abi","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-1,"src":"585:3:0","typeDescriptions":{"typeIdentifier":"t_magic_abi","typeString":"abi"}},"id":52,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"memberLocation":"589:19:0","memberName":"encodeWithSignature","nodeType":"MemberAccess","src":"585:23:0","typeDescriptions":{"typeIdentifier":"t_function_abiencodewithsignature_pure$_t_string_memory_ptr_$returns$_t_bytes_memory_ptr_$","typeString":"function (string memory) pure returns (bytes memory)"}},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"585:49:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}],"expression":{"id":49,"name":"_contract","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":40,"src":"549:9:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":50,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"559:12:0","memberName":"delegatecall","nodeType":"MemberAccess","src":"549:22:0","typeDescriptions":{"typeIdentifier":"t_function_baredelegatecall_nonpayable$_t_bytes_memory_ptr_$returns$_t_bool_$_t_bytes_memory_ptr_$","typeString":"function (bytes memory) returns (bool,bytes memory)"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"549:95:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$_t_bool_$_t_bytes_memory_ptr_$","typeString":"tuple(bool,bytes memory)"}},"nodeType":"VariableDeclarationStatement","src":"513:131:0"},{"expression":{"id":60,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":58,"name":"delegateSuccessful","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":36,"src":"647:18:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":59,"name":"success","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":46,"src":"668:7:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"src":"647:28:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"id":61,"nodeType":"ExpressionStatement","src":"647:28:0"},{"expression":{"id":64,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"id":62,"name":"myData","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":38,"src":"678:6:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"id":63,"name":"data","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":48,"src":"687:4:0","typeDescriptions":{"typeIdentifier":"t_bytes_memory_ptr","typeString":"bytes memory"}},"src":"678:13:0","typeDescriptions":{"typeIdentifier":"t_bytes_storage","typeString":"bytes storage ref"}},"id":65,"nodeType":"ExpressionStatement","src":"678:13:0"}]},"functionSelector":"d1e0f308","id":67,"implemented":true,"kind":"function","modifiers":[],"name":"setVars","nameLocation":"450:7:0","nodeType":"FunctionDefinition","parameters":{"id":43,"nodeType":"ParameterList","parameters":[{"constant":false,"id":40,"mutability":"mutable","name":"_contract","nameLocation":"466:9:0","nodeType":"VariableDeclaration","scope":67,"src":"458:17:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":39,"name":"address","nodeType":"ElementaryTypeName","src":"458:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"},{"constant":false,"id":42,"mutability":"mutable","name":"_num","nameLocation":"482:4:0","nodeType":"VariableDeclaration","scope":67,"src":"477:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":41,"name":"uint","nodeType":"ElementaryTypeName","src":"477:4:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"457:30:0"},"returnParameters":{"id":44,"nodeType":"ParameterList","parameters":[],"src":"503:0:0"},"scope":68,"src":"441:257:0","stateMutability":"payable","virtual":false,"visibility":"public"}],"scope":69,"src":"286:414:0","usedErrors":[],"usedEvents":[]}],"src":"41:660:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/FunctionCallMutation.sol_json.ast b/resources/regressions/all.gconf/input_json/FunctionCallMutation.sol_json.ast index 6a022513..196e0192 100644 --- a/resources/regressions/all.gconf/input_json/FunctionCallMutation.sol_json.ast +++ b/resources/regressions/all.gconf/input_json/FunctionCallMutation.sol_json.ast @@ -1,458 +1 @@ -{ - "absolutePath": "benchmarks/FunctionCallMutation/FunctionCallMutation.sol", - "exportedSymbols": - { - "FunctionCallMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "FunctionCallMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "FunctionCallMutation", - "nameLocation": "109:20:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "208:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "222:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "218:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "211:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "145:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "164:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "156:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "156:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "175:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "167:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "167:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "155:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "199:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "199:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "198:9:0" - }, - "scope": 32, - "src": "136:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "313:33:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 26, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "334:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 27, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "337:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 25, - "name": "myAddition", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "323:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "323:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 29, - "nodeType": "Return", - "src": "316:23:0" - } - ] - }, - "functionSelector": "65cac823", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myOtherAddition", - "nameLocation": "245:15:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "269:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "261:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "261:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "280:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "272:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "272:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "260:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "304:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "304:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "303:9:0" - }, - "scope": 32, - "src": "236:110:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:248:0", - "usedErrors": [] - } - ], - "src": "41:308:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/FunctionCallMutation/FunctionCallMutation.sol","exportedSymbols":{"FunctionCallMutation":[32]},"id":33,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"FunctionCallMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":32,"linearizedBaseContracts":[32],"name":"FunctionCallMutation","nameLocation":"109:20:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":15,"nodeType":"Block","src":"208:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":13,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":11,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"218:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":12,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"222:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"218:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":10,"id":14,"nodeType":"Return","src":"211:12:0"}]},"functionSelector":"04b53fe4","id":16,"implemented":true,"kind":"function","modifiers":[],"name":"myAddition","nameLocation":"145:10:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"164:1:0","nodeType":"VariableDeclaration","scope":16,"src":"156:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"156:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"y","nameLocation":"175:1:0","nodeType":"VariableDeclaration","scope":16,"src":"167:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"167:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"155:22:0"},"returnParameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":16,"src":"199:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint256","nodeType":"ElementaryTypeName","src":"199:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"198:9:0"},"scope":32,"src":"136:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":30,"nodeType":"Block","src":"313:33:0","statements":[{"expression":{"arguments":[{"id":26,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"334:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":27,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"337:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":25,"name":"myAddition","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":16,"src":"323:10:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"323:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":24,"id":29,"nodeType":"Return","src":"316:23:0"}]},"functionSelector":"65cac823","id":31,"implemented":true,"kind":"function","modifiers":[],"name":"myOtherAddition","nameLocation":"245:15:0","nodeType":"FunctionDefinition","parameters":{"id":21,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"x","nameLocation":"269:1:0","nodeType":"VariableDeclaration","scope":31,"src":"261:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"261:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":20,"mutability":"mutable","name":"y","nameLocation":"280:1:0","nodeType":"VariableDeclaration","scope":31,"src":"272:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":19,"name":"uint256","nodeType":"ElementaryTypeName","src":"272:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"260:22:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[{"constant":false,"id":23,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":31,"src":"304:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":22,"name":"uint256","nodeType":"ElementaryTypeName","src":"304:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"303:9:0"},"scope":32,"src":"236:110:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":33,"src":"100:248:0","usedErrors":[],"usedEvents":[]}],"src":"41:308:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/FunctionCallMutation.sol_json.ast.json b/resources/regressions/all.gconf/input_json/FunctionCallMutation.sol_json.ast.json index 6a022513..196e0192 100644 --- a/resources/regressions/all.gconf/input_json/FunctionCallMutation.sol_json.ast.json +++ b/resources/regressions/all.gconf/input_json/FunctionCallMutation.sol_json.ast.json @@ -1,458 +1 @@ -{ - "absolutePath": "benchmarks/FunctionCallMutation/FunctionCallMutation.sol", - "exportedSymbols": - { - "FunctionCallMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "FunctionCallMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "FunctionCallMutation", - "nameLocation": "109:20:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "208:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "222:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "218:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "211:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "145:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "164:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "156:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "156:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "175:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "167:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "167:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "155:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "199:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "199:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "198:9:0" - }, - "scope": 32, - "src": "136:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "313:33:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 26, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "334:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 27, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "337:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 25, - "name": "myAddition", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "323:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "323:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 29, - "nodeType": "Return", - "src": "316:23:0" - } - ] - }, - "functionSelector": "65cac823", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myOtherAddition", - "nameLocation": "245:15:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "269:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "261:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "261:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "280:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "272:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "272:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "260:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "304:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "304:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "303:9:0" - }, - "scope": 32, - "src": "236:110:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:248:0", - "usedErrors": [] - } - ], - "src": "41:308:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/FunctionCallMutation/FunctionCallMutation.sol","exportedSymbols":{"FunctionCallMutation":[32]},"id":33,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"FunctionCallMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":32,"linearizedBaseContracts":[32],"name":"FunctionCallMutation","nameLocation":"109:20:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":15,"nodeType":"Block","src":"208:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":13,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":11,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"218:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":12,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"222:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"218:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":10,"id":14,"nodeType":"Return","src":"211:12:0"}]},"functionSelector":"04b53fe4","id":16,"implemented":true,"kind":"function","modifiers":[],"name":"myAddition","nameLocation":"145:10:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"164:1:0","nodeType":"VariableDeclaration","scope":16,"src":"156:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"156:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"y","nameLocation":"175:1:0","nodeType":"VariableDeclaration","scope":16,"src":"167:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"167:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"155:22:0"},"returnParameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":16,"src":"199:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint256","nodeType":"ElementaryTypeName","src":"199:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"198:9:0"},"scope":32,"src":"136:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":30,"nodeType":"Block","src":"313:33:0","statements":[{"expression":{"arguments":[{"id":26,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"334:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":27,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"337:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":25,"name":"myAddition","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":16,"src":"323:10:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"323:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":24,"id":29,"nodeType":"Return","src":"316:23:0"}]},"functionSelector":"65cac823","id":31,"implemented":true,"kind":"function","modifiers":[],"name":"myOtherAddition","nameLocation":"245:15:0","nodeType":"FunctionDefinition","parameters":{"id":21,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"x","nameLocation":"269:1:0","nodeType":"VariableDeclaration","scope":31,"src":"261:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"261:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":20,"mutability":"mutable","name":"y","nameLocation":"280:1:0","nodeType":"VariableDeclaration","scope":31,"src":"272:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":19,"name":"uint256","nodeType":"ElementaryTypeName","src":"272:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"260:22:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[{"constant":false,"id":23,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":31,"src":"304:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":22,"name":"uint256","nodeType":"ElementaryTypeName","src":"304:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"303:9:0"},"scope":32,"src":"236:110:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":33,"src":"100:248:0","usedErrors":[],"usedEvents":[]}],"src":"41:308:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/IfStatementMutation.sol_json.ast b/resources/regressions/all.gconf/input_json/IfStatementMutation.sol_json.ast index 5f606832..8ab29424 100644 --- a/resources/regressions/all.gconf/input_json/IfStatementMutation.sol_json.ast +++ b/resources/regressions/all.gconf/input_json/IfStatementMutation.sol_json.ast @@ -1,248 +1 @@ -{ - "absolutePath": "benchmarks/IfStatementMutation/IfStatementMutation.sol", - "exportedSymbols": - { - "IfStatementMutation": - [ - 19 - ] - }, - "id": 20, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "IfStatementMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 19, - "linearizedBaseContracts": - [ - 19 - ], - "name": "IfStatementMutation", - "nameLocation": "109:19:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "197:68:0", - "statements": - [ - { - "condition": - { - "id": 9, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "204:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": - { - "id": 15, - "nodeType": "Block", - "src": "236:23:0", - "statements": - [ - { - "expression": - { - "hexValue": "66616c7365", - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "250:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 8, - "id": 14, - "nodeType": "Return", - "src": "243:12:0" - } - ] - }, - "id": 16, - "nodeType": "IfStatement", - "src": "200:59:0", - "trueBody": - { - "id": 12, - "nodeType": "Block", - "src": "207:22:0", - "statements": - [ - { - "expression": - { - "hexValue": "74727565", - "id": 10, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "221:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 8, - "id": 11, - "nodeType": "Return", - "src": "214:11:0" - } - ] - } - } - ] - }, - "functionSelector": "ef5a890e", - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myBooleanNegation", - "nameLocation": "144:17:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "a", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "162:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 3, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "162:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "161:8:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "191:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 6, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "191:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "190:6:0" - }, - "scope": 19, - "src": "135:130:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 20, - "src": "100:167:0", - "usedErrors": [] - } - ], - "src": "41:227:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/IfStatementMutation/IfStatementMutation.sol","exportedSymbols":{"IfStatementMutation":[19]},"id":20,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"IfStatementMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":19,"linearizedBaseContracts":[19],"name":"IfStatementMutation","nameLocation":"109:19:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"197:68:0","statements":[{"condition":{"id":9,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"204:1:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":15,"nodeType":"Block","src":"236:23:0","statements":[{"expression":{"hexValue":"66616c7365","id":13,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"250:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"false"},"functionReturnParameters":8,"id":14,"nodeType":"Return","src":"243:12:0"}]},"id":16,"nodeType":"IfStatement","src":"200:59:0","trueBody":{"id":12,"nodeType":"Block","src":"207:22:0","statements":[{"expression":{"hexValue":"74727565","id":10,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"221:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":8,"id":11,"nodeType":"Return","src":"214:11:0"}]}}]},"functionSelector":"ef5a890e","id":18,"implemented":true,"kind":"function","modifiers":[],"name":"myBooleanNegation","nameLocation":"144:17:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"a","nameLocation":"167:1:0","nodeType":"VariableDeclaration","scope":18,"src":"162:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3,"name":"bool","nodeType":"ElementaryTypeName","src":"162:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"161:8:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":18,"src":"191:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":6,"name":"bool","nodeType":"ElementaryTypeName","src":"191:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"190:6:0"},"scope":19,"src":"135:130:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":20,"src":"100:167:0","usedErrors":[],"usedEvents":[]}],"src":"41:227:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/IfStatementMutation.sol_json.ast.json b/resources/regressions/all.gconf/input_json/IfStatementMutation.sol_json.ast.json index 5f606832..8ab29424 100644 --- a/resources/regressions/all.gconf/input_json/IfStatementMutation.sol_json.ast.json +++ b/resources/regressions/all.gconf/input_json/IfStatementMutation.sol_json.ast.json @@ -1,248 +1 @@ -{ - "absolutePath": "benchmarks/IfStatementMutation/IfStatementMutation.sol", - "exportedSymbols": - { - "IfStatementMutation": - [ - 19 - ] - }, - "id": 20, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "IfStatementMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 19, - "linearizedBaseContracts": - [ - 19 - ], - "name": "IfStatementMutation", - "nameLocation": "109:19:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "197:68:0", - "statements": - [ - { - "condition": - { - "id": 9, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "204:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "falseBody": - { - "id": 15, - "nodeType": "Block", - "src": "236:23:0", - "statements": - [ - { - "expression": - { - "hexValue": "66616c7365", - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "250:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "false" - }, - "functionReturnParameters": 8, - "id": 14, - "nodeType": "Return", - "src": "243:12:0" - } - ] - }, - "id": 16, - "nodeType": "IfStatement", - "src": "200:59:0", - "trueBody": - { - "id": 12, - "nodeType": "Block", - "src": "207:22:0", - "statements": - [ - { - "expression": - { - "hexValue": "74727565", - "id": 10, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "221:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 8, - "id": 11, - "nodeType": "Return", - "src": "214:11:0" - } - ] - } - } - ] - }, - "functionSelector": "ef5a890e", - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myBooleanNegation", - "nameLocation": "144:17:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "a", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "162:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 3, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "162:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "161:8:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "191:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 6, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "191:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "190:6:0" - }, - "scope": 19, - "src": "135:130:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 20, - "src": "100:167:0", - "usedErrors": [] - } - ], - "src": "41:227:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/IfStatementMutation/IfStatementMutation.sol","exportedSymbols":{"IfStatementMutation":[19]},"id":20,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"IfStatementMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":19,"linearizedBaseContracts":[19],"name":"IfStatementMutation","nameLocation":"109:19:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"197:68:0","statements":[{"condition":{"id":9,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"204:1:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"falseBody":{"id":15,"nodeType":"Block","src":"236:23:0","statements":[{"expression":{"hexValue":"66616c7365","id":13,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"250:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"false"},"functionReturnParameters":8,"id":14,"nodeType":"Return","src":"243:12:0"}]},"id":16,"nodeType":"IfStatement","src":"200:59:0","trueBody":{"id":12,"nodeType":"Block","src":"207:22:0","statements":[{"expression":{"hexValue":"74727565","id":10,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"221:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":8,"id":11,"nodeType":"Return","src":"214:11:0"}]}}]},"functionSelector":"ef5a890e","id":18,"implemented":true,"kind":"function","modifiers":[],"name":"myBooleanNegation","nameLocation":"144:17:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"a","nameLocation":"167:1:0","nodeType":"VariableDeclaration","scope":18,"src":"162:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3,"name":"bool","nodeType":"ElementaryTypeName","src":"162:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"161:8:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":18,"src":"191:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":6,"name":"bool","nodeType":"ElementaryTypeName","src":"191:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"190:6:0"},"scope":19,"src":"135:130:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":20,"src":"100:167:0","usedErrors":[],"usedEvents":[]}],"src":"41:227:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/RequireMutation.sol_json.ast b/resources/regressions/all.gconf/input_json/RequireMutation.sol_json.ast index 77ac2d6d..aaa7d63c 100644 --- a/resources/regressions/all.gconf/input_json/RequireMutation.sol_json.ast +++ b/resources/regressions/all.gconf/input_json/RequireMutation.sol_json.ast @@ -1,439 +1 @@ -{ - "absolutePath": "benchmarks/RequireMutation/RequireMutation.sol", - "exportedSymbols": - { - "RequireMutation": - [ - 29 - ] - }, - "id": 30, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "RequireMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 29, - "linearizedBaseContracts": - [ - 29 - ], - "name": "RequireMutation", - "nameLocation": "109:15:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 27, - "nodeType": "Block", - "src": "214:72:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 14, - "name": "cond1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "225:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 13, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "217:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "217:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "217:14:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 18, - "name": "cond2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "242:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "234:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "234:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 20, - "nodeType": "ExpressionStatement", - "src": "234:14:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 22, - "name": "cond3", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "259:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 21, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "251:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "251:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 24, - "nodeType": "ExpressionStatement", - "src": "251:14:0" - }, - { - "expression": - { - "hexValue": "74727565", - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "275:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 12, - "id": 26, - "nodeType": "Return", - "src": "268:11:0" - } - ] - }, - "functionSelector": "b638e767", - "id": 28, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myRequires", - "nameLocation": "140:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 9, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "cond1", - "nameLocation": "156:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "151:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 3, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "151:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "cond2", - "nameLocation": "168:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "163:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 5, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "163:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "cond3", - "nameLocation": "180:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "175:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 7, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "175:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "150:36:0" - }, - "returnParameters": - { - "id": 12, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "208:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 10, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "208:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "207:6:0" - }, - "scope": 29, - "src": "131:155:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 30, - "src": "100:188:0", - "usedErrors": [] - } - ], - "src": "41:248:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/RequireMutation/RequireMutation.sol","exportedSymbols":{"RequireMutation":[29]},"id":30,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"RequireMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":29,"linearizedBaseContracts":[29],"name":"RequireMutation","nameLocation":"109:15:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":27,"nodeType":"Block","src":"214:72:0","statements":[{"expression":{"arguments":[{"id":14,"name":"cond1","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"225:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":13,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18,-18],"referencedDeclaration":-18,"src":"217:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"217:14:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"217:14:0"},{"expression":{"arguments":[{"id":18,"name":"cond2","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"242:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":17,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18,-18],"referencedDeclaration":-18,"src":"234:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":19,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"234:14:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":20,"nodeType":"ExpressionStatement","src":"234:14:0"},{"expression":{"arguments":[{"id":22,"name":"cond3","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":8,"src":"259:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":21,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18,-18],"referencedDeclaration":-18,"src":"251:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":23,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"251:14:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":24,"nodeType":"ExpressionStatement","src":"251:14:0"},{"expression":{"hexValue":"74727565","id":25,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"275:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":12,"id":26,"nodeType":"Return","src":"268:11:0"}]},"functionSelector":"b638e767","id":28,"implemented":true,"kind":"function","modifiers":[],"name":"myRequires","nameLocation":"140:10:0","nodeType":"FunctionDefinition","parameters":{"id":9,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"cond1","nameLocation":"156:5:0","nodeType":"VariableDeclaration","scope":28,"src":"151:10:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3,"name":"bool","nodeType":"ElementaryTypeName","src":"151:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"cond2","nameLocation":"168:5:0","nodeType":"VariableDeclaration","scope":28,"src":"163:10:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5,"name":"bool","nodeType":"ElementaryTypeName","src":"163:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"},{"constant":false,"id":8,"mutability":"mutable","name":"cond3","nameLocation":"180:5:0","nodeType":"VariableDeclaration","scope":28,"src":"175:10:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7,"name":"bool","nodeType":"ElementaryTypeName","src":"175:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"150:36:0"},"returnParameters":{"id":12,"nodeType":"ParameterList","parameters":[{"constant":false,"id":11,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":28,"src":"208:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":10,"name":"bool","nodeType":"ElementaryTypeName","src":"208:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"207:6:0"},"scope":29,"src":"131:155:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":30,"src":"100:188:0","usedErrors":[],"usedEvents":[]}],"src":"41:248:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/RequireMutation.sol_json.ast.json b/resources/regressions/all.gconf/input_json/RequireMutation.sol_json.ast.json index 77ac2d6d..aaa7d63c 100644 --- a/resources/regressions/all.gconf/input_json/RequireMutation.sol_json.ast.json +++ b/resources/regressions/all.gconf/input_json/RequireMutation.sol_json.ast.json @@ -1,439 +1 @@ -{ - "absolutePath": "benchmarks/RequireMutation/RequireMutation.sol", - "exportedSymbols": - { - "RequireMutation": - [ - 29 - ] - }, - "id": 30, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "RequireMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 29, - "linearizedBaseContracts": - [ - 29 - ], - "name": "RequireMutation", - "nameLocation": "109:15:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 27, - "nodeType": "Block", - "src": "214:72:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 14, - "name": "cond1", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "225:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 13, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "217:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "217:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "217:14:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 18, - "name": "cond2", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "242:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 17, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "234:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 19, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "234:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 20, - "nodeType": "ExpressionStatement", - "src": "234:14:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 22, - "name": "cond3", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 8, - "src": "259:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 21, - "name": "require", - "nodeType": "Identifier", - "overloadedDeclarations": - [ - -18, - -18 - ], - "referencedDeclaration": -18, - "src": "251:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_require_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 23, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "251:14:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 24, - "nodeType": "ExpressionStatement", - "src": "251:14:0" - }, - { - "expression": - { - "hexValue": "74727565", - "id": 25, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "bool", - "lValueRequested": false, - "nodeType": "Literal", - "src": "275:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "value": "true" - }, - "functionReturnParameters": 12, - "id": 26, - "nodeType": "Return", - "src": "268:11:0" - } - ] - }, - "functionSelector": "b638e767", - "id": 28, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myRequires", - "nameLocation": "140:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 9, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "cond1", - "nameLocation": "156:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "151:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 3, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "151:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "cond2", - "nameLocation": "168:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "163:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 5, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "163:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 8, - "mutability": "mutable", - "name": "cond3", - "nameLocation": "180:5:0", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "175:10:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 7, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "175:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "150:36:0" - }, - "returnParameters": - { - "id": 12, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 11, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 28, - "src": "208:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 10, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "208:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "207:6:0" - }, - "scope": 29, - "src": "131:155:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 30, - "src": "100:188:0", - "usedErrors": [] - } - ], - "src": "41:248:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/RequireMutation/RequireMutation.sol","exportedSymbols":{"RequireMutation":[29]},"id":30,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"RequireMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":29,"linearizedBaseContracts":[29],"name":"RequireMutation","nameLocation":"109:15:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":27,"nodeType":"Block","src":"214:72:0","statements":[{"expression":{"arguments":[{"id":14,"name":"cond1","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"225:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":13,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18,-18],"referencedDeclaration":-18,"src":"217:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"217:14:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"217:14:0"},{"expression":{"arguments":[{"id":18,"name":"cond2","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"242:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":17,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18,-18],"referencedDeclaration":-18,"src":"234:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":19,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"234:14:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":20,"nodeType":"ExpressionStatement","src":"234:14:0"},{"expression":{"arguments":[{"id":22,"name":"cond3","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":8,"src":"259:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":21,"name":"require","nodeType":"Identifier","overloadedDeclarations":[-18,-18,-18],"referencedDeclaration":-18,"src":"251:7:0","typeDescriptions":{"typeIdentifier":"t_function_require_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":23,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"251:14:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":24,"nodeType":"ExpressionStatement","src":"251:14:0"},{"expression":{"hexValue":"74727565","id":25,"isConstant":false,"isLValue":false,"isPure":true,"kind":"bool","lValueRequested":false,"nodeType":"Literal","src":"275:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"value":"true"},"functionReturnParameters":12,"id":26,"nodeType":"Return","src":"268:11:0"}]},"functionSelector":"b638e767","id":28,"implemented":true,"kind":"function","modifiers":[],"name":"myRequires","nameLocation":"140:10:0","nodeType":"FunctionDefinition","parameters":{"id":9,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"cond1","nameLocation":"156:5:0","nodeType":"VariableDeclaration","scope":28,"src":"151:10:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":3,"name":"bool","nodeType":"ElementaryTypeName","src":"151:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"cond2","nameLocation":"168:5:0","nodeType":"VariableDeclaration","scope":28,"src":"163:10:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":5,"name":"bool","nodeType":"ElementaryTypeName","src":"163:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"},{"constant":false,"id":8,"mutability":"mutable","name":"cond3","nameLocation":"180:5:0","nodeType":"VariableDeclaration","scope":28,"src":"175:10:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":7,"name":"bool","nodeType":"ElementaryTypeName","src":"175:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"150:36:0"},"returnParameters":{"id":12,"nodeType":"ParameterList","parameters":[{"constant":false,"id":11,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":28,"src":"208:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":10,"name":"bool","nodeType":"ElementaryTypeName","src":"208:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"207:6:0"},"scope":29,"src":"131:155:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":30,"src":"100:188:0","usedErrors":[],"usedEvents":[]}],"src":"41:248:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/SwapArgumentsFunctionMutation.sol_json.ast b/resources/regressions/all.gconf/input_json/SwapArgumentsFunctionMutation.sol_json.ast index 424e74b0..c89ab1fb 100644 --- a/resources/regressions/all.gconf/input_json/SwapArgumentsFunctionMutation.sol_json.ast +++ b/resources/regressions/all.gconf/input_json/SwapArgumentsFunctionMutation.sol_json.ast @@ -1,458 +1 @@ -{ - "absolutePath": "benchmarks/SwapArgumentsFunctionMutation/SwapArgumentsFunctionMutation.sol", - "exportedSymbols": - { - "SwapArgumentsFunctionMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "SwapArgumentsFunctionMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "SwapArgumentsFunctionMutation", - "nameLocation": "109:29:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "211:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "221:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "225:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "221:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "214:12:0" - } - ] - }, - "functionSelector": "04bc52f8", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "155:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "159:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "159:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "178:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "170:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "170:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "158:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "202:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "202:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "201:9:0" - }, - "scope": 32, - "src": "146:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "304:26:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 26, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "318:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 27, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 25, - "name": "foo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "314:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "314:9:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 29, - "nodeType": "Return", - "src": "307:16:0" - } - ] - }, - "functionSelector": "ae42e951", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "bar", - "nameLocation": "248:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "260:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "252:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "252:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "271:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "263:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "263:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "251:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "295:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "295:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "294:9:0" - }, - "scope": 32, - "src": "239:91:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:232:0", - "usedErrors": [] - } - ], - "src": "41:292:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/SwapArgumentsFunctionMutation/SwapArgumentsFunctionMutation.sol","exportedSymbols":{"SwapArgumentsFunctionMutation":[32]},"id":33,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"SwapArgumentsFunctionMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":32,"linearizedBaseContracts":[32],"name":"SwapArgumentsFunctionMutation","nameLocation":"109:29:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":15,"nodeType":"Block","src":"211:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":13,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":11,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"221:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"id":12,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"225:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"221:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":10,"id":14,"nodeType":"Return","src":"214:12:0"}]},"functionSelector":"04bc52f8","id":16,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"155:3:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"167:1:0","nodeType":"VariableDeclaration","scope":16,"src":"159:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"159:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"y","nameLocation":"178:1:0","nodeType":"VariableDeclaration","scope":16,"src":"170:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"170:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"158:22:0"},"returnParameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":16,"src":"202:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint256","nodeType":"ElementaryTypeName","src":"202:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"201:9:0"},"scope":32,"src":"146:87:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":30,"nodeType":"Block","src":"304:26:0","statements":[{"expression":{"arguments":[{"id":26,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"318:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":27,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"321:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":25,"name":"foo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":16,"src":"314:3:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"314:9:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":24,"id":29,"nodeType":"Return","src":"307:16:0"}]},"functionSelector":"ae42e951","id":31,"implemented":true,"kind":"function","modifiers":[],"name":"bar","nameLocation":"248:3:0","nodeType":"FunctionDefinition","parameters":{"id":21,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"x","nameLocation":"260:1:0","nodeType":"VariableDeclaration","scope":31,"src":"252:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"252:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":20,"mutability":"mutable","name":"y","nameLocation":"271:1:0","nodeType":"VariableDeclaration","scope":31,"src":"263:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":19,"name":"uint256","nodeType":"ElementaryTypeName","src":"263:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"251:22:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[{"constant":false,"id":23,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":31,"src":"295:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":22,"name":"uint256","nodeType":"ElementaryTypeName","src":"295:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"294:9:0"},"scope":32,"src":"239:91:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":33,"src":"100:232:0","usedErrors":[],"usedEvents":[]}],"src":"41:292:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/SwapArgumentsFunctionMutation.sol_json.ast.json b/resources/regressions/all.gconf/input_json/SwapArgumentsFunctionMutation.sol_json.ast.json index 424e74b0..c89ab1fb 100644 --- a/resources/regressions/all.gconf/input_json/SwapArgumentsFunctionMutation.sol_json.ast.json +++ b/resources/regressions/all.gconf/input_json/SwapArgumentsFunctionMutation.sol_json.ast.json @@ -1,458 +1 @@ -{ - "absolutePath": "benchmarks/SwapArgumentsFunctionMutation/SwapArgumentsFunctionMutation.sol", - "exportedSymbols": - { - "SwapArgumentsFunctionMutation": - [ - 32 - ] - }, - "id": 33, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "SwapArgumentsFunctionMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 32, - "linearizedBaseContracts": - [ - 32 - ], - "name": "SwapArgumentsFunctionMutation", - "nameLocation": "109:29:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "211:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "221:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "225:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "221:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "214:12:0" - } - ] - }, - "functionSelector": "04bc52f8", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "155:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "159:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "159:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "178:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "170:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "170:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "158:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "202:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "202:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "201:9:0" - }, - "scope": 32, - "src": "146:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 30, - "nodeType": "Block", - "src": "304:26:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "id": 26, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "318:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - { - "id": 27, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - ], - "id": 25, - "name": "foo", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 16, - "src": "314:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$", - "typeString": "function (uint256,uint256) pure returns (uint256)" - } - }, - "id": 28, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "314:9:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 29, - "nodeType": "Return", - "src": "307:16:0" - } - ] - }, - "functionSelector": "ae42e951", - "id": 31, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "bar", - "nameLocation": "248:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "260:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "252:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "252:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "271:1:0", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "263:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "263:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "251:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 31, - "src": "295:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "295:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "294:9:0" - }, - "scope": 32, - "src": "239:91:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 33, - "src": "100:232:0", - "usedErrors": [] - } - ], - "src": "41:292:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/SwapArgumentsFunctionMutation/SwapArgumentsFunctionMutation.sol","exportedSymbols":{"SwapArgumentsFunctionMutation":[32]},"id":33,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"SwapArgumentsFunctionMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":32,"linearizedBaseContracts":[32],"name":"SwapArgumentsFunctionMutation","nameLocation":"109:29:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":15,"nodeType":"Block","src":"211:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":13,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":11,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"221:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"id":12,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"225:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"221:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":10,"id":14,"nodeType":"Return","src":"214:12:0"}]},"functionSelector":"04bc52f8","id":16,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"155:3:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"167:1:0","nodeType":"VariableDeclaration","scope":16,"src":"159:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"159:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"y","nameLocation":"178:1:0","nodeType":"VariableDeclaration","scope":16,"src":"170:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"170:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"158:22:0"},"returnParameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":16,"src":"202:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint256","nodeType":"ElementaryTypeName","src":"202:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"201:9:0"},"scope":32,"src":"146:87:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":30,"nodeType":"Block","src":"304:26:0","statements":[{"expression":{"arguments":[{"id":26,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"318:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},{"id":27,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"321:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_uint256","typeString":"uint256"},{"typeIdentifier":"t_uint256","typeString":"uint256"}],"id":25,"name":"foo","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":16,"src":"314:3:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_uint256_$_t_uint256_$returns$_t_uint256_$","typeString":"function (uint256,uint256) pure returns (uint256)"}},"id":28,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"314:9:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":24,"id":29,"nodeType":"Return","src":"307:16:0"}]},"functionSelector":"ae42e951","id":31,"implemented":true,"kind":"function","modifiers":[],"name":"bar","nameLocation":"248:3:0","nodeType":"FunctionDefinition","parameters":{"id":21,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"x","nameLocation":"260:1:0","nodeType":"VariableDeclaration","scope":31,"src":"252:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"252:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":20,"mutability":"mutable","name":"y","nameLocation":"271:1:0","nodeType":"VariableDeclaration","scope":31,"src":"263:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":19,"name":"uint256","nodeType":"ElementaryTypeName","src":"263:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"251:22:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[{"constant":false,"id":23,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":31,"src":"295:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":22,"name":"uint256","nodeType":"ElementaryTypeName","src":"295:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"294:9:0"},"scope":32,"src":"239:91:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":33,"src":"100:232:0","usedErrors":[],"usedEvents":[]}],"src":"41:292:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/SwapArgumentsOperatorMutation.sol_json.ast b/resources/regressions/all.gconf/input_json/SwapArgumentsOperatorMutation.sol_json.ast index 3aa15701..7079f4a1 100644 --- a/resources/regressions/all.gconf/input_json/SwapArgumentsOperatorMutation.sol_json.ast +++ b/resources/regressions/all.gconf/input_json/SwapArgumentsOperatorMutation.sol_json.ast @@ -1,1931 +1 @@ -{ - "absolutePath": "benchmarks/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "exportedSymbols": - { - "SwapArgumentsOperatorMutation": - [ - 143 - ] - }, - "id": 144, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "SwapArgumentsOperatorMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 143, - "linearizedBaseContracts": - [ - 143 - ], - "name": "SwapArgumentsOperatorMutation", - "nameLocation": "109:29:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "220:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "230:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "234:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "230:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "223:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "154:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "176:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "168:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "168:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "187:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "179:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "179:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "167:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "211:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "211:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "210:9:0" - }, - "scope": 143, - "src": "145:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "324:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "334:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "338:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "334:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "327:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "261:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "280:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "272:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "272:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "291:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "283:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "283:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "271:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "315:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "315:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "314:9:0" - }, - "scope": 143, - "src": "252:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "426:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "436:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "440:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "436:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "429:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "365:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "382:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "374:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "374:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "393:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "385:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "385:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "373:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "417:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "417:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "416:9:0" - }, - "scope": 143, - "src": "356:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "536:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "546:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "551:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "546:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "539:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "467:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "492:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "484:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "484:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "503:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "495:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "495:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "483:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "527:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "527:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "526:9:0" - }, - "scope": 143, - "src": "458:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "632:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "642:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "646:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "642:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "635:12:0" - } - ] - }, - "functionSelector": "7ab4f1c3", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myGT", - "nameLocation": "578:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "591:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "583:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "583:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "602:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "594:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "594:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "582:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "626:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 64, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "626:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "625:6:0" - }, - "scope": 143, - "src": "569:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "727:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "737:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "741:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "737:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "730:12:0" - } - ] - }, - "functionSelector": "ba16f592", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myLT", - "nameLocation": "673:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "686:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "678:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "678:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "697:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "689:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "689:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "677:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "721:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 78, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "721:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "720:6:0" - }, - "scope": 143, - "src": "664:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 99, - "nodeType": "Block", - "src": "822:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 97, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 95, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "832:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": - { - "id": 96, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "837:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "832:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 94, - "id": 98, - "nodeType": "Return", - "src": "825:13:0" - } - ] - }, - "functionSelector": "eaa91dbe", - "id": 100, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myGE", - "nameLocation": "768:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 91, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 88, - "mutability": "mutable", - "name": "x", - "nameLocation": "781:1:0", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "773:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 87, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 90, - "mutability": "mutable", - "name": "y", - "nameLocation": "792:1:0", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "784:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 89, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "784:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "772:22:0" - }, - "returnParameters": - { - "id": 94, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 93, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "816:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 92, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "816:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "815:6:0" - }, - "scope": 143, - "src": "759:86:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 113, - "nodeType": "Block", - "src": "918:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 109, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 102, - "src": "928:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": - { - "id": 110, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "933:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "928:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 108, - "id": 112, - "nodeType": "Return", - "src": "921:13:0" - } - ] - }, - "functionSelector": "33e88407", - "id": 114, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myLE", - "nameLocation": "864:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 105, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 102, - "mutability": "mutable", - "name": "x", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "869:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 101, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "869:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "y", - "nameLocation": "888:1:0", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "880:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 103, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "880:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "868:22:0" - }, - "returnParameters": - { - "id": 108, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 107, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "912:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 106, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "912:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "911:6:0" - }, - "scope": 143, - "src": "855:86:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 127, - "nodeType": "Block", - "src": "1014:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 123, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1024:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": - { - "id": 124, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1029:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1024:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 122, - "id": 126, - "nodeType": "Return", - "src": "1017:13:0" - } - ] - }, - "functionSelector": "5d58009c", - "id": 128, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySAL", - "nameLocation": "956:5:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 119, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 116, - "mutability": "mutable", - "name": "x", - "nameLocation": "970:1:0", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "962:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 115, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "962:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 118, - "mutability": "mutable", - "name": "y", - "nameLocation": "981:1:0", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "973:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 117, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "973:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "961:22:0" - }, - "returnParameters": - { - "id": 122, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 121, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "1005:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 120, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1005:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1004:9:0" - }, - "scope": 143, - "src": "947:90:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 141, - "nodeType": "Block", - "src": "1110:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 137, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1120:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": - { - "id": 138, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1125:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1120:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 136, - "id": 140, - "nodeType": "Return", - "src": "1113:13:0" - } - ] - }, - "functionSelector": "ad6b48dc", - "id": 142, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySAR", - "nameLocation": "1052:5:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 133, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 130, - "mutability": "mutable", - "name": "x", - "nameLocation": "1066:1:0", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1058:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 129, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1058:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "mutability": "mutable", - "name": "y", - "nameLocation": "1077:1:0", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1069:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 131, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1069:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1057:22:0" - }, - "returnParameters": - { - "id": 136, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 135, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1101:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1101:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1100:9:0" - }, - "scope": 143, - "src": "1043:90:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 144, - "src": "100:1035:0", - "usedErrors": [] - } - ], - "src": "41:1095:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol","exportedSymbols":{"SwapArgumentsOperatorMutation":[143]},"id":144,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"SwapArgumentsOperatorMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":143,"linearizedBaseContracts":[143],"name":"SwapArgumentsOperatorMutation","nameLocation":"109:29:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":15,"nodeType":"Block","src":"220:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":13,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":11,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"230:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"id":12,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"234:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"230:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":10,"id":14,"nodeType":"Return","src":"223:12:0"}]},"functionSelector":"b3d09aaa","id":16,"implemented":true,"kind":"function","modifiers":[],"name":"mySubtraction","nameLocation":"154:13:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"176:1:0","nodeType":"VariableDeclaration","scope":16,"src":"168:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"168:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"y","nameLocation":"187:1:0","nodeType":"VariableDeclaration","scope":16,"src":"179:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"179:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"167:22:0"},"returnParameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":16,"src":"211:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint256","nodeType":"ElementaryTypeName","src":"211:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"210:9:0"},"scope":143,"src":"145:97:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":29,"nodeType":"Block","src":"324:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":27,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":25,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"334:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"id":26,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"338:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"334:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":24,"id":28,"nodeType":"Return","src":"327:12:0"}]},"functionSelector":"9d4f4e60","id":30,"implemented":true,"kind":"function","modifiers":[],"name":"myDivision","nameLocation":"261:10:0","nodeType":"FunctionDefinition","parameters":{"id":21,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"x","nameLocation":"280:1:0","nodeType":"VariableDeclaration","scope":30,"src":"272:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"272:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":20,"mutability":"mutable","name":"y","nameLocation":"291:1:0","nodeType":"VariableDeclaration","scope":30,"src":"283:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":19,"name":"uint256","nodeType":"ElementaryTypeName","src":"283:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"271:22:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[{"constant":false,"id":23,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":30,"src":"315:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":22,"name":"uint256","nodeType":"ElementaryTypeName","src":"315:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"314:9:0"},"scope":143,"src":"252:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":43,"nodeType":"Block","src":"426:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":41,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":39,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":32,"src":"436:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"id":40,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":34,"src":"440:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"436:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":38,"id":42,"nodeType":"Return","src":"429:12:0"}]},"functionSelector":"dc6092a8","id":44,"implemented":true,"kind":"function","modifiers":[],"name":"myModulo","nameLocation":"365:8:0","nodeType":"FunctionDefinition","parameters":{"id":35,"nodeType":"ParameterList","parameters":[{"constant":false,"id":32,"mutability":"mutable","name":"x","nameLocation":"382:1:0","nodeType":"VariableDeclaration","scope":44,"src":"374:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":31,"name":"uint256","nodeType":"ElementaryTypeName","src":"374:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":34,"mutability":"mutable","name":"y","nameLocation":"393:1:0","nodeType":"VariableDeclaration","scope":44,"src":"385:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":33,"name":"uint256","nodeType":"ElementaryTypeName","src":"385:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"373:22:0"},"returnParameters":{"id":38,"nodeType":"ParameterList","parameters":[{"constant":false,"id":37,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":44,"src":"417:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":36,"name":"uint256","nodeType":"ElementaryTypeName","src":"417:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"416:9:0"},"scope":143,"src":"356:92:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":57,"nodeType":"Block","src":"536:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":53,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":46,"src":"546:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":54,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":48,"src":"551:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"546:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":52,"id":56,"nodeType":"Return","src":"539:13:0"}]},"functionSelector":"df159c7b","id":58,"implemented":true,"kind":"function","modifiers":[],"name":"myExponentiation","nameLocation":"467:16:0","nodeType":"FunctionDefinition","parameters":{"id":49,"nodeType":"ParameterList","parameters":[{"constant":false,"id":46,"mutability":"mutable","name":"x","nameLocation":"492:1:0","nodeType":"VariableDeclaration","scope":58,"src":"484:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":45,"name":"uint256","nodeType":"ElementaryTypeName","src":"484:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":48,"mutability":"mutable","name":"y","nameLocation":"503:1:0","nodeType":"VariableDeclaration","scope":58,"src":"495:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":47,"name":"uint256","nodeType":"ElementaryTypeName","src":"495:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"483:22:0"},"returnParameters":{"id":52,"nodeType":"ParameterList","parameters":[{"constant":false,"id":51,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":58,"src":"527:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":50,"name":"uint256","nodeType":"ElementaryTypeName","src":"527:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"526:9:0"},"scope":143,"src":"458:101:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":71,"nodeType":"Block","src":"632:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":69,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":67,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"642:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"id":68,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":62,"src":"646:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"642:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":66,"id":70,"nodeType":"Return","src":"635:12:0"}]},"functionSelector":"7ab4f1c3","id":72,"implemented":true,"kind":"function","modifiers":[],"name":"myGT","nameLocation":"578:4:0","nodeType":"FunctionDefinition","parameters":{"id":63,"nodeType":"ParameterList","parameters":[{"constant":false,"id":60,"mutability":"mutable","name":"x","nameLocation":"591:1:0","nodeType":"VariableDeclaration","scope":72,"src":"583:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":59,"name":"uint256","nodeType":"ElementaryTypeName","src":"583:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":62,"mutability":"mutable","name":"y","nameLocation":"602:1:0","nodeType":"VariableDeclaration","scope":72,"src":"594:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":61,"name":"uint256","nodeType":"ElementaryTypeName","src":"594:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"582:22:0"},"returnParameters":{"id":66,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":72,"src":"626:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":64,"name":"bool","nodeType":"ElementaryTypeName","src":"626:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"625:6:0"},"scope":143,"src":"569:85:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":85,"nodeType":"Block","src":"727:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":83,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":81,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"737:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"id":82,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":76,"src":"741:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"737:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":80,"id":84,"nodeType":"Return","src":"730:12:0"}]},"functionSelector":"ba16f592","id":86,"implemented":true,"kind":"function","modifiers":[],"name":"myLT","nameLocation":"673:4:0","nodeType":"FunctionDefinition","parameters":{"id":77,"nodeType":"ParameterList","parameters":[{"constant":false,"id":74,"mutability":"mutable","name":"x","nameLocation":"686:1:0","nodeType":"VariableDeclaration","scope":86,"src":"678:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"678:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":76,"mutability":"mutable","name":"y","nameLocation":"697:1:0","nodeType":"VariableDeclaration","scope":86,"src":"689:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":75,"name":"uint256","nodeType":"ElementaryTypeName","src":"689:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"677:22:0"},"returnParameters":{"id":80,"nodeType":"ParameterList","parameters":[{"constant":false,"id":79,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":86,"src":"721:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":78,"name":"bool","nodeType":"ElementaryTypeName","src":"721:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"720:6:0"},"scope":143,"src":"664:85:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":99,"nodeType":"Block","src":"822:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":97,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":95,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":88,"src":"832:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"id":96,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"837:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"832:6:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":94,"id":98,"nodeType":"Return","src":"825:13:0"}]},"functionSelector":"eaa91dbe","id":100,"implemented":true,"kind":"function","modifiers":[],"name":"myGE","nameLocation":"768:4:0","nodeType":"FunctionDefinition","parameters":{"id":91,"nodeType":"ParameterList","parameters":[{"constant":false,"id":88,"mutability":"mutable","name":"x","nameLocation":"781:1:0","nodeType":"VariableDeclaration","scope":100,"src":"773:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":87,"name":"uint256","nodeType":"ElementaryTypeName","src":"773:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":90,"mutability":"mutable","name":"y","nameLocation":"792:1:0","nodeType":"VariableDeclaration","scope":100,"src":"784:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":89,"name":"uint256","nodeType":"ElementaryTypeName","src":"784:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"772:22:0"},"returnParameters":{"id":94,"nodeType":"ParameterList","parameters":[{"constant":false,"id":93,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":100,"src":"816:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":92,"name":"bool","nodeType":"ElementaryTypeName","src":"816:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"815:6:0"},"scope":143,"src":"759:86:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":113,"nodeType":"Block","src":"918:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":111,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":109,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":102,"src":"928:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"id":110,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":104,"src":"933:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"928:6:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":108,"id":112,"nodeType":"Return","src":"921:13:0"}]},"functionSelector":"33e88407","id":114,"implemented":true,"kind":"function","modifiers":[],"name":"myLE","nameLocation":"864:4:0","nodeType":"FunctionDefinition","parameters":{"id":105,"nodeType":"ParameterList","parameters":[{"constant":false,"id":102,"mutability":"mutable","name":"x","nameLocation":"877:1:0","nodeType":"VariableDeclaration","scope":114,"src":"869:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":101,"name":"uint256","nodeType":"ElementaryTypeName","src":"869:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":104,"mutability":"mutable","name":"y","nameLocation":"888:1:0","nodeType":"VariableDeclaration","scope":114,"src":"880:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":103,"name":"uint256","nodeType":"ElementaryTypeName","src":"880:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"868:22:0"},"returnParameters":{"id":108,"nodeType":"ParameterList","parameters":[{"constant":false,"id":107,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":114,"src":"912:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":106,"name":"bool","nodeType":"ElementaryTypeName","src":"912:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"911:6:0"},"scope":143,"src":"855:86:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":127,"nodeType":"Block","src":"1014:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":125,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":123,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":116,"src":"1024:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"id":124,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":118,"src":"1029:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1024:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":122,"id":126,"nodeType":"Return","src":"1017:13:0"}]},"functionSelector":"5d58009c","id":128,"implemented":true,"kind":"function","modifiers":[],"name":"mySAL","nameLocation":"956:5:0","nodeType":"FunctionDefinition","parameters":{"id":119,"nodeType":"ParameterList","parameters":[{"constant":false,"id":116,"mutability":"mutable","name":"x","nameLocation":"970:1:0","nodeType":"VariableDeclaration","scope":128,"src":"962:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":115,"name":"uint256","nodeType":"ElementaryTypeName","src":"962:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":118,"mutability":"mutable","name":"y","nameLocation":"981:1:0","nodeType":"VariableDeclaration","scope":128,"src":"973:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":117,"name":"uint256","nodeType":"ElementaryTypeName","src":"973:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"961:22:0"},"returnParameters":{"id":122,"nodeType":"ParameterList","parameters":[{"constant":false,"id":121,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":128,"src":"1005:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":120,"name":"uint256","nodeType":"ElementaryTypeName","src":"1005:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"1004:9:0"},"scope":143,"src":"947:90:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":141,"nodeType":"Block","src":"1110:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":139,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":137,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":130,"src":"1120:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"id":138,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":132,"src":"1125:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1120:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":136,"id":140,"nodeType":"Return","src":"1113:13:0"}]},"functionSelector":"ad6b48dc","id":142,"implemented":true,"kind":"function","modifiers":[],"name":"mySAR","nameLocation":"1052:5:0","nodeType":"FunctionDefinition","parameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":130,"mutability":"mutable","name":"x","nameLocation":"1066:1:0","nodeType":"VariableDeclaration","scope":142,"src":"1058:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":129,"name":"uint256","nodeType":"ElementaryTypeName","src":"1058:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":132,"mutability":"mutable","name":"y","nameLocation":"1077:1:0","nodeType":"VariableDeclaration","scope":142,"src":"1069:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":131,"name":"uint256","nodeType":"ElementaryTypeName","src":"1069:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"1057:22:0"},"returnParameters":{"id":136,"nodeType":"ParameterList","parameters":[{"constant":false,"id":135,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":142,"src":"1101:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":134,"name":"uint256","nodeType":"ElementaryTypeName","src":"1101:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"1100:9:0"},"scope":143,"src":"1043:90:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":144,"src":"100:1035:0","usedErrors":[],"usedEvents":[]}],"src":"41:1095:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/SwapArgumentsOperatorMutation.sol_json.ast.json b/resources/regressions/all.gconf/input_json/SwapArgumentsOperatorMutation.sol_json.ast.json index 3aa15701..7079f4a1 100644 --- a/resources/regressions/all.gconf/input_json/SwapArgumentsOperatorMutation.sol_json.ast.json +++ b/resources/regressions/all.gconf/input_json/SwapArgumentsOperatorMutation.sol_json.ast.json @@ -1,1931 +1 @@ -{ - "absolutePath": "benchmarks/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol", - "exportedSymbols": - { - "SwapArgumentsOperatorMutation": - [ - 143 - ] - }, - "id": 144, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "SwapArgumentsOperatorMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 143, - "linearizedBaseContracts": - [ - 143 - ], - "name": "SwapArgumentsOperatorMutation", - "nameLocation": "109:29:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "220:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "230:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "234:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "230:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "223:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "154:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "176:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "168:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "168:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "187:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "179:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "179:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "167:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "211:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "211:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "210:9:0" - }, - "scope": 143, - "src": "145:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "324:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "334:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "338:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "334:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "327:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "261:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "280:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "272:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "272:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "291:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "283:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "283:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "271:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "315:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "315:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "314:9:0" - }, - "scope": 143, - "src": "252:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "426:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "436:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "440:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "436:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "429:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "365:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "382:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "374:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "374:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "393:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "385:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "385:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "373:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "417:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "417:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "416:9:0" - }, - "scope": 143, - "src": "356:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "536:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "546:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "551:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "546:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "539:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "467:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "492:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "484:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "484:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "503:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "495:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "495:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "483:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "527:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "527:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "526:9:0" - }, - "scope": 143, - "src": "458:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "632:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "642:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "646:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "642:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "635:12:0" - } - ] - }, - "functionSelector": "7ab4f1c3", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myGT", - "nameLocation": "578:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "591:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "583:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "583:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "602:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "594:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "594:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "582:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "626:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 64, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "626:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "625:6:0" - }, - "scope": 143, - "src": "569:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "727:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "737:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "741:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "737:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "730:12:0" - } - ] - }, - "functionSelector": "ba16f592", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myLT", - "nameLocation": "673:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "686:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "678:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "678:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "697:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "689:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "689:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "677:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "721:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 78, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "721:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "720:6:0" - }, - "scope": 143, - "src": "664:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 99, - "nodeType": "Block", - "src": "822:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 97, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 95, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 88, - "src": "832:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">=", - "rightExpression": - { - "id": 96, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 90, - "src": "837:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "832:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 94, - "id": 98, - "nodeType": "Return", - "src": "825:13:0" - } - ] - }, - "functionSelector": "eaa91dbe", - "id": 100, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myGE", - "nameLocation": "768:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 91, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 88, - "mutability": "mutable", - "name": "x", - "nameLocation": "781:1:0", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "773:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 87, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 90, - "mutability": "mutable", - "name": "y", - "nameLocation": "792:1:0", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "784:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 89, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "784:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "772:22:0" - }, - "returnParameters": - { - "id": 94, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 93, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 100, - "src": "816:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 92, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "816:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "815:6:0" - }, - "scope": 143, - "src": "759:86:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 113, - "nodeType": "Block", - "src": "918:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 109, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 102, - "src": "928:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<=", - "rightExpression": - { - "id": 110, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "933:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "928:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "functionReturnParameters": 108, - "id": 112, - "nodeType": "Return", - "src": "921:13:0" - } - ] - }, - "functionSelector": "33e88407", - "id": 114, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myLE", - "nameLocation": "864:4:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 105, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 102, - "mutability": "mutable", - "name": "x", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "869:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 101, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "869:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "y", - "nameLocation": "888:1:0", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "880:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 103, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "880:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "868:22:0" - }, - "returnParameters": - { - "id": 108, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 107, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 114, - "src": "912:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - }, - "typeName": - { - "id": 106, - "name": "bool", - "nodeType": "ElementaryTypeName", - "src": "912:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - }, - "visibility": "internal" - } - ], - "src": "911:6:0" - }, - "scope": 143, - "src": "855:86:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 127, - "nodeType": "Block", - "src": "1014:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 125, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 123, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 116, - "src": "1024:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "<<", - "rightExpression": - { - "id": 124, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 118, - "src": "1029:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1024:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 122, - "id": 126, - "nodeType": "Return", - "src": "1017:13:0" - } - ] - }, - "functionSelector": "5d58009c", - "id": 128, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySAL", - "nameLocation": "956:5:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 119, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 116, - "mutability": "mutable", - "name": "x", - "nameLocation": "970:1:0", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "962:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 115, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "962:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 118, - "mutability": "mutable", - "name": "y", - "nameLocation": "981:1:0", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "973:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 117, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "973:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "961:22:0" - }, - "returnParameters": - { - "id": 122, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 121, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 128, - "src": "1005:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 120, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1005:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1004:9:0" - }, - "scope": 143, - "src": "947:90:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 141, - "nodeType": "Block", - "src": "1110:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 139, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 137, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 130, - "src": "1120:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": ">>", - "rightExpression": - { - "id": 138, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 132, - "src": "1125:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "1120:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 136, - "id": 140, - "nodeType": "Return", - "src": "1113:13:0" - } - ] - }, - "functionSelector": "ad6b48dc", - "id": 142, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySAR", - "nameLocation": "1052:5:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 133, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 130, - "mutability": "mutable", - "name": "x", - "nameLocation": "1066:1:0", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1058:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 129, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1058:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 132, - "mutability": "mutable", - "name": "y", - "nameLocation": "1077:1:0", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1069:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 131, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1069:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1057:22:0" - }, - "returnParameters": - { - "id": 136, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 135, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 142, - "src": "1101:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 134, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "1101:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "1100:9:0" - }, - "scope": 143, - "src": "1043:90:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 144, - "src": "100:1035:0", - "usedErrors": [] - } - ], - "src": "41:1095:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/SwapArgumentsOperatorMutation/SwapArgumentsOperatorMutation.sol","exportedSymbols":{"SwapArgumentsOperatorMutation":[143]},"id":144,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"SwapArgumentsOperatorMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":143,"linearizedBaseContracts":[143],"name":"SwapArgumentsOperatorMutation","nameLocation":"109:29:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":15,"nodeType":"Block","src":"220:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":13,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":11,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"230:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"id":12,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"234:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"230:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":10,"id":14,"nodeType":"Return","src":"223:12:0"}]},"functionSelector":"b3d09aaa","id":16,"implemented":true,"kind":"function","modifiers":[],"name":"mySubtraction","nameLocation":"154:13:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"176:1:0","nodeType":"VariableDeclaration","scope":16,"src":"168:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"168:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"y","nameLocation":"187:1:0","nodeType":"VariableDeclaration","scope":16,"src":"179:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"179:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"167:22:0"},"returnParameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":16,"src":"211:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint256","nodeType":"ElementaryTypeName","src":"211:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"210:9:0"},"scope":143,"src":"145:97:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":29,"nodeType":"Block","src":"324:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":27,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":25,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"334:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"id":26,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"338:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"334:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":24,"id":28,"nodeType":"Return","src":"327:12:0"}]},"functionSelector":"9d4f4e60","id":30,"implemented":true,"kind":"function","modifiers":[],"name":"myDivision","nameLocation":"261:10:0","nodeType":"FunctionDefinition","parameters":{"id":21,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"x","nameLocation":"280:1:0","nodeType":"VariableDeclaration","scope":30,"src":"272:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"272:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":20,"mutability":"mutable","name":"y","nameLocation":"291:1:0","nodeType":"VariableDeclaration","scope":30,"src":"283:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":19,"name":"uint256","nodeType":"ElementaryTypeName","src":"283:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"271:22:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[{"constant":false,"id":23,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":30,"src":"315:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":22,"name":"uint256","nodeType":"ElementaryTypeName","src":"315:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"314:9:0"},"scope":143,"src":"252:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":43,"nodeType":"Block","src":"426:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":41,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":39,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":32,"src":"436:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"id":40,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":34,"src":"440:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"436:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":38,"id":42,"nodeType":"Return","src":"429:12:0"}]},"functionSelector":"dc6092a8","id":44,"implemented":true,"kind":"function","modifiers":[],"name":"myModulo","nameLocation":"365:8:0","nodeType":"FunctionDefinition","parameters":{"id":35,"nodeType":"ParameterList","parameters":[{"constant":false,"id":32,"mutability":"mutable","name":"x","nameLocation":"382:1:0","nodeType":"VariableDeclaration","scope":44,"src":"374:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":31,"name":"uint256","nodeType":"ElementaryTypeName","src":"374:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":34,"mutability":"mutable","name":"y","nameLocation":"393:1:0","nodeType":"VariableDeclaration","scope":44,"src":"385:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":33,"name":"uint256","nodeType":"ElementaryTypeName","src":"385:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"373:22:0"},"returnParameters":{"id":38,"nodeType":"ParameterList","parameters":[{"constant":false,"id":37,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":44,"src":"417:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":36,"name":"uint256","nodeType":"ElementaryTypeName","src":"417:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"416:9:0"},"scope":143,"src":"356:92:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":57,"nodeType":"Block","src":"536:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":53,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":46,"src":"546:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":54,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":48,"src":"551:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"546:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":52,"id":56,"nodeType":"Return","src":"539:13:0"}]},"functionSelector":"df159c7b","id":58,"implemented":true,"kind":"function","modifiers":[],"name":"myExponentiation","nameLocation":"467:16:0","nodeType":"FunctionDefinition","parameters":{"id":49,"nodeType":"ParameterList","parameters":[{"constant":false,"id":46,"mutability":"mutable","name":"x","nameLocation":"492:1:0","nodeType":"VariableDeclaration","scope":58,"src":"484:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":45,"name":"uint256","nodeType":"ElementaryTypeName","src":"484:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":48,"mutability":"mutable","name":"y","nameLocation":"503:1:0","nodeType":"VariableDeclaration","scope":58,"src":"495:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":47,"name":"uint256","nodeType":"ElementaryTypeName","src":"495:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"483:22:0"},"returnParameters":{"id":52,"nodeType":"ParameterList","parameters":[{"constant":false,"id":51,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":58,"src":"527:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":50,"name":"uint256","nodeType":"ElementaryTypeName","src":"527:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"526:9:0"},"scope":143,"src":"458:101:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":71,"nodeType":"Block","src":"632:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":69,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":67,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"642:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">","rightExpression":{"id":68,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":62,"src":"646:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"642:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":66,"id":70,"nodeType":"Return","src":"635:12:0"}]},"functionSelector":"7ab4f1c3","id":72,"implemented":true,"kind":"function","modifiers":[],"name":"myGT","nameLocation":"578:4:0","nodeType":"FunctionDefinition","parameters":{"id":63,"nodeType":"ParameterList","parameters":[{"constant":false,"id":60,"mutability":"mutable","name":"x","nameLocation":"591:1:0","nodeType":"VariableDeclaration","scope":72,"src":"583:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":59,"name":"uint256","nodeType":"ElementaryTypeName","src":"583:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":62,"mutability":"mutable","name":"y","nameLocation":"602:1:0","nodeType":"VariableDeclaration","scope":72,"src":"594:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":61,"name":"uint256","nodeType":"ElementaryTypeName","src":"594:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"582:22:0"},"returnParameters":{"id":66,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":72,"src":"626:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":64,"name":"bool","nodeType":"ElementaryTypeName","src":"626:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"625:6:0"},"scope":143,"src":"569:85:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":85,"nodeType":"Block","src":"727:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":83,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":81,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"737:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<","rightExpression":{"id":82,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":76,"src":"741:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"737:5:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":80,"id":84,"nodeType":"Return","src":"730:12:0"}]},"functionSelector":"ba16f592","id":86,"implemented":true,"kind":"function","modifiers":[],"name":"myLT","nameLocation":"673:4:0","nodeType":"FunctionDefinition","parameters":{"id":77,"nodeType":"ParameterList","parameters":[{"constant":false,"id":74,"mutability":"mutable","name":"x","nameLocation":"686:1:0","nodeType":"VariableDeclaration","scope":86,"src":"678:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"678:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":76,"mutability":"mutable","name":"y","nameLocation":"697:1:0","nodeType":"VariableDeclaration","scope":86,"src":"689:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":75,"name":"uint256","nodeType":"ElementaryTypeName","src":"689:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"677:22:0"},"returnParameters":{"id":80,"nodeType":"ParameterList","parameters":[{"constant":false,"id":79,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":86,"src":"721:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":78,"name":"bool","nodeType":"ElementaryTypeName","src":"721:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"720:6:0"},"scope":143,"src":"664:85:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":99,"nodeType":"Block","src":"822:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":97,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":95,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":88,"src":"832:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">=","rightExpression":{"id":96,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":90,"src":"837:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"832:6:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":94,"id":98,"nodeType":"Return","src":"825:13:0"}]},"functionSelector":"eaa91dbe","id":100,"implemented":true,"kind":"function","modifiers":[],"name":"myGE","nameLocation":"768:4:0","nodeType":"FunctionDefinition","parameters":{"id":91,"nodeType":"ParameterList","parameters":[{"constant":false,"id":88,"mutability":"mutable","name":"x","nameLocation":"781:1:0","nodeType":"VariableDeclaration","scope":100,"src":"773:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":87,"name":"uint256","nodeType":"ElementaryTypeName","src":"773:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":90,"mutability":"mutable","name":"y","nameLocation":"792:1:0","nodeType":"VariableDeclaration","scope":100,"src":"784:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":89,"name":"uint256","nodeType":"ElementaryTypeName","src":"784:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"772:22:0"},"returnParameters":{"id":94,"nodeType":"ParameterList","parameters":[{"constant":false,"id":93,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":100,"src":"816:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":92,"name":"bool","nodeType":"ElementaryTypeName","src":"816:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"815:6:0"},"scope":143,"src":"759:86:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":113,"nodeType":"Block","src":"918:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":111,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":109,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":102,"src":"928:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<=","rightExpression":{"id":110,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":104,"src":"933:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"928:6:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"functionReturnParameters":108,"id":112,"nodeType":"Return","src":"921:13:0"}]},"functionSelector":"33e88407","id":114,"implemented":true,"kind":"function","modifiers":[],"name":"myLE","nameLocation":"864:4:0","nodeType":"FunctionDefinition","parameters":{"id":105,"nodeType":"ParameterList","parameters":[{"constant":false,"id":102,"mutability":"mutable","name":"x","nameLocation":"877:1:0","nodeType":"VariableDeclaration","scope":114,"src":"869:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":101,"name":"uint256","nodeType":"ElementaryTypeName","src":"869:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":104,"mutability":"mutable","name":"y","nameLocation":"888:1:0","nodeType":"VariableDeclaration","scope":114,"src":"880:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":103,"name":"uint256","nodeType":"ElementaryTypeName","src":"880:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"868:22:0"},"returnParameters":{"id":108,"nodeType":"ParameterList","parameters":[{"constant":false,"id":107,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":114,"src":"912:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"},"typeName":{"id":106,"name":"bool","nodeType":"ElementaryTypeName","src":"912:4:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}},"visibility":"internal"}],"src":"911:6:0"},"scope":143,"src":"855:86:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":127,"nodeType":"Block","src":"1014:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":125,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":123,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":116,"src":"1024:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"<<","rightExpression":{"id":124,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":118,"src":"1029:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1024:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":122,"id":126,"nodeType":"Return","src":"1017:13:0"}]},"functionSelector":"5d58009c","id":128,"implemented":true,"kind":"function","modifiers":[],"name":"mySAL","nameLocation":"956:5:0","nodeType":"FunctionDefinition","parameters":{"id":119,"nodeType":"ParameterList","parameters":[{"constant":false,"id":116,"mutability":"mutable","name":"x","nameLocation":"970:1:0","nodeType":"VariableDeclaration","scope":128,"src":"962:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":115,"name":"uint256","nodeType":"ElementaryTypeName","src":"962:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":118,"mutability":"mutable","name":"y","nameLocation":"981:1:0","nodeType":"VariableDeclaration","scope":128,"src":"973:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":117,"name":"uint256","nodeType":"ElementaryTypeName","src":"973:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"961:22:0"},"returnParameters":{"id":122,"nodeType":"ParameterList","parameters":[{"constant":false,"id":121,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":128,"src":"1005:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":120,"name":"uint256","nodeType":"ElementaryTypeName","src":"1005:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"1004:9:0"},"scope":143,"src":"947:90:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":141,"nodeType":"Block","src":"1110:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":139,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":137,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":130,"src":"1120:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":">>","rightExpression":{"id":138,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":132,"src":"1125:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"1120:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":136,"id":140,"nodeType":"Return","src":"1113:13:0"}]},"functionSelector":"ad6b48dc","id":142,"implemented":true,"kind":"function","modifiers":[],"name":"mySAR","nameLocation":"1052:5:0","nodeType":"FunctionDefinition","parameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":130,"mutability":"mutable","name":"x","nameLocation":"1066:1:0","nodeType":"VariableDeclaration","scope":142,"src":"1058:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":129,"name":"uint256","nodeType":"ElementaryTypeName","src":"1058:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":132,"mutability":"mutable","name":"y","nameLocation":"1077:1:0","nodeType":"VariableDeclaration","scope":142,"src":"1069:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":131,"name":"uint256","nodeType":"ElementaryTypeName","src":"1069:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"1057:22:0"},"returnParameters":{"id":136,"nodeType":"ParameterList","parameters":[{"constant":false,"id":135,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":142,"src":"1101:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":134,"name":"uint256","nodeType":"ElementaryTypeName","src":"1101:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"1100:9:0"},"scope":143,"src":"1043:90:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":144,"src":"100:1035:0","usedErrors":[],"usedEvents":[]}],"src":"41:1095:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/UnaryOperatorMutation.sol_json.ast b/resources/regressions/all.gconf/input_json/UnaryOperatorMutation.sol_json.ast index 3bea73e6..9bed0b2c 100644 --- a/resources/regressions/all.gconf/input_json/UnaryOperatorMutation.sol_json.ast +++ b/resources/regressions/all.gconf/input_json/UnaryOperatorMutation.sol_json.ast @@ -1,794 +1 @@ -{ - "absolutePath": "benchmarks/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "exportedSymbols": - { - "UnaryOperatorMutation": - [ - 62 - ] - }, - "id": 63, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "UnaryOperatorMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 62, - "linearizedBaseContracts": - [ - 62 - ], - "name": "UnaryOperatorMutation", - "nameLocation": "109:21:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 12, - "nodeType": "Block", - "src": "200:20:0", - "statements": - [ - { - "expression": - { - "id": 10, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "~", - "prefix": true, - "src": "210:3:0", - "subExpression": - { - "id": 9, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "212:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 11, - "nodeType": "Return", - "src": "203:10:0" - } - ] - }, - "functionSelector": "e35bee10", - "id": 13, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myBitwiseNeg", - "nameLocation": "146:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 13, - "src": "159:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "159:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "158:11:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 13, - "src": "191:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "191:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "190:9:0" - }, - "scope": 62, - "src": "137:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 23, - "nodeType": "Block", - "src": "289:20:0", - "statements": - [ - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "299:3:0", - "subExpression": - { - "id": 20, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "301:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 19, - "id": 22, - "nodeType": "Return", - "src": "292:10:0" - } - ] - }, - "functionSelector": "e7e69a10", - "id": 24, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myPrefixIncr", - "nameLocation": "235:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 16, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 15, - "mutability": "mutable", - "name": "x", - "nameLocation": "256:1:0", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "248:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 14, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "248:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "247:11:0" - }, - "returnParameters": - { - "id": 19, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "280:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "280:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "279:9:0" - }, - "scope": 62, - "src": "226:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 34, - "nodeType": "Block", - "src": "378:20:0", - "statements": - [ - { - "expression": - { - "id": 32, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": true, - "src": "388:3:0", - "subExpression": - { - "id": 31, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "390:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 30, - "id": 33, - "nodeType": "Return", - "src": "381:10:0" - } - ] - }, - "functionSelector": "46df6da2", - "id": 35, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myPrefixDecr", - "nameLocation": "324:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 27, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 26, - "mutability": "mutable", - "name": "x", - "nameLocation": "345:1:0", - "nodeType": "VariableDeclaration", - "scope": 35, - "src": "337:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 25, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "337:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "336:11:0" - }, - "returnParameters": - { - "id": 30, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 29, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 35, - "src": "369:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "369:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "368:9:0" - }, - "scope": 62, - "src": "315:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 47, - "nodeType": "Block", - "src": "467:24:0", - "statements": - [ - { - "expression": - { - "id": 43, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "470:3:0", - "subExpression": - { - "id": 42, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "470:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 44, - "nodeType": "ExpressionStatement", - "src": "470:3:0" - }, - { - "expression": - { - "id": 45, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "483:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 41, - "id": 46, - "nodeType": "Return", - "src": "476:8:0" - } - ] - }, - "functionSelector": "4b46ab44", - "id": 48, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySuffixIncr", - "nameLocation": "413:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "x", - "nameLocation": "434:1:0", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "426:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "426:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "425:11:0" - }, - "returnParameters": - { - "id": 41, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 40, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "458:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 39, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "458:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "457:9:0" - }, - "scope": 62, - "src": "404:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 60, - "nodeType": "Block", - "src": "560:24:0", - "statements": - [ - { - "expression": - { - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "563:3:0", - "subExpression": - { - "id": 55, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "563:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 57, - "nodeType": "ExpressionStatement", - "src": "563:3:0" - }, - { - "expression": - { - "id": 58, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "576:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 54, - "id": 59, - "nodeType": "Return", - "src": "569:8:0" - } - ] - }, - "functionSelector": "cb3edb42", - "id": 61, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySuffixDecr", - "nameLocation": "506:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 51, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 50, - "mutability": "mutable", - "name": "x", - "nameLocation": "527:1:0", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "519:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 49, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "519:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "518:11:0" - }, - "returnParameters": - { - "id": 54, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 53, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "551:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 52, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "551:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "550:9:0" - }, - "scope": 62, - "src": "497:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 63, - "src": "100:486:0", - "usedErrors": [] - } - ], - "src": "41:546:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/UnaryOperatorMutation/UnaryOperatorMutation.sol","exportedSymbols":{"UnaryOperatorMutation":[62]},"id":63,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"UnaryOperatorMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":62,"linearizedBaseContracts":[62],"name":"UnaryOperatorMutation","nameLocation":"109:21:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":12,"nodeType":"Block","src":"200:20:0","statements":[{"expression":{"id":10,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"~","prefix":true,"src":"210:3:0","subExpression":{"id":9,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"212:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":11,"nodeType":"Return","src":"203:10:0"}]},"functionSelector":"e35bee10","id":13,"implemented":true,"kind":"function","modifiers":[],"name":"myBitwiseNeg","nameLocation":"146:12:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"167:1:0","nodeType":"VariableDeclaration","scope":13,"src":"159:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"159:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"158:11:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":13,"src":"191:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"191:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"190:9:0"},"scope":62,"src":"137:83:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":23,"nodeType":"Block","src":"289:20:0","statements":[{"expression":{"id":21,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"299:3:0","subExpression":{"id":20,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"301:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":19,"id":22,"nodeType":"Return","src":"292:10:0"}]},"functionSelector":"e7e69a10","id":24,"implemented":true,"kind":"function","modifiers":[],"name":"myPrefixIncr","nameLocation":"235:12:0","nodeType":"FunctionDefinition","parameters":{"id":16,"nodeType":"ParameterList","parameters":[{"constant":false,"id":15,"mutability":"mutable","name":"x","nameLocation":"256:1:0","nodeType":"VariableDeclaration","scope":24,"src":"248:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":14,"name":"uint256","nodeType":"ElementaryTypeName","src":"248:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"247:11:0"},"returnParameters":{"id":19,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":24,"src":"280:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"280:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"279:9:0"},"scope":62,"src":"226:83:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":34,"nodeType":"Block","src":"378:20:0","statements":[{"expression":{"id":32,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"--","prefix":true,"src":"388:3:0","subExpression":{"id":31,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":26,"src":"390:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":30,"id":33,"nodeType":"Return","src":"381:10:0"}]},"functionSelector":"46df6da2","id":35,"implemented":true,"kind":"function","modifiers":[],"name":"myPrefixDecr","nameLocation":"324:12:0","nodeType":"FunctionDefinition","parameters":{"id":27,"nodeType":"ParameterList","parameters":[{"constant":false,"id":26,"mutability":"mutable","name":"x","nameLocation":"345:1:0","nodeType":"VariableDeclaration","scope":35,"src":"337:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":25,"name":"uint256","nodeType":"ElementaryTypeName","src":"337:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"336:11:0"},"returnParameters":{"id":30,"nodeType":"ParameterList","parameters":[{"constant":false,"id":29,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":35,"src":"369:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":28,"name":"uint256","nodeType":"ElementaryTypeName","src":"369:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"368:9:0"},"scope":62,"src":"315:83:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":47,"nodeType":"Block","src":"467:24:0","statements":[{"expression":{"id":43,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"470:3:0","subExpression":{"id":42,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":37,"src":"470:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":44,"nodeType":"ExpressionStatement","src":"470:3:0"},{"expression":{"id":45,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":37,"src":"483:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":41,"id":46,"nodeType":"Return","src":"476:8:0"}]},"functionSelector":"4b46ab44","id":48,"implemented":true,"kind":"function","modifiers":[],"name":"mySuffixIncr","nameLocation":"413:12:0","nodeType":"FunctionDefinition","parameters":{"id":38,"nodeType":"ParameterList","parameters":[{"constant":false,"id":37,"mutability":"mutable","name":"x","nameLocation":"434:1:0","nodeType":"VariableDeclaration","scope":48,"src":"426:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":36,"name":"uint256","nodeType":"ElementaryTypeName","src":"426:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"425:11:0"},"returnParameters":{"id":41,"nodeType":"ParameterList","parameters":[{"constant":false,"id":40,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":48,"src":"458:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":39,"name":"uint256","nodeType":"ElementaryTypeName","src":"458:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"457:9:0"},"scope":62,"src":"404:87:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":60,"nodeType":"Block","src":"560:24:0","statements":[{"expression":{"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"--","prefix":false,"src":"563:3:0","subExpression":{"id":55,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"563:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":57,"nodeType":"ExpressionStatement","src":"563:3:0"},{"expression":{"id":58,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"576:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":54,"id":59,"nodeType":"Return","src":"569:8:0"}]},"functionSelector":"cb3edb42","id":61,"implemented":true,"kind":"function","modifiers":[],"name":"mySuffixDecr","nameLocation":"506:12:0","nodeType":"FunctionDefinition","parameters":{"id":51,"nodeType":"ParameterList","parameters":[{"constant":false,"id":50,"mutability":"mutable","name":"x","nameLocation":"527:1:0","nodeType":"VariableDeclaration","scope":61,"src":"519:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":49,"name":"uint256","nodeType":"ElementaryTypeName","src":"519:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"518:11:0"},"returnParameters":{"id":54,"nodeType":"ParameterList","parameters":[{"constant":false,"id":53,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":61,"src":"551:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":52,"name":"uint256","nodeType":"ElementaryTypeName","src":"551:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"550:9:0"},"scope":62,"src":"497:87:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":63,"src":"100:486:0","usedErrors":[],"usedEvents":[]}],"src":"41:546:0"} \ No newline at end of file diff --git a/resources/regressions/all.gconf/input_json/UnaryOperatorMutation.sol_json.ast.json b/resources/regressions/all.gconf/input_json/UnaryOperatorMutation.sol_json.ast.json index 3bea73e6..9bed0b2c 100644 --- a/resources/regressions/all.gconf/input_json/UnaryOperatorMutation.sol_json.ast.json +++ b/resources/regressions/all.gconf/input_json/UnaryOperatorMutation.sol_json.ast.json @@ -1,794 +1 @@ -{ - "absolutePath": "benchmarks/UnaryOperatorMutation/UnaryOperatorMutation.sol", - "exportedSymbols": - { - "UnaryOperatorMutation": - [ - 62 - ] - }, - "id": 63, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "UnaryOperatorMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 62, - "linearizedBaseContracts": - [ - 62 - ], - "name": "UnaryOperatorMutation", - "nameLocation": "109:21:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 12, - "nodeType": "Block", - "src": "200:20:0", - "statements": - [ - { - "expression": - { - "id": 10, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "~", - "prefix": true, - "src": "210:3:0", - "subExpression": - { - "id": 9, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "212:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 11, - "nodeType": "Return", - "src": "203:10:0" - } - ] - }, - "functionSelector": "e35bee10", - "id": 13, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myBitwiseNeg", - "nameLocation": "146:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "167:1:0", - "nodeType": "VariableDeclaration", - "scope": 13, - "src": "159:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "159:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "158:11:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 13, - "src": "191:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "191:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "190:9:0" - }, - "scope": 62, - "src": "137:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 23, - "nodeType": "Block", - "src": "289:20:0", - "statements": - [ - { - "expression": - { - "id": 21, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": true, - "src": "299:3:0", - "subExpression": - { - "id": 20, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 15, - "src": "301:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 19, - "id": 22, - "nodeType": "Return", - "src": "292:10:0" - } - ] - }, - "functionSelector": "e7e69a10", - "id": 24, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myPrefixIncr", - "nameLocation": "235:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 16, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 15, - "mutability": "mutable", - "name": "x", - "nameLocation": "256:1:0", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "248:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 14, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "248:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "247:11:0" - }, - "returnParameters": - { - "id": 19, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 24, - "src": "280:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "280:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "279:9:0" - }, - "scope": 62, - "src": "226:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 34, - "nodeType": "Block", - "src": "378:20:0", - "statements": - [ - { - "expression": - { - "id": 32, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": true, - "src": "388:3:0", - "subExpression": - { - "id": 31, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 26, - "src": "390:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 30, - "id": 33, - "nodeType": "Return", - "src": "381:10:0" - } - ] - }, - "functionSelector": "46df6da2", - "id": 35, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myPrefixDecr", - "nameLocation": "324:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 27, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 26, - "mutability": "mutable", - "name": "x", - "nameLocation": "345:1:0", - "nodeType": "VariableDeclaration", - "scope": 35, - "src": "337:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 25, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "337:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "336:11:0" - }, - "returnParameters": - { - "id": 30, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 29, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 35, - "src": "369:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 28, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "369:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "368:9:0" - }, - "scope": 62, - "src": "315:83:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 47, - "nodeType": "Block", - "src": "467:24:0", - "statements": - [ - { - "expression": - { - "id": 43, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "++", - "prefix": false, - "src": "470:3:0", - "subExpression": - { - "id": 42, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "470:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 44, - "nodeType": "ExpressionStatement", - "src": "470:3:0" - }, - { - "expression": - { - "id": 45, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 37, - "src": "483:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 41, - "id": 46, - "nodeType": "Return", - "src": "476:8:0" - } - ] - }, - "functionSelector": "4b46ab44", - "id": 48, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySuffixIncr", - "nameLocation": "413:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "x", - "nameLocation": "434:1:0", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "426:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "426:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "425:11:0" - }, - "returnParameters": - { - "id": 41, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 40, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 48, - "src": "458:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 39, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "458:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "457:9:0" - }, - "scope": 62, - "src": "404:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 60, - "nodeType": "Block", - "src": "560:24:0", - "statements": - [ - { - "expression": - { - "id": 56, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "nodeType": "UnaryOperation", - "operator": "--", - "prefix": false, - "src": "563:3:0", - "subExpression": - { - "id": 55, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "563:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "id": 57, - "nodeType": "ExpressionStatement", - "src": "563:3:0" - }, - { - "expression": - { - "id": 58, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 50, - "src": "576:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 54, - "id": 59, - "nodeType": "Return", - "src": "569:8:0" - } - ] - }, - "functionSelector": "cb3edb42", - "id": 61, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySuffixDecr", - "nameLocation": "506:12:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 51, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 50, - "mutability": "mutable", - "name": "x", - "nameLocation": "527:1:0", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "519:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 49, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "519:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "518:11:0" - }, - "returnParameters": - { - "id": 54, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 53, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 61, - "src": "551:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 52, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "551:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "550:9:0" - }, - "scope": 62, - "src": "497:87:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 63, - "src": "100:486:0", - "usedErrors": [] - } - ], - "src": "41:546:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/UnaryOperatorMutation/UnaryOperatorMutation.sol","exportedSymbols":{"UnaryOperatorMutation":[62]},"id":63,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"UnaryOperatorMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":62,"linearizedBaseContracts":[62],"name":"UnaryOperatorMutation","nameLocation":"109:21:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":12,"nodeType":"Block","src":"200:20:0","statements":[{"expression":{"id":10,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"~","prefix":true,"src":"210:3:0","subExpression":{"id":9,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"212:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":11,"nodeType":"Return","src":"203:10:0"}]},"functionSelector":"e35bee10","id":13,"implemented":true,"kind":"function","modifiers":[],"name":"myBitwiseNeg","nameLocation":"146:12:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"167:1:0","nodeType":"VariableDeclaration","scope":13,"src":"159:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"159:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"158:11:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":13,"src":"191:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"191:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"190:9:0"},"scope":62,"src":"137:83:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":23,"nodeType":"Block","src":"289:20:0","statements":[{"expression":{"id":21,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":true,"src":"299:3:0","subExpression":{"id":20,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":15,"src":"301:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":19,"id":22,"nodeType":"Return","src":"292:10:0"}]},"functionSelector":"e7e69a10","id":24,"implemented":true,"kind":"function","modifiers":[],"name":"myPrefixIncr","nameLocation":"235:12:0","nodeType":"FunctionDefinition","parameters":{"id":16,"nodeType":"ParameterList","parameters":[{"constant":false,"id":15,"mutability":"mutable","name":"x","nameLocation":"256:1:0","nodeType":"VariableDeclaration","scope":24,"src":"248:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":14,"name":"uint256","nodeType":"ElementaryTypeName","src":"248:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"247:11:0"},"returnParameters":{"id":19,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":24,"src":"280:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"280:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"279:9:0"},"scope":62,"src":"226:83:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":34,"nodeType":"Block","src":"378:20:0","statements":[{"expression":{"id":32,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"--","prefix":true,"src":"388:3:0","subExpression":{"id":31,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":26,"src":"390:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":30,"id":33,"nodeType":"Return","src":"381:10:0"}]},"functionSelector":"46df6da2","id":35,"implemented":true,"kind":"function","modifiers":[],"name":"myPrefixDecr","nameLocation":"324:12:0","nodeType":"FunctionDefinition","parameters":{"id":27,"nodeType":"ParameterList","parameters":[{"constant":false,"id":26,"mutability":"mutable","name":"x","nameLocation":"345:1:0","nodeType":"VariableDeclaration","scope":35,"src":"337:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":25,"name":"uint256","nodeType":"ElementaryTypeName","src":"337:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"336:11:0"},"returnParameters":{"id":30,"nodeType":"ParameterList","parameters":[{"constant":false,"id":29,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":35,"src":"369:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":28,"name":"uint256","nodeType":"ElementaryTypeName","src":"369:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"368:9:0"},"scope":62,"src":"315:83:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":47,"nodeType":"Block","src":"467:24:0","statements":[{"expression":{"id":43,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"++","prefix":false,"src":"470:3:0","subExpression":{"id":42,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":37,"src":"470:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":44,"nodeType":"ExpressionStatement","src":"470:3:0"},{"expression":{"id":45,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":37,"src":"483:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":41,"id":46,"nodeType":"Return","src":"476:8:0"}]},"functionSelector":"4b46ab44","id":48,"implemented":true,"kind":"function","modifiers":[],"name":"mySuffixIncr","nameLocation":"413:12:0","nodeType":"FunctionDefinition","parameters":{"id":38,"nodeType":"ParameterList","parameters":[{"constant":false,"id":37,"mutability":"mutable","name":"x","nameLocation":"434:1:0","nodeType":"VariableDeclaration","scope":48,"src":"426:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":36,"name":"uint256","nodeType":"ElementaryTypeName","src":"426:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"425:11:0"},"returnParameters":{"id":41,"nodeType":"ParameterList","parameters":[{"constant":false,"id":40,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":48,"src":"458:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":39,"name":"uint256","nodeType":"ElementaryTypeName","src":"458:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"457:9:0"},"scope":62,"src":"404:87:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":60,"nodeType":"Block","src":"560:24:0","statements":[{"expression":{"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"nodeType":"UnaryOperation","operator":"--","prefix":false,"src":"563:3:0","subExpression":{"id":55,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"563:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"id":57,"nodeType":"ExpressionStatement","src":"563:3:0"},{"expression":{"id":58,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":50,"src":"576:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":54,"id":59,"nodeType":"Return","src":"569:8:0"}]},"functionSelector":"cb3edb42","id":61,"implemented":true,"kind":"function","modifiers":[],"name":"mySuffixDecr","nameLocation":"506:12:0","nodeType":"FunctionDefinition","parameters":{"id":51,"nodeType":"ParameterList","parameters":[{"constant":false,"id":50,"mutability":"mutable","name":"x","nameLocation":"527:1:0","nodeType":"VariableDeclaration","scope":61,"src":"519:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":49,"name":"uint256","nodeType":"ElementaryTypeName","src":"519:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"518:11:0"},"returnParameters":{"id":54,"nodeType":"ParameterList","parameters":[{"constant":false,"id":53,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":61,"src":"551:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":52,"name":"uint256","nodeType":"ElementaryTypeName","src":"551:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"550:9:0"},"scope":62,"src":"497:87:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":63,"src":"100:486:0","usedErrors":[],"usedEvents":[]}],"src":"41:546:0"} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-1.gconf/gambit_results.json b/resources/regressions/multiple-contracts-1.gconf/gambit_results.json index d6efe390..6fe64cb2 100644 --- a/resources/regressions/multiple-contracts-1.gconf/gambit_results.json +++ b/resources/regressions/multiple-contracts-1.gconf/gambit_results.json @@ -8,49 +8,49 @@ }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n }\n \n", "id": "2", "name": "mutants/2/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n }\n \n", "id": "3", "name": "mutants/3/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n }\n \n", "id": "4", "name": "mutants/4/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "DeleteExpressionMutation", - "diff": "--- original\n+++ mutant\n@@ -26,7 +26,8 @@\n }\n \n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ /// DeleteExpressionMutation(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "diff": "--- original\n+++ mutant\n@@ -28,7 +28,8 @@\n }\n \n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ /// DeleteExpressionMutation(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n+ assert(true);\n }\n \n function callmyself() external {\n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", diff --git a/resources/regressions/multiple-contracts-1.gconf/input_json/C.sol_json.ast b/resources/regressions/multiple-contracts-1.gconf/input_json/C.sol_json.ast index a3306b6e..16bebcd5 100644 --- a/resources/regressions/multiple-contracts-1.gconf/input_json/C.sol_json.ast +++ b/resources/regressions/multiple-contracts-1.gconf/input_json/C.sol_json.ast @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-1.gconf/input_json/C.sol_json.ast.json b/resources/regressions/multiple-contracts-1.gconf/input_json/C.sol_json.ast.json index a3306b6e..16bebcd5 100644 --- a/resources/regressions/multiple-contracts-1.gconf/input_json/C.sol_json.ast.json +++ b/resources/regressions/multiple-contracts-1.gconf/input_json/C.sol_json.ast.json @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-1.gconf/mutants.log b/resources/regressions/multiple-contracts-1.gconf/mutants.log index 22dfd197..190489d1 100644 --- a/resources/regressions/multiple-contracts-1.gconf/mutants.log +++ b/resources/regressions/multiple-contracts-1.gconf/mutants.log @@ -1,8 +1,8 @@ 1,DeleteExpressionMutation,MultipleContracts/C.sol,7:9,assert(c[0] == e),assert(true) -2,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,+ -3,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,- -4,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,* -5,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,/ -6,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,% -7,SwapArgumentsOperatorMutation,MultipleContracts/C.sol,24:23,a ** decimals,decimals ** a -8,DeleteExpressionMutation,MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) +2,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,+ +3,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,- +4,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,* +5,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,/ +6,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,% +7,SwapArgumentsOperatorMutation,MultipleContracts/C.sol,26:23,a ** decimals,decimals ** a +8,DeleteExpressionMutation,MultipleContracts/C.sol,31:9,assert(c[0] == e),assert(true) diff --git a/resources/regressions/multiple-contracts-1.gconf/mutants/1/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.gconf/mutants/1/MultipleContracts/C.sol index dd751c59..39939054 100644 --- a/resources/regressions/multiple-contracts-1.gconf/mutants/1/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-1.gconf/mutants/1/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-1.gconf/mutants/2/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.gconf/mutants/2/MultipleContracts/C.sol index 59da228b..57c0a2c4 100644 --- a/resources/regressions/multiple-contracts-1.gconf/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-1.gconf/mutants/2/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-1.gconf/mutants/3/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.gconf/mutants/3/MultipleContracts/C.sol index 911e098f..de7bc10c 100644 --- a/resources/regressions/multiple-contracts-1.gconf/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-1.gconf/mutants/3/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-1.gconf/mutants/4/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.gconf/mutants/4/MultipleContracts/C.sol index 53ca08b0..397d653a 100644 --- a/resources/regressions/multiple-contracts-1.gconf/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-1.gconf/mutants/4/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-1.gconf/mutants/5/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.gconf/mutants/5/MultipleContracts/C.sol index 218d97b1..fca31fc5 100644 --- a/resources/regressions/multiple-contracts-1.gconf/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-1.gconf/mutants/5/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-1.gconf/mutants/6/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.gconf/mutants/6/MultipleContracts/C.sol index 98a4b5fd..22247671 100644 --- a/resources/regressions/multiple-contracts-1.gconf/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-1.gconf/mutants/6/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-1.gconf/mutants/7/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.gconf/mutants/7/MultipleContracts/C.sol index 55b45bf2..9d9a7997 100644 --- a/resources/regressions/multiple-contracts-1.gconf/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-1.gconf/mutants/7/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-1.gconf/mutants/8/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-1.gconf/mutants/8/MultipleContracts/C.sol index 93b89862..28164b82 100644 --- a/resources/regressions/multiple-contracts-1.gconf/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-1.gconf/mutants/8/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(true); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-2.gconf/gambit_results.json b/resources/regressions/multiple-contracts-2.gconf/gambit_results.json index 232e564c..af0fe5cc 100644 --- a/resources/regressions/multiple-contracts-2.gconf/gambit_results.json +++ b/resources/regressions/multiple-contracts-2.gconf/gambit_results.json @@ -29,42 +29,42 @@ }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n }\n \n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n }\n \n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n }\n \n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n }\n \n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", diff --git a/resources/regressions/multiple-contracts-2.gconf/input_json/C.sol_json.ast b/resources/regressions/multiple-contracts-2.gconf/input_json/C.sol_json.ast index a3306b6e..16bebcd5 100644 --- a/resources/regressions/multiple-contracts-2.gconf/input_json/C.sol_json.ast +++ b/resources/regressions/multiple-contracts-2.gconf/input_json/C.sol_json.ast @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-2.gconf/input_json/C.sol_json.ast.json b/resources/regressions/multiple-contracts-2.gconf/input_json/C.sol_json.ast.json index a3306b6e..16bebcd5 100644 --- a/resources/regressions/multiple-contracts-2.gconf/input_json/C.sol_json.ast.json +++ b/resources/regressions/multiple-contracts-2.gconf/input_json/C.sol_json.ast.json @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-2.gconf/mutants.log b/resources/regressions/multiple-contracts-2.gconf/mutants.log index 523683b9..0c1b1502 100644 --- a/resources/regressions/multiple-contracts-2.gconf/mutants.log +++ b/resources/regressions/multiple-contracts-2.gconf/mutants.log @@ -2,9 +2,9 @@ 2,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,* 3,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,/ 4,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,% -5,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,+ -6,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,- -7,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,* -8,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,/ -9,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,% -10,SwapArgumentsOperatorMutation,MultipleContracts/C.sol,24:23,a ** decimals,decimals ** a +5,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,+ +6,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,- +7,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,* +8,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,/ +9,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,% +10,SwapArgumentsOperatorMutation,MultipleContracts/C.sol,26:23,a ** decimals,decimals ** a diff --git a/resources/regressions/multiple-contracts-2.gconf/mutants/1/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.gconf/mutants/1/MultipleContracts/C.sol index a514961f..9f4f8013 100644 --- a/resources/regressions/multiple-contracts-2.gconf/mutants/1/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-2.gconf/mutants/1/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-2.gconf/mutants/10/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.gconf/mutants/10/MultipleContracts/C.sol index 55b45bf2..9d9a7997 100644 --- a/resources/regressions/multiple-contracts-2.gconf/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-2.gconf/mutants/10/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-2.gconf/mutants/2/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.gconf/mutants/2/MultipleContracts/C.sol index b85149e4..ab4d9fbd 100644 --- a/resources/regressions/multiple-contracts-2.gconf/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-2.gconf/mutants/2/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-2.gconf/mutants/3/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.gconf/mutants/3/MultipleContracts/C.sol index a5819d3a..dd50f0ad 100644 --- a/resources/regressions/multiple-contracts-2.gconf/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-2.gconf/mutants/3/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-2.gconf/mutants/4/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.gconf/mutants/4/MultipleContracts/C.sol index 530045ec..0f071d14 100644 --- a/resources/regressions/multiple-contracts-2.gconf/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-2.gconf/mutants/4/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-2.gconf/mutants/5/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.gconf/mutants/5/MultipleContracts/C.sol index 59da228b..57c0a2c4 100644 --- a/resources/regressions/multiple-contracts-2.gconf/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-2.gconf/mutants/5/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-2.gconf/mutants/6/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.gconf/mutants/6/MultipleContracts/C.sol index 911e098f..de7bc10c 100644 --- a/resources/regressions/multiple-contracts-2.gconf/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-2.gconf/mutants/6/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-2.gconf/mutants/7/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.gconf/mutants/7/MultipleContracts/C.sol index 53ca08b0..397d653a 100644 --- a/resources/regressions/multiple-contracts-2.gconf/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-2.gconf/mutants/7/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-2.gconf/mutants/8/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.gconf/mutants/8/MultipleContracts/C.sol index 218d97b1..fca31fc5 100644 --- a/resources/regressions/multiple-contracts-2.gconf/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-2.gconf/mutants/8/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-2.gconf/mutants/9/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-2.gconf/mutants/9/MultipleContracts/C.sol index 98a4b5fd..22247671 100644 --- a/resources/regressions/multiple-contracts-2.gconf/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-2.gconf/mutants/9/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/gambit_results.json b/resources/regressions/multiple-contracts-3.gconf/gambit_results.json index 16e00d5f..e3ed37ac 100644 --- a/resources/regressions/multiple-contracts-3.gconf/gambit_results.json +++ b/resources/regressions/multiple-contracts-3.gconf/gambit_results.json @@ -36,93 +36,100 @@ }, { "description": "DeleteExpressionMutation", - "diff": "--- original\n+++ mutant\n@@ -15,7 +15,8 @@\n contract C {\n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ /// DeleteExpressionMutation(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n+ assert(true);\n return a;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -17,7 +17,8 @@\n \n function foo() external view returns (address[] memory) {\n address[] memory a = new address[](1);\n- a[0] = msg.sender;\n+ /// DeleteExpressionMutation(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;`\n+ assert(true);\n return a;\n }\n \n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `+`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a+decimals;\n return res;\n }\n \n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `-`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a-decimals;\n return res;\n }\n \n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `*`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a*decimals;\n return res;\n }\n \n", "id": "9", "name": "mutants/9/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `/`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a/decimals;\n return res;\n }\n \n", "id": "10", "name": "mutants/10/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// BinaryOpMutation(`**` |==> `%`) of: `uint256 res = a ** decimals;`\n+ uint256 res = a%decimals;\n return res;\n }\n \n", "id": "11", "name": "mutants/11/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "SwapArgumentsOperatorMutation", - "diff": "--- original\n+++ mutant\n@@ -21,7 +21,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n }\n \n", + "diff": "--- original\n+++ mutant\n@@ -23,7 +23,8 @@\n \n function get10PowerDecimals(uint8 decimals) public pure returns (uint256) {\n uint256 a = 10;\n- uint256 res = a ** decimals;\n+ /// SwapArgumentsOperatorMutation(`a ** decimals` |==> `decimals ** a`) of: `uint256 res = a ** decimals;`\n+ uint256 res = decimals ** a;\n return res;\n }\n \n", "id": "12", "name": "mutants/12/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "DeleteExpressionMutation", - "diff": "--- original\n+++ mutant\n@@ -26,7 +26,8 @@\n }\n \n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ /// DeleteExpressionMutation(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n+ assert(true);\n }\n \n function callmyself() external view {\n", + "diff": "--- original\n+++ mutant\n@@ -28,7 +28,8 @@\n }\n \n function getarray(address[] memory c, address e) public pure {\n- assert(c[0] == e);\n+ /// DeleteExpressionMutation(`assert(c[0] == e)` |==> `assert(true)`) of: `assert(c[0] == e);`\n+ assert(true);\n }\n \n function callmyself() external {\n", "id": "13", "name": "mutants/13/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "DeleteExpressionMutation", - "diff": "--- original\n+++ mutant\n@@ -31,7 +31,8 @@\n \n function callmyself() external view {\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ /// DeleteExpressionMutation(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", + "diff": "--- original\n+++ mutant\n@@ -33,7 +33,8 @@\n \n function callmyself() external {\n address[] memory b = this.foo();\n- Utils.getarray(b, address(this));\n+ /// DeleteExpressionMutation(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));`\n+ assert(true);\n emit Called();\n }\n \n", "id": "14", "name": "mutants/14/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { - "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `-`) of: `return c + d;`\n+ return c-d;\n }\n }\n", + "description": "DeleteEmitMutation", + "diff": "--- original\n+++ mutant\n@@ -34,7 +34,8 @@\n function callmyself() external {\n address[] memory b = this.foo();\n Utils.getarray(b, address(this));\n- emit Called();\n+ /// DeleteEmitMutation(`emit Called()` |==> `assert(true)`) of: `emit Called();`\n+ assert(true);\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n", "id": "15", "name": "mutants/15/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `*`) of: `return c + d;`\n+ return c*d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -38,6 +38,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `-`) of: `return c + d;`\n+ return c-d;\n }\n }\n", "id": "16", "name": "mutants/16/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `/`) of: `return c + d;`\n+ return c/d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -38,6 +38,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `*`) of: `return c + d;`\n+ return c*d;\n }\n }\n", "id": "17", "name": "mutants/17/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `%`) of: `return c + d;`\n+ return c%d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -38,6 +38,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `/`) of: `return c + d;`\n+ return c/d;\n }\n }\n", "id": "18", "name": "mutants/18/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", + }, + { + "description": "BinaryOpMutation", + "diff": "--- original\n+++ mutant\n@@ -38,6 +38,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `%`) of: `return c + d;`\n+ return c%d;\n }\n }\n", + "id": "19", + "name": "mutants/19/MultipleContracts/C.sol", + "original": "MultipleContracts/C.sol", } ] \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-3.gconf/input_json/C.sol_json.ast b/resources/regressions/multiple-contracts-3.gconf/input_json/C.sol_json.ast index a3306b6e..16bebcd5 100644 --- a/resources/regressions/multiple-contracts-3.gconf/input_json/C.sol_json.ast +++ b/resources/regressions/multiple-contracts-3.gconf/input_json/C.sol_json.ast @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-3.gconf/input_json/C.sol_json.ast.json b/resources/regressions/multiple-contracts-3.gconf/input_json/C.sol_json.ast.json index a3306b6e..16bebcd5 100644 --- a/resources/regressions/multiple-contracts-3.gconf/input_json/C.sol_json.ast.json +++ b/resources/regressions/multiple-contracts-3.gconf/input_json/C.sol_json.ast.json @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants.log b/resources/regressions/multiple-contracts-3.gconf/mutants.log index 188e5740..300acfe0 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants.log +++ b/resources/regressions/multiple-contracts-3.gconf/mutants.log @@ -3,16 +3,17 @@ 3,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,* 4,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,/ 5,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,% -6,DeleteExpressionMutation,MultipleContracts/C.sol,18:9,a[0] = msg.sender,assert(true) -7,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,+ -8,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,- -9,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,* -10,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,/ -11,BinaryOpMutation,MultipleContracts/C.sol,24:24, ** ,% -12,SwapArgumentsOperatorMutation,MultipleContracts/C.sol,24:23,a ** decimals,decimals ** a -13,DeleteExpressionMutation,MultipleContracts/C.sol,29:9,assert(c[0] == e),assert(true) -14,DeleteExpressionMutation,MultipleContracts/C.sol,34:9,"Utils.getarray(b, address(this))",assert(true) -15,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,- -16,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,* -17,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,/ -18,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,% +6,DeleteExpressionMutation,MultipleContracts/C.sol,20:9,a[0] = msg.sender,assert(true) +7,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,+ +8,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,- +9,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,* +10,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,/ +11,BinaryOpMutation,MultipleContracts/C.sol,26:24, ** ,% +12,SwapArgumentsOperatorMutation,MultipleContracts/C.sol,26:23,a ** decimals,decimals ** a +13,DeleteExpressionMutation,MultipleContracts/C.sol,31:9,assert(c[0] == e),assert(true) +14,DeleteExpressionMutation,MultipleContracts/C.sol,36:9,"Utils.getarray(b, address(this))",assert(true) +15,DeleteEmitMutation,MultipleContracts/C.sol,37:9,emit Called(),assert(true) +16,BinaryOpMutation,MultipleContracts/C.sol,41:17, + ,- +17,BinaryOpMutation,MultipleContracts/C.sol,41:17, + ,* +18,BinaryOpMutation,MultipleContracts/C.sol,41:17, + ,/ +19,BinaryOpMutation,MultipleContracts/C.sol,41:17, + ,% diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/1/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/1/MultipleContracts/C.sol index dd751c59..39939054 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/1/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/1/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/10/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/10/MultipleContracts/C.sol index 218d97b1..fca31fc5 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/10/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/11/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/11/MultipleContracts/C.sol index 98a4b5fd..22247671 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/11/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/11/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/12/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/12/MultipleContracts/C.sol index 55b45bf2..9d9a7997 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/12/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/12/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/13/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/13/MultipleContracts/C.sol index 93b89862..28164b82 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/13/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/13/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(true); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/14/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/14/MultipleContracts/C.sol index 4339e0fd..9a05cd5e 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/14/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/14/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -29,10 +31,11 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); /// DeleteExpressionMutation(`Utils.getarray(b, address(this))` |==> `assert(true)`) of: `Utils.getarray(b, address(this));` assert(true); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/15/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/15/MultipleContracts/C.sol index 6568d8b1..b067dfb6 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/15/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/15/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -29,13 +31,14 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + /// DeleteEmitMutation(`emit Called()` |==> `assert(true)`) of: `emit Called();` + assert(true); } function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `-`) of: `return c + d;` - return c-d; + return c + d; } } diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/16/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/16/MultipleContracts/C.sol index b4f749d8..5fd4f679 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/16/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/16/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -29,13 +31,14 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `*`) of: `return c + d;` - return c*d; + /// BinaryOpMutation(`+` |==> `-`) of: `return c + d;` + return c-d; } } diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/17/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/17/MultipleContracts/C.sol index 206e0f6d..30193aa3 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/17/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/17/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -29,13 +31,14 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `/`) of: `return c + d;` - return c/d; + /// BinaryOpMutation(`+` |==> `*`) of: `return c + d;` + return c*d; } } diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/18/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/18/MultipleContracts/C.sol index 2d95fadc..b01e6ed5 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/18/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/18/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -29,13 +31,14 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { - /// BinaryOpMutation(`+` |==> `%`) of: `return c + d;` - return c%d; + /// BinaryOpMutation(`+` |==> `/`) of: `return c + d;` + return c/d; } } diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/19/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/19/MultipleContracts/C.sol new file mode 100644 index 00000000..b9873ec4 --- /dev/null +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/19/MultipleContracts/C.sol @@ -0,0 +1,44 @@ +// SPDX-License-Identifier: GPL-3.0-only + +pragma solidity ^0.8.13; + +library Utils { + function getarray(address[] memory c, address e) internal pure { + assert(c[0] == e); + } + + function add(int8 a, int8 b) public pure returns (int8) { + return a + b; + } +} + +contract C { + event Called(); + + function foo() external view returns (address[] memory) { + address[] memory a = new address[](1); + a[0] = msg.sender; + return a; + } + + function get10PowerDecimals(uint8 decimals) public pure returns (uint256) { + uint256 a = 10; + uint256 res = a ** decimals; + return res; + } + + function getarray(address[] memory c, address e) public pure { + assert(c[0] == e); + } + + function callmyself() external { + address[] memory b = this.foo(); + Utils.getarray(b, address(this)); + emit Called(); + } + + function add(int8 c, int8 d) public pure returns (int8) { + /// BinaryOpMutation(`+` |==> `%`) of: `return c + d;` + return c%d; + } +} diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/2/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/2/MultipleContracts/C.sol index a514961f..9f4f8013 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/2/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/3/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/3/MultipleContracts/C.sol index b85149e4..ab4d9fbd 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/3/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/4/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/4/MultipleContracts/C.sol index a5819d3a..dd50f0ad 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/4/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/5/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/5/MultipleContracts/C.sol index 530045ec..0f071d14 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/5/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/6/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/6/MultipleContracts/C.sol index 5407440a..47f798c0 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/6/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); /// DeleteExpressionMutation(`a[0] = msg.sender` |==> `assert(true)`) of: `a[0] = msg.sender;` @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/7/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/7/MultipleContracts/C.sol index 59da228b..57c0a2c4 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/7/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/8/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/8/MultipleContracts/C.sol index 911e098f..de7bc10c 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/8/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-3.gconf/mutants/9/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-3.gconf/mutants/9/MultipleContracts/C.sol index 53ca08b0..397d653a 100644 --- a/resources/regressions/multiple-contracts-3.gconf/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-3.gconf/mutants/9/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-4.gconf/gambit_results.json b/resources/regressions/multiple-contracts-4.gconf/gambit_results.json index ef080dd3..a76f1162 100644 --- a/resources/regressions/multiple-contracts-4.gconf/gambit_results.json +++ b/resources/regressions/multiple-contracts-4.gconf/gambit_results.json @@ -29,28 +29,28 @@ }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `-`) of: `return c + d;`\n+ return c-d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -38,6 +38,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `-`) of: `return c + d;`\n+ return c-d;\n }\n }\n", "id": "5", "name": "mutants/5/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `*`) of: `return c + d;`\n+ return c*d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -38,6 +38,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `*`) of: `return c + d;`\n+ return c*d;\n }\n }\n", "id": "6", "name": "mutants/6/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `/`) of: `return c + d;`\n+ return c/d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -38,6 +38,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `/`) of: `return c + d;`\n+ return c/d;\n }\n }\n", "id": "7", "name": "mutants/7/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", }, { "description": "BinaryOpMutation", - "diff": "--- original\n+++ mutant\n@@ -35,6 +35,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `%`) of: `return c + d;`\n+ return c%d;\n }\n }\n", + "diff": "--- original\n+++ mutant\n@@ -38,6 +38,7 @@\n }\n \n function add(int8 c, int8 d) public pure returns (int8) {\n- return c + d;\n+ /// BinaryOpMutation(`+` |==> `%`) of: `return c + d;`\n+ return c%d;\n }\n }\n", "id": "8", "name": "mutants/8/MultipleContracts/C.sol", "original": "MultipleContracts/C.sol", diff --git a/resources/regressions/multiple-contracts-4.gconf/input_json/C.sol_json.ast b/resources/regressions/multiple-contracts-4.gconf/input_json/C.sol_json.ast index a3306b6e..16bebcd5 100644 --- a/resources/regressions/multiple-contracts-4.gconf/input_json/C.sol_json.ast +++ b/resources/regressions/multiple-contracts-4.gconf/input_json/C.sol_json.ast @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-4.gconf/input_json/C.sol_json.ast.json b/resources/regressions/multiple-contracts-4.gconf/input_json/C.sol_json.ast.json index a3306b6e..16bebcd5 100644 --- a/resources/regressions/multiple-contracts-4.gconf/input_json/C.sol_json.ast.json +++ b/resources/regressions/multiple-contracts-4.gconf/input_json/C.sol_json.ast.json @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/multiple-contracts-4.gconf/mutants.log b/resources/regressions/multiple-contracts-4.gconf/mutants.log index 826b78c5..f1c4b640 100644 --- a/resources/regressions/multiple-contracts-4.gconf/mutants.log +++ b/resources/regressions/multiple-contracts-4.gconf/mutants.log @@ -2,7 +2,7 @@ 2,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,* 3,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,/ 4,BinaryOpMutation,MultipleContracts/C.sol,11:17, + ,% -5,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,- -6,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,* -7,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,/ -8,BinaryOpMutation,MultipleContracts/C.sol,38:17, + ,% +5,BinaryOpMutation,MultipleContracts/C.sol,41:17, + ,- +6,BinaryOpMutation,MultipleContracts/C.sol,41:17, + ,* +7,BinaryOpMutation,MultipleContracts/C.sol,41:17, + ,/ +8,BinaryOpMutation,MultipleContracts/C.sol,41:17, + ,% diff --git a/resources/regressions/multiple-contracts-4.gconf/mutants/1/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.gconf/mutants/1/MultipleContracts/C.sol index a514961f..9f4f8013 100644 --- a/resources/regressions/multiple-contracts-4.gconf/mutants/1/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-4.gconf/mutants/1/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-4.gconf/mutants/2/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.gconf/mutants/2/MultipleContracts/C.sol index b85149e4..ab4d9fbd 100644 --- a/resources/regressions/multiple-contracts-4.gconf/mutants/2/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-4.gconf/mutants/2/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-4.gconf/mutants/3/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.gconf/mutants/3/MultipleContracts/C.sol index a5819d3a..dd50f0ad 100644 --- a/resources/regressions/multiple-contracts-4.gconf/mutants/3/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-4.gconf/mutants/3/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-4.gconf/mutants/4/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.gconf/mutants/4/MultipleContracts/C.sol index 530045ec..0f071d14 100644 --- a/resources/regressions/multiple-contracts-4.gconf/mutants/4/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-4.gconf/mutants/4/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-4.gconf/mutants/5/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.gconf/mutants/5/MultipleContracts/C.sol index 6568d8b1..5fd4f679 100644 --- a/resources/regressions/multiple-contracts-4.gconf/mutants/5/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-4.gconf/mutants/5/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -29,9 +31,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-4.gconf/mutants/6/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.gconf/mutants/6/MultipleContracts/C.sol index b4f749d8..30193aa3 100644 --- a/resources/regressions/multiple-contracts-4.gconf/mutants/6/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-4.gconf/mutants/6/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -29,9 +31,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-4.gconf/mutants/7/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.gconf/mutants/7/MultipleContracts/C.sol index 206e0f6d..b01e6ed5 100644 --- a/resources/regressions/multiple-contracts-4.gconf/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-4.gconf/mutants/7/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -29,9 +31,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/multiple-contracts-4.gconf/mutants/8/MultipleContracts/C.sol b/resources/regressions/multiple-contracts-4.gconf/mutants/8/MultipleContracts/C.sol index 2d95fadc..b9873ec4 100644 --- a/resources/regressions/multiple-contracts-4.gconf/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/multiple-contracts-4.gconf/mutants/8/MultipleContracts/C.sol @@ -13,6 +13,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -29,9 +31,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/sanity-config.gconf/input_json/BinaryOpMutation.sol_json.ast b/resources/regressions/sanity-config.gconf/input_json/BinaryOpMutation.sol_json.ast index b02050bb..1ac3f74f 100644 --- a/resources/regressions/sanity-config.gconf/input_json/BinaryOpMutation.sol_json.ast +++ b/resources/regressions/sanity-config.gconf/input_json/BinaryOpMutation.sol_json.ast @@ -1,1183 +1 @@ -{ - "absolutePath": "benchmarks/BinaryOpMutation/BinaryOpMutation.sol", - "exportedSymbols": - { - "BinaryOpMutation": - [ - 87 - ] - }, - "id": 88, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "BinaryOpMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 87, - "linearizedBaseContracts": - [ - 87 - ], - "name": "BinaryOpMutation", - "nameLocation": "109:16:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "204:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "214:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "214:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "207:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "141:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "160:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "152:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "152:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "163:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "163:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "151:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "195:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "195:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "194:9:0" - }, - "scope": 87, - "src": "132:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "307:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "317:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "317:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "310:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "241:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "263:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "255:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "255:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "274:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "266:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "266:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "254:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "298:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "298:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "297:9:0" - }, - "scope": 87, - "src": "232:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "413:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "423:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "427:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "423:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "416:12:0" - } - ] - }, - "functionSelector": "6831fd12", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myMultiplication", - "nameLocation": "344:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "369:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "361:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "361:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "372:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "372:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "360:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "404:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "404:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "403:9:0" - }, - "scope": 87, - "src": "335:100:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "513:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "523:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "527:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "523:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "516:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "450:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "469:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "461:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "461:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "480:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "472:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "472:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "460:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "504:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "504:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "503:9:0" - }, - "scope": 87, - "src": "441:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "611:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "621:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "625:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "621:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "614:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "550:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "567:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "559:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "559:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "578:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "570:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "570:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "558:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "602:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "602:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "601:9:0" - }, - "scope": 87, - "src": "541:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "717:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "727:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "732:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "727:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "720:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "648:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "673:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "665:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "665:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "684:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "676:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "676:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "664:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "708:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 78, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "708:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "707:9:0" - }, - "scope": 87, - "src": "639:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 88, - "src": "100:643:0", - "usedErrors": [] - } - ], - "src": "41:703:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/BinaryOpMutation/BinaryOpMutation.sol","exportedSymbols":{"BinaryOpMutation":[87]},"id":88,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"BinaryOpMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":87,"linearizedBaseContracts":[87],"name":"BinaryOpMutation","nameLocation":"109:16:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":15,"nodeType":"Block","src":"204:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":13,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":11,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"214:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":12,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"218:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"214:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":10,"id":14,"nodeType":"Return","src":"207:12:0"}]},"functionSelector":"04b53fe4","id":16,"implemented":true,"kind":"function","modifiers":[],"name":"myAddition","nameLocation":"141:10:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"160:1:0","nodeType":"VariableDeclaration","scope":16,"src":"152:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"152:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"y","nameLocation":"171:1:0","nodeType":"VariableDeclaration","scope":16,"src":"163:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"163:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"151:22:0"},"returnParameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":16,"src":"195:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint256","nodeType":"ElementaryTypeName","src":"195:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"194:9:0"},"scope":87,"src":"132:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":29,"nodeType":"Block","src":"307:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":27,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":25,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"317:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"id":26,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"321:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"317:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":24,"id":28,"nodeType":"Return","src":"310:12:0"}]},"functionSelector":"b3d09aaa","id":30,"implemented":true,"kind":"function","modifiers":[],"name":"mySubtraction","nameLocation":"241:13:0","nodeType":"FunctionDefinition","parameters":{"id":21,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"x","nameLocation":"263:1:0","nodeType":"VariableDeclaration","scope":30,"src":"255:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"255:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":20,"mutability":"mutable","name":"y","nameLocation":"274:1:0","nodeType":"VariableDeclaration","scope":30,"src":"266:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":19,"name":"uint256","nodeType":"ElementaryTypeName","src":"266:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"254:22:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[{"constant":false,"id":23,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":30,"src":"298:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":22,"name":"uint256","nodeType":"ElementaryTypeName","src":"298:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"297:9:0"},"scope":87,"src":"232:97:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":43,"nodeType":"Block","src":"413:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":41,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":39,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":32,"src":"423:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"id":40,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":34,"src":"427:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"423:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":38,"id":42,"nodeType":"Return","src":"416:12:0"}]},"functionSelector":"6831fd12","id":44,"implemented":true,"kind":"function","modifiers":[],"name":"myMultiplication","nameLocation":"344:16:0","nodeType":"FunctionDefinition","parameters":{"id":35,"nodeType":"ParameterList","parameters":[{"constant":false,"id":32,"mutability":"mutable","name":"x","nameLocation":"369:1:0","nodeType":"VariableDeclaration","scope":44,"src":"361:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":31,"name":"uint256","nodeType":"ElementaryTypeName","src":"361:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":34,"mutability":"mutable","name":"y","nameLocation":"380:1:0","nodeType":"VariableDeclaration","scope":44,"src":"372:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":33,"name":"uint256","nodeType":"ElementaryTypeName","src":"372:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"360:22:0"},"returnParameters":{"id":38,"nodeType":"ParameterList","parameters":[{"constant":false,"id":37,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":44,"src":"404:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":36,"name":"uint256","nodeType":"ElementaryTypeName","src":"404:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"403:9:0"},"scope":87,"src":"335:100:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":57,"nodeType":"Block","src":"513:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":53,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":46,"src":"523:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"id":54,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":48,"src":"527:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"523:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":52,"id":56,"nodeType":"Return","src":"516:12:0"}]},"functionSelector":"9d4f4e60","id":58,"implemented":true,"kind":"function","modifiers":[],"name":"myDivision","nameLocation":"450:10:0","nodeType":"FunctionDefinition","parameters":{"id":49,"nodeType":"ParameterList","parameters":[{"constant":false,"id":46,"mutability":"mutable","name":"x","nameLocation":"469:1:0","nodeType":"VariableDeclaration","scope":58,"src":"461:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":45,"name":"uint256","nodeType":"ElementaryTypeName","src":"461:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":48,"mutability":"mutable","name":"y","nameLocation":"480:1:0","nodeType":"VariableDeclaration","scope":58,"src":"472:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":47,"name":"uint256","nodeType":"ElementaryTypeName","src":"472:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"460:22:0"},"returnParameters":{"id":52,"nodeType":"ParameterList","parameters":[{"constant":false,"id":51,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":58,"src":"504:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":50,"name":"uint256","nodeType":"ElementaryTypeName","src":"504:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"503:9:0"},"scope":87,"src":"441:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":71,"nodeType":"Block","src":"611:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":69,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":67,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"621:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"id":68,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":62,"src":"625:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"621:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":66,"id":70,"nodeType":"Return","src":"614:12:0"}]},"functionSelector":"dc6092a8","id":72,"implemented":true,"kind":"function","modifiers":[],"name":"myModulo","nameLocation":"550:8:0","nodeType":"FunctionDefinition","parameters":{"id":63,"nodeType":"ParameterList","parameters":[{"constant":false,"id":60,"mutability":"mutable","name":"x","nameLocation":"567:1:0","nodeType":"VariableDeclaration","scope":72,"src":"559:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":59,"name":"uint256","nodeType":"ElementaryTypeName","src":"559:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":62,"mutability":"mutable","name":"y","nameLocation":"578:1:0","nodeType":"VariableDeclaration","scope":72,"src":"570:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":61,"name":"uint256","nodeType":"ElementaryTypeName","src":"570:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"558:22:0"},"returnParameters":{"id":66,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":72,"src":"602:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64,"name":"uint256","nodeType":"ElementaryTypeName","src":"602:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"601:9:0"},"scope":87,"src":"541:92:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":85,"nodeType":"Block","src":"717:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":83,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":81,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":82,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":76,"src":"732:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"727:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":80,"id":84,"nodeType":"Return","src":"720:13:0"}]},"functionSelector":"df159c7b","id":86,"implemented":true,"kind":"function","modifiers":[],"name":"myExponentiation","nameLocation":"648:16:0","nodeType":"FunctionDefinition","parameters":{"id":77,"nodeType":"ParameterList","parameters":[{"constant":false,"id":74,"mutability":"mutable","name":"x","nameLocation":"673:1:0","nodeType":"VariableDeclaration","scope":86,"src":"665:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"665:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":76,"mutability":"mutable","name":"y","nameLocation":"684:1:0","nodeType":"VariableDeclaration","scope":86,"src":"676:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":75,"name":"uint256","nodeType":"ElementaryTypeName","src":"676:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"664:22:0"},"returnParameters":{"id":80,"nodeType":"ParameterList","parameters":[{"constant":false,"id":79,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":86,"src":"708:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":78,"name":"uint256","nodeType":"ElementaryTypeName","src":"708:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"707:9:0"},"scope":87,"src":"639:101:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":88,"src":"100:643:0","usedErrors":[],"usedEvents":[]}],"src":"41:703:0"} \ No newline at end of file diff --git a/resources/regressions/sanity-config.gconf/input_json/BinaryOpMutation.sol_json.ast.json b/resources/regressions/sanity-config.gconf/input_json/BinaryOpMutation.sol_json.ast.json index b02050bb..1ac3f74f 100644 --- a/resources/regressions/sanity-config.gconf/input_json/BinaryOpMutation.sol_json.ast.json +++ b/resources/regressions/sanity-config.gconf/input_json/BinaryOpMutation.sol_json.ast.json @@ -1,1183 +1 @@ -{ - "absolutePath": "benchmarks/BinaryOpMutation/BinaryOpMutation.sol", - "exportedSymbols": - { - "BinaryOpMutation": - [ - 87 - ] - }, - "id": 88, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "BinaryOpMutation", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 87, - "linearizedBaseContracts": - [ - 87 - ], - "name": "BinaryOpMutation", - "nameLocation": "109:16:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 15, - "nodeType": "Block", - "src": "204:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 13, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 11, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "214:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 12, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "218:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "214:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 10, - "id": 14, - "nodeType": "Return", - "src": "207:12:0" - } - ] - }, - "functionSelector": "04b53fe4", - "id": 16, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myAddition", - "nameLocation": "141:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "x", - "nameLocation": "160:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "152:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 3, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "152:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "y", - "nameLocation": "171:1:0", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "163:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 5, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "163:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "151:22:0" - }, - "returnParameters": - { - "id": 10, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 9, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 16, - "src": "195:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 8, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "195:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "194:9:0" - }, - "scope": 87, - "src": "132:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 29, - "nodeType": "Block", - "src": "307:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 27, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 25, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 18, - "src": "317:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "-", - "rightExpression": - { - "id": 26, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "321:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "317:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 24, - "id": 28, - "nodeType": "Return", - "src": "310:12:0" - } - ] - }, - "functionSelector": "b3d09aaa", - "id": 30, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "mySubtraction", - "nameLocation": "241:13:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 21, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 18, - "mutability": "mutable", - "name": "x", - "nameLocation": "263:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "255:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 17, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "255:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "y", - "nameLocation": "274:1:0", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "266:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 19, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "266:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "254:22:0" - }, - "returnParameters": - { - "id": 24, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 23, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 30, - "src": "298:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 22, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "298:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "297:9:0" - }, - "scope": 87, - "src": "232:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 43, - "nodeType": "Block", - "src": "413:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 41, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 39, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 32, - "src": "423:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "*", - "rightExpression": - { - "id": 40, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 34, - "src": "427:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "423:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 38, - "id": 42, - "nodeType": "Return", - "src": "416:12:0" - } - ] - }, - "functionSelector": "6831fd12", - "id": 44, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myMultiplication", - "nameLocation": "344:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 35, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 32, - "mutability": "mutable", - "name": "x", - "nameLocation": "369:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "361:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 31, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "361:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 34, - "mutability": "mutable", - "name": "y", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "372:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 33, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "372:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "360:22:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 44, - "src": "404:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 36, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "404:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "403:9:0" - }, - "scope": 87, - "src": "335:100:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 57, - "nodeType": "Block", - "src": "513:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 53, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 46, - "src": "523:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "/", - "rightExpression": - { - "id": 54, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 48, - "src": "527:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "523:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 52, - "id": 56, - "nodeType": "Return", - "src": "516:12:0" - } - ] - }, - "functionSelector": "9d4f4e60", - "id": 58, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myDivision", - "nameLocation": "450:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 49, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 46, - "mutability": "mutable", - "name": "x", - "nameLocation": "469:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "461:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 45, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "461:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 48, - "mutability": "mutable", - "name": "y", - "nameLocation": "480:1:0", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "472:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 47, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "472:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "460:22:0" - }, - "returnParameters": - { - "id": 52, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 51, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 58, - "src": "504:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 50, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "504:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "503:9:0" - }, - "scope": 87, - "src": "441:94:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 71, - "nodeType": "Block", - "src": "611:22:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 67, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 60, - "src": "621:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "%", - "rightExpression": - { - "id": 68, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "625:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "621:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 70, - "nodeType": "Return", - "src": "614:12:0" - } - ] - }, - "functionSelector": "dc6092a8", - "id": 72, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myModulo", - "nameLocation": "550:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 60, - "mutability": "mutable", - "name": "x", - "nameLocation": "567:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "559:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 59, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "559:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "y", - "nameLocation": "578:1:0", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "570:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 61, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "570:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "558:22:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 72, - "src": "602:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "602:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "601:9:0" - }, - "scope": 87, - "src": "541:92:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 85, - "nodeType": "Block", - "src": "717:23:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 83, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 81, - "name": "x", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 74, - "src": "727:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 82, - "name": "y", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 76, - "src": "732:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "src": "727:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 80, - "id": 84, - "nodeType": "Return", - "src": "720:13:0" - } - ] - }, - "functionSelector": "df159c7b", - "id": 86, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "myExponentiation", - "nameLocation": "648:16:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 77, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 74, - "mutability": "mutable", - "name": "x", - "nameLocation": "673:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "665:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 73, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "665:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 76, - "mutability": "mutable", - "name": "y", - "nameLocation": "684:1:0", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "676:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 75, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "676:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "664:22:0" - }, - "returnParameters": - { - "id": 80, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 79, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 86, - "src": "708:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 78, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "708:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "707:9:0" - }, - "scope": 87, - "src": "639:101:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 88, - "src": "100:643:0", - "usedErrors": [] - } - ], - "src": "41:703:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/BinaryOpMutation/BinaryOpMutation.sol","exportedSymbols":{"BinaryOpMutation":[87]},"id":88,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"BinaryOpMutation","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":87,"linearizedBaseContracts":[87],"name":"BinaryOpMutation","nameLocation":"109:16:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":15,"nodeType":"Block","src":"204:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":13,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":11,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"214:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":12,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"218:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"214:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":10,"id":14,"nodeType":"Return","src":"207:12:0"}]},"functionSelector":"04b53fe4","id":16,"implemented":true,"kind":"function","modifiers":[],"name":"myAddition","nameLocation":"141:10:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"x","nameLocation":"160:1:0","nodeType":"VariableDeclaration","scope":16,"src":"152:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":3,"name":"uint256","nodeType":"ElementaryTypeName","src":"152:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"y","nameLocation":"171:1:0","nodeType":"VariableDeclaration","scope":16,"src":"163:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":5,"name":"uint256","nodeType":"ElementaryTypeName","src":"163:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"151:22:0"},"returnParameters":{"id":10,"nodeType":"ParameterList","parameters":[{"constant":false,"id":9,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":16,"src":"195:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":8,"name":"uint256","nodeType":"ElementaryTypeName","src":"195:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"194:9:0"},"scope":87,"src":"132:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":29,"nodeType":"Block","src":"307:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":27,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":25,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":18,"src":"317:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"-","rightExpression":{"id":26,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"321:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"317:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":24,"id":28,"nodeType":"Return","src":"310:12:0"}]},"functionSelector":"b3d09aaa","id":30,"implemented":true,"kind":"function","modifiers":[],"name":"mySubtraction","nameLocation":"241:13:0","nodeType":"FunctionDefinition","parameters":{"id":21,"nodeType":"ParameterList","parameters":[{"constant":false,"id":18,"mutability":"mutable","name":"x","nameLocation":"263:1:0","nodeType":"VariableDeclaration","scope":30,"src":"255:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":17,"name":"uint256","nodeType":"ElementaryTypeName","src":"255:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":20,"mutability":"mutable","name":"y","nameLocation":"274:1:0","nodeType":"VariableDeclaration","scope":30,"src":"266:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":19,"name":"uint256","nodeType":"ElementaryTypeName","src":"266:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"254:22:0"},"returnParameters":{"id":24,"nodeType":"ParameterList","parameters":[{"constant":false,"id":23,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":30,"src":"298:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":22,"name":"uint256","nodeType":"ElementaryTypeName","src":"298:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"297:9:0"},"scope":87,"src":"232:97:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":43,"nodeType":"Block","src":"413:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":41,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":39,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":32,"src":"423:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"*","rightExpression":{"id":40,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":34,"src":"427:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"423:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":38,"id":42,"nodeType":"Return","src":"416:12:0"}]},"functionSelector":"6831fd12","id":44,"implemented":true,"kind":"function","modifiers":[],"name":"myMultiplication","nameLocation":"344:16:0","nodeType":"FunctionDefinition","parameters":{"id":35,"nodeType":"ParameterList","parameters":[{"constant":false,"id":32,"mutability":"mutable","name":"x","nameLocation":"369:1:0","nodeType":"VariableDeclaration","scope":44,"src":"361:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":31,"name":"uint256","nodeType":"ElementaryTypeName","src":"361:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":34,"mutability":"mutable","name":"y","nameLocation":"380:1:0","nodeType":"VariableDeclaration","scope":44,"src":"372:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":33,"name":"uint256","nodeType":"ElementaryTypeName","src":"372:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"360:22:0"},"returnParameters":{"id":38,"nodeType":"ParameterList","parameters":[{"constant":false,"id":37,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":44,"src":"404:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":36,"name":"uint256","nodeType":"ElementaryTypeName","src":"404:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"403:9:0"},"scope":87,"src":"335:100:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":57,"nodeType":"Block","src":"513:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":55,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":53,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":46,"src":"523:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"/","rightExpression":{"id":54,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":48,"src":"527:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"523:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":52,"id":56,"nodeType":"Return","src":"516:12:0"}]},"functionSelector":"9d4f4e60","id":58,"implemented":true,"kind":"function","modifiers":[],"name":"myDivision","nameLocation":"450:10:0","nodeType":"FunctionDefinition","parameters":{"id":49,"nodeType":"ParameterList","parameters":[{"constant":false,"id":46,"mutability":"mutable","name":"x","nameLocation":"469:1:0","nodeType":"VariableDeclaration","scope":58,"src":"461:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":45,"name":"uint256","nodeType":"ElementaryTypeName","src":"461:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":48,"mutability":"mutable","name":"y","nameLocation":"480:1:0","nodeType":"VariableDeclaration","scope":58,"src":"472:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":47,"name":"uint256","nodeType":"ElementaryTypeName","src":"472:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"460:22:0"},"returnParameters":{"id":52,"nodeType":"ParameterList","parameters":[{"constant":false,"id":51,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":58,"src":"504:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":50,"name":"uint256","nodeType":"ElementaryTypeName","src":"504:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"503:9:0"},"scope":87,"src":"441:94:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":71,"nodeType":"Block","src":"611:22:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":69,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":67,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":60,"src":"621:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"%","rightExpression":{"id":68,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":62,"src":"625:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"621:5:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":66,"id":70,"nodeType":"Return","src":"614:12:0"}]},"functionSelector":"dc6092a8","id":72,"implemented":true,"kind":"function","modifiers":[],"name":"myModulo","nameLocation":"550:8:0","nodeType":"FunctionDefinition","parameters":{"id":63,"nodeType":"ParameterList","parameters":[{"constant":false,"id":60,"mutability":"mutable","name":"x","nameLocation":"567:1:0","nodeType":"VariableDeclaration","scope":72,"src":"559:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":59,"name":"uint256","nodeType":"ElementaryTypeName","src":"559:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":62,"mutability":"mutable","name":"y","nameLocation":"578:1:0","nodeType":"VariableDeclaration","scope":72,"src":"570:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":61,"name":"uint256","nodeType":"ElementaryTypeName","src":"570:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"558:22:0"},"returnParameters":{"id":66,"nodeType":"ParameterList","parameters":[{"constant":false,"id":65,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":72,"src":"602:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":64,"name":"uint256","nodeType":"ElementaryTypeName","src":"602:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"601:9:0"},"scope":87,"src":"541:92:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":85,"nodeType":"Block","src":"717:23:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":83,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":81,"name":"x","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":82,"name":"y","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":76,"src":"732:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"src":"727:6:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":80,"id":84,"nodeType":"Return","src":"720:13:0"}]},"functionSelector":"df159c7b","id":86,"implemented":true,"kind":"function","modifiers":[],"name":"myExponentiation","nameLocation":"648:16:0","nodeType":"FunctionDefinition","parameters":{"id":77,"nodeType":"ParameterList","parameters":[{"constant":false,"id":74,"mutability":"mutable","name":"x","nameLocation":"673:1:0","nodeType":"VariableDeclaration","scope":86,"src":"665:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"665:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"},{"constant":false,"id":76,"mutability":"mutable","name":"y","nameLocation":"684:1:0","nodeType":"VariableDeclaration","scope":86,"src":"676:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":75,"name":"uint256","nodeType":"ElementaryTypeName","src":"676:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"664:22:0"},"returnParameters":{"id":80,"nodeType":"ParameterList","parameters":[{"constant":false,"id":79,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":86,"src":"708:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":78,"name":"uint256","nodeType":"ElementaryTypeName","src":"708:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"707:9:0"},"scope":87,"src":"639:101:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":88,"src":"100:643:0","usedErrors":[],"usedEvents":[]}],"src":"41:703:0"} \ No newline at end of file diff --git a/resources/regressions/test1.gconf/input_json/TenPower.sol_json.ast b/resources/regressions/test1.gconf/input_json/TenPower.sol_json.ast index b5bf1c32..3ead93ef 100644 --- a/resources/regressions/test1.gconf/input_json/TenPower.sol_json.ast +++ b/resources/regressions/test1.gconf/input_json/TenPower.sol_json.ast @@ -1,334 +1 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/10Power/TenPower.sol","exportedSymbols":{"TenPower":[23]},"id":24,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"TenPower","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":23,"linearizedBaseContracts":[23],"name":"TenPower","nameLocation":"109:8:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":21,"nodeType":"Block","src":"198:122:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"a","nameLocation":"216:1:0","nodeType":"VariableDeclaration","scope":21,"src":"208:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"208:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"3130","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"220:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"208:14:0"},{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"res","nameLocation":"240:3:0","nodeType":"VariableDeclaration","scope":21,"src":"232:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"232:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":18,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":15,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":16,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"251:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"246:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"232:27:0"},{"expression":{"id":19,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"276:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":20,"nodeType":"Return","src":"269:10:0"}]},"functionSelector":"eb79f1be","id":22,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"133:18:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"decimals","nameLocation":"158:8:0","nodeType":"VariableDeclaration","scope":22,"src":"152:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3,"name":"uint8","nodeType":"ElementaryTypeName","src":"152:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"151:16:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":22,"src":"189:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"189:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"188:9:0"},"scope":23,"src":"124:196:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":24,"src":"100:222:0","usedErrors":[],"usedEvents":[]}],"src":"41:282:0"} \ No newline at end of file diff --git a/resources/regressions/test1.gconf/input_json/TenPower.sol_json.ast.json b/resources/regressions/test1.gconf/input_json/TenPower.sol_json.ast.json index b5bf1c32..3ead93ef 100644 --- a/resources/regressions/test1.gconf/input_json/TenPower.sol_json.ast.json +++ b/resources/regressions/test1.gconf/input_json/TenPower.sol_json.ast.json @@ -1,334 +1 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/10Power/TenPower.sol","exportedSymbols":{"TenPower":[23]},"id":24,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"TenPower","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":23,"linearizedBaseContracts":[23],"name":"TenPower","nameLocation":"109:8:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":21,"nodeType":"Block","src":"198:122:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"a","nameLocation":"216:1:0","nodeType":"VariableDeclaration","scope":21,"src":"208:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"208:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"3130","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"220:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"208:14:0"},{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"res","nameLocation":"240:3:0","nodeType":"VariableDeclaration","scope":21,"src":"232:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"232:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":18,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":15,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":16,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"251:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"246:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"232:27:0"},{"expression":{"id":19,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"276:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":20,"nodeType":"Return","src":"269:10:0"}]},"functionSelector":"eb79f1be","id":22,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"133:18:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"decimals","nameLocation":"158:8:0","nodeType":"VariableDeclaration","scope":22,"src":"152:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3,"name":"uint8","nodeType":"ElementaryTypeName","src":"152:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"151:16:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":22,"src":"189:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"189:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"188:9:0"},"scope":23,"src":"124:196:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":24,"src":"100:222:0","usedErrors":[],"usedEvents":[]}],"src":"41:282:0"} \ No newline at end of file diff --git a/resources/regressions/test2.gconf/input_json/TenPower.sol_json.ast b/resources/regressions/test2.gconf/input_json/TenPower.sol_json.ast index b5bf1c32..3ead93ef 100644 --- a/resources/regressions/test2.gconf/input_json/TenPower.sol_json.ast +++ b/resources/regressions/test2.gconf/input_json/TenPower.sol_json.ast @@ -1,334 +1 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/10Power/TenPower.sol","exportedSymbols":{"TenPower":[23]},"id":24,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"TenPower","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":23,"linearizedBaseContracts":[23],"name":"TenPower","nameLocation":"109:8:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":21,"nodeType":"Block","src":"198:122:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"a","nameLocation":"216:1:0","nodeType":"VariableDeclaration","scope":21,"src":"208:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"208:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"3130","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"220:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"208:14:0"},{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"res","nameLocation":"240:3:0","nodeType":"VariableDeclaration","scope":21,"src":"232:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"232:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":18,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":15,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":16,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"251:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"246:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"232:27:0"},{"expression":{"id":19,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"276:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":20,"nodeType":"Return","src":"269:10:0"}]},"functionSelector":"eb79f1be","id":22,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"133:18:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"decimals","nameLocation":"158:8:0","nodeType":"VariableDeclaration","scope":22,"src":"152:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3,"name":"uint8","nodeType":"ElementaryTypeName","src":"152:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"151:16:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":22,"src":"189:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"189:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"188:9:0"},"scope":23,"src":"124:196:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":24,"src":"100:222:0","usedErrors":[],"usedEvents":[]}],"src":"41:282:0"} \ No newline at end of file diff --git a/resources/regressions/test2.gconf/input_json/TenPower.sol_json.ast.json b/resources/regressions/test2.gconf/input_json/TenPower.sol_json.ast.json index b5bf1c32..3ead93ef 100644 --- a/resources/regressions/test2.gconf/input_json/TenPower.sol_json.ast.json +++ b/resources/regressions/test2.gconf/input_json/TenPower.sol_json.ast.json @@ -1,334 +1 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/10Power/TenPower.sol","exportedSymbols":{"TenPower":[23]},"id":24,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"TenPower","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":23,"linearizedBaseContracts":[23],"name":"TenPower","nameLocation":"109:8:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":21,"nodeType":"Block","src":"198:122:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"a","nameLocation":"216:1:0","nodeType":"VariableDeclaration","scope":21,"src":"208:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"208:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"3130","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"220:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"208:14:0"},{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"res","nameLocation":"240:3:0","nodeType":"VariableDeclaration","scope":21,"src":"232:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"232:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":18,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":15,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":16,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"251:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"246:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"232:27:0"},{"expression":{"id":19,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"276:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":20,"nodeType":"Return","src":"269:10:0"}]},"functionSelector":"eb79f1be","id":22,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"133:18:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"decimals","nameLocation":"158:8:0","nodeType":"VariableDeclaration","scope":22,"src":"152:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3,"name":"uint8","nodeType":"ElementaryTypeName","src":"152:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"151:16:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":22,"src":"189:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"189:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"188:9:0"},"scope":23,"src":"124:196:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":24,"src":"100:222:0","usedErrors":[],"usedEvents":[]}],"src":"41:282:0"} \ No newline at end of file diff --git a/resources/regressions/test3.gconf/input_json/C.sol_json.ast b/resources/regressions/test3.gconf/input_json/C.sol_json.ast index a3306b6e..16bebcd5 100644 --- a/resources/regressions/test3.gconf/input_json/C.sol_json.ast +++ b/resources/regressions/test3.gconf/input_json/C.sol_json.ast @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/test3.gconf/input_json/C.sol_json.ast.json b/resources/regressions/test3.gconf/input_json/C.sol_json.ast.json index a3306b6e..16bebcd5 100644 --- a/resources/regressions/test3.gconf/input_json/C.sol_json.ast.json +++ b/resources/regressions/test3.gconf/input_json/C.sol_json.ast.json @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/test3.gconf/input_json/TenPower.sol_json.ast b/resources/regressions/test3.gconf/input_json/TenPower.sol_json.ast index b5bf1c32..3ead93ef 100644 --- a/resources/regressions/test3.gconf/input_json/TenPower.sol_json.ast +++ b/resources/regressions/test3.gconf/input_json/TenPower.sol_json.ast @@ -1,334 +1 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/10Power/TenPower.sol","exportedSymbols":{"TenPower":[23]},"id":24,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"TenPower","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":23,"linearizedBaseContracts":[23],"name":"TenPower","nameLocation":"109:8:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":21,"nodeType":"Block","src":"198:122:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"a","nameLocation":"216:1:0","nodeType":"VariableDeclaration","scope":21,"src":"208:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"208:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"3130","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"220:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"208:14:0"},{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"res","nameLocation":"240:3:0","nodeType":"VariableDeclaration","scope":21,"src":"232:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"232:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":18,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":15,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":16,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"251:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"246:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"232:27:0"},{"expression":{"id":19,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"276:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":20,"nodeType":"Return","src":"269:10:0"}]},"functionSelector":"eb79f1be","id":22,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"133:18:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"decimals","nameLocation":"158:8:0","nodeType":"VariableDeclaration","scope":22,"src":"152:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3,"name":"uint8","nodeType":"ElementaryTypeName","src":"152:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"151:16:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":22,"src":"189:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"189:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"188:9:0"},"scope":23,"src":"124:196:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":24,"src":"100:222:0","usedErrors":[],"usedEvents":[]}],"src":"41:282:0"} \ No newline at end of file diff --git a/resources/regressions/test3.gconf/input_json/TenPower.sol_json.ast.json b/resources/regressions/test3.gconf/input_json/TenPower.sol_json.ast.json index b5bf1c32..3ead93ef 100644 --- a/resources/regressions/test3.gconf/input_json/TenPower.sol_json.ast.json +++ b/resources/regressions/test3.gconf/input_json/TenPower.sol_json.ast.json @@ -1,334 +1 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/10Power/TenPower.sol","exportedSymbols":{"TenPower":[23]},"id":24,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"TenPower","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":23,"linearizedBaseContracts":[23],"name":"TenPower","nameLocation":"109:8:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":21,"nodeType":"Block","src":"198:122:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"a","nameLocation":"216:1:0","nodeType":"VariableDeclaration","scope":21,"src":"208:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"208:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"3130","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"220:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"208:14:0"},{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"res","nameLocation":"240:3:0","nodeType":"VariableDeclaration","scope":21,"src":"232:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"232:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":18,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":15,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":16,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"251:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"246:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"232:27:0"},{"expression":{"id":19,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"276:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":20,"nodeType":"Return","src":"269:10:0"}]},"functionSelector":"eb79f1be","id":22,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"133:18:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"decimals","nameLocation":"158:8:0","nodeType":"VariableDeclaration","scope":22,"src":"152:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3,"name":"uint8","nodeType":"ElementaryTypeName","src":"152:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"151:16:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":22,"src":"189:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"189:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"188:9:0"},"scope":23,"src":"124:196:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":24,"src":"100:222:0","usedErrors":[],"usedEvents":[]}],"src":"41:282:0"} \ No newline at end of file diff --git a/resources/regressions/test4.gconf/input_json/C.sol_json.ast b/resources/regressions/test4.gconf/input_json/C.sol_json.ast index a3306b6e..16bebcd5 100644 --- a/resources/regressions/test4.gconf/input_json/C.sol_json.ast +++ b/resources/regressions/test4.gconf/input_json/C.sol_json.ast @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/test4.gconf/input_json/C.sol_json.ast.json b/resources/regressions/test4.gconf/input_json/C.sol_json.ast.json index a3306b6e..16bebcd5 100644 --- a/resources/regressions/test4.gconf/input_json/C.sol_json.ast.json +++ b/resources/regressions/test4.gconf/input_json/C.sol_json.ast.json @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/test4.gconf/input_json/TenPower.sol_json.ast b/resources/regressions/test4.gconf/input_json/TenPower.sol_json.ast index b5bf1c32..3ead93ef 100644 --- a/resources/regressions/test4.gconf/input_json/TenPower.sol_json.ast +++ b/resources/regressions/test4.gconf/input_json/TenPower.sol_json.ast @@ -1,334 +1 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/10Power/TenPower.sol","exportedSymbols":{"TenPower":[23]},"id":24,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"TenPower","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":23,"linearizedBaseContracts":[23],"name":"TenPower","nameLocation":"109:8:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":21,"nodeType":"Block","src":"198:122:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"a","nameLocation":"216:1:0","nodeType":"VariableDeclaration","scope":21,"src":"208:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"208:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"3130","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"220:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"208:14:0"},{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"res","nameLocation":"240:3:0","nodeType":"VariableDeclaration","scope":21,"src":"232:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"232:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":18,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":15,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":16,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"251:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"246:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"232:27:0"},{"expression":{"id":19,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"276:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":20,"nodeType":"Return","src":"269:10:0"}]},"functionSelector":"eb79f1be","id":22,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"133:18:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"decimals","nameLocation":"158:8:0","nodeType":"VariableDeclaration","scope":22,"src":"152:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3,"name":"uint8","nodeType":"ElementaryTypeName","src":"152:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"151:16:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":22,"src":"189:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"189:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"188:9:0"},"scope":23,"src":"124:196:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":24,"src":"100:222:0","usedErrors":[],"usedEvents":[]}],"src":"41:282:0"} \ No newline at end of file diff --git a/resources/regressions/test4.gconf/input_json/TenPower.sol_json.ast.json b/resources/regressions/test4.gconf/input_json/TenPower.sol_json.ast.json index b5bf1c32..3ead93ef 100644 --- a/resources/regressions/test4.gconf/input_json/TenPower.sol_json.ast.json +++ b/resources/regressions/test4.gconf/input_json/TenPower.sol_json.ast.json @@ -1,334 +1 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/10Power/TenPower.sol","exportedSymbols":{"TenPower":[23]},"id":24,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"TenPower","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":23,"linearizedBaseContracts":[23],"name":"TenPower","nameLocation":"109:8:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":21,"nodeType":"Block","src":"198:122:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"a","nameLocation":"216:1:0","nodeType":"VariableDeclaration","scope":21,"src":"208:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"208:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"3130","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"220:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"208:14:0"},{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"res","nameLocation":"240:3:0","nodeType":"VariableDeclaration","scope":21,"src":"232:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"232:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":18,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":15,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":16,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"251:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"246:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"232:27:0"},{"expression":{"id":19,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"276:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":20,"nodeType":"Return","src":"269:10:0"}]},"functionSelector":"eb79f1be","id":22,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"133:18:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"decimals","nameLocation":"158:8:0","nodeType":"VariableDeclaration","scope":22,"src":"152:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3,"name":"uint8","nodeType":"ElementaryTypeName","src":"152:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"151:16:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":22,"src":"189:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"189:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"188:9:0"},"scope":23,"src":"124:196:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":24,"src":"100:222:0","usedErrors":[],"usedEvents":[]}],"src":"41:282:0"} \ No newline at end of file diff --git a/resources/regressions/test5.gconf/input_json/C.sol_json.ast b/resources/regressions/test5.gconf/input_json/C.sol_json.ast index a3306b6e..16bebcd5 100644 --- a/resources/regressions/test5.gconf/input_json/C.sol_json.ast +++ b/resources/regressions/test5.gconf/input_json/C.sol_json.ast @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/test5.gconf/input_json/C.sol_json.ast.json b/resources/regressions/test5.gconf/input_json/C.sol_json.ast.json index a3306b6e..16bebcd5 100644 --- a/resources/regressions/test5.gconf/input_json/C.sol_json.ast.json +++ b/resources/regressions/test5.gconf/input_json/C.sol_json.ast.json @@ -1,1828 +1 @@ -{ - "absolutePath": "benchmarks/MultipleContracts/C.sol", - "exportedSymbols": - { - "C": - [ - 135 - ], - "Utils": - [ - 33 - ] - }, - "id": 136, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - "^", - "0.8", - ".13" - ], - "nodeType": "PragmaDirective", - "src": "42:24:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "Utils", - "contractDependencies": [], - "contractKind": "library", - "fullyImplemented": true, - "id": 33, - "linearizedBaseContracts": - [ - 33 - ], - "name": "Utils", - "nameLocation": "76:5:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 17, - "nodeType": "Block", - "src": "151:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 14, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 10, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "168:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 12, - "indexExpression": - { - "hexValue": "30", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "170:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "168:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 13, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 6, - "src": "176:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "168:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 9, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "161:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 15, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "161:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 16, - "nodeType": "ExpressionStatement", - "src": "161:17:0" - } - ] - }, - "id": 18, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "97:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 7, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "c", - "nameLocation": "123:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "106:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 2, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "106:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 3, - "nodeType": "ArrayTypeName", - "src": "106:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 6, - "mutability": "mutable", - "name": "e", - "nameLocation": "134:1:0", - "nodeType": "VariableDeclaration", - "scope": 18, - "src": "126:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 5, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "126:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "105:31:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": [], - "src": "151:0:0" - }, - "scope": 33, - "src": "88:97:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "internal" - }, - { - "body": - { - "id": 31, - "nodeType": "Block", - "src": "247:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 29, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 27, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 20, - "src": "264:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 28, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 22, - "src": "268:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "264:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 26, - "id": 30, - "nodeType": "Return", - "src": "257:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 32, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "200:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 23, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 20, - "mutability": "mutable", - "name": "a", - "nameLocation": "209:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "204:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 19, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "204:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 22, - "mutability": "mutable", - "name": "b", - "nameLocation": "217:1:0", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "212:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 21, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "212:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "203:16:0" - }, - "returnParameters": - { - "id": 26, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 25, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 32, - "src": "241:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 24, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "241:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "240:6:0" - }, - "scope": 33, - "src": "191:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "68:210:0", - "usedErrors": [] - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "C", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 135, - "linearizedBaseContracts": - [ - 135 - ], - "name": "C", - "nameLocation": "289:1:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 59, - "nodeType": "Block", - "src": "353:99:0", - "statements": - [ - { - "assignments": - [ - 43 - ], - "declarations": - [ - { - "constant": false, - "id": 43, - "mutability": "mutable", - "name": "a", - "nameLocation": "380:1:0", - "nodeType": "VariableDeclaration", - "scope": 59, - "src": "363:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 41, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "363:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 42, - "nodeType": "ArrayTypeName", - "src": "363:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 49, - "initialValue": - { - "arguments": - [ - { - "hexValue": "31", - "id": 47, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "398:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - }, - "value": "1" - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_rational_1_by_1", - "typeString": "int_const 1" - } - ], - "id": 46, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "NewExpression", - "src": "384:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function (uint256) pure returns (address[] memory)" - }, - "typeName": - { - "baseType": - { - "id": 44, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "388:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 45, - "nodeType": "ArrayTypeName", - "src": "388:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - } - }, - "id": 48, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "384:16:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "363:37:0" - }, - { - "expression": - { - "id": 55, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftHandSide": - { - "baseExpression": - { - "id": 50, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "410:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 52, - "indexExpression": - { - "hexValue": "30", - "id": 51, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "412:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": true, - "nodeType": "IndexAccess", - "src": "410:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "Assignment", - "operator": "=", - "rightHandSide": - { - "expression": - { - "id": 53, - "name": "msg", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -15, - "src": "417:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_magic_message", - "typeString": "msg" - } - }, - "id": 54, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "sender", - "nodeType": "MemberAccess", - "src": "417:10:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "410:17:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 56, - "nodeType": "ExpressionStatement", - "src": "410:17:0" - }, - { - "expression": - { - "id": 57, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 43, - "src": "444:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "functionReturnParameters": 38, - "id": 58, - "nodeType": "Return", - "src": "437:8:0" - } - ] - }, - "functionSelector": "c2985578", - "id": 60, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "foo", - "nameLocation": "306:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 34, - "nodeType": "ParameterList", - "parameters": [], - "src": "309:2:0" - }, - "returnParameters": - { - "id": 38, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 37, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 60, - "src": "335:16:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 35, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "335:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 36, - "nodeType": "ArrayTypeName", - "src": "335:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "src": "334:18:0" - }, - "scope": 135, - "src": "297:155:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 79, - "nodeType": "Block", - "src": "532:88:0", - "statements": - [ - { - "assignments": - [ - 68 - ], - "declarations": - [ - { - "constant": false, - "id": 68, - "mutability": "mutable", - "name": "a", - "nameLocation": "550:1:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "542:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 67, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "542:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 70, - "initialValue": - { - "hexValue": "3130", - "id": 69, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "554:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "542:14:0" - }, - { - "assignments": - [ - 72 - ], - "declarations": - [ - { - "constant": false, - "id": 72, - "mutability": "mutable", - "name": "res", - "nameLocation": "574:3:0", - "nodeType": "VariableDeclaration", - "scope": 79, - "src": "566:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 71, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "566:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 76, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 75, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 73, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 68, - "src": "580:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 74, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 62, - "src": "585:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "580:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "566:27:0" - }, - { - "expression": - { - "id": 77, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 72, - "src": "610:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 66, - "id": 78, - "nodeType": "Return", - "src": "603:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 80, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "467:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 63, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 62, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "492:8:0", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "486:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 61, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "486:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "485:16:0" - }, - "returnParameters": - { - "id": 66, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 65, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 80, - "src": "523:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 64, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "523:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "522:9:0" - }, - "scope": 135, - "src": "458:162:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 96, - "nodeType": "Block", - "src": "687:34:0", - "statements": - [ - { - "expression": - { - "arguments": - [ - { - "commonType": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "id": 93, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "baseExpression": - { - "id": 89, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 83, - "src": "704:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "id": 91, - "indexExpression": - { - "hexValue": "30", - "id": 90, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "706:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_0_by_1", - "typeString": "int_const 0" - }, - "value": "0" - }, - "isConstant": false, - "isLValue": true, - "isPure": false, - "lValueRequested": false, - "nodeType": "IndexAccess", - "src": "704:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "nodeType": "BinaryOperation", - "operator": "==", - "rightExpression": - { - "id": 92, - "name": "e", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 85, - "src": "712:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "src": "704:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_bool", - "typeString": "bool" - } - ], - "id": 88, - "name": "assert", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -3, - "src": "697:6:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_assert_pure$_t_bool_$returns$__$", - "typeString": "function (bool) pure" - } - }, - "id": 94, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "697:17:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 95, - "nodeType": "ExpressionStatement", - "src": "697:17:0" - } - ] - }, - "functionSelector": "e5b2857b", - "id": 97, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "getarray", - "nameLocation": "635:8:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 86, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 83, - "mutability": "mutable", - "name": "c", - "nameLocation": "661:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "644:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 81, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "644:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 82, - "nodeType": "ArrayTypeName", - "src": "644:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 85, - "mutability": "mutable", - "name": "e", - "nameLocation": "672:1:0", - "nodeType": "VariableDeclaration", - "scope": 97, - "src": "664:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - }, - "typeName": - { - "id": 84, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "664:7:0", - "stateMutability": "nonpayable", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "visibility": "internal" - } - ], - "src": "643:31:0" - }, - "returnParameters": - { - "id": 87, - "nodeType": "ParameterList", - "parameters": [], - "src": "687:0:0" - }, - "scope": 135, - "src": "626:95:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - }, - { - "body": - { - "id": 119, - "nodeType": "Block", - "src": "763:90:0", - "statements": - [ - { - "assignments": - [ - 104 - ], - "declarations": - [ - { - "constant": false, - "id": 104, - "mutability": "mutable", - "name": "b", - "nameLocation": "790:1:0", - "nodeType": "VariableDeclaration", - "scope": 119, - "src": "773:18:0", - "stateVariable": false, - "storageLocation": "memory", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[]" - }, - "typeName": - { - "baseType": - { - "id": 102, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "773:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - }, - "id": 103, - "nodeType": "ArrayTypeName", - "src": "773:9:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_storage_ptr", - "typeString": "address[]" - } - }, - "visibility": "internal" - } - ], - "id": 108, - "initialValue": - { - "arguments": [], - "expression": - { - "argumentTypes": [], - "expression": - { - "id": 105, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "794:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - }, - "id": 106, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "foo", - "nodeType": "MemberAccess", - "referencedDeclaration": 60, - "src": "794:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$", - "typeString": "function () view external returns (address[] memory)" - } - }, - "id": 107, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "794:10:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "773:31:0" - }, - { - "expression": - { - "arguments": - [ - { - "id": 112, - "name": "b", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 104, - "src": "829:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - } - }, - { - "arguments": - [ - { - "id": 115, - "name": "this", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": -28, - "src": "840:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_contract$_C_$135", - "typeString": "contract C" - } - ], - "id": 114, - "isConstant": false, - "isLValue": false, - "isPure": true, - "lValueRequested": false, - "nodeType": "ElementaryTypeNameExpression", - "src": "832:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_address_$", - "typeString": "type(address)" - }, - "typeName": - { - "id": 113, - "name": "address", - "nodeType": "ElementaryTypeName", - "src": "832:7:0", - "typeDescriptions": {} - } - }, - "id": 116, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "typeConversion", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "832:13:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_address", - "typeString": "address" - } - } - ], - "expression": - { - "argumentTypes": - [ - { - "typeIdentifier": "t_array$_t_address_$dyn_memory_ptr", - "typeString": "address[] memory" - }, - { - "typeIdentifier": "t_address", - "typeString": "address" - } - ], - "expression": - { - "id": 109, - "name": "Utils", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 33, - "src": "814:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_type$_t_contract$_Utils_$33_$", - "typeString": "type(library Utils)" - } - }, - "id": 111, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "memberName": "getarray", - "nodeType": "MemberAccess", - "referencedDeclaration": 18, - "src": "814:14:0", - "typeDescriptions": - { - "typeIdentifier": "t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$", - "typeString": "function (address[] memory,address) pure" - } - }, - "id": 117, - "isConstant": false, - "isLValue": false, - "isPure": false, - "kind": "functionCall", - "lValueRequested": false, - "names": [], - "nodeType": "FunctionCall", - "src": "814:32:0", - "tryCall": false, - "typeDescriptions": - { - "typeIdentifier": "t_tuple$__$", - "typeString": "tuple()" - } - }, - "id": 118, - "nodeType": "ExpressionStatement", - "src": "814:32:0" - } - ] - }, - "functionSelector": "d3ab473b", - "id": 120, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "callmyself", - "nameLocation": "736:10:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 98, - "nodeType": "ParameterList", - "parameters": [], - "src": "746:2:0" - }, - "returnParameters": - { - "id": 99, - "nodeType": "ParameterList", - "parameters": [], - "src": "763:0:0" - }, - "scope": 135, - "src": "727:126:0", - "stateMutability": "view", - "virtual": false, - "visibility": "external" - }, - { - "body": - { - "id": 133, - "nodeType": "Block", - "src": "915:29:0", - "statements": - [ - { - "expression": - { - "commonType": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "id": 131, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 129, - "name": "c", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 122, - "src": "932:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "nodeType": "BinaryOperation", - "operator": "+", - "rightExpression": - { - "id": 130, - "name": "d", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 124, - "src": "936:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "src": "932:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "functionReturnParameters": 128, - "id": 132, - "nodeType": "Return", - "src": "925:12:0" - } - ] - }, - "functionSelector": "e2666777", - "id": 134, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "add", - "nameLocation": "868:3:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 125, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 122, - "mutability": "mutable", - "name": "c", - "nameLocation": "877:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "872:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 121, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "872:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - }, - { - "constant": false, - "id": 124, - "mutability": "mutable", - "name": "d", - "nameLocation": "885:1:0", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "880:6:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 123, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "880:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "871:16:0" - }, - "returnParameters": - { - "id": 128, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 127, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 134, - "src": "909:4:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - }, - "typeName": - { - "id": 126, - "name": "int8", - "nodeType": "ElementaryTypeName", - "src": "909:4:0", - "typeDescriptions": - { - "typeIdentifier": "t_int8", - "typeString": "int8" - } - }, - "visibility": "internal" - } - ], - "src": "908:6:0" - }, - "scope": 135, - "src": "859:85:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 136, - "src": "280:666:0", - "usedErrors": [] - } - ], - "src": "42:905:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/MultipleContracts/C.sol","exportedSymbols":{"C":[140],"Utils":[33]},"id":141,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity","^","0.8",".13"],"nodeType":"PragmaDirective","src":"42:24:0"},{"abstract":false,"baseContracts":[],"canonicalName":"Utils","contractDependencies":[],"contractKind":"library","fullyImplemented":true,"id":33,"linearizedBaseContracts":[33],"name":"Utils","nameLocation":"76:5:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":17,"nodeType":"Block","src":"151:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":14,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":10,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"168:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":12,"indexExpression":{"hexValue":"30","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"170:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"168:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":13,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":6,"src":"176:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"168:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":9,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"161:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":15,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"161:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":16,"nodeType":"ExpressionStatement","src":"161:17:0"}]},"id":18,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"97:8:0","nodeType":"FunctionDefinition","parameters":{"id":7,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"c","nameLocation":"123:1:0","nodeType":"VariableDeclaration","scope":18,"src":"106:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":2,"name":"address","nodeType":"ElementaryTypeName","src":"106:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":3,"nodeType":"ArrayTypeName","src":"106:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":6,"mutability":"mutable","name":"e","nameLocation":"134:1:0","nodeType":"VariableDeclaration","scope":18,"src":"126:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":5,"name":"address","nodeType":"ElementaryTypeName","src":"126:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"105:31:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[],"src":"151:0:0"},"scope":33,"src":"88:97:0","stateMutability":"pure","virtual":false,"visibility":"internal"},{"body":{"id":31,"nodeType":"Block","src":"247:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":29,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":27,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":20,"src":"264:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":28,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":22,"src":"268:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"264:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":26,"id":30,"nodeType":"Return","src":"257:12:0"}]},"functionSelector":"e2666777","id":32,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"200:3:0","nodeType":"FunctionDefinition","parameters":{"id":23,"nodeType":"ParameterList","parameters":[{"constant":false,"id":20,"mutability":"mutable","name":"a","nameLocation":"209:1:0","nodeType":"VariableDeclaration","scope":32,"src":"204:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":19,"name":"int8","nodeType":"ElementaryTypeName","src":"204:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":22,"mutability":"mutable","name":"b","nameLocation":"217:1:0","nodeType":"VariableDeclaration","scope":32,"src":"212:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":21,"name":"int8","nodeType":"ElementaryTypeName","src":"212:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"203:16:0"},"returnParameters":{"id":26,"nodeType":"ParameterList","parameters":[{"constant":false,"id":25,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":32,"src":"241:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":24,"name":"int8","nodeType":"ElementaryTypeName","src":"241:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"240:6:0"},"scope":33,"src":"191:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"68:210:0","usedErrors":[],"usedEvents":[]},{"abstract":false,"baseContracts":[],"canonicalName":"C","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":140,"linearizedBaseContracts":[140],"name":"C","nameLocation":"289:1:0","nodeType":"ContractDefinition","nodes":[{"anonymous":false,"eventSelector":"81fab7a4a0aa961db47eefc81f143a5220e8c8495260dd65b1356f1d19d3c7b8","id":35,"name":"Called","nameLocation":"303:6:0","nodeType":"EventDefinition","parameters":{"id":34,"nodeType":"ParameterList","parameters":[],"src":"309:2:0"},"src":"297:15:0"},{"body":{"id":61,"nodeType":"Block","src":"374:99:0","statements":[{"assignments":[45],"declarations":[{"constant":false,"id":45,"mutability":"mutable","name":"a","nameLocation":"401:1:0","nodeType":"VariableDeclaration","scope":61,"src":"384:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":43,"name":"address","nodeType":"ElementaryTypeName","src":"384:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":44,"nodeType":"ArrayTypeName","src":"384:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":51,"initialValue":{"arguments":[{"hexValue":"31","id":49,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"419:1:0","typeDescriptions":{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"},"value":"1"}],"expression":{"argumentTypes":[{"typeIdentifier":"t_rational_1_by_1","typeString":"int_const 1"}],"id":48,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"NewExpression","src":"405:13:0","typeDescriptions":{"typeIdentifier":"t_function_objectcreation_pure$_t_uint256_$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function (uint256) pure returns (address[] memory)"},"typeName":{"baseType":{"id":46,"name":"address","nodeType":"ElementaryTypeName","src":"409:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":47,"nodeType":"ArrayTypeName","src":"409:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}}},"id":50,"isConstant":false,"isLValue":false,"isPure":true,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"405:16:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"384:37:0"},{"expression":{"id":57,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftHandSide":{"baseExpression":{"id":52,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"431:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":54,"indexExpression":{"hexValue":"30","id":53,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"433:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":true,"nodeType":"IndexAccess","src":"431:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"Assignment","operator":"=","rightHandSide":{"expression":{"id":55,"name":"msg","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-15,"src":"438:3:0","typeDescriptions":{"typeIdentifier":"t_magic_message","typeString":"msg"}},"id":56,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"442:6:0","memberName":"sender","nodeType":"MemberAccess","src":"438:10:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"431:17:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":58,"nodeType":"ExpressionStatement","src":"431:17:0"},{"expression":{"id":59,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":45,"src":"465:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"functionReturnParameters":40,"id":60,"nodeType":"Return","src":"458:8:0"}]},"functionSelector":"c2985578","id":62,"implemented":true,"kind":"function","modifiers":[],"name":"foo","nameLocation":"327:3:0","nodeType":"FunctionDefinition","parameters":{"id":36,"nodeType":"ParameterList","parameters":[],"src":"330:2:0"},"returnParameters":{"id":40,"nodeType":"ParameterList","parameters":[{"constant":false,"id":39,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":62,"src":"356:16:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":37,"name":"address","nodeType":"ElementaryTypeName","src":"356:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":38,"nodeType":"ArrayTypeName","src":"356:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"src":"355:18:0"},"scope":140,"src":"318:155:0","stateMutability":"view","virtual":false,"visibility":"external"},{"body":{"id":81,"nodeType":"Block","src":"553:88:0","statements":[{"assignments":[70],"declarations":[{"constant":false,"id":70,"mutability":"mutable","name":"a","nameLocation":"571:1:0","nodeType":"VariableDeclaration","scope":81,"src":"563:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":69,"name":"uint256","nodeType":"ElementaryTypeName","src":"563:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":72,"initialValue":{"hexValue":"3130","id":71,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"575:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"563:14:0"},{"assignments":[74],"declarations":[{"constant":false,"id":74,"mutability":"mutable","name":"res","nameLocation":"595:3:0","nodeType":"VariableDeclaration","scope":81,"src":"587:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":73,"name":"uint256","nodeType":"ElementaryTypeName","src":"587:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":78,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":77,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":75,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":70,"src":"601:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":76,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":64,"src":"606:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"601:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"587:27:0"},{"expression":{"id":79,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":74,"src":"631:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":68,"id":80,"nodeType":"Return","src":"624:10:0"}]},"functionSelector":"eb79f1be","id":82,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"488:18:0","nodeType":"FunctionDefinition","parameters":{"id":65,"nodeType":"ParameterList","parameters":[{"constant":false,"id":64,"mutability":"mutable","name":"decimals","nameLocation":"513:8:0","nodeType":"VariableDeclaration","scope":82,"src":"507:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":63,"name":"uint8","nodeType":"ElementaryTypeName","src":"507:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"506:16:0"},"returnParameters":{"id":68,"nodeType":"ParameterList","parameters":[{"constant":false,"id":67,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":82,"src":"544:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":66,"name":"uint256","nodeType":"ElementaryTypeName","src":"544:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"543:9:0"},"scope":140,"src":"479:162:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":98,"nodeType":"Block","src":"708:34:0","statements":[{"expression":{"arguments":[{"commonType":{"typeIdentifier":"t_address","typeString":"address"},"id":95,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"baseExpression":{"id":91,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":85,"src":"725:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"id":93,"indexExpression":{"hexValue":"30","id":92,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"727:1:0","typeDescriptions":{"typeIdentifier":"t_rational_0_by_1","typeString":"int_const 0"},"value":"0"},"isConstant":false,"isLValue":true,"isPure":false,"lValueRequested":false,"nodeType":"IndexAccess","src":"725:4:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"nodeType":"BinaryOperation","operator":"==","rightExpression":{"id":94,"name":"e","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":87,"src":"733:1:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"src":"725:9:0","typeDescriptions":{"typeIdentifier":"t_bool","typeString":"bool"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_bool","typeString":"bool"}],"id":90,"name":"assert","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-3,"src":"718:6:0","typeDescriptions":{"typeIdentifier":"t_function_assert_pure$_t_bool_$returns$__$","typeString":"function (bool) pure"}},"id":96,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"718:17:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":97,"nodeType":"ExpressionStatement","src":"718:17:0"}]},"functionSelector":"e5b2857b","id":99,"implemented":true,"kind":"function","modifiers":[],"name":"getarray","nameLocation":"656:8:0","nodeType":"FunctionDefinition","parameters":{"id":88,"nodeType":"ParameterList","parameters":[{"constant":false,"id":85,"mutability":"mutable","name":"c","nameLocation":"682:1:0","nodeType":"VariableDeclaration","scope":99,"src":"665:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":83,"name":"address","nodeType":"ElementaryTypeName","src":"665:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":84,"nodeType":"ArrayTypeName","src":"665:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"},{"constant":false,"id":87,"mutability":"mutable","name":"e","nameLocation":"693:1:0","nodeType":"VariableDeclaration","scope":99,"src":"685:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"},"typeName":{"id":86,"name":"address","nodeType":"ElementaryTypeName","src":"685:7:0","stateMutability":"nonpayable","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"visibility":"internal"}],"src":"664:31:0"},"returnParameters":{"id":89,"nodeType":"ParameterList","parameters":[],"src":"708:0:0"},"scope":140,"src":"647:95:0","stateMutability":"pure","virtual":false,"visibility":"public"},{"body":{"id":124,"nodeType":"Block","src":"779:113:0","statements":[{"assignments":[106],"declarations":[{"constant":false,"id":106,"mutability":"mutable","name":"b","nameLocation":"806:1:0","nodeType":"VariableDeclaration","scope":124,"src":"789:18:0","stateVariable":false,"storageLocation":"memory","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[]"},"typeName":{"baseType":{"id":104,"name":"address","nodeType":"ElementaryTypeName","src":"789:7:0","typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}},"id":105,"nodeType":"ArrayTypeName","src":"789:9:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_storage_ptr","typeString":"address[]"}},"visibility":"internal"}],"id":110,"initialValue":{"arguments":[],"expression":{"argumentTypes":[],"expression":{"id":107,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"810:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}},"id":108,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"815:3:0","memberName":"foo","nodeType":"MemberAccess","referencedDeclaration":62,"src":"810:8:0","typeDescriptions":{"typeIdentifier":"t_function_external_view$__$returns$_t_array$_t_address_$dyn_memory_ptr_$","typeString":"function () view external returns (address[] memory)"}},"id":109,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"810:10:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},"nodeType":"VariableDeclarationStatement","src":"789:31:0"},{"expression":{"arguments":[{"id":114,"name":"b","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":106,"src":"845:1:0","typeDescriptions":{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"}},{"arguments":[{"id":117,"name":"this","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":-28,"src":"856:4:0","typeDescriptions":{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_contract$_C_$140","typeString":"contract C"}],"id":116,"isConstant":false,"isLValue":false,"isPure":true,"lValueRequested":false,"nodeType":"ElementaryTypeNameExpression","src":"848:7:0","typeDescriptions":{"typeIdentifier":"t_type$_t_address_$","typeString":"type(address)"},"typeName":{"id":115,"name":"address","nodeType":"ElementaryTypeName","src":"848:7:0","typeDescriptions":{}}},"id":118,"isConstant":false,"isLValue":false,"isPure":false,"kind":"typeConversion","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"848:13:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_address","typeString":"address"}}],"expression":{"argumentTypes":[{"typeIdentifier":"t_array$_t_address_$dyn_memory_ptr","typeString":"address[] memory"},{"typeIdentifier":"t_address","typeString":"address"}],"expression":{"id":111,"name":"Utils","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":33,"src":"830:5:0","typeDescriptions":{"typeIdentifier":"t_type$_t_contract$_Utils_$33_$","typeString":"type(library Utils)"}},"id":113,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"memberLocation":"836:8:0","memberName":"getarray","nodeType":"MemberAccess","referencedDeclaration":18,"src":"830:14:0","typeDescriptions":{"typeIdentifier":"t_function_internal_pure$_t_array$_t_address_$dyn_memory_ptr_$_t_address_$returns$__$","typeString":"function (address[] memory,address) pure"}},"id":119,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"830:32:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":120,"nodeType":"ExpressionStatement","src":"830:32:0"},{"eventCall":{"arguments":[],"expression":{"argumentTypes":[],"id":121,"name":"Called","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":35,"src":"877:6:0","typeDescriptions":{"typeIdentifier":"t_function_event_nonpayable$__$returns$__$","typeString":"function ()"}},"id":122,"isConstant":false,"isLValue":false,"isPure":false,"kind":"functionCall","lValueRequested":false,"nameLocations":[],"names":[],"nodeType":"FunctionCall","src":"877:8:0","tryCall":false,"typeDescriptions":{"typeIdentifier":"t_tuple$__$","typeString":"tuple()"}},"id":123,"nodeType":"EmitStatement","src":"872:13:0"}]},"functionSelector":"d3ab473b","id":125,"implemented":true,"kind":"function","modifiers":[],"name":"callmyself","nameLocation":"757:10:0","nodeType":"FunctionDefinition","parameters":{"id":100,"nodeType":"ParameterList","parameters":[],"src":"767:2:0"},"returnParameters":{"id":101,"nodeType":"ParameterList","parameters":[],"src":"779:0:0"},"scope":140,"src":"748:144:0","stateMutability":"nonpayable","virtual":false,"visibility":"external"},{"body":{"id":138,"nodeType":"Block","src":"954:29:0","statements":[{"expression":{"commonType":{"typeIdentifier":"t_int8","typeString":"int8"},"id":136,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":134,"name":"c","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":127,"src":"971:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"nodeType":"BinaryOperation","operator":"+","rightExpression":{"id":135,"name":"d","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":129,"src":"975:1:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"src":"971:5:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"functionReturnParameters":133,"id":137,"nodeType":"Return","src":"964:12:0"}]},"functionSelector":"e2666777","id":139,"implemented":true,"kind":"function","modifiers":[],"name":"add","nameLocation":"907:3:0","nodeType":"FunctionDefinition","parameters":{"id":130,"nodeType":"ParameterList","parameters":[{"constant":false,"id":127,"mutability":"mutable","name":"c","nameLocation":"916:1:0","nodeType":"VariableDeclaration","scope":139,"src":"911:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":126,"name":"int8","nodeType":"ElementaryTypeName","src":"911:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"},{"constant":false,"id":129,"mutability":"mutable","name":"d","nameLocation":"924:1:0","nodeType":"VariableDeclaration","scope":139,"src":"919:6:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":128,"name":"int8","nodeType":"ElementaryTypeName","src":"919:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"910:16:0"},"returnParameters":{"id":133,"nodeType":"ParameterList","parameters":[{"constant":false,"id":132,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":139,"src":"948:4:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"},"typeName":{"id":131,"name":"int8","nodeType":"ElementaryTypeName","src":"948:4:0","typeDescriptions":{"typeIdentifier":"t_int8","typeString":"int8"}},"visibility":"internal"}],"src":"947:6:0"},"scope":140,"src":"898:85:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":141,"src":"280:705:0","usedErrors":[],"usedEvents":[35]}],"src":"42:944:0"} \ No newline at end of file diff --git a/resources/regressions/test5.gconf/input_json/TenPower.sol_json.ast b/resources/regressions/test5.gconf/input_json/TenPower.sol_json.ast index b5bf1c32..3ead93ef 100644 --- a/resources/regressions/test5.gconf/input_json/TenPower.sol_json.ast +++ b/resources/regressions/test5.gconf/input_json/TenPower.sol_json.ast @@ -1,334 +1 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/10Power/TenPower.sol","exportedSymbols":{"TenPower":[23]},"id":24,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"TenPower","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":23,"linearizedBaseContracts":[23],"name":"TenPower","nameLocation":"109:8:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":21,"nodeType":"Block","src":"198:122:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"a","nameLocation":"216:1:0","nodeType":"VariableDeclaration","scope":21,"src":"208:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"208:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"3130","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"220:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"208:14:0"},{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"res","nameLocation":"240:3:0","nodeType":"VariableDeclaration","scope":21,"src":"232:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"232:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":18,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":15,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":16,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"251:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"246:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"232:27:0"},{"expression":{"id":19,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"276:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":20,"nodeType":"Return","src":"269:10:0"}]},"functionSelector":"eb79f1be","id":22,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"133:18:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"decimals","nameLocation":"158:8:0","nodeType":"VariableDeclaration","scope":22,"src":"152:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3,"name":"uint8","nodeType":"ElementaryTypeName","src":"152:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"151:16:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":22,"src":"189:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"189:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"188:9:0"},"scope":23,"src":"124:196:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":24,"src":"100:222:0","usedErrors":[],"usedEvents":[]}],"src":"41:282:0"} \ No newline at end of file diff --git a/resources/regressions/test5.gconf/input_json/TenPower.sol_json.ast.json b/resources/regressions/test5.gconf/input_json/TenPower.sol_json.ast.json index b5bf1c32..3ead93ef 100644 --- a/resources/regressions/test5.gconf/input_json/TenPower.sol_json.ast.json +++ b/resources/regressions/test5.gconf/input_json/TenPower.sol_json.ast.json @@ -1,334 +1 @@ -{ - "absolutePath": "benchmarks/10Power/TenPower.sol", - "exportedSymbols": - { - "TenPower": - [ - 23 - ] - }, - "id": 24, - "license": "GPL-3.0-only", - "nodeType": "SourceUnit", - "nodes": - [ - { - "id": 1, - "literals": - [ - "solidity", - ">", - "0.7", - ".0" - ], - "nodeType": "PragmaDirective", - "src": "41:23:0" - }, - { - "id": 2, - "literals": - [ - "experimental", - "ABIEncoderV2" - ], - "nodeType": "PragmaDirective", - "src": "65:33:0" - }, - { - "abstract": false, - "baseContracts": [], - "canonicalName": "TenPower", - "contractDependencies": [], - "contractKind": "contract", - "fullyImplemented": true, - "id": 23, - "linearizedBaseContracts": - [ - 23 - ], - "name": "TenPower", - "nameLocation": "109:8:0", - "nodeType": "ContractDefinition", - "nodes": - [ - { - "body": - { - "id": 21, - "nodeType": "Block", - "src": "198:122:0", - "statements": - [ - { - "assignments": - [ - 10 - ], - "declarations": - [ - { - "constant": false, - "id": 10, - "mutability": "mutable", - "name": "a", - "nameLocation": "216:1:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "208:9:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 9, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "208:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 12, - "initialValue": - { - "hexValue": "3130", - "id": 11, - "isConstant": false, - "isLValue": false, - "isPure": true, - "kind": "number", - "lValueRequested": false, - "nodeType": "Literal", - "src": "220:2:0", - "typeDescriptions": - { - "typeIdentifier": "t_rational_10_by_1", - "typeString": "int_const 10" - }, - "value": "10" - }, - "nodeType": "VariableDeclarationStatement", - "src": "208:14:0" - }, - { - "assignments": - [ - 14 - ], - "declarations": - [ - { - "constant": false, - "id": 14, - "mutability": "mutable", - "name": "res", - "nameLocation": "240:3:0", - "nodeType": "VariableDeclaration", - "scope": 21, - "src": "232:11:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 13, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "232:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "id": 18, - "initialValue": - { - "commonType": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "id": 17, - "isConstant": false, - "isLValue": false, - "isPure": false, - "lValueRequested": false, - "leftExpression": - { - "id": 15, - "name": "a", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 10, - "src": "246:1:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "BinaryOperation", - "operator": "**", - "rightExpression": - { - "id": 16, - "name": "decimals", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 4, - "src": "251:8:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "src": "246:13:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "nodeType": "VariableDeclarationStatement", - "src": "232:27:0" - }, - { - "expression": - { - "id": 19, - "name": "res", - "nodeType": "Identifier", - "overloadedDeclarations": [], - "referencedDeclaration": 14, - "src": "276:3:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "functionReturnParameters": 8, - "id": 20, - "nodeType": "Return", - "src": "269:10:0" - } - ] - }, - "functionSelector": "eb79f1be", - "id": 22, - "implemented": true, - "kind": "function", - "modifiers": [], - "name": "get10PowerDecimals", - "nameLocation": "133:18:0", - "nodeType": "FunctionDefinition", - "parameters": - { - "id": 5, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 4, - "mutability": "mutable", - "name": "decimals", - "nameLocation": "158:8:0", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "152:14:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - }, - "typeName": - { - "id": 3, - "name": "uint8", - "nodeType": "ElementaryTypeName", - "src": "152:5:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint8", - "typeString": "uint8" - } - }, - "visibility": "internal" - } - ], - "src": "151:16:0" - }, - "returnParameters": - { - "id": 8, - "nodeType": "ParameterList", - "parameters": - [ - { - "constant": false, - "id": 7, - "mutability": "mutable", - "name": "", - "nameLocation": "-1:-1:-1", - "nodeType": "VariableDeclaration", - "scope": 22, - "src": "189:7:0", - "stateVariable": false, - "storageLocation": "default", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - }, - "typeName": - { - "id": 6, - "name": "uint256", - "nodeType": "ElementaryTypeName", - "src": "189:7:0", - "typeDescriptions": - { - "typeIdentifier": "t_uint256", - "typeString": "uint256" - } - }, - "visibility": "internal" - } - ], - "src": "188:9:0" - }, - "scope": 23, - "src": "124:196:0", - "stateMutability": "pure", - "virtual": false, - "visibility": "public" - } - ], - "scope": 24, - "src": "100:222:0", - "usedErrors": [] - } - ], - "src": "41:282:0" -} \ No newline at end of file +{"absolutePath":"benchmarks/10Power/TenPower.sol","exportedSymbols":{"TenPower":[23]},"id":24,"license":"GPL-3.0-only","nodeType":"SourceUnit","nodes":[{"id":1,"literals":["solidity",">","0.7",".0"],"nodeType":"PragmaDirective","src":"41:23:0"},{"id":2,"literals":["experimental","ABIEncoderV2"],"nodeType":"PragmaDirective","src":"65:33:0"},{"abstract":false,"baseContracts":[],"canonicalName":"TenPower","contractDependencies":[],"contractKind":"contract","fullyImplemented":true,"id":23,"linearizedBaseContracts":[23],"name":"TenPower","nameLocation":"109:8:0","nodeType":"ContractDefinition","nodes":[{"body":{"id":21,"nodeType":"Block","src":"198:122:0","statements":[{"assignments":[10],"declarations":[{"constant":false,"id":10,"mutability":"mutable","name":"a","nameLocation":"216:1:0","nodeType":"VariableDeclaration","scope":21,"src":"208:9:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":9,"name":"uint256","nodeType":"ElementaryTypeName","src":"208:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":12,"initialValue":{"hexValue":"3130","id":11,"isConstant":false,"isLValue":false,"isPure":true,"kind":"number","lValueRequested":false,"nodeType":"Literal","src":"220:2:0","typeDescriptions":{"typeIdentifier":"t_rational_10_by_1","typeString":"int_const 10"},"value":"10"},"nodeType":"VariableDeclarationStatement","src":"208:14:0"},{"assignments":[14],"declarations":[{"constant":false,"id":14,"mutability":"mutable","name":"res","nameLocation":"240:3:0","nodeType":"VariableDeclaration","scope":21,"src":"232:11:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":13,"name":"uint256","nodeType":"ElementaryTypeName","src":"232:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"id":18,"initialValue":{"commonType":{"typeIdentifier":"t_uint256","typeString":"uint256"},"id":17,"isConstant":false,"isLValue":false,"isPure":false,"lValueRequested":false,"leftExpression":{"id":15,"name":"a","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":10,"src":"246:1:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"BinaryOperation","operator":"**","rightExpression":{"id":16,"name":"decimals","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":4,"src":"251:8:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"src":"246:13:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"nodeType":"VariableDeclarationStatement","src":"232:27:0"},{"expression":{"id":19,"name":"res","nodeType":"Identifier","overloadedDeclarations":[],"referencedDeclaration":14,"src":"276:3:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"functionReturnParameters":8,"id":20,"nodeType":"Return","src":"269:10:0"}]},"functionSelector":"eb79f1be","id":22,"implemented":true,"kind":"function","modifiers":[],"name":"get10PowerDecimals","nameLocation":"133:18:0","nodeType":"FunctionDefinition","parameters":{"id":5,"nodeType":"ParameterList","parameters":[{"constant":false,"id":4,"mutability":"mutable","name":"decimals","nameLocation":"158:8:0","nodeType":"VariableDeclaration","scope":22,"src":"152:14:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"},"typeName":{"id":3,"name":"uint8","nodeType":"ElementaryTypeName","src":"152:5:0","typeDescriptions":{"typeIdentifier":"t_uint8","typeString":"uint8"}},"visibility":"internal"}],"src":"151:16:0"},"returnParameters":{"id":8,"nodeType":"ParameterList","parameters":[{"constant":false,"id":7,"mutability":"mutable","name":"","nameLocation":"-1:-1:-1","nodeType":"VariableDeclaration","scope":22,"src":"189:7:0","stateVariable":false,"storageLocation":"default","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"},"typeName":{"id":6,"name":"uint256","nodeType":"ElementaryTypeName","src":"189:7:0","typeDescriptions":{"typeIdentifier":"t_uint256","typeString":"uint256"}},"visibility":"internal"}],"src":"188:9:0"},"scope":23,"src":"124:196:0","stateMutability":"pure","virtual":false,"visibility":"public"}],"scope":24,"src":"100:222:0","usedErrors":[],"usedEvents":[]}],"src":"41:282:0"} \ No newline at end of file diff --git a/resources/regressions/test5.gconf/mutants/10/MultipleContracts/C.sol b/resources/regressions/test5.gconf/mutants/10/MultipleContracts/C.sol index a5819d3a..dd50f0ad 100644 --- a/resources/regressions/test5.gconf/mutants/10/MultipleContracts/C.sol +++ b/resources/regressions/test5.gconf/mutants/10/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test5.gconf/mutants/11/MultipleContracts/C.sol b/resources/regressions/test5.gconf/mutants/11/MultipleContracts/C.sol index 530045ec..0f071d14 100644 --- a/resources/regressions/test5.gconf/mutants/11/MultipleContracts/C.sol +++ b/resources/regressions/test5.gconf/mutants/11/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test5.gconf/mutants/7/MultipleContracts/C.sol b/resources/regressions/test5.gconf/mutants/7/MultipleContracts/C.sol index dd751c59..39939054 100644 --- a/resources/regressions/test5.gconf/mutants/7/MultipleContracts/C.sol +++ b/resources/regressions/test5.gconf/mutants/7/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test5.gconf/mutants/8/MultipleContracts/C.sol b/resources/regressions/test5.gconf/mutants/8/MultipleContracts/C.sol index a514961f..9f4f8013 100644 --- a/resources/regressions/test5.gconf/mutants/8/MultipleContracts/C.sol +++ b/resources/regressions/test5.gconf/mutants/8/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/resources/regressions/test5.gconf/mutants/9/MultipleContracts/C.sol b/resources/regressions/test5.gconf/mutants/9/MultipleContracts/C.sol index b85149e4..ab4d9fbd 100644 --- a/resources/regressions/test5.gconf/mutants/9/MultipleContracts/C.sol +++ b/resources/regressions/test5.gconf/mutants/9/MultipleContracts/C.sol @@ -14,6 +14,8 @@ library Utils { } contract C { + event Called(); + function foo() external view returns (address[] memory) { address[] memory a = new address[](1); a[0] = msg.sender; @@ -30,9 +32,10 @@ contract C { assert(c[0] == e); } - function callmyself() external view { + function callmyself() external { address[] memory b = this.foo(); Utils.getarray(b, address(this)); + emit Called(); } function add(int8 c, int8 d) public pure returns (int8) { diff --git a/src/mutation.rs b/src/mutation.rs index b0163dbb..54e32202 100644 --- a/src/mutation.rs +++ b/src/mutation.rs @@ -137,6 +137,7 @@ pub enum MutationType { SwapArgumentsFunctionMutation, SwapArgumentsOperatorMutation, UnaryOperatorMutation, + DeleteEmitMutation, } impl ToString for MutationType { @@ -152,6 +153,7 @@ impl ToString for MutationType { MutationType::SwapArgumentsFunctionMutation => "SwapArgumentsFunctionMutation", MutationType::SwapArgumentsOperatorMutation => "SwapArgumentsOperatorMutation", MutationType::UnaryOperatorMutation => "UnaryOperatorMutation", + MutationType::DeleteEmitMutation => "DeleteEmitMutation", }; str.into() } @@ -236,6 +238,14 @@ impl Mutation for MutationType { return n == "UnaryOperation"; } } + MutationType::DeleteEmitMutation => { + if let Some(node_type) = node.node_type() { + if node_type == "EmitStatement" { + return true; + } + } + return false; + } } false } @@ -431,6 +441,18 @@ impl Mutation for MutationType { .map(|r| Mutant::new(source.clone(), *self, start, end, r.to_string())) .collect() } + + MutationType::DeleteEmitMutation => { + let (start, end) = node.get_bounds(); + let empty_expression_statement = "assert(true)".to_string(); + vec![Mutant::new( + source.clone(), + *self, + start, + end, + empty_expression_statement, + )] + } } } } @@ -448,6 +470,7 @@ impl MutationType { // MutationType::SwapArgumentsFunctionMutation, MutationType::SwapArgumentsOperatorMutation, MutationType::UnaryOperatorMutation, + MutationType::DeleteEmitMutation, ] } } @@ -689,6 +712,15 @@ contract A { Ok(()) } + #[test] + pub fn test_delete_emit_mutation() -> Result<(), Box> { + let ops = vec![DeleteEmitMutation]; + let stmts = vec!["uint256 x = 0;", "emit Log(x);"]; + let expected = vec!["assert(true)"]; + assert_exact_mutants_for_statements(&stmts, &ops, &expected); + Ok(()) + } + fn assert_num_mutants_for_statements( statements: &Vec<&str>, ops: &Vec, diff --git a/src/test_util.rs b/src/test_util.rs index acbea09f..a7211e08 100644 --- a/src/test_util.rs +++ b/src/test_util.rs @@ -48,6 +48,7 @@ pub fn wrap_solidity(statements: &[&str], returns: Option<&str>) -> String { pragma solidity ^0.8.0; contract Wrapper {{ + event Log(uint256); function wrapped() public {} {{ {} }} diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 65e3341d..241f4c0b 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -100,22 +100,22 @@ fn multiple_contracts_1() { "assert(true)", (7, 9), ), - ("BinaryOpMutation", "**", "+", (24, 24)), - ("BinaryOpMutation", "**", "-", (24, 24)), - ("BinaryOpMutation", "**", "*", (24, 24)), - ("BinaryOpMutation", "**", "/", (24, 24)), - ("BinaryOpMutation", "**", "%", (24, 24)), + ("BinaryOpMutation", "**", "+", (26, 24)), + ("BinaryOpMutation", "**", "-", (26, 24)), + ("BinaryOpMutation", "**", "*", (26, 24)), + ("BinaryOpMutation", "**", "/", (26, 24)), + ("BinaryOpMutation", "**", "%", (26, 24)), ( "SwapArgumentsOperatorMutation", "a ** decimals", "decimals ** a", - (24, 23), + (26, 23), ), ( "DeleteExpressionMutation", "assert(c[0] == e)", "assert(true)", - (29, 9), + (31, 9), ), ], ) @@ -132,16 +132,16 @@ fn multiple_contracts_2() { ("BinaryOpMutation", "+", "/", (11, 17)), ("BinaryOpMutation", "+", "%", (11, 17)), /* C.get10PowerDecimals */ - ("BinaryOpMutation", "**", "+", (24, 24)), - ("BinaryOpMutation", "**", "-", (24, 24)), - ("BinaryOpMutation", "**", "*", (24, 24)), - ("BinaryOpMutation", "**", "/", (24, 24)), - ("BinaryOpMutation", "**", "%", (24, 24)), + ("BinaryOpMutation", "**", "+", (26, 24)), + ("BinaryOpMutation", "**", "-", (26, 24)), + ("BinaryOpMutation", "**", "*", (26, 24)), + ("BinaryOpMutation", "**", "/", (26, 24)), + ("BinaryOpMutation", "**", "%", (26, 24)), ( "SwapArgumentsOperatorMutation", "a ** decimals", "decimals ** a", - (24, 23), + (26, 23), ), ], ) @@ -168,39 +168,45 @@ fn multiple_contracts_3() { "DeleteExpressionMutation", "a[0] = msg.sender", "assert(true)", - (18, 9), + (20, 9), ), /* C.get10PowerDecimals */ - ("BinaryOpMutation", "**", "+", (24, 24)), - ("BinaryOpMutation", "**", "-", (24, 24)), - ("BinaryOpMutation", "**", "*", (24, 24)), - ("BinaryOpMutation", "**", "/", (24, 24)), - ("BinaryOpMutation", "**", "%", (24, 24)), + ("BinaryOpMutation", "**", "+", (26, 24)), + ("BinaryOpMutation", "**", "-", (26, 24)), + ("BinaryOpMutation", "**", "*", (26, 24)), + ("BinaryOpMutation", "**", "/", (26, 24)), + ("BinaryOpMutation", "**", "%", (26, 24)), ( "SwapArgumentsOperatorMutation", "a ** decimals", "decimals ** a", - (24, 23), + (26, 23), ), ( "DeleteExpressionMutation", "assert(c[0] == e)", "assert(true)", - (29, 9), + (31, 9), ), ( "DeleteExpressionMutation", "Utils.getarray(b, address(this))", "assert(true)", - (34, 9), + (36, 9), ), /* C.getarray */ /* C.callmyself */ /* C.add */ - ("BinaryOpMutation", "+", "-", (38, 17)), - ("BinaryOpMutation", "+", "*", (38, 17)), - ("BinaryOpMutation", "+", "/", (38, 17)), - ("BinaryOpMutation", "+", "%", (38, 17)), + ( + "DeleteEmitMutation", + "emit Called()", + "assert(true)", + (37, 9), + ), + ("BinaryOpMutation", "+", "-", (41, 17)), + ("BinaryOpMutation", "+", "*", (41, 17)), + ("BinaryOpMutation", "+", "/", (41, 17)), + ("BinaryOpMutation", "+", "%", (41, 17)), ], ) } @@ -220,10 +226,10 @@ fn multiple_contracts_4() { /* C.getarray */ /* C.callmyself */ /* C.add */ - ("BinaryOpMutation", "+", "-", (38, 17)), - ("BinaryOpMutation", "+", "*", (38, 17)), - ("BinaryOpMutation", "+", "/", (38, 17)), - ("BinaryOpMutation", "+", "%", (38, 17)), + ("BinaryOpMutation", "+", "-", (41, 17)), + ("BinaryOpMutation", "+", "*", (41, 17)), + ("BinaryOpMutation", "+", "/", (41, 17)), + ("BinaryOpMutation", "+", "%", (41, 17)), ], ) }