* Builds a higher level AST view. I creates a list with each contract as an object in it.
* Example contractsOut:
*
* {
* "node": {}, // actual AST Node of the contract
* "functions": [
* {
* "node": {}, // actual AST Node of the function
* "relevantNodes": [], // AST nodes in the function that are relevant for the anlysis of this function
* "modifierInvocations": [], // Modifier invocation AST nodes that are applied on this function
* "localVariables": [], // Local variable declaration nodes
* "parameters": [] // Parameter types of the function in order of definition
* }
* ],
* "modifiers": [], // Modifiers definded by the contract, format similar to functions
* "inheritsFrom": [], // Names of contract this one inherits from in order of definition
* "stateVariables": [] // AST nodes of all State variables
* }
*
* @relevantNodeFilter {ASTNode -> bool} function that selects relevant ast nodes for analysis on function level.
* @contractsOut {list} return list for high level AST view
* @return {ASTNode -> void} returns a function that can be used as visit function for static analysis modules, to build up a higher level AST view for further analysis.
* Returns the type parameter of function call AST nodes. Throws if not a function call node
* @func {ASTNode} Function call node
* @return {string} type of function call
*/
functiongetFunctionCallType(func){
if(!(isExternalDirectCall(func)||isThisLocalCall(func)||isSuperLocalCall(func)||isLocalCall(func)||isLibraryCall(func)))thrownewError('staticAnalysisCommon.js: not function call Node')
* Get the variable name written to by a effect node, except for inline assembly because there is no information to find out where we write to. Trows if not a effect node or is inlineassmbly.
* Example: x = 10; => x
* @effectNode {ASTNode} Function call node
* @return {string} variable name written to
*/
functiongetEffectedVariableName(effectNode){
if(!isEffect(effectNode)||isInlineAssembly(effectNode))thrownewError('staticAnalysisCommon.js: not an effect Node or inline assembly')