Difference between revisions of "XCSG:Function"
From AtlasWiki
(→Specification) |
|||
Line 2: | Line 2: | ||
As Functions can be [[abstractMethod|abstract methods]], they do not always represent implementations; however, [[function declaration]]s without definitions (as possible in C and C++) that are not abstract methods of some [[Classifier]] are not considered Functions. | As Functions can be [[abstractMethod|abstract methods]], they do not always represent implementations; however, [[function declaration]]s without definitions (as possible in C and C++) that are not abstract methods of some [[Classifier]] are not considered Functions. | ||
− | |||
− | |||
− | |||
== Specification == | == Specification == | ||
Line 15: | Line 12: | ||
{{XCSGTag | {{XCSGTag | ||
| name = inline | | name = inline | ||
− | | description = | + | | description = Indicates the presence of a compiler hint that calls to the function should be inlined if possible. |
}} | }} |
Latest revision as of 17:44, 2 June 2015
The semantics of Function are those common to functions in C/C++, and methods in C++/Java.
As Functions can be abstract methods, they do not always represent implementations; however, function declarations without definitions (as possible in C and C++) that are not abstract methods of some Classifier are not considered Functions.
Specification
Metaclass | Function |
---|---|
Extends | Node |
Description | A callable subroutine which may take Parameters and which has a Return type. |
Direct Subkinds | Method |
---|
All Superkinds | Node, ModelElement |
---|
Specified In Edges | |||
---|---|---|---|
In Edge | Predecessor | Multiplicity | Description |
Call | Function | ✱ | Indicates the possibility of one or more calls to the Function pointed to within the Function that the edge comes from. |
InvokedFunction | StaticCallSite | ✱ | Connects a StaticCallSite to the exact Function called. |
ReadsFunctionAddress | Function | 1 | Connects a Function to a Function that it takes the address of. |
Specified Out Edges | |||
---|---|---|---|
Out Edge | Successor | Multiplicity | Description |
Call | Function | ✱ | Indicates the possibility of one or more calls to the Function pointed to within the Function that the edge comes from. |
HasControlFlow | ControlFlow (Node) | ✱ | Connects a Function to any ControlFlow (Node)s it contains. |
HasParameter | Parameter | ✱ | Connects a Function to a Parameter of that Function. |
HasReturnValue | ReturnValue | 0..1 | Connects a (non-void) Function to its MasterReturn node. |
ReadsFunctionAddress | Function | ✱ | Connects a Function to a Function that it takes the address of. |
ReadsVariable | InstanceVariable | ✱ | Connects a Function to a InstanceVariable or ProgramVariable that it reads. |
ProgramVariable | ✱ | ||
Returns | Type | 1 | Connects a Function to the Type of its return value (which may be Void). |
Known Possible In Edges
| ||||
---|---|---|---|---|
Inherited From | In Edge | Predecessor | Multiplicity | Description |
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 |
Node | Contains | Node | ✱ | Indicates that the predecessor contains the successor in a sense specified by the specific type of Contains edge. |
Tag | inline |
---|---|
Description | Indicates the presence of a compiler hint that calls to the function should be inlined if possible. |