Skip to main content

module lang::php::analysis::cfg::FlowEdge

rascal-0.40.17
php-analysis-0.2.4

Usage

import lang::php::analysis::cfg::FlowEdge;

Source code

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

Dependencies

import lang::php::ast::AbstractSyntax;
import lang::php::analysis::cfg::Label;
import lang::php::pp::PrettyPrinter;
import List;

data FlowEdge

data FlowEdge  
= flowEdge(Lab from, Lab to)
| backEdge(Lab from, Lab to)
| jumpEdge(Lab from, Lab to)
| conditionTrueFlowEdge(Lab from, Lab to, Lab header, Expr why)
| conditionTrueFlowEdge(Lab from, Lab to, Lab header, Expr why, list[Expr] whyNots)
| conditionTrueFlowEdge(Lab from, Lab to, Lab header, list[Expr] whys)
| conditionTrueFlowEdge(Lab from, Lab to, Lab header, list[Expr] whys, list[Expr] whyNots)
| conditionTrueBackEdge(Lab from, Lab to, Lab header, Expr why)
| conditionFalseFlowEdge(Lab from, Lab to, Lab header, Expr whyNot)
| conditionFalseFlowEdge(Lab from, Lab to, Lab header, list[Expr] whyNots)
| iteratorEmptyFlowEdge(Lab from, Lab to, Lab header, Expr arr)
| iteratorNotEmptyFlowEdge(Lab from, Lab to, Lab header, Expr arr)
| escapingBreakEdge(Lab from, Lab to, OptionExpr breakAmount)
| escapingContinueEdge(Lab from, Lab to, OptionExpr continueAmount)
| escapingGotoEdge(Lab from, Lab to, str gotoLabel)
;

alias FlowEdges

set[FlowEdge]

function printFlowEdgeLabel

str printFlowEdgeLabel(flowEdge(Lab from, Lab to))

str printFlowEdgeLabel(backEdge(Lab from, Lab to))

str printFlowEdgeLabel(jumpEdge(Lab from, Lab to))

str printFlowEdgeLabel(conditionTrueFlowEdge(Lab from, Lab to, Lab header, Expr why))

str printFlowEdgeLabel(conditionTrueFlowEdge(Lab from, Lab to, Lab header, Expr why, list[Expr] whyNots))

str printFlowEdgeLabel(conditionTrueFlowEdge(Lab from, Lab to, Lab header, list[Expr] whys))

str printFlowEdgeLabel(conditionTrueFlowEdge(Lab from, Lab to, Lab header, list[Expr] whys, list[Expr] whyNots))

str printFlowEdgeLabel(conditionTrueBackEdge(Lab from, Lab to, Lab header, Expr why))

str printFlowEdgeLabel(conditionFalseFlowEdge(Lab from, Lab to, Lab header, Expr whyNot))

str printFlowEdgeLabel(conditionFalseFlowEdge(Lab from, Lab to, Lab header, list[Expr] whyNots))

str printFlowEdgeLabel(iteratorEmptyFlowEdge(Lab from, Lab to, Lab header, Expr arr))

str printFlowEdgeLabel(iteratorNotEmptyFlowEdge(Lab from, Lab to, Lab header, Expr arr))

str printFlowEdgeLabel(escapingBreakEdge(Lab from, Lab to, OptionExpr breakAmount))

str printFlowEdgeLabel(escapingContinueEdge(Lab from, Lab to, OptionExpr continueAmount))

str printFlowEdgeLabel(escapingGotoEdge(Lab from, Lab to, str gotoLabel))