-
Nikolaus Huber authored
git-svn-id: https://se1.informatik.uni-wuerzburg.de/usvn/svn/code/code/DMM/trunk@11490 9e42b895-fcda-4063-8a3b-11be15eb1bbd
Nikolaus Huber authoredgit-svn-id: https://se1.informatik.uni-wuerzburg.de/usvn/svn/code/code/DMM/trunk@11490 9e42b895-fcda-4063-8a3b-11be15eb1bbd
StaLangExample.stalang 2.34 KiB
// this is a comment
// place imports here, e.g.
// import uri
// Summary of operators
// '=' is an assignment
// ':' starts a list (e.g.: elementA, elementB, elementC)
AdaptationProcess ExampleProcessName {
goal
// '=' 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: // ':' 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, 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 RANDOM MIGRATE// I have no clue so far how to refer to external model instances
}
tactics:
Tactic Tactic1Name {
// optional input output parameters
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
}
strategies:
Strategy Strategy1Name {
objective=Objective1Name
triggeringEvents=EventXYName
tactics:
WeightedTactic1Name=Tactic1Name 1.3 1.0 ref:LastImpactXY1,
WeightedTactic2Name=Tactic2Name 2.1 2.0 ref:LastImpactXY2
weightingFunction WeightingFunction1Name {
WeightedMetric1Name = 1.9 ref:ResponseTimeMetric1
WeightedMetric2Name = 2.3 ref:UtilizationMetric1
}
}
// definition of parameters should be optional
parameters:
ParamTypeA param1Name,
ParamTypeB param2Name,
ParamTypeC param3Name
}