-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #852 from jecisc/TLambda
Introduce the concept of lambda expressions
- Loading branch information
Showing
4 changed files
with
187 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
" | ||
FamixTLabmda represents a behavioural entity that does not have a name. It can be used to represent lambdas, closures, blocks... | ||
## Relations | ||
====================== | ||
### Parents | ||
| Relation | Origin | Opposite | Type | Comment | | ||
|---| | ||
| `lambdaContainer` | `FamixTLambda` | `lambdas` | `FamixTWithLambdas` | The container defining the lambda expression. The lambda is placed in a container, because certain languages can nest lambdas in lambdas.| | ||
### Children | ||
| Relation | Origin | Opposite | Type | Comment | | ||
|---| | ||
| `localVariables` | `FamixTWithLocalVariables` | `parentBehaviouralEntity` | `FamixTLocalVariable` | Variables locally defined by this behaviour.| | ||
| `parameters` | `FamixTWithParameters` | `parentBehaviouralEntity` | `FamixTParameter` | List of formal parameters declared by this behaviour.| | ||
### Outgoing dependencies | ||
| Relation | Origin | Opposite | Type | Comment | | ||
|---| | ||
| `accesses` | `FamixTWithAccesses` | `accessor` | `FamixTAccess` | Accesses to variables made by this behaviour.| | ||
| `outgoingInvocations` | `FamixTWithInvocations` | `sender` | `FamixTInvocation` | Outgoing invocations sent by this behaviour.| | ||
| `outgoingReferences` | `FamixTWithReferences` | `referencer` | `FamixTReference` | References from this entity to other entities.| | ||
### Incoming dependencies | ||
| Relation | Origin | Opposite | Type | Comment | | ||
|---| | ||
| `incomingInvocations` | `FamixTInvocable` | `candidates` | `FamixTInvocation` | Incoming invocations from other behaviours computed by the candidate operator.| | ||
### Other | ||
| Relation | Origin | Opposite | Type | Comment | | ||
|---| | ||
| `sourceAnchor` | `FamixTSourceEntity` | `element` | `FamixTSourceAnchor` | SourceAnchor entity linking to the original source code for this entity| | ||
## Properties | ||
====================== | ||
| Name | Type | Default value | Comment | | ||
|---| | ||
| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.| | ||
| `signature` | `String` | nil | Signature of the message being sent| | ||
" | ||
Trait { | ||
#name : #FamixTLambda, | ||
#instVars : [ | ||
'#lambdaContainer => FMOne type: #FamixTWithLambdas opposite: #lambdas' | ||
], | ||
#traits : 'FamixTHasSignature + FamixTInvocable + FamixTWithLocalVariables + FamixTWithParameters + FamixTWithStatements + TEntityMetaLevelDependency', | ||
#classTraits : 'FamixTHasSignature classTrait + FamixTInvocable classTrait + FamixTWithLocalVariables classTrait + FamixTWithParameters classTrait + FamixTWithStatements classTrait + TEntityMetaLevelDependency classTrait', | ||
#category : #'Famix-Traits-Traits' | ||
} | ||
|
||
{ #category : #meta } | ||
FamixTLambda classSide >> annotation [ | ||
|
||
<FMClass: #TLambda super: #Object> | ||
<package: #'Famix-Traits'> | ||
<generated> | ||
^ self | ||
] | ||
|
||
{ #category : #accessing } | ||
FamixTLambda >> lambdaContainer [ | ||
"Relation named: #lambdaContainer type: #FamixTWithLambdas opposite: #lambdas" | ||
|
||
<generated> | ||
<FMComment: 'The container defining the lambda expression. The lambda is placed in a container, because certain languages can nest lambdas in lambdas.'> | ||
<container> | ||
^ lambdaContainer | ||
] | ||
|
||
{ #category : #accessing } | ||
FamixTLambda >> lambdaContainer: anObject [ | ||
|
||
<generated> | ||
lambdaContainer := anObject | ||
] | ||
|
||
{ #category : #navigation } | ||
FamixTLambda >> lambdaContainerGroup [ | ||
<generated> | ||
<navigation: 'LambdaContainer'> | ||
^ MooseSpecializedGroup with: self lambdaContainer | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
" | ||
I represent an entity that can owned lambda expressions. | ||
## Relations | ||
====================== | ||
### Children | ||
| Relation | Origin | Opposite | Type | Comment | | ||
|---| | ||
| `lambdas` | `FamixTWithLambdas` | `lambdaContainer` | `FamixTLambda` | Lambdas defined in the container, if any.| | ||
" | ||
Trait { | ||
#name : #FamixTWithLambdas, | ||
#instVars : [ | ||
'#lambdas => FMMany type: #FamixTLambda opposite: #lambdaContainer' | ||
], | ||
#category : #'Famix-Traits-Traits' | ||
} | ||
|
||
{ #category : #meta } | ||
FamixTWithLambdas classSide >> annotation [ | ||
|
||
<FMClass: #TWithLambdas super: #Object> | ||
<package: #'Famix-Traits'> | ||
<generated> | ||
^ self | ||
] | ||
|
||
{ #category : #adding } | ||
FamixTWithLambdas >> addLambda: anObject [ | ||
<generated> | ||
^ self lambdas add: anObject | ||
] | ||
|
||
{ #category : #accessing } | ||
FamixTWithLambdas >> lambdas [ | ||
"Relation named: #lambdas type: #FamixTLambda opposite: #lambdaContainer" | ||
|
||
<generated> | ||
<FMComment: 'Lambdas defined in the container, if any.'> | ||
<derived> | ||
^ lambdas | ||
] | ||
|
||
{ #category : #accessing } | ||
FamixTWithLambdas >> lambdas: anObject [ | ||
|
||
<generated> | ||
lambdas value: anObject | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters