Difference between revisions of "XCSG:StackVariable"
From AtlasWiki
m (TheodoreMurdock moved page Local to XCSG:Local) |
|||
Line 1: | Line 1: | ||
+ | A Local variable is a variable declared inside a [[Function]]. | ||
+ | |||
+ | Note that, unlike other variables, many local variables do not appear in data-flow, since local variables do not cause interprocedural flows, unless they have [[static storage]]. Such variables are represented in data flow only by [[Initialization]] and [[Assignment]] nodes, with each such node representing a value the variable can receive, and connected in forward data flow only to locations to which that particular value can be passed. | ||
+ | |||
+ | Since they do not play a role in data flow, non-static-storage local variables are often not included in an XCSG graph. | ||
+ | |||
== Specification == | == Specification == | ||
{{Node | {{Node |
Revision as of 11:22, 17 April 2014
A Local variable is a variable declared inside a Function.
Note that, unlike other variables, many local variables do not appear in data-flow, since local variables do not cause interprocedural flows, unless they have static storage. Such variables are represented in data flow only by Initialization and Assignment nodes, with each such node representing a value the variable can receive, and connected in forward data flow only to locations to which that particular value can be passed.
Since they do not play a role in data flow, non-static-storage local variables are often not included in an XCSG graph.
Specification
Metaclass | StackVariable |
---|---|
Extends | Variable |
Description | A Variable declared inside a Function. |
All Superkinds | Variable, Node, ModelElement |
---|
Specified In Edges
| ||||
---|---|---|---|---|
Inherited From | In Edge | Predecessor | Multiplicity | Description |
Variable | 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. |
Specified Out Edges
| ||||
---|---|---|---|---|
Inherited From | Out Edge | Successor | Multiplicity | Description |
Variable | 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.
|
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 |
Variable | HasVariable | Namespace | 1 | Links a Classifier or Package to one of its Variables.
|
InterproceduralDataFlow | Assignment | ✱ | Represents data flows between Functions, or involving Variables visible to multiple Functions. | |
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 |
Variable | InterproceduralDataFlow | DataFlow (Node) | ✱ | Represents data flows between Functions, or involving Variables visible to multiple Functions. |
Node | Contains | Node | ✱ | Indicates that the predecessor contains the successor in a sense specified by the specific type of Contains edge. |