Skip to content

Commit

Permalink
regenerated meta-model (includedFile + statementFunction and supoercl…
Browse files Browse the repository at this point in the history
…asses)
  • Loading branch information
anquetil committed Jun 11, 2024
1 parent 91fc1ca commit a94a52b
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 86 deletions.
18 changes: 15 additions & 3 deletions src/Famix-Fortran77-Entities/FamixF77IncludedFile.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,40 @@ includedFile
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `localVariables` | `FamixTWithLocalVariables` | `parentBehaviouralEntity` | `FamixTLocalVariable` | Variables locally defined by this behaviour.|
| `statementFunctions` | `FamixF77TWithStatements` | `parentEntity` | `FamixF77StatementFunction` | Statement functions defined in the body|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
### 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 |
|---|
| `inclusions` | `FamixF77IncludedFile` | `included` | `FamixF77Include` | All inclusions of this file|
### 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.|
"
Class {
#name : #FamixF77IncludedFile,
#superclass : #FamixF77ProgramUnit,
#traits : 'FamixTWithAccesses + FamixTWithInvocations + FamixTWithLocalVariables + FamixTWithTypes',
#classTraits : 'FamixTWithAccesses classTrait + FamixTWithInvocations classTrait + FamixTWithLocalVariables classTrait + FamixTWithTypes classTrait',
#traits : 'FamixF77TWithStatements + FamixTWithTypes',
#classTraits : 'FamixF77TWithStatements classTrait + FamixTWithTypes classTrait',
#instVars : [
'#inclusions => FMMany type: #FamixF77Include opposite: #included'
],
Expand Down
30 changes: 0 additions & 30 deletions src/Famix-Fortran77-Entities/FamixF77PUBlockdata.class.st
Original file line number Diff line number Diff line change
@@ -1,41 +1,11 @@
"
a block data for common variable
## Relations
======================
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `comments` | `FamixTWithComments` | `commentedEntity` | `FamixTComment` | List of comments for the entity|
| `localVariables` | `FamixTWithLocalVariables` | `parentBehaviouralEntity` | `FamixTLocalVariable` | Variables locally defined 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.|
### 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.|
"
Class {
#name : #FamixF77PUBlockdata,
#superclass : #FamixF77ProgramUnit,
#traits : 'FamixTWithAccesses + FamixTWithComments + FamixTWithLocalVariables + FamixTWithStatements + TEntityMetaLevelDependency',
#classTraits : 'FamixTWithAccesses classTrait + FamixTWithComments classTrait + FamixTWithLocalVariables classTrait + FamixTWithStatements classTrait + TEntityMetaLevelDependency classTrait',
#category : #'Famix-Fortran77-Entities-Entities'
}

Expand Down
7 changes: 0 additions & 7 deletions src/Famix-Fortran77-Entities/FamixF77PUMain.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ a main program
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `comments` | `FamixTWithComments` | `commentedEntity` | `FamixTComment` | List of comments for the entity|
| `localVariables` | `FamixTWithLocalVariables` | `parentBehaviouralEntity` | `FamixTLocalVariable` | Variables locally defined by this behaviour.|
| `statementFunctions` | `FamixF77TWithStatements` | `parentEntity` | `FamixF77StatementFunction` | Statement functions defined in the body|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
Expand All @@ -19,11 +17,6 @@ a main program
| `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 |
|---|
Expand Down
6 changes: 2 additions & 4 deletions src/Famix-Fortran77-Entities/FamixF77PUProcedure.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ a procedure
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `comments` | `FamixTWithComments` | `commentedEntity` | `FamixTComment` | List of comments for the entity|
| `localVariables` | `FamixTWithLocalVariables` | `parentBehaviouralEntity` | `FamixTLocalVariable` | Variables locally defined by this behaviour.|
| `parameters` | `FamixTWithParameters` | `parentBehaviouralEntity` | `FamixTParameter` | List of formal parameters declared by this behaviour.|
| `statementFunctions` | `FamixF77TWithStatements` | `parentEntity` | `FamixF77StatementFunction` | Statement functions defined in the body|
| `types` | `FamixTWithTypes` | `typeContainer` | `FamixTType` | Types contained (declared) in this entity, if any. #types is declared in ContainerEntity because different kinds of container can embed types. Types are usually contained in a Famix.Namespace. But types can also be contained in a Famix.Class or Famix.Method (in Java with inner classes for example). Famix.Function can also contain some types such as structs.|
Expand Down Expand Up @@ -43,8 +41,8 @@ a procedure
Class {
#name : #FamixF77PUProcedure,
#superclass : #FamixF77ProgramUnit,
#traits : 'FamixF77TWithStatements + FamixTHasSignature + FamixTWithParameters + FamixTWithTypes',
#classTraits : 'FamixF77TWithStatements classTrait + FamixTHasSignature classTrait + FamixTWithParameters classTrait + FamixTWithTypes classTrait',
#traits : 'FamixF77TWithStatements + FamixTHasSignature + FamixTInvocable + FamixTWithParameters + FamixTWithTypes',
#classTraits : 'FamixF77TWithStatements classTrait + FamixTHasSignature classTrait + FamixTInvocable classTrait + FamixTWithParameters classTrait + FamixTWithTypes classTrait',
#category : #'Famix-Fortran77-Entities-Entities'
}

Expand Down
6 changes: 4 additions & 2 deletions src/Famix-Fortran77-Entities/FamixF77ProgramUnit.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ a program unit
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `comments` | `FamixTWithComments` | `commentedEntity` | `FamixTComment` | List of comments for the entity|
| `externalDeclarations` | `FamixF77ProgramUnit` | `programUnit` | `FamixF77ExternalDeclaration` | |
| `localVariables` | `FamixTWithLocalVariables` | `parentBehaviouralEntity` | `FamixTLocalVariable` | Variables locally defined by this behaviour.|
### Outgoing dependencies
| Relation | Origin | Opposite | Type | Comment |
Expand All @@ -36,8 +38,8 @@ a program unit
Class {
#name : #FamixF77ProgramUnit,
#superclass : #FamixF77NamedEntity,
#traits : 'FamixTSourceEntity',
#classTraits : 'FamixTSourceEntity classTrait',
#traits : 'FamixTSourceEntity + FamixTWithComments + FamixTWithLocalVariables + TEntityMetaLevelDependency',
#classTraits : 'FamixTSourceEntity classTrait + FamixTWithComments classTrait + FamixTWithLocalVariables classTrait + TEntityMetaLevelDependency classTrait',
#instVars : [
'#programFile => FMOne type: #FamixF77ProgramFile opposite: #programUnits',
'#externalDeclarations => FMMany type: #FamixF77ExternalDeclaration opposite: #programUnit',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ a statement function
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `comments` | `FamixTWithComments` | `commentedEntity` | `FamixTComment` | List of comments for the entity|
| `localVariables` | `FamixTWithLocalVariables` | `parentBehaviouralEntity` | `FamixTLocalVariable` | Variables locally defined by this behaviour.|
| `parameters` | `FamixTWithParameters` | `parentBehaviouralEntity` | `FamixTParameter` | List of formal parameters declared by this behaviour.|
| `statementFunctions` | `FamixF77TWithStatements` | `parentEntity` | `FamixF77StatementFunction` | Statement functions defined in the body|
Expand Down Expand Up @@ -49,8 +48,8 @@ a statement function
Class {
#name : #FamixF77StatementFunction,
#superclass : #FamixF77NamedEntity,
#traits : 'FamixF77TWithStatements + FamixTHasSignature + FamixTSourceEntity + FamixTTypedEntity + FamixTWithParameters + FamixTWithTypes',
#classTraits : 'FamixF77TWithStatements classTrait + FamixTHasSignature classTrait + FamixTSourceEntity classTrait + FamixTTypedEntity classTrait + FamixTWithParameters classTrait + FamixTWithTypes classTrait',
#traits : 'FamixF77TWithStatements + FamixTHasSignature + FamixTInvocable + FamixTSourceEntity + FamixTTypedEntity + FamixTWithLocalVariables + FamixTWithParameters + FamixTWithTypes',
#classTraits : 'FamixF77TWithStatements classTrait + FamixTHasSignature classTrait + FamixTInvocable classTrait + FamixTSourceEntity classTrait + FamixTTypedEntity classTrait + FamixTWithLocalVariables classTrait + FamixTWithParameters classTrait + FamixTWithTypes classTrait',
#instVars : [
'#parentEntity => FMOne type: #FamixF77TWithStatements opposite: #statementFunctions'
],
Expand Down
13 changes: 2 additions & 11 deletions src/Famix-Fortran77-Entities/FamixF77TWithStatements.trait.st
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
"
A trait that factorize several interesting properties for entities with statements
## Relations
======================
### Children
| Relation | Origin | Opposite | Type | Comment |
|---|
| `comments` | `FamixTWithComments` | `commentedEntity` | `FamixTComment` | List of comments for the entity|
| `localVariables` | `FamixTWithLocalVariables` | `parentBehaviouralEntity` | `FamixTLocalVariable` | Variables locally defined by this behaviour.|
| `statementFunctions` | `FamixF77TWithStatements` | `parentEntity` | `FamixF77StatementFunction` | Statement functions defined in the body|
### Outgoing dependencies
Expand All @@ -18,11 +14,6 @@ A trait that factorize several interesting properties for entities with statemen
| `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 |
|---|
Expand All @@ -42,8 +33,8 @@ Trait {
#instVars : [
'#statementFunctions => FMMany type: #FamixF77StatementFunction opposite: #parentEntity'
],
#traits : 'FamixTInvocable + FamixTWithAccesses + FamixTWithComments + FamixTWithInvocations + FamixTWithLocalVariables + FamixTWithStatements + TEntityMetaLevelDependency',
#classTraits : 'FamixTInvocable classTrait + FamixTWithAccesses classTrait + FamixTWithComments classTrait + FamixTWithInvocations classTrait + FamixTWithLocalVariables classTrait + FamixTWithStatements classTrait + TEntityMetaLevelDependency classTrait',
#traits : 'FamixTWithStatements',
#classTraits : 'FamixTWithStatements classTrait',
#category : #'Famix-Fortran77-Entities-Traits'
}

Expand Down
20 changes: 20 additions & 0 deletions src/Famix-Fortran77-Entities/FamixTWithStatements.extension.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Extension { #name : #FamixTWithStatements }

{ #category : #'*Famix-Fortran77-Entities-accessing' }
FamixTWithStatements >> statementFunctions [
"Relation named: #statementFunctions type: #FamixF77StatementFunction opposite: #parentEntity"

<generated>
<FMComment: 'Statement functions defined in the body'>
<derived>
<FMProperty: #statementFunctions type: #FamixF77StatementFunction opposite: #parentEntity>
<package: #'Famix-Fortran77-Entities'>
^ self attributeAt: #statementFunctions ifAbsentPut: [ FMMultivalueLink on: self opposite: #parentEntity: ]
]

{ #category : #'*Famix-Fortran77-Entities-accessing' }
FamixTWithStatements >> statementFunctions: anObject [

<generated>
self statementFunctions value: anObject
]
42 changes: 16 additions & 26 deletions src/Famix-Fortran77-Generator/FamixFortran77Generator.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,12 @@ FamixFortran77Generator >> defineHierarchy [

include --|> #TAssociation.

"extends default TWithStatements in #defineRelations"
tWithStatements --|> #TWithStatements.

includedFile --|> programUnit.
includedFile --|> #TWithLocalVariables.
includedFile --|> #TWithTypes.
includedFile --|> #TWithAccesses.
includedFile --|> #TWithInvocations.
includedFile --|> #TWithTypes.
includedFile --|> tWithStatements.

"integer --|> typeIntrinsic.
Expand All @@ -231,21 +231,11 @@ FamixFortran77Generator >> defineHierarchy [

programUnit --|> namedEntity.
programUnit --|> #TSourceEntity.

tWithStatements --|> #TWithStatements.
tWithStatements --|> #TEntityMetaLevelDependency.
tWithStatements --|> #TWithComments.
tWithStatements --|> #TWithAccesses.
tWithStatements --|> #TWithInvocations.
tWithStatements --|> #TWithLocalVariables.
tWithStatements --|> #TInvocable.
programUnit --|> #TWithComments.
programUnit --|> #TEntityMetaLevelDependency.
programUnit --|> #TWithLocalVariables.

puBlockdata --|> programUnit.
puBlockdata --|> #TWithStatements.
puBlockdata --|> #TEntityMetaLevelDependency.
puBlockdata --|> #TWithComments.
puBlockdata --|> #TWithAccesses.
puBlockdata --|> #TWithLocalVariables.
"puBlockdata --|> #TWithTypes."

puComment --|> programUnit.
Expand All @@ -259,21 +249,23 @@ FamixFortran77Generator >> defineHierarchy [
puMain --|> #TWithTypes.

puProcedure --|> programUnit.
puProcedure --|> #THasSignature.
puProcedure --|> tWithStatements.
puProcedure --|> #THasSignature.
puProcedure --|> #TWithParameters.
puProcedure --|> #TWithTypes.
puProcedure --|> #TInvocable.

puSubroutine --|> puProcedure.


statementFunction --|> namedEntity.
statementFunction --|> #TSourceEntity.
statementFunction --|> tWithStatements.
statementFunction --|> #TTypedEntity.
statementFunction --|> #THasSignature.
statementFunction --|> #TWithParameters.
statementFunction --|> #TWithTypes.
statementFunction --|> #TWithLocalVariables.
statementFunction --|> #TInvocable.

"real --|> typeIntrinsic."

Expand Down Expand Up @@ -354,12 +346,10 @@ FamixFortran77Generator >> defineTraits [

super defineTraits.

tWithStatements := builder
newTraitNamed: 'TWithStatements'
comment: 'A trait that factorize several interesting properties for entities with statements'
tWithStatements := builder newTraitNamed: #TWithStatements
]

{ #category : #definition }
{ #category : #'class comment' }
FamixFortran77Generator >> externalDeclarationComment [

^ 'Im a external declaration.
Expand All @@ -378,7 +368,7 @@ FamixFortran77Generator >> fileEntityComment [
^ 'a fortran file'
]

{ #category : #definition }
{ #category : #'class comment' }
FamixFortran77Generator >> implicitComment [

^ '[Implicit](https://docs.oracle.com/cd/E19957-01/805-4939/6j4m0vn9v/index.html) statement'
Expand All @@ -393,7 +383,7 @@ FamixFortran77Generator >> implicitPropertyFor: anInstanceVar [
'dictionary to carry implicits declaration rule for each type'.
]

{ #category : #definition }
{ #category : #'class comment' }
FamixFortran77Generator >> includeComment [

^ 'Entity to hold `#include "file.inc"` directive
Expand Down Expand Up @@ -479,7 +469,7 @@ FamixFortran77Generator >> typeComment [
^ 'Im a Abstract Type, can be subclassed by TypeInstrinsic and Segment'
]

{ #category : #definition }
{ #category : #'class comment' }
FamixFortran77Generator >> typeIntrinsicComment [

^ 'Im an fortran77 instrinsic type.
Expand Down

0 comments on commit a94a52b

Please sign in to comment.