From 6a2d46258c4ec1e66c26881513b045579903fdbc Mon Sep 17 00:00:00 2001
From: Nikolaus Huber <nikolaus.huber@uni-wuerzburg.de>
Date: Wed, 8 May 2013 11:54:52 +0000
Subject: [PATCH] integration of metamodel changes

git-svn-id: https://se1.informatik.uni-wuerzburg.de/usvn/svn/code/code/DMM/trunk@11490 9e42b895-fcda-4063-8a3b-11be15eb1bbd
---
 .../misc/StaLangExample.stalang               | 65 +++++++++++--------
 1 file changed, 38 insertions(+), 27 deletions(-)

diff --git a/edu.kit.ipd.descartes.mm.adaptation.sta/misc/StaLangExample.stalang b/edu.kit.ipd.descartes.mm.adaptation.sta/misc/StaLangExample.stalang
index 7d50acd6..9b318484 100644
--- a/edu.kit.ipd.descartes.mm.adaptation.sta/misc/StaLangExample.stalang
+++ b/edu.kit.ipd.descartes.mm.adaptation.sta/misc/StaLangExample.stalang
@@ -3,60 +3,71 @@
 // place imports here, e.g.
 // import uri 
 
+// Summary of operators
+// '=' is an assignment
+// ':' starts a list (e.g.: elementA, elementB, elementC)
+
 AdaptationProcess ExampleProcessName {
 
 	goal
-		description "A verbose description of the goal of the adaptation process so that 
+		// '=' is an assignment, i.e., a text is assigned to myDescription
+		Description myDescription = "A verbose description of the goal of the adaptation process so that 
 			anyone can understand the purpose of the modeled adaptation process"
-		objectives:
-			Objective Objective1Name specification "A string specifying the objective 1"
-			Objective Objective2Name specification "A string specifying the objective 2"
+		objectives: // ':' starts a list
+			Objective Objective1Name = "A string specifying the objective 1",
+			Objective Objective2Name = "A string specifying the objective 2"
 	
 	actions:
 		Action Action1Name operationType SCALE_OUT {
 			// optional input output parameters
-			input param1Name, param3Name
-			output param3Name
-			referredAdaptationPoint ref:xyz1 // I have no clue so far how to refer to external model instances
+			input: param1Name, param2Name
+			output: param3Name
+			referredAdaptationPoint ref:xyz1 THIS INCREASE // I have no clue so far how to refer to external model instances
+			// THIS and INCREASE are values for AdaptationScope and AdaptationDirection
 		}
+		// Alternative notation for an Action (possible in Xtext?):
+		// param3Name Action1Name(param1Name, param2Name) {referredAdaptationPoint ref:xyz1, THIS, SCALE_UP}
+				
 		Action Action2Name operationType SCALE_IN {
 			// optional parameters
-			referredAdaptationPoint ref:xyz2 // I have no clue so far how to refer to external model instances
+			referredAdaptationPoint ref:xyz2 RANDOM MIGRATE// I have no clue so far how to refer to external model instances
 		}
 	
 	tactics:
 		Tactic Tactic1Name {
 			// optional input output parameters
-			input param1Name, param3Name
-			output param3Name
-			implementedPlan{StartAction, Action1Name, ... Action2Name, StopAction}
+			input: param1Name, param2Name
+			output: param3Name
+			implementedPlan: StartAction, Action1Name, ... Action2Name, StopAction
 		}
+		// Alternative notation for a Tactic:
+		// param3Name Tactic1Name(param1Name, param2Name) {StartAction, Action1Name, ... Action2Name, StopAction}
+		
 		Tactic Tactic2Name {
 			// optional input output parameters
-			implementedPlan{
-			StartAction,
-			// Some other actions
-			StopAction
-			}
+			implementedPlan:
+				StartAction,
+				// Some other actions
+				StopAction
 		}
 	
 	strategies:
 		Strategy Strategy1Name {
-			objective Objective1Name
-			triggeringEvents Event EventXYName
-			tactics {
-				WeightedTactic usedTactic Tactic1Name 1.3 1.0 ref:LastImpactXY1, 
-				WeightedTactic usedTactic Tactic2Name 2.1 2.0 ref:LastImpactXY2
-			}
+			objective=Objective1Name
+			triggeringEvents=EventXYName
+			tactics:
+				WeightedTactic1Name=Tactic1Name 1.3 1.0 ref:LastImpactXY1, 
+				WeightedTactic2Name=Tactic2Name 2.1 2.0 ref:LastImpactXY2
+				
 			weightingFunction WeightingFunction1Name {
-				WeightedMetric 1.9 ref:ResponseTimeMetric1
-				WeightedMetric 2.3 ref:UtilizationMetric1
+				WeightedMetric1Name = 1.9 ref:ResponseTimeMetric1
+				WeightedMetric2Name = 2.3 ref:UtilizationMetric1
 			}
 		}
 
 	// definition of parameters should be optional
 	parameters:
-		Parameter param1Name
-		Parameter param2Name
-		Parameter param3Name
+		ParamTypeA param1Name,
+		ParamTypeB param2Name,
+		ParamTypeC param3Name
 }
\ No newline at end of file
-- 
GitLab