module lang::php::analysis::includes::IncludeGraph
rascal-0.40.17
php-analysis-0.2.4
Usage
import lang::php::analysis::includes::IncludeGraph;
Source code
Dependencies
import lang::php::ast::AbstractSyntax;
import lang::php::ast::System;
import lang::php::stats::Stats;
import lang::php::util::LocUtils;
import lang::php::analysis::evaluators::AlgebraicSimplification;
import lang::php::analysis::evaluators::SimulateCalls;
import lang::php::analysis::includes::LibraryIncludes;
import analysis::graphs::Graph;
import String;
import Set;
data IncludeGraphNode
data IncludeGraphNode
= igNode(str fileName, loc fileLoc)
| libNode(str libName, str libPath)
| unknownNode()
| multiNode(set[IncludeGraphNode] alts)
| anyNode()
;
data IncludeGraphEdge
data IncludeGraphEdge
= igEdge(IncludeGraphNode source, IncludeGraphNode target, Expr includeExpr)
;
data IncludeGraph
data IncludeGraph
= igGraph(map[loc,IncludeGraphNode] nodes, set[IncludeGraphEdge] edges)
;
function getEdgeTargets
set[loc] getEdgeTargets(IncludeGraph igraph, IncludeGraphEdge edge)
function extractIncludeGraph
IncludeGraph extractIncludeGraph(System scripts, loc productRoot, set[LibItem] libraries)
function collapseToGraph
Graph[str] collapseToGraph(IncludeGraph ig)
function collapseToLocGraph
Graph[loc] collapseToLocGraph(IncludeGraph ig)
function collapseToNodeGraph
Graph[IncludeGraphNode] collapseToNodeGraph(IncludeGraph ig)
function nodeForLoc
IncludeGraphNode nodeForLoc(IncludeGraph ig, loc l)