Difference between revisions of "XCSG:Function"
From AtlasWiki
(Created page with "The semantics of Function are those common to functions in C/C++, and methods in C++/Java. A method of a class is considered to be a function with an implicit <code>this<...") |
|||
(6 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | The semantics of Function are those common to functions in C/C++, and | + | The semantics of Function are those common to functions in C/C++, and [[method]]s in C++/Java. |
− | + | 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 == | ||
{{Node | {{Node | ||
− | | extends = | + | | extends = Node |
− | | description = | + | | description = A [[Call|callable]] subroutine which may take [[Parameter]]s and which has a [[Return]] type. |
| references = [5, p. 2-14, Figure 2-5], [5, pp. 2-47, 2-66], [5, p. B-11, method], [26, CodeMemberMethod], .method [27, p. 14], .method [36, p. 34, 2.6] | | references = [5, p. 2-14, Figure 2-5], [5, pp. 2-47, 2-66], [5, p. B-11, method], [26, CodeMemberMethod], .method [27, p. 14], .method [36, p. 34, 2.6] | ||
}} | }} | ||
Line 13: | 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. |