diff options
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu')
-rw-r--r-- | Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/ApplicationConfiguration.xtext | 51 |
1 files changed, 43 insertions, 8 deletions
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/ApplicationConfiguration.xtext b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/ApplicationConfiguration.xtext index 1d12b3f7..101d1a3f 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/ApplicationConfiguration.xtext +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/ApplicationConfiguration.xtext | |||
@@ -4,7 +4,6 @@ import "http://www.eclipse.org/emf/2002/Ecore" as ecore | |||
4 | import "http://www.eclipse.org/viatra/query/patternlanguage/PatternLanguage" as viatra | 4 | import "http://www.eclipse.org/viatra/query/patternlanguage/PatternLanguage" as viatra |
5 | generate applicationConfiguration "http://www.bme.hu/mit/inf/dslreasoner/application/ApplicationConfiguration" | 5 | generate applicationConfiguration "http://www.bme.hu/mit/inf/dslreasoner/application/ApplicationConfiguration" |
6 | 6 | ||
7 | |||
8 | ConfigurationScript: | 7 | ConfigurationScript: |
9 | (imports += Import)* | 8 | (imports += Import)* |
10 | (commands += Command)* | 9 | (commands += Command)* |
@@ -16,6 +15,8 @@ Command : | |||
16 | 15 | ||
17 | QualifiedName returns ecore::EString: | 16 | QualifiedName returns ecore::EString: |
18 | ID ('.' ID)*; | 17 | ID ('.' ID)*; |
18 | //terminal REAL returns ecore::EBigDecimal: '-'? INT '.' INT; | ||
19 | //terminal INTEGER returns ecore::EInt: '-'? INT; | ||
19 | 20 | ||
20 | /////////////////////////////////////////////////// | 21 | /////////////////////////////////////////////////// |
21 | // Imports | 22 | // Imports |
@@ -106,11 +107,28 @@ enum Solver: SMTSolver | AlloySolver | ViatraSolver; | |||
106 | ScopeSpecification: {ScopeSpecification} '{' | 107 | ScopeSpecification: {ScopeSpecification} '{' |
107 | (scopes += TypeScope (',' scopes += TypeScope)*)? | 108 | (scopes += TypeScope (',' scopes += TypeScope)*)? |
108 | '}'; | 109 | '}'; |
109 | TypeScope: '#' type = TypeReference | 110 | TypeScope: ClassTypeScope | ObjectTypeScope | IntegerTypeScope | RealTypeScope | StringTypeScope; |
111 | ClassTypeScope: '#' type = ClassReference | ||
112 | (setsNew ?='+=' | setsSum ?= '=') | ||
113 | (number = ExactNumber | number = IntervallNumber) | ||
114 | ; | ||
115 | ObjectTypeScope: '#' type = ObjectReference | ||
110 | (setsNew ?='+=' | setsSum ?= '=') | 116 | (setsNew ?='+=' | setsSum ?= '=') |
111 | ( min = INT ) | 117 | (number = ExactNumber | number = IntervallNumber) |
112 | ('..' (maxUnlimited?='*' | max=INT))? | ||
113 | ; | 118 | ; |
119 | IntegerTypeScope: '#' type = IntegerReference | ||
120 | (setsNew ?='+=' | setsSum ?= '=') | ||
121 | (number = ExactNumber | number = IntervallNumber | number = IntEnumberation) | ||
122 | ; | ||
123 | RealTypeScope: '#' type = RealReference | ||
124 | (setsNew ?='+=' | setsSum ?= '=') | ||
125 | (number = ExactNumber | number = IntervallNumber | number = RealEnumeration) | ||
126 | ; | ||
127 | StringTypeScope: '#' type = StringReference | ||
128 | (setsNew ?='+=' | setsSum ?= '=') | ||
129 | (number = ExactNumber | number = IntervallNumber | number = StringEnumeration) | ||
130 | ; | ||
131 | |||
114 | TypeReference: ClassReference | ObjectReference | IntegerReference | RealReference | StringReference; | 132 | TypeReference: ClassReference | ObjectReference | IntegerReference | RealReference | StringReference; |
115 | ClassReference: '<' element = MetamodelElement '>'; | 133 | ClassReference: '<' element = MetamodelElement '>'; |
116 | ObjectReference: {ObjectReference} 'node'; | 134 | ObjectReference: {ObjectReference} 'node'; |
@@ -118,6 +136,13 @@ IntegerReference: {IntegerScope} 'int'; | |||
118 | RealReference: {RealScope} 'real'; | 136 | RealReference: {RealScope} 'real'; |
119 | StringReference: {StringScope} 'string'; | 137 | StringReference: {StringScope} 'string'; |
120 | 138 | ||
139 | NumberSpecification: ExactNumber | IntervallNumber | IntEnumberation | RealEnumeration | StringEnumeration; | ||
140 | ExactNumber: exactNumber = INT | exactUnlimited ?= '*'; | ||
141 | IntervallNumber: min = INT '..' (maxNumber = INT | maxUnlimited ?= '*'); | ||
142 | IntEnumberation: {IntEnumberation} '{' (entry += INT (',' entry += INT)*)?'}'; | ||
143 | RealEnumeration: {RealEnumeration} '{' (entry += INT (',' entry += INT)*)?'}'; | ||
144 | StringEnumeration: {StringEnumeration} '{' (entry += STRING (',' entry += STRING)*)?'}'; | ||
145 | |||
121 | ScopeDeclaration: 'scope' name = ID specification = ScopeSpecification; | 146 | ScopeDeclaration: 'scope' name = ID specification = ScopeSpecification; |
122 | ScopeReference: referred = [ScopeDeclaration]; | 147 | ScopeReference: referred = [ScopeDeclaration]; |
123 | Scope: ScopeSpecification | ScopeReference; | 148 | Scope: ScopeSpecification | ScopeReference; |
@@ -125,17 +150,27 @@ Scope: ScopeSpecification | ScopeReference; | |||
125 | Task: GenerationTask /*| CoverageCalculation | ValidationTask*/; | 150 | Task: GenerationTask /*| CoverageCalculation | ValidationTask*/; |
126 | 151 | ||
127 | GenerationTask: 'generate' {GenerationTask} '{'( | 152 | GenerationTask: 'generate' {GenerationTask} '{'( |
153 | |||
154 | // domain | ||
128 | ('metamodel' '=' metamodel = Metamodel)? & | 155 | ('metamodel' '=' metamodel = Metamodel)? & |
129 | ('partial-model' '=' partialModel = PartialModel)? & | 156 | ('partial-model' '=' partialModel = PartialModel)? & |
130 | ('patterns' '=' patterns = GraphPattern)? & | 157 | ('patterns' '=' patterns = GraphPattern)? & |
158 | |||
159 | // model set | ||
131 | ('scope' '=' scope = Scope)? & | 160 | ('scope' '=' scope = Scope)? & |
132 | ('number' '=' number= INT)? & | 161 | (numberSpecified ?= 'number' '=' number= INT)? & |
133 | ('runs' '=' runs = INT)? & | 162 | (runSpecified ?= 'runs' '=' runs = INT)? & |
163 | // Solver | ||
134 | ('solver' '=' solver = Solver)? & | 164 | ('solver' '=' solver = Solver)? & |
135 | ('config' '=' config = Config)? & | 165 | ('config' '=' config = Config)? & |
136 | ('output' '=' tagetFolder = File)? & | 166 | |
167 | // output texts | ||
137 | ('debug' '=' debugFolder = File)? & | 168 | ('debug' '=' debugFolder = File)? & |
138 | ('log' '=' targetLogFile = File)? & | 169 | ('log' '=' targetLogFile = File)? & |
139 | ('statistics' '=' targetStatisticsFile = File)? | 170 | ('statistics' '=' targetStatisticsFile = File)? & |
171 | |||
172 | // output models | ||
173 | ('output' '=' tagetFolder = File)? | ||
174 | |||
140 | )'}' | 175 | )'}' |
141 | ; \ No newline at end of file | 176 | ; \ No newline at end of file |