diff options
Diffstat (limited to 'Stochastic')
99 files changed, 1661 insertions, 101 deletions
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeModule.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeModule.xtendbin index 65b90333..56d1af9c 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeModule.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeModule.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeSetup.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeSetup.xtendbin index 7fbd4ad1..29395cde 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeSetup.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeSetup.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.gitignore index 2fad95ba..e3c287dd 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.gitignore | |||
@@ -1,2 +1,6 @@ | |||
1 | /.CftLanguageIdeModule.java._trace | 1 | /.CftLanguageIdeModule.java._trace |
2 | /.CftLanguageIdeSetup.java._trace | 2 | /.CftLanguageIdeSetup.java._trace |
3 | /.CftLanguageIdeModule.xtendbin | ||
4 | /.CftLanguageIdeSetup.xtendbin | ||
5 | /CftLanguageIdeModule.java | ||
6 | /CftLanguageIdeSetup.java | ||
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 77bd6532..2207ff7a 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/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/.gitignore index bee88ba2..725f385c 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/.gitignore | |||
@@ -1 +1,3 @@ | |||
1 | /.CftLanguageUiModule.java._trace | 1 | /.CftLanguageUiModule.java._trace |
2 | /.CftLanguageUiModule.xtendbin | ||
3 | /CftLanguageUiModule.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/.CftLanguageProposalProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/.CftLanguageProposalProvider.xtendbin index 33d0e601..e5445e66 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/.CftLanguageProposalProvider.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/.CftLanguageProposalProvider.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/contentassist/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/.gitignore index 31aac8dc..be23301b 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/.gitignore | |||
@@ -1 +1,3 @@ | |||
1 | /.CftLanguageProposalProvider.java._trace | 1 | /.CftLanguageProposalProvider.java._trace |
2 | /.CftLanguageProposalProvider.xtendbin | ||
3 | /CftLanguageProposalProvider.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.CftLanguageDescriptionLabelProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.CftLanguageDescriptionLabelProvider.xtendbin index 6617b26f..476652c0 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.CftLanguageDescriptionLabelProvider.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.CftLanguageDescriptionLabelProvider.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/labeling/.CftLanguageLabelProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.CftLanguageLabelProvider.xtendbin index 82af00d7..bda30bf1 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.CftLanguageLabelProvider.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.CftLanguageLabelProvider.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/labeling/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.gitignore index 20d80a0b..c75af38b 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.gitignore | |||
@@ -1,2 +1,6 @@ | |||
1 | /.CftLanguageDescriptionLabelProvider.java._trace | 1 | /.CftLanguageDescriptionLabelProvider.java._trace |
2 | /.CftLanguageLabelProvider.java._trace | 2 | /.CftLanguageLabelProvider.java._trace |
3 | /.CftLanguageDescriptionLabelProvider.xtendbin | ||
4 | /.CftLanguageLabelProvider.xtendbin | ||
5 | /CftLanguageDescriptionLabelProvider.java | ||
6 | /CftLanguageLabelProvider.java | ||
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 adffb198..04bd4aea 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/outline/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/.gitignore index a0d017e3..61ad3c3f 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/.gitignore | |||
@@ -1 +1,3 @@ | |||
1 | /.CftLanguageOutlineTreeProvider.java._trace | 1 | /.CftLanguageOutlineTreeProvider.java._trace |
2 | /.CftLanguageOutlineTreeProvider.xtendbin | ||
3 | /CftLanguageOutlineTreeProvider.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/.CftLanguageQuickfixProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/.CftLanguageQuickfixProvider.xtendbin index 2ecc121e..3c8711bf 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/.CftLanguageQuickfixProvider.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/.CftLanguageQuickfixProvider.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/quickfix/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/.gitignore index 1f83fa55..e9319b3b 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/.gitignore | |||
@@ -1 +1,3 @@ | |||
1 | /.CftLanguageQuickfixProvider.java._trace | 1 | /.CftLanguageQuickfixProvider.java._trace |
2 | /.CftLanguageQuickfixProvider.xtendbin | ||
3 | /CftLanguageQuickfixProvider.java | ||
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 ce699deb..2f317914 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.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageTokenToAttributeIdMapper.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageTokenToAttributeIdMapper.xtendbin index 86752345..26fbd35b 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageTokenToAttributeIdMapper.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageTokenToAttributeIdMapper.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/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.gitignore index 3fdf4894..e1b01d74 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.gitignore | |||
@@ -1,2 +1,6 @@ | |||
1 | /.CftLanguageSemanticHighlightingCalculator.java._trace | 1 | /.CftLanguageSemanticHighlightingCalculator.java._trace |
2 | /.CftLanguageTokenToAttributeIdMapper.java._trace | 2 | /.CftLanguageTokenToAttributeIdMapper.java._trace |
3 | /.CftLanguageSemanticHighlightingCalculator.xtendbin | ||
4 | /.CftLanguageTokenToAttributeIdMapper.xtendbin | ||
5 | /CftLanguageSemanticHighlightingCalculator.java | ||
6 | /CftLanguageTokenToAttributeIdMapper.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.xtend index e95d8c91..f295f116 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.xtend +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.xtend | |||
@@ -11,6 +11,7 @@ import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.LookupDefinit | |||
11 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition | 11 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition |
12 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition | 12 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition |
13 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable | 13 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable |
14 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl | ||
14 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition | 15 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition |
15 | import org.eclipse.emf.common.notify.Notifier | 16 | import org.eclipse.emf.common.notify.Notifier |
16 | import org.eclipse.emf.ecore.EObject | 17 | import org.eclipse.emf.ecore.EObject |
@@ -68,7 +69,7 @@ class CftLanguageScopeProvider extends AbstractCftLanguageScopeProvider { | |||
68 | Iterable<? extends MappingDefinition> ruleDefinitions) { | 69 | Iterable<? extends MappingDefinition> ruleDefinitions) { |
69 | val mappingDefinitionDescriptions = Lists.newArrayListWithExpectedSize(ruleDefinitions.size) | 70 | val mappingDefinitionDescriptions = Lists.newArrayListWithExpectedSize(ruleDefinitions.size) |
70 | for (ruleDefinition : ruleDefinitions) { | 71 | for (ruleDefinition : ruleDefinitions) { |
71 | val pattern = ruleDefinition?.pattern | 72 | val pattern = ruleDefinition.safelyGetPattern |
72 | if (pattern !== null) { | 73 | if (pattern !== null) { |
73 | val patternName = resourceDescriptions.getExportedObjectsByObject(pattern).head?.qualifiedName | 74 | val patternName = resourceDescriptions.getExportedObjectsByObject(pattern).head?.qualifiedName |
74 | if (patternName !== null) { | 75 | if (patternName !== null) { |
@@ -79,6 +80,14 @@ class CftLanguageScopeProvider extends AbstractCftLanguageScopeProvider { | |||
79 | } | 80 | } |
80 | mappingDefinitionDescriptions | 81 | mappingDefinitionDescriptions |
81 | } | 82 | } |
83 | |||
84 | private def safelyGetPattern(MappingDefinition mappingDefinition) { | ||
85 | switch (mappingDefinition) { | ||
86 | MappingDefinitionImpl: mappingDefinition.basicGetPattern | ||
87 | case null: null | ||
88 | default: mappingDefinition.pattern | ||
89 | } | ||
90 | } | ||
82 | 91 | ||
83 | private def getResourceDescriptions(Notifier notifier) { | 92 | private def getResourceDescriptions(Notifier notifier) { |
84 | val resourceSet = EcoreUtil2.getResourceSet(notifier) | 93 | val resourceSet = EcoreUtil2.getResourceSet(notifier) |
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 98b07e66..8a5136e8 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/.CftLanguageStandaloneSetup.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageStandaloneSetup.xtendbin index 2ae80aef..d00f661a 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageStandaloneSetup.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageStandaloneSetup.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.gitignore index b3125e3f..a5028502 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.gitignore | |||
@@ -1,2 +1,6 @@ | |||
1 | /.CftLanguageRuntimeModule.java._trace | 1 | /.CftLanguageRuntimeModule.java._trace |
2 | /.CftLanguageStandaloneSetup.java._trace | 2 | /.CftLanguageStandaloneSetup.java._trace |
3 | /.CftLanguageRuntimeModule.xtendbin | ||
4 | /.CftLanguageStandaloneSetup.xtendbin | ||
5 | /CftLanguageRuntimeModule.java | ||
6 | /CftLanguageStandaloneSetup.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.CftLanguageValueConverterService.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.CftLanguageValueConverterService.xtendbin index a97cd12c..426173d6 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.CftLanguageValueConverterService.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.CftLanguageValueConverterService.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.OF_INTValueConverter.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.OF_INTValueConverter.xtendbin index 25b37e6d..2321885c 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.OF_INTValueConverter.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.OF_INTValueConverter.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.gitignore index 1cb9dafb..0a42ffb4 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.gitignore | |||
@@ -1,2 +1,6 @@ | |||
1 | /.OF_INTValueConverter.java._trace | 1 | /.OF_INTValueConverter.java._trace |
2 | /.CftLanguageValueConverterService.java._trace | 2 | /.CftLanguageValueConverterService.java._trace |
3 | /.CftLanguageValueConverterService.xtendbin | ||
4 | /.OF_INTValueConverter.xtendbin | ||
5 | /CftLanguageValueConverterService.java | ||
6 | /OF_INTValueConverter.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin index b2a0c833..57704448 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.gitignore index c1d8820b..943ab682 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.gitignore | |||
@@ -1 +1,3 @@ | |||
1 | /.CftLanguageGenerator.java._trace | 1 | /.CftLanguageGenerator.java._trace |
2 | /.CftLanguageGenerator.xtendbin | ||
3 | /CftLanguageGenerator.java | ||
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 cea3c7e0..f06a7a84 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 a0a97448..ad739f26 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/naming/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.gitignore index b982f16c..bb9e8b92 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.gitignore | |||
@@ -1,2 +1,6 @@ | |||
1 | /.CftLanguageQualifiedNameProvider.java._trace | 1 | /.CftLanguageQualifiedNameProvider.java._trace |
2 | /.PackageNameProvider.java._trace | 2 | /.PackageNameProvider.java._trace |
3 | /.CftLanguageQualifiedNameProvider.xtendbin | ||
4 | /.PackageNameProvider.xtendbin | ||
5 | /CftLanguageQualifiedNameProvider.java | ||
6 | /PackageNameProvider.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin index a3aa3347..d1224c20 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.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 20f539ae..6c96cd87 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.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.gitignore index 75285868..e0a335bd 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.gitignore | |||
@@ -2,3 +2,7 @@ | |||
2 | /.CftLanguageImportedNamespaceAwareScopeProvider.java._trace | 2 | /.CftLanguageImportedNamespaceAwareScopeProvider.java._trace |
3 | /.CftLanguageImportedNamespaceAwareScopeLocalProvider.java._trace | 3 | /.CftLanguageImportedNamespaceAwareScopeLocalProvider.java._trace |
4 | /.CftLanguageImportedNamespaceAwareLocalScopeProvider.java._trace | 4 | /.CftLanguageImportedNamespaceAwareLocalScopeProvider.java._trace |
5 | /.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin | ||
6 | /.CftLanguageScopeProvider.xtendbin | ||
7 | /CftLanguageImportedNamespaceAwareLocalScopeProvider.java | ||
8 | /CftLanguageScopeProvider.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.java index 9286d5ca..8d452f2a 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/CftLanguageScopeProvider.java | |||
@@ -14,6 +14,7 @@ import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefini | |||
14 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter; | 14 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingParameter; |
15 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; | 15 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition; |
16 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable; | 16 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.Variable; |
17 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.impl.MappingDefinitionImpl; | ||
17 | import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.AbstractCftLanguageScopeProvider; | 18 | import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.AbstractCftLanguageScopeProvider; |
18 | import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.CftLanguageImportedNamespaceAwareLocalScopeProvider; | 19 | import hu.bme.mit.inf.dslreasoner.faulttree.components.scoping.CftLanguageImportedNamespaceAwareLocalScopeProvider; |
19 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | 20 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; |
@@ -108,11 +109,7 @@ public class CftLanguageScopeProvider extends AbstractCftLanguageScopeProvider { | |||
108 | final ArrayList<IEObjectDescription> mappingDefinitionDescriptions = Lists.<IEObjectDescription>newArrayListWithExpectedSize(IterableExtensions.size(ruleDefinitions)); | 109 | final ArrayList<IEObjectDescription> mappingDefinitionDescriptions = Lists.<IEObjectDescription>newArrayListWithExpectedSize(IterableExtensions.size(ruleDefinitions)); |
109 | for (final MappingDefinition ruleDefinition : ruleDefinitions) { | 110 | for (final MappingDefinition ruleDefinition : ruleDefinitions) { |
110 | { | 111 | { |
111 | Pattern _pattern = null; | 112 | final Pattern pattern = this.safelyGetPattern(ruleDefinition); |
112 | if (ruleDefinition!=null) { | ||
113 | _pattern=ruleDefinition.getPattern(); | ||
114 | } | ||
115 | final Pattern pattern = _pattern; | ||
116 | if ((pattern != null)) { | 113 | if ((pattern != null)) { |
117 | IEObjectDescription _head = IterableExtensions.<IEObjectDescription>head(resourceDescriptions.getExportedObjectsByObject(pattern)); | 114 | IEObjectDescription _head = IterableExtensions.<IEObjectDescription>head(resourceDescriptions.getExportedObjectsByObject(pattern)); |
118 | QualifiedName _qualifiedName = null; | 115 | QualifiedName _qualifiedName = null; |
@@ -132,6 +129,25 @@ public class CftLanguageScopeProvider extends AbstractCftLanguageScopeProvider { | |||
132 | return _xblockexpression; | 129 | return _xblockexpression; |
133 | } | 130 | } |
134 | 131 | ||
132 | private Pattern safelyGetPattern(final MappingDefinition mappingDefinition) { | ||
133 | Pattern _switchResult = null; | ||
134 | boolean _matched = false; | ||
135 | if (mappingDefinition instanceof MappingDefinitionImpl) { | ||
136 | _matched=true; | ||
137 | _switchResult = ((MappingDefinitionImpl)mappingDefinition).basicGetPattern(); | ||
138 | } | ||
139 | if (!_matched) { | ||
140 | if (Objects.equal(mappingDefinition, null)) { | ||
141 | _matched=true; | ||
142 | _switchResult = null; | ||
143 | } | ||
144 | } | ||
145 | if (!_matched) { | ||
146 | _switchResult = mappingDefinition.getPattern(); | ||
147 | } | ||
148 | return _switchResult; | ||
149 | } | ||
150 | |||
135 | private IResourceDescriptions getResourceDescriptions(final Notifier notifier) { | 151 | private IResourceDescriptions getResourceDescriptions(final Notifier notifier) { |
136 | IResourceDescriptions _xblockexpression = null; | 152 | IResourceDescriptions _xblockexpression = null; |
137 | { | 153 | { |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin index 719d28f8..c81d155d 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.gitignore index 9065804d..270d548b 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.gitignore | |||
@@ -1 +1,3 @@ | |||
1 | /.CftLanguageValidator.java._trace | 1 | /.CftLanguageValidator.java._trace |
2 | /.CftLanguageValidator.xtendbin | ||
3 | /CftLanguageValidator.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/.classpath b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/.classpath index 5bc9ff04..1dc3c7fb 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/.classpath +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/.classpath | |||
@@ -4,5 +4,6 @@ | |||
4 | <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.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> |
5 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | 5 | <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> |
6 | <classpathentry kind="src" path="src"/> | 6 | <classpathentry kind="src" path="src"/> |
7 | <classpathentry kind="src" path="xtend-gen"/> | ||
7 | <classpathentry kind="output" path="bin"/> | 8 | <classpathentry kind="output" path="bin"/> |
8 | </classpath> | 9 | </classpath> |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/META-INF/MANIFEST.MF b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/META-INF/MANIFEST.MF index eeabfee3..0b8c7351 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/META-INF/MANIFEST.MF +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/META-INF/MANIFEST.MF | |||
@@ -8,13 +8,18 @@ Bundle-Vendor: %providerName | |||
8 | Bundle-Localization: plugin | 8 | Bundle-Localization: plugin |
9 | Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.faulttree.model | 9 | Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.faulttree.model |
10 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | 10 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 |
11 | Export-Package: hu.bme.mit.inf.dslreasoner.faulttree.model.ft, | 11 | Export-Package: hu.bme.mit.inf.dslreasoner.faulttree.model.cft, |
12 | hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl, | ||
13 | hu.bme.mit.inf.dslreasoner.faulttree.model.cft.util, | ||
14 | hu.bme.mit.inf.dslreasoner.faulttree.model.ft, | ||
12 | hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl, | 15 | hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl, |
13 | hu.bme.mit.inf.dslreasoner.faulttree.model.ft.util, | 16 | hu.bme.mit.inf.dslreasoner.faulttree.model.ft.util, |
14 | hu.bme.mit.inf.dslreasoner.faulttree.model.cft, | 17 | hu.bme.mit.inf.dslreasoner.faulttree.model.util |
15 | hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl, | ||
16 | hu.bme.mit.inf.dslreasoner.faulttree.model.cft.util | ||
17 | Require-Bundle: org.eclipse.core.runtime, | 18 | Require-Bundle: org.eclipse.core.runtime, |
18 | org.eclipse.emf.ecore;visibility:=reexport, | 19 | org.eclipse.emf.ecore;visibility:=reexport, |
19 | hu.bme.mit.inf.dslreasoner.faulttree.model;visibility:=reexport | 20 | hu.bme.mit.inf.dslreasoner.faulttree.model;visibility:=reexport, |
21 | com.google.guava, | ||
22 | org.eclipse.xtext.xbase.lib, | ||
23 | org.eclipse.xtend.lib, | ||
24 | org.eclipse.xtend.lib.macro | ||
20 | Bundle-ActivationPolicy: lazy | 25 | Bundle-ActivationPolicy: lazy |
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 d75710a2..07200ab2 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 | |||
@@ -4,6 +4,7 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.cft; | |||
4 | 4 | ||
5 | import org.eclipse.emf.ecore.EAttribute; | 5 | import org.eclipse.emf.ecore.EAttribute; |
6 | import org.eclipse.emf.ecore.EClass; | 6 | import org.eclipse.emf.ecore.EClass; |
7 | import org.eclipse.emf.ecore.EEnum; | ||
7 | import org.eclipse.emf.ecore.EPackage; | 8 | import org.eclipse.emf.ecore.EPackage; |
8 | import org.eclipse.emf.ecore.EReference; | 9 | import org.eclipse.emf.ecore.EReference; |
9 | 10 | ||
@@ -535,6 +536,43 @@ public interface CftPackage extends EPackage { | |||
535 | int COMPONENT_FAULT_TREE_OPERATION_COUNT = 0; | 536 | int COMPONENT_FAULT_TREE_OPERATION_COUNT = 0; |
536 | 537 | ||
537 | /** | 538 | /** |
539 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement <em>Modal Element</em>}' class. | ||
540 | * <!-- begin-user-doc --> | ||
541 | * <!-- end-user-doc --> | ||
542 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement | ||
543 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getModalElement() | ||
544 | * @generated | ||
545 | */ | ||
546 | int MODAL_ELEMENT = 14; | ||
547 | |||
548 | /** | ||
549 | * The feature id for the '<em><b>Exists</b></em>' attribute. | ||
550 | * <!-- begin-user-doc --> | ||
551 | * <!-- end-user-doc --> | ||
552 | * @generated | ||
553 | * @ordered | ||
554 | */ | ||
555 | int MODAL_ELEMENT__EXISTS = 0; | ||
556 | |||
557 | /** | ||
558 | * The number of structural features of the '<em>Modal Element</em>' class. | ||
559 | * <!-- begin-user-doc --> | ||
560 | * <!-- end-user-doc --> | ||
561 | * @generated | ||
562 | * @ordered | ||
563 | */ | ||
564 | int MODAL_ELEMENT_FEATURE_COUNT = 1; | ||
565 | |||
566 | /** | ||
567 | * The number of operations of the '<em>Modal Element</em>' class. | ||
568 | * <!-- begin-user-doc --> | ||
569 | * <!-- end-user-doc --> | ||
570 | * @generated | ||
571 | * @ordered | ||
572 | */ | ||
573 | int MODAL_ELEMENT_OPERATION_COUNT = 0; | ||
574 | |||
575 | /** | ||
538 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl <em>Component</em>}' class. | 576 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl <em>Component</em>}' class. |
539 | * <!-- begin-user-doc --> | 577 | * <!-- begin-user-doc --> |
540 | * <!-- end-user-doc --> | 578 | * <!-- end-user-doc --> |
@@ -545,13 +583,22 @@ public interface CftPackage extends EPackage { | |||
545 | int COMPONENT = 10; | 583 | int COMPONENT = 10; |
546 | 584 | ||
547 | /** | 585 | /** |
586 | * The feature id for the '<em><b>Exists</b></em>' attribute. | ||
587 | * <!-- begin-user-doc --> | ||
588 | * <!-- end-user-doc --> | ||
589 | * @generated | ||
590 | * @ordered | ||
591 | */ | ||
592 | int COMPONENT__EXISTS = MODAL_ELEMENT__EXISTS; | ||
593 | |||
594 | /** | ||
548 | * The feature id for the '<em><b>Inputs</b></em>' containment reference list. | 595 | * The feature id for the '<em><b>Inputs</b></em>' containment reference list. |
549 | * <!-- begin-user-doc --> | 596 | * <!-- begin-user-doc --> |
550 | * <!-- end-user-doc --> | 597 | * <!-- end-user-doc --> |
551 | * @generated | 598 | * @generated |
552 | * @ordered | 599 | * @ordered |
553 | */ | 600 | */ |
554 | int COMPONENT__INPUTS = 0; | 601 | int COMPONENT__INPUTS = MODAL_ELEMENT_FEATURE_COUNT + 0; |
555 | 602 | ||
556 | /** | 603 | /** |
557 | * The feature id for the '<em><b>Outputs</b></em>' containment reference list. | 604 | * The feature id for the '<em><b>Outputs</b></em>' containment reference list. |
@@ -560,7 +607,7 @@ public interface CftPackage extends EPackage { | |||
560 | * @generated | 607 | * @generated |
561 | * @ordered | 608 | * @ordered |
562 | */ | 609 | */ |
563 | int COMPONENT__OUTPUTS = 1; | 610 | int COMPONENT__OUTPUTS = MODAL_ELEMENT_FEATURE_COUNT + 1; |
564 | 611 | ||
565 | /** | 612 | /** |
566 | * The feature id for the '<em><b>Component Definition</b></em>' reference. | 613 | * The feature id for the '<em><b>Component Definition</b></em>' reference. |
@@ -569,7 +616,7 @@ public interface CftPackage extends EPackage { | |||
569 | * @generated | 616 | * @generated |
570 | * @ordered | 617 | * @ordered |
571 | */ | 618 | */ |
572 | int COMPONENT__COMPONENT_DEFINITION = 2; | 619 | int COMPONENT__COMPONENT_DEFINITION = MODAL_ELEMENT_FEATURE_COUNT + 2; |
573 | 620 | ||
574 | /** | 621 | /** |
575 | * The feature id for the '<em><b>Name</b></em>' attribute. | 622 | * The feature id for the '<em><b>Name</b></em>' attribute. |
@@ -578,7 +625,16 @@ public interface CftPackage extends EPackage { | |||
578 | * @generated | 625 | * @generated |
579 | * @ordered | 626 | * @ordered |
580 | */ | 627 | */ |
581 | int COMPONENT__NAME = 3; | 628 | int COMPONENT__NAME = MODAL_ELEMENT_FEATURE_COUNT + 3; |
629 | |||
630 | /** | ||
631 | * The feature id for the '<em><b>Multiple Allowed</b></em>' attribute. | ||
632 | * <!-- begin-user-doc --> | ||
633 | * <!-- end-user-doc --> | ||
634 | * @generated | ||
635 | * @ordered | ||
636 | */ | ||
637 | int COMPONENT__MULTIPLE_ALLOWED = MODAL_ELEMENT_FEATURE_COUNT + 4; | ||
582 | 638 | ||
583 | /** | 639 | /** |
584 | * The number of structural features of the '<em>Component</em>' class. | 640 | * The number of structural features of the '<em>Component</em>' class. |
@@ -587,7 +643,7 @@ public interface CftPackage extends EPackage { | |||
587 | * @generated | 643 | * @generated |
588 | * @ordered | 644 | * @ordered |
589 | */ | 645 | */ |
590 | int COMPONENT_FEATURE_COUNT = 4; | 646 | int COMPONENT_FEATURE_COUNT = MODAL_ELEMENT_FEATURE_COUNT + 5; |
591 | 647 | ||
592 | /** | 648 | /** |
593 | * The number of operations of the '<em>Component</em>' class. | 649 | * The number of operations of the '<em>Component</em>' class. |
@@ -596,7 +652,7 @@ public interface CftPackage extends EPackage { | |||
596 | * @generated | 652 | * @generated |
597 | * @ordered | 653 | * @ordered |
598 | */ | 654 | */ |
599 | int COMPONENT_OPERATION_COUNT = 0; | 655 | int COMPONENT_OPERATION_COUNT = MODAL_ELEMENT_OPERATION_COUNT + 0; |
600 | 656 | ||
601 | /** | 657 | /** |
602 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl <em>Input</em>}' class. | 658 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl <em>Input</em>}' class. |
@@ -719,13 +775,22 @@ public interface CftPackage extends EPackage { | |||
719 | int CONNECTION = 13; | 775 | int CONNECTION = 13; |
720 | 776 | ||
721 | /** | 777 | /** |
778 | * The feature id for the '<em><b>Exists</b></em>' attribute. | ||
779 | * <!-- begin-user-doc --> | ||
780 | * <!-- end-user-doc --> | ||
781 | * @generated | ||
782 | * @ordered | ||
783 | */ | ||
784 | int CONNECTION__EXISTS = MODAL_ELEMENT__EXISTS; | ||
785 | |||
786 | /** | ||
722 | * The feature id for the '<em><b>Input</b></em>' container reference. | 787 | * The feature id for the '<em><b>Input</b></em>' container reference. |
723 | * <!-- begin-user-doc --> | 788 | * <!-- begin-user-doc --> |
724 | * <!-- end-user-doc --> | 789 | * <!-- end-user-doc --> |
725 | * @generated | 790 | * @generated |
726 | * @ordered | 791 | * @ordered |
727 | */ | 792 | */ |
728 | int CONNECTION__INPUT = 0; | 793 | int CONNECTION__INPUT = MODAL_ELEMENT_FEATURE_COUNT + 0; |
729 | 794 | ||
730 | /** | 795 | /** |
731 | * The feature id for the '<em><b>Output</b></em>' reference. | 796 | * The feature id for the '<em><b>Output</b></em>' reference. |
@@ -734,7 +799,7 @@ public interface CftPackage extends EPackage { | |||
734 | * @generated | 799 | * @generated |
735 | * @ordered | 800 | * @ordered |
736 | */ | 801 | */ |
737 | int CONNECTION__OUTPUT = 1; | 802 | int CONNECTION__OUTPUT = MODAL_ELEMENT_FEATURE_COUNT + 1; |
738 | 803 | ||
739 | /** | 804 | /** |
740 | * The number of structural features of the '<em>Connection</em>' class. | 805 | * The number of structural features of the '<em>Connection</em>' class. |
@@ -743,7 +808,7 @@ public interface CftPackage extends EPackage { | |||
743 | * @generated | 808 | * @generated |
744 | * @ordered | 809 | * @ordered |
745 | */ | 810 | */ |
746 | int CONNECTION_FEATURE_COUNT = 2; | 811 | int CONNECTION_FEATURE_COUNT = MODAL_ELEMENT_FEATURE_COUNT + 2; |
747 | 812 | ||
748 | /** | 813 | /** |
749 | * The number of operations of the '<em>Connection</em>' class. | 814 | * The number of operations of the '<em>Connection</em>' class. |
@@ -752,7 +817,18 @@ public interface CftPackage extends EPackage { | |||
752 | * @generated | 817 | * @generated |
753 | * @ordered | 818 | * @ordered |
754 | */ | 819 | */ |
755 | int CONNECTION_OPERATION_COUNT = 0; | 820 | int CONNECTION_OPERATION_COUNT = MODAL_ELEMENT_OPERATION_COUNT + 0; |
821 | |||
822 | |||
823 | /** | ||
824 | * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality <em>Modality</em>}' enum. | ||
825 | * <!-- begin-user-doc --> | ||
826 | * <!-- end-user-doc --> | ||
827 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality | ||
828 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getModality() | ||
829 | * @generated | ||
830 | */ | ||
831 | int MODALITY = 15; | ||
756 | 832 | ||
757 | 833 | ||
758 | /** | 834 | /** |
@@ -1042,6 +1118,17 @@ public interface CftPackage extends EPackage { | |||
1042 | EAttribute getComponent_Name(); | 1118 | EAttribute getComponent_Name(); |
1043 | 1119 | ||
1044 | /** | 1120 | /** |
1121 | * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#isMultipleAllowed <em>Multiple Allowed</em>}'. | ||
1122 | * <!-- begin-user-doc --> | ||
1123 | * <!-- end-user-doc --> | ||
1124 | * @return the meta object for the attribute '<em>Multiple Allowed</em>'. | ||
1125 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#isMultipleAllowed() | ||
1126 | * @see #getComponent() | ||
1127 | * @generated | ||
1128 | */ | ||
1129 | EAttribute getComponent_MultipleAllowed(); | ||
1130 | |||
1131 | /** | ||
1045 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input <em>Input</em>}'. | 1132 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input <em>Input</em>}'. |
1046 | * <!-- begin-user-doc --> | 1133 | * <!-- begin-user-doc --> |
1047 | * <!-- end-user-doc --> | 1134 | * <!-- end-user-doc --> |
@@ -1160,6 +1247,37 @@ public interface CftPackage extends EPackage { | |||
1160 | EReference getConnection_Output(); | 1247 | EReference getConnection_Output(); |
1161 | 1248 | ||
1162 | /** | 1249 | /** |
1250 | * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement <em>Modal Element</em>}'. | ||
1251 | * <!-- begin-user-doc --> | ||
1252 | * <!-- end-user-doc --> | ||
1253 | * @return the meta object for class '<em>Modal Element</em>'. | ||
1254 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement | ||
1255 | * @generated | ||
1256 | */ | ||
1257 | EClass getModalElement(); | ||
1258 | |||
1259 | /** | ||
1260 | * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement#getExists <em>Exists</em>}'. | ||
1261 | * <!-- begin-user-doc --> | ||
1262 | * <!-- end-user-doc --> | ||
1263 | * @return the meta object for the attribute '<em>Exists</em>'. | ||
1264 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement#getExists() | ||
1265 | * @see #getModalElement() | ||
1266 | * @generated | ||
1267 | */ | ||
1268 | EAttribute getModalElement_Exists(); | ||
1269 | |||
1270 | /** | ||
1271 | * Returns the meta object for enum '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality <em>Modality</em>}'. | ||
1272 | * <!-- begin-user-doc --> | ||
1273 | * <!-- end-user-doc --> | ||
1274 | * @return the meta object for enum '<em>Modality</em>'. | ||
1275 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality | ||
1276 | * @generated | ||
1277 | */ | ||
1278 | EEnum getModality(); | ||
1279 | |||
1280 | /** | ||
1163 | * Returns the factory that creates the instances of the model. | 1281 | * Returns the factory that creates the instances of the model. |
1164 | * <!-- begin-user-doc --> | 1282 | * <!-- begin-user-doc --> |
1165 | * <!-- end-user-doc --> | 1283 | * <!-- end-user-doc --> |
@@ -1421,6 +1539,14 @@ public interface CftPackage extends EPackage { | |||
1421 | EAttribute COMPONENT__NAME = eINSTANCE.getComponent_Name(); | 1539 | EAttribute COMPONENT__NAME = eINSTANCE.getComponent_Name(); |
1422 | 1540 | ||
1423 | /** | 1541 | /** |
1542 | * The meta object literal for the '<em><b>Multiple Allowed</b></em>' attribute feature. | ||
1543 | * <!-- begin-user-doc --> | ||
1544 | * <!-- end-user-doc --> | ||
1545 | * @generated | ||
1546 | */ | ||
1547 | EAttribute COMPONENT__MULTIPLE_ALLOWED = eINSTANCE.getComponent_MultipleAllowed(); | ||
1548 | |||
1549 | /** | ||
1424 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl <em>Input</em>}' class. | 1550 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.InputImpl <em>Input</em>}' class. |
1425 | * <!-- begin-user-doc --> | 1551 | * <!-- begin-user-doc --> |
1426 | * <!-- end-user-doc --> | 1552 | * <!-- end-user-doc --> |
@@ -1514,6 +1640,34 @@ public interface CftPackage extends EPackage { | |||
1514 | */ | 1640 | */ |
1515 | EReference CONNECTION__OUTPUT = eINSTANCE.getConnection_Output(); | 1641 | EReference CONNECTION__OUTPUT = eINSTANCE.getConnection_Output(); |
1516 | 1642 | ||
1643 | /** | ||
1644 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement <em>Modal Element</em>}' class. | ||
1645 | * <!-- begin-user-doc --> | ||
1646 | * <!-- end-user-doc --> | ||
1647 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement | ||
1648 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getModalElement() | ||
1649 | * @generated | ||
1650 | */ | ||
1651 | EClass MODAL_ELEMENT = eINSTANCE.getModalElement(); | ||
1652 | |||
1653 | /** | ||
1654 | * The meta object literal for the '<em><b>Exists</b></em>' attribute feature. | ||
1655 | * <!-- begin-user-doc --> | ||
1656 | * <!-- end-user-doc --> | ||
1657 | * @generated | ||
1658 | */ | ||
1659 | EAttribute MODAL_ELEMENT__EXISTS = eINSTANCE.getModalElement_Exists(); | ||
1660 | |||
1661 | /** | ||
1662 | * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality <em>Modality</em>}' enum. | ||
1663 | * <!-- begin-user-doc --> | ||
1664 | * <!-- end-user-doc --> | ||
1665 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality | ||
1666 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.CftPackageImpl#getModality() | ||
1667 | * @generated | ||
1668 | */ | ||
1669 | EEnum MODALITY = eINSTANCE.getModality(); | ||
1670 | |||
1517 | } | 1671 | } |
1518 | 1672 | ||
1519 | } //CftPackage | 1673 | } //CftPackage |
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 7d5055c9..9b1d0b24 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 | |||
@@ -4,8 +4,6 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.cft; | |||
4 | 4 | ||
5 | import org.eclipse.emf.common.util.EList; | 5 | import org.eclipse.emf.common.util.EList; |
6 | 6 | ||
7 | import org.eclipse.emf.ecore.EObject; | ||
8 | |||
9 | /** | 7 | /** |
10 | * <!-- begin-user-doc --> | 8 | * <!-- begin-user-doc --> |
11 | * A representation of the model object '<em><b>Component</b></em>'. | 9 | * A representation of the model object '<em><b>Component</b></em>'. |
@@ -19,13 +17,14 @@ import org.eclipse.emf.ecore.EObject; | |||
19 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getOutputs <em>Outputs</em>}</li> | 17 | * <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> | 18 | * <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> | 19 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#getName <em>Name</em>}</li> |
20 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#isMultipleAllowed <em>Multiple Allowed</em>}</li> | ||
22 | * </ul> | 21 | * </ul> |
23 | * | 22 | * |
24 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getComponent() | 23 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getComponent() |
25 | * @model | 24 | * @model |
26 | * @generated | 25 | * @generated |
27 | */ | 26 | */ |
28 | public interface Component extends EObject { | 27 | public interface Component extends ModalElement { |
29 | /** | 28 | /** |
30 | * Returns the value of the '<em><b>Inputs</b></em>' containment reference list. | 29 | * Returns the value of the '<em><b>Inputs</b></em>' containment reference list. |
31 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input}. | 30 | * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input}. |
@@ -114,4 +113,31 @@ public interface Component extends EObject { | |||
114 | */ | 113 | */ |
115 | void setName(String value); | 114 | void setName(String value); |
116 | 115 | ||
116 | /** | ||
117 | * Returns the value of the '<em><b>Multiple Allowed</b></em>' attribute. | ||
118 | * The default value is <code>"false"</code>. | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <p> | ||
121 | * If the meaning of the '<em>Multiple Allowed</em>' attribute isn't clear, | ||
122 | * there really should be more of a description here... | ||
123 | * </p> | ||
124 | * <!-- end-user-doc --> | ||
125 | * @return the value of the '<em>Multiple Allowed</em>' attribute. | ||
126 | * @see #setMultipleAllowed(boolean) | ||
127 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getComponent_MultipleAllowed() | ||
128 | * @model default="false" | ||
129 | * @generated | ||
130 | */ | ||
131 | boolean isMultipleAllowed(); | ||
132 | |||
133 | /** | ||
134 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component#isMultipleAllowed <em>Multiple Allowed</em>}' attribute. | ||
135 | * <!-- begin-user-doc --> | ||
136 | * <!-- end-user-doc --> | ||
137 | * @param value the new value of the '<em>Multiple Allowed</em>' attribute. | ||
138 | * @see #isMultipleAllowed() | ||
139 | * @generated | ||
140 | */ | ||
141 | void setMultipleAllowed(boolean value); | ||
142 | |||
117 | } // Component | 143 | } // Component |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Connection.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Connection.java index c05e809b..9ca5b77f 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Connection.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Connection.java | |||
@@ -2,8 +2,6 @@ | |||
2 | */ | 2 | */ |
3 | package hu.bme.mit.inf.dslreasoner.faulttree.model.cft; | 3 | package hu.bme.mit.inf.dslreasoner.faulttree.model.cft; |
4 | 4 | ||
5 | import org.eclipse.emf.ecore.EObject; | ||
6 | |||
7 | /** | 5 | /** |
8 | * <!-- begin-user-doc --> | 6 | * <!-- begin-user-doc --> |
9 | * A representation of the model object '<em><b>Connection</b></em>'. | 7 | * A representation of the model object '<em><b>Connection</b></em>'. |
@@ -21,7 +19,7 @@ import org.eclipse.emf.ecore.EObject; | |||
21 | * @model | 19 | * @model |
22 | * @generated | 20 | * @generated |
23 | */ | 21 | */ |
24 | public interface Connection extends EObject { | 22 | public interface Connection extends ModalElement { |
25 | /** | 23 | /** |
26 | * Returns the value of the '<em><b>Input</b></em>' container reference. | 24 | * Returns the value of the '<em><b>Input</b></em>' container reference. |
27 | * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getIncomingConnections <em>Incoming Connections</em>}'. | 25 | * It is bidirectional and its opposite is '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input#getIncomingConnections <em>Incoming Connections</em>}'. |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/ModalElement.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/ModalElement.java new file mode 100644 index 00000000..9abb6558 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/ModalElement.java | |||
@@ -0,0 +1,54 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.faulttree.model.cft; | ||
4 | |||
5 | import org.eclipse.emf.ecore.EObject; | ||
6 | |||
7 | /** | ||
8 | * <!-- begin-user-doc --> | ||
9 | * A representation of the model object '<em><b>Modal Element</b></em>'. | ||
10 | * <!-- end-user-doc --> | ||
11 | * | ||
12 | * <p> | ||
13 | * The following features are supported: | ||
14 | * </p> | ||
15 | * <ul> | ||
16 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement#getExists <em>Exists</em>}</li> | ||
17 | * </ul> | ||
18 | * | ||
19 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getModalElement() | ||
20 | * @model interface="true" abstract="true" | ||
21 | * @generated | ||
22 | */ | ||
23 | public interface ModalElement extends EObject { | ||
24 | /** | ||
25 | * Returns the value of the '<em><b>Exists</b></em>' attribute. | ||
26 | * The default value is <code>"MUST"</code>. | ||
27 | * The literals are from the enumeration {@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality}. | ||
28 | * <!-- begin-user-doc --> | ||
29 | * <p> | ||
30 | * If the meaning of the '<em>Exists</em>' attribute isn't clear, | ||
31 | * there really should be more of a description here... | ||
32 | * </p> | ||
33 | * <!-- end-user-doc --> | ||
34 | * @return the value of the '<em>Exists</em>' attribute. | ||
35 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality | ||
36 | * @see #setExists(Modality) | ||
37 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getModalElement_Exists() | ||
38 | * @model default="MUST" | ||
39 | * @generated | ||
40 | */ | ||
41 | Modality getExists(); | ||
42 | |||
43 | /** | ||
44 | * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement#getExists <em>Exists</em>}' attribute. | ||
45 | * <!-- begin-user-doc --> | ||
46 | * <!-- end-user-doc --> | ||
47 | * @param value the new value of the '<em>Exists</em>' attribute. | ||
48 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality | ||
49 | * @see #getExists() | ||
50 | * @generated | ||
51 | */ | ||
52 | void setExists(Modality value); | ||
53 | |||
54 | } // ModalElement | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Modality.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Modality.java new file mode 100644 index 00000000..6b7dc1e4 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/Modality.java | |||
@@ -0,0 +1,244 @@ | |||
1 | /** | ||
2 | */ | ||
3 | package hu.bme.mit.inf.dslreasoner.faulttree.model.cft; | ||
4 | |||
5 | import java.util.Arrays; | ||
6 | import java.util.Collections; | ||
7 | import java.util.List; | ||
8 | |||
9 | import org.eclipse.emf.common.util.Enumerator; | ||
10 | |||
11 | /** | ||
12 | * <!-- begin-user-doc --> | ||
13 | * A representation of the literals of the enumeration '<em><b>Modality</b></em>', | ||
14 | * and utility methods for working with them. | ||
15 | * <!-- end-user-doc --> | ||
16 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftPackage#getModality() | ||
17 | * @model | ||
18 | * @generated | ||
19 | */ | ||
20 | public enum Modality implements Enumerator { | ||
21 | /** | ||
22 | * The '<em><b>MAY</b></em>' literal object. | ||
23 | * <!-- begin-user-doc --> | ||
24 | * <!-- end-user-doc --> | ||
25 | * @see #MAY_VALUE | ||
26 | * @generated | ||
27 | * @ordered | ||
28 | */ | ||
29 | MAY(0, "MAY", "MAY"), | ||
30 | |||
31 | /** | ||
32 | * The '<em><b>CURRENT</b></em>' literal object. | ||
33 | * <!-- begin-user-doc --> | ||
34 | * <!-- end-user-doc --> | ||
35 | * @see #CURRENT_VALUE | ||
36 | * @generated | ||
37 | * @ordered | ||
38 | */ | ||
39 | CURRENT(1, "CURRENT", "CURRENT"), | ||
40 | |||
41 | /** | ||
42 | * The '<em><b>MUST</b></em>' literal object. | ||
43 | * <!-- begin-user-doc --> | ||
44 | * <!-- end-user-doc --> | ||
45 | * @see #MUST_VALUE | ||
46 | * @generated | ||
47 | * @ordered | ||
48 | */ | ||
49 | MUST(2, "MUST", "MUST"); | ||
50 | |||
51 | /** | ||
52 | * The '<em><b>MAY</b></em>' literal value. | ||
53 | * <!-- begin-user-doc --> | ||
54 | * <p> | ||
55 | * If the meaning of '<em><b>MAY</b></em>' literal object isn't clear, | ||
56 | * there really should be more of a description here... | ||
57 | * </p> | ||
58 | * <!-- end-user-doc --> | ||
59 | * @see #MAY | ||
60 | * @model | ||
61 | * @generated | ||
62 | * @ordered | ||
63 | */ | ||
64 | public static final int MAY_VALUE = 0; | ||
65 | |||
66 | /** | ||
67 | * The '<em><b>CURRENT</b></em>' literal value. | ||
68 | * <!-- begin-user-doc --> | ||
69 | * <p> | ||
70 | * If the meaning of '<em><b>CURRENT</b></em>' literal object isn't clear, | ||
71 | * there really should be more of a description here... | ||
72 | * </p> | ||
73 | * <!-- end-user-doc --> | ||
74 | * @see #CURRENT | ||
75 | * @model | ||
76 | * @generated | ||
77 | * @ordered | ||
78 | */ | ||
79 | public static final int CURRENT_VALUE = 1; | ||
80 | |||
81 | /** | ||
82 | * The '<em><b>MUST</b></em>' literal value. | ||
83 | * <!-- begin-user-doc --> | ||
84 | * <p> | ||
85 | * If the meaning of '<em><b>MUST</b></em>' literal object isn't clear, | ||
86 | * there really should be more of a description here... | ||
87 | * </p> | ||
88 | * <!-- end-user-doc --> | ||
89 | * @see #MUST | ||
90 | * @model | ||
91 | * @generated | ||
92 | * @ordered | ||
93 | */ | ||
94 | public static final int MUST_VALUE = 2; | ||
95 | |||
96 | /** | ||
97 | * An array of all the '<em><b>Modality</b></em>' enumerators. | ||
98 | * <!-- begin-user-doc --> | ||
99 | * <!-- end-user-doc --> | ||
100 | * @generated | ||
101 | */ | ||
102 | private static final Modality[] VALUES_ARRAY = | ||
103 | new Modality[] { | ||
104 | MAY, | ||
105 | CURRENT, | ||
106 | MUST, | ||
107 | }; | ||
108 | |||
109 | /** | ||
110 | * A public read-only list of all the '<em><b>Modality</b></em>' enumerators. | ||
111 | * <!-- begin-user-doc --> | ||
112 | * <!-- end-user-doc --> | ||
113 | * @generated | ||
114 | */ | ||
115 | public static final List<Modality> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY)); | ||
116 | |||
117 | /** | ||
118 | * Returns the '<em><b>Modality</b></em>' literal with the specified literal value. | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @param literal the literal. | ||
122 | * @return the matching enumerator or <code>null</code>. | ||
123 | * @generated | ||
124 | */ | ||
125 | public static Modality get(String literal) { | ||
126 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { | ||
127 | Modality result = VALUES_ARRAY[i]; | ||
128 | if (result.toString().equals(literal)) { | ||
129 | return result; | ||
130 | } | ||
131 | } | ||
132 | return null; | ||
133 | } | ||
134 | |||
135 | /** | ||
136 | * Returns the '<em><b>Modality</b></em>' literal with the specified name. | ||
137 | * <!-- begin-user-doc --> | ||
138 | * <!-- end-user-doc --> | ||
139 | * @param name the name. | ||
140 | * @return the matching enumerator or <code>null</code>. | ||
141 | * @generated | ||
142 | */ | ||
143 | public static Modality getByName(String name) { | ||
144 | for (int i = 0; i < VALUES_ARRAY.length; ++i) { | ||
145 | Modality result = VALUES_ARRAY[i]; | ||
146 | if (result.getName().equals(name)) { | ||
147 | return result; | ||
148 | } | ||
149 | } | ||
150 | return null; | ||
151 | } | ||
152 | |||
153 | /** | ||
154 | * Returns the '<em><b>Modality</b></em>' literal with the specified integer value. | ||
155 | * <!-- begin-user-doc --> | ||
156 | * <!-- end-user-doc --> | ||
157 | * @param value the integer value. | ||
158 | * @return the matching enumerator or <code>null</code>. | ||
159 | * @generated | ||
160 | */ | ||
161 | public static Modality get(int value) { | ||
162 | switch (value) { | ||
163 | case MAY_VALUE: return MAY; | ||
164 | case CURRENT_VALUE: return CURRENT; | ||
165 | case MUST_VALUE: return MUST; | ||
166 | } | ||
167 | return null; | ||
168 | } | ||
169 | |||
170 | /** | ||
171 | * <!-- begin-user-doc --> | ||
172 | * <!-- end-user-doc --> | ||
173 | * @generated | ||
174 | */ | ||
175 | private final int value; | ||
176 | |||
177 | /** | ||
178 | * <!-- begin-user-doc --> | ||
179 | * <!-- end-user-doc --> | ||
180 | * @generated | ||
181 | */ | ||
182 | private final String name; | ||
183 | |||
184 | /** | ||
185 | * <!-- begin-user-doc --> | ||
186 | * <!-- end-user-doc --> | ||
187 | * @generated | ||
188 | */ | ||
189 | private final String literal; | ||
190 | |||
191 | /** | ||
192 | * Only this class can construct instances. | ||
193 | * <!-- begin-user-doc --> | ||
194 | * <!-- end-user-doc --> | ||
195 | * @generated | ||
196 | */ | ||
197 | private Modality(int value, String name, String literal) { | ||
198 | this.value = value; | ||
199 | this.name = name; | ||
200 | this.literal = literal; | ||
201 | } | ||
202 | |||
203 | /** | ||
204 | * <!-- begin-user-doc --> | ||
205 | * <!-- end-user-doc --> | ||
206 | * @generated | ||
207 | */ | ||
208 | @Override | ||
209 | public int getValue() { | ||
210 | return value; | ||
211 | } | ||
212 | |||
213 | /** | ||
214 | * <!-- begin-user-doc --> | ||
215 | * <!-- end-user-doc --> | ||
216 | * @generated | ||
217 | */ | ||
218 | @Override | ||
219 | public String getName() { | ||
220 | return name; | ||
221 | } | ||
222 | |||
223 | /** | ||
224 | * <!-- begin-user-doc --> | ||
225 | * <!-- end-user-doc --> | ||
226 | * @generated | ||
227 | */ | ||
228 | @Override | ||
229 | public String getLiteral() { | ||
230 | return literal; | ||
231 | } | ||
232 | |||
233 | /** | ||
234 | * Returns the literal value of the enumerator, which is its string representation. | ||
235 | * <!-- begin-user-doc --> | ||
236 | * <!-- end-user-doc --> | ||
237 | * @generated | ||
238 | */ | ||
239 | @Override | ||
240 | public String toString() { | ||
241 | return literal; | ||
242 | } | ||
243 | |||
244 | } //Modality | ||
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 6eac2861..6b07b541 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 | |||
@@ -5,6 +5,7 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl; | |||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.*; | 5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.*; |
6 | 6 | ||
7 | import org.eclipse.emf.ecore.EClass; | 7 | import org.eclipse.emf.ecore.EClass; |
8 | import org.eclipse.emf.ecore.EDataType; | ||
8 | import org.eclipse.emf.ecore.EObject; | 9 | import org.eclipse.emf.ecore.EObject; |
9 | import org.eclipse.emf.ecore.EPackage; | 10 | import org.eclipse.emf.ecore.EPackage; |
10 | 11 | ||
@@ -78,6 +79,36 @@ public class CftFactoryImpl extends EFactoryImpl implements CftFactory { | |||
78 | * @generated | 79 | * @generated |
79 | */ | 80 | */ |
80 | @Override | 81 | @Override |
82 | public Object createFromString(EDataType eDataType, String initialValue) { | ||
83 | switch (eDataType.getClassifierID()) { | ||
84 | case CftPackage.MODALITY: | ||
85 | return createModalityFromString(eDataType, initialValue); | ||
86 | default: | ||
87 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); | ||
88 | } | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * <!-- begin-user-doc --> | ||
93 | * <!-- end-user-doc --> | ||
94 | * @generated | ||
95 | */ | ||
96 | @Override | ||
97 | public String convertToString(EDataType eDataType, Object instanceValue) { | ||
98 | switch (eDataType.getClassifierID()) { | ||
99 | case CftPackage.MODALITY: | ||
100 | return convertModalityToString(eDataType, instanceValue); | ||
101 | default: | ||
102 | throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); | ||
103 | } | ||
104 | } | ||
105 | |||
106 | /** | ||
107 | * <!-- begin-user-doc --> | ||
108 | * <!-- end-user-doc --> | ||
109 | * @generated | ||
110 | */ | ||
111 | @Override | ||
81 | public ComponentDefinition createComponentDefinition() { | 112 | public ComponentDefinition createComponentDefinition() { |
82 | ComponentDefinitionImpl componentDefinition = new ComponentDefinitionImpl(); | 113 | ComponentDefinitionImpl componentDefinition = new ComponentDefinitionImpl(); |
83 | return componentDefinition; | 114 | return componentDefinition; |
@@ -198,6 +229,26 @@ public class CftFactoryImpl extends EFactoryImpl implements CftFactory { | |||
198 | * <!-- end-user-doc --> | 229 | * <!-- end-user-doc --> |
199 | * @generated | 230 | * @generated |
200 | */ | 231 | */ |
232 | public Modality createModalityFromString(EDataType eDataType, String initialValue) { | ||
233 | Modality result = Modality.get(initialValue); | ||
234 | if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); | ||
235 | return result; | ||
236 | } | ||
237 | |||
238 | /** | ||
239 | * <!-- begin-user-doc --> | ||
240 | * <!-- end-user-doc --> | ||
241 | * @generated | ||
242 | */ | ||
243 | public String convertModalityToString(EDataType eDataType, Object instanceValue) { | ||
244 | return instanceValue == null ? null : instanceValue.toString(); | ||
245 | } | ||
246 | |||
247 | /** | ||
248 | * <!-- begin-user-doc --> | ||
249 | * <!-- end-user-doc --> | ||
250 | * @generated | ||
251 | */ | ||
201 | @Override | 252 | @Override |
202 | public CftPackage getCftPackage() { | 253 | public CftPackage getCftPackage() { |
203 | return (CftPackage)getEPackage(); | 254 | return (CftPackage)getEPackage(); |
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 1d6b6a23..2d70d7ce 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 | |||
@@ -16,6 +16,8 @@ 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.InputEvent; | 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.ModalElement; | ||
20 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality; | ||
19 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.OrGateDefinition; | 21 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.OrGateDefinition; |
20 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | 22 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; |
21 | 23 | ||
@@ -23,6 +25,7 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage; | |||
23 | 25 | ||
24 | import org.eclipse.emf.ecore.EAttribute; | 26 | import org.eclipse.emf.ecore.EAttribute; |
25 | import org.eclipse.emf.ecore.EClass; | 27 | import org.eclipse.emf.ecore.EClass; |
28 | import org.eclipse.emf.ecore.EEnum; | ||
26 | import org.eclipse.emf.ecore.EPackage; | 29 | import org.eclipse.emf.ecore.EPackage; |
27 | import org.eclipse.emf.ecore.EReference; | 30 | import org.eclipse.emf.ecore.EReference; |
28 | 31 | ||
@@ -134,6 +137,20 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
134 | private EClass connectionEClass = null; | 137 | private EClass connectionEClass = null; |
135 | 138 | ||
136 | /** | 139 | /** |
140 | * <!-- begin-user-doc --> | ||
141 | * <!-- end-user-doc --> | ||
142 | * @generated | ||
143 | */ | ||
144 | private EClass modalElementEClass = null; | ||
145 | |||
146 | /** | ||
147 | * <!-- begin-user-doc --> | ||
148 | * <!-- end-user-doc --> | ||
149 | * @generated | ||
150 | */ | ||
151 | private EEnum modalityEEnum = null; | ||
152 | |||
153 | /** | ||
137 | * Creates an instance of the model <b>Package</b>, registered with | 154 | * Creates an instance of the model <b>Package</b>, registered with |
138 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package | 155 | * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package |
139 | * package URI value. | 156 | * package URI value. |
@@ -473,6 +490,16 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
473 | * @generated | 490 | * @generated |
474 | */ | 491 | */ |
475 | @Override | 492 | @Override |
493 | public EAttribute getComponent_MultipleAllowed() { | ||
494 | return (EAttribute)componentEClass.getEStructuralFeatures().get(4); | ||
495 | } | ||
496 | |||
497 | /** | ||
498 | * <!-- begin-user-doc --> | ||
499 | * <!-- end-user-doc --> | ||
500 | * @generated | ||
501 | */ | ||
502 | @Override | ||
476 | public EClass getInput() { | 503 | public EClass getInput() { |
477 | return inputEClass; | 504 | return inputEClass; |
478 | } | 505 | } |
@@ -583,6 +610,36 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
583 | * @generated | 610 | * @generated |
584 | */ | 611 | */ |
585 | @Override | 612 | @Override |
613 | public EClass getModalElement() { | ||
614 | return modalElementEClass; | ||
615 | } | ||
616 | |||
617 | /** | ||
618 | * <!-- begin-user-doc --> | ||
619 | * <!-- end-user-doc --> | ||
620 | * @generated | ||
621 | */ | ||
622 | @Override | ||
623 | public EAttribute getModalElement_Exists() { | ||
624 | return (EAttribute)modalElementEClass.getEStructuralFeatures().get(0); | ||
625 | } | ||
626 | |||
627 | /** | ||
628 | * <!-- begin-user-doc --> | ||
629 | * <!-- end-user-doc --> | ||
630 | * @generated | ||
631 | */ | ||
632 | @Override | ||
633 | public EEnum getModality() { | ||
634 | return modalityEEnum; | ||
635 | } | ||
636 | |||
637 | /** | ||
638 | * <!-- begin-user-doc --> | ||
639 | * <!-- end-user-doc --> | ||
640 | * @generated | ||
641 | */ | ||
642 | @Override | ||
586 | public CftFactory getCftFactory() { | 643 | public CftFactory getCftFactory() { |
587 | return (CftFactory)getEFactoryInstance(); | 644 | return (CftFactory)getEFactoryInstance(); |
588 | } | 645 | } |
@@ -643,6 +700,7 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
643 | createEReference(componentEClass, COMPONENT__OUTPUTS); | 700 | createEReference(componentEClass, COMPONENT__OUTPUTS); |
644 | createEReference(componentEClass, COMPONENT__COMPONENT_DEFINITION); | 701 | createEReference(componentEClass, COMPONENT__COMPONENT_DEFINITION); |
645 | createEAttribute(componentEClass, COMPONENT__NAME); | 702 | createEAttribute(componentEClass, COMPONENT__NAME); |
703 | createEAttribute(componentEClass, COMPONENT__MULTIPLE_ALLOWED); | ||
646 | 704 | ||
647 | inputEClass = createEClass(INPUT); | 705 | inputEClass = createEClass(INPUT); |
648 | createEReference(inputEClass, INPUT__INPUT_EVENT); | 706 | createEReference(inputEClass, INPUT__INPUT_EVENT); |
@@ -657,6 +715,12 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
657 | connectionEClass = createEClass(CONNECTION); | 715 | connectionEClass = createEClass(CONNECTION); |
658 | createEReference(connectionEClass, CONNECTION__INPUT); | 716 | createEReference(connectionEClass, CONNECTION__INPUT); |
659 | createEReference(connectionEClass, CONNECTION__OUTPUT); | 717 | createEReference(connectionEClass, CONNECTION__OUTPUT); |
718 | |||
719 | modalElementEClass = createEClass(MODAL_ELEMENT); | ||
720 | createEAttribute(modalElementEClass, MODAL_ELEMENT__EXISTS); | ||
721 | |||
722 | // Create enums | ||
723 | modalityEEnum = createEEnum(MODALITY); | ||
660 | } | 724 | } |
661 | 725 | ||
662 | /** | 726 | /** |
@@ -697,6 +761,8 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
697 | andGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); | 761 | andGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); |
698 | orGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); | 762 | orGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); |
699 | kOfMGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); | 763 | kOfMGateDefinitionEClass.getESuperTypes().add(this.getGateDefinition()); |
764 | componentEClass.getESuperTypes().add(this.getModalElement()); | ||
765 | connectionEClass.getESuperTypes().add(this.getModalElement()); | ||
700 | 766 | ||
701 | // Initialize classes, features, and operations; add parameters | 767 | // Initialize classes, features, and operations; add parameters |
702 | initEClass(componentDefinitionEClass, ComponentDefinition.class, "ComponentDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 768 | initEClass(componentDefinitionEClass, ComponentDefinition.class, "ComponentDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
@@ -736,6 +802,7 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
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); | 802 | 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); |
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); | 803 | 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); | 804 | 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); |
805 | initEAttribute(getComponent_MultipleAllowed(), ecorePackage.getEBoolean(), "multipleAllowed", "false", 0, 1, Component.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
739 | 806 | ||
740 | initEClass(inputEClass, Input.class, "Input", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | 807 | initEClass(inputEClass, Input.class, "Input", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); |
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); | 808 | 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); |
@@ -751,6 +818,15 @@ public class CftPackageImpl extends EPackageImpl implements CftPackage { | |||
751 | initEReference(getConnection_Input(), this.getInput(), this.getInput_IncomingConnections(), "input", null, 1, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 818 | initEReference(getConnection_Input(), this.getInput(), this.getInput_IncomingConnections(), "input", null, 1, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
752 | initEReference(getConnection_Output(), this.getOutput(), this.getOutput_OutgoingConnections(), "output", null, 1, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | 819 | initEReference(getConnection_Output(), this.getOutput(), this.getOutput_OutgoingConnections(), "output", null, 1, 1, Connection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); |
753 | 820 | ||
821 | initEClass(modalElementEClass, ModalElement.class, "ModalElement", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); | ||
822 | initEAttribute(getModalElement_Exists(), this.getModality(), "exists", "MUST", 0, 1, ModalElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); | ||
823 | |||
824 | // Initialize enums and add enum literals | ||
825 | initEEnum(modalityEEnum, Modality.class, "Modality"); | ||
826 | addEEnumLiteral(modalityEEnum, Modality.MAY); | ||
827 | addEEnumLiteral(modalityEEnum, Modality.CURRENT); | ||
828 | addEEnumLiteral(modalityEEnum, Modality.MUST); | ||
829 | |||
754 | // Create resource | 830 | // Create resource |
755 | createResource(eNS_URI); | 831 | createResource(eNS_URI); |
756 | } | 832 | } |
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 847b6ee1..dcbf7660 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 | |||
@@ -6,6 +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.ComponentDefinition; | 7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; |
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.Modality; | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | 10 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; |
10 | 11 | ||
11 | import java.util.Collection; | 12 | import java.util.Collection; |
@@ -32,16 +33,38 @@ import org.eclipse.emf.ecore.util.InternalEList; | |||
32 | * The following features are implemented: | 33 | * The following features are implemented: |
33 | * </p> | 34 | * </p> |
34 | * <ul> | 35 | * <ul> |
36 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getExists <em>Exists</em>}</li> | ||
35 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getInputs <em>Inputs</em>}</li> | 37 | * <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> | 38 | * <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> | 39 | * <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> | 40 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#getName <em>Name</em>}</li> |
41 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ComponentImpl#isMultipleAllowed <em>Multiple Allowed</em>}</li> | ||
39 | * </ul> | 42 | * </ul> |
40 | * | 43 | * |
41 | * @generated | 44 | * @generated |
42 | */ | 45 | */ |
43 | public class ComponentImpl extends MinimalEObjectImpl.Container implements Component { | 46 | public class ComponentImpl extends MinimalEObjectImpl.Container implements Component { |
44 | /** | 47 | /** |
48 | * The default value of the '{@link #getExists() <em>Exists</em>}' attribute. | ||
49 | * <!-- begin-user-doc --> | ||
50 | * <!-- end-user-doc --> | ||
51 | * @see #getExists() | ||
52 | * @generated | ||
53 | * @ordered | ||
54 | */ | ||
55 | protected static final Modality EXISTS_EDEFAULT = Modality.MUST; | ||
56 | |||
57 | /** | ||
58 | * The cached value of the '{@link #getExists() <em>Exists</em>}' attribute. | ||
59 | * <!-- begin-user-doc --> | ||
60 | * <!-- end-user-doc --> | ||
61 | * @see #getExists() | ||
62 | * @generated | ||
63 | * @ordered | ||
64 | */ | ||
65 | protected Modality exists = EXISTS_EDEFAULT; | ||
66 | |||
67 | /** | ||
45 | * The cached value of the '{@link #getInputs() <em>Inputs</em>}' containment reference list. | 68 | * The cached value of the '{@link #getInputs() <em>Inputs</em>}' containment reference list. |
46 | * <!-- begin-user-doc --> | 69 | * <!-- begin-user-doc --> |
47 | * <!-- end-user-doc --> | 70 | * <!-- end-user-doc --> |
@@ -92,6 +115,26 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
92 | protected String name = NAME_EDEFAULT; | 115 | protected String name = NAME_EDEFAULT; |
93 | 116 | ||
94 | /** | 117 | /** |
118 | * The default value of the '{@link #isMultipleAllowed() <em>Multiple Allowed</em>}' attribute. | ||
119 | * <!-- begin-user-doc --> | ||
120 | * <!-- end-user-doc --> | ||
121 | * @see #isMultipleAllowed() | ||
122 | * @generated | ||
123 | * @ordered | ||
124 | */ | ||
125 | protected static final boolean MULTIPLE_ALLOWED_EDEFAULT = false; | ||
126 | |||
127 | /** | ||
128 | * The cached value of the '{@link #isMultipleAllowed() <em>Multiple Allowed</em>}' attribute. | ||
129 | * <!-- begin-user-doc --> | ||
130 | * <!-- end-user-doc --> | ||
131 | * @see #isMultipleAllowed() | ||
132 | * @generated | ||
133 | * @ordered | ||
134 | */ | ||
135 | protected boolean multipleAllowed = MULTIPLE_ALLOWED_EDEFAULT; | ||
136 | |||
137 | /** | ||
95 | * <!-- begin-user-doc --> | 138 | * <!-- begin-user-doc --> |
96 | * <!-- end-user-doc --> | 139 | * <!-- end-user-doc --> |
97 | * @generated | 140 | * @generated |
@@ -204,6 +247,52 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
204 | * <!-- end-user-doc --> | 247 | * <!-- end-user-doc --> |
205 | * @generated | 248 | * @generated |
206 | */ | 249 | */ |
250 | @Override | ||
251 | public Modality getExists() { | ||
252 | return exists; | ||
253 | } | ||
254 | |||
255 | /** | ||
256 | * <!-- begin-user-doc --> | ||
257 | * <!-- end-user-doc --> | ||
258 | * @generated | ||
259 | */ | ||
260 | @Override | ||
261 | public void setExists(Modality newExists) { | ||
262 | Modality oldExists = exists; | ||
263 | exists = newExists == null ? EXISTS_EDEFAULT : newExists; | ||
264 | if (eNotificationRequired()) | ||
265 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.COMPONENT__EXISTS, oldExists, exists)); | ||
266 | } | ||
267 | |||
268 | /** | ||
269 | * <!-- begin-user-doc --> | ||
270 | * <!-- end-user-doc --> | ||
271 | * @generated | ||
272 | */ | ||
273 | @Override | ||
274 | public boolean isMultipleAllowed() { | ||
275 | return multipleAllowed; | ||
276 | } | ||
277 | |||
278 | /** | ||
279 | * <!-- begin-user-doc --> | ||
280 | * <!-- end-user-doc --> | ||
281 | * @generated | ||
282 | */ | ||
283 | @Override | ||
284 | public void setMultipleAllowed(boolean newMultipleAllowed) { | ||
285 | boolean oldMultipleAllowed = multipleAllowed; | ||
286 | multipleAllowed = newMultipleAllowed; | ||
287 | if (eNotificationRequired()) | ||
288 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.COMPONENT__MULTIPLE_ALLOWED, oldMultipleAllowed, multipleAllowed)); | ||
289 | } | ||
290 | |||
291 | /** | ||
292 | * <!-- begin-user-doc --> | ||
293 | * <!-- end-user-doc --> | ||
294 | * @generated | ||
295 | */ | ||
207 | @SuppressWarnings("unchecked") | 296 | @SuppressWarnings("unchecked") |
208 | @Override | 297 | @Override |
209 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | 298 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
@@ -240,6 +329,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
240 | @Override | 329 | @Override |
241 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | 330 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
242 | switch (featureID) { | 331 | switch (featureID) { |
332 | case CftPackage.COMPONENT__EXISTS: | ||
333 | return getExists(); | ||
243 | case CftPackage.COMPONENT__INPUTS: | 334 | case CftPackage.COMPONENT__INPUTS: |
244 | return getInputs(); | 335 | return getInputs(); |
245 | case CftPackage.COMPONENT__OUTPUTS: | 336 | case CftPackage.COMPONENT__OUTPUTS: |
@@ -249,6 +340,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
249 | return basicGetComponentDefinition(); | 340 | return basicGetComponentDefinition(); |
250 | case CftPackage.COMPONENT__NAME: | 341 | case CftPackage.COMPONENT__NAME: |
251 | return getName(); | 342 | return getName(); |
343 | case CftPackage.COMPONENT__MULTIPLE_ALLOWED: | ||
344 | return isMultipleAllowed(); | ||
252 | } | 345 | } |
253 | return super.eGet(featureID, resolve, coreType); | 346 | return super.eGet(featureID, resolve, coreType); |
254 | } | 347 | } |
@@ -262,6 +355,9 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
262 | @Override | 355 | @Override |
263 | public void eSet(int featureID, Object newValue) { | 356 | public void eSet(int featureID, Object newValue) { |
264 | switch (featureID) { | 357 | switch (featureID) { |
358 | case CftPackage.COMPONENT__EXISTS: | ||
359 | setExists((Modality)newValue); | ||
360 | return; | ||
265 | case CftPackage.COMPONENT__INPUTS: | 361 | case CftPackage.COMPONENT__INPUTS: |
266 | getInputs().clear(); | 362 | getInputs().clear(); |
267 | getInputs().addAll((Collection<? extends Input>)newValue); | 363 | getInputs().addAll((Collection<? extends Input>)newValue); |
@@ -276,6 +372,9 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
276 | case CftPackage.COMPONENT__NAME: | 372 | case CftPackage.COMPONENT__NAME: |
277 | setName((String)newValue); | 373 | setName((String)newValue); |
278 | return; | 374 | return; |
375 | case CftPackage.COMPONENT__MULTIPLE_ALLOWED: | ||
376 | setMultipleAllowed((Boolean)newValue); | ||
377 | return; | ||
279 | } | 378 | } |
280 | super.eSet(featureID, newValue); | 379 | super.eSet(featureID, newValue); |
281 | } | 380 | } |
@@ -288,6 +387,9 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
288 | @Override | 387 | @Override |
289 | public void eUnset(int featureID) { | 388 | public void eUnset(int featureID) { |
290 | switch (featureID) { | 389 | switch (featureID) { |
390 | case CftPackage.COMPONENT__EXISTS: | ||
391 | setExists(EXISTS_EDEFAULT); | ||
392 | return; | ||
291 | case CftPackage.COMPONENT__INPUTS: | 393 | case CftPackage.COMPONENT__INPUTS: |
292 | getInputs().clear(); | 394 | getInputs().clear(); |
293 | return; | 395 | return; |
@@ -300,6 +402,9 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
300 | case CftPackage.COMPONENT__NAME: | 402 | case CftPackage.COMPONENT__NAME: |
301 | setName(NAME_EDEFAULT); | 403 | setName(NAME_EDEFAULT); |
302 | return; | 404 | return; |
405 | case CftPackage.COMPONENT__MULTIPLE_ALLOWED: | ||
406 | setMultipleAllowed(MULTIPLE_ALLOWED_EDEFAULT); | ||
407 | return; | ||
303 | } | 408 | } |
304 | super.eUnset(featureID); | 409 | super.eUnset(featureID); |
305 | } | 410 | } |
@@ -312,6 +417,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
312 | @Override | 417 | @Override |
313 | public boolean eIsSet(int featureID) { | 418 | public boolean eIsSet(int featureID) { |
314 | switch (featureID) { | 419 | switch (featureID) { |
420 | case CftPackage.COMPONENT__EXISTS: | ||
421 | return exists != EXISTS_EDEFAULT; | ||
315 | case CftPackage.COMPONENT__INPUTS: | 422 | case CftPackage.COMPONENT__INPUTS: |
316 | return inputs != null && !inputs.isEmpty(); | 423 | return inputs != null && !inputs.isEmpty(); |
317 | case CftPackage.COMPONENT__OUTPUTS: | 424 | case CftPackage.COMPONENT__OUTPUTS: |
@@ -320,6 +427,8 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
320 | return componentDefinition != null; | 427 | return componentDefinition != null; |
321 | case CftPackage.COMPONENT__NAME: | 428 | case CftPackage.COMPONENT__NAME: |
322 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); | 429 | return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name); |
430 | case CftPackage.COMPONENT__MULTIPLE_ALLOWED: | ||
431 | return multipleAllowed != MULTIPLE_ALLOWED_EDEFAULT; | ||
323 | } | 432 | } |
324 | return super.eIsSet(featureID); | 433 | return super.eIsSet(featureID); |
325 | } | 434 | } |
@@ -334,8 +443,12 @@ public class ComponentImpl extends MinimalEObjectImpl.Container implements Compo | |||
334 | if (eIsProxy()) return super.toString(); | 443 | if (eIsProxy()) return super.toString(); |
335 | 444 | ||
336 | StringBuilder result = new StringBuilder(super.toString()); | 445 | StringBuilder result = new StringBuilder(super.toString()); |
337 | result.append(" (name: "); | 446 | result.append(" (exists: "); |
447 | result.append(exists); | ||
448 | result.append(", name: "); | ||
338 | result.append(name); | 449 | result.append(name); |
450 | result.append(", multipleAllowed: "); | ||
451 | result.append(multipleAllowed); | ||
339 | result.append(')'); | 452 | result.append(')'); |
340 | return result.toString(); | 453 | return result.toString(); |
341 | } | 454 | } |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java index 7506e4d7..aea86ed4 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/cft/impl/ConnectionImpl.java | |||
@@ -5,6 +5,7 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl; | |||
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.Connection; | 6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection; |
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; | 7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; |
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | 9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; |
9 | 10 | ||
10 | import org.eclipse.emf.common.notify.Notification; | 11 | import org.eclipse.emf.common.notify.Notification; |
@@ -26,6 +27,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil; | |||
26 | * The following features are implemented: | 27 | * The following features are implemented: |
27 | * </p> | 28 | * </p> |
28 | * <ul> | 29 | * <ul> |
30 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ConnectionImpl#getExists <em>Exists</em>}</li> | ||
29 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ConnectionImpl#getInput <em>Input</em>}</li> | 31 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ConnectionImpl#getInput <em>Input</em>}</li> |
30 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ConnectionImpl#getOutput <em>Output</em>}</li> | 32 | * <li>{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.impl.ConnectionImpl#getOutput <em>Output</em>}</li> |
31 | * </ul> | 33 | * </ul> |
@@ -34,6 +36,26 @@ import org.eclipse.emf.ecore.util.EcoreUtil; | |||
34 | */ | 36 | */ |
35 | public class ConnectionImpl extends MinimalEObjectImpl.Container implements Connection { | 37 | public class ConnectionImpl extends MinimalEObjectImpl.Container implements Connection { |
36 | /** | 38 | /** |
39 | * The default value of the '{@link #getExists() <em>Exists</em>}' attribute. | ||
40 | * <!-- begin-user-doc --> | ||
41 | * <!-- end-user-doc --> | ||
42 | * @see #getExists() | ||
43 | * @generated | ||
44 | * @ordered | ||
45 | */ | ||
46 | protected static final Modality EXISTS_EDEFAULT = Modality.MUST; | ||
47 | |||
48 | /** | ||
49 | * The cached value of the '{@link #getExists() <em>Exists</em>}' attribute. | ||
50 | * <!-- begin-user-doc --> | ||
51 | * <!-- end-user-doc --> | ||
52 | * @see #getExists() | ||
53 | * @generated | ||
54 | * @ordered | ||
55 | */ | ||
56 | protected Modality exists = EXISTS_EDEFAULT; | ||
57 | |||
58 | /** | ||
37 | * The cached value of the '{@link #getOutput() <em>Output</em>}' reference. | 59 | * The cached value of the '{@link #getOutput() <em>Output</em>}' reference. |
38 | * <!-- begin-user-doc --> | 60 | * <!-- begin-user-doc --> |
39 | * <!-- end-user-doc --> | 61 | * <!-- end-user-doc --> |
@@ -173,6 +195,29 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn | |||
173 | * @generated | 195 | * @generated |
174 | */ | 196 | */ |
175 | @Override | 197 | @Override |
198 | public Modality getExists() { | ||
199 | return exists; | ||
200 | } | ||
201 | |||
202 | /** | ||
203 | * <!-- begin-user-doc --> | ||
204 | * <!-- end-user-doc --> | ||
205 | * @generated | ||
206 | */ | ||
207 | @Override | ||
208 | public void setExists(Modality newExists) { | ||
209 | Modality oldExists = exists; | ||
210 | exists = newExists == null ? EXISTS_EDEFAULT : newExists; | ||
211 | if (eNotificationRequired()) | ||
212 | eNotify(new ENotificationImpl(this, Notification.SET, CftPackage.CONNECTION__EXISTS, oldExists, exists)); | ||
213 | } | ||
214 | |||
215 | /** | ||
216 | * <!-- begin-user-doc --> | ||
217 | * <!-- end-user-doc --> | ||
218 | * @generated | ||
219 | */ | ||
220 | @Override | ||
176 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { | 221 | public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { |
177 | switch (featureID) { | 222 | switch (featureID) { |
178 | case CftPackage.CONNECTION__INPUT: | 223 | case CftPackage.CONNECTION__INPUT: |
@@ -225,6 +270,8 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn | |||
225 | @Override | 270 | @Override |
226 | public Object eGet(int featureID, boolean resolve, boolean coreType) { | 271 | public Object eGet(int featureID, boolean resolve, boolean coreType) { |
227 | switch (featureID) { | 272 | switch (featureID) { |
273 | case CftPackage.CONNECTION__EXISTS: | ||
274 | return getExists(); | ||
228 | case CftPackage.CONNECTION__INPUT: | 275 | case CftPackage.CONNECTION__INPUT: |
229 | return getInput(); | 276 | return getInput(); |
230 | case CftPackage.CONNECTION__OUTPUT: | 277 | case CftPackage.CONNECTION__OUTPUT: |
@@ -242,6 +289,9 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn | |||
242 | @Override | 289 | @Override |
243 | public void eSet(int featureID, Object newValue) { | 290 | public void eSet(int featureID, Object newValue) { |
244 | switch (featureID) { | 291 | switch (featureID) { |
292 | case CftPackage.CONNECTION__EXISTS: | ||
293 | setExists((Modality)newValue); | ||
294 | return; | ||
245 | case CftPackage.CONNECTION__INPUT: | 295 | case CftPackage.CONNECTION__INPUT: |
246 | setInput((Input)newValue); | 296 | setInput((Input)newValue); |
247 | return; | 297 | return; |
@@ -260,6 +310,9 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn | |||
260 | @Override | 310 | @Override |
261 | public void eUnset(int featureID) { | 311 | public void eUnset(int featureID) { |
262 | switch (featureID) { | 312 | switch (featureID) { |
313 | case CftPackage.CONNECTION__EXISTS: | ||
314 | setExists(EXISTS_EDEFAULT); | ||
315 | return; | ||
263 | case CftPackage.CONNECTION__INPUT: | 316 | case CftPackage.CONNECTION__INPUT: |
264 | setInput((Input)null); | 317 | setInput((Input)null); |
265 | return; | 318 | return; |
@@ -278,6 +331,8 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn | |||
278 | @Override | 331 | @Override |
279 | public boolean eIsSet(int featureID) { | 332 | public boolean eIsSet(int featureID) { |
280 | switch (featureID) { | 333 | switch (featureID) { |
334 | case CftPackage.CONNECTION__EXISTS: | ||
335 | return exists != EXISTS_EDEFAULT; | ||
281 | case CftPackage.CONNECTION__INPUT: | 336 | case CftPackage.CONNECTION__INPUT: |
282 | return getInput() != null; | 337 | return getInput() != null; |
283 | case CftPackage.CONNECTION__OUTPUT: | 338 | case CftPackage.CONNECTION__OUTPUT: |
@@ -286,4 +341,20 @@ public class ConnectionImpl extends MinimalEObjectImpl.Container implements Conn | |||
286 | return super.eIsSet(featureID); | 341 | return super.eIsSet(featureID); |
287 | } | 342 | } |
288 | 343 | ||
344 | /** | ||
345 | * <!-- begin-user-doc --> | ||
346 | * <!-- end-user-doc --> | ||
347 | * @generated | ||
348 | */ | ||
349 | @Override | ||
350 | public String toString() { | ||
351 | if (eIsProxy()) return super.toString(); | ||
352 | |||
353 | StringBuilder result = new StringBuilder(super.toString()); | ||
354 | result.append(" (exists: "); | ||
355 | result.append(exists); | ||
356 | result.append(')'); | ||
357 | return result.toString(); | ||
358 | } | ||
359 | |||
289 | } //ConnectionImpl | 360 | } //ConnectionImpl |
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 e3a40888..f5d3bf83 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 | |||
@@ -124,6 +124,10 @@ public class CftAdapterFactory extends AdapterFactoryImpl { | |||
124 | return createConnectionAdapter(); | 124 | return createConnectionAdapter(); |
125 | } | 125 | } |
126 | @Override | 126 | @Override |
127 | public Adapter caseModalElement(ModalElement object) { | ||
128 | return createModalElementAdapter(); | ||
129 | } | ||
130 | @Override | ||
127 | public Adapter defaultCase(EObject object) { | 131 | public Adapter defaultCase(EObject object) { |
128 | return createEObjectAdapter(); | 132 | return createEObjectAdapter(); |
129 | } | 133 | } |
@@ -340,6 +344,20 @@ public class CftAdapterFactory extends AdapterFactoryImpl { | |||
340 | } | 344 | } |
341 | 345 | ||
342 | /** | 346 | /** |
347 | * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement <em>Modal Element</em>}'. | ||
348 | * <!-- begin-user-doc --> | ||
349 | * This default implementation returns null so that we can easily ignore cases; | ||
350 | * it's useful to ignore a case when inheritance will catch all the cases anyway. | ||
351 | * <!-- end-user-doc --> | ||
352 | * @return the new adapter. | ||
353 | * @see hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement | ||
354 | * @generated | ||
355 | */ | ||
356 | public Adapter createModalElementAdapter() { | ||
357 | return null; | ||
358 | } | ||
359 | |||
360 | /** | ||
343 | * Creates a new adapter for the default case. | 361 | * Creates a new adapter for the default case. |
344 | * <!-- begin-user-doc --> | 362 | * <!-- begin-user-doc --> |
345 | * This default implementation returns null. | 363 | * This default implementation returns null. |
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 e32d792b..3c5a4fd9 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 | |||
@@ -144,6 +144,7 @@ public class CftSwitch<T> extends Switch<T> { | |||
144 | case CftPackage.COMPONENT: { | 144 | case CftPackage.COMPONENT: { |
145 | Component component = (Component)theEObject; | 145 | Component component = (Component)theEObject; |
146 | T result = caseComponent(component); | 146 | T result = caseComponent(component); |
147 | if (result == null) result = caseModalElement(component); | ||
147 | if (result == null) result = defaultCase(theEObject); | 148 | if (result == null) result = defaultCase(theEObject); |
148 | return result; | 149 | return result; |
149 | } | 150 | } |
@@ -162,6 +163,13 @@ public class CftSwitch<T> extends Switch<T> { | |||
162 | case CftPackage.CONNECTION: { | 163 | case CftPackage.CONNECTION: { |
163 | Connection connection = (Connection)theEObject; | 164 | Connection connection = (Connection)theEObject; |
164 | T result = caseConnection(connection); | 165 | T result = caseConnection(connection); |
166 | if (result == null) result = caseModalElement(connection); | ||
167 | if (result == null) result = defaultCase(theEObject); | ||
168 | return result; | ||
169 | } | ||
170 | case CftPackage.MODAL_ELEMENT: { | ||
171 | ModalElement modalElement = (ModalElement)theEObject; | ||
172 | T result = caseModalElement(modalElement); | ||
165 | if (result == null) result = defaultCase(theEObject); | 173 | if (result == null) result = defaultCase(theEObject); |
166 | return result; | 174 | return result; |
167 | } | 175 | } |
@@ -380,6 +388,21 @@ public class CftSwitch<T> extends Switch<T> { | |||
380 | } | 388 | } |
381 | 389 | ||
382 | /** | 390 | /** |
391 | * Returns the result of interpreting the object as an instance of '<em>Modal Element</em>'. | ||
392 | * <!-- begin-user-doc --> | ||
393 | * This implementation returns null; | ||
394 | * returning a non-null result will terminate the switch. | ||
395 | * <!-- end-user-doc --> | ||
396 | * @param object the target of the switch. | ||
397 | * @return the result of interpreting the object as an instance of '<em>Modal Element</em>'. | ||
398 | * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) | ||
399 | * @generated | ||
400 | */ | ||
401 | public T caseModalElement(ModalElement object) { | ||
402 | return null; | ||
403 | } | ||
404 | |||
405 | /** | ||
383 | * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. | 406 | * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. |
384 | * <!-- begin-user-doc --> | 407 | * <!-- begin-user-doc --> |
385 | * This implementation returns null; | 408 | * This implementation returns null; |
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 2fc15d94..a843aeed 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 | |||
@@ -38,7 +38,7 @@ | |||
38 | <eStructuralFeatures xsi:type="ecore:EReference" name="topEvent" lowerBound="1" | 38 | <eStructuralFeatures xsi:type="ecore:EReference" name="topEvent" lowerBound="1" |
39 | eType="#//Output"/> | 39 | eType="#//Output"/> |
40 | </eClassifiers> | 40 | </eClassifiers> |
41 | <eClassifiers xsi:type="ecore:EClass" name="Component"> | 41 | <eClassifiers xsi:type="ecore:EClass" name="Component" eSuperTypes="#//ModalElement"> |
42 | <eStructuralFeatures xsi:type="ecore:EReference" name="inputs" upperBound="-1" | 42 | <eStructuralFeatures xsi:type="ecore:EReference" name="inputs" upperBound="-1" |
43 | eType="#//Input" containment="true" eOpposite="#//Input/component"/> | 43 | eType="#//Input" containment="true" eOpposite="#//Input/component"/> |
44 | <eStructuralFeatures xsi:type="ecore:EReference" name="outputs" upperBound="-1" | 44 | <eStructuralFeatures xsi:type="ecore:EReference" name="outputs" upperBound="-1" |
@@ -46,6 +46,8 @@ | |||
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 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/> |
49 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="multipleAllowed" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean" | ||
50 | defaultValueLiteral="false"/> | ||
49 | </eClassifiers> | 51 | </eClassifiers> |
50 | <eClassifiers xsi:type="ecore:EClass" name="Input"> | 52 | <eClassifiers xsi:type="ecore:EClass" name="Input"> |
51 | <eStructuralFeatures xsi:type="ecore:EReference" name="inputEvent" lowerBound="1" | 53 | <eStructuralFeatures xsi:type="ecore:EReference" name="inputEvent" lowerBound="1" |
@@ -63,10 +65,19 @@ | |||
63 | <eStructuralFeatures xsi:type="ecore:EReference" name="component" lowerBound="1" | 65 | <eStructuralFeatures xsi:type="ecore:EReference" name="component" lowerBound="1" |
64 | eType="#//Component" eOpposite="#//Component/outputs"/> | 66 | eType="#//Component" eOpposite="#//Component/outputs"/> |
65 | </eClassifiers> | 67 | </eClassifiers> |
66 | <eClassifiers xsi:type="ecore:EClass" name="Connection"> | 68 | <eClassifiers xsi:type="ecore:EClass" name="Connection" eSuperTypes="#//ModalElement"> |
67 | <eStructuralFeatures xsi:type="ecore:EReference" name="input" lowerBound="1" eType="#//Input" | 69 | <eStructuralFeatures xsi:type="ecore:EReference" name="input" lowerBound="1" eType="#//Input" |
68 | eOpposite="#//Input/incomingConnections"/> | 70 | eOpposite="#//Input/incomingConnections"/> |
69 | <eStructuralFeatures xsi:type="ecore:EReference" name="output" lowerBound="1" | 71 | <eStructuralFeatures xsi:type="ecore:EReference" name="output" lowerBound="1" |
70 | eType="#//Output" eOpposite="#//Output/outgoingConnections"/> | 72 | eType="#//Output" eOpposite="#//Output/outgoingConnections"/> |
71 | </eClassifiers> | 73 | </eClassifiers> |
74 | <eClassifiers xsi:type="ecore:EEnum" name="Modality"> | ||
75 | <eLiterals name="MAY"/> | ||
76 | <eLiterals name="CURRENT" value="1"/> | ||
77 | <eLiterals name="MUST" value="2"/> | ||
78 | </eClassifiers> | ||
79 | <eClassifiers xsi:type="ecore:EClass" name="ModalElement" abstract="true" interface="true"> | ||
80 | <eStructuralFeatures xsi:type="ecore:EAttribute" name="exists" eType="#//Modality" | ||
81 | defaultValueLiteral="MUST"/> | ||
82 | </eClassifiers> | ||
72 | </ecore:EPackage> | 83 | </ecore:EPackage> |
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 635a2f46..3cdc93c4 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 | |||
@@ -7,6 +7,11 @@ | |||
7 | <foreignModel>cft.ecore</foreignModel> | 7 | <foreignModel>cft.ecore</foreignModel> |
8 | <genPackages prefix="Cft" basePackage="hu.bme.mit.inf.dslreasoner.faulttree.model" | 8 | <genPackages prefix="Cft" basePackage="hu.bme.mit.inf.dslreasoner.faulttree.model" |
9 | disposableProviderFactory="true" ecorePackage="cft.ecore#/"> | 9 | disposableProviderFactory="true" ecorePackage="cft.ecore#/"> |
10 | <genEnums typeSafeEnumCompatible="false" ecoreEnum="cft.ecore#//Modality"> | ||
11 | <genEnumLiterals ecoreEnumLiteral="cft.ecore#//Modality/MAY"/> | ||
12 | <genEnumLiterals ecoreEnumLiteral="cft.ecore#//Modality/CURRENT"/> | ||
13 | <genEnumLiterals ecoreEnumLiteral="cft.ecore#//Modality/MUST"/> | ||
14 | </genEnums> | ||
10 | <genClasses ecoreClass="cft.ecore#//ComponentDefinition"> | 15 | <genClasses ecoreClass="cft.ecore#//ComponentDefinition"> |
11 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//ComponentDefinition/inputEvents"/> | 16 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//ComponentDefinition/inputEvents"/> |
12 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//ComponentDefinition/eventDefinitions"/> | 17 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//ComponentDefinition/eventDefinitions"/> |
@@ -41,6 +46,7 @@ | |||
41 | <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference cft.ecore#//Component/outputs"/> | 46 | <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"/> | 47 | <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"/> | 48 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute cft.ecore#//Component/name"/> |
49 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute cft.ecore#//Component/multipleAllowed"/> | ||
44 | </genClasses> | 50 | </genClasses> |
45 | <genClasses ecoreClass="cft.ecore#//Input"> | 51 | <genClasses ecoreClass="cft.ecore#//Input"> |
46 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference cft.ecore#//Input/inputEvent"/> | 52 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference cft.ecore#//Input/inputEvent"/> |
@@ -56,5 +62,8 @@ | |||
56 | <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference cft.ecore#//Connection/input"/> | 62 | <genFeatures property="None" notify="false" createChild="false" ecoreFeature="ecore:EReference cft.ecore#//Connection/input"/> |
57 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference cft.ecore#//Connection/output"/> | 63 | <genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference cft.ecore#//Connection/output"/> |
58 | </genClasses> | 64 | </genClasses> |
65 | <genClasses ecoreClass="cft.ecore#//ModalElement"> | ||
66 | <genFeatures createChild="false" ecoreFeature="ecore:EAttribute cft.ecore#//ModalElement/exists"/> | ||
67 | </genClasses> | ||
59 | </genPackages> | 68 | </genPackages> |
60 | </genmodel:GenModel> | 69 | </genmodel:GenModel> |
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 16bc44f2..edd5ed20 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/representations.aird +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/representations.aird | |||
@@ -6,6 +6,7 @@ | |||
6 | <semanticResources>model/ft.genmodel</semanticResources> | 6 | <semanticResources>model/ft.genmodel</semanticResources> |
7 | <semanticResources>http://www.eclipse.org/emf/2002/Ecore</semanticResources> | 7 | <semanticResources>http://www.eclipse.org/emf/2002/Ecore</semanticResources> |
8 | <semanticResources>model/cft.genmodel</semanticResources> | 8 | <semanticResources>model/cft.genmodel</semanticResources> |
9 | <semanticResources>src/hu/bme/mit/inf/dslreasoner/faulttree/model/util/CftExtensions.xtend</semanticResources> | ||
9 | <ownedViews xmi:type="viewpoint:DView" uid="_WH8IYCoZEemQnOUhg0mU1A"> | 10 | <ownedViews xmi:type="viewpoint:DView" uid="_WH8IYCoZEemQnOUhg0mU1A"> |
10 | <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/> | 11 | <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/> |
11 | <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_XdtogyoZEemQnOUhg0mU1A" name="cft class diagram" repPath="#_XdoI8CoZEemQnOUhg0mU1A"> | 12 | <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_XdtogyoZEemQnOUhg0mU1A" name="cft class diagram" repPath="#_XdoI8CoZEemQnOUhg0mU1A"> |
@@ -189,11 +190,15 @@ | |||
189 | <styles xmi:type="notation:FontStyle" xmi:id="_sNmcQSr7EemQnOUhg0mU1A" fontColor="2697711" fontName="Cantarell" fontHeight="8"/> | 190 | <styles xmi:type="notation:FontStyle" xmi:id="_sNmcQSr7EemQnOUhg0mU1A" fontColor="2697711" fontName="Cantarell" fontHeight="8"/> |
190 | <layoutConstraint xmi:type="notation:Location" xmi:id="_sNmcQir7EemQnOUhg0mU1A"/> | 191 | <layoutConstraint xmi:type="notation:Location" xmi:id="_sNmcQir7EemQnOUhg0mU1A"/> |
191 | </children> | 192 | </children> |
193 | <children xmi:type="notation:Node" xmi:id="_ODc_QD_rEem15JHY3tVwwA" type="3010" element="_ODSAID_rEem15JHY3tVwwA"> | ||
194 | <styles xmi:type="notation:FontStyle" xmi:id="_ODc_QT_rEem15JHY3tVwwA" fontColor="2697711" fontName="Cantarell" fontHeight="8"/> | ||
195 | <layoutConstraint xmi:type="notation:Location" xmi:id="_ODc_Qj_rEem15JHY3tVwwA"/> | ||
196 | </children> | ||
192 | <styles xmi:type="notation:SortingStyle" xmi:id="_bLbyRSorEemQnOUhg0mU1A"/> | 197 | <styles xmi:type="notation:SortingStyle" xmi:id="_bLbyRSorEemQnOUhg0mU1A"/> |
193 | <styles xmi:type="notation:FilteringStyle" xmi:id="_bLbyRiorEemQnOUhg0mU1A"/> | 198 | <styles xmi:type="notation:FilteringStyle" xmi:id="_bLbyRiorEemQnOUhg0mU1A"/> |
194 | </children> | 199 | </children> |
195 | <styles xmi:type="notation:ShapeStyle" xmi:id="_bLbyQSorEemQnOUhg0mU1A" fontName="Cantarell" fontHeight="8"/> | 200 | <styles xmi:type="notation:ShapeStyle" xmi:id="_bLbyQSorEemQnOUhg0mU1A" fontName="Cantarell" fontHeight="8"/> |
196 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bLbyQiorEemQnOUhg0mU1A" x="858" y="195" width="120" height="100"/> | 201 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_bLbyQiorEemQnOUhg0mU1A" x="845" y="195" width="146" height="100"/> |
197 | </children> | 202 | </children> |
198 | <children xmi:type="notation:Node" xmi:id="_mUP5wCorEemQnOUhg0mU1A" type="2003" element="_mUETkCorEemQnOUhg0mU1A"> | 203 | <children xmi:type="notation:Node" xmi:id="_mUP5wCorEemQnOUhg0mU1A" type="2003" element="_mUETkCorEemQnOUhg0mU1A"> |
199 | <children xmi:type="notation:Node" xmi:id="_mUP5wyorEemQnOUhg0mU1A" type="5007"/> | 204 | <children xmi:type="notation:Node" xmi:id="_mUP5wyorEemQnOUhg0mU1A" type="5007"/> |
@@ -222,6 +227,40 @@ | |||
222 | <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4VWMSosEemQnOUhg0mU1A" fontName="Cantarell" fontHeight="8"/> | 227 | <styles xmi:type="notation:ShapeStyle" xmi:id="_Z4VWMSosEemQnOUhg0mU1A" fontName="Cantarell" fontHeight="8"/> |
223 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4VWMiosEemQnOUhg0mU1A" x="767" y="617" width="120" height="100"/> | 228 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Z4VWMiosEemQnOUhg0mU1A" x="767" y="617" width="120" height="100"/> |
224 | </children> | 229 | </children> |
230 | <children xmi:type="notation:Node" xmi:id="_ePcnwEAiEemLn8qDUFXPRg" type="2003" element="_ePE0UEAiEemLn8qDUFXPRg"> | ||
231 | <children xmi:type="notation:Node" xmi:id="_ePfrEEAiEemLn8qDUFXPRg" type="5007"/> | ||
232 | <children xmi:type="notation:Node" xmi:id="_ePgSIEAiEemLn8qDUFXPRg" type="7004"> | ||
233 | <children xmi:type="notation:Node" xmi:id="_iIrjIEAiEemLn8qDUFXPRg" type="3010" element="_iIadYEAiEemLn8qDUFXPRg"> | ||
234 | <styles xmi:type="notation:FontStyle" xmi:id="_iIrjIUAiEemLn8qDUFXPRg" fontName="Cantarell" fontHeight="8"/> | ||
235 | <layoutConstraint xmi:type="notation:Location" xmi:id="_iIrjIkAiEemLn8qDUFXPRg"/> | ||
236 | </children> | ||
237 | <children xmi:type="notation:Node" xmi:id="_jjjlsEAiEemLn8qDUFXPRg" type="3010" element="_jjXYcEAiEemLn8qDUFXPRg"> | ||
238 | <styles xmi:type="notation:FontStyle" xmi:id="_jjjlsUAiEemLn8qDUFXPRg" fontName="Cantarell" fontHeight="8"/> | ||
239 | <layoutConstraint xmi:type="notation:Location" xmi:id="_jjjlskAiEemLn8qDUFXPRg"/> | ||
240 | </children> | ||
241 | <children xmi:type="notation:Node" xmi:id="_kE3jAEAiEemLn8qDUFXPRg" type="3010" element="_kEmdQEAiEemLn8qDUFXPRg"> | ||
242 | <styles xmi:type="notation:FontStyle" xmi:id="_kE3jAUAiEemLn8qDUFXPRg" fontName="Cantarell" fontHeight="8"/> | ||
243 | <layoutConstraint xmi:type="notation:Location" xmi:id="_kE3jAkAiEemLn8qDUFXPRg"/> | ||
244 | </children> | ||
245 | <styles xmi:type="notation:SortingStyle" xmi:id="_ePgSIUAiEemLn8qDUFXPRg"/> | ||
246 | <styles xmi:type="notation:FilteringStyle" xmi:id="_ePgSIkAiEemLn8qDUFXPRg"/> | ||
247 | </children> | ||
248 | <styles xmi:type="notation:ShapeStyle" xmi:id="_ePcnwUAiEemLn8qDUFXPRg" fontName="Cantarell" fontHeight="8"/> | ||
249 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ePcnwkAiEemLn8qDUFXPRg" x="481" y="26" width="120" height="100"/> | ||
250 | </children> | ||
251 | <children xmi:type="notation:Node" xmi:id="_o4GhIEAlEemLn8qDUFXPRg" type="2003" element="_o39XMEAlEemLn8qDUFXPRg"> | ||
252 | <children xmi:type="notation:Node" xmi:id="_o4HIMEAlEemLn8qDUFXPRg" type="5007"/> | ||
253 | <children xmi:type="notation:Node" xmi:id="_o4HIMUAlEemLn8qDUFXPRg" type="7004"> | ||
254 | <children xmi:type="notation:Node" xmi:id="_fUbWAEAmEemLn8qDUFXPRg" type="3010" element="_fUKQQUAmEemLn8qDUFXPRg"> | ||
255 | <styles xmi:type="notation:FontStyle" xmi:id="_fUbWAUAmEemLn8qDUFXPRg" fontName="Cantarell" fontHeight="8"/> | ||
256 | <layoutConstraint xmi:type="notation:Location" xmi:id="_fUbWAkAmEemLn8qDUFXPRg"/> | ||
257 | </children> | ||
258 | <styles xmi:type="notation:SortingStyle" xmi:id="_o4HIMkAlEemLn8qDUFXPRg"/> | ||
259 | <styles xmi:type="notation:FilteringStyle" xmi:id="_o4HIM0AlEemLn8qDUFXPRg"/> | ||
260 | </children> | ||
261 | <styles xmi:type="notation:ShapeStyle" xmi:id="_o4GhIUAlEemLn8qDUFXPRg" fontName="Cantarell" fontHeight="8"/> | ||
262 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_o4GhIkAlEemLn8qDUFXPRg" x="663" y="26" width="120" height="100"/> | ||
263 | </children> | ||
225 | <styles xmi:type="notation:DiagramStyle" xmi:id="_XduPkioZEemQnOUhg0mU1A"/> | 264 | <styles xmi:type="notation:DiagramStyle" xmi:id="_XduPkioZEemQnOUhg0mU1A"/> |
226 | <edges xmi:type="notation:Edge" xmi:id="_F_1fkCodEemQnOUhg0mU1A" type="4001" element="_F_tjwCodEemQnOUhg0mU1A" source="_D1vmkCodEemQnOUhg0mU1A" target="_cTz0wCoZEemQnOUhg0mU1A"> | 265 | <edges xmi:type="notation:Edge" xmi:id="_F_1fkCodEemQnOUhg0mU1A" type="4001" element="_F_tjwCodEemQnOUhg0mU1A" source="_D1vmkCodEemQnOUhg0mU1A" target="_cTz0wCoZEemQnOUhg0mU1A"> |
227 | <children xmi:type="notation:Node" xmi:id="_F_1flCodEemQnOUhg0mU1A" type="6001"> | 266 | <children xmi:type="notation:Node" xmi:id="_F_1flCodEemQnOUhg0mU1A" type="6001"> |
@@ -429,7 +468,7 @@ | |||
429 | <styles xmi:type="notation:FontStyle" xmi:id="_dgch0iorEemQnOUhg0mU1A" fontColor="7490599" fontName="Cantarell" fontHeight="8"/> | 468 | <styles xmi:type="notation:FontStyle" xmi:id="_dgch0iorEemQnOUhg0mU1A" fontColor="7490599" fontName="Cantarell" fontHeight="8"/> |
430 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_dgch0yorEemQnOUhg0mU1A" points="[39, 0, 39, -71]$[39, 71, 39, 0]"/> | 469 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_dgch0yorEemQnOUhg0mU1A" points="[39, 0, 39, -71]$[39, 71, 39, 0]"/> |
431 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dgdI4CorEemQnOUhg0mU1A" id="(0.2708333333333333,1.0)"/> | 470 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dgdI4CorEemQnOUhg0mU1A" id="(0.2708333333333333,1.0)"/> |
432 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dgdI4SorEemQnOUhg0mU1A" id="(0.22033898305084745,0.0)"/> | 471 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_dgdI4SorEemQnOUhg0mU1A" id="(0.27083333333333337,0.0)"/> |
433 | </edges> | 472 | </edges> |
434 | <edges xmi:type="notation:Edge" xmi:id="_Ek3YkCosEemQnOUhg0mU1A" type="4001" element="_EktnnCosEemQnOUhg0mU1A" source="_WnAk0CorEemQnOUhg0mU1A" target="_nyhOkCorEemQnOUhg0mU1A"> | 473 | <edges xmi:type="notation:Edge" xmi:id="_Ek3YkCosEemQnOUhg0mU1A" type="4001" element="_EktnnCosEemQnOUhg0mU1A" source="_WnAk0CorEemQnOUhg0mU1A" target="_nyhOkCorEemQnOUhg0mU1A"> |
435 | <children xmi:type="notation:Node" xmi:id="_Ek3YlCosEemQnOUhg0mU1A" type="6001"> | 474 | <children xmi:type="notation:Node" xmi:id="_Ek3YlCosEemQnOUhg0mU1A" type="6001"> |
@@ -460,7 +499,7 @@ | |||
460 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_Ky7dUSosEemQnOUhg0mU1A" routing="Rectilinear"/> | 499 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_Ky7dUSosEemQnOUhg0mU1A" routing="Rectilinear"/> |
461 | <styles xmi:type="notation:FontStyle" xmi:id="_Ky7dUiosEemQnOUhg0mU1A" fontColor="7490599" fontName="Cantarell" fontHeight="8"/> | 500 | <styles xmi:type="notation:FontStyle" xmi:id="_Ky7dUiosEemQnOUhg0mU1A" fontColor="7490599" fontName="Cantarell" fontHeight="8"/> |
462 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Ky7dUyosEemQnOUhg0mU1A" points="[0, 0, 558, 0]$[-558, 0, 0, 0]"/> | 501 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Ky7dUyosEemQnOUhg0mU1A" points="[0, 0, 558, 0]$[-558, 0, 0, 0]"/> |
463 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ky8EZiosEemQnOUhg0mU1A" id="(0.0,0.4897959183673469)"/> | 502 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ky8EZiosEemQnOUhg0mU1A" id="(0.0902777777777778,0.4897959183673469)"/> |
464 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ky8EZyosEemQnOUhg0mU1A" id="(1.0,0.4897959183673469)"/> | 503 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Ky8EZyosEemQnOUhg0mU1A" id="(1.0,0.4897959183673469)"/> |
465 | </edges> | 504 | </edges> |
466 | <edges xmi:type="notation:Edge" xmi:id="_QheUgCosEemQnOUhg0mU1A" type="4001" element="_QhSuYiosEemQnOUhg0mU1A" source="_nyhOkCorEemQnOUhg0mU1A" target="_QEEkoCodEemQnOUhg0mU1A"> | 505 | <edges xmi:type="notation:Edge" xmi:id="_QheUgCosEemQnOUhg0mU1A" type="4001" element="_QhSuYiosEemQnOUhg0mU1A" source="_nyhOkCorEemQnOUhg0mU1A" target="_QEEkoCodEemQnOUhg0mU1A"> |
@@ -519,7 +558,7 @@ | |||
519 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uHLOESosEemQnOUhg0mU1A" x="5" y="-33"/> | 558 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uHLOESosEemQnOUhg0mU1A" x="5" y="-33"/> |
520 | </children> | 559 | </children> |
521 | <children xmi:type="notation:Node" xmi:id="_uHLOEiosEemQnOUhg0mU1A" type="6003"> | 560 | <children xmi:type="notation:Node" xmi:id="_uHLOEiosEemQnOUhg0mU1A" type="6003"> |
522 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uHLOEyosEemQnOUhg0mU1A" x="-15" y="74"/> | 561 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uHLOEyosEemQnOUhg0mU1A" x="-2" y="-69"/> |
523 | </children> | 562 | </children> |
524 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_uHKnASosEemQnOUhg0mU1A" routing="Rectilinear"/> | 563 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_uHKnASosEemQnOUhg0mU1A" routing="Rectilinear"/> |
525 | <styles xmi:type="notation:FontStyle" xmi:id="_uHKnAiosEemQnOUhg0mU1A" fontName="Cantarell" fontHeight="8"/> | 564 | <styles xmi:type="notation:FontStyle" xmi:id="_uHKnAiosEemQnOUhg0mU1A" fontName="Cantarell" fontHeight="8"/> |
@@ -559,6 +598,38 @@ | |||
559 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6ZXYdiosEemQnOUhg0mU1A" id="(0.5,0.5)"/> | 598 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6ZXYdiosEemQnOUhg0mU1A" id="(0.5,0.5)"/> |
560 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6ZXYdyosEemQnOUhg0mU1A" id="(0.5,0.5)"/> | 599 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6ZXYdyosEemQnOUhg0mU1A" id="(0.5,0.5)"/> |
561 | </edges> | 600 | </edges> |
601 | <edges xmi:type="notation:Edge" xmi:id="_hntnQEAmEemLn8qDUFXPRg" type="4001" element="_hniBOkAmEemLn8qDUFXPRg" source="_bLbyQCorEemQnOUhg0mU1A" target="_o4GhIEAlEemLn8qDUFXPRg"> | ||
602 | <children xmi:type="notation:Node" xmi:id="_hnu1YEAmEemLn8qDUFXPRg" type="6001"> | ||
603 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hnu1YUAmEemLn8qDUFXPRg" y="-10"/> | ||
604 | </children> | ||
605 | <children xmi:type="notation:Node" xmi:id="_hnvccEAmEemLn8qDUFXPRg" type="6002"> | ||
606 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hnvccUAmEemLn8qDUFXPRg" y="10"/> | ||
607 | </children> | ||
608 | <children xmi:type="notation:Node" xmi:id="_hnvcckAmEemLn8qDUFXPRg" type="6003"> | ||
609 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hnvcc0AmEemLn8qDUFXPRg" y="10"/> | ||
610 | </children> | ||
611 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_hntnQUAmEemLn8qDUFXPRg" routing="Tree"/> | ||
612 | <styles xmi:type="notation:FontStyle" xmi:id="_hntnQkAmEemLn8qDUFXPRg" fontName="Cantarell" fontHeight="8"/> | ||
613 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_hntnQ0AmEemLn8qDUFXPRg" points="[0, 0, 129, 156]$[-129, -156, 0, 0]"/> | ||
614 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_hnwDgEAmEemLn8qDUFXPRg" id="(0.2708333333333333,0.0)"/> | ||
615 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_hnwDgUAmEemLn8qDUFXPRg" id="(0.5,0.5)"/> | ||
616 | </edges> | ||
617 | <edges xmi:type="notation:Edge" xmi:id="_jweDgEAmEemLn8qDUFXPRg" type="4001" element="_jwVguEAmEemLn8qDUFXPRg" source="_Z4VWMCosEemQnOUhg0mU1A" target="_o4GhIEAlEemLn8qDUFXPRg"> | ||
618 | <children xmi:type="notation:Node" xmi:id="_jweqkEAmEemLn8qDUFXPRg" type="6001"> | ||
619 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jweqkUAmEemLn8qDUFXPRg" y="-10"/> | ||
620 | </children> | ||
621 | <children xmi:type="notation:Node" xmi:id="_jweqkkAmEemLn8qDUFXPRg" type="6002"> | ||
622 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jweqk0AmEemLn8qDUFXPRg" y="10"/> | ||
623 | </children> | ||
624 | <children xmi:type="notation:Node" xmi:id="_jweqlEAmEemLn8qDUFXPRg" type="6003"> | ||
625 | <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jweqlUAmEemLn8qDUFXPRg" y="10"/> | ||
626 | </children> | ||
627 | <styles xmi:type="notation:ConnectorStyle" xmi:id="_jweDgUAmEemLn8qDUFXPRg" routing="Tree"/> | ||
628 | <styles xmi:type="notation:FontStyle" xmi:id="_jweDgkAmEemLn8qDUFXPRg" fontName="Cantarell" fontHeight="8"/> | ||
629 | <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_jweDg0AmEemLn8qDUFXPRg" points="[0, 0, 78, 493]$[-78, -493, 0, 0]"/> | ||
630 | <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_jweqlkAmEemLn8qDUFXPRg" id="(0.22033898305084745,0.0)"/> | ||
631 | <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_jweql0AmEemLn8qDUFXPRg" id="(0.5,0.5)"/> | ||
632 | </edges> | ||
562 | </data> | 633 | </data> |
563 | </ownedAnnotationEntries> | 634 | </ownedAnnotationEntries> |
564 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Zp_54CoZEemQnOUhg0mU1A" name="ComponentDefinition" tooltipText="" outgoingEdges="_lIWk0CofEemQnOUhg0mU1A _o7XjcCofEemQnOUhg0mU1A _vOuX4CofEemQnOUhg0mU1A" incomingEdges="_KyxFRiosEemQnOUhg0mU1A" width="12" height="10"> | 635 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Zp_54CoZEemQnOUhg0mU1A" name="ComponentDefinition" tooltipText="" outgoingEdges="_lIWk0CofEemQnOUhg0mU1A _o7XjcCofEemQnOUhg0mU1A _vOuX4CofEemQnOUhg0mU1A" incomingEdges="_KyxFRiosEemQnOUhg0mU1A" width="12" height="10"> |
@@ -874,13 +945,13 @@ | |||
874 | </ownedStyle> | 945 | </ownedStyle> |
875 | <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']"/> | 946 | <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']"/> |
876 | </ownedDiagramElements> | 947 | </ownedDiagramElements> |
877 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_bLPlACorEemQnOUhg0mU1A" name="Component" tooltipText="" outgoingEdges="_KyxFRiosEemQnOUhg0mU1A _eyVLBiosEemQnOUhg0mU1A _6ZNAkCosEemQnOUhg0mU1A" incomingEdges="_dgSJ2CorEemQnOUhg0mU1A" width="12" height="10"> | 948 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_bLPlACorEemQnOUhg0mU1A" name="Component" tooltipText="" outgoingEdges="_KyxFRiosEemQnOUhg0mU1A _eyVLBiosEemQnOUhg0mU1A _6ZNAkCosEemQnOUhg0mU1A _hniBOkAmEemLn8qDUFXPRg" incomingEdges="_dgSJ2CorEemQnOUhg0mU1A" width="12" height="10"> |
878 | <target xmi:type="ecore:EClass" href="model/cft.ecore#//Component"/> | 949 | <target xmi:type="ecore:EClass" href="model/cft.ecore#//Component"/> |
879 | <semanticElements xmi:type="ecore:EClass" href="model/cft.ecore#//Component"/> | 950 | <semanticElements xmi:type="ecore:EClass" href="model/cft.ecore#//Component"/> |
880 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 951 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
881 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | 952 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> |
882 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | 953 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> |
883 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_s21mjCr7EemQnOUhg0mU1A" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | 954 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_OwTeMT_rEem15JHY3tVwwA" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> |
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"/> | 955 | <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"/> |
885 | </ownedStyle> | 956 | </ownedStyle> |
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']"/> | 957 | <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']"/> |
@@ -892,6 +963,14 @@ | |||
892 | </ownedStyle> | 963 | </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']"/> | 964 | <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> | 965 | </ownedElements> |
966 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_ODSAID_rEem15JHY3tVwwA" name="multipleAllowed : EBoolean = false" tooltipText=""> | ||
967 | <target xmi:type="ecore:EAttribute" href="model/cft.ecore#//Component/multipleAllowed"/> | ||
968 | <semanticElements xmi:type="ecore:EAttribute" href="model/cft.ecore#//Component/multipleAllowed"/> | ||
969 | <ownedStyle xmi:type="diagram:BundledImage" uid="_OwUsVT_rEem15JHY3tVwwA" labelAlignment="LEFT"> | ||
970 | <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"/> | ||
971 | </ownedStyle> | ||
972 | <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']"/> | ||
973 | </ownedElements> | ||
895 | </ownedDiagramElements> | 974 | </ownedDiagramElements> |
896 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_dgSJ2CorEemQnOUhg0mU1A" name="[0..*] components" sourceNode="_Wm0XkCorEemQnOUhg0mU1A" targetNode="_bLPlACorEemQnOUhg0mU1A"> | 975 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_dgSJ2CorEemQnOUhg0mU1A" name="[0..*] components" sourceNode="_Wm0XkCorEemQnOUhg0mU1A" targetNode="_bLPlACorEemQnOUhg0mU1A"> |
897 | <target xmi:type="ecore:EReference" href="model/cft.ecore#//ComponentFaultTree/components"/> | 976 | <target xmi:type="ecore:EReference" href="model/cft.ecore#//ComponentFaultTree/components"/> |
@@ -923,7 +1002,7 @@ | |||
923 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 1002 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
924 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | 1003 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> |
925 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | 1004 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> |
926 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_nyWPcSorEemQnOUhg0mU1A" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | 1005 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_M4H0nT_rEem15JHY3tVwwA" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> |
927 | <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"/> | 1006 | <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"/> |
928 | </ownedStyle> | 1007 | </ownedStyle> |
929 | <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']"/> | 1008 | <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']"/> |
@@ -972,13 +1051,13 @@ | |||
972 | </ownedStyle> | 1051 | </ownedStyle> |
973 | <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']"/> | 1052 | <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']"/> |
974 | </ownedDiagramElements> | 1053 | </ownedDiagramElements> |
975 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Z4MMQCosEemQnOUhg0mU1A" name="Connection" tooltipText="" incomingEdges="_uHA2EiosEemQnOUhg0mU1A _ykJIrCosEemQnOUhg0mU1A" width="12" height="10"> | 1054 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_Z4MMQCosEemQnOUhg0mU1A" name="Connection" tooltipText="" outgoingEdges="_jwVguEAmEemLn8qDUFXPRg" incomingEdges="_uHA2EiosEemQnOUhg0mU1A _ykJIrCosEemQnOUhg0mU1A" width="12" height="10"> |
976 | <target xmi:type="ecore:EClass" href="model/cft.ecore#//Connection"/> | 1055 | <target xmi:type="ecore:EClass" href="model/cft.ecore#//Connection"/> |
977 | <semanticElements xmi:type="ecore:EClass" href="model/cft.ecore#//Connection"/> | 1056 | <semanticElements xmi:type="ecore:EClass" href="model/cft.ecore#//Connection"/> |
978 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | 1057 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> |
979 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | 1058 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> |
980 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | 1059 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> |
981 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_Z4MMQSosEemQnOUhg0mU1A" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> | 1060 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_-03UZUAaEemLn8qDUFXPRg" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> |
982 | <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"/> | 1061 | <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"/> |
983 | </ownedStyle> | 1062 | </ownedStyle> |
984 | <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']"/> | 1063 | <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']"/> |
@@ -1024,6 +1103,85 @@ | |||
1024 | </ownedStyle> | 1103 | </ownedStyle> |
1025 | <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='Bi-directional%20EC_EReference%20']"/> | 1104 | <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='Bi-directional%20EC_EReference%20']"/> |
1026 | </ownedDiagramElements> | 1105 | </ownedDiagramElements> |
1106 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_ePE0UEAiEemLn8qDUFXPRg" name="Modality" tooltipText="" width="12" height="10"> | ||
1107 | <target xmi:type="ecore:EEnum" href="model/cft.ecore#//Modality"/> | ||
1108 | <semanticElements xmi:type="ecore:EEnum" href="model/cft.ecore#//Modality"/> | ||
1109 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
1110 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
1111 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
1112 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_ePE0UUAiEemLn8qDUFXPRg" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="221,236,202"> | ||
1113 | <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%20EEnum']/@style"/> | ||
1114 | </ownedStyle> | ||
1115 | <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%20EEnum']"/> | ||
1116 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_iIadYEAiEemLn8qDUFXPRg" name="MAY" tooltipText=""> | ||
1117 | <target xmi:type="ecore:EEnumLiteral" href="model/cft.ecore#//Modality/MAY"/> | ||
1118 | <semanticElements xmi:type="ecore:EEnumLiteral" href="model/cft.ecore#//Modality/MAY"/> | ||
1119 | <ownedStyle xmi:type="diagram:BundledImage" uid="_iIbEcEAiEemLn8qDUFXPRg" labelAlignment="LEFT"> | ||
1120 | <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%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
1121 | </ownedStyle> | ||
1122 | <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%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
1123 | </ownedElements> | ||
1124 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_jjXYcEAiEemLn8qDUFXPRg" name="CURRENT" tooltipText=""> | ||
1125 | <target xmi:type="ecore:EEnumLiteral" href="model/cft.ecore#//Modality/CURRENT"/> | ||
1126 | <semanticElements xmi:type="ecore:EEnumLiteral" href="model/cft.ecore#//Modality/CURRENT"/> | ||
1127 | <ownedStyle xmi:type="diagram:BundledImage" uid="_jjXYcUAiEemLn8qDUFXPRg" labelAlignment="LEFT"> | ||
1128 | <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%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
1129 | </ownedStyle> | ||
1130 | <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%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
1131 | </ownedElements> | ||
1132 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_kEmdQEAiEemLn8qDUFXPRg" name="MUST" tooltipText=""> | ||
1133 | <target xmi:type="ecore:EEnumLiteral" href="model/cft.ecore#//Modality/MUST"/> | ||
1134 | <semanticElements xmi:type="ecore:EEnumLiteral" href="model/cft.ecore#//Modality/MUST"/> | ||
1135 | <ownedStyle xmi:type="diagram:BundledImage" uid="_kEnEUEAiEemLn8qDUFXPRg" labelAlignment="LEFT"> | ||
1136 | <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%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/> | ||
1137 | </ownedStyle> | ||
1138 | <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%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/> | ||
1139 | </ownedElements> | ||
1140 | </ownedDiagramElements> | ||
1141 | <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_o39XMEAlEemLn8qDUFXPRg" name="ModalElement" tooltipText="" incomingEdges="_hniBOkAmEemLn8qDUFXPRg _jwVguEAmEemLn8qDUFXPRg" width="12" height="10"> | ||
1142 | <target xmi:type="ecore:EClass" href="model/cft.ecore#//ModalElement"/> | ||
1143 | <semanticElements xmi:type="ecore:EClass" href="model/cft.ecore#//ModalElement"/> | ||
1144 | <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> | ||
1145 | <arrangeConstraints>KEEP_SIZE</arrangeConstraints> | ||
1146 | <arrangeConstraints>KEEP_RATIO</arrangeConstraints> | ||
1147 | <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_qKn4-UAlEemLn8qDUFXPRg" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_interface.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="228,228,228"> | ||
1148 | <labelFormat>italic</labelFormat> | ||
1149 | <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']/@conditionnalStyles.0/@style"/> | ||
1150 | </ownedStyle> | ||
1151 | <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']"/> | ||
1152 | <ownedElements xmi:type="diagram:DNodeListElement" uid="_fUKQQUAmEemLn8qDUFXPRg" name="exists : Modality = MUST" tooltipText=""> | ||
1153 | <target xmi:type="ecore:EAttribute" href="model/cft.ecore#//ModalElement/exists"/> | ||
1154 | <semanticElements xmi:type="ecore:EAttribute" href="model/cft.ecore#//ModalElement/exists"/> | ||
1155 | <ownedStyle xmi:type="diagram:BundledImage" uid="_fUK3UEAmEemLn8qDUFXPRg" labelAlignment="LEFT"> | ||
1156 | <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"/> | ||
1157 | </ownedStyle> | ||
1158 | <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']"/> | ||
1159 | </ownedElements> | ||
1160 | </ownedDiagramElements> | ||
1161 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_hniBOkAmEemLn8qDUFXPRg" sourceNode="_bLPlACorEemQnOUhg0mU1A" targetNode="_o39XMEAlEemLn8qDUFXPRg"> | ||
1162 | <target xmi:type="ecore:EClass" href="model/cft.ecore#//Component"/> | ||
1163 | <semanticElements xmi:type="ecore:EClass" href="model/cft.ecore#//Component"/> | ||
1164 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_hnioIEAmEemLn8qDUFXPRg" lineStyle="dash" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
1165 | <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']/@conditionnalStyles.0/@style"/> | ||
1166 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_hnioIUAmEemLn8qDUFXPRg" showIcon="false"> | ||
1167 | <labelFormat>italic</labelFormat> | ||
1168 | </beginLabelStyle> | ||
1169 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_hnioIkAmEemLn8qDUFXPRg" showIcon="false"/> | ||
1170 | </ownedStyle> | ||
1171 | <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']"/> | ||
1172 | </ownedDiagramElements> | ||
1173 | <ownedDiagramElements xmi:type="diagram:DEdge" uid="_jwVguEAmEemLn8qDUFXPRg" sourceNode="_Z4MMQCosEemQnOUhg0mU1A" targetNode="_o39XMEAlEemLn8qDUFXPRg"> | ||
1174 | <target xmi:type="ecore:EClass" href="model/cft.ecore#//Connection"/> | ||
1175 | <semanticElements xmi:type="ecore:EClass" href="model/cft.ecore#//Connection"/> | ||
1176 | <ownedStyle xmi:type="diagram:EdgeStyle" uid="_jwVguUAmEemLn8qDUFXPRg" lineStyle="dash" targetArrow="InputClosedArrow" routingStyle="tree"> | ||
1177 | <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']/@conditionnalStyles.0/@style"/> | ||
1178 | <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_jwVgukAmEemLn8qDUFXPRg" showIcon="false"> | ||
1179 | <labelFormat>italic</labelFormat> | ||
1180 | </beginLabelStyle> | ||
1181 | <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_jwVgu0AmEemLn8qDUFXPRg" showIcon="false"/> | ||
1182 | </ownedStyle> | ||
1183 | <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']"/> | ||
1184 | </ownedDiagramElements> | ||
1027 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> | 1185 | <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> |
1028 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_XdpXECoZEemQnOUhg0mU1A"/> | 1186 | <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_XdpXECoZEemQnOUhg0mU1A"/> |
1029 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> | 1187 | <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/src/hu/bme/mit/inf/dslreasoner/faulttree/model/util/CftExtensions.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/src/hu/bme/mit/inf/dslreasoner/faulttree/model/util/CftExtensions.xtend new file mode 100644 index 00000000..ddf2c266 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/src/hu/bme/mit/inf/dslreasoner/faulttree/model/util/CftExtensions.xtend | |||
@@ -0,0 +1,48 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.model.util | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality | ||
7 | |||
8 | final class CftExtensions { | ||
9 | private new() { | ||
10 | throw new IllegalStateException("This is a static utility class and should not be instantiated directly.") | ||
11 | } | ||
12 | |||
13 | static def isMoreConcreteThan(Modality newModality, Modality original) { | ||
14 | switch (original) { | ||
15 | case MAY: newModality != Modality.MAY | ||
16 | case CURRENT: newModality == Modality.MUST | ||
17 | case MUST: false | ||
18 | } | ||
19 | } | ||
20 | |||
21 | static def currentlyExists(ModalElement element) { | ||
22 | element.exists != Modality.MAY | ||
23 | } | ||
24 | |||
25 | static def mustExist(ModalElement element) { | ||
26 | element.exists == Modality.MUST | ||
27 | } | ||
28 | |||
29 | static def appearsExactlyOnce(Component componentInstance) { | ||
30 | componentInstance.mustExist && !componentInstance.multipleAllowed | ||
31 | } | ||
32 | |||
33 | /** | ||
34 | * Checks whether the connection and its target component are both currently present. | ||
35 | * | ||
36 | * A currently present connection without a present target component is a partial model error, | ||
37 | * so we throw an exception instead of returning <code>false</code>. | ||
38 | * | ||
39 | * @param connection The connection to check. | ||
40 | * @throws IllegalStateException When the target component is not currently present. | ||
41 | */ | ||
42 | static def isCurrentlyConnected(Connection connection) { | ||
43 | if (connection.output.component.currentlyExists) { | ||
44 | throw new IllegalStateException("Inconsistent partial model: current connection to a component that may not currently exist") | ||
45 | } | ||
46 | connection.currentlyExists | ||
47 | } | ||
48 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.CftExtensions.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.CftExtensions.xtendbin new file mode 100644 index 00000000..a6c01277 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.CftExtensions.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.gitignore new file mode 100644 index 00000000..945e2c6c --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.gitignore | |||
@@ -0,0 +1 @@ | |||
/.CftExtensions.java._trace | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/CftExtensions.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/CftExtensions.java new file mode 100644 index 00000000..dbc6b279 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/CftExtensions.java | |||
@@ -0,0 +1,69 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.model.util; | ||
2 | |||
3 | import com.google.common.base.Objects; | ||
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.ModalElement; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality; | ||
8 | |||
9 | @SuppressWarnings("all") | ||
10 | public final class CftExtensions { | ||
11 | private CftExtensions() { | ||
12 | throw new IllegalStateException("This is a static utility class and should not be instantiated directly."); | ||
13 | } | ||
14 | |||
15 | public static boolean isMoreConcreteThan(final Modality newModality, final Modality original) { | ||
16 | boolean _switchResult = false; | ||
17 | if (original != null) { | ||
18 | switch (original) { | ||
19 | case MAY: | ||
20 | _switchResult = (!Objects.equal(newModality, Modality.MAY)); | ||
21 | break; | ||
22 | case CURRENT: | ||
23 | _switchResult = Objects.equal(newModality, Modality.MUST); | ||
24 | break; | ||
25 | case MUST: | ||
26 | _switchResult = false; | ||
27 | break; | ||
28 | default: | ||
29 | break; | ||
30 | } | ||
31 | } | ||
32 | return _switchResult; | ||
33 | } | ||
34 | |||
35 | public static boolean currentlyExists(final ModalElement element) { | ||
36 | Modality _exists = element.getExists(); | ||
37 | return (!Objects.equal(_exists, Modality.MAY)); | ||
38 | } | ||
39 | |||
40 | public static boolean mustExist(final ModalElement element) { | ||
41 | Modality _exists = element.getExists(); | ||
42 | return Objects.equal(_exists, Modality.MUST); | ||
43 | } | ||
44 | |||
45 | public static boolean appearsExactlyOnce(final Component componentInstance) { | ||
46 | return (CftExtensions.mustExist(componentInstance) && (!componentInstance.isMultipleAllowed())); | ||
47 | } | ||
48 | |||
49 | /** | ||
50 | * Checks whether the connection and its target component are both currently present. | ||
51 | * | ||
52 | * A currently present connection without a present target component is a partial model error, | ||
53 | * so we throw an exception instead of returning <code>false</code>. | ||
54 | * | ||
55 | * @param connection The connection to check. | ||
56 | * @throws IllegalStateException When the target component is not currently present. | ||
57 | */ | ||
58 | public static boolean isCurrentlyConnected(final Connection connection) { | ||
59 | boolean _xblockexpression = false; | ||
60 | { | ||
61 | boolean _currentlyExists = CftExtensions.currentlyExists(connection.getOutput().getComponent()); | ||
62 | if (_currentlyExists) { | ||
63 | throw new IllegalStateException("Inconsistent partial model: current connection to a component that may not currently exist"); | ||
64 | } | ||
65 | _xblockexpression = CftExtensions.currentlyExists(connection); | ||
66 | } | ||
67 | return _xblockexpression; | ||
68 | } | ||
69 | } | ||
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 ce704acf..5ee6a4f1 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 | |||
@@ -15,7 +15,6 @@ Require-Bundle: com.google.guava, | |||
15 | org.eclipse.viatra.query.runtime.localsearch, | 15 | org.eclipse.viatra.query.runtime.localsearch, |
16 | hu.bme.mit.inf.dslreasoner.faulttree.components, | 16 | hu.bme.mit.inf.dslreasoner.faulttree.components, |
17 | hu.bme.mit.inf.dslreasoner.logic.model, | 17 | hu.bme.mit.inf.dslreasoner.logic.model, |
18 | com.github.jnr.constants;bundle-version="0.9.8", | ||
19 | org.apache.commons.lang;bundle-version="2.6.0" | 18 | org.apache.commons.lang;bundle-version="2.6.0" |
20 | Export-Package: hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft, | 19 | Export-Package: hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft, |
21 | hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft, | 20 | hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft, |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.xtend index c9aefe51..6b3ed0d0 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.xtend +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.xtend | |||
@@ -17,6 +17,8 @@ import java.util.Map | |||
17 | import org.eclipse.emf.ecore.util.EcoreUtil | 17 | import org.eclipse.emf.ecore.util.EcoreUtil |
18 | import org.eclipse.xtend.lib.annotations.Data | 18 | import org.eclipse.xtend.lib.annotations.Data |
19 | 19 | ||
20 | import static extension hu.bme.mit.inf.dslreasoner.faulttree.model.util.CftExtensions.* | ||
21 | |||
20 | class EventMaterializer { | 22 | class EventMaterializer { |
21 | extension val FtFactory = FtFactory.eINSTANCE | 23 | extension val FtFactory = FtFactory.eINSTANCE |
22 | 24 | ||
@@ -169,8 +171,10 @@ class EventMaterializer { | |||
169 | val input = findInput(component, inputEvent) | 171 | val input = findInput(component, inputEvent) |
170 | val builder = EventCollection.builder | 172 | val builder = EventCollection.builder |
171 | for (connection : input.incomingConnections) { | 173 | for (connection : input.incomingConnections) { |
172 | val materializedEvent = getOrMaterialize(connection.output) | 174 | if (connection.isCurrentlyConnected) { |
173 | builder.add(materializedEvent) | 175 | val materializedEvent = getOrMaterialize(connection.output) |
176 | builder.add(materializedEvent) | ||
177 | } | ||
174 | } | 178 | } |
175 | builder.build | 179 | builder.build |
176 | } | 180 | } |
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 index 7a3e377b..10c91fb4 100644 --- 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 | |||
@@ -2,6 +2,7 @@ package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft | |||
2 | 2 | ||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftFactory | 3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftFactory |
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition | 4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition |
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality | ||
5 | import java.util.Map | 6 | import java.util.Map |
6 | import org.eclipse.viatra.query.runtime.api.IPatternMatch | 7 | import org.eclipse.viatra.query.runtime.api.IPatternMatch |
7 | import org.eclipse.xtend.lib.annotations.Accessors | 8 | import org.eclipse.xtend.lib.annotations.Accessors |
@@ -13,10 +14,16 @@ class ComponentFaultTreeTrace { | |||
13 | val Map<IPatternMatch, ComponentInstanceTrace> componentInstancesMap = newHashMap | 14 | val Map<IPatternMatch, ComponentInstanceTrace> componentInstancesMap = newHashMap |
14 | 15 | ||
15 | def instantiateComponent(IPatternMatch patternMatch, ComponentDefinition componenDefinition) { | 16 | def instantiateComponent(IPatternMatch patternMatch, ComponentDefinition componenDefinition) { |
17 | instantiateComponent(patternMatch, componenDefinition, Modality.MUST, false) | ||
18 | } | ||
19 | |||
20 | def instantiateComponent(IPatternMatch patternMatch, ComponentDefinition componenDefinition, Modality exists, | ||
21 | boolean allowMultiple) { | ||
16 | if (componentInstancesMap.containsKey(patternMatch)) { | 22 | if (componentInstancesMap.containsKey(patternMatch)) { |
17 | throw new IllegalArgumentException("Already instantiated component for match: " + patternMatch) | 23 | throw new IllegalArgumentException("Already instantiated component for match: " + patternMatch) |
18 | } | 24 | } |
19 | val componentTrace = new ComponentInstanceTrace(componentFaultTree, componenDefinition, nameGenerator) | 25 | val componentTrace = new ComponentInstanceTrace(componentFaultTree, componenDefinition, nameGenerator, |
26 | exists, allowMultiple) | ||
20 | componentInstancesMap.put(patternMatch, componentTrace) | 27 | componentInstancesMap.put(patternMatch, componentTrace) |
21 | componentTrace | 28 | componentTrace |
22 | } | 29 | } |
@@ -30,6 +37,9 @@ class ComponentFaultTreeTrace { | |||
30 | throw new IllegalArgumentException("Top level component must have 1 output, got " + outputs.size + | 37 | throw new IllegalArgumentException("Top level component must have 1 output, got " + outputs.size + |
31 | " instead") | 38 | " instead") |
32 | } | 39 | } |
40 | if (!trace.appearsExactlyOnce) { | ||
41 | throw new IllegalArgumentException("Top level must appear in the fault tree exactly once") | ||
42 | } | ||
33 | componentFaultTree.topEvent = outputs.head | 43 | componentFaultTree.topEvent = outputs.head |
34 | } | 44 | } |
35 | 45 | ||
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 index 7353bfe5..158ab2e1 100644 --- 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 | |||
@@ -6,18 +6,23 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition | |||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree | 6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree |
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.InputEvent | 8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent |
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output | 10 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output |
10 | import java.util.Map | 11 | import java.util.Map |
11 | 12 | ||
13 | import static extension hu.bme.mit.inf.dslreasoner.faulttree.model.util.CftExtensions.* | ||
14 | |||
12 | class ComponentInstanceTrace { | 15 | class ComponentInstanceTrace { |
13 | val componentInstance = CftFactory.eINSTANCE.createComponent | 16 | val componentInstance = CftFactory.eINSTANCE.createComponent |
14 | val Map<InputEvent, InputTrace> inputEventsMap | 17 | val Map<InputEvent, InputTrace> inputEventsMap |
15 | val Map<EventDeclaration, Output> outputEventsMap | 18 | val Map<EventDeclaration, Output> outputEventsMap |
16 | 19 | ||
17 | protected new(ComponentFaultTree faultTree, ComponentDefinition componentDefinition, | 20 | protected new(ComponentFaultTree faultTree, ComponentDefinition componentDefinition, |
18 | ComponentNameGenerator nameGenerator) { | 21 | ComponentNameGenerator nameGenerator, Modality exists, boolean multipleAllowed) { |
19 | componentInstance.componentDefinition = componentDefinition | 22 | componentInstance.componentDefinition = componentDefinition |
20 | componentInstance.name = nameGenerator.nextName(componentDefinition) | 23 | componentInstance.name = nameGenerator.nextName(componentDefinition) |
24 | componentInstance.exists = exists | ||
25 | componentInstance.multipleAllowed = multipleAllowed | ||
21 | inputEventsMap = Maps.newHashMapWithExpectedSize(componentDefinition.inputEvents.size) | 26 | inputEventsMap = Maps.newHashMapWithExpectedSize(componentDefinition.inputEvents.size) |
22 | for (inputEvent : componentDefinition.inputEvents) { | 27 | for (inputEvent : componentDefinition.inputEvents) { |
23 | val inputTrace = new InputTrace(componentInstance, inputEvent) | 28 | val inputTrace = new InputTrace(componentInstance, inputEvent) |
@@ -34,6 +39,11 @@ class ComponentInstanceTrace { | |||
34 | } | 39 | } |
35 | 40 | ||
36 | def void assign(EventDeclaration inputEvent, ComponentInstanceTrace sourceComponent, EventDeclaration outputEvent) { | 41 | def void assign(EventDeclaration inputEvent, ComponentInstanceTrace sourceComponent, EventDeclaration outputEvent) { |
42 | assign(inputEvent, sourceComponent, outputEvent, Modality.MUST) | ||
43 | } | ||
44 | |||
45 | def void assign(EventDeclaration inputEvent, ComponentInstanceTrace sourceComponent, EventDeclaration outputEvent, | ||
46 | Modality exists) { | ||
37 | val inputTrace = inputEventsMap.get(inputEvent) | 47 | val inputTrace = inputEventsMap.get(inputEvent) |
38 | if (inputTrace === null) { | 48 | if (inputTrace === null) { |
39 | throw new IllegalArgumentException("Unknown input: " + inputEvent) | 49 | throw new IllegalArgumentException("Unknown input: " + inputEvent) |
@@ -42,10 +52,14 @@ class ComponentInstanceTrace { | |||
42 | if (output === null) { | 52 | if (output === null) { |
43 | throw new IllegalArgumentException("Unknown output: " + outputEvent) | 53 | throw new IllegalArgumentException("Unknown output: " + outputEvent) |
44 | } | 54 | } |
45 | inputTrace.assign(output) | 55 | inputTrace.assign(output, exists) |
46 | } | 56 | } |
47 | 57 | ||
48 | protected def getOutputs() { | 58 | protected def getOutputs() { |
49 | componentInstance.outputs | 59 | componentInstance.outputs |
50 | } | 60 | } |
61 | |||
62 | protected def appearsExactlyOnce() { | ||
63 | componentInstance.appearsExactlyOnce | ||
64 | } | ||
51 | } | 65 | } |
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 index c529a09b..b892eff1 100644 --- 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 | |||
@@ -5,9 +5,12 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component | |||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection | 5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection |
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input | 6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input |
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent | 7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent |
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output | 9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output |
9 | import java.util.Map | 10 | import java.util.Map |
10 | 11 | ||
12 | import static extension hu.bme.mit.inf.dslreasoner.faulttree.model.util.CftExtensions.* | ||
13 | |||
11 | class InputTrace { | 14 | class InputTrace { |
12 | val Input input = CftFactory.eINSTANCE.createInput | 15 | val Input input = CftFactory.eINSTANCE.createInput |
13 | val Map<Output, Connection> connectionsMap = newHashMap | 16 | val Map<Output, Connection> connectionsMap = newHashMap |
@@ -17,13 +20,16 @@ class InputTrace { | |||
17 | component.inputs += input | 20 | component.inputs += input |
18 | } | 21 | } |
19 | 22 | ||
20 | def void assign(Output output) { | 23 | def void assign(Output output, Modality exists) { |
21 | val connection = connectionsMap.get(output) | 24 | val connection = connectionsMap.get(output) |
22 | if (connection === null) { | 25 | if (connection === null) { |
23 | val newConnection = CftFactory.eINSTANCE.createConnection | 26 | val newConnection = CftFactory.eINSTANCE.createConnection |
24 | newConnection.output = output | 27 | newConnection.output = output |
28 | newConnection.exists = exists | ||
25 | input.incomingConnections += newConnection | 29 | input.incomingConnections += newConnection |
26 | connectionsMap.put(output, newConnection) | 30 | connectionsMap.put(output, newConnection) |
31 | } else if (exists.isMoreConcreteThan(connection.exists)) { | ||
32 | connection.exists = exists | ||
27 | } | 33 | } |
28 | } | 34 | } |
29 | } | 35 | } |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.xtend index 732d9fed..4a19e2cd 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.xtend +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.xtend | |||
@@ -14,14 +14,15 @@ import org.eclipse.xtend2.lib.StringConcatenationClient | |||
14 | 14 | ||
15 | class Ft2GalileoTransformation { | 15 | class Ft2GalileoTransformation { |
16 | def toGalileo(FaultTree faultTree) ''' | 16 | def toGalileo(FaultTree faultTree) ''' |
17 | toplevel «faultTree.topEvent.name»; | 17 | toplevel "«faultTree.topEvent.name»"; |
18 | «FOR event : faultTree.events» | 18 | «FOR event : faultTree.events» |
19 | «event.name» «defineEvent(event)»; | 19 | "«event.name»" «defineEvent(event)»; |
20 | «ENDFOR» | 20 | «ENDFOR» |
21 | ''' | 21 | ''' |
22 | 22 | ||
23 | protected dispatch def defineEvent(BasicEvent basicEvent) { | 23 | protected dispatch def defineEvent(BasicEvent basicEvent) { |
24 | defineDistribution(basicEvent.distribution) | 24 | // ft-diet (https://moves.rwth-aachen.de/ft-diet/) needs a dormancy factor. |
25 | '''«defineDistribution(basicEvent.distribution)» dorm=0.0''' | ||
25 | } | 26 | } |
26 | 27 | ||
27 | protected dispatch def StringConcatenationClient defineDistribution(ConstantDistribution distribution) { | 28 | protected dispatch def StringConcatenationClient defineDistribution(ConstantDistribution distribution) { |
@@ -37,7 +38,7 @@ class Ft2GalileoTransformation { | |||
37 | } | 38 | } |
38 | 39 | ||
39 | protected dispatch def StringConcatenationClient defineEvent(Gate gate) { | 40 | protected dispatch def StringConcatenationClient defineEvent(Gate gate) { |
40 | '''«defineGate(gate)» «FOR input : gate.inputEvents SEPARATOR " "»«input.name»«ENDFOR»''' | 41 | '''«defineGate(gate)» «FOR input : gate.inputEvents SEPARATOR " "»"«input.name»"«ENDFOR»''' |
41 | } | 42 | } |
42 | 43 | ||
43 | protected dispatch def StringConcatenationClient defineGate(AndGate gate) '''and''' | 44 | protected dispatch def StringConcatenationClient defineGate(AndGate gate) '''and''' |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.xtend index 91c6a0d0..a250a955 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.xtend +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.xtend | |||
@@ -8,8 +8,6 @@ import java.io.IOException | |||
8 | import java.io.InputStream | 8 | import java.io.InputStream |
9 | import java.io.InputStreamReader | 9 | import java.io.InputStreamReader |
10 | import java.util.regex.Pattern | 10 | import java.util.regex.Pattern |
11 | import jnr.constants.platform.Signal | ||
12 | import org.apache.commons.lang.SystemUtils | ||
13 | 11 | ||
14 | class StormDftException extends RuntimeException { | 12 | class StormDftException extends RuntimeException { |
15 | new(String s) { | 13 | new(String s) { |
@@ -29,8 +27,9 @@ class StormDftHandler { | |||
29 | static val RESULT_REGEX = '''^Result:\s*\[(?:(?<«SINGLE_RESULT_GROUP»>«DOUBLE_REGEX»)|\((?<«LOWER_BOUND_GROUP»>«DOUBLE_REGEX»),\s*(?<«UPPER_BOUND_GROUP»>«DOUBLE_REGEX»)\))\]''' | 27 | static val RESULT_REGEX = '''^Result:\s*\[(?:(?<«SINGLE_RESULT_GROUP»>«DOUBLE_REGEX»)|\((?<«LOWER_BOUND_GROUP»>«DOUBLE_REGEX»),\s*(?<«UPPER_BOUND_GROUP»>«DOUBLE_REGEX»)\))\]''' |
30 | static val RESULT_PATTERN = Pattern.compile(RESULT_REGEX) | 28 | static val RESULT_PATTERN = Pattern.compile(RESULT_REGEX) |
31 | 29 | ||
32 | // See http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/jdk7-b147/src/solaris/native/java/lang/UNIXProcess_md.c#l332 | 30 | static val SIGNAL_EXIT_VALUE_OFFSET = 0x80 |
33 | static val SIGNAL_EXIT_VALUE_OFFSET = if(SystemUtils.IS_OS_SOLARIS) 0 else 0x80 | 31 | static val SIGXCPU = 24 |
32 | static val SIGXFSZ = 25 | ||
34 | 33 | ||
35 | static val STORM_GENERAL_ERROR = (-1).bitwiseAnd(0xff) | 34 | static val STORM_GENERAL_ERROR = (-1).bitwiseAnd(0xff) |
36 | static val STORM_TIMEOUT = (-2).bitwiseAnd(0xff) | 35 | static val STORM_TIMEOUT = (-2).bitwiseAnd(0xff) |
@@ -166,18 +165,15 @@ class StormDftHandler { | |||
166 | case STORM_GENERAL_ERROR: | 165 | case STORM_GENERAL_ERROR: |
167 | throw new StormDftException("Storm error: " + error) | 166 | throw new StormDftException("Storm error: " + error) |
168 | case STORM_TIMEOUT, | 167 | case STORM_TIMEOUT, |
169 | case SIGNAL_EXIT_VALUE_OFFSET + Signal.SIGXCPU.intValue: | 168 | case SIGNAL_EXIT_VALUE_OFFSET + SIGXCPU: |
170 | ReliabilityResult.TIMEOUT | 169 | ReliabilityResult.TIMEOUT |
171 | case STORM_MEMOUT, | 170 | case STORM_MEMOUT, |
172 | case SIGNAL_EXIT_VALUE_OFFSET + Signal.SIGXFSZ.intValue: | 171 | case SIGNAL_EXIT_VALUE_OFFSET + SIGXFSZ: |
173 | ReliabilityResult.MEMOUT | 172 | ReliabilityResult.MEMOUT |
174 | default: { | 173 | default: { |
175 | if (exitValue > SIGNAL_EXIT_VALUE_OFFSET) { | 174 | if (exitValue > SIGNAL_EXIT_VALUE_OFFSET) { |
176 | val signalNumber = exitValue - SIGNAL_EXIT_VALUE_OFFSET | 175 | val signalNumber = exitValue - SIGNAL_EXIT_VALUE_OFFSET |
177 | val signal = Signal.values.findFirst[intValue == signalNumber] | 176 | throw new StormDftException("Storm unexpectedly killed by signal " + signalNumber + ": " + error) |
178 | if (signal !== null) { | ||
179 | throw new StormDftException("Storm unexpectedly killed by signal " + signal + ": " + error) | ||
180 | } | ||
181 | } | 177 | } |
182 | throw new StormDftException("Storm unexpectedly exit with status " + exitValue + ": " + error) | 178 | throw new StormDftException("Storm unexpectedly exit with status " + exitValue + ": " + error) |
183 | } | 179 | } |
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 index 226e6227..f68d0464 100644 --- 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 | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventCollection.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventCollection.xtendbin index 54ba3d09..6aebfa85 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventCollection.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventCollection.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/.EventMaterializer.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventMaterializer.xtendbin index 175ae3f1..323f40b2 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventMaterializer.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventMaterializer.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/.FaultTreeBuilder.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.FaultTreeBuilder.xtendbin index db3a7e73..45b228d3 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.FaultTreeBuilder.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.FaultTreeBuilder.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 index 75154a4c..058cff19 100644 --- 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 | |||
@@ -6,3 +6,11 @@ | |||
6 | /.FaultTreeBuilder.java._trace | 6 | /.FaultTreeBuilder.java._trace |
7 | /.FaultModelBuilder.java._trace | 7 | /.FaultModelBuilder.java._trace |
8 | /.EventCollection.java._trace | 8 | /.EventCollection.java._trace |
9 | /.Cft2FtTransformation.xtendbin | ||
10 | /.EventCollection.xtendbin | ||
11 | /.EventMaterializer.xtendbin | ||
12 | /.FaultTreeBuilder.xtendbin | ||
13 | /Cft2FtTransformation.java | ||
14 | /EventCollection.java | ||
15 | /EventMaterializer.java | ||
16 | /FaultTreeBuilder.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.java index ac1fc209..98a82b7d 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.java | |||
@@ -22,6 +22,7 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Gate; | |||
22 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate; | 22 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate; |
23 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.OrGate; | 23 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.OrGate; |
24 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent; | 24 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent; |
25 | import hu.bme.mit.inf.dslreasoner.faulttree.model.util.CftExtensions; | ||
25 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft.EventCollection; | 26 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft.EventCollection; |
26 | import java.util.LinkedHashSet; | 27 | import java.util.LinkedHashSet; |
27 | import java.util.Map; | 28 | import java.util.Map; |
@@ -416,7 +417,8 @@ public class EventMaterializer { | |||
416 | final EventCollection.Builder builder = EventCollection.builder(); | 417 | final EventCollection.Builder builder = EventCollection.builder(); |
417 | EList<Connection> _incomingConnections = input.getIncomingConnections(); | 418 | EList<Connection> _incomingConnections = input.getIncomingConnections(); |
418 | for (final Connection connection : _incomingConnections) { | 419 | for (final Connection connection : _incomingConnections) { |
419 | { | 420 | boolean _isCurrentlyConnected = CftExtensions.isCurrentlyConnected(connection); |
421 | if (_isCurrentlyConnected) { | ||
420 | final Event materializedEvent = this.getOrMaterialize(connection.getOutput()); | 422 | final Event materializedEvent = this.getOrMaterialize(connection.getOutput()); |
421 | builder.add(materializedEvent); | 423 | builder.add(materializedEvent); |
422 | } | 424 | } |
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 index f705fefe..59a21d5c 100644 --- 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 | |||
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 index bab76345..0a5c81fe 100644 --- 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 | |||
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 index 257bfc56..87965646 100644 --- 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 | |||
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 index a1339a18..cd930545 100644 --- 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 | |||
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 index ba19d0fb..2f779ecb 100644 --- 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 | |||
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 index 1e8612b2..93bad7e0 100644 --- 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 | |||
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 index ebe80f2e..fde76cfd 100644 --- 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 | |||
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 index 03bd16f8..4754c634 100644 --- 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 | |||
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 index 33bb70d4..377aa872 100644 --- 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 | |||
@@ -7,3 +7,19 @@ | |||
7 | /.CftTransformation.java._trace | 7 | /.CftTransformation.java._trace |
8 | /.Ecore2CftTransformation.java._trace | 8 | /.Ecore2CftTransformation.java._trace |
9 | /.ComponentNameGenerator.java._trace | 9 | /.ComponentNameGenerator.java._trace |
10 | /.ComponentFaultTreeTrace.xtendbin | ||
11 | /.ComponentInstanceTrace.xtendbin | ||
12 | /.ComponentNameGenerator.xtendbin | ||
13 | /.Ecore2CftTransformation.xtendbin | ||
14 | /.InputTrace.xtendbin | ||
15 | /.LookupHandler.xtendbin | ||
16 | /.MappingHandler.xtendbin | ||
17 | /.MappingQueries.xtendbin | ||
18 | /ComponentFaultTreeTrace.java | ||
19 | /ComponentInstanceTrace.java | ||
20 | /ComponentNameGenerator.java | ||
21 | /Ecore2CftTransformation.java | ||
22 | /InputTrace.java | ||
23 | /LookupHandler.java | ||
24 | /MappingHandler.java | ||
25 | /MappingQueries.java | ||
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 index 46e711d9..ddcf9036 100644 --- 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 | |||
@@ -3,6 +3,7 @@ package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft; | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftFactory; | 3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.CftFactory; |
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | 4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; |
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree; | 5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree; |
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | 7 | 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.ComponentInstanceTrace; |
8 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentNameGenerator; | 9 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentNameGenerator; |
@@ -24,13 +25,17 @@ public class ComponentFaultTreeTrace { | |||
24 | private final Map<IPatternMatch, ComponentInstanceTrace> componentInstancesMap = CollectionLiterals.<IPatternMatch, ComponentInstanceTrace>newHashMap(); | 25 | private final Map<IPatternMatch, ComponentInstanceTrace> componentInstancesMap = CollectionLiterals.<IPatternMatch, ComponentInstanceTrace>newHashMap(); |
25 | 26 | ||
26 | public ComponentInstanceTrace instantiateComponent(final IPatternMatch patternMatch, final ComponentDefinition componenDefinition) { | 27 | public ComponentInstanceTrace instantiateComponent(final IPatternMatch patternMatch, final ComponentDefinition componenDefinition) { |
28 | return this.instantiateComponent(patternMatch, componenDefinition, Modality.MUST, false); | ||
29 | } | ||
30 | |||
31 | public ComponentInstanceTrace instantiateComponent(final IPatternMatch patternMatch, final ComponentDefinition componenDefinition, final Modality exists, final boolean allowMultiple) { | ||
27 | ComponentInstanceTrace _xblockexpression = null; | 32 | ComponentInstanceTrace _xblockexpression = null; |
28 | { | 33 | { |
29 | boolean _containsKey = this.componentInstancesMap.containsKey(patternMatch); | 34 | boolean _containsKey = this.componentInstancesMap.containsKey(patternMatch); |
30 | if (_containsKey) { | 35 | if (_containsKey) { |
31 | throw new IllegalArgumentException(("Already instantiated component for match: " + patternMatch)); | 36 | throw new IllegalArgumentException(("Already instantiated component for match: " + patternMatch)); |
32 | } | 37 | } |
33 | final ComponentInstanceTrace componentTrace = new ComponentInstanceTrace(this.componentFaultTree, componenDefinition, this.nameGenerator); | 38 | final ComponentInstanceTrace componentTrace = new ComponentInstanceTrace(this.componentFaultTree, componenDefinition, this.nameGenerator, exists, allowMultiple); |
34 | this.componentInstancesMap.put(patternMatch, componentTrace); | 39 | this.componentInstancesMap.put(patternMatch, componentTrace); |
35 | _xblockexpression = componentTrace; | 40 | _xblockexpression = componentTrace; |
36 | } | 41 | } |
@@ -53,6 +58,11 @@ public class ComponentFaultTreeTrace { | |||
53 | " instead"); | 58 | " instead"); |
54 | throw new IllegalArgumentException(_plus_1); | 59 | throw new IllegalArgumentException(_plus_1); |
55 | } | 60 | } |
61 | boolean _appearsExactlyOnce = trace.appearsExactlyOnce(); | ||
62 | boolean _not = (!_appearsExactlyOnce); | ||
63 | if (_not) { | ||
64 | throw new IllegalArgumentException("Top level must appear in the fault tree exactly once"); | ||
65 | } | ||
56 | this.componentFaultTree.setTopEvent(IterableExtensions.<Output>head(outputs)); | 66 | this.componentFaultTree.setTopEvent(IterableExtensions.<Output>head(outputs)); |
57 | } | 67 | } |
58 | 68 | ||
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 index 840f501d..4034bdf3 100644 --- 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 | |||
@@ -7,7 +7,9 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentDefinition; | |||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree; | 7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree; |
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration; | 8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration; |
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent; | 9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent; |
10 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality; | ||
10 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | 11 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; |
12 | import hu.bme.mit.inf.dslreasoner.faulttree.model.util.CftExtensions; | ||
11 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentNameGenerator; | 13 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentNameGenerator; |
12 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.InputTrace; | 14 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.InputTrace; |
13 | import java.util.Map; | 15 | import java.util.Map; |
@@ -21,9 +23,11 @@ public class ComponentInstanceTrace { | |||
21 | 23 | ||
22 | private final Map<EventDeclaration, Output> outputEventsMap; | 24 | private final Map<EventDeclaration, Output> outputEventsMap; |
23 | 25 | ||
24 | protected ComponentInstanceTrace(final ComponentFaultTree faultTree, final ComponentDefinition componentDefinition, final ComponentNameGenerator nameGenerator) { | 26 | protected ComponentInstanceTrace(final ComponentFaultTree faultTree, final ComponentDefinition componentDefinition, final ComponentNameGenerator nameGenerator, final Modality exists, final boolean multipleAllowed) { |
25 | this.componentInstance.setComponentDefinition(componentDefinition); | 27 | this.componentInstance.setComponentDefinition(componentDefinition); |
26 | this.componentInstance.setName(nameGenerator.nextName(componentDefinition)); | 28 | this.componentInstance.setName(nameGenerator.nextName(componentDefinition)); |
29 | this.componentInstance.setExists(exists); | ||
30 | this.componentInstance.setMultipleAllowed(multipleAllowed); | ||
27 | this.inputEventsMap = Maps.<InputEvent, InputTrace>newHashMapWithExpectedSize(componentDefinition.getInputEvents().size()); | 31 | this.inputEventsMap = Maps.<InputEvent, InputTrace>newHashMapWithExpectedSize(componentDefinition.getInputEvents().size()); |
28 | EList<InputEvent> _inputEvents = componentDefinition.getInputEvents(); | 32 | EList<InputEvent> _inputEvents = componentDefinition.getInputEvents(); |
29 | for (final InputEvent inputEvent : _inputEvents) { | 33 | for (final InputEvent inputEvent : _inputEvents) { |
@@ -48,6 +52,10 @@ public class ComponentInstanceTrace { | |||
48 | } | 52 | } |
49 | 53 | ||
50 | public void assign(final EventDeclaration inputEvent, final ComponentInstanceTrace sourceComponent, final EventDeclaration outputEvent) { | 54 | public void assign(final EventDeclaration inputEvent, final ComponentInstanceTrace sourceComponent, final EventDeclaration outputEvent) { |
55 | this.assign(inputEvent, sourceComponent, outputEvent, Modality.MUST); | ||
56 | } | ||
57 | |||
58 | public void assign(final EventDeclaration inputEvent, final ComponentInstanceTrace sourceComponent, final EventDeclaration outputEvent, final Modality exists) { | ||
51 | final InputTrace inputTrace = this.inputEventsMap.get(inputEvent); | 59 | final InputTrace inputTrace = this.inputEventsMap.get(inputEvent); |
52 | if ((inputTrace == null)) { | 60 | if ((inputTrace == null)) { |
53 | throw new IllegalArgumentException(("Unknown input: " + inputEvent)); | 61 | throw new IllegalArgumentException(("Unknown input: " + inputEvent)); |
@@ -56,10 +64,14 @@ public class ComponentInstanceTrace { | |||
56 | if ((output == null)) { | 64 | if ((output == null)) { |
57 | throw new IllegalArgumentException(("Unknown output: " + outputEvent)); | 65 | throw new IllegalArgumentException(("Unknown output: " + outputEvent)); |
58 | } | 66 | } |
59 | inputTrace.assign(output); | 67 | inputTrace.assign(output, exists); |
60 | } | 68 | } |
61 | 69 | ||
62 | protected EList<Output> getOutputs() { | 70 | protected EList<Output> getOutputs() { |
63 | return this.componentInstance.getOutputs(); | 71 | return this.componentInstance.getOutputs(); |
64 | } | 72 | } |
73 | |||
74 | protected boolean appearsExactlyOnce() { | ||
75 | return CftExtensions.appearsExactlyOnce(this.componentInstance); | ||
76 | } | ||
65 | } | 77 | } |
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 index c12f2bae..2b30566f 100644 --- 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 | |||
@@ -5,7 +5,9 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component; | |||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection; | 5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection; |
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; | 6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input; |
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent; | 7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent; |
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; | 9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output; |
10 | import hu.bme.mit.inf.dslreasoner.faulttree.model.util.CftExtensions; | ||
9 | import java.util.Map; | 11 | import java.util.Map; |
10 | import org.eclipse.emf.common.util.EList; | 12 | import org.eclipse.emf.common.util.EList; |
11 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; | 13 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; |
@@ -22,14 +24,20 @@ public class InputTrace { | |||
22 | _inputs.add(this.input); | 24 | _inputs.add(this.input); |
23 | } | 25 | } |
24 | 26 | ||
25 | public void assign(final Output output) { | 27 | public void assign(final Output output, final Modality exists) { |
26 | final Connection connection = this.connectionsMap.get(output); | 28 | final Connection connection = this.connectionsMap.get(output); |
27 | if ((connection == null)) { | 29 | if ((connection == null)) { |
28 | final Connection newConnection = CftFactory.eINSTANCE.createConnection(); | 30 | final Connection newConnection = CftFactory.eINSTANCE.createConnection(); |
29 | newConnection.setOutput(output); | 31 | newConnection.setOutput(output); |
32 | newConnection.setExists(exists); | ||
30 | EList<Connection> _incomingConnections = this.input.getIncomingConnections(); | 33 | EList<Connection> _incomingConnections = this.input.getIncomingConnections(); |
31 | _incomingConnections.add(newConnection); | 34 | _incomingConnections.add(newConnection); |
32 | this.connectionsMap.put(output, newConnection); | 35 | this.connectionsMap.put(output, newConnection); |
36 | } else { | ||
37 | boolean _isMoreConcreteThan = CftExtensions.isMoreConcreteThan(exists, connection.getExists()); | ||
38 | if (_isMoreConcreteThan) { | ||
39 | connection.setExists(exists); | ||
40 | } | ||
33 | } | 41 | } |
34 | } | 42 | } |
35 | } | 43 | } |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.Ft2GalileoTransformation.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.Ft2GalileoTransformation.xtendbin index 9fe75a0f..25ddc417 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.Ft2GalileoTransformation.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.Ft2GalileoTransformation.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.gitignore index 3f932890..f4610b04 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.gitignore | |||
@@ -1 +1,3 @@ | |||
1 | /.Ft2GalileoTransformation.java._trace | 1 | /.Ft2GalileoTransformation.java._trace |
2 | /.Ft2GalileoTransformation.xtendbin | ||
3 | /Ft2GalileoTransformation.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.java index e900c62a..8748825d 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.java | |||
@@ -19,18 +19,19 @@ import org.eclipse.xtend2.lib.StringConcatenationClient; | |||
19 | public class Ft2GalileoTransformation { | 19 | public class Ft2GalileoTransformation { |
20 | public CharSequence toGalileo(final FaultTree faultTree) { | 20 | public CharSequence toGalileo(final FaultTree faultTree) { |
21 | StringConcatenation _builder = new StringConcatenation(); | 21 | StringConcatenation _builder = new StringConcatenation(); |
22 | _builder.append("toplevel "); | 22 | _builder.append("toplevel \""); |
23 | String _name = faultTree.getTopEvent().getName(); | 23 | String _name = faultTree.getTopEvent().getName(); |
24 | _builder.append(_name); | 24 | _builder.append(_name); |
25 | _builder.append(";"); | 25 | _builder.append("\";"); |
26 | _builder.newLineIfNotEmpty(); | 26 | _builder.newLineIfNotEmpty(); |
27 | { | 27 | { |
28 | EList<RandomEvent> _events = faultTree.getEvents(); | 28 | EList<RandomEvent> _events = faultTree.getEvents(); |
29 | for(final RandomEvent event : _events) { | 29 | for(final RandomEvent event : _events) { |
30 | _builder.append("\""); | ||
30 | String _name_1 = event.getName(); | 31 | String _name_1 = event.getName(); |
31 | _builder.append(_name_1); | 32 | _builder.append(_name_1); |
32 | _builder.append(" "); | 33 | _builder.append("\" "); |
33 | StringConcatenationClient _defineEvent = this.defineEvent(event); | 34 | Object _defineEvent = this.defineEvent(event); |
34 | _builder.append(_defineEvent); | 35 | _builder.append(_defineEvent); |
35 | _builder.append(";"); | 36 | _builder.append(";"); |
36 | _builder.newLineIfNotEmpty(); | 37 | _builder.newLineIfNotEmpty(); |
@@ -39,8 +40,12 @@ public class Ft2GalileoTransformation { | |||
39 | return _builder; | 40 | return _builder; |
40 | } | 41 | } |
41 | 42 | ||
42 | protected StringConcatenationClient _defineEvent(final BasicEvent basicEvent) { | 43 | protected Object _defineEvent(final BasicEvent basicEvent) { |
43 | return this.defineDistribution(basicEvent.getDistribution()); | 44 | StringConcatenation _builder = new StringConcatenation(); |
45 | StringConcatenationClient _defineDistribution = this.defineDistribution(basicEvent.getDistribution()); | ||
46 | _builder.append(_defineDistribution); | ||
47 | _builder.append(" dorm=0.0"); | ||
48 | return _builder; | ||
44 | } | 49 | } |
45 | 50 | ||
46 | protected StringConcatenationClient _defineDistribution(final ConstantDistribution distribution) { | 51 | protected StringConcatenationClient _defineDistribution(final ConstantDistribution distribution) { |
@@ -87,8 +92,10 @@ public class Ft2GalileoTransformation { | |||
87 | } else { | 92 | } else { |
88 | _builder.appendImmediate(" ", ""); | 93 | _builder.appendImmediate(" ", ""); |
89 | } | 94 | } |
95 | _builder.append("\""); | ||
90 | String _name = input.getName(); | 96 | String _name = input.getName(); |
91 | _builder.append(_name); | 97 | _builder.append(_name); |
98 | _builder.append("\""); | ||
92 | } | 99 | } |
93 | } | 100 | } |
94 | } | 101 | } |
@@ -138,7 +145,7 @@ public class Ft2GalileoTransformation { | |||
138 | throw new IllegalArgumentException(("Unknown random even: " + randomEvent)); | 145 | throw new IllegalArgumentException(("Unknown random even: " + randomEvent)); |
139 | } | 146 | } |
140 | 147 | ||
141 | protected StringConcatenationClient defineEvent(final RandomEvent basicEvent) { | 148 | protected Object defineEvent(final RandomEvent basicEvent) { |
142 | if (basicEvent instanceof BasicEvent) { | 149 | if (basicEvent instanceof BasicEvent) { |
143 | return _defineEvent((BasicEvent)basicEvent); | 150 | return _defineEvent((BasicEvent)basicEvent); |
144 | } else if (basicEvent instanceof Gate) { | 151 | } else if (basicEvent instanceof Gate) { |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.ReliabilityResult.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.ReliabilityResult.xtendbin index 57c4608d..552c946a 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.ReliabilityResult.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.ReliabilityResult.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftConfiguration.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftConfiguration.xtendbin index f5cb52f4..a3f9c647 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftConfiguration.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftConfiguration.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftHandler.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftHandler.xtendbin index 5dad0728..d7f66fd0 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftHandler.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftHandler.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftSolver.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftSolver.xtendbin index abd8a501..b9fdf395 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftSolver.xtendbin +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftSolver.xtendbin | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.gitignore index 59cc8fe8..8a74c101 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.gitignore +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.gitignore | |||
@@ -7,3 +7,14 @@ | |||
7 | /.StormDftException.java._trace | 7 | /.StormDftException.java._trace |
8 | /.ReliabilityModelSolution.java._trace | 8 | /.ReliabilityModelSolution.java._trace |
9 | /.ReliabilityResult.java._trace | 9 | /.ReliabilityResult.java._trace |
10 | /.ReliabilityResult.xtendbin | ||
11 | /.StormDftConfiguration.xtendbin | ||
12 | /.StormDftHandler.xtendbin | ||
13 | /.StormDftSolver.xtendbin | ||
14 | /ApproximationHeuristic.java | ||
15 | /FtAnalysisObjective.java | ||
16 | /ReliabilityResult.java | ||
17 | /StormDftConfiguration.java | ||
18 | /StormDftException.java | ||
19 | /StormDftHandler.java | ||
20 | /StormDftSolver.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.java index 003d9cc5..46127425 100644 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.java +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.java | |||
@@ -16,15 +16,11 @@ import java.io.InputStreamReader; | |||
16 | import java.util.ArrayList; | 16 | import java.util.ArrayList; |
17 | import java.util.regex.Matcher; | 17 | import java.util.regex.Matcher; |
18 | import java.util.regex.Pattern; | 18 | import java.util.regex.Pattern; |
19 | import jnr.constants.platform.Signal; | ||
20 | import org.apache.commons.lang.SystemUtils; | ||
21 | import org.eclipse.xtend2.lib.StringConcatenation; | 19 | import org.eclipse.xtend2.lib.StringConcatenation; |
22 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; | 20 | import org.eclipse.xtext.xbase.lib.CollectionLiterals; |
23 | import org.eclipse.xtext.xbase.lib.Conversions; | ||
24 | import org.eclipse.xtext.xbase.lib.Exceptions; | 21 | import org.eclipse.xtext.xbase.lib.Exceptions; |
25 | import org.eclipse.xtext.xbase.lib.Extension; | 22 | import org.eclipse.xtext.xbase.lib.Extension; |
26 | import org.eclipse.xtext.xbase.lib.Functions.Function0; | 23 | import org.eclipse.xtext.xbase.lib.Functions.Function0; |
27 | import org.eclipse.xtext.xbase.lib.Functions.Function1; | ||
28 | import org.eclipse.xtext.xbase.lib.InputOutput; | 24 | import org.eclipse.xtext.xbase.lib.InputOutput; |
29 | import org.eclipse.xtext.xbase.lib.IterableExtensions; | 25 | import org.eclipse.xtext.xbase.lib.IterableExtensions; |
30 | 26 | ||
@@ -60,17 +56,11 @@ public class StormDftHandler { | |||
60 | 56 | ||
61 | private static final Pattern RESULT_PATTERN = Pattern.compile(StormDftHandler.RESULT_REGEX); | 57 | private static final Pattern RESULT_PATTERN = Pattern.compile(StormDftHandler.RESULT_REGEX); |
62 | 58 | ||
63 | private static final int SIGNAL_EXIT_VALUE_OFFSET = new Function0<Integer>() { | 59 | private static final int SIGNAL_EXIT_VALUE_OFFSET = 0x80; |
64 | public Integer apply() { | 60 | |
65 | int _xifexpression = (int) 0; | 61 | private static final int SIGXCPU = 24; |
66 | if (SystemUtils.IS_OS_SOLARIS) { | 62 | |
67 | _xifexpression = 0; | 63 | private static final int SIGXFSZ = 25; |
68 | } else { | ||
69 | _xifexpression = 0x80; | ||
70 | } | ||
71 | return _xifexpression; | ||
72 | } | ||
73 | }.apply().intValue(); | ||
74 | 64 | ||
75 | private static final int STORM_GENERAL_ERROR = ((-1) & 0xff); | 65 | private static final int STORM_GENERAL_ERROR = ((-1) & 0xff); |
76 | 66 | ||
@@ -305,9 +295,7 @@ public class StormDftHandler { | |||
305 | _matched=true; | 295 | _matched=true; |
306 | } | 296 | } |
307 | if (!_matched) { | 297 | if (!_matched) { |
308 | int _intValue = Signal.SIGXCPU.intValue(); | 298 | if (Objects.equal(exitValue, (StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET + StormDftHandler.SIGXCPU))) { |
309 | int _plus = (StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET + _intValue); | ||
310 | if (Objects.equal(exitValue, _plus)) { | ||
311 | _matched=true; | 299 | _matched=true; |
312 | } | 300 | } |
313 | } | 301 | } |
@@ -320,9 +308,7 @@ public class StormDftHandler { | |||
320 | _matched=true; | 308 | _matched=true; |
321 | } | 309 | } |
322 | if (!_matched) { | 310 | if (!_matched) { |
323 | int _intValue_1 = Signal.SIGXFSZ.intValue(); | 311 | if (Objects.equal(exitValue, (StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET + StormDftHandler.SIGXFSZ))) { |
324 | int _plus_1 = (StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET + _intValue_1); | ||
325 | if (Objects.equal(exitValue, _plus_1)) { | ||
326 | _matched=true; | 312 | _matched=true; |
327 | } | 313 | } |
328 | } | 314 | } |
@@ -334,14 +320,7 @@ public class StormDftHandler { | |||
334 | { | 320 | { |
335 | if ((exitValue > StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET)) { | 321 | if ((exitValue > StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET)) { |
336 | final int signalNumber = (exitValue - StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET); | 322 | final int signalNumber = (exitValue - StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET); |
337 | final Function1<Signal, Boolean> _function = (Signal it) -> { | 323 | throw new StormDftException(((("Storm unexpectedly killed by signal " + Integer.valueOf(signalNumber)) + ": ") + error)); |
338 | int _intValue_2 = it.intValue(); | ||
339 | return Boolean.valueOf((_intValue_2 == signalNumber)); | ||
340 | }; | ||
341 | final Signal signal = IterableExtensions.<Signal>findFirst(((Iterable<Signal>)Conversions.doWrapArray(Signal.values())), _function); | ||
342 | if ((signal != null)) { | ||
343 | throw new StormDftException(((("Storm unexpectedly killed by signal " + signal) + ": ") + error)); | ||
344 | } | ||
345 | } | 324 | } |
346 | throw new StormDftException(((("Storm unexpectedly exit with status " + Integer.valueOf(exitValue)) + ": ") + error)); | 325 | throw new StormDftException(((("Storm unexpectedly exit with status " + Integer.valueOf(exitValue)) + ": ") + error)); |
347 | } | 326 | } |
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/.classpath b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/.classpath new file mode 100644 index 00000000..428337e5 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/.classpath | |||
@@ -0,0 +1,8 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <classpath> | ||
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"/> | ||
5 | <classpathentry kind="src" path="src"/> | ||
6 | <classpathentry kind="src" path="xtend-gen"/> | ||
7 | <classpathentry kind="output" path="bin"/> | ||
8 | </classpath> | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/.project b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/.project new file mode 100644 index 00000000..98f85839 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/.project | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <projectDescription> | ||
3 | <name>hu.bme.mit.inf.dslreasoner.faulttree.ui</name> | ||
4 | <comment></comment> | ||
5 | <projects> | ||
6 | </projects> | ||
7 | <buildSpec> | ||
8 | <buildCommand> | ||
9 | <name>org.eclipse.xtext.ui.shared.xtextBuilder</name> | ||
10 | <arguments> | ||
11 | </arguments> | ||
12 | </buildCommand> | ||
13 | <buildCommand> | ||
14 | <name>org.eclipse.jdt.core.javabuilder</name> | ||
15 | <arguments> | ||
16 | </arguments> | ||
17 | </buildCommand> | ||
18 | <buildCommand> | ||
19 | <name>org.eclipse.pde.ManifestBuilder</name> | ||
20 | <arguments> | ||
21 | </arguments> | ||
22 | </buildCommand> | ||
23 | <buildCommand> | ||
24 | <name>org.eclipse.pde.SchemaBuilder</name> | ||
25 | <arguments> | ||
26 | </arguments> | ||
27 | </buildCommand> | ||
28 | </buildSpec> | ||
29 | <natures> | ||
30 | <nature>org.eclipse.pde.PluginNature</nature> | ||
31 | <nature>org.eclipse.jdt.core.javanature</nature> | ||
32 | <nature>org.eclipse.xtext.ui.shared.xtextNature</nature> | ||
33 | </natures> | ||
34 | </projectDescription> | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/.settings/org.eclipse.jdt.core.prefs b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 00000000..0c68a61d --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/.settings/org.eclipse.jdt.core.prefs | |||
@@ -0,0 +1,7 @@ | |||
1 | eclipse.preferences.version=1 | ||
2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 | ||
4 | org.eclipse.jdt.core.compiler.compliance=1.8 | ||
5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | org.eclipse.jdt.core.compiler.source=1.8 | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/META-INF/MANIFEST.MF b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/META-INF/MANIFEST.MF new file mode 100644 index 00000000..59c1c5f7 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/META-INF/MANIFEST.MF | |||
@@ -0,0 +1,25 @@ | |||
1 | Manifest-Version: 1.0 | ||
2 | Bundle-ManifestVersion: 2 | ||
3 | Bundle-Name: Ui | ||
4 | Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.faulttree.ui;singleton:=true | ||
5 | Bundle-Version: 1.0.0.qualifier | ||
6 | Bundle-Activator: hu.bme.mit.inf.dslreasoner.faulttree.ui.Activator | ||
7 | Require-Bundle: org.eclipse.ui, | ||
8 | org.eclipse.core.runtime, | ||
9 | com.google.guava, | ||
10 | org.eclipse.xtext.xbase.lib, | ||
11 | org.eclipse.xtend.lib, | ||
12 | org.eclipse.xtend.lib.macro, | ||
13 | org.eclipse.core.resources, | ||
14 | org.eclipse.emf.ecore, | ||
15 | org.eclipse.viatra.query.runtime, | ||
16 | org.eclipse.viatra.query.runtime.rete, | ||
17 | org.eclipse.viatra.query.runtime.localsearch, | ||
18 | hu.bme.mit.inf.dslreasoner.logic.model, | ||
19 | hu.bme.mit.inf.dslreasoner.faulttree.components, | ||
20 | hu.bme.mit.inf.dslreasoner.faulttree.transformation, | ||
21 | hu.bme.mit.inf.dslreasoner.application, | ||
22 | hu.bme.mit.inf.dslreasoner.application.ui | ||
23 | Bundle-RequiredExecutionEnvironment: JavaSE-1.8 | ||
24 | Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.faulttree.ui | ||
25 | Bundle-ActivationPolicy: lazy | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/bin/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/bin/.gitignore new file mode 100644 index 00000000..1c0a02cd --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/bin/.gitignore | |||
@@ -0,0 +1 @@ | |||
/hu/ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/build.properties b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/build.properties new file mode 100644 index 00000000..e9863e28 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/build.properties | |||
@@ -0,0 +1,5 @@ | |||
1 | source.. = src/ | ||
2 | output.. = bin/ | ||
3 | bin.includes = META-INF/,\ | ||
4 | .,\ | ||
5 | plugin.xml | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/plugin.xml b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/plugin.xml new file mode 100644 index 00000000..8a01c50c --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/plugin.xml | |||
@@ -0,0 +1,25 @@ | |||
1 | <?xml version="1.0" encoding="UTF-8"?> | ||
2 | <?eclipse version="3.4"?> | ||
3 | <plugin> | ||
4 | <extension | ||
5 | point="org.eclipse.ui.menus"> | ||
6 | <menuContribution | ||
7 | allPopups="false" | ||
8 | locationURI="popup:hu.bme.mit.inf.dslreasoner.application.ui.menu?after=hu.bme.mit.inf.dslreasoner.application.ui.executescript"> | ||
9 | <command | ||
10 | commandId="hu.bme.mit.inf.dslreasoner.faulttree.ui.reliabilityanalysis" | ||
11 | label="Reliability Analysis..." | ||
12 | style="push"> | ||
13 | </command> | ||
14 | </menuContribution> | ||
15 | </extension> | ||
16 | <extension | ||
17 | point="org.eclipse.ui.commands"> | ||
18 | <command | ||
19 | defaultHandler="hu.bme.mit.inf.dslreasoner.faulttree.ui.handler.ReliabilityAnalysisHandler" | ||
20 | id="hu.bme.mit.inf.dslreasoner.faulttree.ui.reliabilityanalysis" | ||
21 | name="Execute Reliability Analysis"> | ||
22 | </command> | ||
23 | </extension> | ||
24 | |||
25 | </plugin> | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/ui/Activator.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/ui/Activator.java new file mode 100644 index 00000000..4363fc63 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/ui/Activator.java | |||
@@ -0,0 +1,44 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.ui; | ||
2 | |||
3 | import org.eclipse.ui.plugin.AbstractUIPlugin; | ||
4 | import org.osgi.framework.BundleContext; | ||
5 | |||
6 | /** | ||
7 | * The activator class controls the plug-in life cycle | ||
8 | */ | ||
9 | public class Activator extends AbstractUIPlugin { | ||
10 | |||
11 | // The plug-in ID | ||
12 | public static final String PLUGIN_ID = "hu.bme.mit.inf.dslreasoner.faulttree.ui"; //$NON-NLS-1$ | ||
13 | |||
14 | // The shared instance | ||
15 | private static Activator plugin; | ||
16 | |||
17 | /** | ||
18 | * The constructor | ||
19 | */ | ||
20 | public Activator() { | ||
21 | } | ||
22 | |||
23 | @Override | ||
24 | public void start(BundleContext context) throws Exception { | ||
25 | super.start(context); | ||
26 | plugin = this; | ||
27 | } | ||
28 | |||
29 | @Override | ||
30 | public void stop(BundleContext context) throws Exception { | ||
31 | plugin = null; | ||
32 | super.stop(context); | ||
33 | } | ||
34 | |||
35 | /** | ||
36 | * Returns the shared instance | ||
37 | * | ||
38 | * @return the shared instance | ||
39 | */ | ||
40 | public static Activator getDefault() { | ||
41 | return plugin; | ||
42 | } | ||
43 | |||
44 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/ui/handler/ReliabilityAnalysisHandler.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/ui/handler/ReliabilityAnalysisHandler.xtend new file mode 100644 index 00000000..5fa89148 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/src/hu/bme/mit/inf/dslreasoner/faulttree/ui/handler/ReliabilityAnalysisHandler.xtend | |||
@@ -0,0 +1,128 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.ui.handler | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.application.execution.EclipseBasedProgressMonitor | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft.Cft2FtTransformation | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.Ecore2CftTransformation | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.FtAnalysisObjective | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.ReliabilityResult | ||
10 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.StormDftConfiguration | ||
11 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.StormDftSolver | ||
12 | import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel | ||
13 | import hu.bme.mit.inf.dslreasoner.workspace.ProjectWorkspace | ||
14 | import org.eclipse.core.commands.AbstractHandler | ||
15 | import org.eclipse.core.commands.ExecutionEvent | ||
16 | import org.eclipse.core.commands.ExecutionException | ||
17 | import org.eclipse.core.resources.IFile | ||
18 | import org.eclipse.core.resources.IProject | ||
19 | import org.eclipse.core.resources.IResource | ||
20 | import org.eclipse.core.runtime.IProgressMonitor | ||
21 | import org.eclipse.core.runtime.NullProgressMonitor | ||
22 | import org.eclipse.emf.common.util.URI | ||
23 | import org.eclipse.emf.ecore.resource.Resource | ||
24 | import org.eclipse.emf.ecore.resource.ResourceSet | ||
25 | import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl | ||
26 | import org.eclipse.swt.widgets.MessageBox | ||
27 | import org.eclipse.ui.PlatformUI | ||
28 | import org.eclipse.ui.handlers.HandlerUtil | ||
29 | import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine | ||
30 | import org.eclipse.viatra.query.runtime.emf.EMFScope | ||
31 | |||
32 | class ReliabilityAnalysisHandler extends AbstractHandler { | ||
33 | |||
34 | override execute(ExecutionEvent event) throws ExecutionException { | ||
35 | val selection = HandlerUtil.getCurrentStructuredSelection(event) | ||
36 | val resourceSet = new ResourceSetImpl | ||
37 | val iterator = selection.iterator | ||
38 | var IProject targetProject = null | ||
39 | var Resource targetResource = null | ||
40 | var TransformationDefinition transformationDefinition = null | ||
41 | while (iterator.hasNext) { | ||
42 | val selectedElement = iterator.next | ||
43 | if (selectedElement instanceof IFile) { | ||
44 | val resource = tryLoadResource(resourceSet, selectedElement) | ||
45 | if (resource !== null && !resource.contents.empty) { | ||
46 | val rootElement = resource.contents.head | ||
47 | if (rootElement instanceof CftModel) { | ||
48 | if (rootElement.transformationDefinitions.empty) { | ||
49 | throw new IllegalArgumentException("Selected cft file is not a transformation definition.") | ||
50 | } | ||
51 | if (transformationDefinition !== null) { | ||
52 | throw new IllegalArgumentException( | ||
53 | "Only a single transformation definition may be selected.") | ||
54 | } | ||
55 | transformationDefinition = rootElement.transformationDefinitions.head | ||
56 | } else { | ||
57 | if (targetResource !== null) { | ||
58 | throw new IllegalArgumentException("Only a single architecture model may be selected.") | ||
59 | } | ||
60 | targetResource = resource | ||
61 | targetProject = selectedElement.project | ||
62 | } | ||
63 | } | ||
64 | } | ||
65 | } | ||
66 | if (targetResource === null || targetResource === null) { | ||
67 | throw new IllegalArgumentException( | ||
68 | "A transformation definition and an architecture model must be selected.") | ||
69 | } | ||
70 | runAnalysis(transformationDefinition, targetResource, targetProject, new NullProgressMonitor) | ||
71 | null | ||
72 | } | ||
73 | |||
74 | private static def tryLoadResource(ResourceSet resourceSet, IFile file) { | ||
75 | val fullPath = file.fullPath.toString | ||
76 | val uri = URI.createPlatformResourceURI(fullPath, true) | ||
77 | try { | ||
78 | resourceSet.getResource(uri, true) | ||
79 | } catch (RuntimeException e) { | ||
80 | null | ||
81 | } | ||
82 | } | ||
83 | |||
84 | private def runAnalysis(TransformationDefinition transformationDefinition, Resource resource, IProject project, | ||
85 | IProgressMonitor monitor) { | ||
86 | val workspace = createWorkspace(project, monitor) | ||
87 | val cft = createComponentFaultTree(transformationDefinition, resource) | ||
88 | workspace.writeModel(cft, "cft.xmi") | ||
89 | val cft2ft = new Cft2FtTransformation | ||
90 | val ft = cft2ft.createFaultTree(cft) | ||
91 | workspace.writeModel(ft, "ft.xmi") | ||
92 | val solver = new StormDftSolver | ||
93 | val config = new StormDftConfiguration | ||
94 | config.progressMonitor = new EclipseBasedProgressMonitor(monitor) | ||
95 | config.documentationLevel = DocumentationLevel.NORMAL | ||
96 | config.objective = FtAnalysisObjective.MTTF | ||
97 | val result = solver.solve(ft, config, workspace) | ||
98 | displayResult(result) | ||
99 | } | ||
100 | |||
101 | private def createWorkspace(IProject project, IProgressMonitor monitor) { | ||
102 | val folder = project.getFolder("debug") | ||
103 | if (!folder.exists) { | ||
104 | folder.create(IResource.NONE, true, monitor) | ||
105 | } | ||
106 | val path = folder.fullPath.toString | ||
107 | val uri = URI.createPlatformResourceURI(path, true) | ||
108 | val workspace = new ProjectWorkspace(uri.toString, "") | ||
109 | workspace.initAndClear | ||
110 | workspace | ||
111 | } | ||
112 | |||
113 | private def createComponentFaultTree(TransformationDefinition transformationDefinition, Resource resource) { | ||
114 | val queryEngine = AdvancedViatraQueryEngine.createUnmanagedEngine(new EMFScope(resource)) | ||
115 | try { | ||
116 | val ecore2cft = new Ecore2CftTransformation(transformationDefinition, queryEngine) | ||
117 | ecore2cft.createComponentFaultTree | ||
118 | } finally { | ||
119 | queryEngine.dispose | ||
120 | } | ||
121 | } | ||
122 | |||
123 | private def displayResult(ReliabilityResult result) { | ||
124 | val messageBox = new MessageBox(PlatformUI.workbench.activeWorkbenchWindow.shell) | ||
125 | messageBox.message = result.toString | ||
126 | messageBox.open | ||
127 | } | ||
128 | } | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/ui/handler/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/ui/handler/.gitignore new file mode 100644 index 00000000..b271af76 --- /dev/null +++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/ui/handler/.gitignore | |||
@@ -0,0 +1,3 @@ | |||
1 | /.ReliabilityAnalysisHandler.java._trace | ||
2 | /.ReliabilityAnalysisHandler.xtendbin | ||
3 | /ReliabilityAnalysisHandler.java | ||