.. java:import:: fr.inria.tapenade.representation Block .. java:import:: fr.inria.tapenade.representation BlockStorage .. java:import:: fr.inria.tapenade.representation CallArrow .. java:import:: fr.inria.tapenade.representation CallGraph .. java:import:: fr.inria.tapenade.representation FGArrow .. java:import:: fr.inria.tapenade.representation FGConstants .. java:import:: fr.inria.tapenade.representation FunctionDecl .. java:import:: fr.inria.tapenade.representation HeaderBlock .. java:import:: fr.inria.tapenade.representation ILUtils .. java:import:: fr.inria.tapenade.representation Instruction .. java:import:: fr.inria.tapenade.representation LoopBlock .. java:import:: fr.inria.tapenade.representation PointerTypeSpec .. java:import:: fr.inria.tapenade.representation PublicInfo .. java:import:: fr.inria.tapenade.representation SymbolTable .. java:import:: fr.inria.tapenade.representation SymbolTableConstants .. java:import:: fr.inria.tapenade.representation TapEnv .. java:import:: fr.inria.tapenade.representation TapList .. java:import:: fr.inria.tapenade.representation TypeSpec .. java:import:: fr.inria.tapenade.representation Unit .. java:import:: fr.inria.tapenade.representation UnitStorage .. java:import:: fr.inria.tapenade.representation WrapperTypeSpec .. java:import:: fr.inria.tapenade.representation ZoneInfo .. java:import:: fr.inria.tapenade.utils BoolMatrix .. java:import:: fr.inria.tapenade.utils BoolVector .. java:import:: fr.inria.tapenade.utils Chrono .. java:import:: fr.inria.tapenade.utils ILLang .. java:import:: fr.inria.tapenade.utils TapIntList .. java:import:: fr.inria.tapenade.utils TapPair .. java:import:: fr.inria.tapenade.utils ToBool .. java:import:: fr.inria.tapenade.utils Tree DataFlowAnalyzer ================ .. java:package:: fr.inria.tapenade.analysis :noindex: .. java:type:: public class DataFlowAnalyzer Base class for data-flow analyses. To define an actual data-flow analysis, build a derived class that overloads at least constructor \ :java:ref:`DataFlowAnalyzer(CallGraph,String,TapList)`\ and method \ :java:ref:`run(TapList)`\ . Whenever user-provided implementation uses a predefined utility methods "M" of the present class, one may need to overload recursively other utility methods as indicated in the documentation of "M". Fields ------ NOACT ^^^^^ .. java:field:: protected static final int NOACT :outertype: DataFlowAnalyzer Code for no "write" nor "read" action. READ ^^^^ .. java:field:: protected static final int READ :outertype: DataFlowAnalyzer Code for action "read". WRITE ^^^^^ .. java:field:: protected static final int WRITE :outertype: DataFlowAnalyzer Code for action "write". conservativeValue ^^^^^^^^^^^^^^^^^ .. java:field:: protected boolean conservativeValue :outertype: DataFlowAnalyzer The conservative info value for this analysis. curActivity ^^^^^^^^^^^ .. java:field:: protected ActivityPattern curActivity :outertype: DataFlowAnalyzer The current ActivityPattern for which we analyze the current Unit. curAnalysisName ^^^^^^^^^^^^^^^ .. java:field:: protected String curAnalysisName :outertype: DataFlowAnalyzer The name of the present analysis. curArrow ^^^^^^^^ .. java:field:: protected FGArrow curArrow :outertype: DataFlowAnalyzer The current Flow Graph arrow through which the analysis is propagating. One may assume that curArrow is available in defining the following methods (if one chooses to overload them): .. * \ :java:ref:`getValueFlowingThrough()`\ , * \ :java:ref:`getValueFlowingBack()`\ , * \ :java:ref:`cumulValueWithAdditional(SymbolTable)`\ , * \ :java:ref:`cumulCycleValueWithAdditional(SymbolTable)`\ curBlock ^^^^^^^^ .. java:field:: protected Block curBlock :outertype: DataFlowAnalyzer The current Block of the current Unit on which analysis is run. One may assume that curBlock is available in defining the following methods (if one chooses to overload them): .. * \ :java:ref:`initializeInitBlock()`\ , * \ :java:ref:`initializeFGForBlock()`\ , * \ :java:ref:`accumulateValuesFromUpstream()`\ , * \ :java:ref:`accumulateValuesFromDownstream()`\ , * \ :java:ref:`compareUpstreamValues()`\ , * \ :java:ref:`compareDownstreamValues()`\ , * \ :java:ref:`propagateValuesBackwardThroughBlock()`\ , * \ :java:ref:`propagateValuesForwardThroughBlock()`\ , * \ :java:ref:`terminateFGForBlock()`\ , * \ :java:ref:`terminateTermBlock()`\ * \ :java:ref:`propagateValuesForwardThroughExpression()`\ , * \ :java:ref:`propagateValuesBackwardThroughExpression()`\ , * \ :java:ref:`setEmptyCumulAndCycleValues()`\ , * \ :java:ref:`getValueFlowingThrough()`\ , * \ :java:ref:`getValueFlowingBack()`\ , * \ :java:ref:`cumulValueWithAdditional(SymbolTable)`\ , * \ :java:ref:`cumulCycleValueWithAdditional(SymbolTable)`\ , * \ :java:ref:`initializeCumulValue()`\ curCallGraph ^^^^^^^^^^^^ .. java:field:: protected final CallGraph curCallGraph :outertype: DataFlowAnalyzer The current CallGraph on which this analysis is currently run. One may assume that curCallGraph is available in any method of this class that one chooses to overload. curCalledUnit ^^^^^^^^^^^^^ .. java:field:: protected Unit curCalledUnit :outertype: DataFlowAnalyzer When analyzing a call, the current called Unit. One \ **must make sure**\ that curCalledUnit is set to the correct value before using the utilities: .. * \ :java:ref:`includePointedElementsInTree(TapList,ToBool,BoolMatrix,boolean,boolean,boolean)`\ * \ :java:ref:`vectorIndexToExtendedDeclared(int,int,int,int[])`\ , * \ :java:ref:`vectorIndexToZoneInfo(int,int,int,int[])`\ , * \ :java:ref:`extendedDeclaredToVectorIndex(int,int,int[])`\ , * \ :java:ref:`extendedDeclaredToZoneInfo(int)`\ , * \ :java:ref:`zoneRkToVectorIndex(int,int,int,int[])`\ , * \ :java:ref:`zoneRkToExtendedDeclared(int,int,int)`\ , * \ :java:ref:`zoneRkToZoneInfo(int,int,int)`\ , * \ :java:ref:`zoneInfoToVectorIndex(ZoneInfo,int,int,int[])`\ , * \ :java:ref:`zoneInfoToExtendedDeclared(ZoneInfo,int)`\ curInstruction ^^^^^^^^^^^^^^ .. java:field:: protected Instruction curInstruction :outertype: DataFlowAnalyzer The current instruction on which analysis is run. One may assume that curInstruction is available in defining the following methods (if one chooses to overload them): .. * \ :java:ref:`propagateValuesForwardThroughExpression()`\ , * \ :java:ref:`propagateValuesBackwardThroughExpression()`\ Also, one \ **must make sure**\ that curInstruction is set to the correct value before using the utilities: .. * \ :java:ref:`infoTreesOfRefArgs(Tree[],BoolVector,int[],int)`\ , * \ :java:ref:`referenceIsTotal(boolean,TapList)`\ , * \ :java:ref:`includePointedElementsInTree(TapList,ToBool,BoolMatrix,boolean,boolean,boolean)`\ , * \ :java:ref:`setRefValue(Tree,int,BoolVector,int[],boolean,boolean)`\ curSymbolTable ^^^^^^^^^^^^^^ .. java:field:: protected SymbolTable curSymbolTable :outertype: DataFlowAnalyzer The SymbolTable of the currently analyzed Block. One may assume that curSymbolTable is available in defining the following methods (if one chooses to overload them): .. * \ :java:ref:`initializeInitBlock()`\ , * \ :java:ref:`initializeFGForBlock()`\ , * \ :java:ref:`accumulateValuesFromUpstream()`\ , * \ :java:ref:`accumulateValuesFromDownstream()`\ , * \ :java:ref:`compareUpstreamValues()`\ , * \ :java:ref:`compareDownstreamValues()`\ , * \ :java:ref:`propagateValuesBackwardThroughBlock()`\ , * \ :java:ref:`propagateValuesForwardThroughBlock()`\ , * \ :java:ref:`terminateFGForBlock()`\ , * \ :java:ref:`terminateTermBlock()`\ * \ :java:ref:`propagateValuesForwardThroughExpression()`\ , * \ :java:ref:`propagateValuesBackwardThroughExpression()`\ , * \ :java:ref:`setEmptyCumulAndCycleValues()`\ , * \ :java:ref:`getValueFlowingThrough()`\ , * \ :java:ref:`getValueFlowingBack()`\ , * \ :java:ref:`cumulValueWithAdditional(SymbolTable)`\ , * \ :java:ref:`cumulCycleValueWithAdditional(SymbolTable)`\ , * \ :java:ref:`initializeCumulValue()`\ Also, one \ **must make sure**\ that curSymbolTable is set to the correct value before using the utilities: .. * \ :java:ref:`infoTreesOfRefArgs(Tree[],BoolVector,int[],int)`\ , * \ :java:ref:`includePointedElementsInTree(TapList,ToBool,BoolMatrix,boolean,boolean,boolean)`\ , * \ :java:ref:`setRefValue(Tree,int,BoolVector,int[],boolean,boolean)`\ , * \ :java:ref:`setInfoBoolTreeToExtendedDeclaredZones(BoolVector,int[],TapList,boolean,TapList,boolean,int)`\ , * \ :java:ref:`setInfoBoolTreeToExtendedDeclaredZones(BoolVector,int[],TapList,TapList,TapList,boolean,int)`\ , * \ :java:ref:`setInfoPRZVTreeToExtendedDeclaredZones(BoolMatrix,int[],TapList,TapList,TapList,boolean,int)`\ , * \ :java:ref:`vectorIndexToExtendedDeclared(int,int,int,int[])`\ , * \ :java:ref:`vectorIndexToZoneInfo(int,int,int,int[])`\ , * \ :java:ref:`extendedDeclaredToVectorIndex(int,int,int[])`\ , * \ :java:ref:`extendedDeclaredToZoneInfo(int)`\ , * \ :java:ref:`zoneRkToZoneInfo(int,int,int)`\ , * \ :java:ref:`zoneInfoToExtendedDeclared(ZoneInfo,int)`\ curUnit ^^^^^^^ .. java:field:: protected Unit curUnit :outertype: DataFlowAnalyzer The current Unit (representing in particular a Flow Graph) on which this analysis is currently run. One may assume that curUnit is available in defining the following methods (if one chooses to overload them): .. * \ :java:ref:`initializeCGForUnit()`\ , * \ :java:ref:`initializeCGForRootUnit()`\ , * \ :java:ref:`analyze()`\ , * \ :java:ref:`terminateCGForUnit()`\ * \ :java:ref:`initializeUnit()`\ , * \ :java:ref:`initializeInitBlock()`\ , * \ :java:ref:`setCurBlockEtc(Block)`\ , * \ :java:ref:`initializeFGForBlock()`\ , * \ :java:ref:`accumulateValuesFromUpstream()`\ , * \ :java:ref:`accumulateValuesFromDownstream()`\ , * \ :java:ref:`compareUpstreamValues()`\ , * \ :java:ref:`compareDownstreamValues()`\ , * \ :java:ref:`propagateValuesBackwardThroughBlock()`\ , * \ :java:ref:`propagateValuesForwardThroughBlock()`\ , * \ :java:ref:`terminateFGForBlock()`\ , * \ :java:ref:`terminateTermBlock()`\ , * \ :java:ref:`terminateUnit()`\ * \ :java:ref:`propagateValuesForwardThroughExpression()`\ , * \ :java:ref:`propagateValuesBackwardThroughExpression()`\ , * \ :java:ref:`setEmptyCumulAndCycleValues()`\ , * \ :java:ref:`getValueFlowingThrough()`\ , * \ :java:ref:`getValueFlowingBack()`\ , * \ :java:ref:`cumulValueWithAdditional(SymbolTable)`\ , * \ :java:ref:`cumulCycleValueWithAdditional(SymbolTable)`\ , * \ :java:ref:`initializeCumulValue()`\ Also, one \ **must make sure**\ that curUnit is set to the correct value before using the utilities: .. * \ :java:ref:`referenceIsTotal(boolean,TapList)`\ , * \ :java:ref:`vectorIndexToExtendedDeclared(int,int,int,int[])`\ , * \ :java:ref:`vectorIndexToZoneInfo(int,int,int,int[])`\ , * \ :java:ref:`extendedDeclaredToVectorIndex(int,int,int[])`\ , * \ :java:ref:`extendedDeclaredToZoneInfo(int)`\ , * \ :java:ref:`zoneRkToZoneInfo(int,int,int)`\ , * \ :java:ref:`zoneInfoToExtendedDeclared(ZoneInfo,int)`\ filterByValue ^^^^^^^^^^^^^ .. java:field:: public boolean filterByValue :outertype: DataFlowAnalyzer Not very clean global flag to force propagateExitDataBwdToCallee() to skip the filtering of by-value arguments inADeclaration ^^^^^^^^^^^^^^ .. java:field:: protected boolean inADeclaration :outertype: DataFlowAnalyzer True when we are analyzing a tree which is inside a declaration. Useful to distinguish assignments from initializations. nDZ ^^^ .. java:field:: protected int nDZ :outertype: DataFlowAnalyzer number of declared-zones. topDownContexts ^^^^^^^^^^^^^^^ .. java:field:: protected UnitStorage topDownContexts :outertype: DataFlowAnalyzer Context for analyses that are top-down on the Call Graph. tracedUnits ^^^^^^^^^^^ .. java:field:: protected TapList tracedUnits :outertype: DataFlowAnalyzer Units for which we want to trace analysis "on the fly". uniqueAccessZones ^^^^^^^^^^^^^^^^^ .. java:field:: protected BoolVector uniqueAccessZones :outertype: DataFlowAnalyzer BoolVector of declared zones that have a special "unique" access in the current loop. Constructors ------------ DataFlowAnalyzer ^^^^^^^^^^^^^^^^ .. java:constructor:: protected DataFlowAnalyzer(CallGraph callGraph, String analysisName, TapList traceAnalysisUnitNames) :outertype: DataFlowAnalyzer Creation of a DataFlowAnalyzer. Methods ------- accumulateValuesFromDownstream ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean accumulateValuesFromDownstream() :outertype: DataFlowAnalyzer Collects the data-flow information back from the downstream flow arrows of "curBlock". @return true when the collecting returned a "non-empty" info, meaning that the backwards control flow really reaches this point. Special behavior for loop headers, distinguishing loop "entry", "cycle", and "exit". One may overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . If on the other hand, one decides not to overload and use the provided default, then one must consider overloading the methods: .. * \ :java:ref:`setEmptyCumulAndCycleValues()`\ (\ *default nothing*\ ) * \ :java:ref:`getValueFlowingBack()`\ (\ *default nothing returns false*\ ) * \ :java:ref:`cumulValueWithAdditional(SymbolTable)`\ (\ *default nothing*\ ) * \ :java:ref:`cumulCycleValueWithAdditional(SymbolTable)`\ (\ *default nothing*\ ) * \ :java:ref:`initializeCumulValue()`\ (\ *default nothing*\ ) accumulateValuesFromUpstream ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean accumulateValuesFromUpstream() :outertype: DataFlowAnalyzer Collects the data-flow information flow-wise from the incoming flow arrows of "curBlock". Special behavior for loop headers, distinguishing loop "entry", "cycle", and "exit". One may overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . If on the other hand, one decides not to overload and use the provided default, then one must consider overloading the methods: .. * \ :java:ref:`setEmptyCumulAndCycleValues()`\ (\ *default nothing*\ ) * \ :java:ref:`getValueFlowingThrough()`\ (\ *default nothing returns false*\ ) * \ :java:ref:`cumulValueWithAdditional(SymbolTable)`\ (\ *default nothing*\ ) * \ :java:ref:`cumulCycleValueWithAdditional(SymbolTable)`\ (\ *default nothing*\ ) :return: true when the collecting returned a "non-empty" info, meaning that the control flow really reaches this point. addZeroIndexTEMPORARY ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList[] addZeroIndexTEMPORARY(TapList[] array) :outertype: DataFlowAnalyzer analyze ^^^^^^^ .. java:method:: protected boolean analyze() :outertype: DataFlowAnalyzer Runs the present analysis on the curUnit. One may overload with one's own implementation. Default implementation: \ :java:ref:`analyzeForward(TapList,TapList,TapList)`\ Overloading implementation may be or may contain \ :java:ref:`analyzeForward(TapList,TapList,TapList)`\ or \ :java:ref:`analyzeBackward(TapList,TapList,TapList)`\ , in which case one must check their overloadable utilities. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ . :return: For a bottom-up analysis, MUST return true IFF the analysis result has changed since the previous time (or if this is the first time). For a top-down analysis, this result may be anything. analyzeBackward ^^^^^^^^^^^^^^^ .. java:method:: public final boolean analyzeBackward(TapList entryArrows, TapList insideBlocks, TapList exitArrows) :outertype: DataFlowAnalyzer Runs the present analysis, backward on the current Unit "curUnit", or more precisely on the fraction of "curUnit" that is between "entryArrows" and "exitArrows", which consists of the blocks "insideBlocks". The three "entryArrows", "insideBlocks" and "exitArrows" may be passed null, in which case the anlaysis is run on the full "curUnit". As a result, this overwrites the results of this analysis on all Blocks in "insideBlock", plus the info overwritten by initialization of the analysis on the destinations of the "exitArrows" and the info propagated as a result on the origins of the "entryArrows". \ **Globals required:**\ \ :java:ref:`curUnit`\ . If this method is used, then one must consider overloading the methods: .. * \ :java:ref:`initializeUnit()`\ (\ *default nothing*\ ) * \ :java:ref:`initializeInitBlock()`\ (\ *default nothing*\ ) * \ :java:ref:`setCurBlockEtc(Block)`\ (\ *default provided*\ ) * \ :java:ref:`initializeFGForBlock()`\ (\ *default nothing*\ ) * \ :java:ref:`accumulateValuesFromDownstream()`\ (\ *default provided*\ ) * \ :java:ref:`compareDownstreamValues()`\ (\ *default nothing returns false*\ ) * \ :java:ref:`propagateValuesBackwardThroughBlock()`\ (\ *default provided*\ ) * \ :java:ref:`compareUpstreamValues()`\ (\ *default nothing returns false*\ ) * \ :java:ref:`terminateFGForBlock()`\ (\ *default nothing*\ ) * \ :java:ref:`terminateTermBlock()`\ (\ *default nothing*\ ) * \ :java:ref:`terminateUnit()`\ (\ *default nothing returns true*\ ) :param entryArrows: the Flow-Graph arrows at which the (backward) analysis will stop. :param insideBlocks: all the Flow-Graph blocks that are on the way from entryArrows to exitArrows. :param exitArrows: the Flow-Graph arrows from which the (backward) analysis will start. :return: true iff the analysis result is modified since last analysis. analyzeForward ^^^^^^^^^^^^^^ .. java:method:: public final boolean analyzeForward(TapList entryArrows, TapList insideBlocks, TapList exitArrows) :outertype: DataFlowAnalyzer Runs the present analysis, forward on the current Unit "curUnit", or more precisely on the fraction of "curUnit" that is between "entryArrows" and "exitArrows", which consists of the blocks "insideBlocks". The three "entryArrows", "insideBlocks" and "exitArrows" may be passed null, in which case the analysis is run on the full "curUnit". As a result, this overwrites the results of this analysis on all Blocks in "insideBlock", plus the info overwritten by initialization of the analysis on the origins of the "entryArrows" and the info propagated as a result on the destinations of the "exitArrows". \ **Globals required:**\ \ :java:ref:`curUnit`\ . If this method is used, then one must consider overloading the methods: .. * \ :java:ref:`initializeUnit()`\ (\ *default nothing*\ ) * \ :java:ref:`initializeInitBlock()`\ (\ *default nothing*\ ) * \ :java:ref:`setCurBlockEtc(Block)`\ (\ *default provided*\ ) * \ :java:ref:`initializeFGForBlock()`\ (\ *default nothing*\ ) * \ :java:ref:`accumulateValuesFromUpstream()`\ (\ *default provided*\ ) * \ :java:ref:`compareUpstreamValues()`\ (\ *default nothing returns false*\ ) * \ :java:ref:`propagateValuesForwardThroughBlock()`\ (\ *default provided*\ ) * \ :java:ref:`compareDownstreamValues()`\ (\ *default nothing returns false*\ ) * \ :java:ref:`terminateFGForBlock()`\ (\ *default nothing*\ ) * \ :java:ref:`terminateTermBlock()`\ (\ *default nothing*\ ) * \ :java:ref:`terminateUnit()`\ (\ *default nothing returns true*\ ) :param entryArrows: the Flow-Graph arrows from which the analysis will start. :param insideBlocks: all the Flow-Graph blocks that are on the way from entryArrows to exitArrows. :param exitArrows: the Flow-Graph arrows at which the analysis will stop. :return: true if the analysis result is modified since last analysis. analyzeInBottomUp ^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean analyzeInBottomUp() :outertype: DataFlowAnalyzer analyzeInTopDown ^^^^^^^^^^^^^^^^ .. java:method:: protected boolean analyzeInTopDown() :outertype: DataFlowAnalyzer analyzeStatically ^^^^^^^^^^^^^^^^^ .. java:method:: public final boolean analyzeStatically(TapList initBlocks, TapList insideBlocks) :outertype: DataFlowAnalyzer Runs the present data-flow independent analysis on the current Unit "curUnit". More precisely, runs only on the contents of the blocks "insideBlocks". This means that the analysis can be run as a single sweep through each Instruction of "curUnit", without any notion of data-flow order. For instance this can be used to propagate some data to each Unit recursively called by curUnit without modifying the data because of interpretation of curUnit. :param initBlocks: all the Flow-Graph blocks of curUnit for which a special initialization action must/will be made through a call to initializeInitBlock() :param insideBlocks: all the Flow-Graph blocks of curUnit that must be swept. If given null, the analysis will sweep through all Blocks of curUnit. :return: true iff the analysis result on curUnit is modified since last analysis call. This return value is used only in the context of a bottom-up analysis (runBottomUpAnalysis()) Otherwise this return value is ignored. buildInfoBoolTreeOfDeclaredZones ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList buildInfoBoolTreeOfDeclaredZones(TapList zonesTree, BoolVector info, int[] vectorMap, TapIntList extraInfoZones, int whichKind, SymbolTable symbolTable) :outertype: DataFlowAnalyzer :return: a new (TapList) tree of Boolean's, following the pattern of the given (TapList) tree of zones "zonesTree", for which each TapIntList leaf becomes a Boolean which is true iff this TapIntList of extended declared zones intersects the given "info"+"extraInfoZones". buildInfoBoolTreeOfDeclaredZonesAll ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList buildInfoBoolTreeOfDeclaredZonesAll(TapList zonesTree, BoolVector info, int[] vectorMap, TapIntList extraInfoZones, int whichKind, SymbolTable symbolTable) :outertype: DataFlowAnalyzer Same as buildInfoBoolTreeOfDeclaredZones, but places a True only if ALL the list of zones at this leaf are true for the given "info"+"extraInfoZones". buildInfoBoolTreeOfPointers ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList buildInfoBoolTreeOfPointers(TapList zonesTree, int[] ptrVectorMap, SymbolTable symbolTable) :outertype: DataFlowAnalyzer :return: a new (TapList) tree of Boolean's, following the pattern of the given (TapList) tree of zones "zonesTree", in which a TapIntList leaf is true iff this zone is a pointer. buildInfoPRZVTreeOfExtendedDeclared ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final TapList buildInfoPRZVTreeOfExtendedDeclared(TapList zonesTree, BoolMatrix matrix, int whichKind, int[] rowMap) :outertype: DataFlowAnalyzer :param zonesTree: The tree of extended declared zones for which the info is sought. :param matrix: The matrix that contains the info. :param whichKind: The kind that is used to number the row indices in "matrix". :param rowMap: The map of the rows of "matrix", i.e. the map of the row indices. :return: The resulting info as a tree of BoolVector's buildPublicPointerZoneMask ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static BoolVector buildPublicPointerZoneMask(Unit unit) :outertype: DataFlowAnalyzer Builds a BoolVector with 1 only for public zones of type "pointer" which point to a type which is differentiated. changeCommonDeclared ^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected static int[] changeCommonDeclared(int[] map3, int newNDZ) :outertype: DataFlowAnalyzer Builds a new map with a new number of declared zones. changeKind ^^^^^^^^^^ .. java:method:: public static BoolVector changeKind(BoolVector oldInfo, int[] oldMap, int oldKind, int[] newMap, int newKind, SymbolTable symbolTable) :outertype: DataFlowAnalyzer Convert a BoolVector containing an info on zones of kind "oldKind". into the same info (or a subset depending on oldKind/newKind) on zones of kind "newKind". :return: the converted info collectZonesWrittenByExpression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void collectZonesWrittenByExpression(Tree expr, int act, BoolVector written, Instruction instr) :outertype: DataFlowAnalyzer Accumulates into "written" the zones (possibly and/or partly) written by "expr" commonNDZofFrontierArrows ^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static int commonNDZofFrontierArrows(TapList frontier, int kind) :outertype: DataFlowAnalyzer :return: the number of zones that flow through all arrows of the given "frontier". It is the min of the number of zones that can flow through each arrow. For future dataflow analysis. commonNDZofFrontierDestinations ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static int commonNDZofFrontierDestinations(TapList frontier, int kind) :outertype: DataFlowAnalyzer :return: the number of common declared zones of all destinations of the given "frontier". commonNDZofFrontierOrigins ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static int commonNDZofFrontierOrigins(TapList frontier, int kind) :outertype: DataFlowAnalyzer :return: the number of common declared zones of all origins of the given "frontier". compareChannelZoneDataDownstream ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean compareChannelZoneDataDownstream(int mpZone, Block refBlock) :outertype: DataFlowAnalyzer Compares the info for the Message-Passing channel zone "mpZone", downstream curBlock compared with downstream "refBlock". If curBlock's is larger, accumulates it into refBlock's and returns true. This default does nothing, complains, and returns false. Overload with one's own choice. compareChannelZoneDataUpstream ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean compareChannelZoneDataUpstream(int mpZone, Block refBlock) :outertype: DataFlowAnalyzer Compares the info for the Message-Passing channel zone "mpZone", upstream curBlock compared with upstream "refBlock". If curBlock's is larger, accumulates it into refBlock's and returns true. This default does nothing, complains, and returns false. Overload with one's own choice. compareDownstreamValues ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean compareDownstreamValues() :outertype: DataFlowAnalyzer Compares the current data-flow information with the info stored here (downstream current "curBlock") upon previous sweep. :return: true when something has changed and therefore another Flow Graph sweep is probably necessary. Takes (should take) care of storing the new info when modified. This default does nothing and returns false. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . compareUpstreamChannelValuesWithInitial ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean compareUpstreamChannelValuesWithInitial(TapList initBlocks) :outertype: DataFlowAnalyzer Compares the current computed info about message-Passing channels, upstream the current Block "block" with the corresponding info upstream each Block in "initBlocks" (remember this is a backwards analysis!). If the current info is "larger", accumulates it into the info downstream the "initBlocks" and returns true, meaning that the fixpoint iteration must restart. Otherwise returns false. compareUpstreamValues ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean compareUpstreamValues() :outertype: DataFlowAnalyzer Compares the current data-flow information with the info stored here (upstream current "curBlock") upon previous sweep. :return: true when something has changed and therefore another Flow Graph sweep is probably necessary. Takes (should take) care of storing the new info when modified. This default does nothing and returns false. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . compareWithStorage ^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean compareWithStorage(BoolVector newInfo, BoolVector newInfoCycle, int length, BlockStorage storedInfos, BlockStorage storedInfosCycle) :outertype: DataFlowAnalyzer Utility that may be used in implementation of compare(Up/Down)streamValues() Compares BoolVector "newInfo" with the info stored for block in the BlockStorage "storedInfos". If there is a modification, replace the stored by the new. Does the same for the corresponding cycling infos. returns true iff either was replaced. compareWithStorage ^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean compareWithStorage(BoolVector newInfo, BoolVector newInfoOnDiffPtr, BoolVector newInfoCycle, BoolVector newInfoCycleOnDiffPtr, int length, int lengthOnDiffPtr, BlockStorage> storedInfos, BlockStorage> storedInfosCycle) :outertype: DataFlowAnalyzer Special case of compareWithStorage() for pairs of BoolVector's, the first one for "normal" info, the second one for the info on differentiated pointers (OnDiffPtr). This primitive makes sense e.g. for DiffLiveness and TBR analyses. :return: true if the new info is different from the previous one. In that case, replaces the old info with the new. containsExtendedDeclared ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean containsExtendedDeclared(BoolVector info, int[] vectorMap, int kind, TapIntList extendedDeclaredZones, TapIntList extraInfoZones, SymbolTable symbolTable, Unit calledUnit) :outertype: DataFlowAnalyzer :return: true when all zones in the given list of extended declared zones is either true in "info" or is part of the given "extraInfoZones". convertPublicInfoFromUnitToUnit ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static BoolVector convertPublicInfoFromUnitToUnit(BoolVector dataOnFromUnit, Unit fromUnit, Unit toUnit, int diffKind) :outertype: DataFlowAnalyzer Converts a public info Boolvector, based on the external shape of fromUnit, into the equivalent public info Boolvector, but based on the external shape of toUnit. cumulCycleValueWithAdditional ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void cumulCycleValueWithAdditional(SymbolTable commonSymbolTable) :outertype: DataFlowAnalyzer Accumulate the retrieved cycling data-flow value (through the cycling FGArrow curArrow) into the user-defined accumulator for cycling data-flow values. This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curArrow`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . :param commonSymbolTable: The SymbolTable which is common to the origin and the destination of curArrow. cumulOr ^^^^^^^ .. java:method:: protected static void cumulOr(TapList boolVectorTree, BoolVector result, boolean followPointers) :outertype: DataFlowAnalyzer Sweeps through the given "boolVectorTree", which must be a tree of BoolVector's. OR-accumulates all BoolVector leaves of this tree into BoolVector "result". :param followPointers: when false, skips the parts of boolVectorTree that deal with pointers, i.e. that can only be accessed through a pointer deref. cumulValueWithAdditional ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void cumulValueWithAdditional(SymbolTable commonSymbolTable) :outertype: DataFlowAnalyzer Accumulate the retrieved data-flow value (through the FGArrow curArrow) into the user-defined accumulator. This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curArrow`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . :param commonSymbolTable: The SymbolTable which is common to the origin and the destination of curArrow. dataOfParamElemOLD ^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean dataOfParamElemOLD(BoolVector calleeData, int paramElemIndex, int whichKind, Unit callee) :outertype: DataFlowAnalyzer declaredZonesNotFromEntryToExit ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final TapIntList declaredZonesNotFromEntryToExit(HeaderBlock header, int whichKind) :outertype: DataFlowAnalyzer :return: the TapIntList of all declared zones of the "whichKind" kind that cannot travel directly from the entry to the exit of the cycle headed by this "header". This is an alternative to using directEntryExitMask(). directEntryExitMask ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected final BoolVector directEntryExitMask(HeaderBlock header, int[] vectorMap, int whichKind) :outertype: DataFlowAnalyzer :return: the mask of all zones whose info must be propagated from (or to) the upstream non-cycling entry of this header to (or from) the downstream non-cycling exit of this header. This is true for all zones if the loop may cycle 0 times, else this is true for array zones that 1) have been treated as unique cells inside the loop, 2) and will not be unique cells outside the loop, 3) and are not totally accessed inside the loop. (cf bug in F77:lh05 with this refined version of activity) extendedDeclaredToClass ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final int extendedDeclaredToClass(int extendedRk) :outertype: DataFlowAnalyzer :param extendedRk: the given extended declared zone rank :return: the corresponding class. extendedDeclaredToClass ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static int extendedDeclaredToClass(int extendedRk, SymbolTable symbolTable) :outertype: DataFlowAnalyzer :param extendedRk: the given extended declared zone rank :param symbolTable: The current symbolTable. :return: the corresponding class. extendedDeclaredToPublicRanks ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapIntList extendedDeclaredToPublicRanks(TapIntList extendedRks, SymbolTable symbolTable) :outertype: DataFlowAnalyzer Translates a list of extended declared zone ranks into the corresponding public ranks of the current unit. Correspondence is not one-to-one in general, therefore the returned TapIntList may be of different length or even empty if all given extendedRks stand for local variables inexistent at the current Unit level. TODO: this implementation is INEFFICIENT: we really miss a direct link from private zones to public zones! Static version. Needs the current SymbolTable (original, not differentiated). For future dataflow analysis. :param extendedRks: the given list of extended declared zone ranks :param symbolTable: The current symbolTable. :return: the list of ranks of the corresponding public zones. extendedDeclaredToVectorIndex ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final int extendedDeclaredToVectorIndex(int extendedRk, int zoneKind, int[] vectorMap) :outertype: DataFlowAnalyzer Translates an extended declared zone rank into the corresponding BoolVector rank, where arrangement of the BoolVector is given by its "vectorMap" and kind "zoneKind". \ **Globals required:**\ \ :java:ref:`curUnit`\ , \ :java:ref:`curCalledUnit`\ , \ :java:ref:`curSymbolTable`\ :param extendedRk: The given extended declared zone rank. :param zoneKind: The kind (in {ALLKIND, REALKIND, PTRKIND}) used in the BoolVector. :param vectorMap: The map of the BoolVector. :return: The corresponding BoolVector rank. extendedDeclaredToVectorIndex ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static int extendedDeclaredToVectorIndex(int extendedRk, int zoneKind, int[] vectorMap, SymbolTable symbolTable, Unit calledUnit) :outertype: DataFlowAnalyzer Translates an extended declared zone rank into the corresponding BoolVector rank, where the arrangement of the BoolVector is given by its "vectorMap" and the kind "zoneKind". Static version. Needs the "calledUnit" if using FP_CLASS. :param extendedRk: The given extended declared zone rank. :param zoneKind: The kind (in {ALLKIND, REALKIND, PTRKIND}) used in the BoolVector. :param vectorMap: The map of the BoolVector. :param symbolTable: The current symbolTable. :param calledUnit: When applicable, the Unit called by the present call statement. :return: The corresponding BoolVector rank. extendedDeclaredToZoneInfo ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final ZoneInfo extendedDeclaredToZoneInfo(int extendedRk) :outertype: DataFlowAnalyzer Translates an extended declared zone rank into its ZoneInfo. \ **Globals required:**\ \ :java:ref:`curUnit`\ , \ :java:ref:`curCalledUnit`\ , \ :java:ref:`curSymbolTable`\ :param extendedRk: the given extended declared zone rank :return: the corresponding ZoneInfo. extendedDeclaredToZoneInfo ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static ZoneInfo extendedDeclaredToZoneInfo(int extendedRk, SymbolTable symbolTable, Unit calledUnit) :outertype: DataFlowAnalyzer Translates an extended declared zone rank into its ZoneInfo. Static version. Needs the "calledUnit" if using FP_CLASS. :param extendedRk: the given extended declared zone rank :param symbolTable: The current symbolTable. :param calledUnit: The current called Unit, if any. :return: the corresponding ZoneInfo. filterByValue ^^^^^^^^^^^^^ .. java:method:: public static BoolMatrix filterByValue(BoolMatrix publicDeps, int diffKind, Unit unit) :outertype: DataFlowAnalyzer Returns the deps as seen by the caller side, i.e. by-value arguments are seen as unchanged. getCalledUnit ^^^^^^^^^^^^^ .. java:method:: public static Unit getCalledUnit(Tree expression, SymbolTable symbolTable) :outertype: DataFlowAnalyzer When "expression" is a procedure or function call, returns the Unit of the called procedure. getMapClass ^^^^^^^^^^^ .. java:method:: public static int getMapClass(int globalRk, int[] zoneMap) :outertype: DataFlowAnalyzer :param globalRk: The global index in the zone map. :param zoneMap: The given zone map. :return: The class of zoneMap that contains index globalRk. getValueFlowingBack ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean getValueFlowingBack() :outertype: DataFlowAnalyzer Retrieve the data-flow value that flows backwards through "curArrow". This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curArrow`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . :return: Must return true iff the control flow may reach curArrow getValueFlowingThrough ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean getValueFlowingThrough() :outertype: DataFlowAnalyzer Retrieve the data-flow value that flows forwards through "curArrow". This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curArrow`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . :return: Must return true iff the control flow may reach curArrow includePointedElementsInTree ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public void includePointedElementsInTree(TapList zonesTree, ToBool total, BoolMatrix pointerDests, boolean recursive, boolean isCalled, boolean upstream) :outertype: DataFlowAnalyzer Extends a given tree of zones with the destination of pointers. \ **Globals required:**\ \ :java:ref:`curInstruction`\ , \ :java:ref:`curSymbolTable`\ , \ :java:ref:`curCalledUnit`\ :param zonesTree: The tree of zones to be extended. :param total: When passed a non-null ToBool, it is set to false if some pointed zone was included. :param pointerDests: The pointer dests matrix. It is unnecessary after PointerAnalyzer has run, because the needed info is then stored at the level of the curBlock and curInstruction. :param recursive: if true, recursively call across pointers. :param isCalled: is true when we are on a function call and therefore the zonesTree may contain zones of rank greater than the last declared zone and these extra zones represent the formal parameters of the current call. If isCalled is false, then the extra zones represent split variables. :param upstream: when true, the pointer destination info is retrieved upstream of the curInstruction, otherwise the info downstream is used. includePointedElementsInTree ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void includePointedElementsInTree(TapList zonesTree, ToBool total, BoolMatrix pointerDests, boolean recursive, SymbolTable symbolTable, Instruction instruction, Unit calledUnit, boolean isCalled, boolean upstream) :outertype: DataFlowAnalyzer Static version of includePointedElementsInTree(). infoToString ^^^^^^^^^^^^ .. java:method:: public static String infoToString(BoolVector info, int[] infoMap, int kind, Unit unit, SymbolTable symbolTable) :outertype: DataFlowAnalyzer Static version of infoToString(). infoToString ^^^^^^^^^^^^ .. java:method:: public final String infoToString(BoolVector info, int[] infoMap, int kind) :outertype: DataFlowAnalyzer :return: a String that shows the given data-flow info, given its map and kind, and prefixing it with the key to the meaning of the zone numbers in the dump file. infoToStringWithDiffPtr ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static String infoToStringWithDiffPtr(BoolVector info, int[] infoMap, BoolVector infoOnDiffPtr, int[] infoMapOnDiffPtr, Unit unit, SymbolTable symbolTable) :outertype: DataFlowAnalyzer Static version of infoToStringWithDiffPtr(). infoToStringWithDiffPtr ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected final String infoToStringWithDiffPtr(BoolVector info, int[] infoMap, BoolVector infoOnDiffPtr, int[] infoMapOnDiffPtr) :outertype: DataFlowAnalyzer :return: a string that shows the given data-flow info, which is made of two parts, one on the original (ALLKIND) zones, the other on the future derivatives of pointer (PTRKIND) zones. infoToStringWithDiffPtrWithCycle ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected final String infoToStringWithDiffPtrWithCycle(BoolVector info, int[] infoMap, BoolVector infoOnDiffPtr, int[] infoMapOnDiffPtr, BoolVector infoCycle, BoolVector infoCycleOnDiffPtr) :outertype: DataFlowAnalyzer :return: a string that shows the given data-flow info, which is made of four parts: the first on the original (ALLKIND) zones, the second on the future derivatives of pointer (PTRKIND) zones, and the third and fourth are the same for the "cycling" info i.e. the special, more accurate, info that is propagated through the cycles of an enclosing clean DO-loop. infoTreesOfRefArgs ^^^^^^^^^^^^^^^^^^ .. java:method:: public TapList[] infoTreesOfRefArgs(Tree[] actualParams, BoolVector info, int[] vectorMap, int whichKind) :outertype: DataFlowAnalyzer Utility that builds the array of the trees of info for each of the given actual parameters tree. \ **Globals required:**\ \ :java:ref:`curInstruction`\ , \ :java:ref:`curSymbolTable`\ initializeCGForRootUnit ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void initializeCGForRootUnit() :outertype: DataFlowAnalyzer If necessary, implement here whatever must be done for initialization of the analysis' root Unit "rootUnit" after initialization of all units but before the analysis starts. This is needed only for a top-down analysis. This default does nothing. Overload with one's own choice. initializeCGForUnit ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected Object initializeCGForUnit() :outertype: DataFlowAnalyzer Initializations before the sweeps on the Call Graph. This must make all initializations related to "unit". For a top-down analysis, this MUST return an Object, which will be used as the initial value of the top-down context. For a bottom-up analysis, this method must return something but nobody cares for its value, so please return null! This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ . initializeCumulValue ^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void initializeCumulValue() :outertype: DataFlowAnalyzer Create an empty info to propagate it upwards. This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . initializeFGForBlock ^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void initializeFGForBlock() :outertype: DataFlowAnalyzer If necessary, initializations for "curBlock" done just before the analysis of the "curUnit" (which contains "curBlock"). This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . initializeInitBlock ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void initializeInitBlock() :outertype: DataFlowAnalyzer Initializations on the "curBlock", which is an initial entry block, before the sweeps on curUnit. This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . initializeUnit ^^^^^^^^^^^^^^ .. java:method:: protected void initializeUnit() :outertype: DataFlowAnalyzer Initializations before the sweeps on the Flow Graph of "unit". This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ . intersectsExtendedDeclared ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean intersectsExtendedDeclared(BoolVector info, int[] vectorMap, int kind, Tree expression, ToBool total, Instruction instruction, TapIntList extraInfoZones, SymbolTable symbolTable, Unit calledUnit) :outertype: DataFlowAnalyzer :return: true when one of the zones of the value of "expression" is either an extra "tmp" zone, that appears in the given list of "extraInfoZones" that are assumed to have the property, or it is of the required "kind" and there is a 1 in BoolVector "info" at the index that corresponds to this zone. Fills "total" when provided non null. intersectsExtendedDeclared ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean intersectsExtendedDeclared(BoolVector info, int[] vectorMap, int kind, TapIntList extendedDeclaredZones, TapIntList extraInfoZones, SymbolTable symbolTable, Unit calledUnit) :outertype: DataFlowAnalyzer :return: true when "info" contains true for at least one zone in the given TapIntList of extended declared zones or for an extra tmp zone that is in "extraInfoZones". loopRunsAtLeastOnce ^^^^^^^^^^^^^^^^^^^ .. java:method:: public final boolean loopRunsAtLeastOnce(HeaderBlock block) :outertype: DataFlowAnalyzer True if this loop is guaranteed to run at least once. makeMap3 ^^^^^^^^ .. java:method:: public static int[] makeMap3(int nb1, int nb2, int nb3) :outertype: DataFlowAnalyzer Builds a map for 3 successive classes of zone indices. :param nb1: the number of zones of the first class. :param nb2: the number of zones of the second class. :param nb3: the number of zones of the third class. :return: the map for these 3 classes. makeMap3 ^^^^^^^^ .. java:method:: public static int[] makeMap3(Unit unit, int zoneKind) :outertype: DataFlowAnalyzer Shortcut to build the map of private zones for the calling context of "unit". :param unit: The Unit of whom we want the map of the calling context. :param zoneKind: The kind of zones for which we want to build the map. :return: the map of three classes. makeMap3 ^^^^^^^^ .. java:method:: public static int[] makeMap3(Unit unit, Block block, int zoneKind) :outertype: DataFlowAnalyzer Shortcut to build the map of private zones for the given "block" of the given "unit". :param unit: The Unit for whom we want the map :param block: The Block of "unit" for whom we want the map. :param zoneKind: The kind of zones for which we want to build the map. makeMap3 ^^^^^^^^ .. java:method:: public static int[] makeMap3(SymbolTable symbolTable, int zoneKind) :outertype: DataFlowAnalyzer Shortcut to build the map of private zones for the given "symbolTable". makeMap4 ^^^^^^^^ .. java:method:: public static int[] makeMap4(int nbSE, int nbNP, int nbD, int nbFP) :outertype: DataFlowAnalyzer Builds a map for the rows or columns of a dests matrix, with four successive classes (side-effect ; null-pointers ; declared ; formal-params). :param nbSE: the number of side-effect zones. :param nbNP: now useless (pass 0) :param nbD: the number of declared zones. :param nbFP: the number of formal parameters zones. :return: the map of four classes. mapExtendedDeclaredToVectorIndex ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final TapIntList mapExtendedDeclaredToVectorIndex(TapIntList extendedRks, int zoneKind, int[] vectorMap) :outertype: DataFlowAnalyzer Translates a list of extended declared zone ranks into a list of corresponding BoolVector ranks, where the arrangement of the BoolVector is given by its "vectorMap" and the kind "zoneKind". Preserves the order. \ **Globals required:**\ \ :java:ref:`curUnit`\ , \ :java:ref:`curCalledUnit`\ , \ :java:ref:`curSymbolTable`\ :param extendedRks: The given list of extended declared zone ranks. :param zoneKind: The kind (in {ALLKIND, REALKIND, PTRKIND}) used in the BoolVector. :param vectorMap: The map of the BoolVector. :return: The corresponding list of BoolVector ranks. mapExtendedDeclaredToVectorIndex ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapIntList mapExtendedDeclaredToVectorIndex(TapIntList extendedRks, int zoneKind, int[] vectorMap, SymbolTable symbolTable, Unit calledUnit) :outertype: DataFlowAnalyzer Translates a list of extended declared zone ranks into a list of corresponding BoolVector ranks, where the arrangement of the BoolVector is given by its "vectorMap" and the kind "zoneKind". Preserves the order. Static version. Needs the "calledUnit" if using FP_CLASS. :param extendedRks: The given list of extended declared zone ranks. :param zoneKind: The kind (in {ALLKIND, REALKIND, PTRKIND}) used in the BoolVector. :param vectorMap: The map of the BoolVector. :param symbolTable: The current symbolTable. :param calledUnit: When applicable, the Unit called by the present call statement. :return: The corresponding list of BoolVector ranks. mapExtendedDeclaredToZoneInfo ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList mapExtendedDeclaredToZoneInfo(TapIntList extendedRks, SymbolTable symbolTable, Unit calledUnit) :outertype: DataFlowAnalyzer Translates a list of extended declared zone ranks into a list of corresponding ZoneInfo's, Static version. Needs the "calledUnit" if using FP_CLASS. :param extendedRks: the given list of extended declared zone ranks :param symbolTable: The current symbolTable. :param calledUnit: The current called Unit, if any. :return: the corresponding list of ZoneInfo's. mapSize ^^^^^^^ .. java:method:: public static int mapSize(int[] map) :outertype: DataFlowAnalyzer :param map: the given map. :return: the number of zones in the given map. mapZoneRkToPublicRk ^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapIntList mapZoneRkToPublicRk(TapIntList zoneRks, int zoneKind, Unit calledUnit) :outertype: DataFlowAnalyzer Translates a list of zone ranks "zoneRks", of kind "zoneKind" into the list of corresponding public zone ranks, i.e. ranks in the external shape of their Unit "calledUnit". :param zoneRks: The given list of zone indices. :param zoneKind: The kind of the given zones, in {ALLKIND, REALKIND, PTRKIND}. :param calledUnit: The unit of which zoneRks are visible zones. :return: The public ranks for "zoneRks" in calledUnit. mapZoneRkToVectorIndex ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final TapIntList mapZoneRkToVectorIndex(TapIntList zoneRks, int zoneClass, int zoneKind, int[] vectorMap) :outertype: DataFlowAnalyzer Translates a list of zone rank "zoneRks", all of kind "zoneKind" and class "zoneClass", into the corresponding indices in a targetted ZoneVector or BoolMatrix, which must be of the same kind "zoneKind" and whose map is given in "vectorMap". Preserves the order. \ **Globals required:**\ \ :java:ref:`curCalledUnit`\ :param zoneRks: The given list of zone ranks. :param zoneClass: The class of the given zone, in {D_CLASS, FP_CLASS}. :param zoneKind: The kind of the given zone and of the targetted ZoneVector, in {ALLKIND, REALKIND, PTRKIND}. :param vectorMap: The map of the classes used in the targetted vector. :return: The corresponding list of indices in the targetted ZoneVector or BoolMatrix row or column. mapZoneRkToVectorIndex ^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapIntList mapZoneRkToVectorIndex(TapIntList zoneRks, int zoneClass, int zoneKind, int[] vectorMap, Unit calledUnit) :outertype: DataFlowAnalyzer Translates a list of zone rank "zoneRks", all of kind "zoneKind" and class "zoneClass", into the corresponding indices in a targetted ZoneVector or BoolMatrix, which must be of the same kind "zoneKind" and whose map is given in "vectorMap". Preserves the order. Static version. Needs the "calledUnit" if using FP_CLASS. :param zoneRks: The given list of zone ranks. :param zoneClass: The class of the given zone, in {D_CLASS, FP_CLASS}. :param zoneKind: The kind of the given zone and of the targetted ZoneVector, in {ALLKIND, REALKIND, PTRKIND}. :param vectorMap: The map of the classes used in the targetted vector. :param calledUnit: The current called Unit, if any. :return: The corresponding list of indices in the targetted ZoneVector or BoolMatrix row or column. mayPointToRelocated ^^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean mayPointToRelocated(Tree expression, boolean onDiff, Instruction instruction, SymbolTable symbolTable, boolean inJointDiffCode) :outertype: DataFlowAnalyzer :return: true when one of the possible destinations of the given pointer "expression" may have been reallocated to a different memory address between the forward and backward sweep of this expression's location. modifyAccessTreeForUniqueAccess ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static Tree modifyAccessTreeForUniqueAccess(int declaredIndex, Tree accessTree, Block block) :outertype: DataFlowAnalyzer When this index "declaredIndex" in this block "block" has been detected as a "unique-access" zone, i.e. a zone which is accessed always for the same unique single cell during the enclosing loop, then the typical accessTree must be the access tree for this cell only (cf F77:lh09). For future dataflow analysis. :return: this new typical accessTree. Otherwise returns the old "accessTree". namesOfZones ^^^^^^^^^^^^ .. java:method:: public static String namesOfZones(BoolVector selectedZones, int whichKind, Unit unit) :outertype: DataFlowAnalyzer :return: a String with the names of all variables for which "selectedZones" is true. oneZoneIsMultiple ^^^^^^^^^^^^^^^^^ .. java:method:: public boolean oneZoneIsMultiple(TapIntList zonesList) :outertype: DataFlowAnalyzer :return: true if one of the zones in "zonesList" (TapIntList list of extended declared ranks) is actually labelled as multiple → in that case, an access to these zones can't be total. orInfoPRZVTrees ^^^^^^^^^^^^^^^ .. java:method:: public static void orInfoPRZVTrees(BoolVector info, TapList infoTree) :outertype: DataFlowAnalyzer OR-Accumulates the given BoolVector "info" into each BoolVector leaf of "infoTree". propagateCallSiteDataToActualArgs ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList[] propagateCallSiteDataToActualArgs(BoolVector privateData, int[] vectorMap, Tree actualResultTree, Tree[] actualParamTreeS, TapList actualResultData, TapIntList tmpZones, Instruction instruction, CallArrow arrow, boolean valuesCarryInfo, int whichKind) :outertype: DataFlowAnalyzer Propagates a private info on the caller's side onto the actual parameters of the call. The given private info "privateData" is propagated into the data trees for the call actual arguments. Info totally propagated onto an actual argument is removed from the "privateData", which is therefore modified ! Similarly, info concerning the "actualResultTree" is propagated into the data tree for the result "actualResultData", and removed from "privateData" when total. :param privateData: The given private info in the caller, nearby the call. :param vectorMap: The map of "privateData". :param actualResultTree: The expression Tree that receives the actual call result, if any. null otherwise. :param actualParamTreeS: The expression trees of the actual arguments of the call. :param actualResultData: The tree of Boolean of the info on the actual result (output). Must be given non-null if actualResultTree is non-null. :param tmpZones: the list of extra zones introduced by splitting. Their info is considered True. :param instruction: The Instruction of the current procedure call. :param arrow: The current CallArrow from the current Instruction to the called Unit (useless?). :param valuesCarryInfo: Not sure if necessary ? :param whichKind: The kind of the info as stored in the privateData. :return: The tree of Boolean of the info on each actual argument (output). propagateCallSiteDataToCallee ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static BoolVector propagateCallSiteDataToCallee(BoolVector callSiteData, TapList[] callSiteParamDataS, Tree actualResultTree, Tree[] actualParamTreeS, boolean onEntry, Tree callTree, Instruction callInstruction, CallArrow callArrow, int[] callSiteMap, int whichKind, boolean propagateEvenByValue) :outertype: DataFlowAnalyzer Propagates a boolean data-flow info callSiteData, which applies in some calling procedure immediately before/after a call site (i.e. a call to some callee procedure), to the same info translated to apply at the entry/exit of the callee. In order to deal with the call arguments, either param callSiteParamDataS is passed non-null and it is assumed to contain the TapList-tree of the data-flow info for each actual argument (and for the actual result at index 0) before/after the call site, or callSiteParamDataS is passed null (or some element of it is null for some index) and then params actualResultTree and actualParamTreeS must be passed non-null, and are used to retrieve the part of the data-flow that concerns the formal parameters by looking up in callSiteData for what concerns the actual arguments. :param callSiteData: the given data-flow info, expressed in terms of the zones that exist at the call site. This method does not modify it. :param callSiteParamDataS: the given data-flow info about the actual parameters of the call. If passed null or some index is null, then the corresponding actualResultTree or element of actualParamTreeS should be passed non-null. Value at index 0 is about the actual result of the call, and it is used only when onEntry==false, otherwise may be null :param actualResultTree: The tree of the (actual) result. Needed only for a function and when callSiteParamDataS is null or null at index 0. TODO: argument should disappear when precomputed actualResultTree is stored on the callTree. :param actualParamTreeS: The trees of the actual arguments. Needed only when callSiteParamDataS is null or null at the corresponding index. TODO: argument should disappear when precomputed actualParamTreeS are stored on the callTree. :param onEntry: if true, propagate the info from before the call, to the callee entry, else propagate the info from after the call, back to the callee exit. :param callTree: the call tree (operator op_call) :param callInstruction: the call instruction :param callArrow: the call arrow from the calling procedure to the callee. :param callSiteMap: the map of zones existing at the call site. May be passed null if passing null as actualResultTree and actualParamTreeS :param whichKind: the kind of zones on which the data-flow info is focused. :param propagateEvenByValue: when true, forces propagation of info upon call exit on top level of parameters, even in the call-by-value case. Most often passed "false". Typically passed "true" for a backwards analysis (Usefulness, AvlX...) across call exit. :return: the corresponding data-flow info at the entry/exit, expressed in terms of the zones that exist at the root of the callee. propagateCallSiteDataToCallee ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static BoolMatrix propagateCallSiteDataToCallee(BoolMatrix callSiteData, TapList[] callSiteParamDataS, Tree actualResultTree, Tree[] actualParamTreeS, boolean onEntry, Tree callTree, Instruction callInstruction, CallArrow callArrow, int[] callSiteMap, int whichKind, boolean propagateEvenByValue) :outertype: DataFlowAnalyzer :param callSiteData: the call site data matrix. This method does not modify it, but some of its rows may be shared as rows of the result callee data matrix. :param callSiteParamDataS: an array (for each argument, index 0 for result, i for argument i) of a tree of BoolVector's containing the call site data for the result or arguments. propagateCalleeDataToCallSite ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList[] propagateCalleeDataToCallSite(BoolVector calleeData, BoolVector callSiteData, Tree actualResultTree, Tree[] actualParamTreeS, boolean onEntry, Tree callTree, Instruction instruction, CallArrow arrow, int[] callSiteMap, int whichKind, BoolVector passesThroughCall, BoolVector passesAroundCall, boolean valuesCarryInfo, boolean onlyWhenTotal) :outertype: DataFlowAnalyzer Propagates some data-flow information calleeData, which applies at the entry (resp. exit) of some called procedure (entry iff onEntry==true, otherwise exit), to some place immediately before (resp. after) some call site that calls this procedure, by accumulating this info into the given callSiteData. If actualResultTree is given non-null, then the info on the result's zones is integrated into callSiteData. Similarly if actualParamTreeS is given non-null and actualParamTreeS[N-1] is non-null, the info on parameter N is integrated into callSiteData. Otherwise, the info on the result and formal params is returned (for the non-given actual result and actual params) into the returned array of TapList. :param calleeData: the given data, expressed in terms of the zones of the callee. :param callSiteData: the data, shaped after the call site, that will accumulate the translation of the calleeData. It may be passed null in which case only arguments and result data are translated. Very often, it contains the data at the other end of the call site, e.g. before the call if onEntry==false. :param actualResultTree: the variable receiving the call's result at the call site. May be not given, i.e. null. :param actualParamTreeS: the call site actual arguments. May be not given, i.e. null. Some elements may be not given, i.e. null. :param onEntry: true when propagation goes from called unit entry back to immediately before the call site. Otherwise, it means that propagation goes from called unit exit forward to immediately after the call site. :param callTree: the call tree at the call site. :param instruction: the instruction which contains the call site. :param arrow: the call arrow for this call site. :param callSiteMap: the map of zones existing at the call site. May be passed null if passing null as actualResultTree and actualParamTreeS :param whichKind: the kind of zones on which the data-flow info is focused. :param passesThroughCall: When given, the mask of zones of the call site whose data in callSiteData may be modified by this call. TODO: improve this code so that this mask is given following the zones of the *callee* :param passesAroundCall: When given, the mask of zones of the call site whose data in callSiteData may pass untouched by this call. TODO: improve this code so that this mask is given following the zones of the *callee* :param valuesCarryInfo: when false and parameters are passed by value, info on the parameter is not propagated (except through pointers). :param onlyWhenTotal: when true, propagation is done through an argument *only* when this access to the actual argument is total. For instance onlyWhenTotal should be true when propagating a "killed" info, since a non-total actual argument will not be fully killed. :return: the list (indexed on [0,nbArgs]) of the data on the call's actual arguments (with index 0 representing the function result), except when actualResultTree is given and all actualParamTreeS are given, in which case returns null. propagateCalleeDataToCallSite ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList[] propagateCalleeDataToCallSite(BoolMatrix calleeData, BoolMatrix callSiteData, Tree actualResultTree, Tree[] actualParamTreeS, boolean onEntry, Tree callTree, Instruction instruction, CallArrow arrow, int[] callSiteMap, int whichKind, BoolVector passesThroughCall, BoolVector passesAroundCall, boolean valuesCarryInfo, BoolVector calleeMask) :outertype: DataFlowAnalyzer :param calleeMask: a mask on the zones of the callee. All info outside this mask is not propagated. Used in ReqExplicit. TODO: rationalize this with passesThroughCall, which may be the same info expressed on the call site zones?. propagateDataToCallSite ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static BoolVector propagateDataToCallSite(BoolVector publicData, Tree actualResultTree, Tree[] actualParamTreeS, int[] vectorMap, Instruction instruction, CallArrow arrow, boolean cumulOr, boolean valuesCarryInfo, int whichKind) :outertype: DataFlowAnalyzer Variant of propagateDataToCaller() (now renamed as propagateCalleeDataToCallSite()), for which the given publicData of the called routine is translated as private data at the caller site. The difference is about pointers and aliases: If the actual parameter (or indeed also a passed global) is a deref of a pointer p, then the info on the formal parameter is translated as an info on the caller's zone for the "initial" \ ``*p``\ . In other words whatever the call site \ ``*p``\ actually points to, (e.g. to variable x, or to variables {x or y}) this translation doesn't care, doesn't attach the data on the zones of e.g. x or y, but instead it attaches the data on the zone for \ ``*p``\ , i.e. the zone provided as default/initial destination of p. actualResultTree and actualParamTreeS must be given non-null. propagateEntryDataFwdToCallee ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public BoolVector propagateEntryDataFwdToCallee(BoolVector privateDataInTransit, int[] vectorMap, TapList[] actualParamDataS, BoolVector publicTouched, CallArrow arrow, Tree[] actualParamTreeS, int whichKind, boolean transit) :outertype: DataFlowAnalyzer Same as propagateEntryDataFwdToCallee, for zone vectors instead of zone matrices. On one hand, returns the translation of the "privateDataInTransit" in the public zones of the called Unit. On the other hand, when "transit" is true, modifies "privateDataInTransit" so that it contains in the end only the part of its original value that may travel unmodified across this call. This is useful for a following "propagateExitDataFwdToCaller". When "transit" is false, argument "privateDataInTransit" is not modified, and in this special case, arguments "publicTouched" and "actualParamTreeS" are not used and may be null. \ **Globals required:**\ \ :java:ref:`curInstruction`\ , \ :java:ref:`curSymbolTable`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curCalledUnit`\ . propagateExitDataBwdToCallee ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public BoolVector propagateExitDataBwdToCallee(BoolVector privateDataInTransit, int[] vectorMap, TapList resultData, TapIntList moreTrueZones, CallArrow arrow, Tree[] actualParamTreeS, int whichKind, boolean transit, BoolVector publicTouched, boolean diffMaybePassedByRef, boolean resetValue) :outertype: DataFlowAnalyzer Propagates any data-flow info BoolVector "privateDataInTransit" which applies just downstream a call, plus the info "resultData" on the result, upstream the call boundary. On one hand, this returns the public data-flow info at the exit of the called unit, which is in the returned BoolVector. On the other hand, and only when "transit" is true, this modifies the given "privateDataInTransit" so that it contains only the part of it that may be propagated untouched backwards to the entry end of the call, because the corresponding variables are not passed or only partially passed to the called unit. If "transit" is true, this returned "privateDataInTransit" must be kept untouched until it is passed as the 2nd argument of the corresponding propagateEntryDataBwdToCaller(). Optional argument "moreTrueZones" contains zone numbers that are above the number of declared zones, and which are considered having the data-flow info "true". When "diffMaybePassedByRef" is true, considers that parameters that are not overwritten as if they were passed by reference (cf comment below). When "transit" is true, argument "publicTouched" is used to further reduce the returned public data-flow info at the exit of the called unit. When "transit" is false, argument "privateDataInTransit" is not modified, and in this special case, argument "publicTouched" is not used and may be null. \ **Globals required:**\ \ :java:ref:`curInstruction`\ , \ :java:ref:`curSymbolTable`\ , \ :java:ref:`curUnit`\ . :param publicTouched: Only when "transit" is true, restricts the public zones of the called unit that may be modified by the call. If given null, defaults to "all true". :param resetValue: the "empty" value that must be set into "privateDataInTransit" for the variables that are not propagated untouched. Generally false, true for e.g. N in InOut. propagateValuesBackwardThroughBlock ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean propagateValuesBackwardThroughBlock() :outertype: DataFlowAnalyzer Propagates the data-flow information backwards through "curBlock". This default does propagation through each instruction. One may overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . If on the other hand, one decides not to overload and use the provided default, then one must consider overloading the method: .. * \ :java:ref:`propagateValuesBackwardThroughExpression()`\ (\ *default nothing returns true*\ ) :return: false when the control flow cannot go through (e.g. exit()). propagateValuesBackwardThroughExpression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean propagateValuesBackwardThroughExpression() :outertype: DataFlowAnalyzer Propagates the data-flow information backwards through expression "tree". This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ , \ :java:ref:`curInstruction`\ . :return: false when the control flow cannot go through (e.g. exit()). propagateValuesForwardThroughBlock ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean propagateValuesForwardThroughBlock() :outertype: DataFlowAnalyzer Propagates the data-flow information forwards through "curBlock". This default does propagation through each instruction. One may overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . If on the other hand, one decides not to overload and use the provided default, then one must consider overloading the method: .. * \ :java:ref:`propagateValuesForwardThroughExpression()`\ (\ *default nothing returns true*\ ) :return: false when the control flow cannot go through (e.g. exit()). propagateValuesForwardThroughExpression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected boolean propagateValuesForwardThroughExpression() :outertype: DataFlowAnalyzer Propagates the data-flow information forwards through the tree inside the curInstruction. This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ , \ :java:ref:`curInstruction`\ . :return: false when the control flow cannot go through (e.g. exit()). propagateValuesStaticallyThroughBlock ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void propagateValuesStaticallyThroughBlock() :outertype: DataFlowAnalyzer Propagates the data-flow information statically through "curBlock". propagateValuesStaticallyThroughExpression ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void propagateValuesStaticallyThroughExpression() :outertype: DataFlowAnalyzer Propagates the data-flow information statically to the tree inside the curInstruction. Default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ , \ :java:ref:`curInstruction`\ . referenceIsTotal ^^^^^^^^^^^^^^^^ .. java:method:: public boolean referenceIsTotal(boolean totalRef, TapList zonesTree) :outertype: DataFlowAnalyzer :param totalRef: true when the Tree of the reference is actually total, i.e. is not an array index :param zonesTree: the tree of zones of the reference. \ **Globals required:**\ \ :java:ref:`curInstruction`\ , \ :java:ref:`uniqueAccessZones`\ :return: true when the reference that has the given "totalRef" and the given "zonesList" may be considered total in the current data-flow analysis. The answer depends of the "curInstruction"'s where mask and of the current "uniqueAccessZones". removeInfoOnTopLevel ^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void removeInfoOnTopLevel(TapList zonesTree) :outertype: DataFlowAnalyzer Removes the info that concern parts of an argument that are passed by value. removeInfoOnTopLevel ^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void removeInfoOnTopLevel(TapList zonesTree, Object replacementValue) :outertype: DataFlowAnalyzer Removes the info that concern parts of an argument that are passed by value, and replaces the removed values with the given "replacementValue". removeZeroIndexTEMPORARY ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static TapList[] removeZeroIndexTEMPORARY(TapList[] array) :outertype: DataFlowAnalyzer run ^^^ .. java:method:: protected void run(TapList rootUnits) :outertype: DataFlowAnalyzer Runs the present analysis, possibly limited to the part of the CallGraph which is under the given "rootUnits", or on the whole CallGraph if "rootUnits" is null. One may overload with one's own implementation. Default implementation: \ :java:ref:`runBottomUpAnalysis(TapList)`\ Overloading implementation may be or may contain \ :java:ref:`runTopDownAnalysis(TapList)`\ or \ :java:ref:`runBottomUpAnalysis(TapList)`\ , in which case one must check their overloadable utilities. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ . :param rootUnits: The list of all Units recursively under the differentiation root, ordered top-down. runBottomUpAnalysis ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected final void runBottomUpAnalysis(TapList rootUnits) :outertype: DataFlowAnalyzer Runs the present analysis, bottom-up on the current CallGraph, up to and including the root Units in "rootUnits", or up to the top of the CallGraph if "rootUnits" is null. If this method is used, then one must consider overloading the methods: .. * \ :java:ref:`initializeCGForUnit()`\ (\ *default nothing returns null*\ ) * \ :java:ref:`analyze()`\ (\ *default*\ ) * \ :java:ref:`terminateCGForUnit()`\ (\ *default nothing*\ ) :param rootUnits: The list of all Units recursively under the differentiation root, ordered top-down. runBottomUpTopDownAnalysis ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected final void runBottomUpTopDownAnalysis(TapList rootUnits) :outertype: DataFlowAnalyzer Runs the present analysis, mixing bottom-up and top-down. After each time a Unit is analyzed, it may decide that the callers and/or the callees of this Unit must be (re-)analyzed. Priority is given to re-analysis of callers, i.e. to the bottom-up sweep. runSpecialCycleAnalysis ^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static boolean runSpecialCycleAnalysis(Block block) :outertype: DataFlowAnalyzer True if one may run the analysis in a special way that is able to detect full access to arrays, instead of considering all properties on arrays as undecidable. runStatically ^^^^^^^^^^^^^ .. java:method:: protected final void runStatically() :outertype: DataFlowAnalyzer runTopDownAnalysis ^^^^^^^^^^^^^^^^^^ .. java:method:: protected final void runTopDownAnalysis(TapList rootUnits) :outertype: DataFlowAnalyzer Runs the present analysis, top-down on the current CallGraph, starting at and including the root Units in "rootUnits", or at the top Units of the CallGraph if "rootUnits" is null. If this method is used, then one must consider overloading the methods: .. * \ :java:ref:`initializeCGForUnit()`\ (\ *default nothing returns null*\ ) * \ :java:ref:`initializeCGForRootUnit()`\ (\ *default nothing*\ ) * \ :java:ref:`analyze()`\ (\ *default*\ ) * \ :java:ref:`terminateCGForUnit()`\ (\ *default nothing*\ ) :param rootUnits: The list of all Units recursively under the differentiation root, ordered top-down. setCurBlockEtc ^^^^^^^^^^^^^^ .. java:method:: protected void setCurBlockEtc(Block block) :outertype: DataFlowAnalyzer Set \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ , \ :java:ref:`nDZ`\ . One may overload with one's own choice, but it must call super.setCurBlockEtc(block). \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ . :param block: The new current Block. setCurUnitEtc ^^^^^^^^^^^^^ .. java:method:: public void setCurUnitEtc(Unit unit) :outertype: DataFlowAnalyzer Set \ :java:ref:`curUnit`\ . Also set the relatedUnit in tapEnv (but [llh 8/8/14 TODO] doesn't reset it to null!! ). One may overload with one's own choice, but it must call super.setCurUnitEtc(unit). \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ . :param unit: The new current Unit. setEmptyCumulAndCycleValues ^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void setEmptyCumulAndCycleValues() :outertype: DataFlowAnalyzer Reinitialize the user-defined accumulators in which cumulValueWithAdditional() and cumulCycleValueWithAdditional() will accumulate the data-flow values before analyzing a Block. This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . setExtendedDeclared ^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void setExtendedDeclared(BoolVector info, int[] vectorMap, int kind, TapIntList extendedDeclaredZones, boolean value, SymbolTable symbolTable) :outertype: DataFlowAnalyzer Static version of setExtendedDeclared(). setExtendedDeclared ^^^^^^^^^^^^^^^^^^^ .. java:method:: public static void setExtendedDeclared(BoolVector info, int[] vectorMap, int kind, int extendedDeclaredZone, boolean value, SymbolTable symbolTable) :outertype: DataFlowAnalyzer Static version of setExtendedDeclared(). setExtendedDeclared ^^^^^^^^^^^^^^^^^^^ .. java:method:: public final void setExtendedDeclared(BoolVector info, int[] vectorMap, int kind, TapIntList extendedDeclaredZones, boolean value) :outertype: DataFlowAnalyzer Sets the booleans of "info" to "value" for the given TapIntList of extended declared zones. setExtendedDeclared ^^^^^^^^^^^^^^^^^^^ .. java:method:: public final void setExtendedDeclared(BoolVector info, int[] vectorMap, int kind, int extendedDeclaredZone, boolean value) :outertype: DataFlowAnalyzer Sets the booleans of "info" to "value" for the given extended declared zone of kind "kind". setInfoBoolMatrixAtRowsColumns ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final void setInfoBoolMatrixAtRowsColumns(BoolMatrix matrix, TapList rowZonesTree, int rowOffset, TapList columnZonesTree, int columnOffset) :outertype: DataFlowAnalyzer Sets elements of the given "matrix", as prescribed by the given "rowZonesTree" and "columnZonesTree". "rowZonesTree" and "columnZonesTree" are in general assumed to be organized with the same tree structure. For each pair of corresponding TapIntList leaves of "rowZonesTree" and "columnZonesTree", all cells with row and column belonging to the TapIntList's are set to true. setInfoBoolTreeToExtendedDeclaredZones ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final void setInfoBoolTreeToExtendedDeclaredZones(BoolVector infos, int[] vectorMap, TapList zonesTree, boolean newVal, TapList mask, boolean totalSet, int whichKind) :outertype: DataFlowAnalyzer Updates the BoolVector "infos", which holds some information on private "whichKind" zones, by setting to "newVal" the info of the zones in "zonesTree" that pass through the "mask". When non-null, "mask" indicates the parts of zonesTree that must be considered. At each leaf in "zonesTree" that passes through the "mask", the setting to "newVal" is done according to the boolean "totalSet" and to the global "conservativeValue" for the current data-flow analysis, as defined in method conservativeSetExtendedDeclared(). \ **Globals required:**\ \ :java:ref:`curSymbolTable`\ setInfoBoolTreeToExtendedDeclaredZones ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final void setInfoBoolTreeToExtendedDeclaredZones(BoolVector infos, int[] vectorMap, TapList zonesTree, TapList boolsTree, TapList mask, boolean totalSet, int whichKind) :outertype: DataFlowAnalyzer Updates the BoolVector "infos", which holds some information on private "whichKind" zones, with the additional tree of infos given in "boolsTree". The tree "boolsTree" is the tree of infos for a given expression, for which the corresponding tree of declared zones is the given "zonesTree". When non-null, "mask" indicates the parts of zonesTree/boolsTree that must be considered. This method recursively traverses "zonesTree", "mask", and "boolsTree" in parallel, and when it reaches leaves and the mask allows for it, it sets into "infos" at the current zones ("zonesTree") the boolean info found in "boolsTree". This setting varies according to the boolean "totalSet" and to the global "conservativeValue" for the current data-flow analysis, as defined in method conservativeSetExtendedDeclared(). \ **Globals required:**\ \ :java:ref:`curSymbolTable`\ setInfoPRZVTreeToExtendedDeclaredZones ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final void setInfoPRZVTreeToExtendedDeclaredZones(BoolMatrix matrix, int[] vectorMap, TapList zonesTree, TapList przvsTree, TapList mask, boolean totalSet, int whichKind) :outertype: DataFlowAnalyzer Adds into "matrix" that "zonesTree" receives info "przvsTree", i.e. schematically that " zonesTree := przvsTree ; " Assumes that zonesTree and przvsTree are two matching trees (if they don't match, does some union-merge of subtrees, to make the two trees match anyway) For each pair of corresponding leaves of the two trees, one leaf is a TapIntList of extended declared zones designating rows in the "matrix", the other leaf is a BoolVector. Sets these rows in "matrix" to this BoolVector, observing the whichKind, the vectorMap and the "totalSet". :param vectorMap: The map of each row of "matrix", i.e. the map of the column indices. setRefValue ^^^^^^^^^^^ .. java:method:: public void setRefValue(Tree refTree, int kind, BoolVector info, int[] infoMap, boolean value, boolean followPointers) :outertype: DataFlowAnalyzer Sets the info to "value" for all "kind" zones of reference expression "refTree". When followPointers is true, does it also for the zones pointed by the pointers in refTree. \ **Globals required:**\ \ :java:ref:`curInstruction`\ , \ :java:ref:`curSymbolTable`\ setTopDownContext ^^^^^^^^^^^^^^^^^ .. java:method:: protected void setTopDownContext(Unit unit, Object context) :outertype: DataFlowAnalyzer Set context for analyses that are top-down on the Call Graph. :param unit: current Unit. :param context: context Object. setUniqueAccessZones ^^^^^^^^^^^^^^^^^^^^ .. java:method:: public void setUniqueAccessZones(Block block) :outertype: DataFlowAnalyzer Fills the global BoolVector "uniqueAccessZones" with the zones that are accessed during the enclosing loop iteration as unique cells: these accesses will be temporarily marked "total". showMap ^^^^^^^ .. java:method:: public static String showMap(int[] map) :outertype: DataFlowAnalyzer :param map: the given map. :return: the string that shows the given map. terminateCGForUnit ^^^^^^^^^^^^^^^^^^ .. java:method:: protected void terminateCGForUnit() :outertype: DataFlowAnalyzer If necessary, runs some concluding analysis on Unit "unit" after the present analysis is completed on the Call Graph. This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ . terminateFGForBlock ^^^^^^^^^^^^^^^^^^^ .. java:method:: protected void terminateFGForBlock() :outertype: DataFlowAnalyzer If necessary, termination operations on an inside block "curBlock" after the sweeps on a unit. This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . terminateTermBlock ^^^^^^^^^^^^^^^^^^ .. java:method:: protected void terminateTermBlock() :outertype: DataFlowAnalyzer If necessary, termination operations on a termination block "curBlock" after the sweeps on a unit. This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ , \ :java:ref:`curBlock`\ , \ :java:ref:`curSymbolTable`\ . terminateUnit ^^^^^^^^^^^^^ .. java:method:: protected boolean terminateUnit() :outertype: DataFlowAnalyzer Termination operations at the end of the Flow Graph analysis of the given Unit "curUnit". In the case of a bottom-up analysis, must build the analysis result on the current "curUnit", which is deduced from the values stored at the entry of the exit Block, depending on the direction. For a bottom-up analysis, this method MUST return true IFF the analysis result has changed since the previous time (or if this is the first time). For a top-down analysis, this method must return a boolean value but nobody cares for it. This default does nothing. Overload with one's own choice. \ **Globals provided:**\ \ :java:ref:`curCallGraph`\ , \ :java:ref:`curUnit`\ topDownContext ^^^^^^^^^^^^^^ .. java:method:: protected Object topDownContext(Unit unit) :outertype: DataFlowAnalyzer Context for analyses that are top-down on the Call Graph. :param unit: current Unit. :return: context for analyses that are top-down on the Call Graph. traceDisplayPrivateZones ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: protected final void traceDisplayPrivateZones(Unit unit, int[] map, int kind) :outertype: DataFlowAnalyzer Displays into the trace the list of all the private zones of Unit "unit", following the given "map" which is of kind "kind". \ **Globals required:**\ \ :java:ref:`curSymbolTable`\ vectorIndexToExtendedDeclared ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final int vectorIndexToExtendedDeclared(int index, int indexClass, int zoneKind, int[] vectorMap) :outertype: DataFlowAnalyzer Translates a BoolVector index into its extended declared zone rank. \ **Globals required:**\ \ :java:ref:`curUnit`\ , \ :java:ref:`curCalledUnit`\ , \ :java:ref:`curSymbolTable`\ For future dataflow analysis. :param index: The index in a BoolVector. :param indexClass: The class of the index, i.e. its containing class in "vectorMap". if unknown, this class can be found by getMapClass(index, vectorMap). :param zoneKind: The kind (in {ALLKIND, REALKIND, PTRKIND}) used in the BoolVector. :param vectorMap: The map of the BoolVector. :return: the corresponding ZoneInfo. vectorIndexToExtendedDeclared ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static int vectorIndexToExtendedDeclared(int index, int indexClass, int zoneKind, int[] vectorMap, SymbolTable symbolTable) :outertype: DataFlowAnalyzer Translates a BoolVector index into its extended declared zone rank. Static version. Does not work for FP_CLASS. :param index: The index in a BoolVector. :param indexClass: The class of the index, i.e. its containing class in "vectorMap". if unknown, this class can be found by getMapClass(index, vectorMap). :param zoneKind: The kind (in {ALLKIND, REALKIND, PTRKIND}) used in the BoolVector. :param vectorMap: The map of the BoolVector. :param symbolTable: The current symbolTable. :return: the corresponding ZoneInfo. vectorIndexToZoneInfo ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final ZoneInfo vectorIndexToZoneInfo(int index, int indexClass, int zoneKind, int[] vectorMap) :outertype: DataFlowAnalyzer Translates a BoolVector index into the corresponding ZoneInfo. \ **Globals required:**\ \ :java:ref:`curUnit`\ , \ :java:ref:`curCalledUnit`\ , \ :java:ref:`curSymbolTable`\ :param index: The index in a BoolVector. :param indexClass: The class of the index, i.e. its containing class in "vectorMap". if unknown, this class can be found by getMapClass(index, vectorMap). :param zoneKind: The kind (in {ALLKIND, REALKIND, PTRKIND}) used in the BoolVector. :param vectorMap: The map of the BoolVector. :return: the corresponding ZoneInfo. vectorIndexToZoneInfo ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static ZoneInfo vectorIndexToZoneInfo(int index, int indexClass, int zoneKind, int[] vectorMap, SymbolTable symbolTable) :outertype: DataFlowAnalyzer Translates a BoolVector index into the corresponding ZoneInfo. Static version. Does not work for FP_CLASS. :param index: The index in a BoolVector. :param indexClass: The class of the index, i.e. its containing class in "vectorMap". if unknown, this class can be found by getMapClass(index, vectorMap). :param zoneKind: The kind (in {ALLKIND, REALKIND, PTRKIND}) used in the BoolVector. :param vectorMap: The map of the BoolVector. :param symbolTable: The current symbolTable. :return: the corresponding ZoneInfo. zoneInfoToExtendedDeclared ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final int zoneInfoToExtendedDeclared(ZoneInfo zoneInfo, int zoneClass) :outertype: DataFlowAnalyzer Translates a ZoneInfo into its extended declared zone rank. \ **Globals required:**\ \ :java:ref:`curUnit`\ , \ :java:ref:`curCalledUnit`\ , \ :java:ref:`curSymbolTable`\ :param zoneInfo: The given ZoneInfo. :param zoneClass: The class of "zoneInfo", in {D_CLASS, FP_CLASS}. :return: The corresponding extended declared zone rank. zoneInfoToExtendedDeclared ^^^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static int zoneInfoToExtendedDeclared(ZoneInfo zoneInfo, int zoneClass, SymbolTable symbolTable, Unit calledUnit) :outertype: DataFlowAnalyzer Translates a ZoneInfo into its extended declared zone rank. Static version. Needs the "calledUnit" if using FP_CLASS. :param zoneInfo: The given ZoneInfo. :param zoneClass: The class of "zoneInfo", in {D_CLASS, FP_CLASS}. :param symbolTable: The current symbolTable. :param calledUnit: The current called Unit, if any. :return: The corresponding extended declared zone rank. zoneInfoToVectorIndex ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final int zoneInfoToVectorIndex(ZoneInfo zoneInfo, int zoneClass, int zoneKind, int[] vectorMap) :outertype: DataFlowAnalyzer Translates a Zoneinfo, of class "zoneClass", into its corresponding index in a targetted ZoneVector or BoolMatrix row or column, of kind "zoneKind" and whose map is given in "vectorMap". \ **Globals required:**\ \ :java:ref:`curCalledUnit`\ :param zoneInfo: The given ZoneInfo. :param zoneClass: The class of the given zoneInfo, in {D_CLASS, FP_CLASS}. :param zoneKind: The kind of the targetted vector, in {ALLKIND, REALKIND, PTRKIND}. :param vectorMap: The map of the classes used in the targetted vector. :return: The corresponding index in the targetted ZoneVector or BoolMatrix row or column. zoneInfoToVectorIndex ^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static int zoneInfoToVectorIndex(ZoneInfo zoneInfo, int zoneClass, int zoneKind, int[] vectorMap, Unit calledUnit) :outertype: DataFlowAnalyzer Translates a Zoneinfo, of class "zoneClass", into its corresponding index Static version. Needs the "calledUnit" if using FP_CLASS. in a targetted ZoneVector or BoolMatrix row or column, of kind "zoneKind" and whose map is given in "vectorMap". :param zoneInfo: The given ZoneInfo. :param zoneClass: The class of the given zoneInfo, in {D_CLASS, FP_CLASS}. :param zoneKind: The kind of the targetted vector, in {ALLKIND, REALKIND, PTRKIND}. :param vectorMap: The map of the classes used in the targetted vector. :param calledUnit: The current called Unit, if any. :return: The corresponding index in the targetted ZoneVector or BoolMatrix row or column. zoneIsPointer ^^^^^^^^^^^^^ .. java:method:: public static boolean zoneIsPointer(int zoneRk, SymbolTable symbolTable, Unit calledUnit) :outertype: DataFlowAnalyzer zoneIsPointer ^^^^^^^^^^^^^ .. java:method:: public final boolean zoneIsPointer(int zoneRk) :outertype: DataFlowAnalyzer :param zoneRk: the given extended declared ALLKIND zone rank. :return: true if "zoneRk" is for a pointer. zoneIsScalar ^^^^^^^^^^^^ .. java:method:: public final boolean zoneIsScalar(int zoneRk) :outertype: DataFlowAnalyzer :param zoneRk: the given extended declared ALLKIND zone rank. :return: true if "zoneRk" is for a scalar variable. zoneRkToExtendedDeclared ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public final int zoneRkToExtendedDeclared(int zoneRk, int zoneClass, int zoneKind) :outertype: DataFlowAnalyzer Translates a zone rank "zoneRk", of kind "zoneKind" and class "zoneClass", into its extended declared zone rank. \ **Globals required:**\ \ :java:ref:`curCalledUnit`\ :param zoneRk: The given zone index. :param zoneClass: The class of the given zone index, in {D_CLASS, FP_CLASS}. :param zoneKind: The kind of the given zone, in {ALLKIND, REALKIND, PTRKIND}. :return: the corresponding extended declared zone rank. zoneRkToExtendedDeclared ^^^^^^^^^^^^^^^^^^^^^^^^ .. java:method:: public static int zoneRkToExtendedDeclared(int zoneRk, int zoneClass, int zoneKind, SymbolTable symbolTable, Unit calledUnit) :outertype: DataFlowAnalyzer Translates a zone rank "zoneRk", of kind "zoneKind" and class "zoneClass", into its extended declared zone rank. Static version. Needs the "calledUnit" if using FP_CLASS. :param zoneRk: The given zone index. :param zoneClass: The class of the given zone index, in {D_CLASS, FP_CLASS}. :param zoneKind: The kind of the given zone, in {ALLKIND, REALKIND, PTRKIND}. :param symbolTable: The current symbolTable. :param calledUnit: The current called Unit, if any. :return: the corresponding extended declared zone rank. zoneRkToPublicRk ^^^^^^^^^^^^^^^^ .. java:method:: public static int zoneRkToPublicRk(int zoneRk, int zoneKind, Unit calledUnit) :outertype: DataFlowAnalyzer Translates a zone rank "zoneRk", of kind "zoneKind" into its corresponding public zone rank, i.e. rank in the external shape of its Unit "calledUnit". :param zoneRk: The given zone index. :param zoneKind: The kind of the given zone, in {ALLKIND, REALKIND, PTRKIND}. :param calledUnit: The unit of which zoneRk is a visible zone. :return: The public rank of "zoneRk" in calledUnit. zoneRkToVectorIndex ^^^^^^^^^^^^^^^^^^^ .. java:method:: public final int zoneRkToVectorIndex(int zoneRk, int zoneClass, int zoneKind, int[] vectorMap) :outertype: DataFlowAnalyzer Translates a zone rank "zoneRk", of kind "zoneKind" and class "zoneClass", into its corresponding index in a targetted ZoneVector or BoolMatrix, which must be of the same kind "zoneKind" and whose map is given in "vectorMap". \ **Globals required:**\ \ :java:ref:`curCalledUnit`\ :param zoneRk: The given zone rank. :param zoneClass: The class of the given zone, in {D_CLASS, FP_CLASS}. :param zoneKind: The kind of the given zone and of the targetted ZoneVector, in {ALLKIND, REALKIND, PTRKIND}. :param vectorMap: The map of the classes used in the targetted vector. :return: The corresponding index in the targetted ZoneVector or BoolMatrix row or column. zoneRkToVectorIndex ^^^^^^^^^^^^^^^^^^^ .. java:method:: public static int zoneRkToVectorIndex(int zoneRk, int zoneClass, int zoneKind, int[] vectorMap, Unit calledUnit) :outertype: DataFlowAnalyzer Translates a zone rank "zoneRk", of kind "zoneKind" and class "zoneClass", into its corresponding index in a targetted ZoneVector or BoolMatrix, which must be of the same kind "zoneKind" and whose map is given in "vectorMap". Static version. Needs the "calledUnit" if using FP_CLASS. :param zoneRk: The given zone rank. :param zoneClass: The class of the given zone, in {D_CLASS, FP_CLASS}. :param zoneKind: The kind of the given zone and of the targetted ZoneVector, in {ALLKIND, REALKIND, PTRKIND}. :param vectorMap: The map of the classes used in the targetted vector. :param calledUnit: The current called Unit, if any. :return: The corresponding index in the targetted ZoneVector or BoolMatrix row or column. zoneRkToZoneInfo ^^^^^^^^^^^^^^^^ .. java:method:: public final ZoneInfo zoneRkToZoneInfo(int zoneRk, int zoneClass, int zoneKind) :outertype: DataFlowAnalyzer Translates a zone rank "zoneRk", of kind "zoneKind" and class "zoneClass", into its ZoneInfo. \ **Globals required:**\ \ :java:ref:`curUnit`\ , \ :java:ref:`curCalledUnit`\ , \ :java:ref:`curSymbolTable`\ :param zoneRk: The given zone index. :param zoneClass: The class of the given zone index, in {D_CLASS, FP_CLASS}. :param zoneKind: The kind of the given zone, in {ALLKIND, REALKIND, PTRKIND}. :return: the corresponding ZoneInfo. zoneRkToZoneInfo ^^^^^^^^^^^^^^^^ .. java:method:: public static ZoneInfo zoneRkToZoneInfo(int zoneRk, int zoneClass, int zoneKind, SymbolTable symbolTable, Unit calledUnit) :outertype: DataFlowAnalyzer Translates a zone rank "zoneRk", of kind "zoneKind" and class "zoneClass", into its ZoneInfo. Static version. Needs the "calledUnit" if using FP_CLASS. :param zoneRk: The given zone index. :param zoneClass: The class of the given zone index, in {D_CLASS, FP_CLASS}. :param zoneKind: The kind of the given zone, in {ALLKIND, REALKIND, PTRKIND}. :param symbolTable: The current symbolTable. :param calledUnit: The current called Unit, if any. :return: the corresponding ZoneInfo.