diff options
Diffstat (limited to 'Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application')
2 files changed, 11 insertions, 6 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 44ef8fd1..2b4a56a6 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 | |||
@@ -101,8 +101,13 @@ enum OptimizationDirection: MINIMIZE='minimize' | MAXIMIZE='maximize'; | |||
101 | OptimizationEntry: direction=OptimizationDirection function=ObjectiveFunction; | 101 | OptimizationEntry: direction=OptimizationDirection function=ObjectiveFunction; |
102 | enum ComparisonOperator: LESS_EQUALS='<=' | GREATER_EQUALS='>='; | 102 | enum ComparisonOperator: LESS_EQUALS='<=' | GREATER_EQUALS='>='; |
103 | ThresholdEntry: function=ObjectiveFunction operator=ComparisonOperator threshold=REALLiteral; | 103 | ThresholdEntry: function=ObjectiveFunction operator=ComparisonOperator threshold=REALLiteral; |
104 | ObjectiveFunction: ReliabiltiyFunction; | 104 | ObjectiveFunction: ReliabilityObjectiveFunction; |
105 | ReliabiltiyFunction: 'reliability' (package=[cftLanguage::CftModel|QualifiedName] '::')? transformation = [cftLanguage::TransformationDefinition]; | 105 | ReliabilityObjectiveFunction: ReliabiltiyProbability | Mtff; |
106 | ReliabiltiyProbability: | ||
107 | 'reliability' (package=[cftLanguage::CftModel|QualifiedName] '::')? transformation = [cftLanguage::TransformationDefinition] | ||
108 | 'at' time=REALLiteral; | ||
109 | Mtff: | ||
110 | 'mtff' (package=[cftLanguage::CftModel|QualifiedName] '::')? transformation = [cftLanguage::TransformationDefinition]; | ||
106 | 111 | ||
107 | ObjectiveDeclaration: 'objectives' name = ID specification = ObjectiveSpecification; | 112 | ObjectiveDeclaration: 'objectives' name = ID specification = ObjectiveSpecification; |
108 | ObjectiveReference: referred = [ObjectiveDeclaration]; | 113 | ObjectiveReference: referred = [ObjectiveDeclaration]; |
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend index 35a747c8..9d7e8aec 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend | |||
@@ -10,7 +10,6 @@ import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.EPackageI | |||
10 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelElement | 10 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelElement |
11 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelEntry | 11 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelEntry |
12 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PatternEntry | 12 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PatternEntry |
13 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ReliabiltiyFunction | ||
14 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ViatraImport | 13 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ViatraImport |
15 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel | 14 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel |
16 | import org.eclipse.emf.ecore.EClass | 15 | import org.eclipse.emf.ecore.EClass |
@@ -23,6 +22,7 @@ import org.eclipse.xtext.naming.IQualifiedNameConverter | |||
23 | import org.eclipse.xtext.scoping.Scopes | 22 | import org.eclipse.xtext.scoping.Scopes |
24 | 23 | ||
25 | import static hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage.Literals.* | 24 | import static hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage.Literals.* |
25 | import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ReliabilityObjectiveFunction | ||
26 | 26 | ||
27 | /** | 27 | /** |
28 | * This class contains custom scoping description. | 28 | * This class contains custom scoping description. |
@@ -47,9 +47,9 @@ class ApplicationConfigurationScopeProvider extends AbstractApplicationConfigura | |||
47 | getViatraPackageScope(context, reference, document) | 47 | getViatraPackageScope(context, reference, document) |
48 | case PATTERN_ELEMENT__PATTERN: | 48 | case PATTERN_ELEMENT__PATTERN: |
49 | getViatraPatternScope(context, document) | 49 | getViatraPatternScope(context, document) |
50 | case RELIABILTIY_FUNCTION__PACKAGE: | 50 | case RELIABILITY_OBJECTIVE_FUNCTION__PACKAGE: |
51 | getCftPackageScope(context, reference, document) | 51 | getCftPackageScope(context, reference, document) |
52 | case RELIABILTIY_FUNCTION__TRANSFORMATION: | 52 | case RELIABILITY_OBJECTIVE_FUNCTION__TRANSFORMATION: |
53 | getCftTransformationScope(context, document) | 53 | getCftTransformationScope(context, document) |
54 | default: | 54 | default: |
55 | super.getScope(context, reference) | 55 | super.getScope(context, reference) |
@@ -136,7 +136,7 @@ class ApplicationConfigurationScopeProvider extends AbstractApplicationConfigura | |||
136 | 136 | ||
137 | private def getCftTransformationScope(EObject context, ConfigurationScript document) { | 137 | private def getCftTransformationScope(EObject context, ConfigurationScript document) { |
138 | val transformations = switch (context) { | 138 | val transformations = switch (context) { |
139 | ReliabiltiyFunction case context.package !== null: | 139 | ReliabilityObjectiveFunction case context.package !== null: |
140 | context.package.transformationDefinitions | 140 | context.package.transformationDefinitions |
141 | default: | 141 | default: |
142 | document.allCftTransformations | 142 | document.allCftTransformations |