From 9e7c43c08271de15a876969682115480c16fd386 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 24 Sep 2026 19:06:54 +0200 Subject: [PATCH 1/8] =?UTF-8?q?Include=20FAST-Core-Tools=20in=20FAST?= =?UTF-8?q?=E2=80=AFMMs?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ManifestFASTCoreTools.class.st | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/FAST-Core-Tools/ManifestFASTCoreTools.class.st diff --git a/src/FAST-Core-Tools/ManifestFASTCoreTools.class.st b/src/FAST-Core-Tools/ManifestFASTCoreTools.class.st new file mode 100644 index 0000000..fd4c03f --- /dev/null +++ b/src/FAST-Core-Tools/ManifestFASTCoreTools.class.st @@ -0,0 +1,17 @@ +" +Please comment package here +" +Class { + #name : 'ManifestFASTCoreTools', + #superclass : 'PackageManifest', + #category : 'FAST-Core-Tools-Manifest', + #package : 'FAST-Core-Tools', + #tag : 'Manifest' +} + +{ #category : 'asserting' } +ManifestFASTCoreTools class >> shouldBeIncludedByDefaultInMetamodelsWith: aCollectionOfPackages [ + "Includes in MM that are based on FAST" + + ^ aCollectionOfPackages anySatisfy: [ :package | package definedClasses anySatisfy: [ :class | class = FASTTEntity ] ] +] From e6af4eb33d90f2a84ae42a8f71f7f22cb3367ce3 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Thu, 24 Sep 2026 19:13:00 +0200 Subject: [PATCH 2/8] Metadescribe LR --- .../FASTNonLocalDeclaration.class.st | 10 +++++- .../FASTTCanBeLocalDeclaration.extension.st | 35 +++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/FAST-Core-Tools/FASTNonLocalDeclaration.class.st b/src/FAST-Core-Tools/FASTNonLocalDeclaration.class.st index 150d792..4bef983 100644 --- a/src/FAST-Core-Tools/FASTNonLocalDeclaration.class.st +++ b/src/FAST-Core-Tools/FASTNonLocalDeclaration.class.st @@ -3,7 +3,7 @@ A ""null-object"" signaling the declaration of a 'name' was not found " Class { #name : 'FASTNonLocalDeclaration', - #superclass : 'FASTEntity', + #superclass : 'MooseEntity', #traits : 'FASTTCanBeLocalDeclaration', #classTraits : 'FASTTCanBeLocalDeclaration classTrait', #instVars : [ @@ -14,6 +14,14 @@ Class { #tag : 'Resolver' } +{ #category : 'meta' } +FASTNonLocalDeclaration class >> annotation [ + + + + +] + { #category : 'accessing' } FASTNonLocalDeclaration >> activeVersion [ "Used for LocalResolver" diff --git a/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st b/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st index 494014a..707d6a3 100644 --- a/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st +++ b/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st @@ -134,6 +134,41 @@ FASTTCanBeLocalDeclaration >> newVersionNumber [ ifNotNil: [ :active | active version + 1 ] ] +{ #category : '*FAST-Core-Tools' } +FASTTCanBeLocalDeclaration >> rawLocalDeclaration [ + "I am here to meta describe the local declaration without raising an error if the local resolution did not happen" + + + + ^ self attributeAt: #localDeclaration ifAbsent: [ nil ] +] + +{ #category : '*FAST-Core-Tools' } +FASTTCanBeLocalDeclaration >> rawLocalDeclaration: aDeclarationNode [ + "Used for import/export" + + self localDeclaration: aDeclarationNode +] + +{ #category : '*FAST-Core-Tools' } +FASTTCanBeLocalDeclaration >> rawLocalUses [ + "I am here to meta describe the local declaration without raising an error if the local resolution did not happen" + + + + + ^ self attributeAt: #localUses ifAbsent: [ nil ] +] + +{ #category : '*FAST-Core-Tools' } +FASTTCanBeLocalDeclaration >> rawLocalUses: aCollection [ + "Used for import/export" + + self localUses: aCollection +] + { #category : '*FAST-Core-Tools' } FASTTCanBeLocalDeclaration >> ssaName [ "Used for SSA" From 9a9b26122f465b520d44c3f038ceb952303c95c4 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Sat, 26 Sep 2026 13:27:18 +0200 Subject: [PATCH 3/8] Use TNamedEntity in FASTNonLocalDeclaration --- .../FASTNonLocalDeclaration.class.st | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/FAST-Core-Tools/FASTNonLocalDeclaration.class.st b/src/FAST-Core-Tools/FASTNonLocalDeclaration.class.st index 4bef983..14bc918 100644 --- a/src/FAST-Core-Tools/FASTNonLocalDeclaration.class.st +++ b/src/FAST-Core-Tools/FASTNonLocalDeclaration.class.st @@ -4,11 +4,8 @@ A ""null-object"" signaling the declaration of a 'name' was not found Class { #name : 'FASTNonLocalDeclaration', #superclass : 'MooseEntity', - #traits : 'FASTTCanBeLocalDeclaration', - #classTraits : 'FASTTCanBeLocalDeclaration classTrait', - #instVars : [ - 'name' - ], + #traits : 'FASTTCanBeLocalDeclaration + FamixTNamedEntity', + #classTraits : 'FASTTCanBeLocalDeclaration classTrait + FamixTNamedEntity classTrait', #category : 'FAST-Core-Tools-Resolver', #package : 'FAST-Core-Tools', #tag : 'Resolver' @@ -39,15 +36,3 @@ FASTNonLocalDeclaration >> isNonLocalDeclaration [ FASTNonLocalDeclaration >> localDeclarationName [ ^ self localUses anyOne localDeclarationName ] - -{ #category : 'accessing' } -FASTNonLocalDeclaration >> name [ - - ^ name -] - -{ #category : 'accessing' } -FASTNonLocalDeclaration >> name: anObject [ - - name := anObject -] From 54f5dfd9bf44ff392e20a3469ceb1f5664f7e488 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Mon, 28 Sep 2026 14:31:14 +0200 Subject: [PATCH 4/8] Start to metadescribe SSA --- .../FASTAbstractVariableVersionSSA.class.st | 11 ++++++++++- .../FASTVariablePhiVersionSSA.class.st | 8 ++++++++ src/FAST-Core-Tools/FASTVariableVersionSSA.class.st | 10 ++++++++++ 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st b/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st index 2776065..12b9a88 100644 --- a/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st +++ b/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st @@ -1,6 +1,6 @@ Class { #name : 'FASTAbstractVariableVersionSSA', - #superclass : 'Object', + #superclass : 'MooseEntity', #instVars : [ 'localDeclaration' ], @@ -9,6 +9,15 @@ Class { #tag : 'SSA' } +{ #category : 'meta' } +FASTAbstractVariableVersionSSA class >> annotation [ + + + + + +] + { #category : 'instance creation' } FASTAbstractVariableVersionSSA class >> for: aFASTFortranVariable [ diff --git a/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st b/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st index 74f719f..46bd54a 100644 --- a/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st +++ b/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st @@ -9,6 +9,14 @@ Class { #tag : 'SSA' } +{ #category : 'meta' } +FASTVariablePhiVersionSSA class >> annotation [ + + + + +] + { #category : 'adding' } FASTVariablePhiVersionSSA >> addChoiceToPhi: aPhiVersion [ diff --git a/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st b/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st index c27bbda..eb3b5ea 100644 --- a/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st +++ b/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st @@ -9,6 +9,14 @@ Class { #tag : 'SSA' } +{ #category : 'meta' } +FASTVariableVersionSSA class >> annotation [ + + + + +] + { #category : 'adding' } FASTVariableVersionSSA >> addChoiceToPhi: aPhiVersion [ @@ -60,6 +68,8 @@ FASTVariableVersionSSA >> ssaVariables [ { #category : 'accessing' } FASTVariableVersionSSA >> version [ + + ^ version ] From 001ced3d6575334fcd195ff358a6c7e919f7428b Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Mon, 28 Sep 2026 16:24:21 +0200 Subject: [PATCH 5/8] Keep adding metadescriptions to the SSA --- .../FASTAbstractVariableVersionSSA.class.st | 20 ++++++++++++++++++- .../FASTTCanBeLocalDeclaration.extension.st | 3 ++- .../FASTVariablePhiVersionSSA.class.st | 11 +++++++++- .../FASTVariableVersionSSA.class.st | 9 ++++++++- 4 files changed, 39 insertions(+), 4 deletions(-) diff --git a/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st b/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st index 12b9a88..7f074a3 100644 --- a/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st +++ b/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st @@ -1,3 +1,19 @@ +" +I am the abstract representation of a version of a variable in Static Single Assignment form (SSA). A version represents a value assigned exactly once to a variable: each assignment to a variable during the SSA resolution creates a new version. + +I store the local declaration (`localDeclaration`) of the variable this version belongs to, and I provide the common behavior shared by the concrete versions: + +- `localUses` returns the accesses (reads and writes) linked to this version. +- `readAccesses` and `writeAccesses` split those accesses. +- `ssaVariables` returns the plain variable versions I represent: only myself for a `FASTVariableVersionSSA`, all my choices for a `FASTVariablePhiVersionSSA`. +- `name` returns a readable SSA name. + +I have two concrete subclasses: +- `FASTVariableVersionSSA` is a plain version with a version number. +- `FASTVariablePhiVersionSSA` merges several versions at a control-flow join point. + +I require the SSA resolution to have been run on the model before being used. +" Class { #name : 'FASTAbstractVariableVersionSSA', #superclass : 'MooseEntity', @@ -58,7 +74,9 @@ FASTAbstractVariableVersionSSA >> isPhi [ { #category : 'accessing' } FASTAbstractVariableVersionSSA >> localDeclaration [ - ^localDeclaration + + + ^ localDeclaration ] { #category : 'accessing' } diff --git a/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st b/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st index 707d6a3..8878b8a 100644 --- a/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st +++ b/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st @@ -178,8 +178,9 @@ FASTTCanBeLocalDeclaration >> ssaName [ { #category : '*FAST-Core-Tools' } FASTTCanBeLocalDeclaration >> ssaVersion [ - "If I represent a variable and we resolved the SSA of my FAST model, I'll return the SSA version I'm linked to." + + ^ self attributeAt: #ssaVersion ifAbsent: [ nil ] ] diff --git a/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st b/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st index 46bd54a..923b117 100644 --- a/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st +++ b/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st @@ -1,3 +1,12 @@ +" +I am a phi version of a variable, created at a control-flow join point (for example at the end of an if statement or a loop) to merge the versions coming from the different branches. + +I hold the versions I merge (`choices`) and the local declaration (`localDeclaration`) of the variable. + +My name is built from the names of my choices, for example `phi(x_1, x_2)`. + +I require the SSA resolution to have been run on the model before being used. +" Class { #name : 'FASTVariablePhiVersionSSA', #superclass : 'FASTAbstractVariableVersionSSA', @@ -12,7 +21,7 @@ Class { { #category : 'meta' } FASTVariablePhiVersionSSA class >> annotation [ - + ] diff --git a/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st b/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st index eb3b5ea..950452f 100644 --- a/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st +++ b/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st @@ -1,3 +1,10 @@ +" +I am a plain SSA version of a variable, created each time the variable is assigned. I hold the version number (`version`) of the variable and the local declaration (`localDeclaration`) I belong to. + +My name is built from the name of my local declaration and my version number, for example `x_1`. + +I require the SSA resolution to have been run on the model before being used. +" Class { #name : 'FASTVariableVersionSSA', #superclass : 'FASTAbstractVariableVersionSSA', @@ -12,7 +19,7 @@ Class { { #category : 'meta' } FASTVariableVersionSSA class >> annotation [ - + ] From 9374c91f4cc00d9f09bde3cf6b4973535dac5d9b Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Mon, 28 Sep 2026 16:54:06 +0200 Subject: [PATCH 6/8] Finish to metadescribes SSA --- src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st b/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st index 923b117..c67007f 100644 --- a/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st +++ b/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st @@ -35,7 +35,15 @@ FASTVariablePhiVersionSSA >> addChoiceToPhi: aPhiVersion [ { #category : 'accessing' } FASTVariablePhiVersionSSA >> choices [ - ^choices + + + + ^ choices +] + +{ #category : 'accessing' } +FASTVariablePhiVersionSSA >> choices: anObject [ + choices := anObject ] { #category : 'instance creation' } From 22030af5d4fd431b45d3cf80c7c62392771ae0a6 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Tue, 29 Sep 2026 15:12:15 +0200 Subject: [PATCH 7/8] Add bidirectional link between localDeclaration and localUses --- .../FASTLocalResolverScoping.class.st | 3 +- .../FASTTCanBeLocalDeclaration.extension.st | 62 +++++-------------- 2 files changed, 18 insertions(+), 47 deletions(-) diff --git a/src/FAST-Core-Tools/FASTLocalResolverScoping.class.st b/src/FAST-Core-Tools/FASTLocalResolverScoping.class.st index 0bffefd..895ce47 100644 --- a/src/FAST-Core-Tools/FASTLocalResolverScoping.class.st +++ b/src/FAST-Core-Tools/FASTLocalResolverScoping.class.st @@ -19,8 +19,7 @@ Class { { #category : 'api' } FASTLocalResolverScoping >> addUse: referingNode toLocalDeclaration: declarationNode [ - referingNode localDeclaration: declarationNode. - declarationNode addLocalUse: referingNode + referingNode localDeclaration: declarationNode ] { #category : 'api' } diff --git a/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st b/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st index 8878b8a..0835f0e 100644 --- a/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st +++ b/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st @@ -18,7 +18,7 @@ FASTTCanBeLocalDeclaration >> activeVersion: aSSAVersion [ FASTTCanBeLocalDeclaration >> addLocalUse: aFASTNode [ "Used for LocalResolver" - (self attributeAt: #localUses ifAbsent: [ Error signal: 'missing #localUses attribute in ' , self asString ]) add: aFASTNode + self localUses add: aFASTNode ] { #category : '*FAST-Core-Tools' } @@ -69,7 +69,7 @@ FASTTCanBeLocalDeclaration >> assignedExpressionsMap [ FASTTCanBeLocalDeclaration >> clearLocalUses [ "Used for LocalResolver" - self attributeAt: #localUses put: OrderedCollection new + self localUses removeAll ] { #category : '*FAST-Core-Tools' } @@ -83,18 +83,21 @@ FASTTCanBeLocalDeclaration >> hasLocalDeclaration [ FASTTCanBeLocalDeclaration >> localDeclaration [ "Used for LocalResolver" - ^ self localDeclarationIfAbsent: [ - self error: 'Missing #localDeclaration attribute in ' , self asString , '. It can have multiple sources: -- The local resolution was not done (launch the local resolver visitor or the SSA visitor on your top module) -- The entity is not an entity with a definition -- There is a bug in the local resolver' ] + + + ^ self attributeAt: #localDeclaration ifAbsent: [ nil ] ] { #category : '*FAST-Core-Tools' } FASTTCanBeLocalDeclaration >> localDeclaration: aDeclarationNode [ "Used for LocalResolver" - self attributeAt: #localDeclaration put: aDeclarationNode + self attributeAt: #localDeclaration put: (FMMultivalueLink + on: self + update: #localUses + from: (self localDeclarationIfAbsent: [ nil ]) + to: aDeclarationNode) ] { #category : '*FAST-Core-Tools' } @@ -115,14 +118,18 @@ FASTTCanBeLocalDeclaration >> localDeclarationifPresent: aBlock ifAbsent: anothe FASTTCanBeLocalDeclaration >> localUses [ "Used for LocalResolver" - ^ self attributeAt: #localUses ifAbsent: [ Error signal: 'missing #localUses attribute in ' , self asString ] + + + + ^ self attributeAt: #localUses ifAbsentPut: [ FMMultivalueLink on: self opposite: #localDeclaration: ] ] { #category : '*FAST-Core-Tools' } FASTTCanBeLocalDeclaration >> localUses: aCollection [ "Used for LocalResolver" - self attributeAt: #localUses put: aCollection + self localUses value: aCollection ] { #category : '*FAST-Core-Tools' } @@ -134,41 +141,6 @@ FASTTCanBeLocalDeclaration >> newVersionNumber [ ifNotNil: [ :active | active version + 1 ] ] -{ #category : '*FAST-Core-Tools' } -FASTTCanBeLocalDeclaration >> rawLocalDeclaration [ - "I am here to meta describe the local declaration without raising an error if the local resolution did not happen" - - - - ^ self attributeAt: #localDeclaration ifAbsent: [ nil ] -] - -{ #category : '*FAST-Core-Tools' } -FASTTCanBeLocalDeclaration >> rawLocalDeclaration: aDeclarationNode [ - "Used for import/export" - - self localDeclaration: aDeclarationNode -] - -{ #category : '*FAST-Core-Tools' } -FASTTCanBeLocalDeclaration >> rawLocalUses [ - "I am here to meta describe the local declaration without raising an error if the local resolution did not happen" - - - - - ^ self attributeAt: #localUses ifAbsent: [ nil ] -] - -{ #category : '*FAST-Core-Tools' } -FASTTCanBeLocalDeclaration >> rawLocalUses: aCollection [ - "Used for import/export" - - self localUses: aCollection -] - { #category : '*FAST-Core-Tools' } FASTTCanBeLocalDeclaration >> ssaName [ "Used for SSA" From 78b65cabecd23a9b31713f6e071e9d1de1428761 Mon Sep 17 00:00:00 2001 From: CyrilFerlicot Date: Tue, 29 Sep 2026 16:17:04 +0200 Subject: [PATCH 8/8] Make choices and ssaVersion bidirectional --- .../FASTAbstractVariableVersionSSA.class.st | 16 ++++++++++++++++ .../FASTTCanBeLocalDeclaration.extension.st | 8 ++++++-- .../FASTVariablePhiVersionSSA.class.st | 8 +++----- .../FASTVariableVersionSSA.class.st | 16 +++++++++++++++- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st b/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st index 7f074a3..b5ce6fa 100644 --- a/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st +++ b/src/FAST-Core-Tools/FASTAbstractVariableVersionSSA.class.st @@ -102,6 +102,22 @@ FASTAbstractVariableVersionSSA >> name [ ^ self subclassResponsibility ] +{ #category : 'accessing' } +FASTAbstractVariableVersionSSA >> nodes [ + "Used for LocalResolver" + + + + + ^ self attributeAt: #nodes ifAbsentPut: [ FMMultivalueLink on: self opposite: #ssaVersion: ] +] + +{ #category : 'accessing' } +FASTAbstractVariableVersionSSA >> nodes: aCollectionOfFASTNodes [ + + self nodes value: aCollectionOfFASTNodes +] + { #category : 'printing' } FASTAbstractVariableVersionSSA >> printOn: aStream [ "Generate a string representation of the receiver based on its instance variables." diff --git a/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st b/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st index 0835f0e..3c7b5cc 100644 --- a/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st +++ b/src/FAST-Core-Tools/FASTTCanBeLocalDeclaration.extension.st @@ -151,7 +151,7 @@ FASTTCanBeLocalDeclaration >> ssaName [ { #category : '*FAST-Core-Tools' } FASTTCanBeLocalDeclaration >> ssaVersion [ - + ^ self attributeAt: #ssaVersion ifAbsent: [ nil ] ] @@ -160,7 +160,11 @@ FASTTCanBeLocalDeclaration >> ssaVersion [ FASTTCanBeLocalDeclaration >> ssaVersion: aSSAVersion [ "Used for SSA" - self attributeAt: #ssaVersion put: aSSAVersion + self attributeAt: #ssaVersion put: (FMMultivalueLink + on: self + update: #nodes + from: self ssaVersion + to: aSSAVersion) ] { #category : '*FAST-Core-Tools' } diff --git a/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st b/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st index c67007f..e0a3d47 100644 --- a/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st +++ b/src/FAST-Core-Tools/FASTVariablePhiVersionSSA.class.st @@ -11,7 +11,7 @@ Class { #name : 'FASTVariablePhiVersionSSA', #superclass : 'FASTAbstractVariableVersionSSA', #instVars : [ - 'choices' + '#choices => FMMany type: #FASTVariableVersionSSA opposite: #phiVersionContainers' ], #category : 'FAST-Core-Tools-SSA', #package : 'FAST-Core-Tools', @@ -35,15 +35,14 @@ FASTVariablePhiVersionSSA >> addChoiceToPhi: aPhiVersion [ { #category : 'accessing' } FASTVariablePhiVersionSSA >> choices [ - - ^ choices ] { #category : 'accessing' } FASTVariablePhiVersionSSA >> choices: anObject [ - choices := anObject + + choices value: anObject ] { #category : 'instance creation' } @@ -51,7 +50,6 @@ FASTVariablePhiVersionSSA >> for: aCollection [ localDeclaration := aCollection anyOne localDeclaration. - choices := OrderedCollection new. aCollection do: [ :v | v addChoiceToPhi: self ] ] diff --git a/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st b/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st index 950452f..8d8817c 100644 --- a/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st +++ b/src/FAST-Core-Tools/FASTVariableVersionSSA.class.st @@ -9,7 +9,8 @@ Class { #name : 'FASTVariableVersionSSA', #superclass : 'FASTAbstractVariableVersionSSA', #instVars : [ - 'version' + '#version', + '#phiVersionContainers => FMMany type: #FASTVariablePhiVersionSSA opposite: #choices' ], #category : 'FAST-Core-Tools-SSA', #package : 'FAST-Core-Tools', @@ -60,6 +61,19 @@ FASTVariableVersionSSA >> newVersionNumber [ ^ version := version + 1 ] +{ #category : 'accessing' } +FASTVariableVersionSSA >> phiVersionContainers [ + + + ^ phiVersionContainers +] + +{ #category : 'accessing' } +FASTVariableVersionSSA >> phiVersionContainers: aCollection [ + + phiVersionContainers value: aCollection +] + { #category : 'testing' } FASTVariableVersionSSA >> sameVariableAs: otherFASTFortranVariable [