diff options
62 files changed, 1221 insertions, 159 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/.CftLanguageUiModule.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/.CftLanguageUiModule.xtendbin index ff2238f7..56635dea 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/.CftLanguageUiModule.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/.CftLanguageUiModule.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/.CftLanguageOutlineTreeProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/.CftLanguageOutlineTreeProvider.xtendbin index 91137ae1..e8595819 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/.CftLanguageOutlineTreeProvider.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/.CftLanguageOutlineTreeProvider.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageSemanticHighlightingCalculator.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageSemanticHighlightingCalculator.xtendbin index 81585f8b..d88f5256 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageSemanticHighlightingCalculator.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageSemanticHighlightingCalculator.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin index 6eb4d2c2..ffe22f72 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java index 835bb8cc..25f16824 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java | |||
@@ -19,7 +19,7 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.AndGateDefinition; | |||
19 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.BasicEventDefinition; | 19 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.BasicEventDefinition; |
20 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; | 20 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; |
21 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | 21 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; |
22 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent; | 22 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent; |
23 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition; | 23 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition; |
24 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.OrGateDefinition; | 24 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.OrGateDefinition; |
25 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantDistribution; | 25 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantDistribution; |
@@ -59,8 +59,8 @@ public class CftLanguageSemanticSequencer extends AbstractDelegatingSemanticSequ | |||
59 | case CftPackage.COMPONENT_DEFINITION: | 59 | case CftPackage.COMPONENT_DEFINITION: |
60 | sequence_ComponentDefinition(context, (ComponentDefinition) semanticObject); | 60 | sequence_ComponentDefinition(context, (ComponentDefinition) semanticObject); |
61 | return; | 61 | return; |
62 | case CftPackage.INTPUT_EVENT: | 62 | case CftPackage.INPUT_EVENT: |
63 | sequence_InputEvent(context, (IntputEvent) semanticObject); | 63 | sequence_InputEvent(context, (InputEvent) semanticObject); |
64 | return; | 64 | return; |
65 | case CftPackage.KOF_MGATE_DEFINITION: | 65 | case CftPackage.KOF_MGATE_DEFINITION: |
66 | sequence_KOfMGateDefinition(context, (KOfMGateDefinition) semanticObject); | 66 | sequence_KOfMGateDefinition(context, (KOfMGateDefinition) semanticObject); |
@@ -280,12 +280,12 @@ public class CftLanguageSemanticSequencer extends AbstractDelegatingSemanticSequ | |||
280 | 280 | ||
281 | /** | 281 | /** |
282 | * Contexts: | 282 | * Contexts: |
283 | * InputEvent returns IntputEvent | 283 | * InputEvent returns InputEvent |
284 | * | 284 | * |
285 | * Constraint: | 285 | * Constraint: |
286 | * (name=ValidId multiple?='[]'?) | 286 | * (name=ValidId multiple?='[]'?) |
287 | */ | 287 | */ |
288 | protected void sequence_InputEvent(ISerializationContext context, IntputEvent semanticObject) { | 288 | protected void sequence_InputEvent(ISerializationContext context, InputEvent semanticObject) { |
289 | genericSequencer.createSequence(context, semanticObject); | 289 | genericSequencer.createSequence(context, semanticObject); |
290 | } | 290 | } |
291 | 291 | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java index 69f00bb3..cbcfbe95 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java | |||
@@ -215,7 +215,7 @@ public class CftLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
215 | private final Assignment cMultipleAssignment_1 = (Assignment)cGroup.eContents().get(1); | 215 | private final Assignment cMultipleAssignment_1 = (Assignment)cGroup.eContents().get(1); |
216 | private final Keyword cMultipleLeftSquareBracketRightSquareBracketKeyword_1_0 = (Keyword)cMultipleAssignment_1.eContents().get(0); | 216 | private final Keyword cMultipleLeftSquareBracketRightSquareBracketKeyword_1_0 = (Keyword)cMultipleAssignment_1.eContents().get(0); |
217 | 217 | ||
218 | //InputEvent cft::IntputEvent: | 218 | //InputEvent cft::InputEvent: |
219 | // name=ValidId multiple?="[]"?; | 219 | // name=ValidId multiple?="[]"?; |
220 | @Override public ParserRule getRule() { return rule; } | 220 | @Override public ParserRule getRule() { return rule; } |
221 | 221 | ||
@@ -1128,7 +1128,7 @@ public class CftLanguageGrammarAccess extends AbstractGrammarElementFinder { | |||
1128 | return getComponentDefinitionAccess().getRule(); | 1128 | return getComponentDefinitionAccess().getRule(); |
1129 | } | 1129 | } |
1130 | 1130 | ||
1131 | //InputEvent cft::IntputEvent: | 1131 | //InputEvent cft::InputEvent: |
1132 | // name=ValidId multiple?="[]"?; | 1132 | // name=ValidId multiple?="[]"?; |
1133 | public InputEventElements getInputEventAccess() { | 1133 | public InputEventElements getInputEventAccess() { |
1134 | return pInputEvent; | 1134 | return pInputEvent; |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext index 61ab3359..b4d5338b 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext | |||
@@ -20,7 +20,7 @@ ComponentDefinition returns cft::ComponentDefinition: | |||
20 | (eventDefinitions+=EventDefinition ";")* | 20 | (eventDefinitions+=EventDefinition ";")* |
21 | "}"; | 21 | "}"; |
22 | 22 | ||
23 | InputEvent returns cft::IntputEvent: | 23 | InputEvent returns cft::InputEvent: |
24 | name=ValidId multiple?="[]"?; | 24 | name=ValidId multiple?="[]"?; |
25 | 25 | ||
26 | EventDefinition returns cft::EventDefinition: | 26 | EventDefinition returns cft::EventDefinition: |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin index 638dac63..df7b7e51 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin index 6dde8420..62a48625 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin index fc3d90f0..b5ec6fb3 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.xtendbin index 40e8786a..3c714b09 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftFactory.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftFactory.java index d5f4cd76..8b5d54a0 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftFactory.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftFactory.java | |||
@@ -40,13 +40,13 @@ public interface CftFactory extends EFactory { | |||
40 | BasicEventDefinition createBasicEventDefinition(); | 40 | BasicEventDefinition createBasicEventDefinition(); |
41 | 41 | ||
42 | /** | 42 | /** |
43 | * Returns a new object of class '<em>Intput Event</em>'. | 43 | * Returns a new object of class '<em>Input Event</em>'. |
44 | * <!-- begin-user-doc --> | 44 | * <!-- begin-user-doc --> |
45 | * <!-- end-user-doc --> | 45 | * <!-- end-user-doc --> |
46 | * @return a new object of class '<em>Intput Event</em>'. | 46 | * @return a new object of class '<em>Input Event</em>'. |
47 | * @generated | 47 | * @generated |
48 | */ | 48 | */ |
49 | IntputEvent createIntputEvent(); | 49 | InputEvent createInputEvent(); |
50 | 50 | ||
51 | /** | 51 | /** |
52 | * Returns a new object of class '<em>And Gate Definition</em>'. | 52 | * Returns a new object of class '<em>And Gate Definition</em>'. |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftPackage.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftPackage.java index 8cf7dbc6..d75710a2 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftPackage.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/CftPackage.java | |||
@@ -287,14 +287,14 @@ public interface CftPackage extends EPackage { | |||
287 | int BASIC_EVENT_DEFINITION_OPERATION_COUNT = EVENT_DEFINITION_OPERATION_COUNT + 0; | 287 | int BASIC_EVENT_DEFINITION_OPERATION_COUNT = EVENT_DEFINITION_OPERATION_COUNT + 0; |
288 | 288 | ||
289 | /** | 289 | /** |
290 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.IntputEventImpl <em>Intput Event</em>}' class. | 290 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputEventImpl <em>Input Event</em>}' class. |
291 | * <!-- begin-user-doc --> | 291 | * <!-- begin-user-doc --> |
292 | * <!-- end-user-doc --> | 292 | * <!-- end-user-doc --> |
293 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.IntputEventImpl | 293 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputEventImpl |
294 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getIntputEvent() | 294 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getInputEvent() |
295 | * @generated | 295 | * @generated |
296 | */ | 296 | */ |
297 | int INTPUT_EVENT = 4; | 297 | int INPUT_EVENT = 4; |
298 | 298 | ||
299 | /** | 299 | /** |
300 | * The feature id for the '<em><b>Name</b></em>' attribute. | 300 | * The feature id for the '<em><b>Name</b></em>' attribute. |
@@ -303,7 +303,7 @@ public interface CftPackage extends EPackage { | |||
303 | * @generated | 303 | * @generated |
304 | * @ordered | 304 | * @ordered |
305 | */ | 305 | */ |
306 | int INTPUT_EVENT__NAME = EVENT_DECLARATION__NAME; | 306 | int INPUT_EVENT__NAME = EVENT_DECLARATION__NAME; |
307 | 307 | ||
308 | /** | 308 | /** |
309 | * The feature id for the '<em><b>Multiple</b></em>' attribute. | 309 | * The feature id for the '<em><b>Multiple</b></em>' attribute. |
@@ -312,25 +312,25 @@ public interface CftPackage extends EPackage { | |||
312 | * @generated | 312 | * @generated |
313 | * @ordered | 313 | * @ordered |
314 | */ | 314 | */ |
315 | int INTPUT_EVENT__MULTIPLE = EVENT_DECLARATION_FEATURE_COUNT + 0; | 315 | int INPUT_EVENT__MULTIPLE = EVENT_DECLARATION_FEATURE_COUNT + 0; |
316 | 316 | ||
317 | /** | 317 | /** |
318 | * The number of structural features of the '<em>Intput Event</em>' class. | 318 | * The number of structural features of the '<em>Input Event</em>' class. |
319 | * <!-- begin-user-doc --> | 319 | * <!-- begin-user-doc --> |
320 | * <!-- end-user-doc --> | 320 | * <!-- end-user-doc --> |
321 | * @generated | 321 | * @generated |
322 | * @ordered | 322 | * @ordered |
323 | */ | 323 | */ |
324 | int INTPUT_EVENT_FEATURE_COUNT = EVENT_DECLARATION_FEATURE_COUNT + 1; | 324 | int INPUT_EVENT_FEATURE_COUNT = EVENT_DECLARATION_FEATURE_COUNT + 1; |
325 | 325 | ||
326 | /** | 326 | /** |
327 | * The number of operations of the '<em>Intput Event</em>' class. | 327 | * The number of operations of the '<em>Input Event</em>' class. |
328 | * <!-- begin-user-doc --> | 328 | * <!-- begin-user-doc --> |
329 | * <!-- end-user-doc --> | 329 | * <!-- end-user-doc --> |
330 | * @generated | 330 | * @generated |
331 | * @ordered | 331 | * @ordered |
332 | */ | 332 | */ |
333 | int INTPUT_EVENT_OPERATION_COUNT = EVENT_DECLARATION_OPERATION_COUNT + 0; | 333 | int INPUT_EVENT_OPERATION_COUNT = EVENT_DECLARATION_OPERATION_COUNT + 0; |
334 | 334 | ||
335 | /** | 335 | /** |
336 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.AndGateDefinitionImpl <em>And Gate Definition</em>}' class. | 336 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.AndGateDefinitionImpl <em>And Gate Definition</em>}' class. |
@@ -572,13 +572,22 @@ public interface CftPackage extends EPackage { | |||
572 | int COMPONENT__COMPONENT_DEFINITION = 2; | 572 | int COMPONENT__COMPONENT_DEFINITION = 2; |
573 | 573 | ||
574 | /** | 574 | /** |
575 | * The feature id for the '<em><b>Name</b></em>' attribute. | ||
576 | * <!-- begin-user-doc --> | ||
577 | * <!-- end-user-doc --> | ||
578 | * @generated | ||
579 | * @ordered | ||
580 | */ | ||
581 | int COMPONENT__NAME = 3; | ||
582 | |||
583 | /** | ||
575 | * The number of structural features of the '<em>Component</em>' class. | 584 | * The number of structural features of the '<em>Component</em>' class. |
576 | * <!-- begin-user-doc --> | 585 | * <!-- begin-user-doc --> |
577 | * <!-- end-user-doc --> | 586 | * <!-- end-user-doc --> |
578 | * @generated | 587 | * @generated |
579 | * @ordered | 588 | * @ordered |
580 | */ | 589 | */ |
581 | int COMPONENT_FEATURE_COUNT = 3; | 590 | int COMPONENT_FEATURE_COUNT = 4; |
582 | 591 | ||
583 | /** | 592 | /** |
584 | * The number of operations of the '<em>Component</em>' class. | 593 | * The number of operations of the '<em>Component</em>' class. |
@@ -600,13 +609,13 @@ public interface CftPackage extends EPackage { | |||
600 | int INPUT = 11; | 609 | int INPUT = 11; |
601 | 610 | ||
602 | /** | 611 | /** |
603 | * The feature id for the '<em><b>Intput Event</b></em>' reference. | 612 | * The feature id for the '<em><b>Input Event</b></em>' reference. |
604 | * <!-- begin-user-doc --> | 613 | * <!-- begin-user-doc --> |
605 | * <!-- end-user-doc --> | 614 | * <!-- end-user-doc --> |
606 | * @generated | 615 | * @generated |
607 | * @ordered | 616 | * @ordered |
608 | */ | 617 | */ |
609 | int INPUT__INTPUT_EVENT = 0; | 618 | int INPUT__INPUT_EVENT = 0; |
610 | 619 | ||
611 | /** | 620 | /** |
612 | * The feature id for the '<em><b>Component</b></em>' container reference. | 621 | * The feature id for the '<em><b>Component</b></em>' container reference. |
@@ -853,25 +862,25 @@ public interface CftPackage extends EPackage { | |||
853 | EReference getBasicEventDefinition_Distribution(); | 862 | EReference getBasicEventDefinition_Distribution(); |
854 | 863 | ||
855 | /** | 864 | /** |
856 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent <em>Intput Event</em>}'. | 865 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent <em>Input Event</em>}'. |
857 | * <!-- begin-user-doc --> | 866 | * <!-- begin-user-doc --> |
858 | * <!-- end-user-doc --> | 867 | * <!-- end-user-doc --> |
859 | * @return the meta object for class '<em>Intput Event</em>'. | 868 | * @return the meta object for class '<em>Input Event</em>'. |
860 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent | 869 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent |
861 | * @generated | 870 | * @generated |
862 | */ | 871 | */ |
863 | EClass getIntputEvent(); | 872 | EClass getInputEvent(); |
864 | 873 | ||
865 | /** | 874 | /** |
866 | * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent#isMultiple <em>Multiple</em>}'. | 875 | * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent#isMultiple <em>Multiple</em>}'. |
867 | * <!-- begin-user-doc --> | 876 | * <!-- begin-user-doc --> |
868 | * <!-- end-user-doc --> | 877 | * <!-- end-user-doc --> |
869 | * @return the meta object for the attribute '<em>Multiple</em>'. | 878 | * @return the meta object for the attribute '<em>Multiple</em>'. |
870 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent#isMultiple() | 879 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent#isMultiple() |
871 | * @see #getIntputEvent() | 880 | * @see #getInputEvent() |
872 | * @generated | 881 | * @generated |
873 | */ | 882 | */ |
874 | EAttribute getIntputEvent_Multiple(); | 883 | EAttribute getInputEvent_Multiple(); |
875 | 884 | ||
876 | /** | 885 | /** |
877 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration <em>Event Declaration</em>}'. | 886 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration <em>Event Declaration</em>}'. |
@@ -1022,6 +1031,17 @@ public interface CftPackage extends EPackage { | |||
1022 | EReference getComponent_ComponentDefinition(); | 1031 | EReference getComponent_ComponentDefinition(); |
1023 | 1032 | ||
1024 | /** | 1033 | /** |
1034 | * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getName <em>Name</em>}'. | ||
1035 | * <!-- begin-user-doc --> | ||
1036 | * <!-- end-user-doc --> | ||
1037 | * @return the meta object for the attribute '<em>Name</em>'. | ||
1038 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getName() | ||
1039 | * @see #getComponent() | ||
1040 | * @generated | ||
1041 | */ | ||
1042 | EAttribute getComponent_Name(); | ||
1043 | |||
1044 | /** | ||
1025 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input <em>Input</em>}'. | 1045 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input <em>Input</em>}'. |
1026 | * <!-- begin-user-doc --> | 1046 | * <!-- begin-user-doc --> |
1027 | * <!-- end-user-doc --> | 1047 | * <!-- end-user-doc --> |
@@ -1032,15 +1052,15 @@ public interface CftPackage extends EPackage { | |||
1032 | EClass getInput(); | 1052 | EClass getInput(); |
1033 | 1053 | ||
1034 | /** | 1054 | /** |
1035 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getIntputEvent <em>Intput Event</em>}'. | 1055 | * Returns the meta object for the reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getInputEvent <em>Input Event</em>}'. |
1036 | * <!-- begin-user-doc --> | 1056 | * <!-- begin-user-doc --> |
1037 | * <!-- end-user-doc --> | 1057 | * <!-- end-user-doc --> |
1038 | * @return the meta object for the reference '<em>Intput Event</em>'. | 1058 | * @return the meta object for the reference '<em>Input Event</em>'. |
1039 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getIntputEvent() | 1059 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getInputEvent() |
1040 | * @see #getInput() | 1060 | * @see #getInput() |
1041 | * @generated | 1061 | * @generated |
1042 | */ | 1062 | */ |
1043 | EReference getInput_IntputEvent(); | 1063 | EReference getInput_InputEvent(); |
1044 | 1064 | ||
1045 | /** | 1065 | /** |
1046 | * Returns the meta object for the container reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getComponent <em>Component</em>}'. | 1066 | * Returns the meta object for the container reference '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getComponent <em>Component</em>}'. |
@@ -1251,14 +1271,14 @@ public interface CftPackage extends EPackage { | |||
1251 | EReference BASIC_EVENT_DEFINITION__DISTRIBUTION = eINSTANCE.getBasicEventDefinition_Distribution(); | 1271 | EReference BASIC_EVENT_DEFINITION__DISTRIBUTION = eINSTANCE.getBasicEventDefinition_Distribution(); |
1252 | 1272 | ||
1253 | /** | 1273 | /** |
1254 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.IntputEventImpl <em>Intput Event</em>}' class. | 1274 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputEventImpl <em>Input Event</em>}' class. |
1255 | * <!-- begin-user-doc --> | 1275 | * <!-- begin-user-doc --> |
1256 | * <!-- end-user-doc --> | 1276 | * <!-- end-user-doc --> |
1257 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.IntputEventImpl | 1277 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputEventImpl |
1258 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getIntputEvent() | 1278 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getInputEvent() |
1259 | * @generated | 1279 | * @generated |
1260 | */ | 1280 | */ |
1261 | EClass INTPUT_EVENT = eINSTANCE.getIntputEvent(); | 1281 | EClass INPUT_EVENT = eINSTANCE.getInputEvent(); |
1262 | 1282 | ||
1263 | /** | 1283 | /** |
1264 | * The meta object literal for the '<em><b>Multiple</b></em>' attribute feature. | 1284 | * The meta object literal for the '<em><b>Multiple</b></em>' attribute feature. |
@@ -1266,7 +1286,7 @@ public interface CftPackage extends EPackage { | |||
1266 | * <!-- end-user-doc --> | 1286 | * <!-- end-user-doc --> |
1267 | * @generated | 1287 | * @generated |
1268 | */ | 1288 | */ |
1269 | EAttribute INTPUT_EVENT__MULTIPLE = eINSTANCE.getIntputEvent_Multiple(); | 1289 | EAttribute INPUT_EVENT__MULTIPLE = eINSTANCE.getInputEvent_Multiple(); |
1270 | 1290 | ||
1271 | /** | 1291 | /** |
1272 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.EventDeclarationImpl <em>Event Declaration</em>}' class. | 1292 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.EventDeclarationImpl <em>Event Declaration</em>}' class. |
@@ -1393,6 +1413,14 @@ public interface CftPackage extends EPackage { | |||
1393 | EReference COMPONENT__COMPONENT_DEFINITION = eINSTANCE.getComponent_ComponentDefinition(); | 1413 | EReference COMPONENT__COMPONENT_DEFINITION = eINSTANCE.getComponent_ComponentDefinition(); |
1394 | 1414 | ||
1395 | /** | 1415 | /** |
1416 | * The meta object literal for the '<em><b>Name</b></em>' attribute feature. | ||
1417 | * <!-- begin-user-doc --> | ||
1418 | * <!-- end-user-doc --> | ||
1419 | * @generated | ||
1420 | */ | ||
1421 | EAttribute COMPONENT__NAME = eINSTANCE.getComponent_Name(); | ||
1422 | |||
1423 | /** | ||
1396 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl <em>Input</em>}' class. | 1424 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl <em>Input</em>}' class. |
1397 | * <!-- begin-user-doc --> | 1425 | * <!-- begin-user-doc --> |
1398 | * <!-- end-user-doc --> | 1426 | * <!-- end-user-doc --> |
@@ -1403,12 +1431,12 @@ public interface CftPackage extends EPackage { | |||
1403 | EClass INPUT = eINSTANCE.getInput(); | 1431 | EClass INPUT = eINSTANCE.getInput(); |
1404 | 1432 | ||
1405 | /** | 1433 | /** |
1406 | * The meta object literal for the '<em><b>Intput Event</b></em>' reference feature. | 1434 | * The meta object literal for the '<em><b>Input Event</b></em>' reference feature. |
1407 | * <!-- begin-user-doc --> | 1435 | * <!-- begin-user-doc --> |
1408 | * <!-- end-user-doc --> | 1436 | * <!-- end-user-doc --> |
1409 | * @generated | 1437 | * @generated |
1410 | */ | 1438 | */ |
1411 | EReference INPUT__INTPUT_EVENT = eINSTANCE.getInput_IntputEvent(); | 1439 | EReference INPUT__INPUT_EVENT = eINSTANCE.getInput_InputEvent(); |
1412 | 1440 | ||
1413 | /** | 1441 | /** |
1414 | * The meta object literal for the '<em><b>Component</b></em>' container reference feature. | 1442 | * The meta object literal for the '<em><b>Component</b></em>' container reference feature. |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Component.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Component.java index e1951172..7d5055c9 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Component.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Component.java | |||
@@ -18,6 +18,7 @@ import org.eclipse.emf.ecore.EObject; | |||
18 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getInputs <em>Inputs</em>}</li> | 18 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getInputs <em>Inputs</em>}</li> |
19 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getOutputs <em>Outputs</em>}</li> | 19 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getOutputs <em>Outputs</em>}</li> |
20 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getComponentDefinition <em>Component Definition</em>}</li> | 20 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getComponentDefinition <em>Component Definition</em>}</li> |
21 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getName <em>Name</em>}</li> | ||
21 | * </ul> | 22 | * </ul> |
22 | * | 23 | * |
23 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getComponent() | 24 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getComponent() |
@@ -87,4 +88,30 @@ public interface Component extends EObject { | |||
87 | */ | 88 | */ |
88 | void setComponentDefinition(ComponentDefinition value); | 89 | void setComponentDefinition(ComponentDefinition value); |
89 | 90 | ||
91 | /** | ||
92 | * Returns the value of the '<em><b>Name</b></em>' attribute. | ||
93 | * <!-- begin-user-doc --> | ||
94 | * <p> | ||
95 | * If the meaning of the '<em>Name</em>' attribute isn't clear, | ||
96 | * there really should be more of a description here... | ||
97 | * </p> | ||
98 | * <!-- end-user-doc --> | ||
99 | * @return the value of the '<em>Name</em>' attribute. | ||
100 | * @see #setName(String) | ||
101 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getComponent_Name() | ||
102 | * @model | ||
103 | * @generated | ||
104 | */ | ||
105 | String getName(); | ||
106 | |||
107 | /** | ||
108 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getName <em>Name</em>}' attribute. | ||
109 | * <!-- begin-user-doc --> | ||
110 | * <!-- end-user-doc --> | ||
111 | * @param value the new value of the '<em>Name</em>' attribute. | ||
112 | * @see #getName() | ||
113 | * @generated | ||
114 | */ | ||
115 | void setName(String value); | ||
116 | |||
90 | } // Component | 117 | } // Component |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/ComponentDefinition.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/ComponentDefinition.java index b3f3b163..82ab53fa 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/ComponentDefinition.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/ComponentDefinition.java | |||
@@ -28,7 +28,7 @@ import org.eclipse.emf.ecore.EObject; | |||
28 | public interface ComponentDefinition extends EObject { | 28 | public interface ComponentDefinition extends EObject { |
29 | /** | 29 | /** |
30 | * Returns the value of the '<em><b>Input Events</b></em>' containment reference list. | 30 | * Returns the value of the '<em><b>Input Events</b></em>' containment reference list. |
31 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent}. | 31 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent}. |
32 | * <!-- begin-user-doc --> | 32 | * <!-- begin-user-doc --> |
33 | * <p> | 33 | * <p> |
34 | * If the meaning of the '<em>Input Events</em>' containment reference list isn't clear, | 34 | * If the meaning of the '<em>Input Events</em>' containment reference list isn't clear, |
@@ -40,7 +40,7 @@ public interface ComponentDefinition extends EObject { | |||
40 | * @model containment="true" | 40 | * @model containment="true" |
41 | * @generated | 41 | * @generated |
42 | */ | 42 | */ |
43 | EList<IntputEvent> getInputEvents(); | 43 | EList<InputEvent> getInputEvents(); |
44 | 44 | ||
45 | /** | 45 | /** |
46 | * Returns the value of the '<em><b>Event Definitions</b></em>' containment reference list. | 46 | * Returns the value of the '<em><b>Event Definitions</b></em>' containment reference list. |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/EventDeclaration.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/EventDeclaration.java index 1e52a570..28d49f06 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/EventDeclaration.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/EventDeclaration.java | |||
@@ -21,7 +21,6 @@ import org.eclipse.emf.ecore.EObject; | |||
21 | * @generated | 21 | * @generated |
22 | */ | 22 | */ |
23 | public interface EventDeclaration extends EObject { | 23 | public interface EventDeclaration extends EObject { |
24 | |||
25 | /** | 24 | /** |
26 | * Returns the value of the '<em><b>Name</b></em>' attribute. | 25 | * Returns the value of the '<em><b>Name</b></em>' attribute. |
27 | * <!-- begin-user-doc --> | 26 | * <!-- begin-user-doc --> |
@@ -47,4 +46,5 @@ public interface EventDeclaration extends EObject { | |||
47 | * @generated | 46 | * @generated |
48 | */ | 47 | */ |
49 | void setName(String value); | 48 | void setName(String value); |
49 | |||
50 | } // EventDeclaration | 50 | } // EventDeclaration |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Input.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Input.java index 55da3f9a..7351d1bb 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Input.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Input.java | |||
@@ -15,7 +15,7 @@ import org.eclipse.emf.ecore.EObject; | |||
15 | * The following features are supported: | 15 | * The following features are supported: |
16 | * </p> | 16 | * </p> |
17 | * <ul> | 17 | * <ul> |
18 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getIntputEvent <em>Intput Event</em>}</li> | 18 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getInputEvent <em>Input Event</em>}</li> |
19 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getComponent <em>Component</em>}</li> | 19 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getComponent <em>Component</em>}</li> |
20 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getIncomingConnections <em>Incoming Connections</em>}</li> | 20 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getIncomingConnections <em>Incoming Connections</em>}</li> |
21 | * </ul> | 21 | * </ul> |
@@ -26,30 +26,30 @@ import org.eclipse.emf.ecore.EObject; | |||
26 | */ | 26 | */ |
27 | public interface Input extends EObject { | 27 | public interface Input extends EObject { |
28 | /** | 28 | /** |
29 | * Returns the value of the '<em><b>Intput Event</b></em>' reference. | 29 | * Returns the value of the '<em><b>Input Event</b></em>' reference. |
30 | * <!-- begin-user-doc --> | 30 | * <!-- begin-user-doc --> |
31 | * <p> | 31 | * <p> |
32 | * If the meaning of the '<em>Intput Event</em>' reference isn't clear, | 32 | * If the meaning of the '<em>Input Event</em>' reference isn't clear, |
33 | * there really should be more of a description here... | 33 | * there really should be more of a description here... |
34 | * </p> | 34 | * </p> |
35 | * <!-- end-user-doc --> | 35 | * <!-- end-user-doc --> |
36 | * @return the value of the '<em>Intput Event</em>' reference. | 36 | * @return the value of the '<em>Input Event</em>' reference. |
37 | * @see #setIntputEvent(IntputEvent) | 37 | * @see #setInputEvent(InputEvent) |
38 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getInput_IntputEvent() | 38 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getInput_InputEvent() |
39 | * @model required="true" | 39 | * @model required="true" |
40 | * @generated | 40 | * @generated |
41 | */ | 41 | */ |
42 | IntputEvent getIntputEvent(); | 42 | InputEvent getInputEvent(); |
43 | 43 | ||
44 | /** | 44 | /** |
45 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getIntputEvent <em>Intput Event</em>}' reference. | 45 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getInputEvent <em>Input Event</em>}' reference. |
46 | * <!-- begin-user-doc --> | 46 | * <!-- begin-user-doc --> |
47 | * <!-- end-user-doc --> | 47 | * <!-- end-user-doc --> |
48 | * @param value the new value of the '<em>Intput Event</em>' reference. | 48 | * @param value the new value of the '<em>Input Event</em>' reference. |
49 | * @see #getIntputEvent() | 49 | * @see #getInputEvent() |
50 | * @generated | 50 | * @generated |
51 | */ | 51 | */ |
52 | void setIntputEvent(IntputEvent value); | 52 | void setInputEvent(InputEvent value); |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * Returns the value of the '<em><b>Component</b></em>' container reference. | 55 | * Returns the value of the '<em><b>Component</b></em>' container reference. |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/IntputEvent.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/InputEvent.java index bec5c487..92721776 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/IntputEvent.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/InputEvent.java | |||
@@ -5,21 +5,21 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.cft; | |||
5 | 5 | ||
6 | /** | 6 | /** |
7 | * <!-- begin-user-doc --> | 7 | * <!-- begin-user-doc --> |
8 | * A representation of the model object '<em><b>Intput Event</b></em>'. | 8 | * A representation of the model object '<em><b>Input Event</b></em>'. |
9 | * <!-- end-user-doc --> | 9 | * <!-- end-user-doc --> |
10 | * | 10 | * |
11 | * <p> | 11 | * <p> |
12 | * The following features are supported: | 12 | * The following features are supported: |
13 | * </p> | 13 | * </p> |
14 | * <ul> | 14 | * <ul> |
15 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent#isMultiple <em>Multiple</em>}</li> | 15 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent#isMultiple <em>Multiple</em>}</li> |
16 | * </ul> | 16 | * </ul> |
17 | * | 17 | * |
18 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getIntputEvent() | 18 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getInputEvent() |
19 | * @model | 19 | * @model |
20 | * @generated | 20 | * @generated |
21 | */ | 21 | */ |
22 | public interface IntputEvent extends EventDeclaration { | 22 | public interface InputEvent extends EventDeclaration { |
23 | /** | 23 | /** |
24 | * Returns the value of the '<em><b>Multiple</b></em>' attribute. | 24 | * Returns the value of the '<em><b>Multiple</b></em>' attribute. |
25 | * <!-- begin-user-doc --> | 25 | * <!-- begin-user-doc --> |
@@ -30,14 +30,14 @@ public interface IntputEvent extends EventDeclaration { | |||
30 | * <!-- end-user-doc --> | 30 | * <!-- end-user-doc --> |
31 | * @return the value of the '<em>Multiple</em>' attribute. | 31 | * @return the value of the '<em>Multiple</em>' attribute. |
32 | * @see #setMultiple(boolean) | 32 | * @see #setMultiple(boolean) |
33 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getIntputEvent_Multiple() | 33 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getInputEvent_Multiple() |
34 | * @model | 34 | * @model |
35 | * @generated | 35 | * @generated |
36 | */ | 36 | */ |
37 | boolean isMultiple(); | 37 | boolean isMultiple(); |
38 | 38 | ||
39 | /** | 39 | /** |
40 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent#isMultiple <em>Multiple</em>}' attribute. | 40 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent#isMultiple <em>Multiple</em>}' attribute. |
41 | * <!-- begin-user-doc --> | 41 | * <!-- begin-user-doc --> |
42 | * <!-- end-user-doc --> | 42 | * <!-- end-user-doc --> |
43 | * @param value the new value of the '<em>Multiple</em>' attribute. | 43 | * @param value the new value of the '<em>Multiple</em>' attribute. |
@@ -46,4 +46,4 @@ public interface IntputEvent extends EventDeclaration { | |||
46 | */ | 46 | */ |
47 | void setMultiple(boolean value); | 47 | void setMultiple(boolean value); |
48 | 48 | ||
49 | } // IntputEvent | 49 | } // InputEvent |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java index 33778461..6eac2861 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftFactoryImpl.java | |||
@@ -58,7 +58,7 @@ public class CftFactoryImpl extends EFactoryImpl implements CftFactory { | |||
58 | switch (eClass.getClassifierID()) { | 58 | switch (eClass.getClassifierID()) { |
59 | case CftPackage.COMPONENT_DEFINITION: return createComponentDefinition(); | 59 | case CftPackage.COMPONENT_DEFINITION: return createComponentDefinition(); |
60 | case CftPackage.BASIC_EVENT_DEFINITION: return createBasicEventDefinition(); | 60 | case CftPackage.BASIC_EVENT_DEFINITION: return createBasicEventDefinition(); |
61 | case CftPackage.INTPUT_EVENT: return createIntputEvent(); | 61 | case CftPackage.INPUT_EVENT: return createInputEvent(); |
62 | case CftPackage.AND_GATE_DEFINITION: return createAndGateDefinition(); | 62 | case CftPackage.AND_GATE_DEFINITION: return createAndGateDefinition(); |
63 | case CftPackage.OR_GATE_DEFINITION: return createOrGateDefinition(); | 63 | case CftPackage.OR_GATE_DEFINITION: return createOrGateDefinition(); |
64 | case CftPackage.KOF_MGATE_DEFINITION: return createKOfMGateDefinition(); | 64 | case CftPackage.KOF_MGATE_DEFINITION: return createKOfMGateDefinition(); |
@@ -100,9 +100,9 @@ public class CftFactoryImpl extends EFactoryImpl implements CftFactory { | |||
100 | * @generated | 100 | * @generated |
101 | */ | 101 | */ |
102 | @Override | 102 | @Override |
103 | public IntputEvent createIntputEvent() { | 103 | public InputEvent createInputEvent() { |
104 | IntputEventImpl intputEvent = new IntputEventImpl(); | 104 | InputEventImpl inputEvent = new InputEventImpl(); |
105 | return intputEvent; | 105 | return inputEvent; |
106 | } | 106 | } |
107 | 107 | ||
108 | /** | 108 | /** |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftPackageImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftPackageImpl.java index f03fa0ba..1d6b6a23 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftPackageImpl.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/CftPackageImpl.java | |||
@@ -14,7 +14,7 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration; | |||
14 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDefinition; | 14 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDefinition; |
15 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.GateDefinition; | 15 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.GateDefinition; |
16 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; | 16 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; |
17 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent; | 17 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent; |
18 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition; | 18 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition; |
19 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.OrGateDefinition; | 19 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.OrGateDefinition; |
20 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | 20 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; |
@@ -68,7 +68,7 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
68 | * <!-- end-user-doc --> | 68 | * <!-- end-user-doc --> |
69 | * @generated | 69 | * @generated |
70 | */ | 70 | */ |
71 | private EClass intputEventEClass = null; | 71 | private EClass inputEventEClass = null; |
72 | 72 | ||
73 | /** | 73 | /** |
74 | * <!-- begin-user-doc --> | 74 | * <!-- begin-user-doc --> |
@@ -303,8 +303,8 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
303 | * @generated | 303 | * @generated |
304 | */ | 304 | */ |
305 | @Override | 305 | @Override |
306 | public EClass getIntputEvent() { | 306 | public EClass getInputEvent() { |
307 | return intputEventEClass; | 307 | return inputEventEClass; |
308 | } | 308 | } |
309 | 309 | ||
310 | /** | 310 | /** |
@@ -313,8 +313,8 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
313 | * @generated | 313 | * @generated |
314 | */ | 314 | */ |
315 | @Override | 315 | @Override |
316 | public EAttribute getIntputEvent_Multiple() { | 316 | public EAttribute getInputEvent_Multiple() { |
317 | return (EAttribute)intputEventEClass.getEStructuralFeatures().get(0); | 317 | return (EAttribute)inputEventEClass.getEStructuralFeatures().get(0); |
318 | } | 318 | } |
319 | 319 | ||
320 | /** | 320 | /** |
@@ -463,6 +463,16 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
463 | * @generated | 463 | * @generated |
464 | */ | 464 | */ |
465 | @Override | 465 | @Override |
466 | public EAttribute getComponent_Name() { | ||
467 | return (EAttribute)componentEClass.getEStructuralFeatures().get(3); | ||
468 | } | ||
469 | |||
470 | /** | ||
471 | * <!-- begin-user-doc --> | ||
472 | * <!-- end-user-doc --> | ||
473 | * @generated | ||
474 | */ | ||
475 | @Override | ||
466 | public EClass getInput() { | 476 | public EClass getInput() { |
467 | return inputEClass; | 477 | return inputEClass; |
468 | } | 478 | } |
@@ -473,7 +483,7 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
473 | * @generated | 483 | * @generated |
474 | */ | 484 | */ |
475 | @Override | 485 | @Override |
476 | public EReference getInput_IntputEvent() { | 486 | public EReference getInput_InputEvent() { |
477 | return (EReference)inputEClass.getEStructuralFeatures().get(0); | 487 | return (EReference)inputEClass.getEStructuralFeatures().get(0); |
478 | } | 488 | } |
479 | 489 | ||
@@ -610,8 +620,8 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
610 | basicEventDefinitionEClass = createEClass(BASIC_EVENT_DEFINITION); | 620 | basicEventDefinitionEClass = createEClass(BASIC_EVENT_DEFINITION); |
611 | createEReference(basicEventDefinitionEClass, BASIC_EVENT_DEFINITION__DISTRIBUTION); | 621 | createEReference(basicEventDefinitionEClass, BASIC_EVENT_DEFINITION__DISTRIBUTION); |
612 | 622 | ||
613 | intputEventEClass = createEClass(INTPUT_EVENT); | 623 | inputEventEClass = createEClass(INPUT_EVENT); |
614 | createEAttribute(intputEventEClass, INTPUT_EVENT__MULTIPLE); | 624 | createEAttribute(inputEventEClass, INPUT_EVENT__MULTIPLE); |
615 | 625 | ||
616 | eventDeclarationEClass = createEClass(EVENT_DECLARATION); | 626 | eventDeclarationEClass = createEClass(EVENT_DECLARATION); |
617 | createEAttribute(eventDeclarationEClass, EVENT_DECLARATION__NAME); | 627 | createEAttribute(eventDeclarationEClass, EVENT_DECLARATION__NAME); |
@@ -632,9 +642,10 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
632 | createEReference(componentEClass, COMPONENT__INPUTS); | 642 | createEReference(componentEClass, COMPONENT__INPUTS); |
633 | createEReference(componentEClass, COMPONENT__OUTPUTS); | 643 | createEReference(componentEClass, COMPONENT__OUTPUTS); |
634 | createEReference(componentEClass, COMPONENT__COMPONENT_DEFINITION); | 644 | createEReference(componentEClass, COMPONENT__COMPONENT_DEFINITION); |
645 | createEAttribute(componentEClass, COMPONENT__NAME); | ||
635 | 646 | ||
636 | inputEClass = createEClass(INPUT); | 647 | inputEClass = createEClass(INPUT); |
637 | createEReference(inputEClass, INPUT__INTPUT_EVENT); | 648 | createEReference(inputEClass, INPUT__INPUT_EVENT); |
638 | createEReference(inputEClass, INPUT__COMPONENT); | 649 | createEReference(inputEClass, INPUT__COMPONENT); |
639 | createEReference(inputEClass, INPUT__INCOMING_CONNECTIONS); | 650 | createEReference(inputEClass, INPUT__INCOMING_CONNECTIONS); |
640 | 651 | ||
@@ -682,14 +693,14 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
682 | eventDefinitionEClass.getESuperTypes().add(this.getEventDeclaration()); | 693 | eventDefinitionEClass.getESuperTypes().add(this.getEventDeclaration()); |
683 | gateDefinitionEClass.getESuperTypes().add(this.getEventDefinition()); | 694 | gateDefinitionEClass.getESuperTypes().add(this.getEventDefinition()); |
684 | basicEventDefinitionEClass.getESuperTypes().add(this.getEventDefinition()); | 695 | basicEventDefinitionEClass.getESuperTypes().add(this.getEventDefinition()); |
685 | intputEventEClass.getESuperTypes().add(this.getEventDeclaration()); | 696 | inputEventEClass.getESuperTypes().add(this.getEventDeclaration()); |
686 | andGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); | 697 | andGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); |
687 | orGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); | 698 | orGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); |
688 | kOfMGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); | 699 | kOfMGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); |
689 | 700 | ||
690 | // Initialize classes, features, and operations; add parameters | 701 | // Initialize classes, features, and operations; add parameters |
691 | initEClass(componentDefinitionEClass, ComponentDefinition.class, "ComponentDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 702 | initEClass(componentDefinitionEClass, ComponentDefinition.class, "ComponentDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
692 | initEReference(getComponentDefinition_InputEvents(), this.getIntputEvent(), null, "inputEvents", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 703 | initEReference(getComponentDefinition_InputEvents(), this.getInputEvent(), null, "inputEvents", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
693 | initEReference(getComponentDefinition_EventDefinitions(), this.getEventDefinition(), null, "eventDefinitions", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 704 | initEReference(getComponentDefinition_EventDefinitions(), this.getEventDefinition(), null, "eventDefinitions", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
694 | initEReference(getComponentDefinition_OutputEvents(), this.getEventDeclaration(), null, "outputEvents", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 705 | initEReference(getComponentDefinition_OutputEvents(), this.getEventDeclaration(), null, "outputEvents", null, 0, -1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
695 | initEAttribute(getComponentDefinition_Name(), ecorePackage.getEString(), "name", null, 0, 1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 706 | initEAttribute(getComponentDefinition_Name(), ecorePackage.getEString(), "name", null, 0, 1, ComponentDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
@@ -702,8 +713,8 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
702 | initEClass(basicEventDefinitionEClass, BasicEventDefinition.class, "BasicEventDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 713 | initEClass(basicEventDefinitionEClass, BasicEventDefinition.class, "BasicEventDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
703 | initEReference(getBasicEventDefinition_Distribution(), theFtPackage.getDistribution(), null, "distribution", null, 1, 1, BasicEventDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 714 | initEReference(getBasicEventDefinition_Distribution(), theFtPackage.getDistribution(), null, "distribution", null, 1, 1, BasicEventDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
704 | 715 | ||
705 | initEClass(intputEventEClass, IntputEvent.class, "IntputEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 716 | initEClass(inputEventEClass, InputEvent.class, "InputEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
706 | initEAttribute(getIntputEvent_Multiple(), ecorePackage.getEBoolean(), "multiple", null, 0, 1, IntputEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 717 | initEAttribute(getInputEvent_Multiple(), ecorePackage.getEBoolean(), "multiple", null, 0, 1, InputEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
707 | 718 | ||
708 | initEClass(eventDeclarationEClass, EventDeclaration.class, "EventDeclaration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 719 | initEClass(eventDeclarationEClass, EventDeclaration.class, "EventDeclaration", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
709 | initEAttribute(getEventDeclaration_Name(), ecorePackage.getEString(), "name", null, 0, 1, EventDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 720 | initEAttribute(getEventDeclaration_Name(), ecorePackage.getEString(), "name", null, 0, 1, EventDeclaration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
@@ -724,9 +735,10 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
724 | initEReference(getComponent_Inputs(), this.getInput(), this.getInput_Component(), "inputs", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 735 | initEReference(getComponent_Inputs(), this.getInput(), this.getInput_Component(), "inputs", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
725 | initEReference(getComponent_Outputs(), this.getOutput(), this.getOutput_Component(), "outputs", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 736 | initEReference(getComponent_Outputs(), this.getOutput(), this.getOutput_Component(), "outputs", null, 0, -1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
726 | initEReference(getComponent_ComponentDefinition(), this.getComponentDefinition(), null, "componentDefinition", null, 1, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 737 | initEReference(getComponent_ComponentDefinition(), this.getComponentDefinition(), null, "componentDefinition", null, 1, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
738 | initEAttribute(getComponent_Name(), ecorePackage.getEString(), "name", null, 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
727 | 739 | ||
728 | initEClass(inputEClass, Input.class, "Input", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 740 | initEClass(inputEClass, Input.class, "Input", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
729 | initEReference(getInput_IntputEvent(), this.getIntputEvent(), null, "intputEvent", null, 1, 1, Input.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 741 | initEReference(getInput_InputEvent(), this.getInputEvent(), null, "inputEvent", null, 1, 1, Input.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
730 | initEReference(getInput_Component(), this.getComponent(), this.getComponent_Inputs(), "component", null, 1, 1, Input.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 742 | initEReference(getInput_Component(), this.getComponent(), this.getComponent_Inputs(), "component", null, 1, 1, Input.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
731 | initEReference(getInput_IncomingConnections(), this.getConnection(), this.getConnection_Input(), "incomingConnections", null, 0, -1, Input.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 743 | initEReference(getInput_IncomingConnections(), this.getConnection(), this.getConnection_Input(), "incomingConnections", null, 0, -1, Input.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
732 | 744 | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentDefinitionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentDefinitionImpl.java index 58a476f3..3b79fb0c 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentDefinitionImpl.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentDefinitionImpl.java | |||
@@ -6,8 +6,7 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; | |||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | 6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; |
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration; | 7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration; |
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDefinition; | 8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDefinition; |
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent; | 9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent; |
10 | |||
11 | import java.util.Collection; | 10 | import java.util.Collection; |
12 | 11 | ||
13 | import org.eclipse.emf.common.notify.Notification; | 12 | import org.eclipse.emf.common.notify.Notification; |
@@ -50,7 +49,7 @@ public class ComponentDefinitionImpl extends MinimalEObjectImpl.Container implem | |||
50 | * @generated | 49 | * @generated |
51 | * @ordered | 50 | * @ordered |
52 | */ | 51 | */ |
53 | protected EList<IntputEvent> inputEvents; | 52 | protected EList<InputEvent> inputEvents; |
54 | 53 | ||
55 | /** | 54 | /** |
56 | * The cached value of the '{@link #getEventDefinitions() <em>Event Definitions</em>}' containment reference list. | 55 | * The cached value of the '{@link #getEventDefinitions() <em>Event Definitions</em>}' containment reference list. |
@@ -117,9 +116,9 @@ public class ComponentDefinitionImpl extends MinimalEObjectImpl.Container implem | |||
117 | * @generated | 116 | * @generated |
118 | */ | 117 | */ |
119 | @Override | 118 | @Override |
120 | public EList<IntputEvent> getInputEvents() { | 119 | public EList<InputEvent> getInputEvents() { |
121 | if (inputEvents == null) { | 120 | if (inputEvents == null) { |
122 | inputEvents = new EObjectContainmentEList<IntputEvent>(IntputEvent.class, this, CftPackage.COMPONENT_DEFINITION__INPUT_EVENTS); | 121 | inputEvents = new EObjectContainmentEList<InputEvent>(InputEvent.class, this, CftPackage.COMPONENT_DEFINITION__INPUT_EVENTS); |
123 | } | 122 | } |
124 | return inputEvents; | 123 | return inputEvents; |
125 | } | 124 | } |
@@ -220,7 +219,7 @@ public class ComponentDefinitionImpl extends MinimalEObjectImpl.Container implem | |||
220 | switch (featureID) { | 219 | switch (featureID) { |
221 | case CftPackage.COMPONENT_DEFINITION__INPUT_EVENTS: | 220 | case CftPackage.COMPONENT_DEFINITION__INPUT_EVENTS: |
222 | getInputEvents().clear(); | 221 | getInputEvents().clear(); |
223 | getInputEvents().addAll((Collection<? extends IntputEvent>)newValue); | 222 | getInputEvents().addAll((Collection<? extends InputEvent>)newValue); |
224 | return; | 223 | return; |
225 | case CftPackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: | 224 | case CftPackage.COMPONENT_DEFINITION__EVENT_DEFINITIONS: |
226 | getEventDefinitions().clear(); | 225 | getEventDefinitions().clear(); |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java index 6d23dc78..847b6ee1 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ComponentImpl.java | |||
@@ -35,6 +35,7 @@ import org.eclipse.emf.ecore.util.InternalEList; | |||
35 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getInputs <em>Inputs</em>}</li> | 35 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getInputs <em>Inputs</em>}</li> |
36 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getOutputs <em>Outputs</em>}</li> | 36 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getOutputs <em>Outputs</em>}</li> |
37 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getComponentDefinition <em>Component Definition</em>}</li> | 37 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getComponentDefinition <em>Component Definition</em>}</li> |
38 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getName <em>Name</em>}</li> | ||
38 | * </ul> | 39 | * </ul> |
39 | * | 40 | * |
40 | * @generated | 41 | * @generated |
@@ -71,6 +72,26 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
71 | protected ComponentDefinition componentDefinition; | 72 | protected ComponentDefinition componentDefinition; |
72 | 73 | ||
73 | /** | 74 | /** |
75 | * The default value of the '{@link #getName() <em>Name</em>}' attribute. | ||
76 | * <!-- begin-user-doc --> | ||
77 | * <!-- end-user-doc --> | ||
78 | * @see #getName() | ||
79 | * @generated | ||
80 | * @ordered | ||
81 | */ | ||
82 | protected static final String NAME_EDEFAULT = null; | ||
83 | |||
84 | /** | ||
85 | * The cached value of the '{@link #getName() <em>Name</em>}' attribute. | ||
86 | * <!-- begin-user-doc --> | ||
87 | * <!-- end-user-doc --> | ||
88 | * @see #getName() | ||
89 | * @generated | ||
90 | * @ordered | ||
91 | */ | ||
92 | protected String name = NAME_EDEFAULT; | ||
93 | |||
94 | /** | ||
74 | * <!-- begin-user-doc --> | 95 | * <!-- begin-user-doc --> |
75 | * <!-- end-user-doc --> | 96 | * <!-- end-user-doc --> |
76 | * @generated | 97 | * @generated |
@@ -160,6 +181,29 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
160 | * <!-- end-user-doc --> | 181 | * <!-- end-user-doc --> |
161 | * @generated | 182 | * @generated |
162 | */ | 183 | */ |
184 | @Override | ||
185 | public String getName() { | ||
186 | return name; | ||
187 | } | ||
188 | |||
189 | /** | ||
190 | * <!-- begin-user-doc --> | ||
191 | * <!-- end-user-doc --> | ||
192 | * @generated | ||
193 | */ | ||
194 | @Override | ||
195 | public void setName(String newName) { | ||
196 | String oldName = name; | ||
197 | name = newName; | ||
198 | if (eNotificationRequired()) | ||
199 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.COMPONENT__NAME, oldName, name)); | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * <!-- begin-user-doc --> | ||
204 | * <!-- end-user-doc --> | ||
205 | * @generated | ||
206 | */ | ||
163 | @SuppressWarnings("unchecked") | 207 | @SuppressWarnings("unchecked") |
164 | @Override | 208 | @Override |
165 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | 209 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
@@ -203,6 +247,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
203 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: | 247 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: |
204 | if (resolve) return getComponentDefinition(); | 248 | if (resolve) return getComponentDefinition(); |
205 | return basicGetComponentDefinition(); | 249 | return basicGetComponentDefinition(); |
250 | case CftPackage.COMPONENT__NAME: | ||
251 | return getName(); | ||
206 | } | 252 | } |
207 | return super.eGet(featureID, resolve, coreType); | 253 | return super.eGet(featureID, resolve, coreType); |
208 | } | 254 | } |
@@ -227,6 +273,9 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
227 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: | 273 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: |
228 | setComponentDefinition((ComponentDefinition)newValue); | 274 | setComponentDefinition((ComponentDefinition)newValue); |
229 | return; | 275 | return; |
276 | case CftPackage.COMPONENT__NAME: | ||
277 | setName((String)newValue); | ||
278 | return; | ||
230 | } | 279 | } |
231 | super.eSet(featureID, newValue); | 280 | super.eSet(featureID, newValue); |
232 | } | 281 | } |
@@ -248,6 +297,9 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
248 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: | 297 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: |
249 | setComponentDefinition((ComponentDefinition)null); | 298 | setComponentDefinition((ComponentDefinition)null); |
250 | return; | 299 | return; |
300 | case CftPackage.COMPONENT__NAME: | ||
301 | setName(NAME_EDEFAULT); | ||
302 | return; | ||
251 | } | 303 | } |
252 | super.eUnset(featureID); | 304 | super.eUnset(featureID); |
253 | } | 305 | } |
@@ -266,8 +318,26 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
266 | return outputs != null && !outputs.isEmpty(); | 318 | return outputs != null && !outputs.isEmpty(); |
267 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: | 319 | case CftPackage.COMPONENT__COMPONENT_DEFINITION: |
268 | return componentDefinition != null; | 320 | return componentDefinition != null; |
321 | case CftPackage.COMPONENT__NAME: | ||
322 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); | ||
269 | } | 323 | } |
270 | return super.eIsSet(featureID); | 324 | return super.eIsSet(featureID); |
271 | } | 325 | } |
272 | 326 | ||
327 | /** | ||
328 | * <!-- begin-user-doc --> | ||
329 | * <!-- end-user-doc --> | ||
330 | * @generated | ||
331 | */ | ||
332 | @Override | ||
333 | public String toString() { | ||
334 | if (eIsProxy()) return super.toString(); | ||
335 | |||
336 | StringBuilder result = new StringBuilder(super.toString()); | ||
337 | result.append(" (name: "); | ||
338 | result.append(name); | ||
339 | result.append(')'); | ||
340 | return result.toString(); | ||
341 | } | ||
342 | |||
273 | } //ComponentImpl | 343 | } //ComponentImpl |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/IntputEventImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputEventImpl.java index ea22452f..8432e29b 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/IntputEventImpl.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputEventImpl.java | |||
@@ -3,7 +3,7 @@ | |||
3 | package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl; | 3 | package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl; |
4 | 4 | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; | 5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; |
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent; | 6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent; |
7 | 7 | ||
8 | import org.eclipse.emf.common.notify.Notification; | 8 | import org.eclipse.emf.common.notify.Notification; |
9 | 9 | ||
@@ -13,18 +13,18 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl; | |||
13 | 13 | ||
14 | /** | 14 | /** |
15 | * <!-- begin-user-doc --> | 15 | * <!-- begin-user-doc --> |
16 | * An implementation of the model object '<em><b>Intput Event</b></em>'. | 16 | * An implementation of the model object '<em><b>Input Event</b></em>'. |
17 | * <!-- end-user-doc --> | 17 | * <!-- end-user-doc --> |
18 | * <p> | 18 | * <p> |
19 | * The following features are implemented: | 19 | * The following features are implemented: |
20 | * </p> | 20 | * </p> |
21 | * <ul> | 21 | * <ul> |
22 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.IntputEventImpl#isMultiple <em>Multiple</em>}</li> | 22 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputEventImpl#isMultiple <em>Multiple</em>}</li> |
23 | * </ul> | 23 | * </ul> |
24 | * | 24 | * |
25 | * @generated | 25 | * @generated |
26 | */ | 26 | */ |
27 | public class IntputEventImpl extends EventDeclarationImpl implements IntputEvent { | 27 | public class InputEventImpl extends EventDeclarationImpl implements InputEvent { |
28 | /** | 28 | /** |
29 | * The default value of the '{@link #isMultiple() <em>Multiple</em>}' attribute. | 29 | * The default value of the '{@link #isMultiple() <em>Multiple</em>}' attribute. |
30 | * <!-- begin-user-doc --> | 30 | * <!-- begin-user-doc --> |
@@ -50,7 +50,7 @@ public class IntputEventImpl extends EventDeclarationImpl implements IntputEvent | |||
50 | * <!-- end-user-doc --> | 50 | * <!-- end-user-doc --> |
51 | * @generated | 51 | * @generated |
52 | */ | 52 | */ |
53 | protected IntputEventImpl() { | 53 | protected InputEventImpl() { |
54 | super(); | 54 | super(); |
55 | } | 55 | } |
56 | 56 | ||
@@ -61,7 +61,7 @@ public class IntputEventImpl extends EventDeclarationImpl implements IntputEvent | |||
61 | */ | 61 | */ |
62 | @Override | 62 | @Override |
63 | protected EClass eStaticClass() { | 63 | protected EClass eStaticClass() { |
64 | return CftPackage.Literals.INTPUT_EVENT; | 64 | return CftPackage.Literals.INPUT_EVENT; |
65 | } | 65 | } |
66 | 66 | ||
67 | /** | 67 | /** |
@@ -84,7 +84,7 @@ public class IntputEventImpl extends EventDeclarationImpl implements IntputEvent | |||
84 | boolean oldMultiple = multiple; | 84 | boolean oldMultiple = multiple; |
85 | multiple = newMultiple; | 85 | multiple = newMultiple; |
86 | if (eNotificationRequired()) | 86 | if (eNotificationRequired()) |
87 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.INTPUT_EVENT__MULTIPLE, oldMultiple, multiple)); | 87 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.INPUT_EVENT__MULTIPLE, oldMultiple, multiple)); |
88 | } | 88 | } |
89 | 89 | ||
90 | /** | 90 | /** |
@@ -95,7 +95,7 @@ public class IntputEventImpl extends EventDeclarationImpl implements IntputEvent | |||
95 | @Override | 95 | @Override |
96 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | 96 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
97 | switch (featureID) { | 97 | switch (featureID) { |
98 | case CftPackage.INTPUT_EVENT__MULTIPLE: | 98 | case CftPackage.INPUT_EVENT__MULTIPLE: |
99 | return isMultiple(); | 99 | return isMultiple(); |
100 | } | 100 | } |
101 | return super.eGet(featureID, resolve, coreType); | 101 | return super.eGet(featureID, resolve, coreType); |
@@ -109,7 +109,7 @@ public class IntputEventImpl extends EventDeclarationImpl implements IntputEvent | |||
109 | @Override | 109 | @Override |
110 | public void eSet(int featureID, Object newValue) { | 110 | public void eSet(int featureID, Object newValue) { |
111 | switch (featureID) { | 111 | switch (featureID) { |
112 | case CftPackage.INTPUT_EVENT__MULTIPLE: | 112 | case CftPackage.INPUT_EVENT__MULTIPLE: |
113 | setMultiple((Boolean)newValue); | 113 | setMultiple((Boolean)newValue); |
114 | return; | 114 | return; |
115 | } | 115 | } |
@@ -124,7 +124,7 @@ public class IntputEventImpl extends EventDeclarationImpl implements IntputEvent | |||
124 | @Override | 124 | @Override |
125 | public void eUnset(int featureID) { | 125 | public void eUnset(int featureID) { |
126 | switch (featureID) { | 126 | switch (featureID) { |
127 | case CftPackage.INTPUT_EVENT__MULTIPLE: | 127 | case CftPackage.INPUT_EVENT__MULTIPLE: |
128 | setMultiple(MULTIPLE_EDEFAULT); | 128 | setMultiple(MULTIPLE_EDEFAULT); |
129 | return; | 129 | return; |
130 | } | 130 | } |
@@ -139,7 +139,7 @@ public class IntputEventImpl extends EventDeclarationImpl implements IntputEvent | |||
139 | @Override | 139 | @Override |
140 | public boolean eIsSet(int featureID) { | 140 | public boolean eIsSet(int featureID) { |
141 | switch (featureID) { | 141 | switch (featureID) { |
142 | case CftPackage.INTPUT_EVENT__MULTIPLE: | 142 | case CftPackage.INPUT_EVENT__MULTIPLE: |
143 | return multiple != MULTIPLE_EDEFAULT; | 143 | return multiple != MULTIPLE_EDEFAULT; |
144 | } | 144 | } |
145 | return super.eIsSet(featureID); | 145 | return super.eIsSet(featureID); |
@@ -161,4 +161,4 @@ public class IntputEventImpl extends EventDeclarationImpl implements IntputEvent | |||
161 | return result.toString(); | 161 | return result.toString(); |
162 | } | 162 | } |
163 | 163 | ||
164 | } //IntputEventImpl | 164 | } //InputEventImpl |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputImpl.java index eda5fea0..aa560064 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputImpl.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/InputImpl.java | |||
@@ -6,8 +6,7 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage; | |||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component; | 6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component; |
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection; | 7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection; |
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; | 8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; |
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent; | 9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent; |
10 | |||
11 | import java.util.Collection; | 10 | import java.util.Collection; |
12 | 11 | ||
13 | import org.eclipse.emf.common.notify.Notification; | 12 | import org.eclipse.emf.common.notify.Notification; |
@@ -33,7 +32,7 @@ import org.eclipse.emf.ecore.util.InternalEList; | |||
33 | * The following features are implemented: | 32 | * The following features are implemented: |
34 | * </p> | 33 | * </p> |
35 | * <ul> | 34 | * <ul> |
36 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl#getIntputEvent <em>Intput Event</em>}</li> | 35 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl#getInputEvent <em>Input Event</em>}</li> |
37 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl#getComponent <em>Component</em>}</li> | 36 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl#getComponent <em>Component</em>}</li> |
38 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl#getIncomingConnections <em>Incoming Connections</em>}</li> | 37 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl#getIncomingConnections <em>Incoming Connections</em>}</li> |
39 | * </ul> | 38 | * </ul> |
@@ -42,14 +41,14 @@ import org.eclipse.emf.ecore.util.InternalEList; | |||
42 | */ | 41 | */ |
43 | public class InputImpl extends MinimalEObjectImpl.Container implements Input { | 42 | public class InputImpl extends MinimalEObjectImpl.Container implements Input { |
44 | /** | 43 | /** |
45 | * The cached value of the '{@link #getIntputEvent() <em>Intput Event</em>}' reference. | 44 | * The cached value of the '{@link #getInputEvent() <em>Input Event</em>}' reference. |
46 | * <!-- begin-user-doc --> | 45 | * <!-- begin-user-doc --> |
47 | * <!-- end-user-doc --> | 46 | * <!-- end-user-doc --> |
48 | * @see #getIntputEvent() | 47 | * @see #getInputEvent() |
49 | * @generated | 48 | * @generated |
50 | * @ordered | 49 | * @ordered |
51 | */ | 50 | */ |
52 | protected IntputEvent intputEvent; | 51 | protected InputEvent inputEvent; |
53 | 52 | ||
54 | /** | 53 | /** |
55 | * The cached value of the '{@link #getIncomingConnections() <em>Incoming Connections</em>}' containment reference list. | 54 | * The cached value of the '{@link #getIncomingConnections() <em>Incoming Connections</em>}' containment reference list. |
@@ -86,16 +85,16 @@ public class InputImpl extends MinimalEObjectImpl.Container implements Input { | |||
86 | * @generated | 85 | * @generated |
87 | */ | 86 | */ |
88 | @Override | 87 | @Override |
89 | public IntputEvent getIntputEvent() { | 88 | public InputEvent getInputEvent() { |
90 | if (intputEvent != null && intputEvent.eIsProxy()) { | 89 | if (inputEvent != null && inputEvent.eIsProxy()) { |
91 | InternalEObject oldIntputEvent = (InternalEObject)intputEvent; | 90 | InternalEObject oldInputEvent = (InternalEObject)inputEvent; |
92 | intputEvent = (IntputEvent)eResolveProxy(oldIntputEvent); | 91 | inputEvent = (InputEvent)eResolveProxy(oldInputEvent); |
93 | if (intputEvent != oldIntputEvent) { | 92 | if (inputEvent != oldInputEvent) { |
94 | if (eNotificationRequired()) | 93 | if (eNotificationRequired()) |
95 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftPackage.INPUT__INTPUT_EVENT, oldIntputEvent, intputEvent)); | 94 | eNotify(new ENotificationImpl(this, Notification.RESOLVE, CftPackage.INPUT__INPUT_EVENT, oldInputEvent, inputEvent)); |
96 | } | 95 | } |
97 | } | 96 | } |
98 | return intputEvent; | 97 | return inputEvent; |
99 | } | 98 | } |
100 | 99 | ||
101 | /** | 100 | /** |
@@ -103,8 +102,8 @@ public class InputImpl extends MinimalEObjectImpl.Container implements Input { | |||
103 | * <!-- end-user-doc --> | 102 | * <!-- end-user-doc --> |
104 | * @generated | 103 | * @generated |
105 | */ | 104 | */ |
106 | public IntputEvent basicGetIntputEvent() { | 105 | public InputEvent basicGetInputEvent() { |
107 | return intputEvent; | 106 | return inputEvent; |
108 | } | 107 | } |
109 | 108 | ||
110 | /** | 109 | /** |
@@ -113,11 +112,11 @@ public class InputImpl extends MinimalEObjectImpl.Container implements Input { | |||
113 | * @generated | 112 | * @generated |
114 | */ | 113 | */ |
115 | @Override | 114 | @Override |
116 | public void setIntputEvent(IntputEvent newIntputEvent) { | 115 | public void setInputEvent(InputEvent newInputEvent) { |
117 | IntputEvent oldIntputEvent = intputEvent; | 116 | InputEvent oldInputEvent = inputEvent; |
118 | intputEvent = newIntputEvent; | 117 | inputEvent = newInputEvent; |
119 | if (eNotificationRequired()) | 118 | if (eNotificationRequired()) |
120 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.INPUT__INTPUT_EVENT, oldIntputEvent, intputEvent)); | 119 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.INPUT__INPUT_EVENT, oldInputEvent, inputEvent)); |
121 | } | 120 | } |
122 | 121 | ||
123 | /** | 122 | /** |
@@ -233,9 +232,9 @@ public class InputImpl extends MinimalEObjectImpl.Container implements Input { | |||
233 | @Override | 232 | @Override |
234 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | 233 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
235 | switch (featureID) { | 234 | switch (featureID) { |
236 | case CftPackage.INPUT__INTPUT_EVENT: | 235 | case CftPackage.INPUT__INPUT_EVENT: |
237 | if (resolve) return getIntputEvent(); | 236 | if (resolve) return getInputEvent(); |
238 | return basicGetIntputEvent(); | 237 | return basicGetInputEvent(); |
239 | case CftPackage.INPUT__COMPONENT: | 238 | case CftPackage.INPUT__COMPONENT: |
240 | return getComponent(); | 239 | return getComponent(); |
241 | case CftPackage.INPUT__INCOMING_CONNECTIONS: | 240 | case CftPackage.INPUT__INCOMING_CONNECTIONS: |
@@ -253,8 +252,8 @@ public class InputImpl extends MinimalEObjectImpl.Container implements Input { | |||
253 | @Override | 252 | @Override |
254 | public void eSet(int featureID, Object newValue) { | 253 | public void eSet(int featureID, Object newValue) { |
255 | switch (featureID) { | 254 | switch (featureID) { |
256 | case CftPackage.INPUT__INTPUT_EVENT: | 255 | case CftPackage.INPUT__INPUT_EVENT: |
257 | setIntputEvent((IntputEvent)newValue); | 256 | setInputEvent((InputEvent)newValue); |
258 | return; | 257 | return; |
259 | case CftPackage.INPUT__COMPONENT: | 258 | case CftPackage.INPUT__COMPONENT: |
260 | setComponent((Component)newValue); | 259 | setComponent((Component)newValue); |
@@ -275,8 +274,8 @@ public class InputImpl extends MinimalEObjectImpl.Container implements Input { | |||
275 | @Override | 274 | @Override |
276 | public void eUnset(int featureID) { | 275 | public void eUnset(int featureID) { |
277 | switch (featureID) { | 276 | switch (featureID) { |
278 | case CftPackage.INPUT__INTPUT_EVENT: | 277 | case CftPackage.INPUT__INPUT_EVENT: |
279 | setIntputEvent((IntputEvent)null); | 278 | setInputEvent((InputEvent)null); |
280 | return; | 279 | return; |
281 | case CftPackage.INPUT__COMPONENT: | 280 | case CftPackage.INPUT__COMPONENT: |
282 | setComponent((Component)null); | 281 | setComponent((Component)null); |
@@ -296,8 +295,8 @@ public class InputImpl extends MinimalEObjectImpl.Container implements Input { | |||
296 | @Override | 295 | @Override |
297 | public boolean eIsSet(int featureID) { | 296 | public boolean eIsSet(int featureID) { |
298 | switch (featureID) { | 297 | switch (featureID) { |
299 | case CftPackage.INPUT__INTPUT_EVENT: | 298 | case CftPackage.INPUT__INPUT_EVENT: |
300 | return intputEvent != null; | 299 | return inputEvent != null; |
301 | case CftPackage.INPUT__COMPONENT: | 300 | case CftPackage.INPUT__COMPONENT: |
302 | return getComponent() != null; | 301 | return getComponent() != null; |
303 | case CftPackage.INPUT__INCOMING_CONNECTIONS: | 302 | case CftPackage.INPUT__INCOMING_CONNECTIONS: |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftAdapterFactory.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftAdapterFactory.java index c6b82734..e3a40888 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftAdapterFactory.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftAdapterFactory.java | |||
@@ -84,8 +84,8 @@ public class CftAdapterFactory extends AdapterFactoryImpl { | |||
84 | return createBasicEventDefinitionAdapter(); | 84 | return createBasicEventDefinitionAdapter(); |
85 | } | 85 | } |
86 | @Override | 86 | @Override |
87 | public Adapter caseIntputEvent(IntputEvent object) { | 87 | public Adapter caseInputEvent(InputEvent object) { |
88 | return createIntputEventAdapter(); | 88 | return createInputEventAdapter(); |
89 | } | 89 | } |
90 | @Override | 90 | @Override |
91 | public Adapter caseEventDeclaration(EventDeclaration object) { | 91 | public Adapter caseEventDeclaration(EventDeclaration object) { |
@@ -200,16 +200,16 @@ public class CftAdapterFactory extends AdapterFactoryImpl { | |||
200 | } | 200 | } |
201 | 201 | ||
202 | /** | 202 | /** |
203 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent <em>Intput Event</em>}'. | 203 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent <em>Input Event</em>}'. |
204 | * <!-- begin-user-doc --> | 204 | * <!-- begin-user-doc --> |
205 | * This default implementation returns null so that we can easily ignore cases; | 205 | * This default implementation returns null so that we can easily ignore cases; |
206 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | 206 | * it's useful to ignore a case when inheritance will catch all the cases anyway. |
207 | * <!-- end-user-doc --> | 207 | * <!-- end-user-doc --> |
208 | * @return the new adapter. | 208 | * @return the new adapter. |
209 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.IntputEvent | 209 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent |
210 | * @generated | 210 | * @generated |
211 | */ | 211 | */ |
212 | public Adapter createIntputEventAdapter() { | 212 | public Adapter createInputEventAdapter() { |
213 | return null; | 213 | return null; |
214 | } | 214 | } |
215 | 215 | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftSwitch.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftSwitch.java index f2ec9ffb..e32d792b 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftSwitch.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/util/CftSwitch.java | |||
@@ -95,10 +95,10 @@ public class CftSwitch<T> extends Switch<T> { | |||
95 | if (result == null) result = defaultCase(theEObject); | 95 | if (result == null) result = defaultCase(theEObject); |
96 | return result; | 96 | return result; |
97 | } | 97 | } |
98 | case CftPackage.INTPUT_EVENT: { | 98 | case CftPackage.INPUT_EVENT: { |
99 | IntputEvent intputEvent = (IntputEvent)theEObject; | 99 | InputEvent inputEvent = (InputEvent)theEObject; |
100 | T result = caseIntputEvent(intputEvent); | 100 | T result = caseInputEvent(inputEvent); |
101 | if (result == null) result = caseEventDeclaration(intputEvent); | 101 | if (result == null) result = caseEventDeclaration(inputEvent); |
102 | if (result == null) result = defaultCase(theEObject); | 102 | if (result == null) result = defaultCase(theEObject); |
103 | return result; | 103 | return result; |
104 | } | 104 | } |
@@ -230,17 +230,17 @@ public class CftSwitch<T> extends Switch<T> { | |||
230 | } | 230 | } |
231 | 231 | ||
232 | /** | 232 | /** |
233 | * Returns the result of interpreting the object as an instance of '<em>Intput Event</em>'. | 233 | * Returns the result of interpreting the object as an instance of '<em>Input Event</em>'. |
234 | * <!-- begin-user-doc --> | 234 | * <!-- begin-user-doc --> |
235 | * This implementation returns null; | 235 | * This implementation returns null; |
236 | * returning a non-null result will terminate the switch. | 236 | * returning a non-null result will terminate the switch. |
237 | * <!-- end-user-doc --> | 237 | * <!-- end-user-doc --> |
238 | * @param object the target of the switch. | 238 | * @param object the target of the switch. |
239 | * @return the result of interpreting the object as an instance of '<em>Intput Event</em>'. | 239 | * @return the result of interpreting the object as an instance of '<em>Input Event</em>'. |
240 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | 240 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) |
241 | * @generated | 241 | * @generated |
242 | */ | 242 | */ |
243 | public T caseIntputEvent(IntputEvent object) { | 243 | public T caseInputEvent(InputEvent object) { |
244 | return null; | 244 | return null; |
245 | } | 245 | } |
246 | 246 | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/cft.ecore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/cft.ecore index f9bad301..2fc15d94 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/cft.ecore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/cft.ecore | |||
@@ -4,7 +4,7 @@ | |||
4 | nsPrefix="cft"> | 4 | nsPrefix="cft"> |
5 | <eClassifiers xsi:type="ecore:EClass" name="ComponentDefinition"> | 5 | <eClassifiers xsi:type="ecore:EClass" name="ComponentDefinition"> |
6 | <eStructuralFeatures xsi:type="ecore:EReference" name="inputEvents" upperBound="-1" | 6 | <eStructuralFeatures xsi:type="ecore:EReference" name="inputEvents" upperBound="-1" |
7 | eType="#//IntputEvent" containment="true"/> | 7 | eType="#//InputEvent" containment="true"/> |
8 | <eStructuralFeatures xsi:type="ecore:EReference" name="eventDefinitions" upperBound="-1" | 8 | <eStructuralFeatures xsi:type="ecore:EReference" name="eventDefinitions" upperBound="-1" |
9 | eType="#//EventDefinition" containment="true"/> | 9 | eType="#//EventDefinition" containment="true"/> |
10 | <eStructuralFeatures xsi:type="ecore:EReference" name="outputEvents" upperBound="-1" | 10 | <eStructuralFeatures xsi:type="ecore:EReference" name="outputEvents" upperBound="-1" |
@@ -20,7 +20,7 @@ | |||
20 | <eStructuralFeatures xsi:type="ecore:EReference" name="distribution" lowerBound="1" | 20 | <eStructuralFeatures xsi:type="ecore:EReference" name="distribution" lowerBound="1" |
21 | eType="ecore:EClass ft.ecore#//Distribution" containment="true"/> | 21 | eType="ecore:EClass ft.ecore#//Distribution" containment="true"/> |
22 | </eClassifiers> | 22 | </eClassifiers> |
23 | <eClassifiers xsi:type="ecore:EClass" name="IntputEvent" eSuperTypes="#//EventDeclaration"> | 23 | <eClassifiers xsi:type="ecore:EClass" name="InputEvent" eSuperTypes="#//EventDeclaration"> |
24 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="multiple" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> | 24 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="multiple" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/> |
25 | </eClassifiers> | 25 | </eClassifiers> |
26 | <eClassifiers xsi:type="ecore:EClass" name="EventDeclaration" abstract="true"> | 26 | <eClassifiers xsi:type="ecore:EClass" name="EventDeclaration" abstract="true"> |
@@ -45,10 +45,11 @@ | |||
45 | eType="#//Output" containment="true" eOpposite="#//Output/component"/> | 45 | eType="#//Output" containment="true" eOpposite="#//Output/component"/> |
46 | <eStructuralFeatures xsi:type="ecore:EReference" name="componentDefinition" lowerBound="1" | 46 | <eStructuralFeatures xsi:type="ecore:EReference" name="componentDefinition" lowerBound="1" |
47 | eType="#//ComponentDefinition"/> | 47 | eType="#//ComponentDefinition"/> |
48 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> | ||
48 | </eClassifiers> | 49 | </eClassifiers> |
49 | <eClassifiers xsi:type="ecore:EClass" name="Input"> | 50 | <eClassifiers xsi:type="ecore:EClass" name="Input"> |
50 | <eStructuralFeatures xsi:type="ecore:EReference" name="intputEvent" lowerBound="1" | 51 | <eStructuralFeatures xsi:type="ecore:EReference" name="inputEvent" lowerBound="1" |
51 | eType="#//IntputEvent"/> | 52 | eType="#//InputEvent"/> |
52 | <eStructuralFeatures xsi:type="ecore:EReference" name="component" lowerBound="1" | 53 | <eStructuralFeatures xsi:type="ecore:EReference" name="component" lowerBound="1" |
53 | eType="#//Component" eOpposite="#//Component/inputs"/> | 54 | eType="#//Component" eOpposite="#//Component/inputs"/> |
54 | <eStructuralFeatures xsi:type="ecore:EReference" name="incomingConnections" upperBound="-1" | 55 | <eStructuralFeatures xsi:type="ecore:EReference" name="incomingConnections" upperBound="-1" |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/cft.genmodel b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/cft.genmodel index 25b3cd39..635a2f46 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/cft.genmodel +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/cft.genmodel | |||
@@ -20,8 +20,8 @@ | |||
20 | <genClasses ecoreClass="cft.ecore#//BasicEventDefinition"> | 20 | <genClasses ecoreClass="cft.ecore#//BasicEventDefinition"> |
21 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//BasicEventDefinition/distribution"/> | 21 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//BasicEventDefinition/distribution"/> |
22 | </genClasses> | 22 | </genClasses> |
23 | <genClasses ecoreClass="cft.ecore#//IntputEvent"> | 23 | <genClasses ecoreClass="cft.ecore#//InputEvent"> |
24 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute cft.ecore#//IntputEvent/multiple"/> | 24 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute cft.ecore#//InputEvent/multiple"/> |
25 | </genClasses> | 25 | </genClasses> |
26 | <genClasses image="false" ecoreClass="cft.ecore#//EventDeclaration"> | 26 | <genClasses image="false" ecoreClass="cft.ecore#//EventDeclaration"> |
27 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute cft.ecore#//EventDeclaration/name"/> | 27 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute cft.ecore#//EventDeclaration/name"/> |
@@ -40,9 +40,10 @@ | |||
40 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//Component/inputs"/> | 40 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//Component/inputs"/> |
41 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//Component/outputs"/> | 41 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//Component/outputs"/> |
42 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference cft.ecore#//Component/componentDefinition"/> | 42 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference cft.ecore#//Component/componentDefinition"/> |
43 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute cft.ecore#//Component/name"/> | ||
43 | </genClasses> | 44 | </genClasses> |
44 | <genClasses ecoreClass="cft.ecore#//Input"> | 45 | <genClasses ecoreClass="cft.ecore#//Input"> |
45 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference cft.ecore#//Input/intputEvent"/> | 46 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference cft.ecore#//Input/inputEvent"/> |
46 | <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference cft.ecore#//Input/component"/> | 47 | <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference cft.ecore#//Input/component"/> |
47 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//Input/incomingConnections"/> | 48 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//Input/incomingConnections"/> |
48 | </genClasses> | 49 | </genClasses> |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/representations.aird b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/representations.aird index 083705fc..0c5c0fe8 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/representations.aird +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/representations.aird | |||
@@ -185,6 +185,10 @@ | |||
185 | <children xmi:type="notation:Node" xmi:id="_bLbyQCorEemQnOUhg0mU1A" type="2003" element="_bLPlACorEemQnOUhg0mU1A"> | 185 | <children xmi:type="notation:Node" xmi:id="_bLbyQCorEemQnOUhg0mU1A" type="2003" element="_bLPlACorEemQnOUhg0mU1A"> |
186 | <children xmi:type="notation:Node" xmi:id="_bLbyQyorEemQnOUhg0mU1A" type="5007"/> | 186 | <children xmi:type="notation:Node" xmi:id="_bLbyQyorEemQnOUhg0mU1A" type="5007"/> |
187 | <children xmi:type="notation:Node" xmi:id="_bLbyRCorEemQnOUhg0mU1A" type="7004"> | 187 | <children xmi:type="notation:Node" xmi:id="_bLbyRCorEemQnOUhg0mU1A" type="7004"> |
188 | <children xmi:type="notation:Node" xmi:id="_sNmcQCr7EemQnOUhg0mU1A" type="3010" element="_sNcrQCr7EemQnOUhg0mU1A"> | ||
189 | <styles xmi:type="notation:FontStyle" xmi:id="_sNmcQSr7EemQnOUhg0mU1A" fontColor="2697711" fontName="Cantarell" fontHeight="8"/> | ||
190 | <layoutConstraint xmi:type="notation:Location" xmi:id="_sNmcQir7EemQnOUhg0mU1A"/> | ||
191 | </children> | ||
188 | <styles xmi:type="notation:SortingStyle" xmi:id="_bLbyRSorEemQnOUhg0mU1A"/> | 192 | <styles xmi:type="notation:SortingStyle" xmi:id="_bLbyRSorEemQnOUhg0mU1A"/> |
189 | <styles xmi:type="notation:FilteringStyle" xmi:id="_bLbyRiorEemQnOUhg0mU1A"/> | 193 | <styles xmi:type="notation:FilteringStyle" xmi:id="_bLbyRiorEemQnOUhg0mU1A"/> |
190 | </children> | 194 | </children> |
@@ -635,9 +639,9 @@ | |||
635 | </ownedStyle> | 639 | </ownedStyle> |
636 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> | 640 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> |
637 | </ownedDiagramElements> | 641 | </ownedDiagramElements> |
638 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Iec3ECodEemQnOUhg0mU1A" name="IntputEvent" tooltipText="" outgoingEdges="_Wlx-JiodEemQnOUhg0mU1A" incomingEdges="_lIWk0CofEemQnOUhg0mU1A _UW5t9iosEemQnOUhg0mU1A" width="12" height="10"> | 642 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Iec3ECodEemQnOUhg0mU1A" name="InputEvent" tooltipText="" outgoingEdges="_Wlx-JiodEemQnOUhg0mU1A" incomingEdges="_lIWk0CofEemQnOUhg0mU1A _UW5t9iosEemQnOUhg0mU1A" width="12" height="10"> |
639 | <target xmi:type="ecore:EClass" href="model/cft.ecore#//IntputEvent"/> | 643 | <target xmi:type="ecore:EClass" href="model/cft.ecore#//InputEvent"/> |
640 | <semanticElements xmi:type="ecore:EClass" href="model/cft.ecore#//IntputEvent"/> | 644 | <semanticElements xmi:type="ecore:EClass" href="model/cft.ecore#//InputEvent"/> |
641 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 645 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
642 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | 646 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> |
643 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | 647 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> |
@@ -646,8 +650,8 @@ | |||
646 | </ownedStyle> | 650 | </ownedStyle> |
647 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | 651 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> |
648 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_0AT3kCofEemQnOUhg0mU1A" name="multiple : EBoolean = false" tooltipText=""> | 652 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_0AT3kCofEemQnOUhg0mU1A" name="multiple : EBoolean = false" tooltipText=""> |
649 | <target xmi:type="ecore:EAttribute" href="model/cft.ecore#//IntputEvent/multiple"/> | 653 | <target xmi:type="ecore:EAttribute" href="model/cft.ecore#//InputEvent/multiple"/> |
650 | <semanticElements xmi:type="ecore:EAttribute" href="model/cft.ecore#//IntputEvent/multiple"/> | 654 | <semanticElements xmi:type="ecore:EAttribute" href="model/cft.ecore#//InputEvent/multiple"/> |
651 | <ownedStyle xmi:type="diagram:BundledImage" uid="_0uDHUSofEemQnOUhg0mU1A" labelAlignment="LEFT"> | 655 | <ownedStyle xmi:type="diagram:BundledImage" uid="_0uDHUSofEemQnOUhg0mU1A" labelAlignment="LEFT"> |
652 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> | 656 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> |
653 | </ownedStyle> | 657 | </ownedStyle> |
@@ -675,8 +679,8 @@ | |||
675 | </ownedElements> | 679 | </ownedElements> |
676 | </ownedDiagramElements> | 680 | </ownedDiagramElements> |
677 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_Wlx-JiodEemQnOUhg0mU1A" sourceNode="_Iec3ECodEemQnOUhg0mU1A" targetNode="_QD_FECodEemQnOUhg0mU1A"> | 681 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_Wlx-JiodEemQnOUhg0mU1A" sourceNode="_Iec3ECodEemQnOUhg0mU1A" targetNode="_QD_FECodEemQnOUhg0mU1A"> |
678 | <target xmi:type="ecore:EClass" href="model/cft.ecore#//IntputEvent"/> | 682 | <target xmi:type="ecore:EClass" href="model/cft.ecore#//InputEvent"/> |
679 | <semanticElements xmi:type="ecore:EClass" href="model/cft.ecore#//IntputEvent"/> | 683 | <semanticElements xmi:type="ecore:EClass" href="model/cft.ecore#//InputEvent"/> |
680 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_0uFjnCofEemQnOUhg0mU1A" targetArrow="InputClosedArrow" routingStyle="tree"> | 684 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_0uFjnCofEemQnOUhg0mU1A" targetArrow="InputClosedArrow" routingStyle="tree"> |
681 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> | 685 | <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> |
682 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_0uFjnSofEemQnOUhg0mU1A" showIcon="false"> | 686 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_0uFjnSofEemQnOUhg0mU1A" showIcon="false"> |
@@ -876,10 +880,18 @@ | |||
876 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 880 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
877 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | 881 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> |
878 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | 882 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> |
879 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_bLQzICorEemQnOUhg0mU1A" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | 883 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_s21mjCr7EemQnOUhg0mU1A" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> |
880 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> | 884 | <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/> |
881 | </ownedStyle> | 885 | </ownedStyle> |
882 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> | 886 | <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> |
887 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_sNcrQCr7EemQnOUhg0mU1A" name="name : EString" tooltipText=""> | ||
888 | <target xmi:type="ecore:EAttribute" href="model/cft.ecore#//Component/name"/> | ||
889 | <semanticElements xmi:type="ecore:EAttribute" href="model/cft.ecore#//Component/name"/> | ||
890 | <ownedStyle xmi:type="diagram:BundledImage" uid="_s220oyr7EemQnOUhg0mU1A" labelAlignment="LEFT"> | ||
891 | <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']/@style"/> | ||
892 | </ownedStyle> | ||
893 | <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/> | ||
894 | </ownedElements> | ||
883 | </ownedDiagramElements> | 895 | </ownedDiagramElements> |
884 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_dgSJ2CorEemQnOUhg0mU1A" name="[0..*] components" sourceNode="_Wm0XkCorEemQnOUhg0mU1A" targetNode="_bLPlACorEemQnOUhg0mU1A"> | 896 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_dgSJ2CorEemQnOUhg0mU1A" name="[0..*] components" sourceNode="_Wm0XkCorEemQnOUhg0mU1A" targetNode="_bLPlACorEemQnOUhg0mU1A"> |
885 | <target xmi:type="ecore:EReference" href="model/cft.ecore#//ComponentFaultTree/components"/> | 897 | <target xmi:type="ecore:EReference" href="model/cft.ecore#//ComponentFaultTree/components"/> |
@@ -949,9 +961,9 @@ | |||
949 | </ownedStyle> | 961 | </ownedStyle> |
950 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> | 962 | <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> |
951 | </ownedDiagramElements> | 963 | </ownedDiagramElements> |
952 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_UW5t9iosEemQnOUhg0mU1A" name="[1..1] intputEvent" sourceNode="_mUETkCorEemQnOUhg0mU1A" targetNode="_Iec3ECodEemQnOUhg0mU1A"> | 964 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_UW5t9iosEemQnOUhg0mU1A" name="[1..1] inputEvent" sourceNode="_mUETkCorEemQnOUhg0mU1A" targetNode="_Iec3ECodEemQnOUhg0mU1A"> |
953 | <target xmi:type="ecore:EReference" href="model/cft.ecore#//Input/intputEvent"/> | 965 | <target xmi:type="ecore:EReference" href="model/cft.ecore#//Input/inputEvent"/> |
954 | <semanticElements xmi:type="ecore:EReference" href="model/cft.ecore#//Input/intputEvent"/> | 966 | <semanticElements xmi:type="ecore:EReference" href="model/cft.ecore#//Input/inputEvent"/> |
955 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_Xs4LTCosEemQnOUhg0mU1A" description="_IXsxGCosEemQnOUhg0mU1A" routingStyle="manhattan" strokeColor="0,0,0"> | 967 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_Xs4LTCosEemQnOUhg0mU1A" description="_IXsxGCosEemQnOUhg0mU1A" routingStyle="manhattan" strokeColor="0,0,0"> |
956 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_Xs4LTiosEemQnOUhg0mU1A" showIcon="false"> | 968 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_Xs4LTiosEemQnOUhg0mU1A" showIcon="false"> |
957 | <labelFormat>bold</labelFormat> | 969 | <labelFormat>bold</labelFormat> |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/.classpath b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/.classpath index eca7bdba..428337e5 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/.classpath +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/.classpath | |||
@@ -3,5 +3,6 @@ | |||
3 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> | 3 | <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> |
4 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | 4 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> |
5 | <classpathentry kind="src" path="src"/> | 5 | <classpathentry kind="src" path="src"/> |
6 | <classpathentry kind="src" path="xtend-gen"/> | ||
6 | <classpathentry kind="output" path="bin"/> | 7 | <classpathentry kind="output" path="bin"/> |
7 | </classpath> | 8 | </classpath> |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/.project b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/.project index bd1da900..ba51fe06 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/.project +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/.project | |||
@@ -6,6 +6,11 @@ | |||
6 | </projects> | 6 | </projects> |
7 | <buildSpec> | 7 | <buildSpec> |
8 | <buildCommand> | 8 | <buildCommand> |
9 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
9 | <name>org.eclipse.jdt.core.javabuilder</name> | 14 | <name>org.eclipse.jdt.core.javabuilder</name> |
10 | <arguments> | 15 | <arguments> |
11 | </arguments> | 16 | </arguments> |
@@ -24,5 +29,6 @@ | |||
24 | <natures> | 29 | <natures> |
25 | <nature>org.eclipse.pde.PluginNature</nature> | 30 | <nature>org.eclipse.pde.PluginNature</nature> |
26 | <nature>org.eclipse.jdt.core.javanature</nature> | 31 | <nature>org.eclipse.jdt.core.javanature</nature> |
32 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
27 | </natures> | 33 | </natures> |
28 | </projectDescription> | 34 | </projectDescription> |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/META-INF/MANIFEST.MF b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/META-INF/MANIFEST.MF index ae23171b..91eeedc5 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/META-INF/MANIFEST.MF +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/META-INF/MANIFEST.MF | |||
@@ -5,3 +5,12 @@ Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.faulttree.transformation | |||
5 | Bundle-Version: 1.0.0.qualifier | 5 | Bundle-Version: 1.0.0.qualifier |
6 | Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.faulttree.transformation | 6 | Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.faulttree.transformation |
7 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | 7 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 |
8 | Require-Bundle: com.google.guava, | ||
9 | org.eclipse.xtext.xbase.lib, | ||
10 | org.eclipse.xtend.lib, | ||
11 | org.eclipse.xtend.lib.macro, | ||
12 | org.eclipse.emf.ecore, | ||
13 | org.eclipse.viatra.query.runtime, | ||
14 | org.eclipse.viatra.query.runtime.rete, | ||
15 | org.eclipse.viatra.query.runtime.localsearch, | ||
16 | hu.bme.mit.inf.dslreasoner.faulttree.components | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.xtend new file mode 100644 index 00000000..caaffc3c --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.xtend | |||
@@ -0,0 +1,10 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree | ||
4 | |||
5 | class Cft2FtTransformation { | ||
6 | def createFaultTree(ComponentFaultTree componentFaultTree) { | ||
7 | // TODO | ||
8 | throw new UnsupportedOperationException() | ||
9 | } | ||
10 | } \ No newline at end of file | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentFaultTreeTrace.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentFaultTreeTrace.xtend new file mode 100644 index 00000000..7a3e377b --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentFaultTreeTrace.xtend | |||
@@ -0,0 +1,39 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftFactory | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition | ||
5 | import java.util.Map | ||
6 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
7 | import org.eclipse.xtend.lib.annotations.Accessors | ||
8 | |||
9 | class ComponentFaultTreeTrace { | ||
10 | @Accessors val componentFaultTree = CftFactory.eINSTANCE.createComponentFaultTree | ||
11 | |||
12 | val nameGenerator = new ComponentNameGenerator | ||
13 | val Map<IPatternMatch, ComponentInstanceTrace> componentInstancesMap = newHashMap | ||
14 | |||
15 | def instantiateComponent(IPatternMatch patternMatch, ComponentDefinition componenDefinition) { | ||
16 | if (componentInstancesMap.containsKey(patternMatch)) { | ||
17 | throw new IllegalArgumentException("Already instantiated component for match: " + patternMatch) | ||
18 | } | ||
19 | val componentTrace = new ComponentInstanceTrace(componentFaultTree, componenDefinition, nameGenerator) | ||
20 | componentInstancesMap.put(patternMatch, componentTrace) | ||
21 | componentTrace | ||
22 | } | ||
23 | |||
24 | def setTopLevel(ComponentInstanceTrace trace) { | ||
25 | if (componentFaultTree.topEvent !== null) { | ||
26 | throw new IllegalArgumentException("Top level component already set") | ||
27 | } | ||
28 | val outputs = trace.outputs | ||
29 | if (outputs.size !== 1) { | ||
30 | throw new IllegalArgumentException("Top level component must have 1 output, got " + outputs.size + | ||
31 | " instead") | ||
32 | } | ||
33 | componentFaultTree.topEvent = outputs.head | ||
34 | } | ||
35 | |||
36 | def lookup(IPatternMatch patternMatch) { | ||
37 | componentInstancesMap.get(patternMatch) | ||
38 | } | ||
39 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentInstanceTrace.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentInstanceTrace.xtend new file mode 100644 index 00000000..7353bfe5 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentInstanceTrace.xtend | |||
@@ -0,0 +1,51 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft | ||
2 | |||
3 | import com.google.common.collect.Maps | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftFactory | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output | ||
10 | import java.util.Map | ||
11 | |||
12 | class ComponentInstanceTrace { | ||
13 | val componentInstance = CftFactory.eINSTANCE.createComponent | ||
14 | val Map<InputEvent, InputTrace> inputEventsMap | ||
15 | val Map<EventDeclaration, Output> outputEventsMap | ||
16 | |||
17 | protected new(ComponentFaultTree faultTree, ComponentDefinition componentDefinition, | ||
18 | ComponentNameGenerator nameGenerator) { | ||
19 | componentInstance.componentDefinition = componentDefinition | ||
20 | componentInstance.name = nameGenerator.nextName(componentDefinition) | ||
21 | inputEventsMap = Maps.newHashMapWithExpectedSize(componentDefinition.inputEvents.size) | ||
22 | for (inputEvent : componentDefinition.inputEvents) { | ||
23 | val inputTrace = new InputTrace(componentInstance, inputEvent) | ||
24 | inputEventsMap.put(inputEvent, inputTrace) | ||
25 | } | ||
26 | outputEventsMap = Maps.newHashMapWithExpectedSize(componentDefinition.outputEvents.size) | ||
27 | for (outputEvent : componentDefinition.outputEvents) { | ||
28 | val output = CftFactory.eINSTANCE.createOutput | ||
29 | output.eventDeclaration = outputEvent | ||
30 | componentInstance.outputs += output | ||
31 | outputEventsMap.put(outputEvent, output) | ||
32 | } | ||
33 | faultTree.components += componentInstance | ||
34 | } | ||
35 | |||
36 | def void assign(EventDeclaration inputEvent, ComponentInstanceTrace sourceComponent, EventDeclaration outputEvent) { | ||
37 | val inputTrace = inputEventsMap.get(inputEvent) | ||
38 | if (inputTrace === null) { | ||
39 | throw new IllegalArgumentException("Unknown input: " + inputEvent) | ||
40 | } | ||
41 | val output = sourceComponent.outputEventsMap.get(outputEvent) | ||
42 | if (output === null) { | ||
43 | throw new IllegalArgumentException("Unknown output: " + outputEvent) | ||
44 | } | ||
45 | inputTrace.assign(output) | ||
46 | } | ||
47 | |||
48 | protected def getOutputs() { | ||
49 | componentInstance.outputs | ||
50 | } | ||
51 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.xtend new file mode 100644 index 00000000..71d40a9b --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.xtend | |||
@@ -0,0 +1,16 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition | ||
4 | import java.util.Map | ||
5 | |||
6 | class ComponentNameGenerator { | ||
7 | static val DEFAULT_NAME = "__unnamed" | ||
8 | |||
9 | val Map<ComponentDefinition, Integer> instanceCounts = newHashMap | ||
10 | |||
11 | def nextName(ComponentDefinition componentDefinition) { | ||
12 | val instanceCount = instanceCounts.getOrDefault(componentDefinition, 0) | ||
13 | instanceCounts.put(componentDefinition, instanceCount + 1) | ||
14 | (componentDefinition.name ?: DEFAULT_NAME) + instanceCount | ||
15 | } | ||
16 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.xtend new file mode 100644 index 00000000..36aac5e1 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.xtend | |||
@@ -0,0 +1,27 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft | ||
2 | |||
3 | import com.google.common.collect.ImmutableList | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition | ||
5 | import java.util.List | ||
6 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
7 | |||
8 | class Ecore2CftTransformation { | ||
9 | val List<MappingHandler> mappingHandlers | ||
10 | |||
11 | new(TransformationDefinition transformationDefinition, ViatraQueryEngine viatraQueryEngine) { | ||
12 | val mappingQueries = new MappingQueries(transformationDefinition, viatraQueryEngine) | ||
13 | mappingHandlers = ImmutableList.copyOf(transformationDefinition.mappingDefinitions.map [ mappingDefinition | | ||
14 | new MappingHandler(mappingDefinition, mappingQueries) | ||
15 | ]) | ||
16 | } | ||
17 | |||
18 | def createComponentFaultTree() { | ||
19 | val trace = new ComponentFaultTreeTrace | ||
20 | for (handler : mappingHandlers) { | ||
21 | handler.instantiateComponents(trace) | ||
22 | } | ||
23 | for (handler : mappingHandlers) { | ||
24 | handler.instantiateConnections(trace) | ||
25 | } | ||
26 | } | ||
27 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/InputTrace.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/InputTrace.xtend new file mode 100644 index 00000000..c529a09b --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/InputTrace.xtend | |||
@@ -0,0 +1,29 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftFactory | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output | ||
9 | import java.util.Map | ||
10 | |||
11 | class InputTrace { | ||
12 | val Input input = CftFactory.eINSTANCE.createInput | ||
13 | val Map<Output, Connection> connectionsMap = newHashMap | ||
14 | |||
15 | protected new(Component component, InputEvent inputEvent) { | ||
16 | input.inputEvent = inputEvent | ||
17 | component.inputs += input | ||
18 | } | ||
19 | |||
20 | def void assign(Output output) { | ||
21 | val connection = connectionsMap.get(output) | ||
22 | if (connection === null) { | ||
23 | val newConnection = CftFactory.eINSTANCE.createConnection | ||
24 | newConnection.output = output | ||
25 | input.incomingConnections += newConnection | ||
26 | connectionsMap.put(output, newConnection) | ||
27 | } | ||
28 | } | ||
29 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/LookupHandler.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/LookupHandler.xtend new file mode 100644 index 00000000..3a06dcc3 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/LookupHandler.xtend | |||
@@ -0,0 +1,47 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition | ||
5 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
6 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
7 | |||
8 | class LookupHandler { | ||
9 | val int[] argumentIndices | ||
10 | val ViatraQueryMatcher<? extends IPatternMatch> lookedUpMatcher | ||
11 | |||
12 | new(MappingDefinition mappingDefinition, LookupDefinition lookupDefinition, | ||
13 | ViatraQueryMatcher<? extends IPatternMatch> lookedUpMatcher) { | ||
14 | if (lookupDefinition.eContainer != mappingDefinition) { | ||
15 | throw new IllegalArgumentException("lookupDefinition must be contained in mappingDefinition") | ||
16 | } | ||
17 | val argumentCount = lookupDefinition.arguments.size | ||
18 | if (argumentCount != lookedUpMatcher.parameterNames.length) { | ||
19 | throw new IllegalArgumentException( | ||
20 | "lookupDefinition (name: " + lookupDefinition.mapping?.pattern?.name + | ||
21 | ") must have as many arguments as lookedUpMatcher (name: " + lookedUpMatcher.patternName + ")") | ||
22 | } | ||
23 | argumentIndices = newIntArrayOfSize(argumentCount) | ||
24 | for (var int i = 0; i < argumentCount; i++) { | ||
25 | val argument = lookupDefinition.arguments.get(i) | ||
26 | val argumentIndex = mappingDefinition.parameters.indexOf(argument) | ||
27 | argumentIndices.set(i, argumentIndex) | ||
28 | } | ||
29 | this.lookedUpMatcher = lookedUpMatcher | ||
30 | } | ||
31 | |||
32 | def lookupForMatch(ComponentFaultTreeTrace faultTreeTrace, IPatternMatch match) { | ||
33 | val lookedUpMatch = createLookedUpMatch(match) | ||
34 | faultTreeTrace.lookup(lookedUpMatch) | ||
35 | } | ||
36 | |||
37 | private def createLookedUpMatch(IPatternMatch match) { | ||
38 | val lookedUpMatch = lookedUpMatcher.newEmptyMatch | ||
39 | val argumentCount = argumentIndices.length | ||
40 | for (var int i = 0; i < argumentCount; i++) { | ||
41 | val argumentIndex = argumentIndices.get(i) | ||
42 | var argumentValue = match.get(argumentIndex) | ||
43 | lookedUpMatch.set(i, argumentValue) | ||
44 | } | ||
45 | lookedUpMatch | ||
46 | } | ||
47 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingHandler.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingHandler.xtend new file mode 100644 index 00000000..643af5c4 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingHandler.xtend | |||
@@ -0,0 +1,91 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft | ||
2 | |||
3 | import com.google.common.collect.ImmutableMap | ||
4 | import com.google.common.collect.Maps | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable | ||
8 | import java.util.Map | ||
9 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
10 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
11 | |||
12 | class MappingHandler { | ||
13 | val ViatraQueryMatcher<? extends IPatternMatch> matcher | ||
14 | val MappingDefinition mappingDefinition | ||
15 | val Map<LookupDefinition, LookupHandler> lookupHandlers | ||
16 | |||
17 | new(MappingDefinition mappingDefinition, MappingQueries mappingQueries) { | ||
18 | matcher = mappingQueries.getMatcher(mappingDefinition) | ||
19 | this.mappingDefinition = mappingDefinition | ||
20 | val variables = newHashSet | ||
21 | for (assignment : mappingDefinition.assignments) { | ||
22 | variables += assignment.input.component | ||
23 | variables += assignment.output.component | ||
24 | } | ||
25 | lookupHandlers = ImmutableMap.copyOf(variables.filter(LookupDefinition).toMap([it], [ lookupDefinition | | ||
26 | mappingQueries.createLookupHandler(mappingDefinition, lookupDefinition) | ||
27 | ])) | ||
28 | } | ||
29 | |||
30 | def instantiateComponents(ComponentFaultTreeTrace faultTreeTrace) { | ||
31 | if (!hasComponentInstace) { | ||
32 | return | ||
33 | } | ||
34 | matcher.forEachMatch [ match | | ||
35 | val componentTrace = faultTreeTrace.instantiateComponent(match, componentDefinition) | ||
36 | if (isTopLevel) { | ||
37 | faultTreeTrace.topLevel = componentTrace | ||
38 | } | ||
39 | ] | ||
40 | } | ||
41 | |||
42 | def instantiateConnections(ComponentFaultTreeTrace faultTreeTrace) { | ||
43 | if (!hasConnections) { | ||
44 | return | ||
45 | } | ||
46 | matcher.forEachMatch [ match | | ||
47 | val lookedUpComponents = lookupComponents(faultTreeTrace, match) | ||
48 | for (assignment : mappingDefinition.assignments) { | ||
49 | val input = assignment.input | ||
50 | val inputComponent = lookedUpComponents.get(input.component) | ||
51 | val output = assignment.output | ||
52 | val outputComponent = lookedUpComponents.get(output.component) | ||
53 | if (inputComponent !== null && outputComponent !== null) { | ||
54 | inputComponent.assign(input.event, outputComponent, output.event) | ||
55 | } | ||
56 | } | ||
57 | ] | ||
58 | } | ||
59 | |||
60 | private def Map<Variable, ComponentInstanceTrace> lookupComponents(ComponentFaultTreeTrace faultTreeTrace, | ||
61 | IPatternMatch match) { | ||
62 | val lookedUpComponents = Maps.newHashMapWithExpectedSize(lookupHandlers.size + 1) | ||
63 | if (hasComponentInstace) { | ||
64 | val componentInstance = faultTreeTrace.lookup(match) | ||
65 | lookedUpComponents.put(mappingDefinition.componentInstance, componentInstance) | ||
66 | } | ||
67 | for (pair : lookupHandlers.entrySet) { | ||
68 | val componentInstance = pair.value.lookupForMatch(faultTreeTrace, match) | ||
69 | if (componentInstance !== null) { | ||
70 | lookedUpComponents.put(pair.key, componentInstance) | ||
71 | } | ||
72 | } | ||
73 | lookedUpComponents | ||
74 | } | ||
75 | |||
76 | private def getComponentDefinition() { | ||
77 | mappingDefinition.componentInstance?.componentType | ||
78 | } | ||
79 | |||
80 | private def hasComponentInstace() { | ||
81 | componentDefinition !== null | ||
82 | } | ||
83 | |||
84 | private def isTopLevel() { | ||
85 | mappingDefinition.topLevel | ||
86 | } | ||
87 | |||
88 | private def hasConnections() { | ||
89 | !mappingDefinition.assignments.empty | ||
90 | } | ||
91 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingQueries.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingQueries.xtend new file mode 100644 index 00000000..6683b3f8 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingQueries.xtend | |||
@@ -0,0 +1,38 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft | ||
2 | |||
3 | import com.google.common.collect.ImmutableMap | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition | ||
7 | import java.util.Map | ||
8 | import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder | ||
9 | import org.eclipse.viatra.query.runtime.api.GenericQueryGroup | ||
10 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | ||
11 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine | ||
12 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher | ||
13 | |||
14 | class MappingQueries { | ||
15 | val Map<MappingDefinition, ViatraQueryMatcher<? extends IPatternMatch>> matchersMap | ||
16 | |||
17 | new(TransformationDefinition transformationDefinition, ViatraQueryEngine viatraQueryEngine) { | ||
18 | val specificationBuilder = new SpecificationBuilder | ||
19 | val querySpecificationsMap = transformationDefinition.mappingDefinitions.toMap([it], [ | ||
20 | specificationBuilder.getOrCreateSpecification(pattern) | ||
21 | ]) | ||
22 | GenericQueryGroup.of(querySpecificationsMap.values).prepare(viatraQueryEngine) | ||
23 | matchersMap = ImmutableMap.copyOf(querySpecificationsMap.mapValues[getMatcher(viatraQueryEngine)]) | ||
24 | } | ||
25 | |||
26 | def getMatcher(MappingDefinition mappingDefinition) { | ||
27 | val matcher = matchersMap.get(mappingDefinition) | ||
28 | if (matcher === null) { | ||
29 | throw new IllegalArgumentException("Unknown mapping definition: " + mappingDefinition) | ||
30 | } | ||
31 | matcher | ||
32 | } | ||
33 | |||
34 | def createLookupHandler(MappingDefinition mappingDefinition, LookupDefinition lookupDefinition) { | ||
35 | val lookedUpMatcher = getMatcher(lookupDefinition.mapping) | ||
36 | new LookupHandler(mappingDefinition, lookupDefinition, lookedUpMatcher) | ||
37 | } | ||
38 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/.gitignore new file mode 100644 index 00000000..49df59a2 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/.gitignore | |||
@@ -0,0 +1,8 @@ | |||
1 | /.CftTransformation.java._trace | ||
2 | /.ComponentFaultTreeTrace.java._trace | ||
3 | /.ComponentInstanceTrace.java._trace | ||
4 | /.InputTrace.java._trace | ||
5 | /.MappingHandler.java._trace | ||
6 | /.ComponentInstantiationHandler.java._trace | ||
7 | /.MappingQueries.java._trace | ||
8 | /.LookupHandler.java._trace | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.Cft2FtTransformation.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.Cft2FtTransformation.xtendbin new file mode 100644 index 00000000..3e751774 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.Cft2FtTransformation.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.gitignore new file mode 100644 index 00000000..70156b02 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.gitignore | |||
@@ -0,0 +1 @@ | |||
/.Cft2FtTransformation.java._trace | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.java new file mode 100644 index 00000000..ae750806 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.java | |||
@@ -0,0 +1,10 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft; | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree; | ||
4 | |||
5 | @SuppressWarnings("all") | ||
6 | public class Cft2FtTransformation { | ||
7 | public void createFaultTree(final ComponentFaultTree componentFaultTree) { | ||
8 | throw new UnsupportedOperationException(); | ||
9 | } | ||
10 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentFaultTreeTrace.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentFaultTreeTrace.xtendbin new file mode 100644 index 00000000..d26ae359 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentFaultTreeTrace.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentInstanceTrace.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentInstanceTrace.xtendbin new file mode 100644 index 00000000..03d6064f --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentInstanceTrace.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentNameGenerator.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentNameGenerator.xtendbin new file mode 100644 index 00000000..1f6758ac --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentNameGenerator.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.Ecore2CftTransformation.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.Ecore2CftTransformation.xtendbin new file mode 100644 index 00000000..3569c02f --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.Ecore2CftTransformation.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.InputTrace.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.InputTrace.xtendbin new file mode 100644 index 00000000..378550ba --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.InputTrace.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.LookupHandler.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.LookupHandler.xtendbin new file mode 100644 index 00000000..0b0e534a --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.LookupHandler.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.MappingHandler.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.MappingHandler.xtendbin new file mode 100644 index 00000000..5e26d4e4 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.MappingHandler.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.MappingQueries.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.MappingQueries.xtendbin new file mode 100644 index 00000000..8fb7f13f --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.MappingQueries.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.gitignore new file mode 100644 index 00000000..33bb70d4 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.gitignore | |||
@@ -0,0 +1,9 @@ | |||
1 | /.ComponentFaultTreeTrace.java._trace | ||
2 | /.ComponentInstanceTrace.java._trace | ||
3 | /.InputTrace.java._trace | ||
4 | /.LookupHandler.java._trace | ||
5 | /.MappingHandler.java._trace | ||
6 | /.MappingQueries.java._trace | ||
7 | /.CftTransformation.java._trace | ||
8 | /.Ecore2CftTransformation.java._trace | ||
9 | /.ComponentNameGenerator.java._trace | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentFaultTreeTrace.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentFaultTreeTrace.java new file mode 100644 index 00000000..46e711d9 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentFaultTreeTrace.java | |||
@@ -0,0 +1,67 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft; | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftFactory; | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentInstanceTrace; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentNameGenerator; | ||
9 | import java.util.Map; | ||
10 | import org.eclipse.emf.common.util.EList; | ||
11 | import org.eclipse.viatra.query.runtime.api.IPatternMatch; | ||
12 | import org.eclipse.xtend.lib.annotations.Accessors; | ||
13 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; | ||
14 | import org.eclipse.xtext.xbase.lib.IterableExtensions; | ||
15 | import org.eclipse.xtext.xbase.lib.Pure; | ||
16 | |||
17 | @SuppressWarnings("all") | ||
18 | public class ComponentFaultTreeTrace { | ||
19 | @Accessors | ||
20 | private final ComponentFaultTree componentFaultTree = CftFactory.eINSTANCE.createComponentFaultTree(); | ||
21 | |||
22 | private final ComponentNameGenerator nameGenerator = new ComponentNameGenerator(); | ||
23 | |||
24 | private final Map<IPatternMatch, ComponentInstanceTrace> componentInstancesMap = CollectionLiterals.<IPatternMatch, ComponentInstanceTrace>newHashMap(); | ||
25 | |||
26 | public ComponentInstanceTrace instantiateComponent(final IPatternMatch patternMatch, final ComponentDefinition componenDefinition) { | ||
27 | ComponentInstanceTrace _xblockexpression = null; | ||
28 | { | ||
29 | boolean _containsKey = this.componentInstancesMap.containsKey(patternMatch); | ||
30 | if (_containsKey) { | ||
31 | throw new IllegalArgumentException(("Already instantiated component for match: " + patternMatch)); | ||
32 | } | ||
33 | final ComponentInstanceTrace componentTrace = new ComponentInstanceTrace(this.componentFaultTree, componenDefinition, this.nameGenerator); | ||
34 | this.componentInstancesMap.put(patternMatch, componentTrace); | ||
35 | _xblockexpression = componentTrace; | ||
36 | } | ||
37 | return _xblockexpression; | ||
38 | } | ||
39 | |||
40 | public void setTopLevel(final ComponentInstanceTrace trace) { | ||
41 | Output _topEvent = this.componentFaultTree.getTopEvent(); | ||
42 | boolean _tripleNotEquals = (_topEvent != null); | ||
43 | if (_tripleNotEquals) { | ||
44 | throw new IllegalArgumentException("Top level component already set"); | ||
45 | } | ||
46 | final EList<Output> outputs = trace.getOutputs(); | ||
47 | int _size = outputs.size(); | ||
48 | boolean _tripleNotEquals_1 = (_size != 1); | ||
49 | if (_tripleNotEquals_1) { | ||
50 | int _size_1 = outputs.size(); | ||
51 | String _plus = ("Top level component must have 1 output, got " + Integer.valueOf(_size_1)); | ||
52 | String _plus_1 = (_plus + | ||
53 | " instead"); | ||
54 | throw new IllegalArgumentException(_plus_1); | ||
55 | } | ||
56 | this.componentFaultTree.setTopEvent(IterableExtensions.<Output>head(outputs)); | ||
57 | } | ||
58 | |||
59 | public ComponentInstanceTrace lookup(final IPatternMatch patternMatch) { | ||
60 | return this.componentInstancesMap.get(patternMatch); | ||
61 | } | ||
62 | |||
63 | @Pure | ||
64 | public ComponentFaultTree getComponentFaultTree() { | ||
65 | return this.componentFaultTree; | ||
66 | } | ||
67 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentInstanceTrace.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentInstanceTrace.java new file mode 100644 index 00000000..840f501d --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentInstanceTrace.java | |||
@@ -0,0 +1,65 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft; | ||
2 | |||
3 | import com.google.common.collect.Maps; | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftFactory; | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration; | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent; | ||
10 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | ||
11 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentNameGenerator; | ||
12 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.InputTrace; | ||
13 | import java.util.Map; | ||
14 | import org.eclipse.emf.common.util.EList; | ||
15 | |||
16 | @SuppressWarnings("all") | ||
17 | public class ComponentInstanceTrace { | ||
18 | private final Component componentInstance = CftFactory.eINSTANCE.createComponent(); | ||
19 | |||
20 | private final Map<InputEvent, InputTrace> inputEventsMap; | ||
21 | |||
22 | private final Map<EventDeclaration, Output> outputEventsMap; | ||
23 | |||
24 | protected ComponentInstanceTrace(final ComponentFaultTree faultTree, final ComponentDefinition componentDefinition, final ComponentNameGenerator nameGenerator) { | ||
25 | this.componentInstance.setComponentDefinition(componentDefinition); | ||
26 | this.componentInstance.setName(nameGenerator.nextName(componentDefinition)); | ||
27 | this.inputEventsMap = Maps.<InputEvent, InputTrace>newHashMapWithExpectedSize(componentDefinition.getInputEvents().size()); | ||
28 | EList<InputEvent> _inputEvents = componentDefinition.getInputEvents(); | ||
29 | for (final InputEvent inputEvent : _inputEvents) { | ||
30 | { | ||
31 | final InputTrace inputTrace = new InputTrace(this.componentInstance, inputEvent); | ||
32 | this.inputEventsMap.put(inputEvent, inputTrace); | ||
33 | } | ||
34 | } | ||
35 | this.outputEventsMap = Maps.<EventDeclaration, Output>newHashMapWithExpectedSize(componentDefinition.getOutputEvents().size()); | ||
36 | EList<EventDeclaration> _outputEvents = componentDefinition.getOutputEvents(); | ||
37 | for (final EventDeclaration outputEvent : _outputEvents) { | ||
38 | { | ||
39 | final Output output = CftFactory.eINSTANCE.createOutput(); | ||
40 | output.setEventDeclaration(outputEvent); | ||
41 | EList<Output> _outputs = this.componentInstance.getOutputs(); | ||
42 | _outputs.add(output); | ||
43 | this.outputEventsMap.put(outputEvent, output); | ||
44 | } | ||
45 | } | ||
46 | EList<Component> _components = faultTree.getComponents(); | ||
47 | _components.add(this.componentInstance); | ||
48 | } | ||
49 | |||
50 | public void assign(final EventDeclaration inputEvent, final ComponentInstanceTrace sourceComponent, final EventDeclaration outputEvent) { | ||
51 | final InputTrace inputTrace = this.inputEventsMap.get(inputEvent); | ||
52 | if ((inputTrace == null)) { | ||
53 | throw new IllegalArgumentException(("Unknown input: " + inputEvent)); | ||
54 | } | ||
55 | final Output output = sourceComponent.outputEventsMap.get(outputEvent); | ||
56 | if ((output == null)) { | ||
57 | throw new IllegalArgumentException(("Unknown output: " + outputEvent)); | ||
58 | } | ||
59 | inputTrace.assign(output); | ||
60 | } | ||
61 | |||
62 | protected EList<Output> getOutputs() { | ||
63 | return this.componentInstance.getOutputs(); | ||
64 | } | ||
65 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.java new file mode 100644 index 00000000..e7dca003 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/ComponentNameGenerator.java | |||
@@ -0,0 +1,29 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft; | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | ||
4 | import java.util.Map; | ||
5 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; | ||
6 | |||
7 | @SuppressWarnings("all") | ||
8 | public class ComponentNameGenerator { | ||
9 | private static final String DEFAULT_NAME = "__unnamed"; | ||
10 | |||
11 | private final Map<ComponentDefinition, Integer> instanceCounts = CollectionLiterals.<ComponentDefinition, Integer>newHashMap(); | ||
12 | |||
13 | public String nextName(final ComponentDefinition componentDefinition) { | ||
14 | String _xblockexpression = null; | ||
15 | { | ||
16 | final Integer instanceCount = this.instanceCounts.getOrDefault(componentDefinition, Integer.valueOf(0)); | ||
17 | this.instanceCounts.put(componentDefinition, Integer.valueOf(((instanceCount).intValue() + 1))); | ||
18 | String _elvis = null; | ||
19 | String _name = componentDefinition.getName(); | ||
20 | if (_name != null) { | ||
21 | _elvis = _name; | ||
22 | } else { | ||
23 | _elvis = ComponentNameGenerator.DEFAULT_NAME; | ||
24 | } | ||
25 | _xblockexpression = (_elvis + instanceCount); | ||
26 | } | ||
27 | return _xblockexpression; | ||
28 | } | ||
29 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.java new file mode 100644 index 00000000..8b2d9d97 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.java | |||
@@ -0,0 +1,35 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft; | ||
2 | |||
3 | import com.google.common.collect.ImmutableList; | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentFaultTreeTrace; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.MappingHandler; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.MappingQueries; | ||
9 | import java.util.List; | ||
10 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; | ||
11 | import org.eclipse.xtext.xbase.lib.Functions.Function1; | ||
12 | import org.eclipse.xtext.xbase.lib.ListExtensions; | ||
13 | |||
14 | @SuppressWarnings("all") | ||
15 | public class Ecore2CftTransformation { | ||
16 | private final List<MappingHandler> mappingHandlers; | ||
17 | |||
18 | public Ecore2CftTransformation(final TransformationDefinition transformationDefinition, final ViatraQueryEngine viatraQueryEngine) { | ||
19 | final MappingQueries mappingQueries = new MappingQueries(transformationDefinition, viatraQueryEngine); | ||
20 | final Function1<MappingDefinition, MappingHandler> _function = (MappingDefinition mappingDefinition) -> { | ||
21 | return new MappingHandler(mappingDefinition, mappingQueries); | ||
22 | }; | ||
23 | this.mappingHandlers = ImmutableList.<MappingHandler>copyOf(ListExtensions.<MappingDefinition, MappingHandler>map(transformationDefinition.getMappingDefinitions(), _function)); | ||
24 | } | ||
25 | |||
26 | public void createComponentFaultTree() { | ||
27 | final ComponentFaultTreeTrace trace = new ComponentFaultTreeTrace(); | ||
28 | for (final MappingHandler handler : this.mappingHandlers) { | ||
29 | handler.instantiateComponents(trace); | ||
30 | } | ||
31 | for (final MappingHandler handler_1 : this.mappingHandlers) { | ||
32 | handler_1.instantiateConnections(trace); | ||
33 | } | ||
34 | } | ||
35 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/InputTrace.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/InputTrace.java new file mode 100644 index 00000000..c12f2bae --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/InputTrace.java | |||
@@ -0,0 +1,35 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft; | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftFactory; | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component; | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | ||
9 | import java.util.Map; | ||
10 | import org.eclipse.emf.common.util.EList; | ||
11 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; | ||
12 | |||
13 | @SuppressWarnings("all") | ||
14 | public class InputTrace { | ||
15 | private final Input input = CftFactory.eINSTANCE.createInput(); | ||
16 | |||
17 | private final Map<Output, Connection> connectionsMap = CollectionLiterals.<Output, Connection>newHashMap(); | ||
18 | |||
19 | protected InputTrace(final Component component, final InputEvent inputEvent) { | ||
20 | this.input.setInputEvent(inputEvent); | ||
21 | EList<Input> _inputs = component.getInputs(); | ||
22 | _inputs.add(this.input); | ||
23 | } | ||
24 | |||
25 | public void assign(final Output output) { | ||
26 | final Connection connection = this.connectionsMap.get(output); | ||
27 | if ((connection == null)) { | ||
28 | final Connection newConnection = CftFactory.eINSTANCE.createConnection(); | ||
29 | newConnection.setOutput(output); | ||
30 | EList<Connection> _incomingConnections = this.input.getIncomingConnections(); | ||
31 | _incomingConnections.add(newConnection); | ||
32 | this.connectionsMap.put(output, newConnection); | ||
33 | } | ||
34 | } | ||
35 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/LookupHandler.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/LookupHandler.java new file mode 100644 index 00000000..e155aac8 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/LookupHandler.java | |||
@@ -0,0 +1,84 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft; | ||
2 | |||
3 | import com.google.common.base.Objects; | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition; | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentFaultTreeTrace; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentInstanceTrace; | ||
9 | import org.eclipse.emf.ecore.EObject; | ||
10 | import org.eclipse.viatra.query.patternlanguage.emf.vql.Pattern; | ||
11 | import org.eclipse.viatra.query.runtime.api.IPatternMatch; | ||
12 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher; | ||
13 | import org.eclipse.xtext.xbase.lib.Conversions; | ||
14 | |||
15 | @SuppressWarnings("all") | ||
16 | public class LookupHandler { | ||
17 | private final int[] argumentIndices; | ||
18 | |||
19 | private final ViatraQueryMatcher<? extends IPatternMatch> lookedUpMatcher; | ||
20 | |||
21 | public LookupHandler(final MappingDefinition mappingDefinition, final LookupDefinition lookupDefinition, final ViatraQueryMatcher<? extends IPatternMatch> lookedUpMatcher) { | ||
22 | EObject _eContainer = lookupDefinition.eContainer(); | ||
23 | boolean _notEquals = (!Objects.equal(_eContainer, mappingDefinition)); | ||
24 | if (_notEquals) { | ||
25 | throw new IllegalArgumentException("lookupDefinition must be contained in mappingDefinition"); | ||
26 | } | ||
27 | final int argumentCount = lookupDefinition.getArguments().size(); | ||
28 | int _length = ((Object[])Conversions.unwrapArray(lookedUpMatcher.getParameterNames(), Object.class)).length; | ||
29 | boolean _notEquals_1 = (argumentCount != _length); | ||
30 | if (_notEquals_1) { | ||
31 | MappingDefinition _mapping = lookupDefinition.getMapping(); | ||
32 | Pattern _pattern = null; | ||
33 | if (_mapping!=null) { | ||
34 | _pattern=_mapping.getPattern(); | ||
35 | } | ||
36 | String _name = null; | ||
37 | if (_pattern!=null) { | ||
38 | _name=_pattern.getName(); | ||
39 | } | ||
40 | String _plus = ("lookupDefinition (name: " + _name); | ||
41 | String _plus_1 = (_plus + | ||
42 | ") must have as many arguments as lookedUpMatcher (name: "); | ||
43 | String _patternName = lookedUpMatcher.getPatternName(); | ||
44 | String _plus_2 = (_plus_1 + _patternName); | ||
45 | String _plus_3 = (_plus_2 + ")"); | ||
46 | throw new IllegalArgumentException(_plus_3); | ||
47 | } | ||
48 | this.argumentIndices = new int[argumentCount]; | ||
49 | for (int i = 0; (i < argumentCount); i++) { | ||
50 | { | ||
51 | final MappingParameter argument = lookupDefinition.getArguments().get(i); | ||
52 | final int argumentIndex = mappingDefinition.getParameters().indexOf(argument); | ||
53 | this.argumentIndices[i] = argumentIndex; | ||
54 | } | ||
55 | } | ||
56 | this.lookedUpMatcher = lookedUpMatcher; | ||
57 | } | ||
58 | |||
59 | public ComponentInstanceTrace lookupForMatch(final ComponentFaultTreeTrace faultTreeTrace, final IPatternMatch match) { | ||
60 | ComponentInstanceTrace _xblockexpression = null; | ||
61 | { | ||
62 | final IPatternMatch lookedUpMatch = this.createLookedUpMatch(match); | ||
63 | _xblockexpression = faultTreeTrace.lookup(lookedUpMatch); | ||
64 | } | ||
65 | return _xblockexpression; | ||
66 | } | ||
67 | |||
68 | private IPatternMatch createLookedUpMatch(final IPatternMatch match) { | ||
69 | IPatternMatch _xblockexpression = null; | ||
70 | { | ||
71 | final IPatternMatch lookedUpMatch = this.lookedUpMatcher.newEmptyMatch(); | ||
72 | final int argumentCount = this.argumentIndices.length; | ||
73 | for (int i = 0; (i < argumentCount); i++) { | ||
74 | { | ||
75 | final int argumentIndex = this.argumentIndices[i]; | ||
76 | Object argumentValue = match.get(argumentIndex); | ||
77 | lookedUpMatch.set(i, argumentValue); | ||
78 | } | ||
79 | } | ||
80 | _xblockexpression = lookedUpMatch; | ||
81 | } | ||
82 | return _xblockexpression; | ||
83 | } | ||
84 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingHandler.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingHandler.java new file mode 100644 index 00000000..41703289 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingHandler.java | |||
@@ -0,0 +1,146 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft; | ||
2 | |||
3 | import com.google.common.collect.ImmutableMap; | ||
4 | import com.google.common.collect.Iterables; | ||
5 | import com.google.common.collect.Maps; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Assignment; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.ComponentInstance; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.EventReference; | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition; | ||
10 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; | ||
11 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable; | ||
12 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | ||
13 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentFaultTreeTrace; | ||
14 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentInstanceTrace; | ||
15 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.LookupHandler; | ||
16 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.MappingQueries; | ||
17 | import java.util.HashMap; | ||
18 | import java.util.HashSet; | ||
19 | import java.util.Map; | ||
20 | import java.util.Set; | ||
21 | import java.util.function.Consumer; | ||
22 | import org.eclipse.emf.common.util.EList; | ||
23 | import org.eclipse.viatra.query.runtime.api.IPatternMatch; | ||
24 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher; | ||
25 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; | ||
26 | import org.eclipse.xtext.xbase.lib.Functions.Function1; | ||
27 | import org.eclipse.xtext.xbase.lib.IterableExtensions; | ||
28 | |||
29 | @SuppressWarnings("all") | ||
30 | public class MappingHandler { | ||
31 | private final ViatraQueryMatcher<? extends IPatternMatch> matcher; | ||
32 | |||
33 | private final MappingDefinition mappingDefinition; | ||
34 | |||
35 | private final Map<LookupDefinition, LookupHandler> lookupHandlers; | ||
36 | |||
37 | public MappingHandler(final MappingDefinition mappingDefinition, final MappingQueries mappingQueries) { | ||
38 | this.matcher = mappingQueries.getMatcher(mappingDefinition); | ||
39 | this.mappingDefinition = mappingDefinition; | ||
40 | final HashSet<Variable> variables = CollectionLiterals.<Variable>newHashSet(); | ||
41 | EList<Assignment> _assignments = mappingDefinition.getAssignments(); | ||
42 | for (final Assignment assignment : _assignments) { | ||
43 | { | ||
44 | Variable _component = assignment.getInput().getComponent(); | ||
45 | variables.add(_component); | ||
46 | Variable _component_1 = assignment.getOutput().getComponent(); | ||
47 | variables.add(_component_1); | ||
48 | } | ||
49 | } | ||
50 | final Function1<LookupDefinition, LookupDefinition> _function = (LookupDefinition it) -> { | ||
51 | return it; | ||
52 | }; | ||
53 | final Function1<LookupDefinition, LookupHandler> _function_1 = (LookupDefinition lookupDefinition) -> { | ||
54 | return mappingQueries.createLookupHandler(mappingDefinition, lookupDefinition); | ||
55 | }; | ||
56 | this.lookupHandlers = ImmutableMap.<LookupDefinition, LookupHandler>copyOf(IterableExtensions.<LookupDefinition, LookupDefinition, LookupHandler>toMap(Iterables.<LookupDefinition>filter(variables, LookupDefinition.class), _function, _function_1)); | ||
57 | } | ||
58 | |||
59 | public void instantiateComponents(final ComponentFaultTreeTrace faultTreeTrace) { | ||
60 | boolean _hasComponentInstace = this.hasComponentInstace(); | ||
61 | boolean _not = (!_hasComponentInstace); | ||
62 | if (_not) { | ||
63 | return; | ||
64 | } | ||
65 | final Consumer<IPatternMatch> _function = (IPatternMatch match) -> { | ||
66 | final ComponentInstanceTrace componentTrace = faultTreeTrace.instantiateComponent(match, this.getComponentDefinition()); | ||
67 | boolean _isTopLevel = this.isTopLevel(); | ||
68 | if (_isTopLevel) { | ||
69 | faultTreeTrace.setTopLevel(componentTrace); | ||
70 | } | ||
71 | }; | ||
72 | this.matcher.forEachMatch(_function); | ||
73 | } | ||
74 | |||
75 | public void instantiateConnections(final ComponentFaultTreeTrace faultTreeTrace) { | ||
76 | boolean _hasConnections = this.hasConnections(); | ||
77 | boolean _not = (!_hasConnections); | ||
78 | if (_not) { | ||
79 | return; | ||
80 | } | ||
81 | final Consumer<IPatternMatch> _function = (IPatternMatch match) -> { | ||
82 | final Map<Variable, ComponentInstanceTrace> lookedUpComponents = this.lookupComponents(faultTreeTrace, match); | ||
83 | EList<Assignment> _assignments = this.mappingDefinition.getAssignments(); | ||
84 | for (final Assignment assignment : _assignments) { | ||
85 | { | ||
86 | final EventReference input = assignment.getInput(); | ||
87 | final ComponentInstanceTrace inputComponent = lookedUpComponents.get(input.getComponent()); | ||
88 | final EventReference output = assignment.getOutput(); | ||
89 | final ComponentInstanceTrace outputComponent = lookedUpComponents.get(output.getComponent()); | ||
90 | if (((inputComponent != null) && (outputComponent != null))) { | ||
91 | inputComponent.assign(input.getEvent(), outputComponent, output.getEvent()); | ||
92 | } | ||
93 | } | ||
94 | } | ||
95 | }; | ||
96 | this.matcher.forEachMatch(_function); | ||
97 | } | ||
98 | |||
99 | private Map<Variable, ComponentInstanceTrace> lookupComponents(final ComponentFaultTreeTrace faultTreeTrace, final IPatternMatch match) { | ||
100 | HashMap<Variable, ComponentInstanceTrace> _xblockexpression = null; | ||
101 | { | ||
102 | int _size = this.lookupHandlers.size(); | ||
103 | int _plus = (_size + 1); | ||
104 | final HashMap<Variable, ComponentInstanceTrace> lookedUpComponents = Maps.<Variable, ComponentInstanceTrace>newHashMapWithExpectedSize(_plus); | ||
105 | boolean _hasComponentInstace = this.hasComponentInstace(); | ||
106 | if (_hasComponentInstace) { | ||
107 | final ComponentInstanceTrace componentInstance = faultTreeTrace.lookup(match); | ||
108 | lookedUpComponents.put(this.mappingDefinition.getComponentInstance(), componentInstance); | ||
109 | } | ||
110 | Set<Map.Entry<LookupDefinition, LookupHandler>> _entrySet = this.lookupHandlers.entrySet(); | ||
111 | for (final Map.Entry<LookupDefinition, LookupHandler> pair : _entrySet) { | ||
112 | { | ||
113 | final ComponentInstanceTrace componentInstance_1 = pair.getValue().lookupForMatch(faultTreeTrace, match); | ||
114 | if ((componentInstance_1 != null)) { | ||
115 | lookedUpComponents.put(pair.getKey(), componentInstance_1); | ||
116 | } | ||
117 | } | ||
118 | } | ||
119 | _xblockexpression = lookedUpComponents; | ||
120 | } | ||
121 | return _xblockexpression; | ||
122 | } | ||
123 | |||
124 | private ComponentDefinition getComponentDefinition() { | ||
125 | ComponentInstance _componentInstance = this.mappingDefinition.getComponentInstance(); | ||
126 | ComponentDefinition _componentType = null; | ||
127 | if (_componentInstance!=null) { | ||
128 | _componentType=_componentInstance.getComponentType(); | ||
129 | } | ||
130 | return _componentType; | ||
131 | } | ||
132 | |||
133 | private boolean hasComponentInstace() { | ||
134 | ComponentDefinition _componentDefinition = this.getComponentDefinition(); | ||
135 | return (_componentDefinition != null); | ||
136 | } | ||
137 | |||
138 | private boolean isTopLevel() { | ||
139 | return this.mappingDefinition.isTopLevel(); | ||
140 | } | ||
141 | |||
142 | private boolean hasConnections() { | ||
143 | boolean _isEmpty = this.mappingDefinition.getAssignments().isEmpty(); | ||
144 | return (!_isEmpty); | ||
145 | } | ||
146 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingQueries.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingQueries.java new file mode 100644 index 00000000..6147807e --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/MappingQueries.java | |||
@@ -0,0 +1,60 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft; | ||
2 | |||
3 | import com.google.common.collect.ImmutableMap; | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinition; | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.LookupHandler; | ||
8 | import java.util.Map; | ||
9 | import org.eclipse.viatra.query.patternlanguage.emf.specification.SpecificationBuilder; | ||
10 | import org.eclipse.viatra.query.runtime.api.GenericQueryGroup; | ||
11 | import org.eclipse.viatra.query.runtime.api.IPatternMatch; | ||
12 | import org.eclipse.viatra.query.runtime.api.IQuerySpecification; | ||
13 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; | ||
14 | import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher; | ||
15 | import org.eclipse.xtext.xbase.lib.Conversions; | ||
16 | import org.eclipse.xtext.xbase.lib.Functions.Function1; | ||
17 | import org.eclipse.xtext.xbase.lib.IterableExtensions; | ||
18 | import org.eclipse.xtext.xbase.lib.MapExtensions; | ||
19 | |||
20 | @SuppressWarnings("all") | ||
21 | public class MappingQueries { | ||
22 | private final Map<MappingDefinition, ViatraQueryMatcher<? extends IPatternMatch>> matchersMap; | ||
23 | |||
24 | public MappingQueries(final TransformationDefinition transformationDefinition, final ViatraQueryEngine viatraQueryEngine) { | ||
25 | final SpecificationBuilder specificationBuilder = new SpecificationBuilder(); | ||
26 | final Function1<MappingDefinition, MappingDefinition> _function = (MappingDefinition it) -> { | ||
27 | return it; | ||
28 | }; | ||
29 | final Function1<MappingDefinition, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> _function_1 = (MappingDefinition it) -> { | ||
30 | return specificationBuilder.getOrCreateSpecification(it.getPattern()); | ||
31 | }; | ||
32 | final Map<MappingDefinition, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>> querySpecificationsMap = IterableExtensions.<MappingDefinition, MappingDefinition, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>>toMap(transformationDefinition.getMappingDefinitions(), _function, _function_1); | ||
33 | GenericQueryGroup.of(((IQuerySpecification<?>[])Conversions.unwrapArray(querySpecificationsMap.values(), IQuerySpecification.class))).prepare(viatraQueryEngine); | ||
34 | final Function1<IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>, ViatraQueryMatcher<? extends IPatternMatch>> _function_2 = (IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>> it) -> { | ||
35 | return it.getMatcher(viatraQueryEngine); | ||
36 | }; | ||
37 | this.matchersMap = ImmutableMap.<MappingDefinition, ViatraQueryMatcher<? extends IPatternMatch>>copyOf(MapExtensions.<MappingDefinition, IQuerySpecification<? extends ViatraQueryMatcher<? extends IPatternMatch>>, ViatraQueryMatcher<? extends IPatternMatch>>mapValues(querySpecificationsMap, _function_2)); | ||
38 | } | ||
39 | |||
40 | public ViatraQueryMatcher<? extends IPatternMatch> getMatcher(final MappingDefinition mappingDefinition) { | ||
41 | ViatraQueryMatcher<? extends IPatternMatch> _xblockexpression = null; | ||
42 | { | ||
43 | final ViatraQueryMatcher<? extends IPatternMatch> matcher = this.matchersMap.get(mappingDefinition); | ||
44 | if ((matcher == null)) { | ||
45 | throw new IllegalArgumentException(("Unknown mapping definition: " + mappingDefinition)); | ||
46 | } | ||
47 | _xblockexpression = matcher; | ||
48 | } | ||
49 | return _xblockexpression; | ||
50 | } | ||
51 | |||
52 | public LookupHandler createLookupHandler(final MappingDefinition mappingDefinition, final LookupDefinition lookupDefinition) { | ||
53 | LookupHandler _xblockexpression = null; | ||
54 | { | ||
55 | final ViatraQueryMatcher<? extends IPatternMatch> lookedUpMatcher = this.getMatcher(lookupDefinition.getMapping()); | ||
56 | _xblockexpression = new LookupHandler(mappingDefinition, lookupDefinition, lookedUpMatcher); | ||
57 | } | ||
58 | return _xblockexpression; | ||
59 | } | ||
60 | } | ||