Skip to content

Commit

Permalink
Merge pull request #27 from moosetechnology/metamodels-refactoring
Browse files Browse the repository at this point in the history
Metamodels refactoring
  • Loading branch information
uNouss authored Sep 6, 2023
2 parents 7cc3cfb + 7f8f34d commit e742e3c
Show file tree
Hide file tree
Showing 87 changed files with 1,846 additions and 1,253 deletions.
7 changes: 6 additions & 1 deletion src/BaselineOfFamixFortran/BaselineOfFamixFortran.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,10 @@ BaselineOfFamixFortran >> definePackages: spec [
spec
package: 'Famix-Fortran77-Entities' with: [ spec requires: #( Famix ) ];
package: 'Famix-Fortran77-Generator' with: [ spec requires: #( Famix ) ];
package: 'Famix-Fortran77-Tests' with: [ spec requires: #( Famix ) ]
package: 'Famix-Fortran77-Tests' with: [ spec requires: #( Famix ) ];
package: 'Famix-FortranUDT-Generator' with: [ spec requires: #( Famix ) ];
package: 'Famix-FortranUDT-Entities' with: [ spec requires: #( Famix ) ];
package: 'Famix-Fortran03-Entities' with: [ spec requires: #( Famix 'Famix-FortranUDT-Entities') ];
package: 'Famix-Fortran03-Generator' with: [ spec requires: #( Famix 'Famix-FortranUDT-Entities') ];
package: 'Famix-Fortran03-Tests' with: [ spec requires: #( Famix ) ]
]
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Class {
#name : #FamixFortran03Comment,
#superclass : #FamixFortran03SourcedEntity,
#name : #FamixF03Comment,
#superclass : #FamixF03SourcedEntity,
#traits : 'FamixTComment',
#classTraits : 'FamixTComment classTrait',
#category : #'Famix-Fortran03-Entities-Entities'
}

{ #category : #meta }
FamixFortran03Comment class >> annotation [
FamixF03Comment class >> annotation [

<FMClass: #Comment super: #FamixFortran03SourcedEntity>
<FMClass: #Comment super: #FamixF03SourcedEntity>
<package: #'Famix-Fortran03-Entities'>
<generated>
^ self
Expand Down
29 changes: 29 additions & 0 deletions src/Famix-Fortran03-Entities/FamixF03DerivedType.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"
Im a User-defined-type
```fortran
type [,attribute-list] :: name [(parameterized-declaration-list)]
[parameterized-definition-statements]
[private statement or sequence statement]
[member-variables]
contains
[type-bound-procedures]
end type
```
"
Class {
#name : #FamixF03DerivedType,
#superclass : #FamixFortranUserDefinedType,
#traits : 'FamixTWithAttributes + FamixTWithMethods',
#classTraits : 'FamixTWithAttributes classTrait + FamixTWithMethods classTrait',
#category : #'Famix-Fortran03-Entities-Entities'
}

{ #category : #meta }
FamixF03DerivedType class >> annotation [

<FMClass: #DerivedType super: #FamixFortranUserDefinedType>
<package: #'Famix-Fortran03-Entities'>
<generated>
^ self
]
57 changes: 57 additions & 0 deletions src/Famix-Fortran03-Entities/FamixF03Entity.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
Class {
#name : #FamixF03Entity,
#superclass : #MooseEntity,
#category : #'Famix-Fortran03-Entities-Entities'
}

{ #category : #meta }
FamixF03Entity class >> annotation [

<FMClass: #Entity super: #MooseEntity>
<package: #'Famix-Fortran03-Entities'>
<generated>
<abstract>
^ self
]

{ #category : #testing }
FamixF03Entity class >> isAbstract [

<generated>
^ self == FamixF03Entity
]

{ #category : #meta }
FamixF03Entity class >> metamodel [

<generated>
^ FamixF03Model metamodel
]

{ #category : #testing }
FamixF03Entity >> isAssociation [

<generated>
^ false
]

{ #category : #testing }
FamixF03Entity >> isBehavioural [

<generated>
^ false
]

{ #category : #testing }
FamixF03Entity >> isInheritance [

<generated>
^ false
]

{ #category : #testing }
FamixF03Entity >> isMethod [

<generated>
^ false
]
19 changes: 19 additions & 0 deletions src/Famix-Fortran03-Entities/FamixF03Inheritance.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"
I an inheritance association
"
Class {
#name : #FamixF03Inheritance,
#superclass : #FamixF03Entity,
#traits : 'FamixTInheritance',
#classTraits : 'FamixTInheritance classTrait',
#category : #'Famix-Fortran03-Entities-Entities'
}

{ #category : #meta }
FamixF03Inheritance class >> annotation [

<FMClass: #Inheritance super: #FamixF03Entity>
<package: #'Famix-Fortran03-Entities'>
<generated>
^ self
]
19 changes: 19 additions & 0 deletions src/Famix-Fortran03-Entities/FamixF03Method.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"
I am a type-bound-procedure in a user-defined-type
"
Class {
#name : #FamixF03Method,
#superclass : #FamixF03Entity,
#traits : 'FamixTMethod',
#classTraits : 'FamixTMethod classTrait',
#category : #'Famix-Fortran03-Entities-Entities'
}

{ #category : #meta }
FamixF03Method class >> annotation [

<FMClass: #Method super: #FamixF03Entity>
<package: #'Famix-Fortran03-Entities'>
<generated>
^ self
]
20 changes: 20 additions & 0 deletions src/Famix-Fortran03-Entities/FamixF03Model.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Class {
#name : #FamixF03Model,
#superclass : #MooseModel,
#traits : 'FamixF03TEntityCreator + FamixF77TEntityCreator + FamixFortranTEntityCreator',
#classTraits : 'FamixF03TEntityCreator classTrait + FamixF77TEntityCreator classTrait + FamixFortranTEntityCreator classTrait',
#category : #'Famix-Fortran03-Entities-Model'
}

{ #category : #accessing }
FamixF03Model class >> allSubmetamodelsPackagesNames [
<generated>
^ #(#'Moose-Query' #'Famix-Traits' #'Famix-FortranUDT-Entities' #'Famix-Fortran77-Entities')
]

{ #category : #meta }
FamixF03Model class >> annotation [
<FMClass: #FamixF03Model super: #MooseModel>
<package: #'Famix-Fortran03-Entities'>
<generated>
]
79 changes: 79 additions & 0 deletions src/Famix-Fortran03-Entities/FamixF03Module.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
"
Fortran modules contain definitions that are made accessible to programs, procedures, and other modules through the use statement. They can contain data objects, type definitions, procedures, and interfaces.
Modules allow controlled scoping extension whereby entity access is made explicit
Modules automatically generate explicit interfaces required for modern procedures
It is recommended to always place functions and subroutines within modules.
### Example:
```fortran
module my_mod
implicit none
private ! All entities are now module-private by default
public public_var, print_matrix ! Explicitly export public entities
real, parameter :: public_var = 2
integer :: private_var
contains
! Print matrix A to screen
subroutine print_matrix(A)
real, intent(in) :: A(:,:) ! An assumed-shape dummy argument
integer :: i
do i = 1, size(A,1)
print *, A(i,:)
end do
end subroutine print_matrix
end module my_mod
```
"
Class {
#name : #FamixF03Module,
#superclass : #FamixF77ProgramUnit,
#instVars : [
'#users => FMMany type: #FamixF03Use opposite: #used'
],
#category : #'Famix-Fortran03-Entities-Entities'
}

{ #category : #meta }
FamixF03Module class >> annotation [

<FMClass: #Module super: #FamixF77ProgramUnit>
<package: #'Famix-Fortran03-Entities'>
<generated>
^ self
]

{ #category : #adding }
FamixF03Module >> addUser: anObject [
<generated>
^ self users add: anObject
]

{ #category : #accessing }
FamixF03Module >> users [
"Relation named: #users type: #FamixF03Use opposite: #used"

<generated>
<FMComment: 'All users of this module'>
<derived>
^ users
]

{ #category : #accessing }
FamixF03Module >> users: anObject [

<generated>
users value: anObject
]
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Class {
#name : #FamixFortran03NamedEntity,
#superclass : #FamixFortran03Entity,
#name : #FamixF03NamedEntity,
#superclass : #FamixF03Entity,
#traits : 'FamixTNamedEntity',
#classTraits : 'FamixTNamedEntity classTrait',
#category : #'Famix-Fortran03-Entities-Entities'
}

{ #category : #meta }
FamixFortran03NamedEntity class >> annotation [
FamixF03NamedEntity class >> annotation [

<FMClass: #NamedEntity super: #FamixFortran03Entity>
<FMClass: #NamedEntity super: #FamixF03Entity>
<package: #'Famix-Fortran03-Entities'>
<generated>
<abstract>
^ self
]

{ #category : #testing }
FamixFortran03NamedEntity class >> isAbstract [
FamixF03NamedEntity class >> isAbstract [

<generated>
^ self == FamixFortran03NamedEntity
^ self == FamixF03NamedEntity
]
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Class {
#name : #FamixFortran03SourceAnchor,
#superclass : #FamixFortran03Entity,
#name : #FamixF03SourceAnchor,
#superclass : #FamixF03Entity,
#traits : 'FamixTSourceAnchor',
#classTraits : 'FamixTSourceAnchor classTrait',
#category : #'Famix-Fortran03-Entities-Entities'
}

{ #category : #meta }
FamixFortran03SourceAnchor class >> annotation [
FamixF03SourceAnchor class >> annotation [

<FMClass: #SourceAnchor super: #FamixFortran03Entity>
<FMClass: #SourceAnchor super: #FamixF03Entity>
<package: #'Famix-Fortran03-Entities'>
<generated>
<abstract>
^ self
]

{ #category : #testing }
FamixFortran03SourceAnchor class >> isAbstract [
FamixF03SourceAnchor class >> isAbstract [

<generated>
^ self == FamixFortran03SourceAnchor
^ self == FamixF03SourceAnchor
]
16 changes: 16 additions & 0 deletions src/Famix-Fortran03-Entities/FamixF03SourceLanguage.class.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Class {
#name : #FamixF03SourceLanguage,
#superclass : #FamixF03Entity,
#traits : 'FamixTSourceLanguage',
#classTraits : 'FamixTSourceLanguage classTrait',
#category : #'Famix-Fortran03-Entities-Entities'
}

{ #category : #meta }
FamixF03SourceLanguage class >> annotation [

<FMClass: #SourceLanguage super: #FamixF03Entity>
<package: #'Famix-Fortran03-Entities'>
<generated>
^ self
]
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Class {
#name : #FamixFortran03SourceTextAnchor,
#superclass : #FamixFortran03SourceAnchor,
#name : #FamixF03SourceTextAnchor,
#superclass : #FamixF03SourceAnchor,
#traits : 'FamixTHasImmediateSource',
#classTraits : 'FamixTHasImmediateSource classTrait',
#category : #'Famix-Fortran03-Entities-Entities'
}

{ #category : #meta }
FamixFortran03SourceTextAnchor class >> annotation [
FamixF03SourceTextAnchor class >> annotation [

<FMClass: #SourceTextAnchor super: #FamixFortran03SourceAnchor>
<FMClass: #SourceTextAnchor super: #FamixF03SourceAnchor>
<package: #'Famix-Fortran03-Entities'>
<generated>
^ self
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
Class {
#name : #FamixFortran03SourcedEntity,
#superclass : #FamixFortran03Entity,
#name : #FamixF03SourcedEntity,
#superclass : #FamixF03Entity,
#traits : 'FamixTSourceEntity',
#classTraits : 'FamixTSourceEntity classTrait',
#category : #'Famix-Fortran03-Entities-Entities'
}

{ #category : #meta }
FamixFortran03SourcedEntity class >> annotation [
FamixF03SourcedEntity class >> annotation [

<FMClass: #SourcedEntity super: #FamixFortran03Entity>
<FMClass: #SourcedEntity super: #FamixF03Entity>
<package: #'Famix-Fortran03-Entities'>
<generated>
<abstract>
^ self
]

{ #category : #testing }
FamixFortran03SourcedEntity class >> isAbstract [
FamixF03SourcedEntity class >> isAbstract [

<generated>
^ self == FamixFortran03SourcedEntity
^ self == FamixF03SourcedEntity
]
Loading

0 comments on commit e742e3c

Please sign in to comment.