The difference between the next_instructions() function and next_instruction() is that this function will return all instructions following the current instruction in the CFG (control-flow-graph).
The function is intra-procedural, and thus will not follow function calls; for the inter-procedural variant of this function, use extended_next_instructions().
Query Example
from glider import*defquery(): instructions =Instructions().exec(1,9)return instructions + instructions[0].next_instructions()
Output
"root":{4 items"contract":string"0xd705c24267ed3c55458160104994c55c6492dfcf""contract_name":string"SafeMath""sol_function":solidityfunctionsub(uint256 a,uint256 b,stringmemory errorMessage) internalpurereturns (uint256) {require(b <= a, errorMessage);uint256 c = a - b;return c; }"sol_instruction":solidityrequire(b <= a, errorMessage)},"root":{4 items"contract":string"0xd705c24267ed3c55458160104994c55c6492dfcf""contract_name":string"SafeMath""sol_function":solidityfunctionsub(uint256 a,uint256 b,stringmemory errorMessage) internalpurereturns (uint256) {require(b <= a, errorMessage);uint256 c = a - b;return c; }"sol_instruction":solidityuint256 c = a - b},"root":{4 items"contract":string"0xd705c24267ed3c55458160104994c55c6492dfcf""contract_name":string"SafeMath""sol_function":solidityfunctionsub(uint256 a,uint256 b,stringmemory errorMessage) internalpurereturns (uint256) {require(b <= a, errorMessage);uint256 c = a - b;return c; }"sol_instruction":solidityreturn c}