Difference between revisions of "XCSG:CallSite"

From AtlasWiki
Jump to: navigation, search
m (TheodoreMurdock moved page CallSite to XCSG:CallSite)
Line 1: Line 1:
 
A CallSite is a [[DataFlow (Node)|DataFlow]] node representing the existence of a function call, and the return value of that call. Their [[TypeOf]] edges point to the return type of the [[Function]] called; for void functions, the type pointed to is [[Void]].
 
A CallSite is a [[DataFlow (Node)|DataFlow]] node representing the existence of a function call, and the return value of that call. Their [[TypeOf]] edges point to the return type of the [[Function]] called; for void functions, the type pointed to is [[Void]].
  
[[ParameterPass]] nodes are connected to the associated CallSite using [[PassedBy]] edges, and can be accessed from the CallSite by following those edges in reverse.  
+
[[ParameterPass]] nodes are connected to the associated CallSite using [[ParameterInputTo]] edges, and can be accessed from the CallSite by following those edges in reverse.  
  
 
CallSites are subtyped into [[StaticCallSite]]s, [[DynamicCallSite]]s, and [[FunctionPointerCallSite]]s.  
 
CallSites are subtyped into [[StaticCallSite]]s, [[DynamicCallSite]]s, and [[FunctionPointerCallSite]]s.  

Revision as of 15:25, 15 September 2014

A CallSite is a DataFlow node representing the existence of a function call, and the return value of that call. Their TypeOf edges point to the return type of the Function called; for void functions, the type pointed to is Void.

ParameterPass nodes are connected to the associated CallSite using ParameterInputTo edges, and can be accessed from the CallSite by following those edges in reverse.

CallSites are subtyped into StaticCallSites, DynamicCallSites, and FunctionPointerCallSites.

A StaticCallSite represents a statically resolved call, and points to the exact Function called with an InvokedFunction edge; this may point to a first-class function, to a ClassMethod, or to any non-virtual InstanceMethod (such as private methods in Java).

A DynamicCallSite represents object-oriented dynamic dispatch, and indicates the InvokedType (that is, the declared type of the variable to which the call is made) and the InvokedSignature (a Method declared in that type or, for inherited non-overridden methods, in a parent of that type).

A FunctionPointerCallSite represents calling a function pointed to by a FunctionPointer, and points to the type of the function pointer with an InvokedPointer edge.

Specification

Metaclass CallSite
Extends DataFlow (Node)
Description Represents the location at which a Function call occurs.
Direct Subkinds FunctionPointerCallSite, ObjectOrientedCallSite, StaticDispatchCallSite
All Superkinds DataFlow (Node), Node, ModelElement
Specified In Edges
In Edge Predecessor Multiplicity Description
IdentityPassedTo IdentityPass 0..1 Connects an IdentityPass node to a XCSG:CallSite, indicating that the IdentityPass node is the object receiving the call, and the input to the implicit Identity parameter.
ParameterPassedTo ParameterPass Connects a ParameterPass node to the CallSite representing the Function call that passes it.
PassedTo CallInput Connects a CallInput node to the CallSite that value is an input to.

Inherited From In Edge Predecessor Multiplicity Description
DataFlow (Node) DataFlow (Edge) DataFlow (Node) Connects DataFlow nodes to one another and to Variables, linking the origin of data to locations that it is modified or consumed.
Variable
Specified Out Edges

Inherited From Out Edge Successor Multiplicity Description
DataFlow (Node) ArrayIdentityFor ArrayAccess 1 Connects a DataFlow (Node) containing an array reference or pointer to the ArrayAccess representing the associated ArrayRead or ArrayWrite.

ArrayIndexFor ArrayAccess 1 Connects a DataFlow (Node) containing a value used as an array index to the ArrayAccess representing the associated ArrayRead or ArrayWrite.
Java:ArrayLengthPassedTo ArrayInstantiation 1 Connects a DataFlow (Node) representing the integer length expression to an ArrayInstantiation.
DataFlow (Edge) DataFlow (Node) Connects DataFlow nodes to one another and to Variables, linking the origin of data to locations that it is modified or consumed.

Variable
DefinedAs TypeAlias 0..1 Connects a Variable or DataFlow node which received its Type via a TypeAlias (such as a C/C++ typedef) to that TypeAlias.
InstanceVariableWritten InstanceVariableAssignment Connects a value (DataFlow (Node) or Variable) representing an object instance to an InstanceVariableAssignment representing a write to a field of that object.
TypeOf Type 1 Links a Variable or DataFlow node to its Type
Known Possible In Edges

Inherited From In Edge Predecessor Multiplicity Description
DataFlow (Node) InterproceduralDataFlow Variable Represents data flows between Functions, or involving Variables visible to multiple Functions.

LocalDataFlow Parameter Within the scope of a particular Function, connects Parameters to DataFlow nodes, and DataFlow nodes to one another, indicating flow of information within that Function.

DataFlow (Node)
ProgramVariable
Node Contains Node 1 Indicates that the predecessor contains the successor in a sense specified by the specific type of Contains edge.
Known Possible Out Edges

Inherited From Out Edge Successor Multiplicity Description
DataFlow (Node) LocalDataFlow DataFlow (Node) Within the scope of a particular Function, connects Parameters to DataFlow nodes, and DataFlow nodes to one another, indicating flow of information within that Function.
Node Contains Node Indicates that the predecessor contains the successor in a sense specified by the specific type of Contains edge.