-
Notifications
You must be signed in to change notification settings - Fork 0
/
dump_data.sql
233 lines (198 loc) · 162 KB
/
dump_data.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
--
-- Host: localhost Database: local_visual_builder
-- ------------------------------------------------------
-- Server version 5.7.21-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
--
-- Table structure for table `context`
--
DROP TABLE IF EXISTS `context`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `context` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name_UNIQUE` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=1778 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `context`
--
LOCK TABLES `context` WRITE;
/*!40000 ALTER TABLE `context` DISABLE KEYS */;
INSERT INTO `context` VALUES (1073,'Artifact'),(1077,'Association'),(1209,'BehaviorExecutionSpecification'),(1078,'Class'),(1082,'Classifier'),(1106,'CombinedFragment'),(1083,'Component'),(1175,'Element'),(1210,'ExecutionOccurrenceSpecification'),(1189,'Interaction'),(1211,'InteractionOperand'),(1224,'Interface'),(1223,'InterfaceRealization'),(1226,'Lifeline'),(1240,'Manifestation'),(1242,'Message'),(1208,'MessageOccurrenceSpecification'),(1437,'Node'),(1425,'Operation'),(1546,'Package');
/*!40000 ALTER TABLE `context` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `do`
--
DROP TABLE IF EXISTS `do`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `do` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1523 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `do`
--
LOCK TABLES `do` WRITE;
/*!40000 ALTER TABLE `do` DISABLE KEYS */;
INSERT INTO `do` VALUES (1246,'hasRepresentationOf'),(1247,'getDeploymentNode'),(1248,'getManifestedComponents'),(1249,'getManifestedClassifier'),(1250,'isNetworkLink'),(1251,'moveInterfacesRealizationFrom'),(1252,'getAllUsedIntefacesRequiredsBy'),(1253,'applySessionFacade'),(1254,'createNewClass'),(1255,'getProvidedInterfaces'),(1256,'getInterfaceRealizations'),(1257,'getAllUsedIntefacesProvidedsBy'),(1258,'getUsageRelations'),(1259,'deployOnNewNodes'),(1260,'getNodes'),(1261,'getAllArtifacts'),(1262,'moveOperation'),(1263,'getLifeline'),(1264,'getLifelines'),(1265,'getNearLessUsedNodes'),(1266,'deployOn'),(1267,'redeployOn'),(1268,'getArtifactOn'),(1269,'getDeploymentOn'),(1270,'calculateUtilization'),(1271,'getAllInteractionProperties'),(1272,'createLifelineInto'),(1273,'countRemoteMessages'),(1274,'getRemoteMesIntoInteractions'),(1275,'getInteractions'),(1276,'isRemote'),(1277,'getNodesWithNetworkUsageGreaterThan'),(1278,'countRemoteInstances'),(1279,'getIndexOf'),(1280,'cloneOwnedOperationFrom'),(1281,'moveOperation'),(1282,'cloneInterfaceRealizationFrom'),(1283,'cloneProvidedsFrom'),(1284,'cloneRequiredsFrom'),(1285,'getLifelines'),(1286,'moveInterfaceRealizations'),(1287,'getAllUsedIntefacesProvidedsBy'),(1288,'getAllUsedIntefacesRequiredsBy'),(1289,'getUsageRelations'),(1290,'getAllArtifacts'),(1291,'getAllInteractionProperties'),(1292,'getLifeline'),(1293,'getManifestations'),(1294,'getNodes'),(1295,'moveInterfacesRealizationFrom'),(1296,'getOperations'),(1297,'deployOnNewNodes'),(1298,'getNearLessUsedNodes'),(1299,'deployOnNewNode'),(1300,'deployOn'),(1301,'getNeighbours'),(1302,'redeployOn'),(1303,'getArtifactOn'),(1304,'calculateUtilization'),(1305,'calculateTotalUtilization'),(1306,'addUsages'),(1307,'getDeploymentOn'),(1308,'createLifelineInto'),(1309,'getCriticalOperation'),(1310,'getSendingMessages'),(1311,'getCriticalLifeline4BlobContainerAP'),(1312,'getCriticalLifeline4BlobControllerAP'),(1313,'getNodesWithUtilizationGreaterThan'),(1314,'getNodesWithNetworkUsageGreaterThan'),(1315,'getNodesWithNetworkUsageLesserThan'),(1316,'getOperationsWithResDemandGreaterOrEqual'),(1317,'getOperationsWithCpuResDemandGreaterOrEqual'),(1318,'getOperationsWithDiskResDemandGreaterOrEqual'),(1319,'getOperationsWithResDemandLesserThan'),(1320,'getRequiredInterfaces'),(1321,'getInteractions'),(1322,'isRemote'),(1323,'countRemoteMessages'),(1324,'getRemoteMesIntoInteractions'),(1325,'countRemoteInstances'),(1326,'applySessionFacade_StaticView'),(1327,'applySessionFacade_DeploymentView'),(1328,'applySessionFacade_DynamicView'),(1329,'applySessionFacade'),(1330,'addInterfaceRealization'),(1331,'createNewComponent'),(1332,'applyStandardFormat'),(1333,'getUsedFormat'),(1334,'getTheMostUsedFormat'),(1335,'getMostUsed'),(1336,'reduceNumberOfSupplierConnects'),(1337,'reduceNumberOfClientConnects'),(1338,'createNewInterfaceRealization'),(1339,'createNewOperation'),(1340,'deleteOperation'),(1341,'moveToNewComponentDeployedOnNewNode'),(1342,'moveToNewComponentDeployedOnNearLessUsedNode'),(1343,'redeployOnNearLessUsedNode'),(1344,'moveToLessCriticalComponent'),(1345,'getAverageDemand'),(1346,'getAverageMaxCPUDemand'),(1347,'getAverageMaxDiskDemand'),(1348,'cloneAppliedStereotypesFrom'),(1349,'setAttributeValueFrom'),(1350,'setTaggedValue'),(1351,'hasStereotype'),(1352,'getStereotype'),(1353,'reductionServDemand'),(1354,'getTag'),(1355,'isLegacy'),(1356,'notLegacy'),(1357,'Component'),(1358,'Component'),(1362,'hasOperation'),(1363,'hasComponent'),(1364,'getIndexOf'),(1365,'getIndexOf'),(1366,'addFragmentAt'),(1367,'removeLifelineOf'),(1368,'getClassifierLifeline'),(1369,'getClassLifeline'),(1370,'getUseCase'),(1371,'getOutcomingMessageOf'),(1372,'getIncomingMessageOf'),(1373,'getLifeline'),(1374,'getLifelineOf'),(1375,'getLifelineOf'),(1376,'createLifelineOf'),(1377,'createLoopFragmentAt'),(1378,'createMessage'),(1379,'getInteractionUses'),(1380,'createOperand'),(1381,'getIndexOf'),(1382,'getIndexOf'),(1383,'getIndexOf'),(1384,'getIndexOf'),(1385,'getIndexOf'),(1386,'getIndexOf'),(1387,'getProbabilityOf'),(1388,'getProbabilityOf'),(1389,'getProbabilityOf'),(1390,'getProbabilityOf'),(1391,'getProbabilityOf'),(1392,'getProbabilityOf'),(1393,'createFragment'),(1394,'getOperations'),(1395,'getIndexOf'),(1396,'cloneInterfaceRealization'),(1397,'getRealizedBy'),(1398,'getUsedBy'),(1399,'getIndexReceiveMOS'),(1400,'getBESInitializedBy'),(1401,'removeInteractionFragment'),(1402,'getNextIncomingMessageStartingFrom'),(1403,'getBESStartedBy'),(1404,'removeCovered'),(1405,'removeMsg'),(1406,'getIncomingMessages'),(1407,'getInteractionUses'),(1408,'getInteractions'),(1409,'getOutgoingMessages'),(1410,'getNextIncomingMessage'),(1411,'getNextOutgoingMessage'),(1412,'getBESes'),(1413,'hasUtilizedElement'),(1414,'hasUtilizedElement'),(1415,'getReceiveLifeline'),(1416,'isReturn'),(1417,'notReturn'),(1418,'getUseCase'),(1419,'getBES'),(1420,'getEOS'),(1421,'hasDeployment'),(1422,'getDirectlyLinkedNode'),(1423,'cloneDeployedArtifactFrom'),(1424,'cloneDeployedArtifactFrom'),(1425,'cloneLink'),(1426,'createNewNode'),(1427,'clone'),(1428,'clone'),(1429,'clone'),(1430,'redeployOnNewNode'),(1431,'clone'),(1432,'applyReductionOfUtilizationFrom'),(1433,'getArtifactOf'),(1434,'getUtilization'),(1435,'getMaxCpuUtilization'),(1436,'getMaxDiskUtilization'),(1437,'getNeighboursWithLowUtilization'),(1438,'getNeighboursWithLowCpuUtilization'),(1439,'getNeighboursWithLowDiskUtilization'),(1440,'getLinkedNetworkNode'),(1441,'getArtifact'),(1442,'isNetworkNode'),(1443,'hasNetworklinkWith'),(1444,'isReachableByNetwork'),(1445,'hasLowUtilization'),(1446,'hasLowCpuUtilization'),(1447,'hasLowDiskUtilization'),(1448,'getDeployedComponents'),(1449,'getCriticalDeployedComponent'),(1450,'calculateTotalUtilization'),(1451,'getLessUsedNode'),(1452,'getNetworkUsage'),(1453,'moveToNewComponentDeployedOnNewNode'),(1454,'moveToNewComponentDeployedOnNearLessUsedNode'),(1455,'redeployOnNearLessUsedNode'),(1456,'moveToLessCriticalComponent'),(1457,'resetUtilization'),(1458,'getCpuCriticOperation'),(1459,'getDiskCriticOperation'),(1460,'cloneOperationInto'),(1461,'cloneOwnedParameterFrom'),(1462,'cloneReturnTypeFrom'),(1463,'getProcessNodes'),(1464,'getProcessNodes'),(1465,'getUseCases'),(1466,'splitComponent'),(1467,'splitClass'),(1468,'getAllOwnMessages'),(1469,'getAllInteractions'),(1470,'getMessageIn'),(1471,'getMessagesIn'),(1472,'getUsages'),(1473,'getUsedInterfaces'),(1474,'moveIntoComponent'),(1475,'moveIntoClass'),(1476,'_redeployOnNearLessUsedNode'),(1477,'dynamicFixing'),(1478,'calculateTotalUtilization'),(1479,'moveIntoNewComponent'),(1480,'getOwnerInteractionOperands'),(1481,'splittingComponent'),(1482,'moveToNewNode'),(1483,'moveToNewComponentDeployedOnNewNode'),(1484,'moveToNewOwnerDeployedOnNewNode'),(1485,'moveToNewClassDeployedOnNewNode'),(1486,'moveToNewOwnerDeployedOnNearLessUsedNode'),(1487,'moveToNewClassDeployedOnNearLessUsedNode'),(1488,'getCriticSourceNode'),(1489,'moveToNewComponentDeployedOnNearLessUsedNode'),(1490,'redeployOnNearLessUsedNode'),(1491,'moveToLessCriticalOwner'),(1492,'moveToLessCriticalComponent'),(1493,'moveToLessCriticalClass'),(1494,'getDeployedNodesHwUtilization'),(1495,'decomposition'),(1496,'getOperationWithResDemanLesser'),(1497,'retrieveOperation'),(1498,'getAverageDemand'),(1499,'getCPUDemand'),(1500,'getDiskDemand'),(1501,'getMaxDemands'),(1502,'getUsageRelations'),(1503,'addElement'),(1504,'getManifestations');
/*!40000 ALTER TABLE `do` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `do_context`
--
DROP TABLE IF EXISTS `do_context`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `do_context` (
`do_id` int(11) NOT NULL,
`context_id` int(11) NOT NULL,
`method` varchar(5000) DEFAULT NULL,
PRIMARY KEY (`do_id`,`context_id`),
KEY `context_id` (`context_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `do_context`
--
LOCK TABLES `do_context` WRITE;
/*!40000 ALTER TABLE `do_context` DISABLE KEYS */;
INSERT INTO `do_context` VALUES (1246,1073,'\noperation Artifact hasRepresentationOf(classifier : Classifier) : Boolean\n{\n\n for(manifestation in self.getManifestations())\n {\n\n if( manifestation.getSuppliers() -> exists(sup | sup == classifier) )\n {\n return true;\n }\n }\n return true;\n}'),(1247,1073,'\noperation Artifact getDeploymentNode() : Node\n{\n return Node.allInstances -> selectOne(node : Node | node.getDeployments() -> exists(deploy : Deployment | deploy.getDeployedArtifacts() -> exists(artifact : Artifact | artifact == self)));\n}'),(1248,1073,'\noperation Artifact getManifestedComponents() : Sequence(Component)\n{\n var manifestations = self.getManifestations();\n var returnValue : Sequence(Component);\n\n for(man in manifestations)\n {\n\n if( man.getUtilizedElement().isTypeOf(Component) )\n {\n returnValue.add(man.getUtilizedElement());\n }\n }\n return returnValue;\n}'),(1249,1073,'\noperation Artifact getManifestedClassifier() : Sequence(Classifier)\n{\n return self.getManifestations() -> select(man : Manifestation | man.getUtilizedElement().isTypeOf(Classifier));\n}'),(1250,1077,'\noperation Association isNetworkLink() : Boolean\n{\n return self.hasStereotype(\"GaCommChannel\");\n}'),(1251,1078,'\noperation Class moveInterfacesRealizationFrom(class : Class, op : Operation)\n{\n var listOfUsedProvidedInterfaces : List(Interface) = class.getInterfaceRealizations().asSequence();\n\n for(intRealization in listOfUsedProvidedInterfaces)\n {\n self.createInterfaceRealization(intRealization.name, intRealization.getContract());\n }\n}'),(1252,1078,'\noperation Class getAllUsedIntefacesRequiredsBy(op : Operation) : List(Interface)\n{\n var returnValue : List(Interface) = new List(Interface);\n var listOfUsage = self.getUsageRelations();\n var listOfRequireds = self.getRequireds();\n\n for(reqInterface in listOfRequireds)\n {\n\n for(usage in self.getNearestPackage().getUsageRelations())\n {\n }\n }\n return returnValue;\n}'),(1253,1078,'\noperation Class applySessionFacade() : Boolean\n{\n var mapIntMes = self.getRemoteMesIntoInteractions();\n var mapRemCompFacade : Map(Class, List(Class)) = new Map(Class, List(Class));\n \"**********APPLY SessionFacade****************\".println();\n\n for(int in mapIntMes.keySet())\n {\n\n for(mes in mapIntMes.get(int))\n {\n\n if( mes.hasStereotype(\"GaCommStep\") )\n {\n var op = mes.getSignature();\n var class = op.getClass_();\n\n if( mapRemCompFacade.keySet().isEmpty() or not mapRemCompFacade.containsKey(class) )\n {\n var listOfClass : Sequence(Class) = new Sequence(Class);\n var localFacade : Class = self.createNewClass();\n localFacade.setName(\"LocalFacadeWith_\"+class.getName());\n var remoteFacade : Class = class.createNewClass();\n remoteFacade.setName(\"RemoteFacadeWith_\"+self.getName());\n var parameterNames : List(String) = new List(String);\n var parameterTypes : List(Type) = new List(Type);\n var opF_LF = localFacade.createOwnedOperation(\"opFacade\", parameterNames, parameterTypes);\n var opF_RF = remoteFacade.createOwnedOperation(\"opFacade\", parameterNames, parameterTypes);\n var op_Class = class.getOwnedOperations();\n\n for(op in op_Class)\n {\n localFacade.createOwnedOperation(op.getName(), op.getOwnedParameters(), op.getOwnedTypes());\n }\n var opRemoteFacadeInterface : Interface = new Interface;\n remoteFacade.getNearestPackage().addElement(opRemoteFacadeInterface);\n remoteFacade.getProvideds().add(opRemoteFacadeInterface);\n opRemoteFacadeInterface.setName(\"opFacade_Interface\");\n localFacade.getRequireds().add(opRemoteFacadeInterface);\n localFacade.getProvideds().add(opRemoteFacadeInterface);\n listOfClass.add(localFacade);\n listOfClass.add(remoteFacade);\n\n for(node in self.getNodes())\n {\n localFacade.deployOn(node);\n }\n\n for(node in class.getNodes())\n {\n remoteFacade.deployOn(node);\n }\n var localFacadeLf = int.createLifelineOf(localFacade);\n var remoteFacadeLf = int.createLifelineOf(remoteFacade);\n listOfClass.add(localFacadeLf);\n listOfClass.add(remoteFacadeLf);\n mapRemCompFacade.put(class, listOfClass);\n }\n var localFacade = mapRemCompFacade.get(class).first();\n var remoteFacade = mapRemCompFacade.get(class).second();\n var listOfUsedInterface = op.getUsedInterfaces();\n\n for(interface in listOfUsedInterface)\n {\n (\"interfaccia: \"+interface).println();\n localFacade.allRealizedInterfaces().add(interface);\n remoteFacade.getAllUsedInterfaces().add(interface);\n }\n var localFacadeLf = mapRemCompFacade.get(class).third();\n var remoteFacadeLf = mapRemCompFacade.get(class).fourth();\n var besLf : BehaviorExecutionSpecification = new BehaviorExecutionSpecification;\n int.getFragments().add(besLf);\n besLf.setName(\"BesLifeline\");\n var messageEnd : ExecutionOccurrenceSpecification = new ExecutionOccurrenceSpecification;\n int.getFragments().add(messageEnd);\n messageEnd.setName(mes.getName()+\"_End\");\n var mesSelf2Lf = int.createMessage(mes.getName());\n var sendMOS : MessageOccurrenceSpecification = new MessageOccurrenceSpecification;\n var receiveMOS : MessageOccurrenceSpecification = new MessageOccurrenceSpecification;\n int.getFragments().add(sendMOS);\n int.getFragments().add(receiveMOS);\n mesSelf2Lf.setSendEvent(sendMOS);\n mesSelf2Lf.setReceiveEvent(receiveMOS);\n besLf.start = mesSelf2Lf.getSendEvent();\n besLf.finish = messageEnd;\n localFacadeLf.getCoveredBys().add(besLf);\n localFacadeLf.getCoveredBys().add(mesSelf2Lf.getReceiveEvent());\n int.getComponentLifeline(self).getCoveredBys().add(mesSelf2Lf.getSendEvent());\n remoteFacadeLf.getCoveredBys().add(mes.getSendEvent());\n int.getComponentLifeline(self).removeInteractionFragment(mes.getSendEvent());\n }\n }\n }\n \"**********APPLY SessionFacade****************\".println();\n return false;\n}'),(1254,1078,'\noperation Class createNewClass() : Class\n{\n var selfPackage = self.getNearestPackage();\n var class : Class = new Class;\n selfPackage.addElement(class);\n return class;\n}'),(1255,1082,'\noperation Classifier getProvidedInterfaces() : Sequence(InterfaceRealization)\n{\n return self.getInterfaceRealizations() -> collect(cd | cd.supplier->first())->asSequence();\n}'),(1256,1083,'\noperation Component getInterfaceRealizations() : Sequence(InterfaceRealization)\n{\n return self.clientDependency -> select(cd | cd.isTypeOf(InterfaceRealization))->asSequence();\n}'),(1257,1082,'\noperation Classifier getAllUsedIntefacesProvidedsBy(op : Operation) : List(Interface)\n{\n var returnValue : List(Interface) = new List(Interface);\n var listOfUsage = op.getNearestPackage().getUsageRelations();\n\n for(proInterface in self.getProvidedInterfaces())\n {\n\n for(usage in listOfUsage)\n {\n\n if( usage.supplier->first() == op )\n {\n\n for(iOp in proInterface.getOwnedOperations())\n {\n\n if( usage.client->first() == iOp )\n {\n returnValue.add(proInterface);\n break;\n }\n }\n }\n }\n }\n\n for(proInterface in returnValue)\n {\n\n for(usage in listOfUsage)\n {\n\n if( usage.supplier->first() <> self and usage.client->first == proInterface )\n {\n returnValue.remove(proInterface);\n }\n }\n }\n return returnValue;\n}'),(1258,1082,'\noperation Classifier getUsageRelations() : List(Usage)\n{\n var returnValue : List(Usage) = new List(Usage);\n\n for(relation in Usage.allInstances)\n {\n\n if( relation.isTypeOf(Usage) and relation.owner == self )\n {\n returnValue.add(relation);\n }\n }\n return returnValue;\n}'),(1259,1082,'\noperation Classifier deployOnNewNodes(classfier : Classifier)\n{\n var listOfNode : List(Node) = classfier.getNodes();\n\n for(node in listOfNode)\n {\n var newNode = node.clone(self);\n }\n}'),(1260,1082,'\noperation Classifier getNodes() : List(Node)\n{\n var returnValue : List(Node) = new List(Node);\n\n for(artifact in self.getAllArtifacts())\n {\n\n for(node in Node.allInstances)\n {\n\n if( node.hasDeployment(artifact) )\n {\n returnValue.add(node);\n }\n }\n }\n return returnValue;\n}'),(1261,1082,'\noperation Classifier getAllArtifacts() : Sequence(Artifact)\n{\n var returnValue : Sequence(Artifact) = new Sequence(Artifact);\n\n for(manifestation in Manifestation.allInstances)\n {\n\n if( manifestation.hasUtilizedElement(self) )\n {\n returnValue.addAll(manifestation.getClients());\n }\n }\n return returnValue;\n}'),(1262,1082,'\noperation Classifier moveOperation(op : Operation) : Boolean\n{\n\n if( self.ownedOperation.add(op) )\n {\n return true;\n }\n return false;\n}'),(1263,1082,'\noperation Classifier getLifeline(interaction : Interaction) : Lifeline\n{\n\n for(lf in interaction.getLifelines())\n {\n\n if( lf.getRepresents().type == self )\n {\n return lf;\n }\n }\n}'),(1264,1082,'\noperation Classifier getLifelines() : List(Lifeline)\n{\n var returnValue : List(Lifeline) = new List(Lifeline);\n\n for(lifeline in Lifeline.allInstances)\n {\n\n if( lifeline.getInteraction().isDefined() and lifeline.getRepresents().getType() == self )\n {\n returnValue.add(lifeline);\n }\n }\n return returnValue;\n}'),(1265,1082,'\noperation Classifier getNearLessUsedNodes() : List(Node)\n{\n var listOfNode = self.getNodes();\n var listOfNearLessUsed : List(Node) = new List(Node);\n\n for(node in listOfNode)\n {\n var listOfNearNode = node.getDirectlyLinkedNode();\n var lessNode : Node = listOfNode->first();\n var utilization = lessNode.getValue(lessNode.getStereotype(\"GaExecHost\"), \"utilization\")->first();\n\n if( utilization.isUndefined() )\n utilization = 0.0;\n var i : Integer = 0;\n\n for(nearNode in listOfNearNode)\n {\n var stereotype = listOfNode->first().getStereotype(\"GaExecHost\");\n\n if( nearNode.hasStereotype(\"GaExecHost\") )\n {\n var nearNodeUtilization = nearNode.getValue(stereotype, \"utilization\")->first();\n\n if( nearNodeUtilization.isDefined() and nearNodeUtilization.asReal() < utilization )\n {\n lessNode = nearNode;\n utilization = nearNodeUtilization;\n }\n }\n i = i+1;\n }\n listOfNearLessUsed.add(lessNode);\n }\n return listOfNearLessUsed;\n}'),(1266,1082,'\noperation Classifier deployOn(node : Node)\n{\n var newArtifact : Artifact = new Artifact;\n var newManifestation;\n var newDeployment;\n node.getNearestPackage().addElement(newArtifact);\n newArtifact.name = self.name;\n newManifestation = newArtifact.createManifestation(self.name, self);\n newDeployment = node.createDeployment(newArtifact.name);\n newDeployment.getDeployedArtifacts().add(newArtifact);\n}'),(1267,1082,'\noperation Classifier redeployOn(node : Node, from : Node)\n{\n var artifact = self.getArtifactOn(from);\n var deployment = self.getDeploymentOn(from, artifact);\n node.getDeployments().add(deployment);\n}'),(1268,1082,'\noperation Classifier getArtifactOn(node : Node) : Artifact\n{\n var deploymentNode : Node;\n\n for(art in self.getAllArtifacts())\n {\n deploymentNode = art.getDeploymentNode();\n\n if( deploymentNode.isDefined() and deploymentNode == node )\n {\n return art;\n }\n }\n return null;\n}'),(1269,1082,'\noperation Classifier getDeploymentOn(node : Node, art : Artifact) : Deployment\n{\n var returnValue = Deployment.allInstances -> selectOne(deployment : Deployment | deployment.client -> exists(targetNode : Node | targetNode == node) and deployment.supplier -> exists(deployedArtifact : Artifact | deployedArtifact == art));\n return returnValue;\n}'),(1270,1078,'\noperation Class calculateUtilization() : Sequence(Real)\n{\n var ownOperations = self.getOperations();\n var utilization : Sequence(Real) = new Sequence(Real);\n var computationUtilization : Real = 0.0;\n var storageUtilization : Real = 0.0;\n var bandwidthUtilization : Real = 0.0;\n\n for(op in ownOperations)\n {\n\n if( op.hasStereotype(\"GaStep\") and op.getValue(op.getStereotype(\"GaStep\"), \"servCount\").isDefined() )\n {\n var sCount = op.getValue(op.getStereotype(\"GaStep\"), \"servCount\");\n\n if( not sCount.isEmpty() )\n {\n computationUtilization = computationUtilization+sCount.at(0).asReal();\n storageUtilization = storageUtilization+sCount.at(1).asReal();\n bandwidthUtilization = bandwidthUtilization+sCount.at(2).asReal();\n }\n }\n }\n utilization.add(0, computationUtilization);\n utilization.add(1, storageUtilization);\n utilization.add(2, bandwidthUtilization);\n return utilization;\n}'),(1271,1082,'\noperation Classifier getAllInteractionProperties() : List(Property)\n{\n var returnValue : List(Lifeline) = new List(Lifelinei);\n\n for(interaction in Interaction.allInstances)\n {\n\n for(prop in interaction.ownedAttribute)\n {\n\n if( prop.getType() == self )\n {\n returnValue.add(prop);\n }\n }\n }\n return returnValue;\n}'),(1272,1082,'\noperation Classifier createLifelineInto(interaction : Interaction) : Lifeline\n{\n var lifeline = interaction.createLifeline(self.name+\"lifeline\");\n var spProp = interaction.createOwnedAttribute(self.name, self);\n lifeline.setRepresents(spProp);\n return lifeline;\n}'),(1273,1082,'\noperation Classifier countRemoteMessages(th_maxRemMsgs : Integer) : Boolean\n{\n var map = self.getRemoteMesIntoInteractions();\n\n for(ks in map.keySet())\n {\n\n if( map.get(ks).size() >= th_maxRemMsgs )\n return true;\n }\n return false;\n}'),(1274,1082,'\noperation Classifier getRemoteMesIntoInteractions() : Map\n{\n var returnMap : Map(Interaction, Sequence(Message)) = new Map(Interaction, Sequence(Message));\n var seqMes : Sequence(Message) = new Sequence(Message);\n var selfInteractions = self.getInteractions();\n\n for(int in selfInteractions)\n {\n var seqOfMes = int.getMessageOf(self);\n\n for(mes in seqOfMes)\n {\n\n if( not mes.isReturn() )\n {\n var lf = mes.getReceiveLifeline();\n var classifier = lf.getRepresents().getType();\n\n if( classifier.isKindOf(Classifier) and classifier.isRemote(self) )\n {\n seqMes.add(mes);\n }\n }\n }\n\n if( not seqMes.isEmpty() )\n {\n returnMap.put(int, seqMes.clone());\n seqMes.clear();\n }\n }\n return returnMap;\n}'),(1275,1082,'\noperation Classifier getInteractions() : Sequence(Interaction)\n{\n var returnValue : Sequence(Interaction) = new Sequence(Interaction);\n\n for(lf in self.getLifelines())\n {\n returnValue.add(lf.getInteraction());\n }\n return returnValue;\n}'),(1276,1082,'\noperation Classifier isRemote(classifier : Classifier) : Boolean\n{\n\n for(node in self.getNodes())\n {\n\n for(n in classifier.getNodes())\n {\n\n if( n.isReachableByNetwork() and node.isReachableByNetwork() and n <> node )\n {\n return true;\n }\n }\n }\n return false;\n}'),(1277,1082,'\noperation Classifier getNodesWithNetworkUsageGreaterThan(th_maxNetUtil : Real) : Sequence(Node)\n{\n var returnValue : Sequence(Node) = new Sequence(Node);\n\n for(node in self.getNodes())\n {\n var commPaths = node.getNetworkUsage().keySet();\n\n for(cp in commPaths)\n {\n\n if( node.getNetworkUsage().get(cp) -> exists(iterator | iterator.asReal() >= th_maxNetUtil) )\n returnValue.add(node);\n }\n }\n return returnValue;\n}'),(1278,1082,'\noperation Classifier countRemoteInstances(th_maxRemInst : Integer) : Boolean\n{\n var map = self.getRemoteMesIntoInteractions();\n var seqLf : Sequence(Lifeline) = new Sequence(Lifeline);\n\n for(ks in map.keySet())\n {\n\n for(mes in map.get(ks))\n {\n\n if( not mes.isReturn() and mes.getReceiveLifeline().isDefined() and not seqLf.contains(mes.getReceiveLifeline()) )\n {\n seqLf.add(mes.getReceiveLifeline());\n }\n }\n\n if( seqLf.size() >= th_maxRemInst )\n {\n return true;\n }\n seqLf.clear();\n }\n return false;\n}'),(1279,1106,'\noperation CombinedFragment getIndexOf(fragment : InteractionFragment, indexOf) : Integer\n{\n indexOf = indexOf+self.getOwner().getIndexOf(self, indexOf);\n\n if( debug() )\n {\n (\"indexOf [\"+self.getName()+\"] --> \"+indexOf).println();\n }\n return indexOf;\n}'),(1280,1083,'\noperation Component cloneOwnedOperationFrom(componentSource : Component)\n{\n\n for(op in componentSource.ownedOperation)\n {\n op.cloneOperationInto(self);\n }\n}'),(1281,1083,'\noperation Component moveOperation(op : Operation) : Boolean\n{\n\n if( self.ownedOperation.add(op) )\n {\n return true;\n }\n return false;\n}'),(1282,1083,'\noperation Component cloneInterfaceRealizationFrom(component : Component)\n{\n\n for(realization in component.interfaceRealization)\n {\n self.interfaceRealization.add(realization.cloneInterfaceRealization());\n }\n}'),(1283,1083,'\noperation Component cloneProvidedsFrom(component : Component)\n{\n\n for(providedInterface in component.getProvideds())\n {\n self.getProvideds().add(providedInterface);\n }\n}'),(1284,1083,'\noperation Component cloneRequiredsFrom(component : Component)\n{\n\n for(requiredInterface in component.getRequireds())\n {\n self.getRequireds().add(requiredInterface);\n }\n}'),(1285,1083,'\noperation Component getLifelines() : List(Lifeline)\n{\n var returnValue : List(Lifeline) = new List(Lifeline);\n\n for(lifeline in Lifeline.allInstances)\n {\n\n if( lifeline.getInteraction().isDefined() and lifeline.getRepresents().getType() == self )\n {\n returnValue.add(lifeline);\n }\n }\n return returnValue;\n}'),(1286,1083,'\noperation Component moveInterfaceRealizations(interfaceRealization : InterfaceRealization)\n{\n self.interfaceRealization.add(interfaceRealization);\n}'),(1287,1083,'\noperation Component getAllUsedIntefacesProvidedsBy(op : Operation) : List(Interface)\n{\n var returnValue : List(Interface) = new List(Interface);\n var listOfUsage = Usage.AllInstances -> select(iterator | iterator.client->first().isTypeOf(Operation));\n\n for(proInterface in self.getProvidedInterfaces())\n {\n\n for(usage in listOfUsage)\n {\n\n if( usage.client->first() == op and usage.supplier->first() == proInterface )\n {\n returnValue.add(proInterface);\n }\n }\n }\n return returnValue;\n}'),(1288,1083,'\noperation Component getAllUsedIntefacesRequiredsBy(op : Operation) : List(Interface)\n{\n var returnValue : List(Interface) = new List(Interface);\n var listOfUsage = self.getUsageRelations();\n var listOfRequireds = self.getRequireds();\n\n for(reqInterface in listOfRequireds)\n {\n\n for(usage in self.getNearestPackage().getUsageRelations())\n {\n }\n }\n return returnValue;\n}'),(1289,1083,'\noperation Component getUsageRelations() : List(Usage)\n{\n var returnValue : List(Usage) = new List(Usage);\n\n for(relation in Usage.allInstances)\n {\n\n if( relation.isTypeOf(Usage) and relation.owner == self )\n {\n returnValue.add(relation);\n }\n }\n return returnValue;\n}'),(1290,1083,'\noperation Component getAllArtifacts() : Sequence(Artifact)\n{\n var returnValue : Sequence(Artifact) = new Sequence(Artifact);\n\n for(manifestation in Manifestation.allInstances)\n {\n\n if( manifestation.hasUtilizedElement(self) )\n {\n returnValue.addAll(manifestation.client);\n }\n }\n return returnValue;\n}'),(1291,1083,'\noperation Component getAllInteractionProperties() : List(Property)\n{\n var returnValue : List(Lifeline) = new List(Lifelinei);\n\n for(interaction in Interaction.allInstances)\n {\n\n for(prop in interaction.ownedAttribute)\n {\n\n if( prop.getType() == self )\n {\n returnValue.add(prop);\n }\n }\n }\n return returnValue;\n}'),(1292,1083,'\noperation Component getLifeline(interaction : Interaction) : Lifeline\n{\n\n for(lf in Lifeline.allInstances)\n {\n\n if( lf.getOwner() == interaction )\n {\n\n if( lf.getRepresents().getType() == self )\n {\n return lf;\n }\n }\n }\n return null;\n}'),(1293,1083,'\noperation Component getManifestations() : List(Manifestation)\n{\n var returnValue : List(Manifestation) = new List(Manifestation);\n\n for(manifestation in Manifestation.allInstances)\n {\n\n if( manifestation.getUtilizedElement == self )\n {\n returnValue.add(manifestation);\n }\n }\n return returnValue;\n}'),(1294,1083,'\noperation Component getNodes() : List(Node)\n{\n var returnValue : List(Node) = new List(Node);\n\n for(artifact in self.getAllArtifacts())\n {\n\n for(node in Node.allInstances)\n {\n\n if( node.hasDeployment(artifact) and node.notLegacy() )\n {\n returnValue.add(node);\n }\n }\n }\n return returnValue;\n}'),(1295,1083,'\noperation Component moveInterfacesRealizationFrom(component : Component, op : Operation)\n{\n var listOfUsedProvidedInterfaces = component.getAllUsedIntefacesProvidedsBy(op);\n var selfComponentListOfInterfaceRealizations = component.getInterfaceRealizations();\n\n if( debug() )\n {\n (\"listOfUsedProvidedInterfaces --> \"+listOfUsedProvidedInterfaces).println();\n (\"selfComponentListOfInterfaceRealizations --> \"+selfComponentListOfInterfaceRealizations).println();\n }\n\n for(intRealization in selfComponentListOfInterfaceRealizations)\n {\n\n for(interface in listOfUsedProvidedInterfaces)\n {\n\n if( interface == intRealization.getContract() )\n {\n self.moveInterfaceRealizations(intRealization);\n }\n }\n }\n}'),(1296,1083,'\noperation Component getOperations() : Sequence(Operation)\n{\n return self.getOwnedOperations().asSequence();\n}'),(1297,1083,'\noperation Component deployOnNewNodes(component : Component)\n{\n var listOfNode : List(Node) = component.getNodes();\n var newNode = listOfNode->first().createNewNode();\n (\"new node --> \"+newNode.getName());\n\n for(node in listOfNode)\n {\n newNode.clone(node);\n }\n self.deployOn(newNode);\n}'),(1298,1083,'\noperation Component getNearLessUsedNodes() : List(Node)\n{\n var listOfNode = self.getNodes();\n var listOfNearLessUsed : List(Node) = new List(Node);\n\n for(node in listOfNode)\n {\n var listOfNearNode = node.getDirectlyLinkedNode();\n var lessNode : Node = listOfNode->first();\n var utilization = lessNode.getTag(\"GaExecHost\", \"utilization\")->first().asReal();\n\n for(nearNode in listOfNearNode)\n {\n\n if( nearNode.hasStereotype(\"GaExecHost\") and nearNode.notLegacy() )\n {\n var nearNodeUtilization = nearNode.getTag(\"GaExecHost\", \"utilization\")->first();\n\n if( nearNodeUtilization.isDefined() and nearNodeUtilization.asReal() < utilization )\n {\n lessNode = nearNode;\n utilization = nearNodeUtilization.asReal();\n }\n }\n }\n listOfNearLessUsed.add(lessNode);\n }\n return listOfNearLessUsed;\n}'),(1299,1083,'\noperation Component deployOnNewNode() : Boolean\n{\n var listOfSelfNodes : List(Node) = self.getNodes();\n\n if( listOfSelfNodes.isUndefined() or listOfSelfNodes.isEmpty() )\n {\n showError(\"Method: deployOnNewNode() in component.eol\");\n return false;\n }\n var newNode = listOfSelfNodes->first().createNewNode();\n self.deployOn(newNode);\n return true;\n}'),(1300,1083,'\noperation Component deployOn(node : Node)\n{\n var newArtifact : Artifact = new Artifact;\n var newManifestation;\n var newDeployment;\n node.getNearestPackage().addElement(newArtifact);\n newArtifact.name = self.name;\n newManifestation = newArtifact.createManifestation(self.name, self);\n newManifestation.getClients().add(newArtifact);\n newDeployment = node.createDeployment(newArtifact.name);\n newDeployment.getDeployedArtifacts().add(newArtifact);\n}'),(1301,1083,'\noperation Component getNeighbours() : List(Node)\n{\n var listOfNode : List(Node) = new List(Node);\n\n for(node in self.getNodes())\n {\n var nodeOwnedLink = node.getDirectlyLinkedNode();\n\n if( nodeOwnedLink.isDefined() and nodeOwnedLink.size() > 0 )\n {\n listOfNode.addAll(nodeOwnedLink);\n }\n }\n return listOfNode;\n}'),(1302,1083,'\noperation Component redeployOn(node : Node, from : Node)\n{\n var artifact = self.getArtifactOn(from);\n var deployment = self.getDeploymentOn(from, artifact);\n node.getDeployments().add(deployment);\n}'),(1303,1083,'\noperation Component getArtifactOn(node : Node) : Artifact\n{\n var deploymentNode : Node;\n\n for(art in self.getAllArtifacts())\n {\n deploymentNode = art.getDeploymentNode();\n\n if( deploymentNode.isDefined() and deploymentNode == node )\n {\n return art;\n }\n }\n return null;\n}'),(1304,1083,'\noperation Component calculateUtilization() : Sequence(Real)\n{\n var ownOperations = self.getOperations() -> select(iterator | iterator.hasStereotype(\"GaStep\"));\n var utilization : Sequence(Real) = new Sequence(Real);\n var servCountSize : Integer = ownOperations->first().getValue(ownOperations->first().getStereotype(\"GaStep\"), \"servCount\").size();\n\n for(op in ownOperations)\n {\n\n if( op.hasStereotype(\"GaStep\") and op.getValue(op.getStereotype(\"GaStep\"), \"servCount\").isDefined() )\n {\n var sCount = op.getValue(op.getStereotype(\"GaStep\"), \"servCount\");\n\n for(sc in sCount)\n {\n utilization.add(0.0);\n }\n\n if( sCount.notEmpty() )\n {\n var i : Integer = 0;\n\n for(sc in sCount)\n {\n utilization.add(utilization.at(i).asReal()+sCount.at(i).asReal());\n utilization.removeAt(i);\n i = i+1;\n }\n }\n }\n }\n return (utilization / servCountSize);\n}'),(1305,1083,'\noperation Component calculateTotalUtilization() : Real\n{\n var totUtilization : Real = 0.0;\n var utilizations = self.calculateUtilization();\n\n for(utl in utilizations)\n {\n totUtilization = totUtilization+utl.asReal();\n }\n return totUtilization;\n}'),(1306,1083,'\noperation Component addUsages(usages : Sequence(Usage))\n{\n\n for(usage in usages)\n {\n\n if( usage.isTypeOf(InterfaceRealization) )\n {\n self.moveInterfaceRealizations(usage);\n }\n }\n}'),(1307,1083,'\noperation Component getDeploymentOn(node : Node, art : Artifact) : Deployment\n{\n var returnValue = Deployment.allInstances -> selectOne(deployment : Deployment | deployment.client -> exists(targetNode : Node | targetNode == node) and deployment.supplier -> exists(deployedArtifact : Artifact | deployedArtifact == art));\n return returnValue;\n}'),(1308,1083,'\noperation Component createLifelineInto(interaction : Interaction) : Lifeline\n{\n var lifeline = interaction.createLifeline(self.name+\"lifeline\");\n var spProp = interaction.createOwnedAttribute(self.name, self);\n lifeline.setRepresents(spProp);\n return lifeline;\n}'),(1309,1083,'\noperation Component getCriticalOperation() : Operation\n{\n var operations = self.getOwnedOperations() -> select(iterator | iterator.hasStereotype(\"GaStep\"));\n var criticalOperation : Operation;\n var utilization : Real;\n\n if( operations.isUndefined() or operations.isEmpty() )\n {\n showError(\"Method: getCriticalOperations() in component.eol\");\n return null;\n }\n criticalOperation = operations->first();\n var averageDemand = criticalOperation.getAverageDemand();\n utilization = criticalOperation.calculateTotalUtilization();\n\n for(op in operations)\n {\n\n if( averageDemand < op.getAverageDemand() )\n {\n averageDemand = op.getAverageDemand();\n criticalOperation = op;\n }\n }\n return criticalOperation;\n}'),(1310,1083,'\noperation Component getSendingMessages() : Integer\n{\n var lifelines = self.getLifelines();\n\n for(lf in lifelines)\n {\n var outgoingMessages = lf.getOutgoingMessages();\n }\n}'),(1311,1083,'\noperation Component getCriticalLifeline4BlobContainerAP(th_numReceivedMsgs : List(Real)) : Map\n{\n var returnValue : Map(Interaction, Lifeline) = new Map;\n var lifelines = self.getLifelines();\n\n for(lf in lifelines)\n {\n var mapOfInteracationAndIncomingMsgs = lf.getIncomingMessages();\n var incomingMsgsProbability : Real = 0.0;\n\n if( debug() )\n {\n (\"number of incomingMsgs of [\"+lf.getName()+\"] in [\"+lf.getInteraction().getName()+\"] --> \"+incomingMsgs).println();\n }\n\n for(int in mapOfInteracationAndIncomingMsgs.keySet())\n {\n\n for(mes in mapOfInteracationAndIncomingMsgs.get(int))\n {\n\n if( debug() )\n {\n\n if( mes.getSignature().isDefined() )\n (\"mes [\"+mes.getSignature().getName()+\"] of [\"+lf.getName()+\"] in [\"+lf.getInteraction().getName()+\"]\").println();\n }\n incomingMsgsProbability = incomingMsgsProbability+mes.getReceiveEvent().getProbabilityOf();\n }\n\n switch (int.getName())\n {\n\n case \"Access greenhouse\" :\n {\n\n if( incomingMsgsProbability >= th_numReceivedMsgs->first() )\n returnValue.put(int, lf);\n }\n case \"Change settings sequence\" :\n {\n\n if( incomingMsgsProbability >= th_numReceivedMsgs->second() )\n returnValue.put(int, lf);\n }\n default :\n {\n showError(\"Method: getCriticalLifeline4BlobContainerAP in component.eol\");\n }\n\n }\n }\n\n if( debug() )\n {\n (\"incomingMsgsProbability of [\"+lf+\"] in [\"+lf.getInteraction().getName()+\"] --> \"+incomingMsgsProbability).println();\n }\n }\n return returnValue;\n}'),(1312,1083,'\noperation Component getCriticalLifeline4BlobControllerAP(th_numSentMsgs : List(Real)) : Map\n{\n var returnValue : Map(Interaction, Lifeline) = new Map;\n var lifelines = self.getLifelines();\n\n for(lf in lifelines)\n {\n var mapOfInteracationAndOutgoingMsgs = lf.getOutgoingMessages();\n var outgoingMsgsProbability : Real = 0.0;\n\n if( debug() )\n {\n (\"number of outgoing messages of [\"+lf.getName()+\"] in [\"+lf.getInteraction().getName()+\"] --> \"+incomingMsgs).println();\n }\n\n for(int in mapOfInteracationAndOutgoingMsgs.keySet())\n {\n\n for(mes in mapOfInteracationAndOutgoingMsgs.get(int))\n {\n\n if( debug() )\n {\n\n if( mes.getSignature().isDefined() )\n (\"mes [\"+mes.getSignature().getName()+\"] of [\"+lf.getName()+\"] in [\"+lf.getInteraction().getName()+\"]\").println();\n }\n outgoingMsgsProbability = outgoingMsgsProbability+mes.getReceiveEvent().getProbabilityOf();\n }\n\n switch (int.getName())\n {\n\n case \"Access greenhouse\" :\n {\n\n if( outgoingMsgsProbability >= th_numSentMsgs->first() )\n returnValue.put(int, lf);\n }\n case \"Change settings sequence\" :\n {\n\n if( outgoingMsgsProbability >= th_numSentMsgs->second() )\n returnValue.put(int, lf);\n }\n default :\n {\n showError(\"Method: getCriticalLifeline4BlobContainerAP in component.eol\");\n }\n\n }\n }\n\n if( debug() )\n {\n (\"incomingMsgsProbability of [\"+lf+\"] in [\"+lf.getInteraction().getName()+\"] --> \"+incomingMsgsProbability).println();\n }\n }\n return returnValue;\n}'),(1313,1083,'\noperation Component getNodesWithUtilizationGreaterThan(th_maxHwUtil : Real) : Sequence(Node)\n{\n return self.getNodes() -> select(n : Node | n.getUtilization() >= th_maxHwUtil);\n}'),(1314,1083,'\noperation Component getNodesWithNetworkUsageGreaterThan(th_maxNetUtil : Real) : Sequence(Node)\n{\n var returnValue : Sequence(Node) = new Sequence(Node);\n\n for(node in self.getNodes())\n {\n var commPaths = node.getNetworkUsage().keySet();\n\n for(cp in commPaths)\n {\n\n if( node.getNetworkUsage().get(cp) -> exists(iterator | iterator.asReal() >= th_maxNetUtil) )\n returnValue.add(node);\n }\n }\n return returnValue;\n}'),(1315,1083,'\noperation Component getNodesWithNetworkUsageLesserThan(th_minNetUtil : Real) : Sequence(Node)\n{\n var returnValue : Sequence(Node) = new Sequence(Node);\n\n for(node in self.getNodes())\n {\n\n if( not node.getNetworkUsage().isEmpty() )\n {\n var commPaths = node.getNetworkUsage().keySet();\n\n for(cp in commPaths)\n {\n\n if( node.getNetworkUsage().get(cp) -> exists(iterator | iterator.asReal() < th_minNetUtil) )\n {\n returnValue.add(node);\n }\n }\n }\n }\n return returnValue;\n}'),(1316,1083,'\noperation Component getOperationsWithResDemandGreaterOrEqual(th_maxResDemand : List(Real)) : List(Operation)\n{\n var listOfOperations = self.getOperations();\n var returnValue : List(Operation) = new List(Operation);\n\n for(op in listOfOperations)\n {\n\n if( op.hasStereotype(\"GaStep\") )\n {\n\n if( op.F_resDemandGreaterOrEqualThan(th_maxResDemand) )\n {\n returnValue.add(op);\n }\n }\n }\n return returnValue;\n}'),(1317,1083,'\noperation Component getOperationsWithCpuResDemandGreaterOrEqual(th_maxResDemand : List(Real)) : List(Operation)\n{\n var listOfOperations = self.getOperations();\n var returnValue : List(Operation) = new List(Operation);\n\n for(op in listOfOperations)\n {\n\n if( op.hasStereotype(\"GaStep\") )\n {\n\n if( debug() )\n {\n (\"operation [\"+op.getName()+\"] with GaStep\").println();\n }\n\n if( op.F_resDemandCpuGreaterOrEqualThan(th_maxResDemand->first()) )\n {\n\n if( debug() )\n {\n (\"adding operation in returnValue\").println();\n (\"operation of [\"+self.getName()+\"] --> \"+op).println();\n }\n returnValue.add(op);\n }\n }\n }\n\n if( returnValue.isUndefined() or returnValue.isEmpty() )\n {\n showError(\"the component [\"+self.getName()+\"] has not critical operation with respect to CPU demand\");\n showError(\"Method: getOperationsWithCpuResDemandGreaterOrEqual() in component.eol\");\n }\n\n if( debug() )\n {\n (\"returnValue of [\"+self.getName()+\"] --> \"+returnValue).println();\n (\"listOfOperations of [\"+self.getName()+\"] --> \"+listOfOperations).println();\n }\n return returnValue -> sortBy(iterator | iterator.getAverageDemand());\n}'),(1318,1083,'\noperation Component getOperationsWithDiskResDemandGreaterOrEqual(th_maxResDemand : List(Real)) : List(Operation)\n{\n var listOfOperations = self.getOperations();\n var returnValue : List(Operation) = new List(Operation);\n\n for(op in listOfOperations)\n {\n\n if( op.hasStereotype(\"GaStep\") )\n {\n\n if( op.F_resDemandDiskGreaterOrEqualThan(th_maxResDemand->second()) )\n {\n returnValue.add(op);\n }\n }\n }\n\n if( returnValue.isUndefined() or returnValue.isEmpty() )\n {\n showError(\"the component [\"+self.getName()+\"] has not critical operation with respect to CPU demand\");\n showError(\"Method: getOperationsWithCpuResDemandGreaterOrEqual() in component.eol\");\n }\n return returnValue -> sortBy(iterator | iterator.getAverageDemand());\n}'),(1319,1083,'\noperation Component getOperationsWithResDemandLesserThan(th_minResDemand : List(Real)) : List(Operation)\n{\n var listOfOperations = self.getOperations();\n var returnValue : List(Operation) = new List(Operation);\n\n for(op in listOfOperations)\n {\n\n if( op.hasStereotype(\"GaStep\") )\n {\n\n if( op.F_resDemandLesserThan(th_minResDemand) )\n {\n returnValue.add(op);\n }\n }\n }\n return returnValue;\n}'),(1320,1083,'\noperation Component getRequiredInterfaces() : Sequence(Interface)\n{\n return self.getRequireds().asSequence();\n}'),(1321,1083,'\noperation Component getInteractions() : Sequence(Interaction)\n{\n var returnValue : Sequence(Interaction) = new Sequence(Interaction);\n\n for(lf in self.getLifelines())\n {\n returnValue.add(lf.getInteraction());\n }\n return returnValue;\n}'),(1322,1083,'\noperation Component isRemote(component : Component) : Boolean\n{\n\n for(node in self.getNodes())\n {\n\n for(n in component.getNodes())\n {\n\n if( node.hasNetworklinkWith(n) )\n {\n return true;\n }\n\n if( n.isReachableByNetwork() and node.isReachableByNetwork() and n <> node )\n {\n return true;\n }\n }\n }\n return false;\n}'),(1323,1083,'\noperation Component countRemoteMessages(th_maxRemMsgs : Real) : Boolean\n{\n var map = self.getRemoteMesIntoInteractions();\n\n if( map.isUndefined() )\n {\n showError(\"Method: countRemoteMessages() in component.eol\");\n return false;\n }\n var totalNumberOfSentMessages : Real = 0.0;\n\n for(ks in map.keySet())\n {\n\n for(m in map.get(ks))\n {\n\n for(k in m.keySet())\n {\n totalNumberOfSentMessages = totalNumberOfSentMessages+m.get(k).size().asReal();\n\n if( m.get(k).size().asReal() >= th_maxRemMsgs )\n {\n return true;\n }\n }\n }\n\n if( totalNumberOfSentMessages >= th_maxRemMsgs )\n {\n return true;\n }\n }\n return false;\n}'),(1324,1083,'\noperation Component getRemoteMesIntoInteractions() : Map\n{\n var returnMap : Map(Interaction, Sequence(Map)) = new Map(Interaction, Sequence(Map));\n var seqMaps : Sequence(Map) = new Sequence(Map);\n var seqMes : Sequence(Message) = new Sequence(Message);\n var mapComponentMessages : Map(Component, Sequence(Message)) = new Map(Component, Sequence(Message));\n var selfInteractions = self.getInteractions();\n var recipient : Component;\n\n for(int in selfInteractions)\n {\n var seqOfMes = int.getOutcomingMessageOf(self);\n\n if( seqOfMes->first().isDefined() )\n {\n recipient = seqOfMes->first().getSignature().getClass_();\n }\n\n for(mes in seqOfMes)\n {\n\n if( not mes.isReturn() and mes.hasStereotype(\"GaCommStep\") )\n {\n var lf = mes.getReceiveLifeline();\n var component = lf.getRepresents().getType();\n\n if( component.isTypeOf(Component) and component.isRemote(self) )\n {\n\n if( recipient.isUndefined() or recipient == component )\n {\n seqMes.add(mes);\n }\n else\n\n if( recipient <> component )\n {\n mapComponentMessages.put(recipient, seqMes.clone());\n seqMaps.add(mapComponentMessages.clone());\n seqMes.clear();\n seqMes.add(mes);\n mapComponentMessages.clear();\n recipient == component;\n }\n }\n }\n }\n\n if( seqMes.notEmpty() )\n {\n mapComponentMessages.put(recipient, seqMes.clone());\n seqMaps.add(mapComponentMessages.clone());\n seqMes.clear();\n mapComponentMessages.clear();\n }\n\n if( seqMaps.notEmpty() )\n {\n returnMap.put(int, seqMaps.clone());\n seqMaps.clear();\n }\n }\n return returnMap;\n}'),(1325,1083,'\noperation Component countRemoteInstances(th_maxRemInst : Integer) : Boolean\n{\n var map = self.getRemoteMesIntoInteractions();\n var seqLf : Sequence(Lifeline) = new Sequence(Lifeline);\n\n for(keySet in map.keySet())\n {\n var seqOfMaps = map.get(keySet);\n\n for(seqOfMap in seqOfMaps)\n {\n var seqComponents = seqOfMap.keySet();\n\n for(comp in seqComponents)\n {\n\n for(seqMsgs in seqOfMap.get(comp))\n {\n\n for(mes in seqMsgs)\n {\n\n if( not mes.isReturn() and mes.getReceiveLifeline().isDefined() and not seqLf.contains(mes.getReceiveLifeline()) )\n {\n seqLf.add(mes.getReceiveLifeline());\n }\n }\n }\n }\n }\n\n if( seqLf.size() >= th_maxRemInst )\n {\n return true;\n }\n seqLf.clear();\n }\n return false;\n}'),(1326,1083,'\noperation Component applySessionFacade_StaticView(remoteComp : Component, seqOfMes : Sequence(Message)) : Sequence(Component)\n{\n var twoFacades : Sequence(Component) = new Sequence;\n var opRemoteFacadeInterface : Interface = new Interface;\n self.getNearestPackage().addElement(opRemoteFacadeInterface);\n var ownedOperation_opFacade : Operation = opRemoteFacadeInterface.createOwnedOperation(\"opFacade\", null, null);\n opRemoteFacadeInterface.setName(\"opFacade_Interface\");\n var localFacade : Component = self.createNewComponent();\n var remoteFacade : Component = remoteComp.createNewComponent();\n localFacade.setName(\"LocalFacadeWith_\"+remoteComp.getName());\n remoteFacade.setName(\"RemoteFacadeWith_\"+self.getName());\n localFacade.createInterfaceRealization(\"opFacade_Interface_Realization\", opRemoteFacadeInterface);\n remoteFacade.createInterfaceRealization(\"opFacade_Interface_Realization\", opRemoteFacadeInterface);\n localFacade.createUsage(opRemoteFacadeInterface);\n remoteFacade.createUsage(opRemoteFacadeInterface);\n\n for(mes in seqOfMes)\n {\n var signature = mes.getSignature();\n var usedInterface = signature.getUsedInterfaces()->first();\n localFacade.createInterfaceRealization(\"usedInterface_Realization_\"+usedInterface.getName(), usedInterface);\n remoteFacade.createUsage(usedInterface);\n }\n twoFacades.add(localFacade);\n twoFacades.add(remoteFacade);\n twoFacades.add(ownedOperation_opFacade);\n return twoFacades;\n}'),(1327,1083,'\noperation Component applySessionFacade_DeploymentView(comp : Component, localFacade : Component, remoteFacade : Component)\n{\n\n for(node in self.getNodes())\n {\n localFacade.deployOn(node);\n }\n\n for(node in comp.getNodes())\n {\n remoteFacade.deployOn(node);\n }\n}'),(1328,1083,'\noperation Component applySessionFacade_DynamicView(remoteComp : Component, localFacade : Component, remoteFacade : Component, seqOfMes : Sequence(Message), opFacade : Operation)\n{\n var interaction = seqOfMes->first().getInteraction();\n var remoteFacadeLf = interaction.createLifelineOf(remoteFacade);\n var localFacadeLf = interaction.createLifelineOf(localFacade);\n var remoteCompLf = interaction.getLifelineOf(remoteComp);\n\n for(mes in seqOfMes)\n {\n var receiveEvent = mes.getReceiveEvent();\n var bes_event = mes.getBES();\n var eos_event = bes_event.getFinish();\n localFacadeLf.getCoveredBys().add(receiveEvent);\n localFacadeLf.getCoveredBys().add(bes_event);\n localFacadeLf.getCoveredBys().add(eos_event);\n remoteCompLf.removeInteractionFragment(receiveEvent);\n remoteCompLf.removeInteractionFragment(bes_event);\n remoteCompLf.removeInteractionFragment(eos_event);\n }\n var indexOfLastMes = interaction.getIndexOf(seqOfMes.last().getReceiveEvent());\n var opFacadeMes = interaction.createMessage(\"opFacadeMessage\");\n opFacadeMes.setSignature(opFacade);\n var opFacadeMes_sendMOS : MessageOccurrenceSpecification = new MessageOccurrenceSpecification;\n interaction.addFragmentAt(opFacadeMes_sendMOS, indexOfLastMes+1);\n opFacadeMes_sendMOS.setName(opFacadeMes.getName()+\"_sendMOS\");\n opFacadeMes_sendMOS.setMessage(opFacadeMes);\n var opFacadeMes_receiveMOS : MessageOccurrenceSpecification = new MessageOccurrenceSpecification;\n interaction.addFragmentAt(opFacadeMes_receiveMOS, indexOfLastMes+2);\n opFacadeMes_receiveMOS.setName(opFacadeMes.getName()+\"_receiveMOS\");\n opFacadeMes_receiveMOS.setMessage(opFacadeMes);\n opFacadeMes.setSendEvent(opFacadeMes_sendMOS);\n opFacadeMes.setReceiveEvent(opFacadeMes_receiveMOS);\n var besLf : BehaviorExecutionSpecification = new BehaviorExecutionSpecification;\n besLf.setName(opFacadeMes.getName()+\"_bes\");\n interaction.addFragmentAt(besLf, indexOfLastMes+3);\n var messageEnd : ExecutionOccurrenceSpecification = new ExecutionOccurrenceSpecification;\n messageEnd.setName(opFacadeMes.getName()+\"_eos\");\n messageEnd.setExecution(besLf);\n interaction.addFragmentAt(messageEnd, indexOfLastMes+4);\n besLf.start = opFacadeMes.getSendEvent();\n besLf.finish = messageEnd;\n remoteFacadeLf.getCoveredBys().add(besLf);\n remoteFacadeLf.getCoveredBys().add(opFacadeMes.getReceiveEvent());\n remoteFacadeLf.getCoveredBys().add(messageEnd);\n localFacadeLf.getCoveredBys().add(opFacadeMes.getSendEvent());\n\n for(mes in seqOfMes)\n {\n var newMes = interaction.createMessage(remoteFacadeLf, remoteCompLf, mes.getSignature());\n }\n}'),(1329,1083,'\noperation Component applySessionFacade() : Boolean\n{\n\n if( self.notLegacy() )\n {\n var mapIntSeqComp = self.getRemoteMesIntoInteractions();\n var mapRemCompFacade : Map(Component, List(Component)) = new Map(Component, List(Component));\n var listOfComponent : Sequence(Component) = new Sequence(Component);\n\n for(int in mapIntSeqComp.keySet())\n {\n var seqMapOfCompMsgs = mapIntSeqComp.get(int);\n\n for(map in seqMapOfCompMsgs)\n {\n\n for(remoteComp in map.keySet())\n {\n var seqOfMes = map.get(remoteComp);\n\n if( seqOfMes.size() >= th_maxRemMsgs() )\n {\n listOfComponent.addAll(self.applySessionFacade_StaticView(remoteComp, seqOfMes));\n var localFacade = listOfComponent.first();\n var remoteFacade = listOfComponent.second();\n self.applySessionFacade_DeploymentView(remoteComp, localFacade, remoteFacade);\n self.applySessionFacade_DynamicView(remoteComp, localFacade, remoteFacade, seqOfMes, listOfComponent->third());\n }\n }\n }\n }\n return true;\n }\n return false;\n}'),(1330,1083,'\noperation Component addInterfaceRealization(int : InterfaceRealization) : Boolean\n{\n var selfPackage = self.getNearestPackage();\n var newInt : InterfaceRealization = int.cloneInterfaceRealization();\n selfPackage.addElement(newInt);\n\n if( self.getInterfaceRealization().add(newInt) )\n return true;\n return false;\n}'),(1331,1083,'\noperation Component createNewComponent() : Component\n{\n var selfPackage = self.getNearestPackage();\n var component : Component = new Component;\n selfPackage.addElement(component);\n return component;\n}'),(1332,1083,'\noperation Component applyStandardFormat() : Boolean\n{\n var mostUsedFormat = self.getTheMostUsedFormat();\n\n for(int in mostUsedFormat.keySet())\n {\n var stdFormat = mostUsedFormat.get(int).keySet()->first();\n var messagesOfComponent = int.getLifelineOf(self).getIncomingMessages();\n\n for(mes in messagesOfComponent)\n {\n\n if( mes.hasStereotype(\"GaEventTrace\") and mes.getValue(mes.getStereotype(\"GaEventTrace\"), \"format\").isDefined() )\n mes.setValue(mes.getStereotype(\"GaEventTrace\"), \"format\", stdFormat.asString());\n }\n }\n return false;\n}'),(1333,1083,'\noperation Component getUsedFormat() : Any\n{\n var listOfInteraction = self.getInteractions();\n var mapFormatTypeUsage : Map(String, Integer) = new Map(String, Integer);\n var mapUsedFormat : Map(Interaction, Map);\n\n for(int in listOfInteraction)\n {\n var selfLf : Lifeline = int.getLifelineOf(self);\n var listOfMes = selfLf.getIncomingMessages();\n\n for(mes in listOfMes)\n {\n\n if( mes.hasStereotype(\"GaEventTrace\") and mes.getValue(mes.getStereotype(\"GaEventTrace\"), \"format\").isDefined() )\n {\n\n if( mapFormatTypeUsage.isEmpty() or not mapFormatTypeUsage.containsKey(mes.getValue(mes.getStereotype(\"GaEventTrace\"), \"format\")) )\n {\n mapFormatTypeUsage.put(mes.getValue(mes.getStereotype(\"GaEventTrace\"), \"format\"), 1);\n }\n else\n\n if( mapFormatTypeUsage.containsKey(mes.getValue(mes.getStereotype(\"GaEventTrace\"), \"format\")) )\n {\n var count = mapFormatTypeUsage.get(mes.getValue(mes.getStereotype(\"GaEventTrace\"), \"format\")).asInteger()+1;\n mapFormatTypeUsage.put(mes.getValue(mes.getStereotype(\"GaEventTrace\"), \"format\"), count);\n }\n }\n }\n\n if( not mapFormatTypeUsage.isEmpty() )\n mapUsedFormat.put(int, mapFormatTypeUsage);\n }\n return mapUsedFormat;\n}'),(1334,1083,'\noperation Component getTheMostUsedFormat() : Any\n{\n var listOfInteraction = self.getInteractions();\n var mapMostUsedFormat : Map(Interaction, Map);\n\n for(int in self.getUsedFormat().keySet())\n {\n mapMostUsedFormat.put(int, self.getUsedFormat().get(int).getMostUsed());\n }\n return mapMostUsedFormat;\n}'),(1335,1083,'\noperation Component getMostUsed() : Map\n{\n var max = 0;\n var mapFormat : Map(String, Integer);\n var maxFormat : String;\n\n for(format in self.keySet())\n {\n\n if( self.get(format).asInteger() > max )\n {\n max = self.get(format).asInteger();\n maxFormat = format;\n }\n }\n mapFormat.put(maxFormat, max);\n return mapFormat;\n}'),(1336,1083,'\noperation Component reduceNumberOfSupplierConnects(th_maxConnects : Real) : Boolean\n{\n (\"reduce number of Supplier connects of --> \"+self.getName()).println();\n var listOfOperations = self.getOperations();\n var listOfInterfaces = self.getProvideds();\n var count = self.getProvideds().size();\n var i : Integer = 0;\n\n while( count >= th_maxConnects )\n {\n var usedInt = listOfInterfaces->at(i);\n var value = usedInt.getUsedBy();\n value.println();\n\n if( value.notEmpty() )\n {\n value->first().createInterfaceRealization(usedInt.getName(), usedInt);\n var intReal = InterfaceRealization.allInstances -> selectOne(ir | ir.getSuppliers() -> exists(sup | sup == usedInt) and ir.getClients() -> exists(cli | cli == self));\n intReal.destroy();\n var usage = Usage.allInstances -> selectOne(usg | usg.getSuppliers() -> exists(sup | sup == usedInt) and usg.getClients() -> exists(cli | cli == value->first()));\n\n if( usedInt.getRealizedBy()->isEmpty() )\n return null;\n var op = usedInt.getRealizedBy()->first();\n var interactions = op.getAllInteractions() -> select(int | int.hasComponent(self) and int.hasComponent(value->first()));\n\n for(int in interactions)\n {\n var msgs = int.getIncomingMessageOf(self) -> select(m | op.getMessagesIn(int) -> exists(mes | mes == m));\n\n for(msg in msgs)\n {\n var mosSend = msg.getSendEvent();\n var mosReceive = msg.getReceiveEvent();\n var bes = msg.getBES();\n var eos = msg.getEOS();\n var selfLifeline = int.getLifelineOf(self);\n var senderLifeline = mosSend.getCovereds()->first();\n senderLifeline.getCoveredBys().add(mosReceive);\n senderLifeline.getCoveredBys().add(bes);\n senderLifeline.getCoveredBys().add(eos);\n selfLifeline.removeMsg(msg);\n }\n }\n value->first().moveOperation(op);\n }\n i = i+1;\n count = count-1;\n }\n}'),(1337,1083,'\noperation Component reduceNumberOfClientConnects(th_maxConnects : Real) : Boolean\n{\n (\"reduce number of clients connects of --> \"+self.getName()).println();\n var listOfUsedInterfaces = self.getRequireds();\n var count = self.getRequireds().size();\n var i : Integer = 0;\n\n while( count.asReal() >= th_maxConnects )\n {\n var usedInt = listOfUsedInterfaces->at(i);\n var value = usedInt.getRealizedBy();\n\n if( value.notEmpty() )\n {\n self.createInterfaceRealization(usedInt.getName(), usedInt);\n var intReal = InterfaceRealization.allInstances -> selectOne(ir | ir.getSuppliers() -> exists(sup | sup == usedInt) and ir.getClients() -> exists(cli | cli == value->first().getClass_()));\n intReal.destroy();\n var usage = Usage.allInstances -> selectOne(usg | usg.getSuppliers() -> exists(sup | sup == usedInt) and usg.getClients() -> exists(cli | cli == self));\n usage.destroy();\n var op = value->first();\n var interactions = op.getAllInteractions() -> select(int | int.hasComponent(self) and int.hasComponent(op.getClass_()));\n\n for(int in interactions)\n {\n var msgs = int.getOutcomingMessageOf(self) -> select(m | op.getMessagesIn(int) -> exists(mes | mes == m));\n\n for(msg in msgs)\n {\n var mosReceive = msg.getReceiveEvent();\n var bes = msg.getBES();\n var eos = msg.getEOS();\n var selfLifeline = int.getLifelineOf(self);\n var recipientLifeline = int.getLifelineOf(op.getClass_());\n selfLifeline.getCoveredBys().add(mosReceive);\n selfLifeline.getCoveredBys().add(bes);\n selfLifeline.getCoveredBys().add(eos);\n recipientLifeline.removeMsg(msg);\n }\n }\n self.moveOperation(op);\n }\n i = i+1;\n count = count-1;\n }\n}'),(1338,1083,'\noperation Component createNewInterfaceRealization() : InterfaceRealization\n{\n var newInt : InterfaceRealization = new InterfaceRealization;\n var selfPackage = self.getNearestPackage();\n selfPackage.addElement(newInt);\n self.getInterfaceRealizations().add(newInt);\n return newInt;\n}'),(1339,1083,'\noperation Component createNewOperation(op : Operation) : Operation\n{\n var newOperation = self.createOwnedOperation(\"operation_decomposition\", null, null);\n var interface_op_new = self.createInterfaceRealization(\"Interface_for_\"+newOperation.getName(), null);\n newOperation.cloneAppliedStereotypesFrom(op);\n newOperation.cloneReturnTypeFrom(op);\n return newOperation;\n}'),(1340,1083,'\noperation Component deleteOperation(op : Operation) : Boolean\n{\n\n if( not self.getOperations() -> exists(o | o == op) )\n {\n showError(\"Method: deleteOperation(Operation) in component.eol\");\n return false;\n }\n op.destroy();\n return true;\n}'),(1341,1083,'\noperation Component() : moveToNewComponentDeployedOnNewNode\n{\n var criticalOperation = self.getCriticalOperation();\n\n if( debug() )\n {\n (\"critical operation --> \"+criticalOperation.getName()).println();\n (\"interfaceRealization used by [\"+criticalOperation.getName()+\"] --> \"+self.getAllUsedIntefacesProvidedsBy(criticalOperation)).println();\n }\n\n if( self.isLegacy() )\n {\n showError(\"the component [\"+self.getName()+\"] has legacy constraints\");\n }\n else\n {\n criticalOperation.moveToNewComponentDeployedOnNewNode();\n }\n}'),(1342,1083,'\noperation Component moveToNewComponentDeployedOnNearLessUsedNode() : Boolean\n{\n\n if( self.getCriticalOperation().isUndefined() )\n {\n showError(\"the component [\"+self.getName()+\"] has not critical operation\");\n showError(\"Method: moveToNewComponentDeployedOnNearLessUsedNode() in component.eol\");\n return false;\n }\n\n if( self.isLegacy() )\n {\n showError(\"the component [\"+self.getName()+\"] has legacy constraints\");\n return false;\n }\n else\n {\n return self.getCriticalOperation().moveToNewComponentDeployedOnNearLessUsedNode();\n }\n}'),(1343,1083,'\noperation Component() : redeployOnNearLessUsedNode\n{\n var lessUsedNode = self.getNearLessUsedNodes()->first();\n\n if( debug() )\n {\n (\"less used node --> \"+lessUsedNode.getName()).println();\n }\n\n if( self.getNodes()->first().isUndefined() )\n {\n showError(\"Method: redeployOnNearLessUsedNode() in component.eol\");\n }\n self.redeployOn(lessUsedNode, self.getNodes()->first());\n}'),(1344,1083,'\noperation Component() : moveToLessCriticalComponent\n{\n self.getCriticalOperation().moveToLessCriticalComponent();\n}'),(1345,1083,'\noperation Component getAverageDemand() : Real\n{\n var operations = self.getOperations() -> select(iterator | iterator.hasStereotype(\"GaStep\"));\n var avgDemand : Real = 0.0;\n\n for(op in operations)\n {\n avgDemand = avgDemand+op.getAverageDemand();\n }\n return avgDemand;\n}'),(1346,1083,'\noperation Component getAverageMaxCPUDemand() : Real\n{\n var operations = self.getOperations() -> select(iterator | iterator.hasStereotype(\"GaStep\"));\n var avgDemand : Real = 0.0;\n\n for(op in operations)\n {\n avgDemand = avgDemand+op.getCPUDemand();\n }\n\n if( operations.size() > 0.0 )\n return (avgDemand / operations.size());\n return avgDemand;\n}'),(1347,1083,'\noperation Component getAverageMaxDiskDemand() : Real\n{\n var operations = self.getOperations() -> select(iterator | iterator.hasStereotype(\"GaStep\"));\n var avgDemand : Real = 0.0;\n\n for(op in operations)\n {\n avgDemand = avgDemand+op.getDiskDemand();\n }\n\n if( operations.size() > 0.0 )\n return (avgDemand / operations.size());\n return avgDemand;\n}'),(1348,1175,'\noperation Element cloneAppliedStereotypesFrom(element : Element)\n{\n\n if( element.isUndefined() or element.getAppliedStereotypes().isUndefined() )\n {\n (\"the element is undefined\").println();\n showError(\"Method: cloneAppliedStereotypesFrom() in element.eol\");\n }\n else\n {\n\n for(stereotype in element.getAppliedStereotypes())\n {\n self.applyStereotype(stereotype);\n\n if( stereotype.name <> \"RtUnit\" and stereotype.name <> \"GaExecHost\" )\n self.setAttributeValueFrom(stereotype, element);\n }\n }\n}'),(1349,1175,'\noperation Element setAttributeValueFrom(stereotype : Stereotype, element : Element)\n{\n var stereotypeAttr = stereotype.getAttributes();\n\n for(attr in stereotypeAttr)\n {\n\n if( attr.name <> \"base_Element\" and attr.name <> \"base_NamedElement\" )\n {\n var attrValue = element.getValue(stereotype, attr.name);\n\n if( attrValue.isDefined() )\n {\n self.setValue(stereotype, attr.name, attrValue);\n }\n }\n }\n}'),(1350,1175,'\noperation Element setTaggedValue(stereotype : Stereotype, tag : String, value : Any)\n{\n var stereotypeAttr = stereotype.getAttributes();\n\n for(attr in stereotypeAttr)\n {\n\n if( attr.name <> \"base_Element\" and attr.name <> \"base_NamedElement\" and attr.name == tag )\n {\n var attrValue = self.getValue(stereotype, tag);\n\n if( attrValue.isDefined() )\n {\n self.setValue(stereotype, attr.name, attrValue);\n }\n }\n }\n}'),(1351,1175,'\noperation Element hasStereotype(stereotypeName : String) : Boolean\n{\n\n if( self.isUndefined() or self.getAppliedStereotypes().isUndefined() )\n {\n (\"the element is undefined\").println();\n showError(\"Method: hasStereotype() in element.eol\");\n }\n return self.getAppliedStereotypes() -> exists(s | s.name == stereotypeName);\n}'),(1352,1175,'\noperation Element getStereotype(stereotypeName : String) : Stereotype\n{\n\n if( self.isUndefined() or self.getAppliedStereotypes().isUndefined() )\n {\n (\"the element is undefined\").println();\n showError(\"Method: getStereotype() in element.eol\");\n }\n return self.getAppliedStereotypes() -> select(s | s.name == stereotypeName)->first();\n}'),(1353,1175,'\noperation Element reductionServDemand(percentage : Real)\n{\n\n if( self.hasStereotype(\"GaStep\") )\n {\n var stereotype = self.getStereotype(\"GaStep\");\n var newValue : Sequence(String) = new Sequence(String);\n var servCountValues = self.getValue(stereotype, \"servCount\");\n\n for(sC in servCountValues)\n {\n var value = sC.asReal();\n newValue.add((value-(value * percentage / 100)).asString());\n }\n self.setValue(stereotype, \"servCount\", newValue);\n }\n}'),(1354,1175,'\noperation Element getTag(stereotype : String, tag : String) : Any\n{\n\n if( not self.hasStereotype(stereotype) )\n return null;\n return self.getValue(self.getStereotype(stereotype), tag);\n}'),(1355,1175,'\noperation Element isLegacy() : Boolean\n{\n\n if( self.hasStereotype(\"Allocated\") )\n {\n return true;\n }\n return false;\n}'),(1356,1175,'\noperation Element notLegacy() : Boolean\n{\n return not self.isLegacy();\n}'),(1357,1184,'\noperation getSystemCriticalComponent() : Component\n{\n var components = Component.allInstances -> select(iterator | iterator.hasStereotype(\"PaRunTInstance\"));\n return components . sortBy(c : Component | c.getAverageDemand())->last();\n}'),(1358,1185,'\noperation getLessUsedComponent() : Component\n{\n var listOfSystemComponent = Component.allInstances -> select(iterator | iterator.hasStereotype(\"PaRunTInstance\") and iterator.notLegacy());\n var lessUsedComp = listOfSystemComponent -> selectOne(iterator | iterator.getAverageDemand() > 0.0);\n var lessUsedDemand = lessUsedComp.getAverageDemand();\n\n for(comp in listOfSystemComponent)\n {\n\n if( comp.getAverageDemand() <> 0.0 and comp.getAverageDemand() < lessUsedDemand )\n {\n lessUsedDemand = comp.getAverageDemand();\n lessUsedComp = comp;\n }\n }\n return lessUsedComp;\n}'),(1362,1189,'\noperation Interaction hasOperation(op : Operation) : Boolean\n{\n\n for(message in self.message)\n {\n\n if( message.signature == op )\n {\n return true;\n }\n }\n return false;\n}'),(1363,1189,'\noperation Interaction hasComponent(component : Component) : Boolean\n{\n\n for(property in self.ownedAttribute)\n {\n\n if( property.type == component )\n {\n return true;\n }\n }\n return false;\n}'),(1364,1189,'\noperation Interaction getIndexOf(fragment : InteractionFragment, indexOf) : Integer\n{\n return self.getFragments()->indexOf(fragment);\n}'),(1365,1189,'\noperation Interaction getIndexOf(op : Operation) : List(Integer)\n{\n var returnValue : List(Integer) = new List(Integer);\n\n for(mes in self.getMessages())\n {\n\n if( mes.getSignature() == op )\n {\n returnValue.add(self.getIndexOf(mes.getSendEvent()));\n }\n }\n return returnValue;\n}'),(1366,1189,'\noperation Interaction addFragmentAt(fragment : InteractionFragment, indexOf : Integer)\n{\n self.getFragments().add(indexOf, fragment);\n}'),(1367,1189,'\noperation Interaction removeLifelineOf(component : Component)\n{\n self.getLifelines().remove(component.getLifeline(self));\n}'),(1368,1189,'\noperation Interaction getClassifierLifeline(classifier : Classifier) : Lifeline\n{\n var lifelines = Lifeline.allInstances -> select(lf | lf.getInteraction() == self);\n\n for(lf in lifelines)\n {\n\n if( lf.getRepresents().getType() == classifier )\n return lf;\n }\n}'),(1369,1189,'\noperation Interaction getClassLifeline(class : Class) : Lifeline\n{\n var lifelines = Lifeline.allInstances -> select(lf | lf.getInteraction() == self);\n\n for(lf in lifelines)\n {\n\n if( lf.getRepresents().getType() == class )\n return lf;\n }\n}'),(1370,1189,'\noperation Interaction getUseCase() : UseCase\n{\n return self.getNamespace();\n}'),(1371,1189,'\noperation Interaction getOutcomingMessageOf(component : Component) : Sequence(Message)\n{\n var returnValue : Sequence(Message) = new Sequence(Message);\n var componentLf = component.getLifeline(self);\n\n if( componentLf.isUndefined() )\n {\n showError(\"Method: getMessageOf() in interaction.eol\");\n return null;\n }\n\n for(mes in self.getMessages())\n {\n\n if( not mes.isReturn() and componentLf.getCoveredBys() -> exists(iterator | iterator == mes.getSendEvent()) )\n {\n returnValue.add(mes);\n }\n }\n return returnValue;\n}'),(1372,1189,'\noperation Interaction getIncomingMessageOf(component : Component) : Sequence(Message)\n{\n var returnValue : Sequence(Message) = new Sequence(Message);\n var componentLf = component.getLifeline(self);\n\n if( componentLf.isUndefined() )\n {\n showError(\"Method: getMessageOf() in interaction.eol\");\n return null;\n }\n\n for(mes in self.getMessages())\n {\n\n if( not mes.isReturn() and componentLf.getCoveredBys() -> exists(iterator | iterator == mes.getReceiveEvent()) )\n {\n returnValue.add(mes);\n }\n }\n return returnValue;\n}'),(1373,1189,'\noperation Interaction getLifeline(mos : MessageOccurrenceSpecification) : Lifeline\n{\n return Lifeline.allInstances -> selectOne(lf | lf.namespace == self and lf.getCoveredBys() -> exists(iterator | iterator == mos));\n}'),(1374,1189,'\noperation Interaction getLifelineOf(component : Component) : Lifeline\n{\n return Lifeline.allInstances -> selectOne(lf | lf.namespace == self and lf.getRepresents().getType() == component);\n}'),(1375,1189,'\noperation Interaction getLifelineOf(component : Any) : Lifeline\n{\n return Lifeline.allInstances -> selectOne(lf | lf.namespace == self and lf.getRepresents().getType() == component);\n}'),(1376,1189,'\noperation Interaction createLifelineOf(component : Component) : Lifeline\n{\n var lifeline = self.createLifeline(component.getName()+\"_Lifeline\");\n var componentRepresents = self.createOwnedAttribute(component.getName(), component);\n lifeline.setRepresents(componentRepresents);\n return lifeline;\n}'),(1377,1189,'\noperation Interaction createLoopFragmentAt(index : Integer) : CombinedFragment\n{\n var loopFragment : CombinedFragment = new CombinedFragment;\n self.addFragmentAt(loopFragment, index);\n loopFragment.setName(\"LoopFragment_Decomposition\");\n var operand = loopFragment.createOperand(loopFragment.getName()+\"_Operand\");\n var guard = operand.createGuard(operand.getName()+\"_Guard\");\n return loopFragment;\n}'),(1378,1189,'\noperation Interaction createMessage(from : Lifeline, to : Lifeline, signature : Operation) : Message\n{\n var mes = self.createMessage(signature.getName());\n mes.setSignature(signature);\n var mes_sendMOS : MessageOccurrenceSpecification = new MessageOccurrenceSpecification;\n self.getFragments().add(mes_sendMOS);\n mes_sendMOS.setName(mes.getName()+\"__sendMOS\");\n mes_sendMOS.setMessage(mes);\n mes.setSendEvent(mes_sendMOS);\n from.getCoveredBys().add(mes.getSendEvent());\n var mes_receiveMOS : MessageOccurrenceSpecification = new MessageOccurrenceSpecification;\n self.getFragments().add(mes_receiveMOS);\n mes_receiveMOS.setName(mes.getName()+\"__receiveMOS\");\n mes_receiveMOS.setMessage(mes);\n mes.setReceiveEvent(mes_receiveMOS);\n to.getCoveredBys().add(mes.getReceiveEvent());\n var mes_besLf : BehaviorExecutionSpecification = new BehaviorExecutionSpecification;\n mes_besLf.setName(mes.getName()+\"__bes\");\n self.getFragments().add(mes_besLf);\n to.getCoveredBys().add(mes_besLf);\n var mes_eos : ExecutionOccurrenceSpecification = new ExecutionOccurrenceSpecification;\n mes_eos.setName(mes.getName()+\"__eos\");\n mes_eos.setExecution(mes_besLf);\n self.getFragments().add(mes_eos);\n mes_besLf.start = mes.getSendEvent();\n mes_besLf.finish = mes_eos;\n to.getCoveredBys().add(mes_eos);\n return mes;\n}'),(1379,1189,'\noperation Interaction getInteractionUses() : Sequence(InteractionUse)\n{\n return self.allOwnedElements() -> select(iterator | iterator.isTypeOf(InteractionUse)).asSequence();\n}'),(1380,1106,'\noperation CombinedFragment createOperand() : InteractionOperand\n{\n var interactionOperand = self.createOperand(self.getName()+\"_Operand\");\n return interactionOperand;\n}'),(1381,1208,'\noperation MessageOccurrenceSpecification getIndexOf() : Integer\n{\n\n if( debug() )\n {\n (\"MOS --> \"+self.getMessage().getSignature()).println();\n }\n return (self.getOwner().getIndexOf()+self.getOwner().getFragments()->indexOf(self));\n}'),(1382,1209,'\noperation BehaviorExecutionSpecification getIndexOf() : Integer\n{\n\n if( debug() )\n {\n (\"BES --> \"+self.getStart().getMessage().getSignature()).println();\n }\n return (self.getOwner().getIndexOf()+self.getOwner().getFragments()->indexOf(self));\n}'),(1383,1210,'\noperation ExecutionOccurrenceSpecification getIndexOf() : Integer\n{\n\n if( debug() )\n {\n (\"EOS --> \"+self.getExecution().getStart().getMessage().getSignature()).println();\n }\n return (self.getOwner().getIndexOf()+self.getOwner().getFragments()->indexOf(self));\n}'),(1384,1211,'\noperation InteractionOperand getIndexOf() : Integer\n{\n\n if( debug() )\n {\n (\"Operand \").println();\n }\n return (self.getOwner().getIndexOf()+self.getOwner().getOperands()->indexOf(self));\n}'),(1385,1106,'\noperation CombinedFragment getIndexOf() : Integer\n{\n\n if( debug() )\n {\n (\"Combined \").println();\n }\n return (self.getOwner().getIndexOf()+self.getOwner().getFragments()->indexOf(self));\n}'),(1386,1189,'\noperation Interaction getIndexOf() : Integer\n{\n\n if( debug() )\n {\n (\"Interaction \").println();\n }\n return 0;\n}'),(1387,1208,'\noperation MessageOccurrenceSpecification getProbabilityOf() : Real\n{\n\n if( debug() )\n {\n (\"MOS lifeline --> \"+self.getCovereds()->first()).println();\n (\"MOS message --> \"+self.getMessage()).println();\n (\"MOS operation --> \"+self.getMessage().getSignature()).println();\n }\n return (self.getOwner().getProbabilityOf() * 1.0);\n}'),(1388,1209,'\noperation BehaviorExecutionSpecification getProbabilityOf() : Real\n{\n\n if( debug() )\n {\n (\"BES --> \"+self.getStart().getMessage().getSignature()).println();\n }\n return (self.getOwner().getProbabilityOf() * 1.0);\n}'),(1389,1210,'\noperation ExecutionOccurrenceSpecification getProbabilityOf() : Real\n{\n\n if( debug() )\n {\n (\"EOS --> \"+self.getExecution().getStart().getMessage().getSignature()).println();\n }\n return (self.getOwner().getProbabilityOf() * 1.0);\n}'),(1390,1211,'\noperation InteractionOperand getProbabilityOf() : Real\n{\n\n if( debug() )\n {\n (\"Operand \").println();\n }\n\n if( self.getTag(\"GaStep\", \"prob\").isUndefined() )\n {\n showError(\"operand [\"+self+\"] in --> \"+self.getOwner());\n showError(\"Method: getProbabilityOf() in interactionFragment.eol\");\n return 1.0;\n }\n else\n {\n return (self.getOwner().getProbabilityOf() * self.getTag(\"GaStep\", \"prob\").asReal());\n }\n}'),(1391,1106,'\noperation CombinedFragment getProbabilityOf() : Real\n{\n\n if( debug() )\n {\n (\"Combined \").println();\n }\n return (self.getOwner().getProbabilityOf() * 1.0);\n}'),(1392,1189,'\noperation Interaction getProbabilityOf() : Real\n{\n\n if( debug() )\n {\n (\"Interaction \").println();\n }\n return 1.0;\n}'),(1393,1211,'\noperation InteractionOperand createFragment(name : String)\n{\n var fragment = self.createFragment();\n return fragment;\n}'),(1394,1211,'\noperation InteractionOperand getOperations() : Sequence(Operation)\n{\n var ownedElements = self.getOwnedElements();\n var MOSes = ownedElements -> select(iterator | iterator->isTypeOf(MessageOccurrenceSpecification));\n var operations : Sequence(Operation);\n var MOSesOfMes = MOSes -> select(iterator | iterator.getMessage().isTypeOf(Message));\n\n for(mos in MOSesOfMes)\n {\n\n if( mos.getMessage().getSignature().isTypeOf(Operation) and not operations -> exists(it : Operation | it == mos.getMessage().getSignature()) )\n operations.add(mos.getMessage().getSignature());\n }\n\n for(ownElement in ownedElements)\n {\n\n if( ownElement.isTypeOf(InteractionUse) )\n {\n\n for(mes in ownElement.getRefersTo().getMessages())\n {\n operations.add(mes.getSignature());\n }\n }\n }\n return operations;\n}'),(1395,1211,'\noperation InteractionOperand getIndexOf(fragment : InteractionFragment, indexOf) : Integer\n{\n indexOf = indexOf+self.getOwner().getIndexOf(self, indexOf);\n\n if( debug() )\n {\n (\"indexOf of [\"+self.getName()+\"] --> \"+indexOf).println();\n }\n return indexOf;\n}'),(1396,1223,'\noperation InterfaceRealization cloneInterfaceRealization() : InterfaceRealization\n{\n var newRealization : InterfaceRealization = new InterfaceRealization;\n newRealization.name = self.name;\n newRealization.client = self.client;\n newRealization.supplier = self.supplier;\n newRealization.contract = self.contract;\n return newRealization;\n}'),(1397,1224,'\noperation Interface getRealizedBy() : Sequence(Operation)\n{\n return Operation.allInstances -> select(op | op.getUsages() -> exists(usage | usage.getSuppliers() -> exists(int | int == self)));\n}'),(1398,1224,'\noperation Interface getUsedBy() : Sequence(Component)\n{\n return Component.allInstances -> select(comp | comp.getUsedInterfaces() -> exists(int | int == self));\n}'),(1399,1226,'\noperation Lifeline getIndexReceiveMOS(message : Message) : MessageOccuranceSpecification\n{\n}'),(1400,1226,'\noperation Lifeline getBESInitializedBy(op : Operation) : BehaviorExecutionSpecification\n{\n return BehaviorExecutionSpecification.allInstances -> selectOne(bes : BehaviorExecutionSpecification | bes.getCovereds()->first() == self and bes.getStart() == op.getMessageIn(self.getInteraction()).getReceiveEvent());\n}'),(1401,1226,'\noperation Lifeline removeInteractionFragment(mes : InteractionFragment)\n{\n self.getCoveredBys().remove(mes);\n}'),(1402,1226,'\noperation Lifeline getNextIncomingMessageStartingFrom() : Sequence(Message)\n{\n return Message.allInstances -> select(mes : Message | self.getCoveredBys()->exists(mes.getReceiveEvent()));\n}'),(1403,1226,'\noperation Lifeline getBESStartedBy(mos : MessageOccurrenceSpecification) : BehaviorExecutionSpecification\n{\n return self.getCoveredBys() -> selectOne(iterator : InteractionFragment | iterator.isTypeOf(BehaviorExecutionSpecification) and iterator.getStart() == mos);\n}'),(1404,1226,'\noperation Lifeline removeCovered(fragment : InteractionFragment)\n{\n self.getCoveredBys().remove(fragment);\n}'),(1405,1226,'\noperation Lifeline removeMsg(msg : Message)\n{\n var mosReceive = msg.getReceiveEvent();\n var bes = msg.getBES();\n var eos = msg.getEOS();\n self.getCoveredBys().remove(mosReceive);\n self.getCoveredBys().remove(bes);\n self.getCoveredBys().remove(eos);\n}'),(1406,1226,'\noperation Lifeline getIncomingMessages() : Map\n{\n var messages : Sequence(Message) = new Sequence(Message);\n var map : Map(Interaction, Sequence(Message));\n var interactions = self.getInteractions();\n\n if( interactions.notEmpty() )\n {\n\n for(int in interactions)\n {\n messages.addAll(int.getMessages());\n map.put(int, messages -> select(mes : Message | mes.getReceiveEvent().getCovereds()->first().getRepresents().getType() == self.getRepresents().getType() and mes.notReturn()));\n }\n }\n return map;\n}'),(1407,1226,'\noperation Lifeline getInteractionUses() : Sequence(InteractionUse)\n{\n return self.getCoveredBys() -> select(iterator | iterator.isTypeOf(InteractionUse)).asSequence();\n}'),(1408,1226,'\noperation Lifeline getInteractions() : Sequence(Interaction)\n{\n var interactions : Sequence(Interaction) = new Sequence(Interaction);\n var interUses = self.getInteractionUses();\n\n for(interUse in interUses)\n {\n interactions.add(interUse.getRefersTo());\n }\n interactions.add(self.getInteraction());\n return interactions;\n}'),(1409,1226,'\noperation Lifeline getOutgoingMessages() : Map\n{\n var messages : Sequence(Message) = new Sequence(Message);\n var map : Map(Interaction, Sequence(Message));\n var interactions = self.getInteractions();\n\n if( interactions.notEmpty() )\n {\n\n for(int in interactions)\n {\n messages.addAll(int.getMessages());\n map.put(int, messages -> select(mes : Message | mes.getSendEvent().getCovereds()->first().getRepresents().getType() == self.getRepresents().getType() and mes.notReturn()));\n }\n }\n return map;\n}'),(1410,1226,'\noperation Lifeline getNextIncomingMessage(mes : Message) : Message\n{\n var incomingMes = self.getIncomingMessages();\n\n for(m in incomingMes)\n {\n\n if( m.receiveEvent.namespace.getIndexOf(m.receiveEvent) > mes.receiveEvent.namespace.getIndexOf(mes.receiveEvent) )\n {\n return m;\n }\n }\n return null;\n}'),(1411,1226,'\noperation Lifeline getNextOutgoingMessage(mes : Message) : Message\n{\n var outgoingMes = self.getOutgoingMessages();\n\n for(m in outgoingMes)\n {\n\n if( self.getInteraction().getIndexOf(m.sendEvent) > self.getInteraction().getIndexOf(mes.sendEvent) )\n return m;\n }\n return null;\n}'),(1412,1226,'\noperation Lifeline getBESes() : Sequence(BehaviorExecutionSpecification)\n{\n return self.getCoveredBys() -> select(cov | cov.isTypeOf(BehaviorExecutionSpecification)).asSequence();\n}'),(1413,1240,'\noperation Manifestation hasUtilizedElement(component : Component) : Boolean\n{\n\n if( self.utilizedElement == component )\n {\n return true;\n }\n return false;\n}'),(1414,1240,'\noperation Manifestation hasUtilizedElement(classifier : Classifier) : Boolean\n{\n\n if( self.getSuppliers() -> exists(sup | sup == classifier) )\n {\n return true;\n }\n return false;\n}'),(1415,1242,'\noperation Message getReceiveLifeline() : Lifeline\n{\n var interaction = self.getOwner();\n var lifeline = interaction.getLifeline(self.getReceiveEvent());\n\n if( lifeline.isUndefined() )\n {\n showError(\"Method: getReceiveLifeline() in interaction.eol\");\n return null;\n }\n return lifeline;\n}'),(1416,1242,'\noperation Message isReturn() : Boolean\n{\n\n if( self.getMessageSort().asString().equals(\"reply\") )\n {\n return true;\n }\n return false;\n}'),(1417,1242,'\noperation Message notReturn() : Boolean\n{\n return not self.isReturn();\n}'),(1418,1242,'\noperation Message getUseCase() : UseCase\n{\n var returnValue;\n returnValue = self.getInteraction().getUseCase();\n return returnValue;\n}'),(1419,1242,'\noperation Message getBES() : BehaviorExecutionSpecification\n{\n var mos_receive = self.getReceiveEvent();\n var bes = BehaviorExecutionSpecification.allInstances -> selectOne(iterator | iterator.getStart() == mos_receive);\n return bes;\n}'),(1420,1242,'\noperation Message getEOS() : ExecutionOccurrenceSpecification\n{\n var bes = self.getBES();\n var eos = bes.getFinish();\n return eos;\n}'),(1421,1437,'\noperation Node hasDeployment(artifact : Artifact) : Boolean\n{\n\n for(deployment in self.deployment)\n {\n\n for(art in deployment.getDeployedArtifacts())\n {\n\n if( art == artifact )\n {\n return true;\n }\n }\n }\n return false;\n}'),(1422,1437,'\noperation Node getDirectlyLinkedNode() : List(Node)\n{\n var returnValue : List(Node) = new List(Node);\n\n for(prop in self.ownedAttribute)\n {\n returnValue.add(prop.getType());\n }\n return returnValue;\n}'),(1423,1437,'\noperation Node cloneDeployedArtifactFrom(node : Node, component : Component)\n{\n\n for(dep in node.getDeployedElements())\n {\n var newArtifact : Artifact = new Artifact;\n var newManifestation;\n var newDeployment;\n self.getNearestPackage().addElement(newArtifact);\n newArtifact.name = component.name;\n newManifestation = newArtifact.createManifestation(component.name, component);\n newDeployment = self.createDeployment(newArtifact.name);\n newDeployment.getDeployedArtifacts().add(newArtifact);\n }\n}'),(1424,1437,'\noperation Node cloneDeployedArtifactFrom(node : Node, classfier : Classifier)\n{\n\n for(dep in node.getDeployedElements())\n {\n var newArtifact : Artifact = new Artifact;\n var newManifestation;\n var newDeployment;\n self.getNearestPackage().addElement(newArtifact);\n newArtifact.name = classfier.name;\n newManifestation = newArtifact.createManifestation(classfier.name, classfier);\n newDeployment = self.createDeployment(newArtifact.name);\n newDeployment.getDeployedArtifacts().add(newArtifact);\n }\n}'),(1425,1437,'\noperation Node cloneLink(listOfLinkedNode : List(Property), packageContainer : Package)\n{\n\n for(linkedNode in listOfLinkedNode)\n {\n var linkedNodeEnd : Property = new Property;\n var selfEnd : Property = new Property;\n var commPath : CommunicationPath = new CommunicationPath;\n self.ownedAttribute.add(linkedNodeEnd);\n linkedNodeEnd.name = linkedNode.name;\n linkedNodeEnd.setType(linkedNode);\n linkedNode.ownedAttribute.add(selfEnd);\n selfEnd.name = self.name;\n selfEnd.setType(self);\n packageContainer.addElement(commPath);\n commPath.name = \"A_\"+linkedNode.name+\"_\"+selfEnd.name;\n commPath.memberEnd.add(linkedNodeEnd);\n commPath.memberEnd.add(selfEnd);\n }\n}'),(1426,1437,'\noperation Node createNewNode() : Node\n{\n var newNode : Node = new Node;\n var packageContainer : Package = self.getNearestPackage();\n newNode.name = self.getName()+\" Splitted\";\n packageContainer.addElement(newNode);\n return newNode;\n}'),(1427,1437,'\noperation Node clone(component : Component) : Node\n{\n var newNode = self.createNewNode();\n var packageContainer : Package = self.getNearestPackage();\n newNode.cloneAppliedStereotypesFrom(self);\n return newNode;\n}'),(1428,1437,'\noperation Node clone(node : Node) : Node\n{\n var listOfLinkedNode = node.getDirectlyLinkedNode();\n var packageContainer : Package = node.getNearestPackage();\n self.cloneAppliedStereotypesFrom(node);\n self.cloneLink(listOfLinkedNode, packageContainer);\n}'),(1429,1437,'\noperation Node clone(class : Class) : Node\n{\n var newNode : Node = new Node;\n var listOfLinkedNode = self.getDirectlyLinkedNode();\n var packageContainer : Package = self.getNearestPackage();\n newNode.name = self.name+\" Refactored\";\n packageContainer.addElement(newNode);\n newNode.cloneAppliedStereotypesFrom(self);\n newNode.cloneDeployedArtifactFrom(self, class);\n newNode.cloneLink(listOfLinkedNode, packageContainer);\n return newNode;\n}'),(1430,1437,'\noperation Node redeployOnNewNode() : Boolean\n{\n\n if( self.isLegacy() )\n return false;\n var criticalComponent = self.getCriticalDeployedComponent();\n\n if( criticalComponent.isUndefined() )\n {\n (\"the node [\"+self.getName()+\"] has not deployed component\").println();\n showError(\"Method: redeployOnNearLessUsedNode() in node.eol\");\n return false;\n }\n else\n {\n\n if( debug() )\n {\n (\"moved component --> \"+criticalComponent.getName()).println();\n }\n criticalComponent.deployOnNewNode();\n return true;\n }\n}'),(1431,1437,'\noperation Node clone(component : Component, reduction : Integer)\n{\n var newNode : Node = new Node;\n var listOfLinkedNode = self.getDirectlyLinkedNode();\n var packageContainer : Package = self.getNearestPackage();\n newNode.name = self.name+\" Splitted\";\n packageContainer.addElement(newNode);\n newNode.cloneAppliedStereotypesFrom(self);\n newNode.cloneDeployedArtifactFrom(self, component);\n newNode.cloneLink(listOfLinkedNode, packageContainer);\n}'),(1432,1437,'\noperation Node applyReductionOfUtilizationFrom(node : Node, percentage : Integer)\n{\n var stereotype = node.getStereotype(\"GaExecHost\");\n var reduction : Real = (percentage.asReal() / 100) * (node.getValue(stereotype, \"utilization\")->first().asReal());\n var value : String = (node.getValue(stereotype, \"utilization\")->first().asReal()-reduction).asString();\n self.setValue(stereotype, \"utilization\", value);\n}'),(1433,1437,'\noperation Node getArtifactOf(component : Component) : Artifact\n{\n\n for(deployment in self.deployment)\n {\n\n for(art in deployment.getDeployedArtifacts())\n {\n\n if( art.hasRepresentationOf(component) )\n {\n return art;\n }\n }\n }\n return null;\n}'),(1434,1437,'\noperation Node getUtilization() : Real\n{\n var utilization : Real;\n\n if( self.hasStereotype(\"GaExecHost\") )\n {\n var selfUtilization = self.getTag(\"GaExecHost\", \"utilization\");\n\n if( selfUtilization.isDefined() and not selfUtilization.isEmpty() )\n {\n return selfUtilization->first().asReal();\n }\n else\n {\n var artifacts = self.getArtifact();\n\n if( artifacts.isEmpty() )\n {\n (\"the node [\"+self.getName()+\"] does not manifest any artifact\").println();\n showError(\"Method: getUtilization() in node.eol\");\n return null;\n }\n else\n {\n\n for(art in artifacts)\n {\n var listOfComponents = art.getManifestedComponents();\n\n if( listOfComponents.isDefined() and not listOfComponents.isEmpty() )\n {\n\n for(com in listOfComponents)\n {\n var utl = com.getAverageDemand();\n utilization = utilization+utl;\n }\n }\n }\n return utilization;\n }\n }\n }\n}'),(1435,1437,'\noperation Node getMaxCpuUtilization() : Real\n{\n var utilization : Real;\n\n if( self.hasStereotype(\"GaExecHost\") )\n {\n var selfUtilization = self.getTag(\"GaExecHost\", \"utilization\");\n\n if( selfUtilization.notEmpty() and selfUtilization->at(1).isDefined() )\n {\n return selfUtilization->at(1).asReal();\n }\n else\n {\n var artifacts = self.getArtifact();\n\n if( artifacts.isEmpty() )\n {\n (\"the node [\"+self.getName()+\"] does not manifest any artifact\").println();\n showError(\"Method: getUtilization() in node.eol\");\n return null;\n }\n else\n {\n\n for(art in artifacts)\n {\n var listOfComponents = art.getManifestedComponents();\n\n if( listOfComponents.isDefined() and not listOfComponents.isEmpty() )\n {\n\n for(com in listOfComponents)\n {\n var utl = com.getAverageMaxCPUDemand();\n utilization = utilization+utl;\n }\n }\n }\n return utilization;\n }\n }\n }\n}'),(1436,1437,'\noperation Node getMaxDiskUtilization() : Real\n{\n var utilization : Real;\n\n if( self.hasStereotype(\"GaExecHost\") )\n {\n var selfUtilization = self.getTag(\"GaExecHost\", \"utilization\");\n\n if( selfUtilization.notEmpty() and selfUtilization->at(3).isDefined() )\n {\n return selfUtilization->at(3).asReal();\n }\n else\n {\n var artifacts = self.getArtifact();\n\n if( artifacts.isEmpty() )\n {\n (\"the node [\"+self.getName+\"] does not manifest any artifact\").println();\n showError(\"Method: getUtilization() in node.eol\");\n return null;\n }\n else\n {\n\n for(art in artifacts)\n {\n var listOfComponents = art.getManifestedComponents();\n\n if( listOfComponents.isDefined() and listOfComponents.notEmpty() )\n {\n\n for(com in listOfComponents)\n {\n var utl = com.getAverageMaxDiskDemand();\n utilization = utilization+utl;\n }\n }\n }\n return utilization;\n }\n }\n }\n}'),(1437,1437,'\noperation Node getNeighboursWithLowUtilization() : Sequence(Node)\n{\n var returnValue : Sequence(Node) = new Sequence(Node);\n var lanNode = self.getLinkedNetworkNode()->first();\n\n if( lanNode.isUndefined() )\n {\n showError(\"Method: getNeighboursWithLowUtilization in node.eol\");\n return null;\n }\n var comPaths = lanNode.getCommunicationPaths();\n\n for(cp in comPaths)\n {\n\n for(me in cp.getMemberEnds())\n {\n\n if( me.getType().isTypeOf(Node) and me.getType() <> self and me.getType() <> lanNode and me.getType().hasStereotype(\"GaExecHost\") and me.getType().hasLowUtilization() )\n {\n returnValue.add(me.getType());\n }\n }\n }\n return returnValue;\n}'),(1438,1437,'\noperation Node getNeighboursWithLowCpuUtilization(th_minCpuUtilization : Real) : Sequence(Node)\n{\n var returnValue : Sequence(Node) = new Sequence(Node);\n var comPaths = self.getCommunicationPaths();\n\n for(cp in comPaths)\n {\n\n for(me in cp.getMemberEnds())\n {\n\n if( me.getType().isKindOf(Node) and me.getType() <> self and me.getType().hasStereotype(\"GaExecHost\") and me.getType().hasLowCpuUtilization(th_minCpuUtilization) )\n {\n returnValue.add(me.getType());\n }\n }\n }\n return returnValue;\n}'),(1439,1437,'\noperation Node getNeighboursWithLowDiskUtilization(th_minDiskUtilization : Real) : Sequence(Node)\n{\n var returnValue : Sequence(Node) = new Sequence(Node);\n var comPaths = self.getCommunicationPaths();\n\n for(cp in comPaths)\n {\n\n for(me in cp.getMemberEnds())\n {\n\n if( me.getType().isKindOf(Node) and me.getType() <> self and me.getType().hasStereotype(\"GaExecHost\") and me.getType().hasLowDiskUtilization(th_minDiskUtilization) )\n {\n returnValue.add(me.getType());\n }\n }\n }\n return returnValue;\n}'),(1440,1437,'\noperation Node getLinkedNetworkNode() : Sequence(Node)\n{\n var returnValue : Sequence(Node) = new Sequence(Node);\n\n for(cp in self.getCommunicationPaths())\n {\n\n for(me in cp.getMemberEnds())\n {\n\n if( me.getType().isTypeOf(Node) and me.getType().isNetworkNode() )\n {\n returnValue.add(me.getType());\n }\n }\n }\n return returnValue;\n}'),(1441,1437,'\noperation Node getArtifact() : Sequence(Artifact)\n{\n var returnValue : Sequence(Artifact) = new Sequence(artifact);\n\n for(dep in self.getDeployments())\n {\n\n for(sup in dep.supplier)\n {\n\n if( sup.isTypeOf(Artifact) )\n {\n returnValue.add(sup);\n }\n }\n }\n return returnValue;\n}'),(1442,1437,'\noperation Node isNetworkNode() : Boolean\n{\n return self.hasStereotype(\"GaCommHost\");\n}'),(1443,1437,'\noperation Node hasNetworklinkWith(node : Node) : Boolean\n{\n\n for(cp in self.getCommunicationPaths())\n {\n\n if( cp.isNetworkLink() and cp.getMemberEnds() -> exists(iterator | iterator == node) )\n {\n return true;\n }\n }\n return false;\n}'),(1444,1437,'\noperation Node isReachableByNetwork() : Boolean\n{\n\n for(cp in self.getCommunicationPaths())\n {\n\n if( cp.isNetworkLink() )\n {\n return true;\n }\n\n for(me in cp.getMemberEnds())\n {\n\n if( me.getType().isNetworkNode() )\n {\n return true;\n }\n }\n }\n return false;\n}'),(1445,1437,'\noperation Node hasLowUtilization() : Boolean\n{\n var th_minHwUtil : Real = 0.6;\n\n if( self.getUtilization().isDefined() and (self.getUtilization().asReal() < th_minHwUtil) )\n return true;\n return false;\n}'),(1446,1437,'\noperation Node hasLowCpuUtilization(thLowCpuUtilization : Real) : Boolean\n{\n\n if( self.getUtilization().isDefined() and (self.getUtilization().asReal() < thLowCpuUtilization) )\n return true;\n return false;\n}'),(1447,1437,'\noperation Node hasLowDiskUtilization(thLowDiskUtilization : Real) : Boolean\n{\n\n if( self.getUtilization().isDefined() and (self.getUtilization().asReal() < thLowDiskUtilization) )\n return true;\n return false;\n}'),(1448,1437,'\noperation Node getDeployedComponents() : List(Component)\n{\n var artifacts = self.getArtifact();\n var components : List(Component);\n\n for(art in artifacts)\n {\n\n if( art.getManifestedComponents().isDefined() and art.getManifestedComponents().notEmpty() )\n components.addAll(art.getManifestedComponents());\n }\n return components;\n}'),(1449,1437,'\noperation Node getCriticalDeployedComponent() : Component\n{\n var artifacts = self.getArtifact();\n var criticalComponent : List(Component);\n var utilization : Real = 0.0;\n\n for(art in artifacts)\n {\n var components = art.getManifestedComponents();\n\n if( components.isUndefined() or components.isEmpty() )\n {\n showError(\"Method: getCriticalDeployedComponent() in node.eol\");\n }\n\n if( components->first().getAverageDemand() <> 0.0 )\n {\n utilization = components->first().getAverageDemand();\n criticalComponent.add(components->first());\n }\n\n for(comp in components)\n {\n\n if( utilization < comp.getAverageDemand() )\n {\n utilization = comp.getAverageDemand();\n criticalComponent.add(comp);\n }\n }\n }\n return criticalComponent . sortBy(c : Component | c.getAverageDemand())->last();\n}'),(1450,1437,'\noperation Node calculateTotalUtilization() : Real\n{\n var utilization : Real = 0.0;\n var i : Integer = 0;\n\n for(utl in self.getUtilization())\n {\n utilization = utilization.asReal()+utl.asReal();\n i = i+1;\n }\n utilization = utilization / i;\n return utilization;\n}'),(1451,1437,'\noperation Node getLessUsedNode() : Node\n{\n var lessUsedNode : Node;\n var utilization : Real = 1.0;\n var neighbours = self.getNeighboursWithLowUtilization();\n utilization = neighbours->first().calculateTotalUtilization();\n lessUsedNode = neighbours->first();\n\n for(n in neighbours)\n {\n\n if( utilization < n.calculateTotalUtilization().asReal() )\n {\n utilization = n.calculateTotalUtilization();\n lessUsedNode = n;\n }\n }\n return lessUsedNode;\n}'),(1452,1437,'\noperation Node getNetworkUsage() : Map\n{\n var networkUsage : Map(CommunicationPath, Sequence(Real)) = new Map(CommunicationPath, Sequence(Real));\n\n for(cp in self.getCommunicationPaths())\n {\n\n if( cp.hasStereotype(\"GaCommChannel\") )\n {\n var netUsage = cp.getValue(cp.getStereotype(\"GaCommChannel\"), \"utlization\");\n\n if( netUsage.isDefined() )\n networkUsage.put(cp, cp.getValue(cp.getStereotype(\"GaCommChannel\"), \"utlization\").asSequence());\n }\n }\n return networkUsage;\n}'),(1453,1437,'\noperation Node moveToNewComponentDeployedOnNewNode() : Boolean\n{\n\n if( self.isLegacy() )\n return false;\n var criticalComponent = self.getCriticalDeployedComponent();\n var criticalOperation = criticalComponent.getCriticalOperation();\n criticalOperation.moveToNewComponentDeployedOnNewNode();\n return true;\n}'),(1454,1437,'\noperation Node moveToNewComponentDeployedOnNearLessUsedNode() : Boolean\n{\n\n if( self.isLegacy() )\n return false;\n self.getCriticalDeployedComponent().getCriticalOperation().moveToNewComponentDeployedOnNearLessUsedNode();\n return true;\n}'),(1455,1437,'\noperation Node() : redeployOnNearLessUsedNode\n{\n\n if( self.isLegacy() )\n return false;\n var criticalComponent = self.getCriticalDeployedComponent();\n\n if( criticalComponent.isUndefined() )\n {\n (\"the node [\"+self.getName()+\"] has not deployed component\").println();\n showError(\"Method: redeployOnNearLessUsedNode() in node.eol\");\n }\n else\n {\n (\"moved component --> \"+criticalComponent.getName()).println();\n criticalComponent.redeployOnNearLessUsedNode();\n }\n return true;\n}'),(1456,1437,'\noperation Node moveToLessCriticalComponent() : Boolean\n{\n\n if( self.isLegacy() )\n return false;\n var criticalComponent = self.getCriticalDeployedComponent();\n\n if( criticalComponent.isUndefined() )\n {\n (\"the node [\"+self.getName()+\"] has not deployed component\").println();\n showError(\"Method: moveToLessCriticalComponent() in node.eol\");\n }\n else\n {\n var criticalOperation = criticalComponent.getCriticalOperation();\n\n if( criticalOperation.isDefined() )\n {\n (\"moved opertion --> \"+criticalComponent.getName()).println();\n criticalOperation.redeployOnNearLessUsedNode();\n }\n else\n {\n (\"the component [\"+criticalComponent.getName()+\"] has not critical operation\").println();\n showError(\"Method: moveToLessCriticalComponent() in node.eol\");\n }\n }\n return true;\n}'),(1457,1437,'\noperation Node() : resetUtilization\n{\n\n if( not self.hasStereotype(\"GaExecHost\") )\n {\n (\"the node [\"+self.getName()+\"] is not correctly stereotyped\").println();\n showError(\"Method: resetUtilization() in node.eol\");\n }\n else\n {\n var utils = self.getTag(\"GaExecHost\", \"utilization\");\n var newUtils : List(String) = new List;\n\n for(util in utils)\n {\n newUtils.add(\"0.0\");\n }\n self.setValue(self.getStereotype(\"GaExecHost\"), \"utilization\", newUtils);\n }\n}'),(1458,1437,'\noperation Node getCpuCriticOperation() : Operation\n{\n var components = self.getDeployedComponents();\n var operations : List(Operation);\n\n if( components.isUndefined() or components.isEmpty() )\n {\n (\"the node [\"+self.getName()+\"] has not deployed critical components with respect to CPU\").println();\n showError(\"Method: getCriticCpuOperation() in node.eol\");\n return null;\n }\n\n if( debug() )\n {\n (\"components of [\"+self.getName()+\"] --> \"+components).println();\n }\n\n for(comp in components)\n {\n operations.addAll(comp.getOperationsWithCpuResDemandGreaterOrEqual(th_maxResDemand()));\n }\n return operations -> sortBy(iterator | iterator.getAverageDemand())->last();\n}'),(1459,1437,'\noperation Node getDiskCriticOperation() : Operation\n{\n var components = self.getDeployedComponents();\n var operations : List(Operation);\n\n if( components.isUndefined() or components.isEmpty() )\n {\n (\"the node [\"+self.getName()+\"] has not deployed critical components with respect to DISK\").println();\n showError(\"Method: getDiskCriticOperation() in node.eol\");\n return null;\n }\n\n for(comp in components)\n {\n operations.addAll(comp.getOperationsWithDiskResDemandGreaterOrEqual(th_maxResDemand()));\n }\n return operations -> sortBy(iterator | iterator.getAverageDemand())->last();\n}'),(1460,1425,'\noperation Operation cloneOperationInto(component : Component) : Operation\n{\n var newOperation = new Operation;\n newOperation.name = self.name+\"_Cloned\";\n component.ownedOperation.add(newOperation);\n newOperation.cloneOwnedParameterFrom(self);\n newOperation.cloneAppliedStereotypesFrom(self);\n newOperation.cloneReturnTypeFrom(self);\n return newOperation;\n}'),(1461,1425,'\noperation Operation cloneOwnedParameterFrom(op : Operation)\n{\n self.ownedParameter = op.ownedParameter.clone();\n}'),(1462,1425,'\noperation Operation cloneReturnTypeFrom(op : Operation)\n{\n\n if( op.getType().isDefined() )\n self.setType(op.getType());\n}'),(1463,1425,'\noperation Operation getProcessNodes() : List(Node)\n{\n var returnValue : List(Node) = new List(Node);\n\n for(node in Node.allInstances)\n {\n\n if( node.hasStereotype(\"GaExecHost\") )\n {\n\n for(deployment in node.getDeployments())\n {\n var listOfArtifacts = deployment.getDeployedArtifacts();\n\n for(art in listOfArtifacts)\n {\n\n if( art.hasRepresentationOf(self.getOwner()) )\n {\n returnValue.add(node);\n }\n }\n }\n }\n }\n return returnValue;\n}'),(1464,1425,'\noperation Operation getProcessNodes(stereotype : String) : List(Node)\n{\n var returnValue : List(Node) = new List(Node);\n\n for(node in Node.allInstances)\n {\n\n if( node.hasStereotype(stereotype) )\n {\n\n for(deployment in node.getDeployments())\n {\n var listOfArtifacts = deployment.getDeployedArtifacts();\n\n for(art in listOfArtifacts)\n {\n\n if( art.hasRepresentationOf(self.getOwner()) )\n {\n returnValue.add(node);\n }\n }\n }\n }\n }\n return returnValue;\n}'),(1465,1425,'\noperation Operation getUseCases() : List(UseCase)\n{\n var returnValue : List(UseCase) = new List(UseCase);\n\n for(interaction in Interaction.allInstances)\n {\n\n if( interaction.hasOperation(self) )\n {\n returnValue.add(interaction.getOwner());\n }\n }\n return returnValue;\n}'),(1466,1425,'\noperation Operation splitComponent() : Component\n{\n var selfComponent = self.getOwner();\n var selfPackage = self.getNearestPackage();\n var splittedComponent : Component = new Component;\n selfPackage.addElement(splittedComponent);\n splittedComponent.name = selfComponent.getName()+\" Splitted\";\n splittedComponent.cloneAppliedStereotypesFrom(selfComponent);\n splittedComponent.moveInterfacesRealizationFrom(selfComponent, self);\n var listOfUsedProvidedInterfaces : List(Interface) = selfComponent.getAllUsedIntefacesRequiredsBy(self);\n return splittedComponent;\n}'),(1467,1425,'\noperation Operation splitClass() : Class\n{\n var selfComponent = self.getOwner();\n var selfPackage = self.getNearestPackage();\n var splittedClass : Class = new Class;\n selfPackage.addElement(splittedClass);\n splittedClass.name = self.getOwner().name+\" Refactored\";\n splittedClass.cloneAppliedStereotypesFrom(self.getOwner());\n splittedClass.moveInterfacesRealizationFrom(self.getOwner(), self);\n var listOfUsedProvidedInterfaces : List(Interface) = splittedClass.getAllUsedIntefacesRequiredsBy(self);\n return splittedClass;\n}'),(1468,1425,'\noperation Operation getAllOwnMessages() : List(Message)\n{\n var returnValue : List(Message) = new List(Message);\n\n for(message in Message.allInstances)\n {\n\n if( message.getSignature() == self )\n {\n returnValue.add(message);\n }\n }\n return returnValue;\n}'),(1469,1425,'\noperation Operation getAllInteractions() : List(Interaction)\n{\n var returnValue : List(Interaction) = new List(Interaction);\n\n for(interaction in Interaction.allInstances)\n {\n\n for(message in self.getAllOwnMessages())\n {\n\n if( message.namespace == interaction )\n {\n returnValue.add(interaction);\n break;\n }\n }\n }\n return returnValue;\n}'),(1470,1425,'\noperation Operation getMessageIn(interaction : Interaction) : Message\n{\n var mes = interaction.getMessages() -> selectOne(iterator : Message | iterator.getSignature() == self);\n return mes;\n}'),(1471,1425,'\noperation Operation getMessagesIn(interaction : Interaction) : Sequence(Message)\n{\n var mes = interaction.getMessages() -> select(iterator : Message | iterator.getSignature() == self);\n return mes.asSequence();\n}'),(1472,1425,'\noperation Operation getUsages() : List(Usage)\n{\n return Usage.allInstances -> select(usage : Usage | usage.getSuppliers() -> exists(supplier : Operation | supplier == self) or usage.getClients() -> exists(client : Operation | client == self));\n}'),(1473,1425,'\noperation Operation getUsedInterfaces() : Sequence(Interface)\n{\n var usages = self.getUsages();\n var returnValue : Sequence(Interface) = new Sequence(Interface);\n\n for(usage in usages)\n {\n\n if( usage.getSuppliers() -> exists(cli | cli.isTypeOf(Interface)) )\n {\n returnValue.add(usage.getSuppliers() -> selectOne(cli | cli.isTypeOf(Interface)));\n }\n }\n return returnValue;\n}'),(1474,1425,'\noperation Operation moveIntoComponent(component : Component)\n{\n var usages = self.getUsages() -> select(usage : Usage | (usage.getSuppliers().size() == 1 and usage.getSuppliers()->first() == self) or (usage.getClients().size() == 1 and usage.getClients()->first() == self));\n component.addUsages(usages);\n component.moveOperation(self);\n}'),(1475,1425,'\noperation Operation moveIntoClass(class : Class)\n{\n var usages = self.getUsages() -> select(usage : Usage | (usage.getSuppliers().size() == 1 and usage.getSuppliers()->first() == self) or (usage.getClients().size() == 1 and usage.getClients()->first() == self));\n class.addUsages(usages);\n class.moveOperation(self);\n}'),(1476,1425,'\noperation Operation _redeployOnNearLessUsedNode() : Boolean\n{\n var listOfCriticSourceNode = self.getDeployedNodesHwUtilization(th_maxHwUtil()->first());\n var listOfNearLessUsed : List(Node) = new List(Node);\n\n for(node in listOfCriticSourceNode)\n {\n var listOfNeighbours = node.getDirectlyLinkedNode();\n\n if( listOfNeighbours.isUndefined() or listOfNeighbours.size() == 0 )\n {\n return false;\n }\n var lessNode : Node = listOfNeighbours -> selectOne(node : Node | node.hasStereotype(\"GaExecHost\") and node.notLegacy() and node.getTag(\"GaExecHost\", \"utilization\").isDefined());\n\n if( lessNode.isUndefined() )\n {\n (\"lessNode is undefined\").println();\n showError(\"Method: _redeployOnNearLessUsedNode() in operation.eol\");\n return false;\n }\n var utilization : Real = 0.0;\n\n if( lessNode.getTag(\"GaExecHost\", \"utilization\").isDefined() and lessNode.getTag(\"GaExecHost\", \"utilization\").notEmpty() )\n {\n utilization = lessNode.getTag(\"GaExecHost\", \"utilization\")->first().asReal();\n }\n\n for(neighbour in listOfNeighbours)\n {\n\n if( neighbour.hasStereotype(\"GaExecHost\") and neighbour.notLegacy() )\n {\n\n if( neighbour.getTag(\"GaExecHost\", \"utilization\").isUndefined() or neighbour.getTag(\"GaExecHost\", \"utilization\").isEmpty() )\n {\n showError(\"Method: _redeployOnNearLessUsedNode() in operation.eol\");\n }\n else\n {\n var nearNodeUtilization = neighbour.getTag(\"GaExecHost\", \"utilization\")->first();\n\n if( nearNodeUtilization.isDefined() and nearNodeUtilization.asReal() < utilization )\n {\n lessNode = neighbour;\n utilization = nearNodeUtilization.asReal();\n }\n }\n }\n }\n listOfNearLessUsed.add(lessNode);\n\n if( listOfNearLessUsed.isUndefined() or listOfNearLessUsed.notEmpty() )\n {\n return false;\n }\n }\n return true;\n}'),(1477,1425,'\noperation Operation dynamicFixing(component : Component)\n{\n var interaction = self.getAllInteractions()->first();\n var sourceLifeline = component.getLifeline(interaction);\n\n if( sourceLifeline.isUndefined() )\n {\n\n if( debug() )\n {\n (\"sourceComponent --> \"+component.getName()).println();\n }\n (\"the operation [\"+self.getName()+\"] has not a lifeline\").println();\n showError(\"Method: moveToNewComponentDeployedOnNearLessUsedNode() in operation.eol\");\n }\n else\n {\n\n if( debug() )\n {\n (\"@@@@@@@@@@@@@ DEBUG dynamic Fixing @@@@@@@@@@@@\").println();\n }\n var lifeline = interaction.createLifeline(self.getOwner().getName()+\"Lifeline\");\n var spProp = interaction.createOwnedAttribute(self.getOwner().getName(), self.getOwner());\n lifeline.setRepresents(spProp);\n lifeline.cloneAppliedStereotypesFrom(sourceLifeline);\n lifeline.setVisibility(sourceLifeline.getVisibility());\n var beses = sourceLifeline.getBESes();\n\n if( debug() )\n {\n (\"beses --> \"+beses).println();\n }\n var bes = beses -> selectOne(bes | bes.getStart().getMessage().getSignature() == self);\n\n if( debug() )\n {\n (\"bes --> \"+bes).println();\n (\"indexOf bes of self --> \"+bes.getIndexOf()).println();\n (\"self operation --> \"+self.getName()).println();\n }\n var sourceCoveredBys : Sequence(InteractionFragment) = new Sequence(InteractionFragment);\n\n for(i in sourceLifeline.getCoveredBys())\n {\n\n if( debug() )\n {\n \"************************\".println();\n }\n var indexOf_i = i.getIndexOf();\n\n if( bes.isDefined() and indexOf_i > bes.getStart().getIndexOf() and indexOf_i < bes.getFinish().getIndexOf() )\n {\n\n if( debug() )\n {\n (\"i --> \"+i).println();\n }\n lifeline.getCoveredBys().add(i);\n sourceCoveredBys.add(i);\n }\n\n if( debug() )\n {\n (\"indexOf_i --> \"+indexOf_i).println();\n \"************************\".println();\n \"\".println();\n }\n }\n\n if( debug() )\n {\n \"\".println();\n (\"sourceLifeline --> \"+sourceLifeline.getName()).println();\n (\"sourceCoveredBys --> \"+sourceCoveredBys.size()).println();\n \"\".println();\n }\n\n for(i in sourceCoveredBys)\n {\n\n if( debug() )\n {\n \"removing element i\".println();\n (\"i of sourceCoveredBys --> \"+i).println();\n\n if( i.isTypeOf(MessageOccurrenceSpecification) )\n i.getMessage().println();\n }\n sourceLifeline.removeInteractionFragment(i);\n }\n\n if( bes.isDefined() )\n {\n lifeline.getCoveredBys().add(bes.getStart());\n lifeline.getCoveredBys().add(bes.getFinish());\n sourceLifeline.removeInteractionFragment(bes.getStart());\n sourceLifeline.removeInteractionFragment(bes.getFinish());\n }\n }\n\n if( debug() )\n {\n\n for(i in sourceLifeline.getCoveredBys)\n {\n\n if( i.isTypeOf(MessageOccurrenceSpecification) )\n i.getMessage().println();\n }\n (\"@@@@@@@@@@@@@ DEBUG dynamic Fixing @@@@@@@@@@@@\").println();\n }\n}'),(1478,1425,'\noperation Operation calculateTotalUtilization() : Real\n{\n var totalUtilization : Real = 0.0;\n var i : Integer = 0;\n\n if( self.hasStereotype(\"GaStep\") and self.hasStereotype(\"GaScenario\") )\n {\n\n for(utl in self.getValue(self.getStereotype(\"GaStep\"), \"servCount\"))\n {\n totalUtilization = totalUtilization+utl.asReal();\n i = i+1;\n }\n }\n return (totalUtilization / i.asReal());\n}'),(1479,1425,'\noperation Operation() : moveIntoNewComponent\n{\n var sourceComponent : Component = self.class;\n var packageContainer = sourceComponent.getNearestPackage();\n var newComponent : Component = new Component;\n newComponent.name = \"New \"+sourceComponent.name;\n packageContainer.addElement(newComponent);\n self.moveIntoComponent(newComponent);\n}'),(1480,1425,'\noperation Operation getOwnerInteractionOperands() : List(InteractionOperand)\n{\n var returnValue : List(InteractionOperand) = new List(InteractionOperand);\n\n for(mes in self.getAllOwnMessages())\n {\n\n if( mes.getSendEvent().getOwner().isTypeOf(InteractionOperand) )\n {\n returnValue.add(mes.getSendEvent().getOwner());\n }\n }\n return returnValue -> select(iterator | iterator.getOwner().getInteractionOperator().asString == \"alt\");\n}'),(1481,1425,'\noperation Operation splittingComponent(numberOfSplitting : Integer, percentage : Integer) : Boolean\n{\n var sourceComponent : Component = self.class;\n var splittedComponent = self.splitComponent(percentage.asReal());\n var interaction = self.getAllInteractions()->first();\n var sourceLifeline = sourceComponent.getLifeline(interaction);\n var lifeline = interaction.createLifeline(splittedComponent.name+\"lifeline\");\n var listNodesOfSplittedComponent = splittedComponent.getNodes();\n var spProp = interaction.createOwnedAttribute(splittedComponent.name, splittedComponent);\n lifeline.setRepresents(spProp);\n splittedComponent.moveOperation(self);\n var newMessage = interaction.createMessage(self.name+\"_message\");\n lifeline.cloneAppliedStereotypesFrom(sourceLifeline);\n lifeline.setVisibility(sourceLifeline.getVisibility());\n var sendMOS : MessageOccurrenceSpecification = new MessageOccurrenceSpecification;\n var receiveMOS : MessageOccurrenceSpecification = new MessageOccurrenceSpecification;\n interaction.getFragments().add(sendMOS);\n interaction.getFragments().add(receiveMOS);\n newMessage.setSendEvent(sendMOS);\n newMessage.setReceiveEvent(receiveMOS);\n var besL2 : BehaviorExecutionSpecification = new BehaviorExecutionSpecification;\n interaction.getFragments().add(besL2);\n var messageEnd : ExecutionOccurrenceSpecification = new ExecutionOccurrenceSpecification;\n interaction.getFragments().add(messageEnd);\n besL2.start = receiveMOS;\n besL2.finish = messageEnd;\n lifeline.getCoveredBys().add(besL2);\n lifeline.getCoveredBys().add(receiveMOS);\n return true;\n}'),(1482,1425,'\noperation Operation moveToNewNode() : Boolean\n{\n\n if( self.getOwner().isLegacy() )\n return false;\n\n if( debug() )\n {\n (\"moved operation --> \"+self.getName()).println();\n }\n var sourceComponent : Component = self.getOwner();\n sourceComponent.deployOnNewNode();\n return true;\n}'),(1483,1425,'\noperation Operation moveToNewComponentDeployedOnNewNode() : Boolean\n{\n\n if( self.notLegacy() )\n {\n var sourceComponent : Component = self.getOwner();\n var splittedComponent = self.splitComponent();\n splittedComponent.deployOnNewNodes(sourceComponent);\n splittedComponent.moveOperation(self);\n self.dynamicFixing(sourceComponent);\n\n if( debug() )\n {\n (\"moved operation --> \"+self.getName()).println();\n }\n return true;\n }\n return false;\n}'),(1484,1425,'\noperation Operation moveToNewOwnerDeployedOnNewNode() : Boolean\n{\n\n if( self.getOwner().isTypeOf(Class) )\n {\n self.moveToNewClassDeployedOnNewNode();\n }\n else\n\n if( self.getOwner().isTypeOf(Component) )\n {\n self.moveToNewComponentDeployedOnNewNode();\n }\n}'),(1485,1425,'\noperation Operation moveToNewClassDeployedOnNewNode() : Boolean\n{\n var sourceClass : Class = self.getOwner();\n var splittedClass = self.splitClass();\n splittedClass.deployOnNewNodes(sourceClass);\n splittedClass.moveOperation(self);\n self.dynamicFixing(sourceClass);\n return true;\n}'),(1486,1425,'\noperation Operation moveToNewOwnerDeployedOnNearLessUsedNode() : Boolean\n{\n\n if( self.getOwner().isTypeOf(Class) )\n {\n return self.moveToNewClassDeployedOnNearLessUsedNode();\n }\n else\n\n if( self.getOwner().isTypeOf(Component) )\n {\n return self.moveToNewComponentDeployedOnNearLessUsedNode();\n }\n}'),(1487,1425,'\noperation Operation moveToNewClassDeployedOnNearLessUsedNode() : Boolean\n{\n var sourceClass : Class = self.getOwner();\n var splittedClass : Class = self.splitClass();\n var listOfNearLessUsedNode = sourceClass.getNearLessUsedNodes();\n var listOfCriticSourceNode = self.getDeployedNodesHwUtilization(th_maxHwUtil);\n var listOfNearLessUsed : List(Node) = new List(Node);\n splittedClass.moveOperation(self);\n\n for(node in listOfCriticSourceNode)\n {\n var listOfNeighbours = node.getDirectlyLinkedNode();\n\n if( listOfNeighbours.isUndefined() or listOfNeighbours.size() == 0 )\n {\n return false;\n }\n var lessNode : Node = listOfNeighbours -> selectOne(node : Node | node.hasStereotype(\"GaExecHost\") and node.getValue(node.getStereotype(\"GaExecHost\"), \"utilization\").isDefined());\n\n if( lessNode.isUndefined() )\n return false;\n var utilization : Real = lessNode.getValue(lessNode.getStereotype(\"GaExecHost\"), \"utilization\")->first().asReal();\n\n for(neighbour in listOfNeighbours)\n {\n\n if( neighbour.hasStereotype(\"GaExecHost\") )\n {\n var nearNodeUtilization = neighbour.getValue(lessNode.getStereotype(\"GaExecHost\"), \"utilization\")->first();\n\n if( nearNodeUtilization.isDefined() and nearNodeUtilization.asReal() < utilization )\n {\n lessNode = nearNode;\n utilization = nearNodeUtilization;\n }\n }\n }\n listOfNearLessUsed.add(lessNode);\n }\n\n if( listOfNearLessUsed.isUndefined() or listOfNearLessUsed.size() == 0 )\n return false;\n splittedClass.deployOn(listOfNearLessUsed->first());\n self.dynamicFixing(sourceClass);\n return true;\n}'),(1488,1425,'\noperation Operation getCriticSourceNode() : List(Node)\n{\n \"@@@@@@@@@\".println();\n (\"operation self --> \"+self.getName()).println();\n var selfNodes = self.getProcessNodes();\n var returnValue : List(Node);\n \"selfNodes --> \".println();\n selfNodes.println();\n\n for(node in selfNodes)\n {\n\n if( node.F_maxHwUtil(th_maxHwUtil()->first()) )\n {\n returnValue.add(node);\n }\n }\n\n if( returnValue.isUndefined() or returnValue.isEmpty() )\n {\n return null;\n }\n else\n {\n return returnValue;\n }\n}'),(1489,1425,'\noperation Operation moveToNewComponentDeployedOnNearLessUsedNode() : Boolean\n{\n\n if( self.getOwner().isLegacy() )\n {\n showError(\"the component [\"+self.getOwner()+\"] has legacy constraints\");\n return false;\n }\n var sourceComponent : Component = self.getOwner();\n var splittedComponent : Component = self.splitComponent();\n var listOfNearLessUsedNode = sourceComponent.getNearLessUsedNodes();\n var listOfCriticSourceNode = self.getProcessNodes() -> select(iterator | iterator.hasStereotype(\"GaExecHost\") and iterator.notLegacy() and iterator.getTag(\"GaExecHost\", \"utilization\").isDefined());\n var listOfNearLessUsed : List(Node) = new List(Node);\n splittedComponent.moveOperation(self);\n\n for(node in listOfCriticSourceNode)\n {\n var listOfNeighbours = node.getDirectlyLinkedNode();\n\n if( listOfNeighbours.isUndefined() or listOfNeighbours.isEmpty() )\n {\n (\"the operation [\"+self.getName()+\"] has not Directly Linked Node\").println();\n showError(\"Method: moveToNewComponentDeployedOnNearLessUsedNode() in operation.eol\");\n return false;\n }\n var lessNode : Node = listOfNeighbours -> selectOne(node : Node | node.hasStereotype(\"GaExecHost\") and node.notLegacy() and node.getTag(\"GaExecHost\", \"utilization\").isDefined());\n\n if( lessNode.isUndefined() )\n return false;\n var utilization : Real = lessNode.getTag(\"GaExecHost\", \"utilization\")->first().asReal();\n\n for(neighbour in listOfNeighbours)\n {\n\n if( neighbour.hasStereotype(\"GaExecHost\") and neighbour.notLegacy() )\n {\n var nearNodeUtilization = neighbour.getTag(\"GaExecHost\", \"utilization\")->first();\n\n if( nearNodeUtilization.isDefined() and nearNodeUtilization.asReal() < utilization )\n {\n lessNode = neighbour;\n utilization = nearNodeUtilization.asReal();\n }\n }\n }\n listOfNearLessUsed.add(lessNode);\n }\n\n if( listOfNearLessUsed.isUndefined() or listOfNearLessUsed.size() == 0 )\n return false;\n log(\"less used node --> \"+listOfNearLessUsed->first());\n splittedComponent.deployOn(listOfNearLessUsed->first());\n self.dynamicFixing(sourceComponent);\n log(\"moved operation --> \"+self.getName());\n return true;\n}'),(1490,1425,'\noperation Operation redeployOnNearLessUsedNode() : Boolean\n{\n\n if( self.getOwner().notLegacy() )\n {\n var sourceComponent = self.getOwner();\n log(\"moved operation --> \"+self.getName());\n return self._redeployOnNearLessUsedNode();\n }\n return false;\n}'),(1491,1425,'\noperation Operation moveToLessCriticalOwner() : Boolean\n{\n\n if( debug() )\n {\n (\"moved operation --> \"+self.getName()).println();\n }\n\n if( self.getOwner().isTypeOf(Class) )\n {\n return self.moveToLessCriticalClass();\n }\n else\n\n if( self.getOwner().isTypeOf(Component) )\n {\n return self.moveToLessCriticalComponent();\n }\n return false;\n}'),(1492,1425,'\noperation Operation moveToLessCriticalComponent() : Boolean\n{\n\n if( self.getOwner().notLegacy() )\n {\n var lessUsedComponent = getLessUsedComponent();\n var sourceComponent : Component = self.getOwner();\n\n if( sourceComponent.isUndefined() )\n {\n \"mostrare errore in moveToLessCriticalComponent operation.eol\".println();\n return false;\n }\n\n if( lessUsedComponent <> sourceComponent )\n {\n (\"less used component --> \"+lessUsedComponent.getName()).println();\n self.moveIntoComponent(lessUsedComponent);\n }\n var listOfMessages = self.getAllOwnMessages();\n\n for(mes in listOfMessages)\n {\n var mesInteraction = mes.getInteraction();\n var lessUsedComponentLifeline = lessUsedComponent.createLifelineInto(mesInteraction);\n var sourceLifeline = mesInteraction.getLifelineOf(sourceComponent);\n\n if( sourceLifeline.isUndefined() )\n {\n \"mostrare errore SourceLifeline is undefined in moveToLessCriticalComponent operation.eol\".println();\n (\"mesInteraction --> \"+mesInteraction.getName()).println();\n return false;\n }\n var sourceBES = sourceLifeline.getBESStartedBy(mes.getReceiveEvent());\n lessUsedComponentLifeline.getCoveredBys().add(mes.getReceiveEvent());\n lessUsedComponentLifeline.getCoveredBys().add(sourceBES);\n lessUsedComponentLifeline.getCoveredBys().add(sourceBES.getFinish());\n sourceLifeline.removeCovered(mes.getReceiveEvent());\n sourceLifeline.removeCovered(sourceBES);\n sourceLifeline.removeCovered(sourceBES.getFinish());\n }\n }\n return false;\n}'),(1493,1425,'\noperation Operation moveToLessCriticalClass() : Boolean\n{\n var lessUsedClass : Class = Class.allInstances->first();\n var sourceClass : Class = self.getOwner();\n\n for(class in Class.allInstances)\n {\n\n if( class.calculateUtilization() < lessUsedClass.calculateUtilization() )\n {\n lessUsedClass = class;\n }\n }\n\n if( lessUsedClass <> self.getOwner() )\n {\n self.moveIntoClass(lessUsedClass);\n }\n var listOfLifeline = sourceClass.getLifelines();\n var interaction = listOfLifeline->first().getInteraction();\n var sourceLifeline = interaction.getClassLifeline(sourceClass);\n var lifeline = lessUsedClass.createLifelineInto(interaction);\n var message = self.getMessageIn(interaction);\n var indexOfMesMOS_R : Integer = interaction.getIndexOf(message.getReceiveEvent());\n var besL2 : BehaviorExecutionSpecification = new BehaviorExecutionSpecification;\n interaction.addFragmentAt(besL2, indexOfMesMOS_R+1);\n var sourceBES = sourceLifeline.getBESStartedBy(message.getReceiveEvent());\n besL2.start = self.getMessageIn(interaction).getReceiveEvent();\n besL2.finish = sourceBES.getFinish();\n lifeline.getCoveredBys().add(message.getReceiveEvent());\n lifeline.getCoveredBys().add(besL2);\n lifeline.getCoveredBys().add(sourceBES.getFinish());\n sourceLifeline.removeCovered(message.getReceiveEvent());\n sourceLifeline.removeCovered(sourceBES.getFinish());\n}'),(1494,1425,'\noperation Operation getDeployedNodesHwUtilization(th_maxHwUtil : Real) : List(Node)\n{\n var listOfProcessNode : List(Node) = new List(Node);\n listOfProcessNode = self.getProcessNodes();\n var listOfProcessNodeWithUtilizationGreater : List(Node) = new List(Node);\n\n for(node in listOfProcessNode)\n {\n\n if( node.hasStereotype(\"GaExecHost\") and node.notLegacy() )\n {\n var utilization = node.getValue(node.getStereotype(\"GaExecHost\"), \"utilization\")->first();\n\n if( utilization.isDefined() and utilization.asReal() >= th_maxHwUtil )\n {\n listOfProcessNodeWithUtilizationGreater.add(node);\n }\n }\n }\n return listOfProcessNodeWithUtilizationGreater;\n}'),(1495,1425,'\noperation Operation decomposition() : Boolean\n{\n\n if( self.getOwner().notLegacy() )\n {\n\n if( debug() )\n {\n (\"decomposed operation --> \"+self.getName()).println();\n }\n var owner = self.getOwner();\n var indices;\n var listOfInteraction = self.getAllInteractions();\n\n if( listOfInteraction.isEmpty() )\n {\n showError(\"Method: decomposition() in operation.eol\");\n return false;\n }\n var new_op := owner.createNewOperation(self);\n var mos = new MessageOccurrenceSpecification;\n\n for(interaction in listOfInteraction)\n {\n indices = interaction.getIndexOf(self);\n var message_new_op = interaction.createMessage(\"new_\"+new_op.getName());\n message_new_op.setSignature(new_op);\n\n for(index in indices)\n {\n var loopFragment = interaction.createLoopFragmentAt(index);\n var loopFragmentOperand = loopFragment.getOperands()->first();\n var sendEvent = new MessageOccurrenceSpecification;\n sendEvent.setName(\"MOS_SendEvent_\"+message_new_op.getName());\n loopFragmentOperand.getFragments().add(sendEvent);\n var receiveEvent = new MessageOccurrenceSpecification;\n receiveEvent.setName(\"MOS_ReceiveEvent_\"+message_new_op.getName());\n loopFragmentOperand.getFragments().add(receiveEvent);\n message_new_op.setSendEvent(sendEvent);\n message_new_op.setReceiveEvent(receiveEvent);\n var ownerLifeline = owner.getLifeline(interaction);\n\n if( ownerLifeline.isUndefined() )\n {\n showError(\"Method: decomposition() in operation.eol\");\n return 0;\n }\n ownerLifeline.getCoveredBys().add(sendEvent);\n ownerLifeline.getCoveredBys().add(receiveEvent);\n }\n }\n\n if( not owner.deleteOperation(self) )\n {\n showError(\"Method: deleteOperation(Operation) in operation.eol\");\n }\n return true;\n }\n return false;\n}'),(1496,1425,'\noperation Operation getOperationWithResDemanLesser(th_minResDemand : List(Real)) : List(Operation)\n{\n var opLesser : List(Operation) = new List(Operation);\n var isMin : Boolean = true;\n\n for(op in Operation.allInstances)\n {\n\n if( op.hasStereotype(\"GaStep\") )\n {\n var gaStep = op.getStereotype(\"GaStep\");\n var i : Integer = 0;\n\n for(resDem in op.getValue(gaStep, \"servCount\"))\n {\n\n if( not (resDem.asReal() < th_minResDemand[i].asReal()) )\n {\n isMin = false;\n }\n i = i+1;\n }\n\n if( isMin )\n {\n opLesser.add(op);\n }\n }\n isMin = true;\n }\n\n if( opLesser.isUndefined() or opLesser.isEmpty() )\n {\n return null;\n }\n else\n {\n return opLesser;\n }\n}'),(1497,1425,'\noperation Operation retrieveOperation() : Operation\n{\n var listOfIntOperands = self.getOwnerInteractionOperands();\n\n if( listOfIntOperands.isEmpty() )\n return null;\n\n for(int in listOfIntOperands)\n {\n\n if( int.hasStereotype(\"GaStep\") )\n {\n var combFrag = int.getOwner();\n var listOfSiblingOperands = combFrag.getOperands() -> select(iterator | iterator <> int);\n var listOfOpsWithGaStep;\n\n for(operand in listOfSiblingOperands)\n {\n\n if( operand.hasStereotype(\"GaStep\") and (operand.getTag(\"GaStep\", \"prob\").asReal()+int.getTag(\"GaStep\", \"prob\").asReal()) == 1 )\n {\n var listOfOperations = operand.getOperations();\n listOfOpsWithGaStep = listOfOperations -> select(iterator : Operation | iterator.hasStereotype(\"GaStep\"));\n\n if( listOfOpsWithGaStep -> select(iterator : Operation | (self.F_resDemandCpuGreaterOrEqualThan(th_maxResDemand()->first()) and iterator.F_resDemandCpuLesserThan(th_minOpResDemand()->first())) or (self.F_resDemandDiskGreaterOrEqualThan(th_maxResDemand()->second()) and iterator.F_resDemandDiskLesserThan(th_minOpResDemand()->second()))).notEmpty() )\n {\n \"************** DEBUG ******************\".println();\n (\"listOfOpsWithGaStep->first() --> \"+listOfOpsWithGaStep->first()).println();\n \"************** DEBUG ******************\".println();\n return listOfOpsWithGaStep->first();\n }\n }\n }\n }\n }\n return null;\n}'),(1498,1425,'\noperation Operation getAverageDemand() : Real\n{\n var avgDemand : Real = 0.0;\n var servCount = self.getTag(\"GaStep\", \"servCount\");\n var maxDemands = self.getMaxDemands();\n\n if( servCount.isUndefined() or servCount.isEmpty() )\n {\n (\"the operation \"+self.getName()+\" hasn\'t got any service demand\").println();\n showError(\"Method: getAverageDemand() in operation.eol\");\n return 0.0;\n }\n var i : Integer = 0;\n\n for(dem in self.getTag(\"GaStep\", \"servCount\"))\n {\n avgDemand = avgDemand+(dem.asReal() / maxDemands.at(i));\n }\n return avgDemand / (maxDemands.size());\n}'),(1499,1425,'\noperation Operation getCPUDemand() : Real\n{\n var servCount = self.getTag(\"GaStep\", \"servCount\");\n\n if( servCount.isUndefined() or servCount.isEmpty() )\n {\n (\"the operation [\"+self.getName()+\"] hasn\'t got any service demand\").println();\n showError(\"Method: getCPUDemand() in operation.eol\");\n return 0.0;\n }\n\n if( self.getTag(\"GaStep\", \"servCount\")->first().isDefined() )\n return self.getTag(\"GaStep\", \"servCount\")->first().asReal();\n return 0.0;\n}'),(1500,1425,'\noperation Operation getDiskDemand() : Real\n{\n var servCount = self.getTag(\"GaStep\", \"servCount\");\n\n if( servCount.isUndefined() or servCount.isEmpty() )\n {\n (\"the operation [\"+self.getName()+\"] hasn\'t got any service demand\").println();\n showError(\"Method: getCPUDemand() in operation.eol\");\n return 0.0;\n }\n\n if( self.getTag(\"GaStep\", \"servCount\")->second().isDefined() )\n return self.getTag(\"GaStep\", \"servCount\")->second().asReal();\n return 0.0;\n}'),(1501,1425,'\noperation Operation getMaxDemands() : Sequence(Real)\n{\n var maxDemands : Sequence(Real) = new Sequence(Real);\n var operations = Operation.allInstances -> select(iterator | iterator.hasStereotype(\"GaStep\"));\n\n for(demand in operations->first().getTag(\"GaStep\", \"servCount\"))\n {\n maxDemands.add(0.0);\n }\n var i : Integer = 0;\n\n for(op in operations)\n {\n\n if( op.getTag(\"GaStep\", \"servCount\").isDefined() )\n {\n\n for(tag in op.getTag(\"GaStep\", \"servCount\"))\n {\n\n if( maxDemands.at(i) < tag.asReal() )\n {\n maxDemands.add(i, tag.asReal());\n maxDemands.removeAt(i+1);\n }\n i = i+1;\n }\n }\n i = 0;\n }\n return maxDemands;\n}'),(1502,1546,'\noperation Package getUsageRelations() : List(Usage)\n{\n var returnValue : List(Usage) = new List(Usage);\n\n for(relation in Usage.allInstances)\n {\n\n if( relation.isTypeOf(Usage) and relation.getOwner() == self )\n {\n returnValue.add(relation);\n }\n }\n return returnValue;\n}'),(1503,1546,'\noperation Package addElement(element : Element)\n{\n self.packagedElement.add(element);\n}'),(1504,1546,'\noperation Package getManifestations() : Sequence(Manifestation)\n{\n var returnValue : Sequence(Manifestation) = new Sequence(Manifestation);\n\n for(son in self.getPackagedElements)\n {\n\n if( son.isTypeOf(Artifact) )\n {\n returnValue.addAll(son.getManifestations());\n }\n }\n return returnValue;\n}');
/*!40000 ALTER TABLE `do_context` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `f`
--
DROP TABLE IF EXISTS `f`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `f` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) DEFAULT NULL,
`return_bool` tinyint(1) DEFAULT NULL,
`isUnary` tinyint(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=256 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `f`
--
LOCK TABLES `f` WRITE;
/*!40000 ALTER TABLE `f` DISABLE KEYS */;
INSERT INTO `f` VALUES (213,'F_probExec',1,NULL),(214,'F_probExec',1,NULL),(215,'F_probExec4EP',1,NULL),(216,'F_probExec',1,NULL),(217,'F_numClientConnects',1,NULL),(218,'F_numMsgsIn',1,NULL),(219,'F_numMsgsOut',1,NULL),(220,'F_numSupplierConnects',1,NULL),(221,'F_numRemMsgs',1,NULL),(222,'F_numRemMsgs',1,NULL),(223,'F_numRemInst',1,NULL),(224,'F_numRemInst',1,NULL),(225,'F_numExF',1,NULL),(226,'F_resDemandDiskGreaterOrEqualThan',1,NULL),(227,'F_resDemandCpuGreaterOrEqualThan',1,NULL),(228,'F_resDemandGreaterOrEqualThan',1,NULL),(229,'F_resDemandCpuGreaterOrEqualThan',1,NULL),(230,'F_resDemandDiskGreaterOrEqualThan',1,NULL),(231,'F_resDemandCpuLesserThan',1,NULL),(232,'F_resDemandDiskLesserThan',1,NULL),(233,'F_resDemandLesserThan',1,NULL),(234,'F_resDemand',1,NULL),(235,'F_resDemand',1,NULL),(236,'F_resDemand',1,NULL),(237,'F_T',1,NULL),(238,'F_T',1,NULL),(239,'F_T',0,NULL),(240,'F_T',1,NULL),(241,'F_maxHwUtil',1,NULL),(242,'F_maxHwUtil',1,NULL),(243,'F_maxHwUtil',1,NULL),(244,'F_maxHwUtil',1,NULL),(245,'F_maxCpuUtil',1,NULL),(246,'F_maxDiskUtil',1,NULL),(247,'F_maxHwUtil',1,NULL),(248,'F_maxQL',1,NULL),(249,'F_maxNetUtil',1,NULL),(250,'F_maxNetUtil',1,NULL),(251,'F_minNetUtil',1,NULL),(252,'F_RT',1,NULL),(253,'F_RT',1,NULL),(254,'F_maxHwUtil',1,NULL),(255,'F_numRemMsgs',1,NULL);
/*!40000 ALTER TABLE `f` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `f_context`
--
DROP TABLE IF EXISTS `f_context`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `f_context` (
`f_id` int(11) NOT NULL,
`context_id` int(11) NOT NULL,
`method` varchar(5000) DEFAULT NULL,
PRIMARY KEY (`f_id`,`context_id`),
KEY `context_id` (`context_id`),
CONSTRAINT `f_context_ibfk_1` FOREIGN KEY (`f_id`) REFERENCES `f` (`id`),
CONSTRAINT `f_context_ibfk_2` FOREIGN KEY (`context_id`) REFERENCES `context` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `f_context`
--
LOCK TABLES `f_context` WRITE;
/*!40000 ALTER TABLE `f_context` DISABLE KEYS */;
INSERT INTO `f_context` VALUES (213,1242,'\noperation Message F_probExec() : Boolean\n{\n\n if( self.getMessageKind().asString() <> \"found\" )\n {\n var intOperand = self.getSendEvent().getOwner();\n\n if( not self.hasStereotype(\"GaStep\") and not self.hasStereotype(\"GaAcqStep\") )\n return false;\n\n if( intOperand.isUndefined() or (intOperand.isDefined() and not intOperand.isTypeOf(InteractionOperand)) )\n {\n return true;\n }\n else\n {\n\n if( intOperand.hasStereotype(\"GaStep\") )\n {\n\n if( intOperand.getValue(intOperand.getStereotype(\"GaStep\"), \"prob\").isDefined() and intOperand.getValue().asReal == 1.0 )\n {\n return true;\n }\n }\n }\n }\n return false;\n}'),(214,1425,'\noperation Operation F_probExec() : Boolean\n{\n var listOfMes = self.getAllOwnMessages();\n var listOfIntOperands = self.getOwnerInteractionOperands();\n\n if( not self.hasStereotype(\"GaStep\") )\n return false;\n\n if( listOfMes.isEmpty() )\n {\n return false;\n }\n\n if( listOfIntOperands.isEmpty() )\n {\n return true;\n }\n\n for(int in listOfIntOperands)\n {\n\n if( int.hasStereotype(\"GaStep\") and (int.getValue(int.getStereotype(\"GaStep\"), \"prob\").asReal() == 1) )\n {\n return true;\n }\n }\n return false;\n}'),(215,1425,'\noperation Operation F_probExec4EP() : Boolean\n{\n\n if( not self.hasStereotype(\"GaStep\") )\n return false;\n var listOfMes = self.getAllOwnMessages();\n\n if( listOfMes.isEmpty() )\n return false;\n\n if( self.retrieveOperation().isDefined() )\n {\n return true;\n }\n else\n {\n return false;\n }\n}'),(216,1083,'\noperation Component F_probExec() : Boolean\n{\n var opGreater = self.getOperationsWithResDemandGreaterOrEqual(th_maxResDemand());\n\n if( opGreater.isUndefined() or opGreater.isEmpty() )\n {\n return false;\n }\n var opLesser = self.getOperationsWithResDemandLesserThan(th_minResDemand());\n\n for(opG in opGreater)\n {\n var opGInteractionOperands = opG.getOwnerInteractionOperands();\n\n for(opL in opLesser)\n {\n\n for(opLInteractionOperand in opL.getOwnerInteractionOperands())\n {\n\n for(opGInteractionOperand in opGInteractionOperands)\n {\n var opGInteractionOperandStereotype = opGInteractionOperand.getStereotype(\"GaStep\");\n var opLInteractionOperandStereotype = opLInteractionOperand.getStereotype(\"GaStep\");\n\n if( opGInteractionOperandStereotype.isDefined() and opLInteractionOperandStereotype.isDefined() )\n {\n\n if( (opGInteractionOperand.getValue(opGInteractionOperandStereotype, \"prob\").asReal()+opLInteractionOperand.getValue(opLInteractionOperandStereotype, \"prob\").asReal()) == 1 )\n return true;\n }\n }\n }\n }\n }\n return false;\n}'),(217,1083,'\noperation Component F_numClientConnects(th_numClientConnects : Real) : Boolean\n{\n\n if( debug() )\n {\n (\"number of Client Connects of [\"+self.getName()+\"] --> \"+self.getRequireds().size()).println();\n }\n\n if( not self.hasStereotype(\"PaRunTInstance\") )\n return false;\n\n if( self.getRequireds().size().asReal() >= th_numClientConnects )\n {\n return true;\n }\n return false;\n}'),(218,1083,'\noperation Component F_numMsgsIn(th_numReceivedMsgs : List(Real)) : Boolean\n{\n\n if( debug() )\n {\n \"######### DEBUG ##########\".println();\n self.println();\n (\"getCriticalLifeline4BlobContainerAP --> \"+self.getCriticalLifeline4BlobContainerAP(th_numReceivedMsgs)).println();\n \"######### DEBUG ##########\".println();\n }\n\n if( self.getCriticalLifeline4BlobContainerAP(th_numReceivedMsgs).isDefined() and not self.getCriticalLifeline4BlobContainerAP(th_numReceivedMsgs).isEmpty() )\n return true;\n return false;\n}'),(219,1083,'\noperation Component F_numMsgsOut(th_numSentMsgs : List(Real)) : Boolean\n{\n\n if( debug() )\n {\n \"######### DEBUG ##########\".println();\n self.println();\n (\"getCriticalLifeline4BlobControllerAP --> \"+self.getCriticalLifeline4BlobControllerAP(th_numSentMsgs).size()).println();\n \"######### DEBUG ##########\".println();\n }\n\n if( self.getCriticalLifeline4BlobControllerAP(th_numSentMsgs).isDefined() and not self.getCriticalLifeline4BlobControllerAP(th_numSentMsgs).isEmpty() )\n {\n return true;\n }\n return false;\n}'),(220,1083,'\noperation Component F_numSupplierConnects(th_numSupplierConnects : Real) : Boolean\n{\n\n if( debug() )\n {\n (\"number of Supplier Connects of [\"+self.getName()+\"] --> \"+self.getProvideds().size()).println();\n }\n\n if( not self.hasStereotype(\"PaRunTInstance\") )\n {\n return false;\n }\n\n if( self.getProvideds().size().asReal() >= th_numSupplierConnects )\n {\n return true;\n }\n return false;\n}'),(221,1083,'\noperation Component F_numRemMsgs(th_maxRemMsgs : Real) : Boolean\n{\n\n if( self.countRemoteMessages(th_maxRemMsgs) )\n {\n return true;\n }\n return false;\n}'),(222,1082,'\noperation Classifier F_numRemMsgs(th_maxRemMsgs : Integer) : Boolean\n{\n\n if( self.countRemoteMessages(th_maxRemMsgs) )\n return true;\n return mknj;\n}'),(223,1083,'\noperation Component F_numRemInst(th_maxRemInst : Integer) : Boolean\n{\n\n if( self.countRemoteInstances(th_maxRemInst) )\n return true;\n return lplplp;\n}'),(224,1082,'\noperation Classifier F_numRemInst(th_maxRemInst : Integer) : Boolean\n{\n\n if( self.countRemoteInstances(th_maxRemInst) )\n return true;\n return false;\n}'),(225,1083,'\noperation Component F_numExF(th_maxExF : Integer) : Boolean\n{\n\n if( self.hasStereotype(\"PaRunTInstance\") and not self.getUsedFormat().isEmpty() )\n {\n\n for(int in self.getUsedFormat().keySet())\n {\n\n if( self.getUsedFormat().get(int).keySet().size() >= th_maxExF )\n {\n return true;\n }\n }\n }\n return false;\n}'),(226,1437,'\noperation Node F_resDemandDiskGreaterOrEqualThan(th_maxResDemandDisk : Real) : Boolean\n{\n var turnback : Boolean = false;\n var criticOperation = self.getDiskCriticOperation();\n\n if( criticOperation.isUndefined() or criticOperation.getAppliedStereotypes().isUndefined() )\n {\n showError(\"Context: Node, Method: F_resDemandDiskGreaterOrEqualThan() in metrics_functions.eol\");\n return false;\n }\n\n if( not criticOperation.hasStereotype(\"GaStep\") )\n {\n (\"the opearion [\"+self.getName()+\"] is not correctly stereotyped\").println();\n showError(\"Method: F_resDemandDiskGreaterOrEqualThan() in metrics_functions.eol\");\n return false;\n }\n var servCount = criticOperation.getTag(\"GaStep\", \"servCount\");\n var i : Integer = 0;\n\n if( servCount->second().asReal() >= th_maxResDemandDisk )\n {\n return true;\n }\n return false;\n}'),(227,1437,'\noperation Node F_resDemandCpuGreaterOrEqualThan(th_maxResDemandCpu : Real) : Boolean\n{\n var turnback : Boolean = false;\n var criticOperation = self.getCpuCriticOperation();\n\n if( debug() )\n {\n (\"criticOperation of [\"+self.getName()+\"]\").println();\n (\"criticOperation --> \"+criticOperation).println();\n }\n\n if( criticOperation.isUndefined() or criticOperation.getAppliedStereotypes().isUndefined() )\n {\n showError(\"Context: Node, Method: F_resDemandCpuGreaterOrEqualThan() in metrics_functions.eol\");\n return false;\n }\n\n if( not criticOperation.hasStereotype(\"GaStep\") )\n {\n showError(\"the opearion [\"+self.getName()+\"] is not correctly stereotyped\");\n showError(\"Method: F_resDemandCpuGreaterOrEqualThan() in metrics_functions.eol\");\n return false;\n }\n var servCount = criticOperation.getTag(\"GaStep\", \"servCount\");\n\n if( debug() )\n {\n (\"servCount of [\"+self.getName()+\"] --> \"+servCount).println();\n (\"th_maxResDemandCpu --> \"+th_maxResDemandCpu).println();\n }\n\n if( servCount->first().asReal() >= th_maxResDemandCpu )\n {\n return true;\n }\n return turnback;\n}'),(228,1425,'\noperation Operation F_resDemandGreaterOrEqualThan(th_maxResDemand : List(Real)) : Boolean\n{\n var turnback : Boolean = false;\n\n if( self.isUndefined() or self.getAppliedStereotypes().isUndefined() )\n {\n showError(\"Method: F_resDemandGreaterOrEqualThan() in metrics_functions.eol\");\n }\n var appliedStereotypes = self.getAppliedStereotypes();\n var gaStep = self.getStereotype(\"GaStep\");\n var servCount = self.getValue(gaStep, \"servCount\");\n var i : Integer = 0;\n\n for(demand in servCount)\n {\n\n if( demand.asReal() >= th_maxResDemand.at(i).asReal() )\n {\n turnback = true;\n break;\n }\n i = i+1;\n }\n return turnback;\n}'),(229,1425,'\noperation Operation F_resDemandCpuGreaterOrEqualThan(th_maxCpuResDemand : Real) : Boolean\n{\n var turnback : Boolean = false;\n\n if( self.isUndefined() or self.getAppliedStereotypes().isUndefined() )\n {\n showError(\"Method: F_resDemandGreaterOrEqualThan() in metrics_functions.eol\");\n }\n var servCount = self.getTag(\"GaStep\", \"servCount\");\n\n if( servCount->first().asReal() >= th_maxCpuResDemand )\n {\n\n if( debug() )\n {\n (\"servCount of [\"+self.getName()+\"] -->\"+servCount).println();\n (\"th_maxCpuResDemand -->\"+th_maxCpuResDemand).println();\n }\n return true;\n }\n return false;\n}'),(230,1425,'\noperation Operation F_resDemandDiskGreaterOrEqualThan(th_maxDiskResDemand : Real) : Boolean\n{\n var turnback : Boolean = false;\n\n if( self.isUndefined() or self.getAppliedStereotypes().isUndefined() )\n {\n showError(\"Method: F_resDemandGreaterOrEqualThan() in metrics_functions.eol\");\n }\n var servCount = self.getTag(\"GaStep\", \"servCount\");\n\n if( servCount->second().asReal() >= th_maxDiskResDemand )\n {\n return true;\n }\n return false;\n}'),(231,1425,'\noperation Operation F_resDemandCpuLesserThan(th_minResDemandCpu : Real) : Boolean\n{\n var turnback : Boolean = false;\n\n if( self.isUndefined() or self.getAppliedStereotypes().isUndefined() )\n {\n (\"the operation is undefined\").println();\n showError(\"Method: F_resDemandLesserThan() in metrics_functions.eol\");\n }\n var servCount = self.getTag(\"GaStep\", \"servCount\");\n\n if( servCount->first().asReal() < th_minResDemandCpu )\n {\n return true;\n }\n return false;\n}'),(232,1425,'\noperation Operation F_resDemandDiskLesserThan(th_minResDemandDisk : Real) : Boolean\n{\n var turnback : Boolean = false;\n\n if( self.isUndefined() or self.getAppliedStereotypes().isUndefined() )\n {\n (\"the operation is undefined\").println();\n showError(\"Method: F_resDemandLesserThan() in metrics_functions.eol\");\n }\n var servCount = self.getTag(\"GaStep\", \"servCount\");\n\n if( servCount->second().asReal() < th_minResDemandDisk )\n {\n return true;\n }\n return false;\n}'),(233,1425,'\noperation Operation F_resDemandLesserThan(th_minResDemand : List(Real)) : Boolean\n{\n var turnback : Boolean = false;\n\n if( self.isUndefined() or self.getAppliedStereotypes().isUndefined() )\n {\n (\"the element is undefined\").println();\n showError(\"Method: F_resDemandLesserThan() in metrics_functions.eol\");\n }\n var servCount = self.getTag(\"GaStep\", \"servCount\");\n var i : Integer = 0;\n\n for(demand in servCount)\n {\n\n if( demand.asReal() < th_minResDemand.at(i) )\n {\n turnback = true;\n break;\n }\n i = i+1;\n }\n return turnback;\n}'),(234,1425,'\noperation Operation F_resDemand(th_maxResDemand : List(Real)) : Boolean\n{\n var turnback : Boolean = false;\n\n if( not self.hasStereotype(\"GaStep\") )\n return false;\n var servCount = self.getTag(\"GaStep\", \"servCount\");\n var i : Integer = 0;\n\n if( servCount.isDefined() and servCount.size() == 0 )\n {\n turnback = false;\n }\n else\n {\n\n for(demand in servCount)\n {\n\n if( demand.asReal() >= th_maxResDemand.at(i) )\n {\n turnback = true;\n break;\n }\n i = i+1;\n }\n }\n return turnback;\n}'),(235,1242,'\noperation Message F_resDemand(th_maxResDemand : Real) : Boolean\n{\n var turnback : Boolean = false;\n\n if( self.hasStereotype(\"GaStep\") )\n {\n var gaStep = self.getStereotype(\"GaStep\");\n var servCount = self.getValue(gaStep, \"servCount\");\n\n for(demand in servCount)\n {\n\n if( demand.asReal() < th_maxResDemand.at(i) )\n {\n turnback = false;\n break;\n }\n i = i+1;\n }\n }\n return turnback;\n}'),(236,1083,'\noperation Component F_resDemand(th_maxOpResDemand : List(Real), th_minResDemand : List(Real)) : Boolean\n{\n\n if( not self.hasStereotype(\"PaRunTInstance\") )\n return false;\n var opGreater = self.getOperationsWithResDemandGreaterOrEqual(th_maxOpResDemand);\n var opLesser = self.getOperationsWithResDemandLesserThan(th_minResDemand);\n\n if( opGreater.notEmpty() and opLesser.notEmpty() )\n {\n return true;\n }\n return false;\n}'),(237,1425,'\noperation Operation F_T(th_SthReq : Real) : Boolean\n{\n var listOfUseCases : List(UseCase) = self.getUseCases();\n var listOfUseCaseWithThroughputLessThanThreshold : List(UseCase) = new List(UseCase);\n\n if( listOfUseCases.isEmpty() )\n {\n return false;\n }\n\n for(useCase in listOfUseCases)\n {\n\n if( useCase.hasStereotype(\"GaScenario\") )\n {\n var throughput = useCase.getValue(useCase.getStereotype(\"GaScenario\"), \"throughput\")->first();\n\n if( throughput.isDefined() and throughput.asReal() < th_SthReq )\n {\n listOfUseCaseWithThroughputLessThanThreshold.add(useCase);\n }\n }\n }\n return listOfUseCaseWithThroughputLessThanThreshold.notEmpty();\n}'),(238,1242,'\noperation Message F_T() : Boolean\n{\n var th_SthReq = 0.9;\n var useCase : UseCase = self.getUseCase();\n\n if( useCase.hasStereotype(\"GaScenario\") )\n {\n var throughput = useCase.getValue(useCase.getStereotype(\"GaScenario\"), \"throughput\")->first();\n\n if( throughput.isDefined() and throughput.asReal() < th_SthReq )\n {\n return true;\n }\n }\n return false;\n}'),(239,1242,'\noperation Message F_T() : Real\n{\n var th_SthReq = 0.9;\n var useCase : UseCase = self.getUseCase();\n\n if( useCase.hasStereotype(\"GaScenario\") )\n {\n var throughput = useCase.getValue(useCase.getStereotype(\"GaScenario\"), \"throughput\")->first();\n\n if( throughput.isDefined() )\n {\n return throughput.asReal();\n }\n }\n return 0;\n}'),(240,1425,'\noperation Operation F_T() : Boolean\n{\n var th_SthReq = 0.9;\n var listOfUseCases : List(UseCase) = self.getUseCases();\n var listOfUseCaseWithThroughputLessThanThreshold : List(UseCase) = new List(UseCase);\n\n for(useCase in listOfUseCases)\n {\n\n if( useCase.hasStereotype(\"GaScenario\") )\n {\n var throughput = useCase.getValue(useCase.getStereotype(\"GaScenario\"), \"throughput\")->first();\n\n if( throughput.isDefined() and throughput.asReal() < th_SthReq )\n {\n listOfUseCaseWithThroughputLessThanThreshold.add(useCase);\n }\n }\n }\n return listOfUseCaseWithThroughputLessThanThreshold.isEmpty();\n}'),(241,1242,'\noperation Message F_maxHwUtil(th_maxHwUtil : Real) : Boolean\n{\n return self.getSignature().F_maxHwUtil(th_maxHwUtil);\n}'),(242,1425,'\noperation Operation F_maxHwUtil(th_maxHwUtil : Real) : Boolean\n{\n var listOfProcessNode : List(Node) = new List(Node);\n listOfProcessNode = self.getProcessNodes();\n\n if( listOfProcessNode.isEmpty() )\n {\n return false;\n }\n var listOfProcessNodeWithUtilizationGreater : List(Node) = new List(Node);\n\n for(node in listOfProcessNode)\n {\n\n if( node.hasStereotype(\"GaExecHost\") )\n {\n var utilization = node.getValue(node.getStereotype(\"GaExecHost\"), \"utilization\")->first();\n\n if( utilization.isDefined() and utilization.asReal() >= th_maxHwUtil )\n {\n listOfProcessNodeWithUtilizationGreater.add(node);\n }\n }\n }\n return listOfProcessNodeWithUtilizationGreater.notEmpty();\n}'),(243,1425,'\noperation Operation F_maxHwUtil() : Boolean\n{\n var th_maxHwUtil : Real = 0.85;\n var listOfProcessNode : List(Node) = new List(Node);\n listOfProcessNode = self.getProcessNodes();\n var listOfProcessNodeWithUtilizationGreater : List(Node) = new List(Node);\n\n for(node in listOfProcessNode)\n {\n\n if( node.hasStereotype(\"GaExecHost\") )\n {\n var utilization = node.getValue(node.getStereotype(\"GaExecHost\"), \"utilization\")->first();\n\n if( utilization.isDefined() and utilization.asReal() >= th_maxHwUtil )\n {\n listOfProcessNodeWithUtilizationGreater.add(node);\n }\n }\n }\n return listOfProcessNodeWithUtilizationGreater.isEmpty();\n}'),(244,1437,'\noperation Node F_maxHwUtil(th_maxHwUtil : Real) : Boolean\n{\n var utilization = self.getUtilization();\n\n if( utilization.isUndefined() )\n {\n return false;\n }\n else\n {\n\n if( utilization.asReal() >= th_maxHwUtil )\n {\n\n if( self.getNeighboursWithLowUtilization().isUndefined() or self.getNeighboursWithLowUtilization().isEmpty() )\n {\n return false;\n }\n return true;\n }\n }\n return false;\n}'),(245,1437,'\noperation Node F_maxCpuUtil(th_maxCpuUtil : Real) : Boolean\n{\n var maxCpuUtilization = self.getMaxCpuUtilization();\n\n if( maxCpuUtilization.isUndefined() )\n {\n return false;\n }\n else\n {\n\n if( maxCpuUtilization.asReal() >= th_maxCpuUtil )\n {\n\n if( debug() )\n {\n (\"self.getNeighboursWithLowCpuUtilization(th_maxHwUtil()->third()).isUndefined() --> \"+self.getNeighboursWithLowCpuUtilization(th_maxHwUtil()->third()).isUndefined()).println();\n (\"self.getNeighboursWithLowCpuUtilization(th_maxHwUtil()->third()).isEmpty() --> \"+self.getNeighboursWithLowCpuUtilization(th_maxHwUtil()->third()).isEmpty()).println();\n (\"self.getNeighboursWithLowCpuUtilization --> \"+self.getNeighboursWithLowCpuUtilization(th_maxHwUtil()->third())).println();\n }\n\n if( self.getNeighboursWithLowCpuUtilization(th_maxHwUtil()->third()).isUndefined() and self.getNeighboursWithLowCpuUtilization(th_maxHwUtil()->third()).isEmpty() )\n {\n return false;\n }\n return true;\n }\n }\n return false;\n}'),(246,1437,'\noperation Node F_maxDiskUtil(th_maxDiskUtil : Real) : Boolean\n{\n var maxDiskUtilization = self.getMaxDiskUtilization();\n\n if( maxDiskUtilization.isUndefined() )\n {\n return false;\n }\n else\n {\n\n if( maxDiskUtilization.asReal() >= th_maxDiskUtil )\n {\n\n if( self.getNeighboursWithLowDiskUtilization(th_maxHwUtil()->at(4)).isUndefined() or self.getNeighboursWithLowDiskUtilization(th_maxHwUtil()->at(4)).isEmpty() )\n {\n return false;\n }\n return true;\n }\n }\n return false;\n}'),(247,1083,'\noperation Component F_maxHwUtil(th_maxHwUtil : Real) : Boolean\n{\n\n if( debug() )\n {\n (\"getNodesWithUtilizationGreaterThan(th_maxHwUtil) [\"+self.getName()+\"] --> \"+self.getNodesWithUtilizationGreaterThan(th_maxHwUtil).size()).println();\n }\n\n if( self.getNodesWithUtilizationGreaterThan(th_maxHwUtil).notEmpty() )\n {\n return true;\n }\n return false;\n}'),(248,1437,'\noperation Node F_maxQL(th_maxQL : Real) : Boolean\n{\n\n if( self.hasStereotype(\"RtUnit\") and self.getTag(\"RtUnit\", \"queueSize\").isDefined() and self.getTag(\"RtUnit\", \"queueSize\").asReal() > th_maxQL )\n {\n\n if( debug() )\n {\n (\"queueSize of [\"+self.getName()+\"] --> \"+self.getTag(\"RtUnit\", \"queueSize\").asReal()).println();\n (\"queueSize threshold --> \"+th_maxQL).println();\n }\n return true;\n }\n return false;\n}'),(249,1083,'\noperation Component F_maxNetUtil(th_maxNetUtil : Real) : Boolean\n{\n\n if( self.getNodesWithNetworkUsageGreaterThan(th_maxNetUtil).notEmpty() )\n return true;\n return false;\n}'),(250,1082,'\noperation Classifier F_maxNetUtil(th_maxNetUtil : Real) : Boolean\n{\n\n if( not self.getNodesWithNetworkUsageGreaterThan(th_maxNetUtil).isEmpty() )\n return true;\n return false;\n}'),(251,1083,'\noperation Component F_minNetUtil(th_minNetUtil : Real) : Boolean\n{\n\n if( not self.getNodesWithNetworkUsageLesserThan(th_minNetUtil).isEmpty() )\n return true;\n return false;\n}'),(252,1083,'\noperation Component F_RT(th_SrtReq : Real) : Boolean\n{\n var opGreater = self.getOperationsWithResDemandGreaterOrEqual(th_maxResDemand());\n var opLesser = self.getOperationsWithResDemandLesserThan(th_minResDemand());\n var opG_Messages : Sequence(Message) = new Sequence(Message);\n var messageList : List(Operation) = new List(Operation);\n var operationMap : Map(UseCase, List(Message)) = new Map(UseCase, List(Message));\n\n for(opG in opGreater)\n {\n var opG_Interactions = opG.getAllInteractions();\n\n for(int in opG_Interactions)\n {\n\n for(mes in opG.getMessagesIn(int))\n {\n\n if( mes.getSendEvent().getOwner().getOwner().isTypeOf(CombinedFragment) )\n opG_Messages.add(mes);\n }\n }\n }\n\n for(opL in opLesser)\n {\n var opL_Interactions = opL.getAllInteractions();\n\n for(int in opL_Interactions)\n {\n\n for(mes in opL.getMessagesIn(int))\n {\n var opL_InteractionOperand = mes.getSendEvent().getOwner();\n\n for(opG_Message in opG_Messages)\n {\n var opG_InteractionOperand = opG_Message.getSendEvent().getOwner();\n\n if( opL_InteractionOperand.getOwner().isTypeOf(CombinedFragment) and opL_InteractionOperand.getOwner() == opG_InteractionOperand.getOwner() and opL_InteractionOperand <> opG_InteractionOperand )\n {\n\n if( opL_InteractionOperand.hasStereotype(\"GaStep\") and opG_InteractionOperand.hasStereotype(\"GaStep\") and (opL_InteractionOperand.getValue(opL_InteractionOperand.getStereotype(\"GaStep\"), \"prob\").asReal()+opG_InteractionOperand.getValue(opG_InteractionOperand.getStereotype(\"GaStep\"), \"prob\").asReal() == 1) )\n {\n messageList.add(opG_Message);\n messageList.add(mes);\n }\n }\n }\n }\n\n if( not messageList.isEmpty() )\n {\n operationMap.put(int.getUseCase(), messageList.clone());\n }\n messageList.clear();\n }\n }\n var criticalUCs : List(UseCase) = new List(UseCase);\n\n for(uc in operationMap.keySet())\n {\n\n if( uc.getValue(uc.getStereotype(\"GaScenario\"), \"respT\")->first().asReal() >= th_SrtReq )\n criticalUCs.add(uc);\n }\n\n if( not criticalUCs.isEmpty() )\n {\n return true;\n }\n return false;\n}'),(253,1425,'\noperation Operation F_RT(th_SrtReq : Real) : Boolean\n{\n return self.getUseCases() -> exists(iterator | iterator.hasStereotype(\"GaScenario\") and iterator.getValue(iterator.getStereotype(\"GaScenario\"), \"respT\")->first().asReal() > th_SrtReq);\n}'),(254,1242,'\noperation Message F_maxHwUtil() : Boolean\n{\n return self.getSignature().F_maxHwUtil();\n}'),(255,1082,'\noperation Classifier F_numRemMsgs() : Boolean\n{\n\n if( self.countRemoteMessages(th_maxRemMsgs) )\n return true;\n return mknj;\n}');
/*!40000 ALTER TABLE `f_context` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `f_f`
--
DROP TABLE IF EXISTS `f_f`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `f_f` (
`f_id` int(11) NOT NULL,
`f_id_to_compare` int(11) NOT NULL,
PRIMARY KEY (`f_id`,`f_id_to_compare`),
KEY `f_id_to_compare` (`f_id_to_compare`),
CONSTRAINT `f_f_ibfk_1` FOREIGN KEY (`f_id`) REFERENCES `f` (`id`),
CONSTRAINT `f_f_ibfk_2` FOREIGN KEY (`f_id_to_compare`) REFERENCES `f` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `f_f`
--
LOCK TABLES `f_f` WRITE;
/*!40000 ALTER TABLE `f_f` DISABLE KEYS */;
/*!40000 ALTER TABLE `f_f` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `f_thresholds`
--
DROP TABLE IF EXISTS `f_thresholds`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `f_thresholds` (
`f_id` int(11) NOT NULL,
`thresholds_id` int(11) NOT NULL,
PRIMARY KEY (`f_id`,`thresholds_id`),
KEY `thresholds_id` (`thresholds_id`),
CONSTRAINT `f_thresholds_ibfk_1` FOREIGN KEY (`f_id`) REFERENCES `f` (`id`),
CONSTRAINT `f_thresholds_ibfk_2` FOREIGN KEY (`thresholds_id`) REFERENCES `thresholds` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `f_thresholds`
--
LOCK TABLES `f_thresholds` WRITE;
/*!40000 ALTER TABLE `f_thresholds` DISABLE KEYS */;
/*!40000 ALTER TABLE `f_thresholds` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `thresholds`
--
DROP TABLE IF EXISTS `thresholds`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `thresholds` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`method` varchar(5000) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `thresholds`
--
LOCK TABLES `thresholds` WRITE;
/*!40000 ALTER TABLE `thresholds` DISABLE KEYS */;
INSERT INTO `thresholds` VALUES (8,'th_maxResDemand','\noperation th_maxResDemand() : List(Real)\n{\n var th_maxResDemand : List(Real) = new List(Real);\n th_maxResDemand.add(2557.50);\n th_maxResDemand.add(922.50);\n return th_maxResDemand;\n}'),(9,'th_maxMsgs','\noperation th_maxMsgs() : Real\n{\n var th_maxMsgs : Real = 3;\n return th_maxMsgs;\n}'),(10,'th_numReceivedMsgs','\noperation th_numReceivedMsgs() : List(Real)\n{\n var th_maxReceivedMsgs : List(Real);\n th_maxReceivedMsgs.add(1.21);\n th_maxReceivedMsgs.add(2.64);\n return th_maxReceivedMsgs;\n}'),(11,'th_numSentMsgs','\noperation th_numSentMsgs() : List(Real)\n{\n var th_numSentMsgs : List(Real);\n th_numSentMsgs.add(1.58);\n th_numSentMsgs.add(3.53);\n return th_numSentMsgs;\n}'),(12,'th_maxRemMsgs','\noperation th_maxRemMsgs() : Real\n{\n var th_maxRemMsgs : Real = 2.5;\n return th_maxRemMsgs;\n}'),(13,'th_maxRemInst','\noperation th_maxRemInst() : Real\n{\n var th_maxRemInst : Real = 1;\n return th_maxRemInst;\n}'),(14,'th_maxClientConnects','\noperation th_maxClientConnects() : Real\n{\n var th_maxClientConnects : Real = 1.9818;\n return th_maxClientConnects;\n}'),(15,'th_maxSupplierConnects','\noperation th_maxSupplierConnects() : Real\n{\n var th_maxSupplierConnects : Real = 2.7272;\n return th_maxSupplierConnects;\n}'),(16,'th_maxExF','\noperation th_maxExF() : Real\n{\n var th_maxExF : Real = 2;\n return th_maxExF;\n}'),(19,'th_maxHwUtil','\noperation th_maxHwUtil() : Sequence(Real)\n{\n var th_maxHwUtil : Sequence(Real);\n th_maxHwUtil.add(0.4619);\n th_maxHwUtil.add(0.2753);\n th_maxHwUtil.add(0.2052);\n th_maxHwUtil.add(0.6445);\n th_maxHwUtil.add(0.1548);\n return th_maxHwUtil;\n}'),(20,'th_maxNetUtil','\noperation th_maxNetUtil() : Real\n{\n var th_maxNetUtil : Real = 0.65;\n return th_maxNetUtil;\n}'),(21,'th_minNetUtil','\noperation th_minNetUtil() : Real\n{\n var th_minNetUtil : Real = 0.5;\n return th_minNetUtil;\n}'),(22,'th_SrtReq','\noperation th_SrtReq() : Real\n{\n var th_SrtReq : Real = 40.1410;\n return th_SrtReq;\n}'),(23,'th_SthReq','\noperation th_SthReq() : Real\n{\n var th_SthReq = 0.1075;\n return th_SthReq;\n}'),(24,'th_maxQL','\noperation th_maxQL() : Real\n{\n var th_maxQL : Real = 1.24;\n return th_maxQL;\n}'),(28,'th_maxRemMsgs','\noperation th_maxRemMsgs() : Real\n{\n var th_maxRemMsgs : Real = 2.56;\n return th_maxRemMsgs;\n}'),(33,'th_maxResDemand','\noperation th_maxResDemand() : List(Real)\n{\n var th_maxResDemand : List(Real) = new List(Real);\n th_maxResDemand.add(2557.50);\n th_maxResDemand.add(922.50);\n return th_maxResDemand;\n}'),(34,'th_minResDemand','\noperation th_minResDemand() : List(Real)\n{\n var th_minResDemand : List(Real) = new List(Real);\n th_minResDemand.add(1136.67);\n th_minResDemand.add(410.0);\n return th_minResDemand;\n}'),(35,'th_maxOpResDemand','\noperation th_maxOpResDemand() : List(Real)\n{\n var th_maxOpResDemand : List(Real) = new List(Real);\n th_maxOpResDemand.add(2557.50);\n th_maxOpResDemand.add(922.50);\n return th_maxOpResDemand;\n}'),(36,'th_minOpResDemand','\noperation th_minOpResDemand() : List(Real)\n{\n var th_minOpResDemand : List(Real) = new List(Real);\n th_minOpResDemand.add(1136.67);\n th_minOpResDemand.add(410.0);\n return th_minOpResDemand;\n}');
/*!40000 ALTER TABLE `thresholds` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2018-04-21 14:08:44