Difference between revisions of "XCSG:Call"

From AtlasWiki
Jump to: navigation, search
Line 1: Line 1:
 +
Call edges in XCSG indicate the presence of one or more calls within a particular scope, such as a [[Function]] or [[ControlFlow]] statement.
 +
 +
For calls which are statically resolved (such as calls to [[GlobalFunction]]s or [[ClassMethod]]s), a single call edge exists to the Function called.
 +
 +
For dynamically resolved calls (such as virtual [[Method]]s), Call edges are created to the specified [[Function]] (if it is concrete) and every concrete method that [[Overrides]] it. <!--TODO: calls to [[FunctionPointer]]s-->
 +
 +
This may result in call edges that cannot occur in the running program, but is conservative in ensuring no possible calls to types that have been indexed were missed. Alternative strategies for call resolution are possible,
 +
 +
Individual call sites have multiple representations: in [[DataFlow]], the passing of the implicit [[This]] parameter at the call site is represented by a [[CallSite]] node. In addition, for every call site there exists an [[InvocationSite]] node which identifies the function or method signature, and which has edges connecting it to the CallSite and to the [[ReturnSite]].
 +
 
== Specification ==
 
== Specification ==
 
{{Edge
 
{{Edge

Revision as of 18:38, 24 April 2014

Call edges in XCSG indicate the presence of one or more calls within a particular scope, such as a Function or ControlFlow statement.

For calls which are statically resolved (such as calls to GlobalFunctions or ClassMethods), a single call edge exists to the Function called.

For dynamically resolved calls (such as virtual Methods), Call edges are created to the specified Function (if it is concrete) and every concrete method that Overrides it.

This may result in call edges that cannot occur in the running program, but is conservative in ensuring no possible calls to types that have been indexed were missed. Alternative strategies for call resolution are possible,

Individual call sites have multiple representations: in DataFlow, the passing of the implicit This parameter at the call site is represented by a CallSite node. In addition, for every call site there exists an InvocationSite node which identifies the function or method signature, and which has edges connecting it to the CallSite and to the ReturnSite.

Specification

Metaclass Call
Extends Edge
Description Indicates the possibility of one or more calls to the Function pointed to within the Function or ControlFlow node that the edge comes from.