Skip to main content

module lang::php::analysis::callgraph::SimpleCG

rascal-0.40.17
php-analysis-0.2.4

Usage

import lang::php::analysis::callgraph::SimpleCG;

Source code

http://github.com/cwi-swat/php-analysis/blob/main/src/main/rascal/lang/php/analysis/callgraph/SimpleCG.rsc

Dependencies

import lang::php::ast::AbstractSyntax;
import lang::php::analysis::NamePaths;
import lang::php::analysis::signatures::Summaries;
import lang::php::analysis::signatures::Signatures;
import lang::php::ast::System;

data CallTarget

data CallTarget  
= functionTarget(str functionName, loc definedAt)
| methodTarget(str className, str methodName, loc definedAt)
| unknownTarget(str functionOrMethodName)
;

alias CallGraph

rel[loc callSource, CallTarget callTarget]

alias InvertedCallGraph

rel[CallTarget callTarget, loc callSource]

function computeSystemCallGraph

CallGraph computeSystemCallGraph(System s)

function computeScriptCallGraph

CallGraph computeScriptCallGraph(Script s, map[str functionName, set[CallTarget] callTargets] functionTargetsMap, map[str methodName, set[CallTarget] callTargets] methodTargetsMap)