From d90bedacaafe87e06fddaa05a6ff9b7b796e97e7 Mon Sep 17 00:00:00 2001
From: Kristóf Marussy
Date: Sat, 16 Feb 2019 00:43:11 +0100
Subject: Two-valued fault tree analyzer WIP
---
.../antlr/internal/InternalCftLanguage.g | 12 +-
.../antlr/internal/InternalCftLanguage.tokens | 2 +-
.../antlr/internal/InternalCftLanguageLexer.java | 122 +++---
.../antlr/internal/InternalCftLanguageParser.java | 53 +--
.../components/ide/.CftLanguageIdeModule.xtendbin | Bin 1712 -> 1712 bytes
.../components/ide/.CftLanguageIdeSetup.xtendbin | Bin 2549 -> 2549 bytes
.../components/ui/.CftLanguageUiModule.xtendbin | Bin 3606 -> 3606 bytes
.../.CftLanguageProposalProvider.xtendbin | Bin 1820 -> 1820 bytes
.../.CftLanguageDescriptionLabelProvider.xtendbin | Bin 1993 -> 1993 bytes
.../ui/labeling/.CftLanguageLabelProvider.xtendbin | Bin 2885 -> 2885 bytes
.../.CftLanguageOutlineTreeProvider.xtendbin | Bin 2451 -> 2451 bytes
.../quickfix/.CftLanguageQuickfixProvider.xtendbin | Bin 1819 -> 1819 bytes
...LanguageSemanticHighlightingCalculator.xtendbin | Bin 3773 -> 3773 bytes
.../.CftLanguageTokenToAttributeIdMapper.xtendbin | Bin 2740 -> 2740 bytes
.../faulttree/components/CftLanguage.xtextbin | Bin 5923 -> 5927 bytes
.../parser/antlr/internal/InternalCftLanguage.g | 15 +-
.../antlr/internal/InternalCftLanguage.tokens | 2 +-
.../antlr/internal/InternalCftLanguageLexer.java | 198 ++++-----
.../antlr/internal/InternalCftLanguageParser.java | 143 +++----
.../serializer/CftLanguageSemanticSequencer.java | 2 +-
.../services/CftLanguageGrammarAccess.java | 26 +-
.../faulttree/components/CftLanguage.xtext | 4 +-
.../components/.CftLanguageRuntimeModule.xtendbin | Bin 3436 -> 3436 bytes
.../.CftLanguageStandaloneSetup.xtendbin | Bin 2015 -> 2015 bytes
.../.CftLanguageValueConverterService.xtendbin | Bin 3002 -> 3002 bytes
.../conversion/.OF_INTValueConverter.xtendbin | Bin 4411 -> 4411 bytes
.../generator/.CftLanguageGenerator.xtendbin | Bin 2365 -> 2365 bytes
.../.CftLanguageQualifiedNameProvider.xtendbin | Bin 3630 -> 3630 bytes
.../naming/.PackageNameProvider.xtendbin | Bin 3283 -> 3283 bytes
...portedNamespaceAwareLocalScopeProvider.xtendbin | Bin 4651 -> 4651 bytes
.../scoping/.CftLanguageScopeProvider.xtendbin | Bin 8989 -> 8989 bytes
.../validation/.CftLanguageValidator.xtendbin | Bin 1760 -> 1760 bytes
.../dslreasoner/faulttree/model/ft/BasicEvent.java | 2 +-
.../faulttree/model/ft/ConstantEvent.java | 49 +++
.../faulttree/model/ft/ConstantModel.java | 49 +++
.../inf/dslreasoner/faulttree/model/ft/Event.java | 32 --
.../dslreasoner/faulttree/model/ft/FaultTree.java | 14 +-
.../dslreasoner/faulttree/model/ft/FtFactory.java | 18 +
.../dslreasoner/faulttree/model/ft/FtPackage.java | 308 ++++++++++++--
.../inf/dslreasoner/faulttree/model/ft/Gate.java | 8 +-
.../dslreasoner/faulttree/model/ft/KOfMGate.java | 27 --
.../faulttree/model/ft/RandomEvent.java | 49 +++
.../faulttree/model/ft/ReliabilityModel.java | 18 +
.../faulttree/model/ft/impl/BasicEventImpl.java | 2 +-
.../faulttree/model/ft/impl/ConstantEventImpl.java | 164 ++++++++
.../faulttree/model/ft/impl/ConstantModelImpl.java | 164 ++++++++
.../faulttree/model/ft/impl/EventImpl.java | 126 ------
.../faulttree/model/ft/impl/FaultTreeImpl.java | 29 +-
.../faulttree/model/ft/impl/FtFactoryImpl.java | 24 ++
.../faulttree/model/ft/impl/FtPackageImpl.java | 140 ++++++-
.../faulttree/model/ft/impl/GateImpl.java | 12 +-
.../faulttree/model/ft/impl/KOfMGateImpl.java | 56 ---
.../faulttree/model/ft/impl/RandomEventImpl.java | 164 ++++++++
.../model/ft/impl/ReliabilityModelImpl.java | 39 ++
.../faulttree/model/ft/util/FtAdapterFactory.java | 82 +++-
.../faulttree/model/ft/util/FtSwitch.java | 105 ++++-
.../model/ft.ecore | 25 +-
.../model/ft.genmodel | 13 +-
.../representations.aird | 291 +++++++++++--
.../META-INF/MANIFEST.MF | 9 +-
.../build.properties | 3 +-
.../cft2ft/Cft2FtTransformation.xtend | 20 +-
.../transformation/cft2ft/EventCollection.xtend | 90 ++++
.../transformation/cft2ft/EventMaterializer.xtend | 192 +++++++++
.../transformation/cft2ft/FaultTreeBuilder.xtend | 39 ++
.../ecore2cft/Ecore2CftTransformation.xtend | 1 +
.../ft2galileo/Ft2GalileoTransformation.xtend | 56 +++
.../transformation/solver/ReliabilityResult.xtend | 51 +++
.../solver/StormDftConfiguration.xtend | 45 ++
.../transformation/solver/StormDftHandler.xtend | 186 +++++++++
.../transformation/solver/StormDftSolver.xtend | 43 ++
.../cft2ft/.Cft2FtTransformation.xtendbin | Bin 2298 -> 2825 bytes
.../cft2ft/.EventCollection.xtendbin | Bin 0 -> 7022 bytes
.../cft2ft/.EventMaterializer.xtendbin | Bin 0 -> 11749 bytes
.../cft2ft/.FaultTreeBuilder.xtendbin | Bin 0 -> 4029 bytes
.../faulttree/transformation/cft2ft/.gitignore | 7 +
.../cft2ft/Cft2FtTransformation.java | 43 +-
.../transformation/cft2ft/EventCollection.java | 188 +++++++++
.../transformation/cft2ft/EventMaterializer.java | 456 +++++++++++++++++++++
.../transformation/cft2ft/FaultTreeBuilder.java | 57 +++
.../ecore2cft/.ComponentFaultTreeTrace.xtendbin | Bin 5009 -> 5009 bytes
.../ecore2cft/.ComponentInstanceTrace.xtendbin | Bin 5190 -> 5190 bytes
.../ecore2cft/.ComponentNameGenerator.xtendbin | Bin 3472 -> 3472 bytes
.../ecore2cft/.Ecore2CftTransformation.xtendbin | Bin 3400 -> 3431 bytes
.../transformation/ecore2cft/.InputTrace.xtendbin | Bin 3849 -> 3849 bytes
.../ecore2cft/.LookupHandler.xtendbin | Bin 5169 -> 5169 bytes
.../ecore2cft/.MappingHandler.xtendbin | Bin 6876 -> 6876 bytes
.../ecore2cft/.MappingQueries.xtendbin | Bin 4833 -> 4833 bytes
.../ecore2cft/Ecore2CftTransformation.java | 20 +-
.../ft2galileo/.Ft2GalileoTransformation.xtendbin | Bin 0 -> 4761 bytes
.../faulttree/transformation/ft2galileo/.gitignore | 1 +
.../ft2galileo/Ft2GalileoTransformation.java | 181 ++++++++
.../solver/.ReliabilityResult.xtendbin | Bin 0 -> 5435 bytes
.../solver/.StormDftConfiguration.xtendbin | Bin 0 -> 4311 bytes
.../solver/.StormDftHandler.xtendbin | Bin 0 -> 13615 bytes
.../transformation/solver/.StormDftSolver.xtendbin | Bin 0 -> 4801 bytes
.../faulttree/transformation/solver/.gitignore | 9 +
.../solver/ApproximationHeuristic.java | 8 +
.../transformation/solver/FtAnalysisObjective.java | 14 +
.../transformation/solver/ReliabilityResult.java | 156 +++++++
.../solver/StormDftConfiguration.java | 31 ++
.../transformation/solver/StormDftException.java | 12 +
.../transformation/solver/StormDftHandler.java | 351 ++++++++++++++++
.../transformation/solver/StormDftSolver.java | 79 ++++
104 files changed, 4237 insertions(+), 700 deletions(-)
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ConstantEvent.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ConstantModel.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/RandomEvent.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ReliabilityModel.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantEventImpl.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantModelImpl.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/RandomEventImpl.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ReliabilityModelImpl.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventCollection.xtend
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.xtend
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.xtend
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.xtend
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ReliabilityResult.xtend
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftConfiguration.xtend
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.xtend
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftSolver.xtend
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventCollection.xtendbin
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventMaterializer.xtendbin
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.FaultTreeBuilder.xtendbin
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventCollection.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.Ft2GalileoTransformation.xtendbin
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.gitignore
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.ReliabilityResult.xtendbin
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftConfiguration.xtendbin
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftHandler.xtendbin
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftSolver.xtendbin
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.gitignore
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ApproximationHeuristic.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/FtAnalysisObjective.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ReliabilityResult.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftConfiguration.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftException.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.java
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftSolver.java
(limited to 'Stochastic')
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguage.g b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguage.g
index 7c04c163..6ccf7334 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguage.g
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguage.g
@@ -1564,9 +1564,9 @@ rule__ConstantDistribution__Group__0__Impl
}
:
(
- { before(grammarAccess.getConstantDistributionAccess().getPKeyword_0()); }
- 'p'
- { after(grammarAccess.getConstantDistributionAccess().getPKeyword_0()); }
+ { before(grammarAccess.getConstantDistributionAccess().getProbKeyword_0()); }
+ 'prob'
+ { after(grammarAccess.getConstantDistributionAccess().getProbKeyword_0()); }
)
;
finally {
@@ -4133,9 +4133,9 @@ rule__ComponentInstance__NameAssignment_2
}
:
(
- { before(grammarAccess.getComponentInstanceAccess().getNameIDTerminalRuleCall_2_0()); }
- RULE_ID
- { after(grammarAccess.getComponentInstanceAccess().getNameIDTerminalRuleCall_2_0()); }
+ { before(grammarAccess.getComponentInstanceAccess().getNameValidIdParserRuleCall_2_0()); }
+ ruleValidId
+ { after(grammarAccess.getComponentInstanceAccess().getNameValidIdParserRuleCall_2_0()); }
)
;
finally {
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguage.tokens b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguage.tokens
index ee87b574..76556942 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguage.tokens
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguage.tokens
@@ -20,8 +20,8 @@
'of'=27
'or'=26
'out'=21
-'p'=22
'package'=14
+'prob'=22
'toplevel'=39
'transformation'=28
'{'=18
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguageLexer.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguageLexer.java
index 21e09c33..6a06d1ec 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguageLexer.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguageLexer.java
@@ -255,10 +255,11 @@ public class InternalCftLanguageLexer extends Lexer {
try {
int _type = T__22;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // InternalCftLanguage.g:20:7: ( 'p' )
- // InternalCftLanguage.g:20:9: 'p'
+ // InternalCftLanguage.g:20:7: ( 'prob' )
+ // InternalCftLanguage.g:20:9: 'prob'
{
- match('p');
+ match("prob");
+
}
@@ -1729,21 +1730,21 @@ public class InternalCftLanguageLexer extends Lexer {
}
}
static final String DFA20_eotS =
- "\1\uffff\1\34\1\37\1\uffff\2\40\2\uffff\1\40\1\53\4\40\5\uffff\2\34\1\72\1\34\1\uffff\3\34\3\uffff\1\40\3\uffff\1\40\1\103\1\40\2\uffff\1\40\1\106\1\110\2\uffff\3\40\1\114\3\40\10\uffff\1\72\5\uffff\2\40\1\uffff\1\122\1\123\1\uffff\1\124\1\uffff\2\40\1\127\1\uffff\5\40\3\uffff\2\40\1\uffff\13\40\1\152\1\153\1\154\3\40\1\160\3\uffff\2\40\1\163\1\uffff\1\40\1\165\1\uffff\1\40\1\uffff\4\40\1\173\1\uffff";
+ "\1\uffff\1\34\1\40\1\uffff\2\40\2\uffff\1\40\1\53\4\40\5\uffff\2\34\1\74\1\34\1\uffff\3\34\3\uffff\2\40\2\uffff\1\40\1\104\1\40\2\uffff\1\40\1\107\1\110\2\uffff\3\40\1\115\3\40\10\uffff\1\74\5\uffff\3\40\1\uffff\1\124\1\125\2\uffff\1\126\2\40\1\131\1\uffff\4\40\1\136\1\40\3\uffff\2\40\1\uffff\4\40\1\uffff\7\40\1\155\1\156\1\157\3\40\1\163\3\uffff\2\40\1\166\1\uffff\1\40\1\170\1\uffff\1\40\1\uffff\4\40\1\176\1\uffff";
static final String DFA20_eofS =
- "\174\uffff";
+ "\177\uffff";
static final String DFA20_minS =
- "\1\0\1\75\1\60\1\uffff\1\155\1\146\2\uffff\1\146\1\76\1\141\1\156\1\157\1\141\5\uffff\1\135\1\75\1\56\1\101\1\uffff\2\0\1\52\3\uffff\1\143\3\uffff\1\160\1\60\1\164\2\uffff\1\164\2\60\2\uffff\1\155\1\157\1\144\1\60\1\141\2\160\10\uffff\1\56\5\uffff\1\153\1\157\1\uffff\2\60\1\uffff\1\60\1\uffff\1\142\1\153\1\60\1\uffff\1\156\1\154\1\160\1\141\1\162\3\uffff\1\144\1\165\1\uffff\1\163\1\145\1\151\1\147\1\164\1\141\1\160\1\146\1\166\1\156\1\145\3\60\1\157\1\145\1\147\1\60\3\uffff\1\162\1\154\1\60\1\uffff\1\155\1\60\1\uffff\1\141\1\uffff\1\164\1\151\1\157\1\156\1\60\1\uffff";
+ "\1\0\1\75\1\141\1\uffff\1\155\1\146\2\uffff\1\146\1\76\1\141\1\156\1\157\1\141\5\uffff\1\135\1\75\1\56\1\101\1\uffff\2\0\1\52\3\uffff\1\143\1\157\2\uffff\1\160\1\60\1\164\2\uffff\1\164\2\60\2\uffff\1\155\1\157\1\144\1\60\1\141\2\160\10\uffff\1\56\5\uffff\1\153\1\142\1\157\1\uffff\2\60\2\uffff\1\60\1\142\1\153\1\60\1\uffff\1\156\1\154\1\160\1\141\1\60\1\162\3\uffff\1\144\1\165\1\uffff\1\163\1\145\1\151\1\147\1\uffff\1\164\1\141\1\160\1\146\1\166\1\156\1\145\3\60\1\157\1\145\1\147\1\60\3\uffff\1\162\1\154\1\60\1\uffff\1\155\1\60\1\uffff\1\141\1\uffff\1\164\1\151\1\157\1\156\1\60\1\uffff";
static final String DFA20_maxS =
- "\1\uffff\1\75\1\172\1\uffff\1\156\1\146\2\uffff\1\165\1\76\1\157\1\163\1\162\1\141\5\uffff\1\135\1\75\1\145\1\172\1\uffff\2\uffff\1\57\3\uffff\1\143\3\uffff\1\160\1\172\1\164\2\uffff\1\164\2\172\2\uffff\1\155\1\157\1\144\1\172\1\141\2\160\10\uffff\1\145\5\uffff\1\153\1\157\1\uffff\2\172\1\uffff\1\172\1\uffff\1\142\1\153\1\172\1\uffff\1\156\1\154\1\160\1\141\1\162\3\uffff\1\144\1\165\1\uffff\1\163\1\145\1\151\1\147\1\164\1\141\1\160\1\146\1\166\1\156\1\145\3\172\1\157\1\145\1\147\1\172\3\uffff\1\162\1\154\1\172\1\uffff\1\155\1\172\1\uffff\1\141\1\uffff\1\164\1\151\1\157\1\156\1\172\1\uffff";
+ "\1\uffff\1\75\1\162\1\uffff\1\156\1\146\2\uffff\1\165\1\76\1\157\1\163\1\162\1\141\5\uffff\1\135\1\75\1\145\1\172\1\uffff\2\uffff\1\57\3\uffff\1\143\1\157\2\uffff\1\160\1\172\1\164\2\uffff\1\164\2\172\2\uffff\1\155\1\157\1\144\1\172\1\141\2\160\10\uffff\1\145\5\uffff\1\153\1\142\1\157\1\uffff\2\172\2\uffff\1\172\1\142\1\153\1\172\1\uffff\1\156\1\154\1\160\1\141\1\172\1\162\3\uffff\1\144\1\165\1\uffff\1\163\1\145\1\151\1\147\1\uffff\1\164\1\141\1\160\1\146\1\166\1\156\1\145\3\172\1\157\1\145\1\147\1\172\3\uffff\1\162\1\154\1\172\1\uffff\1\155\1\172\1\uffff\1\141\1\uffff\1\164\1\151\1\157\1\156\1\172\1\uffff";
static final String DFA20_acceptS =
- "\3\uffff\1\3\2\uffff\1\6\1\7\6\uffff\1\22\1\23\1\24\1\27\1\31\4\uffff\1\37\3\uffff\1\44\1\45\1\1\1\uffff\1\12\1\37\1\3\3\uffff\1\6\1\7\3\uffff\1\30\1\13\7\uffff\1\22\1\23\1\24\1\27\1\31\1\32\1\34\1\40\1\uffff\1\36\1\41\1\42\1\43\1\44\2\uffff\1\10\2\uffff\1\16\1\uffff\1\17\3\uffff\1\26\5\uffff\1\5\1\11\1\35\2\uffff\1\15\22\uffff\1\4\1\14\1\25\3\uffff\1\2\2\uffff\1\21\1\uffff\1\33\5\uffff\1\20";
+ "\3\uffff\1\3\2\uffff\1\6\1\7\6\uffff\1\22\1\23\1\24\1\27\1\31\4\uffff\1\37\3\uffff\1\44\1\45\1\1\2\uffff\1\37\1\3\3\uffff\1\6\1\7\3\uffff\1\30\1\13\7\uffff\1\22\1\23\1\24\1\27\1\31\1\32\1\34\1\36\1\uffff\1\40\1\41\1\42\1\43\1\44\3\uffff\1\10\2\uffff\1\16\1\17\4\uffff\1\26\6\uffff\1\5\1\11\1\35\2\uffff\1\15\4\uffff\1\12\16\uffff\1\4\1\14\1\25\3\uffff\1\2\2\uffff\1\21\1\uffff\1\33\5\uffff\1\20";
static final String DFA20_specialS =
- "\1\2\27\uffff\1\1\1\0\142\uffff}>";
+ "\1\0\27\uffff\1\2\1\1\145\uffff}>";
static final String[] DFA20_transitionS = {
"\11\34\2\33\2\34\1\33\22\34\1\33\1\34\1\30\4\34\1\31\1\16\1\17\1\22\1\24\1\20\1\34\1\21\1\32\12\25\1\1\1\3\1\34\1\11\3\34\32\27\1\23\2\34\1\26\1\27\1\34\1\13\1\27\1\5\5\27\1\4\2\27\1\12\1\15\1\27\1\10\1\2\3\27\1\14\6\27\1\6\1\34\1\7\uff82\34",
"\1\35",
- "\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\1\36\31\40",
+ "\1\36\20\uffff\1\37",
"",
"\1\42\1\43",
"\1\44",
@@ -1762,7 +1763,7 @@ public class InternalCftLanguageLexer extends Lexer {
"",
"\1\70",
"\1\71",
- "\1\74\1\uffff\12\73\13\uffff\1\74\37\uffff\1\74",
+ "\1\72\1\uffff\12\73\13\uffff\1\72\37\uffff\1\72",
"\32\40\4\uffff\1\40\1\uffff\32\40",
"",
"\0\75",
@@ -1772,26 +1773,26 @@ public class InternalCftLanguageLexer extends Lexer {
"",
"",
"\1\101",
+ "\1\102",
"",
"",
- "",
- "\1\102",
+ "\1\103",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
- "\1\104",
+ "\1\105",
"",
"",
- "\1\105",
+ "\1\106",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
- "\12\107\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
+ "\12\111\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
"",
"",
- "\1\111",
"\1\112",
"\1\113",
+ "\1\114",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
- "\1\115",
"\1\116",
"\1\117",
+ "\1\120",
"",
"",
"",
@@ -1800,69 +1801,72 @@ public class InternalCftLanguageLexer extends Lexer {
"",
"",
"",
- "\1\74\1\uffff\12\73\13\uffff\1\74\37\uffff\1\74",
+ "\1\72\1\uffff\12\73\13\uffff\1\72\37\uffff\1\72",
"",
"",
"",
"",
"",
- "\1\120",
"\1\121",
+ "\1\122",
+ "\1\123",
"",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
"",
- "\12\107\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
"",
- "\1\125",
- "\1\126",
+ "\12\111\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
+ "\1\127",
+ "\1\130",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
"",
- "\1\130",
- "\1\131",
"\1\132",
"\1\133",
"\1\134",
+ "\1\135",
+ "\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
+ "\1\137",
"",
"",
"",
- "\1\135",
- "\1\136",
- "",
- "\1\137",
"\1\140",
"\1\141",
+ "",
"\1\142",
"\1\143",
"\1\144",
"\1\145",
+ "",
"\1\146",
"\1\147",
"\1\150",
"\1\151",
+ "\1\152",
+ "\1\153",
+ "\1\154",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
- "\1\155",
- "\1\156",
- "\1\157",
- "\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
- "",
- "",
- "",
+ "\1\160",
"\1\161",
"\1\162",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
"",
+ "",
+ "",
"\1\164",
+ "\1\165",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
"",
- "\1\166",
- "",
"\1\167",
- "\1\170",
+ "\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
+ "",
"\1\171",
+ "",
"\1\172",
+ "\1\173",
+ "\1\174",
+ "\1\175",
"\12\40\7\uffff\32\40\4\uffff\1\40\1\uffff\32\40",
""
};
@@ -1904,26 +1908,6 @@ public class InternalCftLanguageLexer extends Lexer {
int _s = s;
switch ( s ) {
case 0 :
- int LA20_25 = input.LA(1);
-
- s = -1;
- if ( ((LA20_25>='\u0000' && LA20_25<='\uFFFF')) ) {s = 61;}
-
- else s = 28;
-
- if ( s>=0 ) return s;
- break;
- case 1 :
- int LA20_24 = input.LA(1);
-
- s = -1;
- if ( ((LA20_24>='\u0000' && LA20_24<='\uFFFF')) ) {s = 61;}
-
- else s = 28;
-
- if ( s>=0 ) return s;
- break;
- case 2 :
int LA20_0 = input.LA(1);
s = -1;
@@ -1983,6 +1967,26 @@ public class InternalCftLanguageLexer extends Lexer {
else if ( ((LA20_0>='\u0000' && LA20_0<='\b')||(LA20_0>='\u000B' && LA20_0<='\f')||(LA20_0>='\u000E' && LA20_0<='\u001F')||LA20_0=='!'||(LA20_0>='#' && LA20_0<='&')||LA20_0=='-'||LA20_0=='<'||(LA20_0>='>' && LA20_0<='@')||(LA20_0>='\\' && LA20_0<=']')||LA20_0=='`'||LA20_0=='|'||(LA20_0>='~' && LA20_0<='\uFFFF')) ) {s = 28;}
+ if ( s>=0 ) return s;
+ break;
+ case 1 :
+ int LA20_25 = input.LA(1);
+
+ s = -1;
+ if ( ((LA20_25>='\u0000' && LA20_25<='\uFFFF')) ) {s = 61;}
+
+ else s = 28;
+
+ if ( s>=0 ) return s;
+ break;
+ case 2 :
+ int LA20_24 = input.LA(1);
+
+ s = -1;
+ if ( ((LA20_24>='\u0000' && LA20_24<='\uFFFF')) ) {s = 61;}
+
+ else s = 28;
+
if ( s>=0 ) return s;
break;
}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguageParser.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguageParser.java
index be5e3140..df83084b 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguageParser.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/contentassist/antlr/internal/InternalCftLanguageParser.java
@@ -22,7 +22,7 @@ import java.util.ArrayList;
@SuppressWarnings("all")
public class InternalCftLanguageParser extends AbstractInternalContentAssistParser {
public static final String[] tokenNames = new String[] {
- "", "", "", "", "RULE_ID", "RULE_OF_INT", "RULE_INT", "RULE_T_DOUBLE", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "':='", "'package'", "';'", "'import'", "'cft'", "'{'", "'}'", "'in'", "'out'", "'p'", "'='", "'lambda'", "'and'", "'or'", "'of'", "'transformation'", "'mapping'", "'('", "')'", "','", "'lookup'", "'as'", "'.'", "'=>'", "'*'", "'[]'", "'toplevel'", "'+='"
+ "", "", "", "", "RULE_ID", "RULE_OF_INT", "RULE_INT", "RULE_T_DOUBLE", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "':='", "'package'", "';'", "'import'", "'cft'", "'{'", "'}'", "'in'", "'out'", "'prob'", "'='", "'lambda'", "'and'", "'or'", "'of'", "'transformation'", "'mapping'", "'('", "')'", "','", "'lookup'", "'as'", "'.'", "'=>'", "'*'", "'[]'", "'toplevel'", "'+='"
};
public static final int RULE_STRING=8;
public static final int RULE_SL_COMMENT=10;
@@ -4992,21 +4992,21 @@ public class InternalCftLanguageParser extends AbstractInternalContentAssistPars
// $ANTLR start "rule__ConstantDistribution__Group__0__Impl"
- // InternalCftLanguage.g:1561:1: rule__ConstantDistribution__Group__0__Impl : ( 'p' ) ;
+ // InternalCftLanguage.g:1561:1: rule__ConstantDistribution__Group__0__Impl : ( 'prob' ) ;
public final void rule__ConstantDistribution__Group__0__Impl() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // InternalCftLanguage.g:1565:1: ( ( 'p' ) )
- // InternalCftLanguage.g:1566:1: ( 'p' )
+ // InternalCftLanguage.g:1565:1: ( ( 'prob' ) )
+ // InternalCftLanguage.g:1566:1: ( 'prob' )
{
- // InternalCftLanguage.g:1566:1: ( 'p' )
- // InternalCftLanguage.g:1567:2: 'p'
+ // InternalCftLanguage.g:1566:1: ( 'prob' )
+ // InternalCftLanguage.g:1567:2: 'prob'
{
- before(grammarAccess.getConstantDistributionAccess().getPKeyword_0());
+ before(grammarAccess.getConstantDistributionAccess().getProbKeyword_0());
match(input,22,FOLLOW_2);
- after(grammarAccess.getConstantDistributionAccess().getPKeyword_0());
+ after(grammarAccess.getConstantDistributionAccess().getProbKeyword_0());
}
@@ -9567,7 +9567,7 @@ public class InternalCftLanguageParser extends AbstractInternalContentAssistPars
// InternalCftLanguage.g:3065:1: ( rule__ComponentInstance__Group__1__Impl rule__ComponentInstance__Group__2 )
// InternalCftLanguage.g:3066:2: rule__ComponentInstance__Group__1__Impl rule__ComponentInstance__Group__2
{
- pushFollow(FOLLOW_34);
+ pushFollow(FOLLOW_3);
rule__ComponentInstance__Group__1__Impl();
state._fsp--;
@@ -9693,7 +9693,7 @@ public class InternalCftLanguageParser extends AbstractInternalContentAssistPars
int alt28=2;
int LA28_0 = input.LA(1);
- if ( (LA28_0==RULE_ID) ) {
+ if ( ((LA28_0>=RULE_ID && LA28_0<=RULE_OF_INT)) ) {
alt28=1;
}
switch (alt28) {
@@ -9880,7 +9880,7 @@ public class InternalCftLanguageParser extends AbstractInternalContentAssistPars
case 1 :
// InternalCftLanguage.g:3160:3: rule__QualifiedName__Group_1__0
{
- pushFollow(FOLLOW_35);
+ pushFollow(FOLLOW_34);
rule__QualifiedName__Group_1__0();
state._fsp--;
@@ -10245,7 +10245,7 @@ public class InternalCftLanguageParser extends AbstractInternalContentAssistPars
// InternalCftLanguage.g:3281:1: ( rule__QualifiedNameWithWildcard__Group_1__0__Impl rule__QualifiedNameWithWildcard__Group_1__1 )
// InternalCftLanguage.g:3282:2: rule__QualifiedNameWithWildcard__Group_1__0__Impl rule__QualifiedNameWithWildcard__Group_1__1
{
- pushFollow(FOLLOW_36);
+ pushFollow(FOLLOW_35);
rule__QualifiedNameWithWildcard__Group_1__0__Impl();
state._fsp--;
@@ -10588,7 +10588,7 @@ public class InternalCftLanguageParser extends AbstractInternalContentAssistPars
// InternalCftLanguage.g:3394:1: ( rule__ComponentDefinition__UnorderedGroup_3__Impl ( rule__ComponentDefinition__UnorderedGroup_3__1 )? )
// InternalCftLanguage.g:3395:2: rule__ComponentDefinition__UnorderedGroup_3__Impl ( rule__ComponentDefinition__UnorderedGroup_3__1 )?
{
- pushFollow(FOLLOW_37);
+ pushFollow(FOLLOW_36);
rule__ComponentDefinition__UnorderedGroup_3__Impl();
state._fsp--;
@@ -12562,21 +12562,25 @@ public class InternalCftLanguageParser extends AbstractInternalContentAssistPars
// $ANTLR start "rule__ComponentInstance__NameAssignment_2"
- // InternalCftLanguage.g:4130:1: rule__ComponentInstance__NameAssignment_2 : ( RULE_ID ) ;
+ // InternalCftLanguage.g:4130:1: rule__ComponentInstance__NameAssignment_2 : ( ruleValidId ) ;
public final void rule__ComponentInstance__NameAssignment_2() throws RecognitionException {
int stackSize = keepStackSize();
try {
- // InternalCftLanguage.g:4134:1: ( ( RULE_ID ) )
- // InternalCftLanguage.g:4135:2: ( RULE_ID )
+ // InternalCftLanguage.g:4134:1: ( ( ruleValidId ) )
+ // InternalCftLanguage.g:4135:2: ( ruleValidId )
{
- // InternalCftLanguage.g:4135:2: ( RULE_ID )
- // InternalCftLanguage.g:4136:3: RULE_ID
+ // InternalCftLanguage.g:4135:2: ( ruleValidId )
+ // InternalCftLanguage.g:4136:3: ruleValidId
{
- before(grammarAccess.getComponentInstanceAccess().getNameIDTerminalRuleCall_2_0());
- match(input,RULE_ID,FOLLOW_2);
- after(grammarAccess.getComponentInstanceAccess().getNameIDTerminalRuleCall_2_0());
+ before(grammarAccess.getComponentInstanceAccess().getNameValidIdParserRuleCall_2_0());
+ pushFollow(FOLLOW_2);
+ ruleValidId();
+
+ state._fsp--;
+
+ after(grammarAccess.getComponentInstanceAccess().getNameValidIdParserRuleCall_2_0());
}
@@ -12635,9 +12639,8 @@ public class InternalCftLanguageParser extends AbstractInternalContentAssistPars
public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x0000010000002000L});
public static final BitSet FOLLOW_32 = new BitSet(new long[]{0x0000000200000030L});
public static final BitSet FOLLOW_33 = new BitSet(new long[]{0x0000000800000000L});
- public static final BitSet FOLLOW_34 = new BitSet(new long[]{0x0000000000000010L});
- public static final BitSet FOLLOW_35 = new BitSet(new long[]{0x0000000800000002L});
- public static final BitSet FOLLOW_36 = new BitSet(new long[]{0x0000002000000000L});
- public static final BitSet FOLLOW_37 = new BitSet(new long[]{0x0000000000300002L});
+ public static final BitSet FOLLOW_34 = new BitSet(new long[]{0x0000000800000002L});
+ public static final BitSet FOLLOW_35 = new BitSet(new long[]{0x0000002000000000L});
+ public static final BitSet FOLLOW_36 = new BitSet(new long[]{0x0000000000300002L});
}
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 b146c48b..65b90333 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeModule.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeModule.xtendbin 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 8fc21e17..7fbd4ad1 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeSetup.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ide/.CftLanguageIdeSetup.xtendbin differ
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 56635dea..77bd6532 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/.CftLanguageUiModule.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/.CftLanguageUiModule.xtendbin differ
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 c62e6652..33d0e601 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/.CftLanguageProposalProvider.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/contentassist/.CftLanguageProposalProvider.xtendbin differ
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 21bd15b6..6617b26f 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.CftLanguageDescriptionLabelProvider.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.CftLanguageDescriptionLabelProvider.xtendbin 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 ae92f324..82af00d7 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.CftLanguageLabelProvider.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/labeling/.CftLanguageLabelProvider.xtendbin differ
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/.CftLanguageOutlineTreeProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/.CftLanguageOutlineTreeProvider.xtendbin
index e8595819..adffb198 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/.CftLanguageOutlineTreeProvider.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/outline/.CftLanguageOutlineTreeProvider.xtendbin differ
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 637b4e7e..2ecc121e 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/.CftLanguageQuickfixProvider.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/quickfix/.CftLanguageQuickfixProvider.xtendbin differ
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageSemanticHighlightingCalculator.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageSemanticHighlightingCalculator.xtendbin
index d88f5256..ce699deb 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageSemanticHighlightingCalculator.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageSemanticHighlightingCalculator.xtendbin 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 d8af5320..86752345 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageTokenToAttributeIdMapper.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components.ui/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/ui/syntaxcoloring/.CftLanguageTokenToAttributeIdMapper.xtendbin differ
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin
index ffe22f72..eb879e93 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtextbin differ
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g
index 2d1b9490..51479ad3 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.g
@@ -575,9 +575,9 @@ ruleConstantDistribution returns [EObject current=null]
leaveRule();
}:
(
- otherlv_0='p'
+ otherlv_0='prob'
{
- newLeafNode(otherlv_0, grammarAccess.getConstantDistributionAccess().getPKeyword_0());
+ newLeafNode(otherlv_0, grammarAccess.getConstantDistributionAccess().getProbKeyword_0());
}
otherlv_1='='
{
@@ -1494,19 +1494,20 @@ ruleComponentInstance returns [EObject current=null]
)
(
(
- lv_name_2_0=RULE_ID
{
- newLeafNode(lv_name_2_0, grammarAccess.getComponentInstanceAccess().getNameIDTerminalRuleCall_2_0());
+ newCompositeNode(grammarAccess.getComponentInstanceAccess().getNameValidIdParserRuleCall_2_0());
}
+ lv_name_2_0=ruleValidId
{
if ($current==null) {
- $current = createModelElement(grammarAccess.getComponentInstanceRule());
+ $current = createModelElementForParent(grammarAccess.getComponentInstanceRule());
}
- setWithLastConsumed(
+ set(
$current,
"name",
lv_name_2_0,
- "org.eclipse.xtext.common.Terminals.ID");
+ "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ValidId");
+ afterParserOrEnumRuleCall();
}
)
)?
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.tokens b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.tokens
index 2183a28f..24a3b0ab 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.tokens
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguage.tokens
@@ -20,8 +20,8 @@
'of'=27
'or'=26
'out'=19
-'p'=22
'package'=13
+'prob'=22
'toplevel'=29
'transformation'=28
'{'=17
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageLexer.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageLexer.java
index d7e9807d..c15c826a 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageLexer.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageLexer.java
@@ -255,10 +255,11 @@ public class InternalCftLanguageLexer extends Lexer {
try {
int _type = T__22;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // InternalCftLanguage.g:20:7: ( 'p' )
- // InternalCftLanguage.g:20:9: 'p'
+ // InternalCftLanguage.g:20:7: ( 'prob' )
+ // InternalCftLanguage.g:20:9: 'prob'
{
- match('p');
+ match("prob");
+
}
@@ -647,12 +648,12 @@ public class InternalCftLanguageLexer extends Lexer {
try {
int _type = RULE_OF_INT;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // InternalCftLanguage.g:1671:13: ( 'o' 'f' ( '0' .. '9' )+ )
- // InternalCftLanguage.g:1671:15: 'o' 'f' ( '0' .. '9' )+
+ // InternalCftLanguage.g:1672:13: ( 'o' 'f' ( '0' .. '9' )+ )
+ // InternalCftLanguage.g:1672:15: 'o' 'f' ( '0' .. '9' )+
{
match('o');
match('f');
- // InternalCftLanguage.g:1671:23: ( '0' .. '9' )+
+ // InternalCftLanguage.g:1672:23: ( '0' .. '9' )+
int cnt1=0;
loop1:
do {
@@ -666,7 +667,7 @@ public class InternalCftLanguageLexer extends Lexer {
switch (alt1) {
case 1 :
- // InternalCftLanguage.g:1671:24: '0' .. '9'
+ // InternalCftLanguage.g:1672:24: '0' .. '9'
{
matchRange('0','9');
@@ -698,10 +699,10 @@ public class InternalCftLanguageLexer extends Lexer {
try {
int _type = RULE_T_DOUBLE;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // InternalCftLanguage.g:1673:15: ( ( '0' .. '9' )+ ( '.' ( '0' .. '9' )+ | ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ ) )
- // InternalCftLanguage.g:1673:17: ( '0' .. '9' )+ ( '.' ( '0' .. '9' )+ | ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
+ // InternalCftLanguage.g:1674:15: ( ( '0' .. '9' )+ ( '.' ( '0' .. '9' )+ | ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ ) )
+ // InternalCftLanguage.g:1674:17: ( '0' .. '9' )+ ( '.' ( '0' .. '9' )+ | ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
{
- // InternalCftLanguage.g:1673:17: ( '0' .. '9' )+
+ // InternalCftLanguage.g:1674:17: ( '0' .. '9' )+
int cnt2=0;
loop2:
do {
@@ -715,7 +716,7 @@ public class InternalCftLanguageLexer extends Lexer {
switch (alt2) {
case 1 :
- // InternalCftLanguage.g:1673:18: '0' .. '9'
+ // InternalCftLanguage.g:1674:18: '0' .. '9'
{
matchRange('0','9');
@@ -731,15 +732,15 @@ public class InternalCftLanguageLexer extends Lexer {
cnt2++;
} while (true);
- // InternalCftLanguage.g:1673:29: ( '.' ( '0' .. '9' )+ | ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
+ // InternalCftLanguage.g:1674:29: ( '.' ( '0' .. '9' )+ | ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )
int alt8=2;
alt8 = dfa8.predict(input);
switch (alt8) {
case 1 :
- // InternalCftLanguage.g:1673:30: '.' ( '0' .. '9' )+
+ // InternalCftLanguage.g:1674:30: '.' ( '0' .. '9' )+
{
match('.');
- // InternalCftLanguage.g:1673:34: ( '0' .. '9' )+
+ // InternalCftLanguage.g:1674:34: ( '0' .. '9' )+
int cnt3=0;
loop3:
do {
@@ -753,7 +754,7 @@ public class InternalCftLanguageLexer extends Lexer {
switch (alt3) {
case 1 :
- // InternalCftLanguage.g:1673:35: '0' .. '9'
+ // InternalCftLanguage.g:1674:35: '0' .. '9'
{
matchRange('0','9');
@@ -773,9 +774,9 @@ public class InternalCftLanguageLexer extends Lexer {
}
break;
case 2 :
- // InternalCftLanguage.g:1673:46: ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
+ // InternalCftLanguage.g:1674:46: ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+
{
- // InternalCftLanguage.g:1673:46: ( '.' ( '0' .. '9' )+ )?
+ // InternalCftLanguage.g:1674:46: ( '.' ( '0' .. '9' )+ )?
int alt5=2;
int LA5_0 = input.LA(1);
@@ -784,10 +785,10 @@ public class InternalCftLanguageLexer extends Lexer {
}
switch (alt5) {
case 1 :
- // InternalCftLanguage.g:1673:47: '.' ( '0' .. '9' )+
+ // InternalCftLanguage.g:1674:47: '.' ( '0' .. '9' )+
{
match('.');
- // InternalCftLanguage.g:1673:51: ( '0' .. '9' )+
+ // InternalCftLanguage.g:1674:51: ( '0' .. '9' )+
int cnt4=0;
loop4:
do {
@@ -801,7 +802,7 @@ public class InternalCftLanguageLexer extends Lexer {
switch (alt4) {
case 1 :
- // InternalCftLanguage.g:1673:52: '0' .. '9'
+ // InternalCftLanguage.g:1674:52: '0' .. '9'
{
matchRange('0','9');
@@ -832,7 +833,7 @@ public class InternalCftLanguageLexer extends Lexer {
recover(mse);
throw mse;}
- // InternalCftLanguage.g:1673:75: ( '+' | '-' )?
+ // InternalCftLanguage.g:1674:75: ( '+' | '-' )?
int alt6=2;
int LA6_0 = input.LA(1);
@@ -858,7 +859,7 @@ public class InternalCftLanguageLexer extends Lexer {
}
- // InternalCftLanguage.g:1673:86: ( '0' .. '9' )+
+ // InternalCftLanguage.g:1674:86: ( '0' .. '9' )+
int cnt7=0;
loop7:
do {
@@ -872,7 +873,7 @@ public class InternalCftLanguageLexer extends Lexer {
switch (alt7) {
case 1 :
- // InternalCftLanguage.g:1673:87: '0' .. '9'
+ // InternalCftLanguage.g:1674:87: '0' .. '9'
{
matchRange('0','9');
@@ -910,10 +911,10 @@ public class InternalCftLanguageLexer extends Lexer {
try {
int _type = RULE_ID;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // InternalCftLanguage.g:1675:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
- // InternalCftLanguage.g:1675:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ // InternalCftLanguage.g:1676:9: ( ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )* )
+ // InternalCftLanguage.g:1676:11: ( '^' )? ( 'a' .. 'z' | 'A' .. 'Z' | '_' ) ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
{
- // InternalCftLanguage.g:1675:11: ( '^' )?
+ // InternalCftLanguage.g:1676:11: ( '^' )?
int alt9=2;
int LA9_0 = input.LA(1);
@@ -922,7 +923,7 @@ public class InternalCftLanguageLexer extends Lexer {
}
switch (alt9) {
case 1 :
- // InternalCftLanguage.g:1675:11: '^'
+ // InternalCftLanguage.g:1676:11: '^'
{
match('^');
@@ -940,7 +941,7 @@ public class InternalCftLanguageLexer extends Lexer {
recover(mse);
throw mse;}
- // InternalCftLanguage.g:1675:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
+ // InternalCftLanguage.g:1676:40: ( 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' )*
loop10:
do {
int alt10=2;
@@ -989,10 +990,10 @@ public class InternalCftLanguageLexer extends Lexer {
try {
int _type = RULE_INT;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // InternalCftLanguage.g:1677:10: ( ( '0' .. '9' )+ )
- // InternalCftLanguage.g:1677:12: ( '0' .. '9' )+
+ // InternalCftLanguage.g:1678:10: ( ( '0' .. '9' )+ )
+ // InternalCftLanguage.g:1678:12: ( '0' .. '9' )+
{
- // InternalCftLanguage.g:1677:12: ( '0' .. '9' )+
+ // InternalCftLanguage.g:1678:12: ( '0' .. '9' )+
int cnt11=0;
loop11:
do {
@@ -1006,7 +1007,7 @@ public class InternalCftLanguageLexer extends Lexer {
switch (alt11) {
case 1 :
- // InternalCftLanguage.g:1677:13: '0' .. '9'
+ // InternalCftLanguage.g:1678:13: '0' .. '9'
{
matchRange('0','9');
@@ -1038,10 +1039,10 @@ public class InternalCftLanguageLexer extends Lexer {
try {
int _type = RULE_STRING;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // InternalCftLanguage.g:1679:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
- // InternalCftLanguage.g:1679:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ // InternalCftLanguage.g:1680:13: ( ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' ) )
+ // InternalCftLanguage.g:1680:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
{
- // InternalCftLanguage.g:1679:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
+ // InternalCftLanguage.g:1680:15: ( '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"' | '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\'' )
int alt14=2;
int LA14_0 = input.LA(1);
@@ -1059,10 +1060,10 @@ public class InternalCftLanguageLexer extends Lexer {
}
switch (alt14) {
case 1 :
- // InternalCftLanguage.g:1679:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
+ // InternalCftLanguage.g:1680:16: '\"' ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )* '\"'
{
match('\"');
- // InternalCftLanguage.g:1679:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
+ // InternalCftLanguage.g:1680:20: ( '\\\\' . | ~ ( ( '\\\\' | '\"' ) ) )*
loop12:
do {
int alt12=3;
@@ -1078,7 +1079,7 @@ public class InternalCftLanguageLexer extends Lexer {
switch (alt12) {
case 1 :
- // InternalCftLanguage.g:1679:21: '\\\\' .
+ // InternalCftLanguage.g:1680:21: '\\\\' .
{
match('\\');
matchAny();
@@ -1086,7 +1087,7 @@ public class InternalCftLanguageLexer extends Lexer {
}
break;
case 2 :
- // InternalCftLanguage.g:1679:28: ~ ( ( '\\\\' | '\"' ) )
+ // InternalCftLanguage.g:1680:28: ~ ( ( '\\\\' | '\"' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='!')||(input.LA(1)>='#' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
@@ -1111,10 +1112,10 @@ public class InternalCftLanguageLexer extends Lexer {
}
break;
case 2 :
- // InternalCftLanguage.g:1679:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
+ // InternalCftLanguage.g:1680:48: '\\'' ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )* '\\''
{
match('\'');
- // InternalCftLanguage.g:1679:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
+ // InternalCftLanguage.g:1680:53: ( '\\\\' . | ~ ( ( '\\\\' | '\\'' ) ) )*
loop13:
do {
int alt13=3;
@@ -1130,7 +1131,7 @@ public class InternalCftLanguageLexer extends Lexer {
switch (alt13) {
case 1 :
- // InternalCftLanguage.g:1679:54: '\\\\' .
+ // InternalCftLanguage.g:1680:54: '\\\\' .
{
match('\\');
matchAny();
@@ -1138,7 +1139,7 @@ public class InternalCftLanguageLexer extends Lexer {
}
break;
case 2 :
- // InternalCftLanguage.g:1679:61: ~ ( ( '\\\\' | '\\'' ) )
+ // InternalCftLanguage.g:1680:61: ~ ( ( '\\\\' | '\\'' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='&')||(input.LA(1)>='(' && input.LA(1)<='[')||(input.LA(1)>=']' && input.LA(1)<='\uFFFF') ) {
input.consume();
@@ -1181,12 +1182,12 @@ public class InternalCftLanguageLexer extends Lexer {
try {
int _type = RULE_ML_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // InternalCftLanguage.g:1681:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
- // InternalCftLanguage.g:1681:19: '/*' ( options {greedy=false; } : . )* '*/'
+ // InternalCftLanguage.g:1682:17: ( '/*' ( options {greedy=false; } : . )* '*/' )
+ // InternalCftLanguage.g:1682:19: '/*' ( options {greedy=false; } : . )* '*/'
{
match("/*");
- // InternalCftLanguage.g:1681:24: ( options {greedy=false; } : . )*
+ // InternalCftLanguage.g:1682:24: ( options {greedy=false; } : . )*
loop15:
do {
int alt15=2;
@@ -1211,7 +1212,7 @@ public class InternalCftLanguageLexer extends Lexer {
switch (alt15) {
case 1 :
- // InternalCftLanguage.g:1681:52: .
+ // InternalCftLanguage.g:1682:52: .
{
matchAny();
@@ -1241,12 +1242,12 @@ public class InternalCftLanguageLexer extends Lexer {
try {
int _type = RULE_SL_COMMENT;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // InternalCftLanguage.g:1683:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
- // InternalCftLanguage.g:1683:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
+ // InternalCftLanguage.g:1684:17: ( '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )? )
+ // InternalCftLanguage.g:1684:19: '//' (~ ( ( '\\n' | '\\r' ) ) )* ( ( '\\r' )? '\\n' )?
{
match("//");
- // InternalCftLanguage.g:1683:24: (~ ( ( '\\n' | '\\r' ) ) )*
+ // InternalCftLanguage.g:1684:24: (~ ( ( '\\n' | '\\r' ) ) )*
loop16:
do {
int alt16=2;
@@ -1259,7 +1260,7 @@ public class InternalCftLanguageLexer extends Lexer {
switch (alt16) {
case 1 :
- // InternalCftLanguage.g:1683:24: ~ ( ( '\\n' | '\\r' ) )
+ // InternalCftLanguage.g:1684:24: ~ ( ( '\\n' | '\\r' ) )
{
if ( (input.LA(1)>='\u0000' && input.LA(1)<='\t')||(input.LA(1)>='\u000B' && input.LA(1)<='\f')||(input.LA(1)>='\u000E' && input.LA(1)<='\uFFFF') ) {
input.consume();
@@ -1279,7 +1280,7 @@ public class InternalCftLanguageLexer extends Lexer {
}
} while (true);
- // InternalCftLanguage.g:1683:40: ( ( '\\r' )? '\\n' )?
+ // InternalCftLanguage.g:1684:40: ( ( '\\r' )? '\\n' )?
int alt18=2;
int LA18_0 = input.LA(1);
@@ -1288,9 +1289,9 @@ public class InternalCftLanguageLexer extends Lexer {
}
switch (alt18) {
case 1 :
- // InternalCftLanguage.g:1683:41: ( '\\r' )? '\\n'
+ // InternalCftLanguage.g:1684:41: ( '\\r' )? '\\n'
{
- // InternalCftLanguage.g:1683:41: ( '\\r' )?
+ // InternalCftLanguage.g:1684:41: ( '\\r' )?
int alt17=2;
int LA17_0 = input.LA(1);
@@ -1299,7 +1300,7 @@ public class InternalCftLanguageLexer extends Lexer {
}
switch (alt17) {
case 1 :
- // InternalCftLanguage.g:1683:41: '\\r'
+ // InternalCftLanguage.g:1684:41: '\\r'
{
match('\r');
@@ -1331,10 +1332,10 @@ public class InternalCftLanguageLexer extends Lexer {
try {
int _type = RULE_WS;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // InternalCftLanguage.g:1685:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
- // InternalCftLanguage.g:1685:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ // InternalCftLanguage.g:1686:9: ( ( ' ' | '\\t' | '\\r' | '\\n' )+ )
+ // InternalCftLanguage.g:1686:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
{
- // InternalCftLanguage.g:1685:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
+ // InternalCftLanguage.g:1686:11: ( ' ' | '\\t' | '\\r' | '\\n' )+
int cnt19=0;
loop19:
do {
@@ -1388,8 +1389,8 @@ public class InternalCftLanguageLexer extends Lexer {
try {
int _type = RULE_ANY_OTHER;
int _channel = DEFAULT_TOKEN_CHANNEL;
- // InternalCftLanguage.g:1687:16: ( . )
- // InternalCftLanguage.g:1687:18: .
+ // InternalCftLanguage.g:1688:16: ( . )
+ // InternalCftLanguage.g:1688:18: .
{
matchAny();
@@ -1725,24 +1726,24 @@ public class InternalCftLanguageLexer extends Lexer {
this.transition = DFA8_transition;
}
public String getDescription() {
- return "1673:29: ( '.' ( '0' .. '9' )+ | ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )";
+ return "1674:29: ( '.' ( '0' .. '9' )+ | ( '.' ( '0' .. '9' )+ )? ( 'e' | 'E' ) ( '+' | '-' )? ( '0' .. '9' )+ )";
}
}
static final String DFA20_eotS =
- "\1\uffff\1\36\1\uffff\2\37\1\uffff\1\37\1\uffff\1\34\1\53\4\37\3\uffff\2\34\2\uffff\1\72\1\34\1\uffff\3\34\2\uffff\1\37\3\uffff\1\37\1\103\1\37\1\uffff\1\37\1\106\1\110\4\uffff\3\37\1\114\3\37\10\uffff\1\72\5\uffff\2\37\1\uffff\1\122\1\123\1\uffff\1\124\1\uffff\2\37\1\127\1\uffff\5\37\3\uffff\2\37\1\uffff\13\37\1\152\1\153\1\154\3\37\1\160\3\uffff\2\37\1\163\1\uffff\1\37\1\165\1\uffff\1\37\1\uffff\4\37\1\173\1\uffff";
+ "\1\uffff\1\37\1\uffff\2\37\1\uffff\1\37\1\uffff\1\34\1\53\4\37\3\uffff\2\34\2\uffff\1\74\1\34\1\uffff\3\34\2\uffff\2\37\2\uffff\1\37\1\104\1\37\1\uffff\1\37\1\107\1\110\4\uffff\3\37\1\115\3\37\10\uffff\1\74\5\uffff\3\37\1\uffff\1\124\1\125\2\uffff\1\126\2\37\1\131\1\uffff\4\37\1\136\1\37\3\uffff\2\37\1\uffff\4\37\1\uffff\7\37\1\155\1\156\1\157\3\37\1\163\3\uffff\2\37\1\166\1\uffff\1\37\1\170\1\uffff\1\37\1\uffff\4\37\1\176\1\uffff";
static final String DFA20_eofS =
- "\174\uffff";
+ "\177\uffff";
static final String DFA20_minS =
- "\1\0\1\60\1\uffff\1\155\1\146\1\uffff\1\146\1\uffff\1\135\1\76\1\141\1\156\1\157\1\141\3\uffff\2\75\2\uffff\1\56\1\101\1\uffff\2\0\1\52\2\uffff\1\143\3\uffff\1\160\1\60\1\164\1\uffff\1\164\2\60\4\uffff\1\155\1\157\1\144\1\60\1\141\2\160\10\uffff\1\56\5\uffff\1\153\1\157\1\uffff\2\60\1\uffff\1\60\1\uffff\1\142\1\153\1\60\1\uffff\1\156\1\154\1\160\1\141\1\162\3\uffff\1\144\1\165\1\uffff\1\163\1\145\1\151\1\147\1\164\1\141\1\160\1\146\1\166\1\156\1\145\3\60\1\157\1\145\1\147\1\60\3\uffff\1\162\1\154\1\60\1\uffff\1\155\1\60\1\uffff\1\141\1\uffff\1\164\1\151\1\157\1\156\1\60\1\uffff";
+ "\1\0\1\141\1\uffff\1\155\1\146\1\uffff\1\146\1\uffff\1\135\1\76\1\141\1\156\1\157\1\141\3\uffff\2\75\2\uffff\1\56\1\101\1\uffff\2\0\1\52\2\uffff\1\143\1\157\2\uffff\1\160\1\60\1\164\1\uffff\1\164\2\60\4\uffff\1\155\1\157\1\144\1\60\1\141\2\160\10\uffff\1\56\5\uffff\1\153\1\142\1\157\1\uffff\2\60\2\uffff\1\60\1\142\1\153\1\60\1\uffff\1\156\1\154\1\160\1\141\1\60\1\162\3\uffff\1\144\1\165\1\uffff\1\163\1\145\1\151\1\147\1\uffff\1\164\1\141\1\160\1\146\1\166\1\156\1\145\3\60\1\157\1\145\1\147\1\60\3\uffff\1\162\1\154\1\60\1\uffff\1\155\1\60\1\uffff\1\141\1\uffff\1\164\1\151\1\157\1\156\1\60\1\uffff";
static final String DFA20_maxS =
- "\1\uffff\1\172\1\uffff\1\156\1\146\1\uffff\1\165\1\uffff\1\135\1\76\1\157\1\163\1\162\1\141\3\uffff\2\75\2\uffff\1\145\1\172\1\uffff\2\uffff\1\57\2\uffff\1\143\3\uffff\1\160\1\172\1\164\1\uffff\1\164\2\172\4\uffff\1\155\1\157\1\144\1\172\1\141\2\160\10\uffff\1\145\5\uffff\1\153\1\157\1\uffff\2\172\1\uffff\1\172\1\uffff\1\142\1\153\1\172\1\uffff\1\156\1\154\1\160\1\141\1\162\3\uffff\1\144\1\165\1\uffff\1\163\1\145\1\151\1\147\1\164\1\141\1\160\1\146\1\166\1\156\1\145\3\172\1\157\1\145\1\147\1\172\3\uffff\1\162\1\154\1\172\1\uffff\1\155\1\172\1\uffff\1\141\1\uffff\1\164\1\151\1\157\1\156\1\172\1\uffff";
+ "\1\uffff\1\162\1\uffff\1\156\1\146\1\uffff\1\165\1\uffff\1\135\1\76\1\157\1\163\1\162\1\141\3\uffff\2\75\2\uffff\1\145\1\172\1\uffff\2\uffff\1\57\2\uffff\1\143\1\157\2\uffff\1\160\1\172\1\164\1\uffff\1\164\2\172\4\uffff\1\155\1\157\1\144\1\172\1\141\2\160\10\uffff\1\145\5\uffff\1\153\1\142\1\157\1\uffff\2\172\2\uffff\1\172\1\142\1\153\1\172\1\uffff\1\156\1\154\1\160\1\141\1\172\1\162\3\uffff\1\144\1\165\1\uffff\1\163\1\145\1\151\1\147\1\uffff\1\164\1\141\1\160\1\146\1\166\1\156\1\145\3\172\1\157\1\145\1\147\1\172\3\uffff\1\162\1\154\1\172\1\uffff\1\155\1\172\1\uffff\1\141\1\uffff\1\164\1\151\1\157\1\156\1\172\1\uffff";
static final String DFA20_acceptS =
- "\2\uffff\1\2\2\uffff\1\5\1\uffff\1\10\6\uffff\1\23\1\24\1\25\2\uffff\1\32\1\34\2\uffff\1\37\3\uffff\1\44\1\45\1\uffff\1\12\1\37\1\2\3\uffff\1\5\3\uffff\1\10\1\11\1\33\1\13\7\uffff\1\23\1\24\1\25\1\30\1\31\1\32\1\34\1\40\1\uffff\1\36\1\41\1\42\1\43\1\44\2\uffff\1\6\2\uffff\1\16\1\uffff\1\17\3\uffff\1\27\5\uffff\1\4\1\7\1\35\2\uffff\1\15\22\uffff\1\3\1\14\1\26\3\uffff\1\1\2\uffff\1\22\1\uffff\1\21\5\uffff\1\20";
+ "\2\uffff\1\2\2\uffff\1\5\1\uffff\1\10\6\uffff\1\23\1\24\1\25\2\uffff\1\32\1\34\2\uffff\1\37\3\uffff\1\44\1\45\2\uffff\1\37\1\2\3\uffff\1\5\3\uffff\1\10\1\11\1\33\1\13\7\uffff\1\23\1\24\1\25\1\30\1\31\1\32\1\34\1\36\1\uffff\1\40\1\41\1\42\1\43\1\44\3\uffff\1\6\2\uffff\1\16\1\17\4\uffff\1\27\6\uffff\1\4\1\7\1\35\2\uffff\1\15\4\uffff\1\12\16\uffff\1\3\1\14\1\26\3\uffff\1\1\2\uffff\1\22\1\uffff\1\21\5\uffff\1\20";
static final String DFA20_specialS =
- "\1\1\27\uffff\1\2\1\0\142\uffff}>";
+ "\1\1\27\uffff\1\2\1\0\145\uffff}>";
static final String[] DFA20_transitionS = {
"\11\34\2\33\2\34\1\33\22\34\1\33\1\34\1\30\4\34\1\31\1\16\1\20\1\24\1\21\1\17\1\34\1\23\1\32\12\25\1\22\1\2\1\34\1\11\3\34\32\27\1\10\2\34\1\26\1\27\1\34\1\13\1\27\1\4\5\27\1\3\2\27\1\12\1\15\1\27\1\6\1\1\3\27\1\14\6\27\1\5\1\34\1\7\uff82\34",
- "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\1\35\31\37",
+ "\1\35\20\uffff\1\36",
"",
"\1\41\1\42",
"\1\43",
@@ -1762,7 +1763,7 @@ public class InternalCftLanguageLexer extends Lexer {
"\1\67",
"",
"",
- "\1\74\1\uffff\12\73\13\uffff\1\74\37\uffff\1\74",
+ "\1\72\1\uffff\12\73\13\uffff\1\72\37\uffff\1\72",
"\32\37\4\uffff\1\37\1\uffff\32\37",
"",
"\0\75",
@@ -1771,27 +1772,27 @@ public class InternalCftLanguageLexer extends Lexer {
"",
"",
"\1\101",
+ "\1\102",
"",
"",
- "",
- "\1\102",
+ "\1\103",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
- "\1\104",
- "",
"\1\105",
+ "",
+ "\1\106",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
- "\12\107\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
+ "\12\111\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
"",
"",
"",
"",
- "\1\111",
"\1\112",
"\1\113",
+ "\1\114",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
- "\1\115",
"\1\116",
"\1\117",
+ "\1\120",
"",
"",
"",
@@ -1800,69 +1801,72 @@ public class InternalCftLanguageLexer extends Lexer {
"",
"",
"",
- "\1\74\1\uffff\12\73\13\uffff\1\74\37\uffff\1\74",
+ "\1\72\1\uffff\12\73\13\uffff\1\72\37\uffff\1\72",
"",
"",
"",
"",
"",
- "\1\120",
"\1\121",
+ "\1\122",
+ "\1\123",
"",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
"",
- "\12\107\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
"",
- "\1\125",
- "\1\126",
+ "\12\111\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
+ "\1\127",
+ "\1\130",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
"",
- "\1\130",
- "\1\131",
"\1\132",
"\1\133",
"\1\134",
+ "\1\135",
+ "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
+ "\1\137",
"",
"",
"",
- "\1\135",
- "\1\136",
- "",
- "\1\137",
"\1\140",
"\1\141",
+ "",
"\1\142",
"\1\143",
"\1\144",
"\1\145",
+ "",
"\1\146",
"\1\147",
"\1\150",
"\1\151",
+ "\1\152",
+ "\1\153",
+ "\1\154",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
- "\1\155",
- "\1\156",
- "\1\157",
- "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
- "",
- "",
- "",
+ "\1\160",
"\1\161",
"\1\162",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
"",
+ "",
+ "",
"\1\164",
+ "\1\165",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
"",
- "\1\166",
- "",
"\1\167",
- "\1\170",
+ "\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
+ "",
"\1\171",
+ "",
"\1\172",
+ "\1\173",
+ "\1\174",
+ "\1\175",
"\12\37\7\uffff\32\37\4\uffff\1\37\1\uffff\32\37",
""
};
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageParser.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageParser.java
index 4727763e..0da9c0f1 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageParser.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/parser/antlr/internal/InternalCftLanguageParser.java
@@ -21,7 +21,7 @@ import java.util.ArrayList;
@SuppressWarnings("all")
public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
public static final String[] tokenNames = new String[] {
- "", "", "", "", "RULE_INT", "RULE_OF_INT", "RULE_ID", "RULE_T_DOUBLE", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'package'", "';'", "'import'", "'cft'", "'{'", "'in'", "'out'", "'}'", "'[]'", "'p'", "'='", "'lambda'", "'and'", "'or'", "'of'", "'transformation'", "'toplevel'", "'mapping'", "'('", "','", "')'", "'lookup'", "'as'", "'+='", "':='", "'.'", "'=>'", "'*'"
+ "", "", "", "", "RULE_INT", "RULE_OF_INT", "RULE_ID", "RULE_T_DOUBLE", "RULE_STRING", "RULE_ML_COMMENT", "RULE_SL_COMMENT", "RULE_WS", "RULE_ANY_OTHER", "'package'", "';'", "'import'", "'cft'", "'{'", "'in'", "'out'", "'}'", "'[]'", "'prob'", "'='", "'lambda'", "'and'", "'or'", "'of'", "'transformation'", "'toplevel'", "'mapping'", "'('", "','", "')'", "'lookup'", "'as'", "'+='", "':='", "'.'", "'=>'", "'*'"
};
public static final int RULE_STRING=8;
public static final int RULE_SL_COMMENT=10;
@@ -1549,7 +1549,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
// $ANTLR start "ruleConstantDistribution"
- // InternalCftLanguage.g:570:1: ruleConstantDistribution returns [EObject current=null] : (otherlv_0= 'p' otherlv_1= '=' ( (lv_p_2_0= ruleDouble ) ) ) ;
+ // InternalCftLanguage.g:570:1: ruleConstantDistribution returns [EObject current=null] : (otherlv_0= 'prob' otherlv_1= '=' ( (lv_p_2_0= ruleDouble ) ) ) ;
public final EObject ruleConstantDistribution() throws RecognitionException {
EObject current = null;
@@ -1562,15 +1562,15 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
enterRule();
try {
- // InternalCftLanguage.g:576:2: ( (otherlv_0= 'p' otherlv_1= '=' ( (lv_p_2_0= ruleDouble ) ) ) )
- // InternalCftLanguage.g:577:2: (otherlv_0= 'p' otherlv_1= '=' ( (lv_p_2_0= ruleDouble ) ) )
+ // InternalCftLanguage.g:576:2: ( (otherlv_0= 'prob' otherlv_1= '=' ( (lv_p_2_0= ruleDouble ) ) ) )
+ // InternalCftLanguage.g:577:2: (otherlv_0= 'prob' otherlv_1= '=' ( (lv_p_2_0= ruleDouble ) ) )
{
- // InternalCftLanguage.g:577:2: (otherlv_0= 'p' otherlv_1= '=' ( (lv_p_2_0= ruleDouble ) ) )
- // InternalCftLanguage.g:578:3: otherlv_0= 'p' otherlv_1= '=' ( (lv_p_2_0= ruleDouble ) )
+ // InternalCftLanguage.g:577:2: (otherlv_0= 'prob' otherlv_1= '=' ( (lv_p_2_0= ruleDouble ) ) )
+ // InternalCftLanguage.g:578:3: otherlv_0= 'prob' otherlv_1= '=' ( (lv_p_2_0= ruleDouble ) )
{
otherlv_0=(Token)match(input,22,FOLLOW_15);
- newLeafNode(otherlv_0, grammarAccess.getConstantDistributionAccess().getPKeyword_0());
+ newLeafNode(otherlv_0, grammarAccess.getConstantDistributionAccess().getProbKeyword_0());
otherlv_1=(Token)match(input,23,FOLLOW_16);
@@ -3861,22 +3861,23 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
// $ANTLR start "ruleComponentInstance"
- // InternalCftLanguage.g:1467:1: ruleComponentInstance returns [EObject current=null] : (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= RULE_ID ) )? ) ;
+ // InternalCftLanguage.g:1467:1: ruleComponentInstance returns [EObject current=null] : (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= ruleValidId ) )? ) ;
public final EObject ruleComponentInstance() throws RecognitionException {
EObject current = null;
Token otherlv_0=null;
- Token lv_name_2_0=null;
+ AntlrDatatypeRuleToken lv_name_2_0 = null;
+
enterRule();
try {
- // InternalCftLanguage.g:1473:2: ( (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= RULE_ID ) )? ) )
- // InternalCftLanguage.g:1474:2: (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= RULE_ID ) )? )
+ // InternalCftLanguage.g:1473:2: ( (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= ruleValidId ) )? ) )
+ // InternalCftLanguage.g:1474:2: (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= ruleValidId ) )? )
{
- // InternalCftLanguage.g:1474:2: (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= RULE_ID ) )? )
- // InternalCftLanguage.g:1475:3: otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= RULE_ID ) )?
+ // InternalCftLanguage.g:1474:2: (otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= ruleValidId ) )? )
+ // InternalCftLanguage.g:1475:3: otherlv_0= '=>' ( ( ruleQualifiedName ) ) ( (lv_name_2_0= ruleValidId ) )?
{
otherlv_0=(Token)match(input,39,FOLLOW_3);
@@ -3896,7 +3897,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
newCompositeNode(grammarAccess.getComponentInstanceAccess().getComponentTypeComponentDefinitionCrossReference_1_0());
- pushFollow(FOLLOW_33);
+ pushFollow(FOLLOW_18);
ruleQualifiedName();
state._fsp--;
@@ -3910,33 +3911,38 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
}
- // InternalCftLanguage.g:1495:3: ( (lv_name_2_0= RULE_ID ) )?
+ // InternalCftLanguage.g:1495:3: ( (lv_name_2_0= ruleValidId ) )?
int alt26=2;
int LA26_0 = input.LA(1);
- if ( (LA26_0==RULE_ID) ) {
+ if ( ((LA26_0>=RULE_OF_INT && LA26_0<=RULE_ID)) ) {
alt26=1;
}
switch (alt26) {
case 1 :
- // InternalCftLanguage.g:1496:4: (lv_name_2_0= RULE_ID )
+ // InternalCftLanguage.g:1496:4: (lv_name_2_0= ruleValidId )
{
- // InternalCftLanguage.g:1496:4: (lv_name_2_0= RULE_ID )
- // InternalCftLanguage.g:1497:5: lv_name_2_0= RULE_ID
+ // InternalCftLanguage.g:1496:4: (lv_name_2_0= ruleValidId )
+ // InternalCftLanguage.g:1497:5: lv_name_2_0= ruleValidId
{
- lv_name_2_0=(Token)match(input,RULE_ID,FOLLOW_2);
- newLeafNode(lv_name_2_0, grammarAccess.getComponentInstanceAccess().getNameIDTerminalRuleCall_2_0());
+ newCompositeNode(grammarAccess.getComponentInstanceAccess().getNameValidIdParserRuleCall_2_0());
+ pushFollow(FOLLOW_2);
+ lv_name_2_0=ruleValidId();
+
+ state._fsp--;
+
if (current==null) {
- current = createModelElement(grammarAccess.getComponentInstanceRule());
+ current = createModelElementForParent(grammarAccess.getComponentInstanceRule());
}
- setWithLastConsumed(
+ set(
current,
"name",
lv_name_2_0,
- "org.eclipse.xtext.common.Terminals.ID");
+ "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ValidId");
+ afterParserOrEnumRuleCall();
}
@@ -3970,7 +3976,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
// $ANTLR start "entryRuleQualifiedName"
- // InternalCftLanguage.g:1517:1: entryRuleQualifiedName returns [String current=null] : iv_ruleQualifiedName= ruleQualifiedName EOF ;
+ // InternalCftLanguage.g:1518:1: entryRuleQualifiedName returns [String current=null] : iv_ruleQualifiedName= ruleQualifiedName EOF ;
public final String entryRuleQualifiedName() throws RecognitionException {
String current = null;
@@ -3978,8 +3984,8 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
try {
- // InternalCftLanguage.g:1517:53: (iv_ruleQualifiedName= ruleQualifiedName EOF )
- // InternalCftLanguage.g:1518:2: iv_ruleQualifiedName= ruleQualifiedName EOF
+ // InternalCftLanguage.g:1518:53: (iv_ruleQualifiedName= ruleQualifiedName EOF )
+ // InternalCftLanguage.g:1519:2: iv_ruleQualifiedName= ruleQualifiedName EOF
{
newCompositeNode(grammarAccess.getQualifiedNameRule());
pushFollow(FOLLOW_1);
@@ -4006,7 +4012,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
// $ANTLR start "ruleQualifiedName"
- // InternalCftLanguage.g:1524:1: ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ValidId_0= ruleValidId (kw= '.' this_ValidId_2= ruleValidId )* ) ;
+ // InternalCftLanguage.g:1525:1: ruleQualifiedName returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ValidId_0= ruleValidId (kw= '.' this_ValidId_2= ruleValidId )* ) ;
public final AntlrDatatypeRuleToken ruleQualifiedName() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
@@ -4020,16 +4026,16 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
enterRule();
try {
- // InternalCftLanguage.g:1530:2: ( (this_ValidId_0= ruleValidId (kw= '.' this_ValidId_2= ruleValidId )* ) )
- // InternalCftLanguage.g:1531:2: (this_ValidId_0= ruleValidId (kw= '.' this_ValidId_2= ruleValidId )* )
+ // InternalCftLanguage.g:1531:2: ( (this_ValidId_0= ruleValidId (kw= '.' this_ValidId_2= ruleValidId )* ) )
+ // InternalCftLanguage.g:1532:2: (this_ValidId_0= ruleValidId (kw= '.' this_ValidId_2= ruleValidId )* )
{
- // InternalCftLanguage.g:1531:2: (this_ValidId_0= ruleValidId (kw= '.' this_ValidId_2= ruleValidId )* )
- // InternalCftLanguage.g:1532:3: this_ValidId_0= ruleValidId (kw= '.' this_ValidId_2= ruleValidId )*
+ // InternalCftLanguage.g:1532:2: (this_ValidId_0= ruleValidId (kw= '.' this_ValidId_2= ruleValidId )* )
+ // InternalCftLanguage.g:1533:3: this_ValidId_0= ruleValidId (kw= '.' this_ValidId_2= ruleValidId )*
{
newCompositeNode(grammarAccess.getQualifiedNameAccess().getValidIdParserRuleCall_0());
- pushFollow(FOLLOW_34);
+ pushFollow(FOLLOW_33);
this_ValidId_0=ruleValidId();
state._fsp--;
@@ -4040,7 +4046,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
afterParserOrEnumRuleCall();
- // InternalCftLanguage.g:1542:3: (kw= '.' this_ValidId_2= ruleValidId )*
+ // InternalCftLanguage.g:1543:3: (kw= '.' this_ValidId_2= ruleValidId )*
loop27:
do {
int alt27=2;
@@ -4059,7 +4065,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
switch (alt27) {
case 1 :
- // InternalCftLanguage.g:1543:4: kw= '.' this_ValidId_2= ruleValidId
+ // InternalCftLanguage.g:1544:4: kw= '.' this_ValidId_2= ruleValidId
{
kw=(Token)match(input,38,FOLLOW_3);
@@ -4069,7 +4075,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
newCompositeNode(grammarAccess.getQualifiedNameAccess().getValidIdParserRuleCall_1_1());
- pushFollow(FOLLOW_34);
+ pushFollow(FOLLOW_33);
this_ValidId_2=ruleValidId();
state._fsp--;
@@ -4112,7 +4118,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
// $ANTLR start "entryRuleQualifiedNameWithWildcard"
- // InternalCftLanguage.g:1563:1: entryRuleQualifiedNameWithWildcard returns [String current=null] : iv_ruleQualifiedNameWithWildcard= ruleQualifiedNameWithWildcard EOF ;
+ // InternalCftLanguage.g:1564:1: entryRuleQualifiedNameWithWildcard returns [String current=null] : iv_ruleQualifiedNameWithWildcard= ruleQualifiedNameWithWildcard EOF ;
public final String entryRuleQualifiedNameWithWildcard() throws RecognitionException {
String current = null;
@@ -4120,8 +4126,8 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
try {
- // InternalCftLanguage.g:1563:65: (iv_ruleQualifiedNameWithWildcard= ruleQualifiedNameWithWildcard EOF )
- // InternalCftLanguage.g:1564:2: iv_ruleQualifiedNameWithWildcard= ruleQualifiedNameWithWildcard EOF
+ // InternalCftLanguage.g:1564:65: (iv_ruleQualifiedNameWithWildcard= ruleQualifiedNameWithWildcard EOF )
+ // InternalCftLanguage.g:1565:2: iv_ruleQualifiedNameWithWildcard= ruleQualifiedNameWithWildcard EOF
{
newCompositeNode(grammarAccess.getQualifiedNameWithWildcardRule());
pushFollow(FOLLOW_1);
@@ -4148,7 +4154,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
// $ANTLR start "ruleQualifiedNameWithWildcard"
- // InternalCftLanguage.g:1570:1: ruleQualifiedNameWithWildcard returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? ) ;
+ // InternalCftLanguage.g:1571:1: ruleQualifiedNameWithWildcard returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? ) ;
public final AntlrDatatypeRuleToken ruleQualifiedNameWithWildcard() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
@@ -4160,16 +4166,16 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
enterRule();
try {
- // InternalCftLanguage.g:1576:2: ( (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? ) )
- // InternalCftLanguage.g:1577:2: (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? )
+ // InternalCftLanguage.g:1577:2: ( (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? ) )
+ // InternalCftLanguage.g:1578:2: (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? )
{
- // InternalCftLanguage.g:1577:2: (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? )
- // InternalCftLanguage.g:1578:3: this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )?
+ // InternalCftLanguage.g:1578:2: (this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )? )
+ // InternalCftLanguage.g:1579:3: this_QualifiedName_0= ruleQualifiedName (kw= '.' kw= '*' )?
{
newCompositeNode(grammarAccess.getQualifiedNameWithWildcardAccess().getQualifiedNameParserRuleCall_0());
- pushFollow(FOLLOW_34);
+ pushFollow(FOLLOW_33);
this_QualifiedName_0=ruleQualifiedName();
state._fsp--;
@@ -4180,7 +4186,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
afterParserOrEnumRuleCall();
- // InternalCftLanguage.g:1588:3: (kw= '.' kw= '*' )?
+ // InternalCftLanguage.g:1589:3: (kw= '.' kw= '*' )?
int alt28=2;
int LA28_0 = input.LA(1);
@@ -4189,9 +4195,9 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
}
switch (alt28) {
case 1 :
- // InternalCftLanguage.g:1589:4: kw= '.' kw= '*'
+ // InternalCftLanguage.g:1590:4: kw= '.' kw= '*'
{
- kw=(Token)match(input,38,FOLLOW_35);
+ kw=(Token)match(input,38,FOLLOW_34);
current.merge(kw);
newLeafNode(kw, grammarAccess.getQualifiedNameWithWildcardAccess().getFullStopKeyword_1_0());
@@ -4230,7 +4236,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
// $ANTLR start "entryRuleValidId"
- // InternalCftLanguage.g:1604:1: entryRuleValidId returns [String current=null] : iv_ruleValidId= ruleValidId EOF ;
+ // InternalCftLanguage.g:1605:1: entryRuleValidId returns [String current=null] : iv_ruleValidId= ruleValidId EOF ;
public final String entryRuleValidId() throws RecognitionException {
String current = null;
@@ -4238,8 +4244,8 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
try {
- // InternalCftLanguage.g:1604:47: (iv_ruleValidId= ruleValidId EOF )
- // InternalCftLanguage.g:1605:2: iv_ruleValidId= ruleValidId EOF
+ // InternalCftLanguage.g:1605:47: (iv_ruleValidId= ruleValidId EOF )
+ // InternalCftLanguage.g:1606:2: iv_ruleValidId= ruleValidId EOF
{
newCompositeNode(grammarAccess.getValidIdRule());
pushFollow(FOLLOW_1);
@@ -4266,7 +4272,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
// $ANTLR start "ruleValidId"
- // InternalCftLanguage.g:1611:1: ruleValidId returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID | this_OF_INT_1= RULE_OF_INT ) ;
+ // InternalCftLanguage.g:1612:1: ruleValidId returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_ID_0= RULE_ID | this_OF_INT_1= RULE_OF_INT ) ;
public final AntlrDatatypeRuleToken ruleValidId() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
@@ -4277,10 +4283,10 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
enterRule();
try {
- // InternalCftLanguage.g:1617:2: ( (this_ID_0= RULE_ID | this_OF_INT_1= RULE_OF_INT ) )
- // InternalCftLanguage.g:1618:2: (this_ID_0= RULE_ID | this_OF_INT_1= RULE_OF_INT )
+ // InternalCftLanguage.g:1618:2: ( (this_ID_0= RULE_ID | this_OF_INT_1= RULE_OF_INT ) )
+ // InternalCftLanguage.g:1619:2: (this_ID_0= RULE_ID | this_OF_INT_1= RULE_OF_INT )
{
- // InternalCftLanguage.g:1618:2: (this_ID_0= RULE_ID | this_OF_INT_1= RULE_OF_INT )
+ // InternalCftLanguage.g:1619:2: (this_ID_0= RULE_ID | this_OF_INT_1= RULE_OF_INT )
int alt29=2;
int LA29_0 = input.LA(1);
@@ -4298,7 +4304,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
}
switch (alt29) {
case 1 :
- // InternalCftLanguage.g:1619:3: this_ID_0= RULE_ID
+ // InternalCftLanguage.g:1620:3: this_ID_0= RULE_ID
{
this_ID_0=(Token)match(input,RULE_ID,FOLLOW_2);
@@ -4311,7 +4317,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
}
break;
case 2 :
- // InternalCftLanguage.g:1627:3: this_OF_INT_1= RULE_OF_INT
+ // InternalCftLanguage.g:1628:3: this_OF_INT_1= RULE_OF_INT
{
this_OF_INT_1=(Token)match(input,RULE_OF_INT,FOLLOW_2);
@@ -4346,7 +4352,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
// $ANTLR start "entryRuleDouble"
- // InternalCftLanguage.g:1638:1: entryRuleDouble returns [String current=null] : iv_ruleDouble= ruleDouble EOF ;
+ // InternalCftLanguage.g:1639:1: entryRuleDouble returns [String current=null] : iv_ruleDouble= ruleDouble EOF ;
public final String entryRuleDouble() throws RecognitionException {
String current = null;
@@ -4354,8 +4360,8 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
try {
- // InternalCftLanguage.g:1638:46: (iv_ruleDouble= ruleDouble EOF )
- // InternalCftLanguage.g:1639:2: iv_ruleDouble= ruleDouble EOF
+ // InternalCftLanguage.g:1639:46: (iv_ruleDouble= ruleDouble EOF )
+ // InternalCftLanguage.g:1640:2: iv_ruleDouble= ruleDouble EOF
{
newCompositeNode(grammarAccess.getDoubleRule());
pushFollow(FOLLOW_1);
@@ -4382,7 +4388,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
// $ANTLR start "ruleDouble"
- // InternalCftLanguage.g:1645:1: ruleDouble returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_INT_0= RULE_INT | this_T_DOUBLE_1= RULE_T_DOUBLE ) ;
+ // InternalCftLanguage.g:1646:1: ruleDouble returns [AntlrDatatypeRuleToken current=new AntlrDatatypeRuleToken()] : (this_INT_0= RULE_INT | this_T_DOUBLE_1= RULE_T_DOUBLE ) ;
public final AntlrDatatypeRuleToken ruleDouble() throws RecognitionException {
AntlrDatatypeRuleToken current = new AntlrDatatypeRuleToken();
@@ -4393,10 +4399,10 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
enterRule();
try {
- // InternalCftLanguage.g:1651:2: ( (this_INT_0= RULE_INT | this_T_DOUBLE_1= RULE_T_DOUBLE ) )
- // InternalCftLanguage.g:1652:2: (this_INT_0= RULE_INT | this_T_DOUBLE_1= RULE_T_DOUBLE )
+ // InternalCftLanguage.g:1652:2: ( (this_INT_0= RULE_INT | this_T_DOUBLE_1= RULE_T_DOUBLE ) )
+ // InternalCftLanguage.g:1653:2: (this_INT_0= RULE_INT | this_T_DOUBLE_1= RULE_T_DOUBLE )
{
- // InternalCftLanguage.g:1652:2: (this_INT_0= RULE_INT | this_T_DOUBLE_1= RULE_T_DOUBLE )
+ // InternalCftLanguage.g:1653:2: (this_INT_0= RULE_INT | this_T_DOUBLE_1= RULE_T_DOUBLE )
int alt30=2;
int LA30_0 = input.LA(1);
@@ -4414,7 +4420,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
}
switch (alt30) {
case 1 :
- // InternalCftLanguage.g:1653:3: this_INT_0= RULE_INT
+ // InternalCftLanguage.g:1654:3: this_INT_0= RULE_INT
{
this_INT_0=(Token)match(input,RULE_INT,FOLLOW_2);
@@ -4427,7 +4433,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
}
break;
case 2 :
- // InternalCftLanguage.g:1661:3: this_T_DOUBLE_1= RULE_T_DOUBLE
+ // InternalCftLanguage.g:1662:3: this_T_DOUBLE_1= RULE_T_DOUBLE
{
this_T_DOUBLE_1=(Token)match(input,RULE_T_DOUBLE,FOLLOW_2);
@@ -4497,8 +4503,7 @@ public class InternalCftLanguageParser extends AbstractInternalAntlrParser {
public static final BitSet FOLLOW_30 = new BitSet(new long[]{0x0000003000000000L});
public static final BitSet FOLLOW_31 = new BitSet(new long[]{0x0000000400000060L});
public static final BitSet FOLLOW_32 = new BitSet(new long[]{0x0000004000000000L});
- public static final BitSet FOLLOW_33 = new BitSet(new long[]{0x0000000000000042L});
- public static final BitSet FOLLOW_34 = new BitSet(new long[]{0x0000004000000002L});
- public static final BitSet FOLLOW_35 = new BitSet(new long[]{0x0000010000000000L});
+ public static final BitSet FOLLOW_33 = new BitSet(new long[]{0x0000004000000002L});
+ public static final BitSet FOLLOW_34 = new BitSet(new long[]{0x0000010000000000L});
}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java
index 25f16824..fe329903 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/serializer/CftLanguageSemanticSequencer.java
@@ -194,7 +194,7 @@ public class CftLanguageSemanticSequencer extends AbstractDelegatingSemanticSequ
* ComponentInstance returns ComponentInstance
*
* Constraint:
- * (componentType=[ComponentDefinition|QualifiedName] name=ID?)
+ * (componentType=[ComponentDefinition|QualifiedName] name=ValidId?)
*/
protected void sequence_ComponentInstance(ISerializationContext context, ComponentInstance semanticObject) {
genericSequencer.createSequence(context, semanticObject);
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java
index cbcfbe95..2b9632b7 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/services/CftLanguageGrammarAccess.java
@@ -302,20 +302,20 @@ public class CftLanguageGrammarAccess extends AbstractGrammarElementFinder {
public class ConstantDistributionElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.ConstantDistribution");
private final Group cGroup = (Group)rule.eContents().get(1);
- private final Keyword cPKeyword_0 = (Keyword)cGroup.eContents().get(0);
+ private final Keyword cProbKeyword_0 = (Keyword)cGroup.eContents().get(0);
private final Keyword cEqualsSignKeyword_1 = (Keyword)cGroup.eContents().get(1);
private final Assignment cPAssignment_2 = (Assignment)cGroup.eContents().get(2);
private final RuleCall cPDoubleParserRuleCall_2_0 = (RuleCall)cPAssignment_2.eContents().get(0);
//ConstantDistribution ft::ConstantDistribution:
- // "p" "=" p=Double;
+ // "prob" "=" p=Double;
@Override public ParserRule getRule() { return rule; }
- //"p" "=" p=Double
+ //"prob" "=" p=Double
public Group getGroup() { return cGroup; }
- //"p"
- public Keyword getPKeyword_0() { return cPKeyword_0; }
+ //"prob"
+ public Keyword getProbKeyword_0() { return cProbKeyword_0; }
//"="
public Keyword getEqualsSignKeyword_1() { return cEqualsSignKeyword_1; }
@@ -880,13 +880,13 @@ public class CftLanguageGrammarAccess extends AbstractGrammarElementFinder {
private final CrossReference cComponentTypeComponentDefinitionCrossReference_1_0 = (CrossReference)cComponentTypeAssignment_1.eContents().get(0);
private final RuleCall cComponentTypeComponentDefinitionQualifiedNameParserRuleCall_1_0_1 = (RuleCall)cComponentTypeComponentDefinitionCrossReference_1_0.eContents().get(1);
private final Assignment cNameAssignment_2 = (Assignment)cGroup.eContents().get(2);
- private final RuleCall cNameIDTerminalRuleCall_2_0 = (RuleCall)cNameAssignment_2.eContents().get(0);
+ private final RuleCall cNameValidIdParserRuleCall_2_0 = (RuleCall)cNameAssignment_2.eContents().get(0);
//ComponentInstance:
- // "=>" componentType=[cft::ComponentDefinition|QualifiedName] name=ID?;
+ // "=>" componentType=[cft::ComponentDefinition|QualifiedName] name=ValidId?;
@Override public ParserRule getRule() { return rule; }
- //"=>" componentType=[cft::ComponentDefinition|QualifiedName] name=ID?
+ //"=>" componentType=[cft::ComponentDefinition|QualifiedName] name=ValidId?
public Group getGroup() { return cGroup; }
//"=>"
@@ -901,11 +901,11 @@ public class CftLanguageGrammarAccess extends AbstractGrammarElementFinder {
//QualifiedName
public RuleCall getComponentTypeComponentDefinitionQualifiedNameParserRuleCall_1_0_1() { return cComponentTypeComponentDefinitionQualifiedNameParserRuleCall_1_0_1; }
- //name=ID?
+ //name=ValidId?
public Assignment getNameAssignment_2() { return cNameAssignment_2; }
- //ID
- public RuleCall getNameIDTerminalRuleCall_2_0() { return cNameIDTerminalRuleCall_2_0; }
+ //ValidId
+ public RuleCall getNameValidIdParserRuleCall_2_0() { return cNameValidIdParserRuleCall_2_0; }
}
public class QualifiedNameElements extends AbstractParserRuleElementFinder {
private final ParserRule rule = (ParserRule) GrammarUtil.findRuleForName(getGrammar(), "hu.bme.mit.inf.dslreasoner.faulttree.components.CftLanguage.QualifiedName");
@@ -1169,7 +1169,7 @@ public class CftLanguageGrammarAccess extends AbstractGrammarElementFinder {
}
//ConstantDistribution ft::ConstantDistribution:
- // "p" "=" p=Double;
+ // "prob" "=" p=Double;
public ConstantDistributionElements getConstantDistributionAccess() {
return pConstantDistribution;
}
@@ -1306,7 +1306,7 @@ public class CftLanguageGrammarAccess extends AbstractGrammarElementFinder {
}
//ComponentInstance:
- // "=>" componentType=[cft::ComponentDefinition|QualifiedName] name=ID?;
+ // "=>" componentType=[cft::ComponentDefinition|QualifiedName] name=ValidId?;
public ComponentInstanceElements getComponentInstanceAccess() {
return pComponentInstance;
}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext
index b4d5338b..ab053f67 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/src/hu/bme/mit/inf/dslreasoner/faulttree/components/CftLanguage.xtext
@@ -33,7 +33,7 @@ Distribution returns ft::Distribution:
ConstantDistribution | ExponentialDistribution;
ConstantDistribution returns ft::ConstantDistribution:
- "p" "=" p=Double;
+ "prob" "=" p=Double;
ExponentialDistribution returns ft::ExponentialDistribution:
"lambda" "=" lambda=Double;
@@ -80,7 +80,7 @@ EventReference:
component=[Variable|ValidId] "." event=[cft::EventDeclaration|ValidId];
ComponentInstance:
- "=>" componentType=[cft::ComponentDefinition|QualifiedName] name=ID?;
+ "=>" componentType=[cft::ComponentDefinition|QualifiedName] name=ValidId?;
QualifiedName returns ecore::EString:
ValidId ("." ValidId)*;
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 df7b7e51..98b07e66 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageRuntimeModule.xtendbin 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 414dfa3e..2ae80aef 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageStandaloneSetup.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/.CftLanguageStandaloneSetup.xtendbin differ
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 80e91ebf..a97cd12c 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.CftLanguageValueConverterService.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.CftLanguageValueConverterService.xtendbin 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 6787af3f..25b37e6d 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.OF_INTValueConverter.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/conversion/.OF_INTValueConverter.xtendbin differ
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 0ad3ae5a..b2a0c833 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/generator/.CftLanguageGenerator.xtendbin differ
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin
index 62a48625..cea3c7e0 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.CftLanguageQualifiedNameProvider.xtendbin 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 b5ec6fb3..a0a97448 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/naming/.PackageNameProvider.xtendbin differ
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 c570dbe3..a3aa3347 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageImportedNamespaceAwareLocalScopeProvider.xtendbin 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 3c714b09..20f539ae 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/scoping/.CftLanguageScopeProvider.xtendbin differ
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 683ac14e..719d28f8 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.components/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/components/validation/.CftLanguageValidator.xtendbin differ
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/BasicEvent.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/BasicEvent.java
index acfc635b..63b8d0ed 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/BasicEvent.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/BasicEvent.java
@@ -19,7 +19,7 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.ft;
* @model
* @generated
*/
-public interface BasicEvent extends Event {
+public interface BasicEvent extends RandomEvent {
/**
* Returns the value of the 'Distribution ' containment reference.
*
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ConstantEvent.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ConstantEvent.java
new file mode 100644
index 00000000..a171fc95
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ConstantEvent.java
@@ -0,0 +1,49 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.faulttree.model.ft;
+
+
+/**
+ *
+ * A representation of the model object 'Constant Event '.
+ *
+ *
+ *
+ * The following features are supported:
+ *
+ *
+ * {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent#isFailed Failed }
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getConstantEvent()
+ * @model
+ * @generated
+ */
+public interface ConstantEvent extends Event {
+ /**
+ * Returns the value of the 'Failed ' attribute.
+ *
+ *
+ * If the meaning of the 'Failed ' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Failed ' attribute.
+ * @see #setFailed(boolean)
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getConstantEvent_Failed()
+ * @model
+ * @generated
+ */
+ boolean isFailed();
+
+ /**
+ * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent#isFailed Failed }' attribute.
+ *
+ *
+ * @param value the new value of the 'Failed ' attribute.
+ * @see #isFailed()
+ * @generated
+ */
+ void setFailed(boolean value);
+
+} // ConstantEvent
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ConstantModel.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ConstantModel.java
new file mode 100644
index 00000000..5649559f
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ConstantModel.java
@@ -0,0 +1,49 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.faulttree.model.ft;
+
+
+/**
+ *
+ * A representation of the model object 'Constant Model '.
+ *
+ *
+ *
+ * The following features are supported:
+ *
+ *
+ * {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel#isFailed Failed }
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getConstantModel()
+ * @model
+ * @generated
+ */
+public interface ConstantModel extends ReliabilityModel {
+ /**
+ * Returns the value of the 'Failed ' attribute.
+ *
+ *
+ * If the meaning of the 'Failed ' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Failed ' attribute.
+ * @see #setFailed(boolean)
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getConstantModel_Failed()
+ * @model
+ * @generated
+ */
+ boolean isFailed();
+
+ /**
+ * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel#isFailed Failed }' attribute.
+ *
+ *
+ * @param value the new value of the 'Failed ' attribute.
+ * @see #isFailed()
+ * @generated
+ */
+ void setFailed(boolean value);
+
+} // ConstantModel
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/Event.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/Event.java
index 186e23b9..a5a905a0 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/Event.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/Event.java
@@ -9,42 +9,10 @@ import org.eclipse.emf.ecore.EObject;
* A representation of the model object 'Event '.
*
*
- *
- * The following features are supported:
- *
- *
- * {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event#getName Name }
- *
*
* @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getEvent()
* @model abstract="true"
* @generated
*/
public interface Event extends EObject {
- /**
- * Returns the value of the 'Name ' attribute.
- *
- *
- * If the meaning of the 'Name ' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'Name ' attribute.
- * @see #setName(String)
- * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getEvent_Name()
- * @model
- * @generated
- */
- String getName();
-
- /**
- * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event#getName Name }' attribute.
- *
- *
- * @param value the new value of the 'Name ' attribute.
- * @see #getName()
- * @generated
- */
- void setName(String value);
-
} // Event
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FaultTree.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FaultTree.java
index 247a9918..0bf258be 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FaultTree.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FaultTree.java
@@ -4,8 +4,6 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.ft;
import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EObject;
-
/**
*
* A representation of the model object 'Fault Tree '.
@@ -23,10 +21,10 @@ import org.eclipse.emf.ecore.EObject;
* @model
* @generated
*/
-public interface FaultTree extends EObject {
+public interface FaultTree extends ReliabilityModel {
/**
* Returns the value of the 'Events ' containment reference list.
- * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event}.
+ * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent}.
*
*
* If the meaning of the 'Events ' containment reference list isn't clear,
@@ -38,7 +36,7 @@ public interface FaultTree extends EObject {
* @model containment="true"
* @generated
*/
- EList getEvents();
+ EList getEvents();
/**
* Returns the value of the 'Top Event ' reference.
@@ -49,12 +47,12 @@ public interface FaultTree extends EObject {
*
*
* @return the value of the 'Top Event ' reference.
- * @see #setTopEvent(Event)
+ * @see #setTopEvent(RandomEvent)
* @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getFaultTree_TopEvent()
* @model required="true"
* @generated
*/
- Event getTopEvent();
+ RandomEvent getTopEvent();
/**
* Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FaultTree#getTopEvent Top Event }' reference.
@@ -64,6 +62,6 @@ public interface FaultTree extends EObject {
* @see #getTopEvent()
* @generated
*/
- void setTopEvent(Event value);
+ void setTopEvent(RandomEvent value);
} // FaultTree
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FtFactory.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FtFactory.java
index 20b71b1a..7d420e34 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FtFactory.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FtFactory.java
@@ -84,6 +84,24 @@ public interface FtFactory extends EFactory {
*/
KOfMGate createKOfMGate();
+ /**
+ * Returns a new object of class 'Constant Model '.
+ *
+ *
+ * @return a new object of class 'Constant Model '.
+ * @generated
+ */
+ ConstantModel createConstantModel();
+
+ /**
+ * Returns a new object of class 'Constant Event '.
+ *
+ *
+ * @return a new object of class 'Constant Event '.
+ * @generated
+ */
+ ConstantEvent createConstantEvent();
+
/**
* Returns the package supported by this factory.
*
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FtPackage.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FtPackage.java
index e376063c..dd35d666 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FtPackage.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/FtPackage.java
@@ -56,6 +56,34 @@ public interface FtPackage extends EPackage {
*/
FtPackage eINSTANCE = hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl.init();
+ /**
+ * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ReliabilityModelImpl Reliability Model }' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ReliabilityModelImpl
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl#getReliabilityModel()
+ * @generated
+ */
+ int RELIABILITY_MODEL = 10;
+
+ /**
+ * The number of structural features of the 'Reliability Model ' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int RELIABILITY_MODEL_FEATURE_COUNT = 0;
+
+ /**
+ * The number of operations of the 'Reliability Model ' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int RELIABILITY_MODEL_OPERATION_COUNT = 0;
+
/**
* The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FaultTreeImpl Fault Tree }' class.
*
@@ -73,7 +101,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int FAULT_TREE__EVENTS = 0;
+ int FAULT_TREE__EVENTS = RELIABILITY_MODEL_FEATURE_COUNT + 0;
/**
* The feature id for the 'Top Event ' reference.
@@ -82,7 +110,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int FAULT_TREE__TOP_EVENT = 1;
+ int FAULT_TREE__TOP_EVENT = RELIABILITY_MODEL_FEATURE_COUNT + 1;
/**
* The number of structural features of the 'Fault Tree ' class.
@@ -91,7 +119,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int FAULT_TREE_FEATURE_COUNT = 2;
+ int FAULT_TREE_FEATURE_COUNT = RELIABILITY_MODEL_FEATURE_COUNT + 2;
/**
* The number of operations of the 'Fault Tree ' class.
@@ -100,7 +128,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int FAULT_TREE_OPERATION_COUNT = 0;
+ int FAULT_TREE_OPERATION_COUNT = RELIABILITY_MODEL_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.EventImpl Event }' class.
@@ -110,7 +138,35 @@ public interface FtPackage extends EPackage {
* @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl#getEvent()
* @generated
*/
- int EVENT = 1;
+ int EVENT = 12;
+
+ /**
+ * The number of structural features of the 'Event ' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int EVENT_FEATURE_COUNT = 0;
+
+ /**
+ * The number of operations of the 'Event ' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int EVENT_OPERATION_COUNT = 0;
+
+ /**
+ * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.RandomEventImpl Random Event }' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.RandomEventImpl
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl#getRandomEvent()
+ * @generated
+ */
+ int RANDOM_EVENT = 1;
/**
* The feature id for the 'Name ' attribute.
@@ -119,25 +175,25 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int EVENT__NAME = 0;
+ int RANDOM_EVENT__NAME = EVENT_FEATURE_COUNT + 0;
/**
- * The number of structural features of the 'Event ' class.
+ * The number of structural features of the 'Random Event ' class.
*
*
* @generated
* @ordered
*/
- int EVENT_FEATURE_COUNT = 1;
+ int RANDOM_EVENT_FEATURE_COUNT = EVENT_FEATURE_COUNT + 1;
/**
- * The number of operations of the 'Event ' class.
+ * The number of operations of the 'Random Event ' class.
*
*
* @generated
* @ordered
*/
- int EVENT_OPERATION_COUNT = 0;
+ int RANDOM_EVENT_OPERATION_COUNT = EVENT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.BasicEventImpl Basic Event }' class.
@@ -156,7 +212,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int BASIC_EVENT__NAME = EVENT__NAME;
+ int BASIC_EVENT__NAME = RANDOM_EVENT__NAME;
/**
* The feature id for the 'Distribution ' containment reference.
@@ -165,7 +221,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int BASIC_EVENT__DISTRIBUTION = EVENT_FEATURE_COUNT + 0;
+ int BASIC_EVENT__DISTRIBUTION = RANDOM_EVENT_FEATURE_COUNT + 0;
/**
* The number of structural features of the 'Basic Event ' class.
@@ -174,7 +230,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int BASIC_EVENT_FEATURE_COUNT = EVENT_FEATURE_COUNT + 1;
+ int BASIC_EVENT_FEATURE_COUNT = RANDOM_EVENT_FEATURE_COUNT + 1;
/**
* The number of operations of the 'Basic Event ' class.
@@ -183,7 +239,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int BASIC_EVENT_OPERATION_COUNT = EVENT_OPERATION_COUNT + 0;
+ int BASIC_EVENT_OPERATION_COUNT = RANDOM_EVENT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.GateImpl Gate }' class.
@@ -202,7 +258,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int GATE__NAME = EVENT__NAME;
+ int GATE__NAME = RANDOM_EVENT__NAME;
/**
* The feature id for the 'Input Events ' reference list.
@@ -211,7 +267,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int GATE__INPUT_EVENTS = EVENT_FEATURE_COUNT + 0;
+ int GATE__INPUT_EVENTS = RANDOM_EVENT_FEATURE_COUNT + 0;
/**
* The number of structural features of the 'Gate ' class.
@@ -220,7 +276,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int GATE_FEATURE_COUNT = EVENT_FEATURE_COUNT + 1;
+ int GATE_FEATURE_COUNT = RANDOM_EVENT_FEATURE_COUNT + 1;
/**
* The number of operations of the 'Gate ' class.
@@ -229,7 +285,7 @@ public interface FtPackage extends EPackage {
* @generated
* @ordered
*/
- int GATE_OPERATION_COUNT = EVENT_OPERATION_COUNT + 0;
+ int GATE_OPERATION_COUNT = RANDOM_EVENT_OPERATION_COUNT + 0;
/**
* The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.DistributionImpl Distribution }' class.
@@ -463,31 +519,96 @@ public interface FtPackage extends EPackage {
int KOF_MGATE__K = GATE_FEATURE_COUNT + 0;
/**
- * The feature id for the 'M ' attribute.
+ * The number of structural features of the 'KOf MGate ' class.
*
*
* @generated
* @ordered
*/
- int KOF_MGATE__M = GATE_FEATURE_COUNT + 1;
+ int KOF_MGATE_FEATURE_COUNT = GATE_FEATURE_COUNT + 1;
/**
- * The number of structural features of the 'KOf MGate ' class.
+ * The number of operations of the 'KOf MGate ' class.
*
*
* @generated
* @ordered
*/
- int KOF_MGATE_FEATURE_COUNT = GATE_FEATURE_COUNT + 2;
+ int KOF_MGATE_OPERATION_COUNT = GATE_OPERATION_COUNT + 0;
/**
- * The number of operations of the 'KOf MGate ' class.
+ * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ConstantModelImpl Constant Model }' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ConstantModelImpl
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl#getConstantModel()
+ * @generated
+ */
+ int CONSTANT_MODEL = 11;
+
+ /**
+ * The feature id for the 'Failed ' attribute.
*
*
* @generated
* @ordered
*/
- int KOF_MGATE_OPERATION_COUNT = GATE_OPERATION_COUNT + 0;
+ int CONSTANT_MODEL__FAILED = RELIABILITY_MODEL_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the 'Constant Model ' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTANT_MODEL_FEATURE_COUNT = RELIABILITY_MODEL_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the 'Constant Model ' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTANT_MODEL_OPERATION_COUNT = RELIABILITY_MODEL_OPERATION_COUNT + 0;
+
+ /**
+ * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ConstantEventImpl Constant Event }' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ConstantEventImpl
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl#getConstantEvent()
+ * @generated
+ */
+ int CONSTANT_EVENT = 13;
+
+ /**
+ * The feature id for the 'Failed ' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTANT_EVENT__FAILED = EVENT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the 'Constant Event ' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTANT_EVENT_FEATURE_COUNT = EVENT_FEATURE_COUNT + 1;
+
+ /**
+ * The number of operations of the 'Constant Event ' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ int CONSTANT_EVENT_OPERATION_COUNT = EVENT_OPERATION_COUNT + 0;
/**
@@ -523,25 +644,25 @@ public interface FtPackage extends EPackage {
EReference getFaultTree_TopEvent();
/**
- * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event Event }'.
+ * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent Random Event }'.
*
*
- * @return the meta object for class 'Event '.
- * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event
+ * @return the meta object for class 'Random Event '.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent
* @generated
*/
- EClass getEvent();
+ EClass getRandomEvent();
/**
- * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event#getName Name }'.
+ * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent#getName Name }'.
*
*
* @return the meta object for the attribute 'Name '.
- * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event#getName()
- * @see #getEvent()
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent#getName()
+ * @see #getRandomEvent()
* @generated
*/
- EAttribute getEvent_Name();
+ EAttribute getRandomEvent_Name();
/**
* Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.BasicEvent Basic Event }'.
@@ -679,15 +800,66 @@ public interface FtPackage extends EPackage {
EAttribute getKOfMGate_K();
/**
- * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate#getM M }'.
+ * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ReliabilityModel Reliability Model }'.
*
*
- * @return the meta object for the attribute 'M '.
- * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate#getM()
- * @see #getKOfMGate()
+ * @return the meta object for class 'Reliability Model '.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ReliabilityModel
+ * @generated
+ */
+ EClass getReliabilityModel();
+
+ /**
+ * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel Constant Model }'.
+ *
+ *
+ * @return the meta object for class 'Constant Model '.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel
+ * @generated
+ */
+ EClass getConstantModel();
+
+ /**
+ * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel#isFailed Failed }'.
+ *
+ *
+ * @return the meta object for the attribute 'Failed '.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel#isFailed()
+ * @see #getConstantModel()
+ * @generated
+ */
+ EAttribute getConstantModel_Failed();
+
+ /**
+ * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event Event }'.
+ *
+ *
+ * @return the meta object for class 'Event '.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event
+ * @generated
+ */
+ EClass getEvent();
+
+ /**
+ * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent Constant Event }'.
+ *
+ *
+ * @return the meta object for class 'Constant Event '.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent
* @generated
*/
- EAttribute getKOfMGate_M();
+ EClass getConstantEvent();
+
+ /**
+ * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent#isFailed Failed }'.
+ *
+ *
+ * @return the meta object for the attribute 'Failed '.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent#isFailed()
+ * @see #getConstantEvent()
+ * @generated
+ */
+ EAttribute getConstantEvent_Failed();
/**
* Returns the factory that creates the instances of the model.
@@ -739,14 +911,14 @@ public interface FtPackage extends EPackage {
EReference FAULT_TREE__TOP_EVENT = eINSTANCE.getFaultTree_TopEvent();
/**
- * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.EventImpl Event }' class.
+ * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.RandomEventImpl Random Event }' class.
*
*
- * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.EventImpl
- * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl#getEvent()
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.RandomEventImpl
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl#getRandomEvent()
* @generated
*/
- EClass EVENT = eINSTANCE.getEvent();
+ EClass RANDOM_EVENT = eINSTANCE.getRandomEvent();
/**
* The meta object literal for the 'Name ' attribute feature.
@@ -754,7 +926,7 @@ public interface FtPackage extends EPackage {
*
* @generated
*/
- EAttribute EVENT__NAME = eINSTANCE.getEvent_Name();
+ EAttribute RANDOM_EVENT__NAME = eINSTANCE.getRandomEvent_Name();
/**
* The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.BasicEventImpl Basic Event }' class.
@@ -877,12 +1049,60 @@ public interface FtPackage extends EPackage {
EAttribute KOF_MGATE__K = eINSTANCE.getKOfMGate_K();
/**
- * The meta object literal for the 'M ' attribute feature.
+ * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ReliabilityModelImpl Reliability Model }' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ReliabilityModelImpl
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl#getReliabilityModel()
+ * @generated
+ */
+ EClass RELIABILITY_MODEL = eINSTANCE.getReliabilityModel();
+
+ /**
+ * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ConstantModelImpl Constant Model }' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ConstantModelImpl
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl#getConstantModel()
+ * @generated
+ */
+ EClass CONSTANT_MODEL = eINSTANCE.getConstantModel();
+
+ /**
+ * The meta object literal for the 'Failed ' attribute feature.
+ *
+ *
+ * @generated
+ */
+ EAttribute CONSTANT_MODEL__FAILED = eINSTANCE.getConstantModel_Failed();
+
+ /**
+ * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.EventImpl Event }' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.EventImpl
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl#getEvent()
+ * @generated
+ */
+ EClass EVENT = eINSTANCE.getEvent();
+
+ /**
+ * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ConstantEventImpl Constant Event }' class.
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ConstantEventImpl
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.FtPackageImpl#getConstantEvent()
+ * @generated
+ */
+ EClass CONSTANT_EVENT = eINSTANCE.getConstantEvent();
+
+ /**
+ * The meta object literal for the 'Failed ' attribute feature.
*
*
* @generated
*/
- EAttribute KOF_MGATE__M = eINSTANCE.getKOfMGate_M();
+ EAttribute CONSTANT_EVENT__FAILED = eINSTANCE.getConstantEvent_Failed();
}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/Gate.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/Gate.java
index 0df58bb4..5015051a 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/Gate.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/Gate.java
@@ -20,10 +20,10 @@ import org.eclipse.emf.common.util.EList;
* @model abstract="true"
* @generated
*/
-public interface Gate extends Event {
+public interface Gate extends RandomEvent {
/**
* Returns the value of the 'Input Events ' reference list.
- * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event}.
+ * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent}.
*
*
* If the meaning of the 'Input Events ' reference list isn't clear,
@@ -32,9 +32,9 @@ public interface Gate extends Event {
*
* @return the value of the 'Input Events ' reference list.
* @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getGate_InputEvents()
- * @model
+ * @model lower="2"
* @generated
*/
- EList getInputEvents();
+ EList getInputEvents();
} // Gate
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/KOfMGate.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/KOfMGate.java
index 33334083..c891f83a 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/KOfMGate.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/KOfMGate.java
@@ -13,7 +13,6 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.ft;
*
*
* {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate#getK K }
- * {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate#getM M }
*
*
* @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getKOfMGate()
@@ -47,30 +46,4 @@ public interface KOfMGate extends Gate {
*/
void setK(int value);
- /**
- * Returns the value of the 'M ' attribute.
- *
- *
- * If the meaning of the 'M ' attribute isn't clear,
- * there really should be more of a description here...
- *
- *
- * @return the value of the 'M ' attribute.
- * @see #setM(int)
- * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getKOfMGate_M()
- * @model
- * @generated
- */
- int getM();
-
- /**
- * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate#getM M }' attribute.
- *
- *
- * @param value the new value of the 'M ' attribute.
- * @see #getM()
- * @generated
- */
- void setM(int value);
-
} // KOfMGate
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/RandomEvent.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/RandomEvent.java
new file mode 100644
index 00000000..3931ac41
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/RandomEvent.java
@@ -0,0 +1,49 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.faulttree.model.ft;
+
+
+/**
+ *
+ * A representation of the model object 'Random Event '.
+ *
+ *
+ *
+ * The following features are supported:
+ *
+ *
+ * {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent#getName Name }
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getRandomEvent()
+ * @model abstract="true"
+ * @generated
+ */
+public interface RandomEvent extends Event {
+ /**
+ * Returns the value of the 'Name ' attribute.
+ *
+ *
+ * If the meaning of the 'Name ' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Name ' attribute.
+ * @see #setName(String)
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getRandomEvent_Name()
+ * @model
+ * @generated
+ */
+ String getName();
+
+ /**
+ * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent#getName Name }' attribute.
+ *
+ *
+ * @param value the new value of the 'Name ' attribute.
+ * @see #getName()
+ * @generated
+ */
+ void setName(String value);
+
+} // RandomEvent
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ReliabilityModel.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ReliabilityModel.java
new file mode 100644
index 00000000..c1dc2162
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/ReliabilityModel.java
@@ -0,0 +1,18 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.faulttree.model.ft;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ *
+ * A representation of the model object 'Reliability Model '.
+ *
+ *
+ *
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage#getReliabilityModel()
+ * @model abstract="true"
+ * @generated
+ */
+public interface ReliabilityModel extends EObject {
+} // ReliabilityModel
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/BasicEventImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/BasicEventImpl.java
index 8fd0f613..bbed7b00 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/BasicEventImpl.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/BasicEventImpl.java
@@ -27,7 +27,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
*
* @generated
*/
-public class BasicEventImpl extends EventImpl implements BasicEvent {
+public class BasicEventImpl extends RandomEventImpl implements BasicEvent {
/**
* The cached value of the '{@link #getDistribution() Distribution }' containment reference.
*
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantEventImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantEventImpl.java
new file mode 100644
index 00000000..fc7bcf09
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantEventImpl.java
@@ -0,0 +1,164 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl;
+
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ *
+ * An implementation of the model object 'Constant Event '.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ConstantEventImpl#isFailed Failed }
+ *
+ *
+ * @generated
+ */
+public class ConstantEventImpl extends EventImpl implements ConstantEvent {
+ /**
+ * The default value of the '{@link #isFailed() Failed }' attribute.
+ *
+ *
+ * @see #isFailed()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean FAILED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isFailed() Failed }' attribute.
+ *
+ *
+ * @see #isFailed()
+ * @generated
+ * @ordered
+ */
+ protected boolean failed = FAILED_EDEFAULT;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected ConstantEventImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FtPackage.Literals.CONSTANT_EVENT;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFailed() {
+ return failed;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setFailed(boolean newFailed) {
+ boolean oldFailed = failed;
+ failed = newFailed;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FtPackage.CONSTANT_EVENT__FAILED, oldFailed, failed));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FtPackage.CONSTANT_EVENT__FAILED:
+ return isFailed();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FtPackage.CONSTANT_EVENT__FAILED:
+ setFailed((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FtPackage.CONSTANT_EVENT__FAILED:
+ setFailed(FAILED_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FtPackage.CONSTANT_EVENT__FAILED:
+ return failed != FAILED_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuilder result = new StringBuilder(super.toString());
+ result.append(" (failed: ");
+ result.append(failed);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ConstantEventImpl
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantModelImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantModelImpl.java
new file mode 100644
index 00000000..52e1605b
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ConstantModelImpl.java
@@ -0,0 +1,164 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl;
+
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ *
+ * An implementation of the model object 'Constant Model '.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.ConstantModelImpl#isFailed Failed }
+ *
+ *
+ * @generated
+ */
+public class ConstantModelImpl extends ReliabilityModelImpl implements ConstantModel {
+ /**
+ * The default value of the '{@link #isFailed() Failed }' attribute.
+ *
+ *
+ * @see #isFailed()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean FAILED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isFailed() Failed }' attribute.
+ *
+ *
+ * @see #isFailed()
+ * @generated
+ * @ordered
+ */
+ protected boolean failed = FAILED_EDEFAULT;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected ConstantModelImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FtPackage.Literals.CONSTANT_MODEL;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean isFailed() {
+ return failed;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setFailed(boolean newFailed) {
+ boolean oldFailed = failed;
+ failed = newFailed;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FtPackage.CONSTANT_MODEL__FAILED, oldFailed, failed));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FtPackage.CONSTANT_MODEL__FAILED:
+ return isFailed();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FtPackage.CONSTANT_MODEL__FAILED:
+ setFailed((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FtPackage.CONSTANT_MODEL__FAILED:
+ setFailed(FAILED_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FtPackage.CONSTANT_MODEL__FAILED:
+ return failed != FAILED_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuilder result = new StringBuilder(super.toString());
+ result.append(" (failed: ");
+ result.append(failed);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ConstantModelImpl
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/EventImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/EventImpl.java
index 44ac0eb6..b37fa6bd 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/EventImpl.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/EventImpl.java
@@ -5,47 +5,18 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage;
-import org.eclipse.emf.common.notify.Notification;
-
import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
*
* An implementation of the model object 'Event '.
*
- *
- * The following features are implemented:
- *
- *
- * {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.EventImpl#getName Name }
- *
*
* @generated
*/
public abstract class EventImpl extends MinimalEObjectImpl.Container implements Event {
- /**
- * The default value of the '{@link #getName() Name }' attribute.
- *
- *
- * @see #getName()
- * @generated
- * @ordered
- */
- protected static final String NAME_EDEFAULT = null;
-
- /**
- * The cached value of the '{@link #getName() Name }' attribute.
- *
- *
- * @see #getName()
- * @generated
- * @ordered
- */
- protected String name = NAME_EDEFAULT;
-
/**
*
*
@@ -65,101 +36,4 @@ public abstract class EventImpl extends MinimalEObjectImpl.Container implements
return FtPackage.Literals.EVENT;
}
- /**
- *
- *
- * @generated
- */
- @Override
- public String getName() {
- return name;
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public void setName(String newName) {
- String oldName = name;
- name = newName;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FtPackage.EVENT__NAME, oldName, name));
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case FtPackage.EVENT__NAME:
- return getName();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case FtPackage.EVENT__NAME:
- setName((String)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case FtPackage.EVENT__NAME:
- setName(NAME_EDEFAULT);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case FtPackage.EVENT__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- }
- return super.eIsSet(featureID);
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public String toString() {
- if (eIsProxy()) return super.toString();
-
- StringBuilder result = new StringBuilder(super.toString());
- result.append(" (name: ");
- result.append(name);
- result.append(')');
- return result.toString();
- }
-
} //EventImpl
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FaultTreeImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FaultTreeImpl.java
index 9c716c21..23f1d056 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FaultTreeImpl.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FaultTreeImpl.java
@@ -2,9 +2,9 @@
*/
package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl;
-import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FaultTree;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent;
import java.util.Collection;
@@ -17,7 +17,6 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
@@ -36,7 +35,7 @@ import org.eclipse.emf.ecore.util.InternalEList;
*
* @generated
*/
-public class FaultTreeImpl extends MinimalEObjectImpl.Container implements FaultTree {
+public class FaultTreeImpl extends ReliabilityModelImpl implements FaultTree {
/**
* The cached value of the '{@link #getEvents() Events }' containment reference list.
*
@@ -45,7 +44,7 @@ public class FaultTreeImpl extends MinimalEObjectImpl.Container implements Fault
* @generated
* @ordered
*/
- protected EList events;
+ protected EList events;
/**
* The cached value of the '{@link #getTopEvent() Top Event }' reference.
@@ -55,7 +54,7 @@ public class FaultTreeImpl extends MinimalEObjectImpl.Container implements Fault
* @generated
* @ordered
*/
- protected Event topEvent;
+ protected RandomEvent topEvent;
/**
*
@@ -82,9 +81,9 @@ public class FaultTreeImpl extends MinimalEObjectImpl.Container implements Fault
* @generated
*/
@Override
- public EList getEvents() {
+ public EList getEvents() {
if (events == null) {
- events = new EObjectContainmentEList(Event.class, this, FtPackage.FAULT_TREE__EVENTS);
+ events = new EObjectContainmentEList(RandomEvent.class, this, FtPackage.FAULT_TREE__EVENTS);
}
return events;
}
@@ -95,10 +94,10 @@ public class FaultTreeImpl extends MinimalEObjectImpl.Container implements Fault
* @generated
*/
@Override
- public Event getTopEvent() {
+ public RandomEvent getTopEvent() {
if (topEvent != null && topEvent.eIsProxy()) {
InternalEObject oldTopEvent = (InternalEObject)topEvent;
- topEvent = (Event)eResolveProxy(oldTopEvent);
+ topEvent = (RandomEvent)eResolveProxy(oldTopEvent);
if (topEvent != oldTopEvent) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, FtPackage.FAULT_TREE__TOP_EVENT, oldTopEvent, topEvent));
@@ -112,7 +111,7 @@ public class FaultTreeImpl extends MinimalEObjectImpl.Container implements Fault
*
* @generated
*/
- public Event basicGetTopEvent() {
+ public RandomEvent basicGetTopEvent() {
return topEvent;
}
@@ -122,8 +121,8 @@ public class FaultTreeImpl extends MinimalEObjectImpl.Container implements Fault
* @generated
*/
@Override
- public void setTopEvent(Event newTopEvent) {
- Event oldTopEvent = topEvent;
+ public void setTopEvent(RandomEvent newTopEvent) {
+ RandomEvent oldTopEvent = topEvent;
topEvent = newTopEvent;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, FtPackage.FAULT_TREE__TOP_EVENT, oldTopEvent, topEvent));
@@ -171,10 +170,10 @@ public class FaultTreeImpl extends MinimalEObjectImpl.Container implements Fault
switch (featureID) {
case FtPackage.FAULT_TREE__EVENTS:
getEvents().clear();
- getEvents().addAll((Collection extends Event>)newValue);
+ getEvents().addAll((Collection extends RandomEvent>)newValue);
return;
case FtPackage.FAULT_TREE__TOP_EVENT:
- setTopEvent((Event)newValue);
+ setTopEvent((RandomEvent)newValue);
return;
}
super.eSet(featureID, newValue);
@@ -192,7 +191,7 @@ public class FaultTreeImpl extends MinimalEObjectImpl.Container implements Fault
getEvents().clear();
return;
case FtPackage.FAULT_TREE__TOP_EVENT:
- setTopEvent((Event)null);
+ setTopEvent((RandomEvent)null);
return;
}
super.eUnset(featureID);
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FtFactoryImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FtFactoryImpl.java
index 59364443..126abed8 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FtFactoryImpl.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FtFactoryImpl.java
@@ -63,6 +63,8 @@ public class FtFactoryImpl extends EFactoryImpl implements FtFactory {
case FtPackage.AND_GATE: return createAndGate();
case FtPackage.OR_GATE: return createOrGate();
case FtPackage.KOF_MGATE: return createKOfMGate();
+ case FtPackage.CONSTANT_MODEL: return createConstantModel();
+ case FtPackage.CONSTANT_EVENT: return createConstantEvent();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -145,6 +147,28 @@ public class FtFactoryImpl extends EFactoryImpl implements FtFactory {
return kOfMGate;
}
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public ConstantModel createConstantModel() {
+ ConstantModelImpl constantModel = new ConstantModelImpl();
+ return constantModel;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public ConstantEvent createConstantEvent() {
+ ConstantEventImpl constantEvent = new ConstantEventImpl();
+ return constantEvent;
+ }
+
/**
*
*
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FtPackageImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FtPackageImpl.java
index 27ff09df..cc2c0617 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FtPackageImpl.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/FtPackageImpl.java
@@ -5,6 +5,8 @@ package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.AndGate;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.BasicEvent;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantDistribution;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Distribution;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ExponentialDistribution;
@@ -14,6 +16,8 @@ import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Gate;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.OrGate;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ReliabilityModel;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
@@ -41,7 +45,7 @@ public class FtPackageImpl extends EPackageImpl implements FtPackage {
*
* @generated
*/
- private EClass eventEClass = null;
+ private EClass randomEventEClass = null;
/**
*
@@ -99,6 +103,34 @@ public class FtPackageImpl extends EPackageImpl implements FtPackage {
*/
private EClass kOfMGateEClass = null;
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass reliabilityModelEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass constantModelEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass eventEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass constantEventEClass = null;
+
/**
* Creates an instance of the model Package , registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
@@ -196,8 +228,8 @@ public class FtPackageImpl extends EPackageImpl implements FtPackage {
* @generated
*/
@Override
- public EClass getEvent() {
- return eventEClass;
+ public EClass getRandomEvent() {
+ return randomEventEClass;
}
/**
@@ -206,8 +238,8 @@ public class FtPackageImpl extends EPackageImpl implements FtPackage {
* @generated
*/
@Override
- public EAttribute getEvent_Name() {
- return (EAttribute)eventEClass.getEStructuralFeatures().get(0);
+ public EAttribute getRandomEvent_Name() {
+ return (EAttribute)randomEventEClass.getEStructuralFeatures().get(0);
}
/**
@@ -346,8 +378,58 @@ public class FtPackageImpl extends EPackageImpl implements FtPackage {
* @generated
*/
@Override
- public EAttribute getKOfMGate_M() {
- return (EAttribute)kOfMGateEClass.getEStructuralFeatures().get(1);
+ public EClass getReliabilityModel() {
+ return reliabilityModelEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getConstantModel() {
+ return constantModelEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getConstantModel_Failed() {
+ return (EAttribute)constantModelEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getEvent() {
+ return eventEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EClass getConstantEvent() {
+ return constantEventEClass;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public EAttribute getConstantEvent_Failed() {
+ return (EAttribute)constantEventEClass.getEStructuralFeatures().get(0);
}
/**
@@ -383,8 +465,8 @@ public class FtPackageImpl extends EPackageImpl implements FtPackage {
createEReference(faultTreeEClass, FAULT_TREE__EVENTS);
createEReference(faultTreeEClass, FAULT_TREE__TOP_EVENT);
- eventEClass = createEClass(EVENT);
- createEAttribute(eventEClass, EVENT__NAME);
+ randomEventEClass = createEClass(RANDOM_EVENT);
+ createEAttribute(randomEventEClass, RANDOM_EVENT__NAME);
basicEventEClass = createEClass(BASIC_EVENT);
createEReference(basicEventEClass, BASIC_EVENT__DISTRIBUTION);
@@ -406,7 +488,16 @@ public class FtPackageImpl extends EPackageImpl implements FtPackage {
kOfMGateEClass = createEClass(KOF_MGATE);
createEAttribute(kOfMGateEClass, KOF_MGATE__K);
- createEAttribute(kOfMGateEClass, KOF_MGATE__M);
+
+ reliabilityModelEClass = createEClass(RELIABILITY_MODEL);
+
+ constantModelEClass = createEClass(CONSTANT_MODEL);
+ createEAttribute(constantModelEClass, CONSTANT_MODEL__FAILED);
+
+ eventEClass = createEClass(EVENT);
+
+ constantEventEClass = createEClass(CONSTANT_EVENT);
+ createEAttribute(constantEventEClass, CONSTANT_EVENT__FAILED);
}
/**
@@ -437,27 +528,31 @@ public class FtPackageImpl extends EPackageImpl implements FtPackage {
// Set bounds for type parameters
// Add supertypes to classes
- basicEventEClass.getESuperTypes().add(this.getEvent());
- gateEClass.getESuperTypes().add(this.getEvent());
+ faultTreeEClass.getESuperTypes().add(this.getReliabilityModel());
+ randomEventEClass.getESuperTypes().add(this.getEvent());
+ basicEventEClass.getESuperTypes().add(this.getRandomEvent());
+ gateEClass.getESuperTypes().add(this.getRandomEvent());
constantDistributionEClass.getESuperTypes().add(this.getDistribution());
exponentialDistributionEClass.getESuperTypes().add(this.getDistribution());
andGateEClass.getESuperTypes().add(this.getGate());
orGateEClass.getESuperTypes().add(this.getGate());
kOfMGateEClass.getESuperTypes().add(this.getGate());
+ constantModelEClass.getESuperTypes().add(this.getReliabilityModel());
+ constantEventEClass.getESuperTypes().add(this.getEvent());
// Initialize classes, features, and operations; add parameters
initEClass(faultTreeEClass, FaultTree.class, "FaultTree", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getFaultTree_Events(), this.getEvent(), null, "events", null, 0, -1, FaultTree.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getFaultTree_TopEvent(), this.getEvent(), null, "topEvent", null, 1, 1, FaultTree.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getFaultTree_Events(), this.getRandomEvent(), null, "events", null, 0, -1, FaultTree.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getFaultTree_TopEvent(), this.getRandomEvent(), null, "topEvent", null, 1, 1, FaultTree.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEClass(eventEClass, Event.class, "Event", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEAttribute(getEvent_Name(), ecorePackage.getEString(), "name", null, 0, 1, Event.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(randomEventEClass, RandomEvent.class, "RandomEvent", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getRandomEvent_Name(), ecorePackage.getEString(), "name", null, 0, 1, RandomEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(basicEventEClass, BasicEvent.class, "BasicEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getBasicEvent_Distribution(), this.getDistribution(), null, "distribution", null, 1, 1, BasicEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(gateEClass, Gate.class, "Gate", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getGate_InputEvents(), this.getEvent(), null, "inputEvents", null, 0, -1, Gate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getGate_InputEvents(), this.getRandomEvent(), null, "inputEvents", null, 2, -1, Gate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(distributionEClass, Distribution.class, "Distribution", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -473,7 +568,16 @@ public class FtPackageImpl extends EPackageImpl implements FtPackage {
initEClass(kOfMGateEClass, KOfMGate.class, "KOfMGate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getKOfMGate_K(), ecorePackage.getEInt(), "k", null, 0, 1, KOfMGate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEAttribute(getKOfMGate_M(), ecorePackage.getEInt(), "m", null, 0, 1, KOfMGate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(reliabilityModelEClass, ReliabilityModel.class, "ReliabilityModel", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(constantModelEClass, ConstantModel.class, "ConstantModel", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getConstantModel_Failed(), ecorePackage.getEBoolean(), "failed", null, 0, 1, ConstantModel.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(eventEClass, Event.class, "Event", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+
+ initEClass(constantEventEClass, ConstantEvent.class, "ConstantEvent", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getConstantEvent_Failed(), ecorePackage.getEBoolean(), "failed", null, 0, 1, ConstantEvent.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/GateImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/GateImpl.java
index ae6d5a8d..9e753a09 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/GateImpl.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/GateImpl.java
@@ -2,9 +2,9 @@
*/
package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl;
-import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage;
import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Gate;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent;
import java.util.Collection;
@@ -27,7 +27,7 @@ import org.eclipse.emf.ecore.util.EObjectResolvingEList;
*
* @generated
*/
-public abstract class GateImpl extends EventImpl implements Gate {
+public abstract class GateImpl extends RandomEventImpl implements Gate {
/**
* The cached value of the '{@link #getInputEvents() Input Events }' reference list.
*
@@ -36,7 +36,7 @@ public abstract class GateImpl extends EventImpl implements Gate {
* @generated
* @ordered
*/
- protected EList inputEvents;
+ protected EList inputEvents;
/**
*
@@ -63,9 +63,9 @@ public abstract class GateImpl extends EventImpl implements Gate {
* @generated
*/
@Override
- public EList getInputEvents() {
+ public EList getInputEvents() {
if (inputEvents == null) {
- inputEvents = new EObjectResolvingEList(Event.class, this, FtPackage.GATE__INPUT_EVENTS);
+ inputEvents = new EObjectResolvingEList(RandomEvent.class, this, FtPackage.GATE__INPUT_EVENTS);
}
return inputEvents;
}
@@ -95,7 +95,7 @@ public abstract class GateImpl extends EventImpl implements Gate {
switch (featureID) {
case FtPackage.GATE__INPUT_EVENTS:
getInputEvents().clear();
- getInputEvents().addAll((Collection extends Event>)newValue);
+ getInputEvents().addAll((Collection extends RandomEvent>)newValue);
return;
}
super.eSet(featureID, newValue);
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/KOfMGateImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/KOfMGateImpl.java
index 0f0dd205..47ca936b 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/KOfMGateImpl.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/KOfMGateImpl.java
@@ -20,7 +20,6 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
*
*
* {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.KOfMGateImpl#getK K }
- * {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.KOfMGateImpl#getM M }
*
*
* @generated
@@ -46,26 +45,6 @@ public class KOfMGateImpl extends GateImpl implements KOfMGate {
*/
protected int k = K_EDEFAULT;
- /**
- * The default value of the '{@link #getM() M }' attribute.
- *
- *
- * @see #getM()
- * @generated
- * @ordered
- */
- protected static final int M_EDEFAULT = 0;
-
- /**
- * The cached value of the '{@link #getM() M }' attribute.
- *
- *
- * @see #getM()
- * @generated
- * @ordered
- */
- protected int m = M_EDEFAULT;
-
/**
*
*
@@ -108,29 +87,6 @@ public class KOfMGateImpl extends GateImpl implements KOfMGate {
eNotify(new ENotificationImpl(this, Notification.SET, FtPackage.KOF_MGATE__K, oldK, k));
}
- /**
- *
- *
- * @generated
- */
- @Override
- public int getM() {
- return m;
- }
-
- /**
- *
- *
- * @generated
- */
- @Override
- public void setM(int newM) {
- int oldM = m;
- m = newM;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, FtPackage.KOF_MGATE__M, oldM, m));
- }
-
/**
*
*
@@ -141,8 +97,6 @@ public class KOfMGateImpl extends GateImpl implements KOfMGate {
switch (featureID) {
case FtPackage.KOF_MGATE__K:
return getK();
- case FtPackage.KOF_MGATE__M:
- return getM();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -158,9 +112,6 @@ public class KOfMGateImpl extends GateImpl implements KOfMGate {
case FtPackage.KOF_MGATE__K:
setK((Integer)newValue);
return;
- case FtPackage.KOF_MGATE__M:
- setM((Integer)newValue);
- return;
}
super.eSet(featureID, newValue);
}
@@ -176,9 +127,6 @@ public class KOfMGateImpl extends GateImpl implements KOfMGate {
case FtPackage.KOF_MGATE__K:
setK(K_EDEFAULT);
return;
- case FtPackage.KOF_MGATE__M:
- setM(M_EDEFAULT);
- return;
}
super.eUnset(featureID);
}
@@ -193,8 +141,6 @@ public class KOfMGateImpl extends GateImpl implements KOfMGate {
switch (featureID) {
case FtPackage.KOF_MGATE__K:
return k != K_EDEFAULT;
- case FtPackage.KOF_MGATE__M:
- return m != M_EDEFAULT;
}
return super.eIsSet(featureID);
}
@@ -211,8 +157,6 @@ public class KOfMGateImpl extends GateImpl implements KOfMGate {
StringBuilder result = new StringBuilder(super.toString());
result.append(" (k: ");
result.append(k);
- result.append(", m: ");
- result.append(m);
result.append(')');
return result.toString();
}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/RandomEventImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/RandomEventImpl.java
new file mode 100644
index 00000000..4f9eda56
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/RandomEventImpl.java
@@ -0,0 +1,164 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl;
+
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent;
+
+import org.eclipse.emf.common.notify.Notification;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+
+/**
+ *
+ * An implementation of the model object 'Random Event '.
+ *
+ *
+ * The following features are implemented:
+ *
+ *
+ * {@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl.RandomEventImpl#getName Name }
+ *
+ *
+ * @generated
+ */
+public abstract class RandomEventImpl extends EventImpl implements RandomEvent {
+ /**
+ * The default value of the '{@link #getName() Name }' attribute.
+ *
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected static final String NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getName() Name }' attribute.
+ *
+ *
+ * @see #getName()
+ * @generated
+ * @ordered
+ */
+ protected String name = NAME_EDEFAULT;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected RandomEventImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FtPackage.Literals.RANDOM_EVENT;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String getName() {
+ return name;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void setName(String newName) {
+ String oldName = name;
+ name = newName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, FtPackage.RANDOM_EVENT__NAME, oldName, name));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case FtPackage.RANDOM_EVENT__NAME:
+ return getName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case FtPackage.RANDOM_EVENT__NAME:
+ setName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case FtPackage.RANDOM_EVENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case FtPackage.RANDOM_EVENT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuilder result = new StringBuilder(super.toString());
+ result.append(" (name: ");
+ result.append(name);
+ result.append(')');
+ return result.toString();
+ }
+
+} //RandomEventImpl
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ReliabilityModelImpl.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ReliabilityModelImpl.java
new file mode 100644
index 00000000..e3d0eec1
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/impl/ReliabilityModelImpl.java
@@ -0,0 +1,39 @@
+/**
+ */
+package hu.bme.mit.inf.dslreasoner.faulttree.model.ft.impl;
+
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtPackage;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ReliabilityModel;
+
+import org.eclipse.emf.ecore.EClass;
+
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+
+/**
+ *
+ * An implementation of the model object 'Reliability Model '.
+ *
+ *
+ * @generated
+ */
+public abstract class ReliabilityModelImpl extends MinimalEObjectImpl.Container implements ReliabilityModel {
+ /**
+ *
+ *
+ * @generated
+ */
+ protected ReliabilityModelImpl() {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return FtPackage.Literals.RELIABILITY_MODEL;
+ }
+
+} //ReliabilityModelImpl
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/util/FtAdapterFactory.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/util/FtAdapterFactory.java
index 17daaad3..ba7545f4 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/util/FtAdapterFactory.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/util/FtAdapterFactory.java
@@ -72,8 +72,8 @@ public class FtAdapterFactory extends AdapterFactoryImpl {
return createFaultTreeAdapter();
}
@Override
- public Adapter caseEvent(Event object) {
- return createEventAdapter();
+ public Adapter caseRandomEvent(RandomEvent object) {
+ return createRandomEventAdapter();
}
@Override
public Adapter caseBasicEvent(BasicEvent object) {
@@ -108,6 +108,22 @@ public class FtAdapterFactory extends AdapterFactoryImpl {
return createKOfMGateAdapter();
}
@Override
+ public Adapter caseReliabilityModel(ReliabilityModel object) {
+ return createReliabilityModelAdapter();
+ }
+ @Override
+ public Adapter caseConstantModel(ConstantModel object) {
+ return createConstantModelAdapter();
+ }
+ @Override
+ public Adapter caseEvent(Event object) {
+ return createEventAdapter();
+ }
+ @Override
+ public Adapter caseConstantEvent(ConstantEvent object) {
+ return createConstantEventAdapter();
+ }
+ @Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
@@ -142,16 +158,16 @@ public class FtAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event Event }'.
+ * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent Random Event }'.
*
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
*
* @return the new adapter.
- * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent
* @generated
*/
- public Adapter createEventAdapter() {
+ public Adapter createRandomEventAdapter() {
return null;
}
@@ -267,6 +283,62 @@ public class FtAdapterFactory extends AdapterFactoryImpl {
return null;
}
+ /**
+ * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ReliabilityModel Reliability Model }'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ReliabilityModel
+ * @generated
+ */
+ public Adapter createReliabilityModelAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel Constant Model }'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel
+ * @generated
+ */
+ public Adapter createConstantModelAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event Event }'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event
+ * @generated
+ */
+ public Adapter createEventAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent Constant Event }'.
+ *
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ *
+ * @return the new adapter.
+ * @see hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent
+ * @generated
+ */
+ public Adapter createConstantEventAdapter() {
+ return null;
+ }
+
/**
* Creates a new adapter for the default case.
*
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/util/FtSwitch.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/util/FtSwitch.java
index b1846705..1da4f8e8 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/util/FtSwitch.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/ecore-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/ft/util/FtSwitch.java
@@ -69,18 +69,21 @@ public class FtSwitch extends Switch {
case FtPackage.FAULT_TREE: {
FaultTree faultTree = (FaultTree)theEObject;
T result = caseFaultTree(faultTree);
+ if (result == null) result = caseReliabilityModel(faultTree);
if (result == null) result = defaultCase(theEObject);
return result;
}
- case FtPackage.EVENT: {
- Event event = (Event)theEObject;
- T result = caseEvent(event);
+ case FtPackage.RANDOM_EVENT: {
+ RandomEvent randomEvent = (RandomEvent)theEObject;
+ T result = caseRandomEvent(randomEvent);
+ if (result == null) result = caseEvent(randomEvent);
if (result == null) result = defaultCase(theEObject);
return result;
}
case FtPackage.BASIC_EVENT: {
BasicEvent basicEvent = (BasicEvent)theEObject;
T result = caseBasicEvent(basicEvent);
+ if (result == null) result = caseRandomEvent(basicEvent);
if (result == null) result = caseEvent(basicEvent);
if (result == null) result = defaultCase(theEObject);
return result;
@@ -88,6 +91,7 @@ public class FtSwitch extends Switch {
case FtPackage.GATE: {
Gate gate = (Gate)theEObject;
T result = caseGate(gate);
+ if (result == null) result = caseRandomEvent(gate);
if (result == null) result = caseEvent(gate);
if (result == null) result = defaultCase(theEObject);
return result;
@@ -116,6 +120,7 @@ public class FtSwitch extends Switch {
AndGate andGate = (AndGate)theEObject;
T result = caseAndGate(andGate);
if (result == null) result = caseGate(andGate);
+ if (result == null) result = caseRandomEvent(andGate);
if (result == null) result = caseEvent(andGate);
if (result == null) result = defaultCase(theEObject);
return result;
@@ -124,6 +129,7 @@ public class FtSwitch extends Switch {
OrGate orGate = (OrGate)theEObject;
T result = caseOrGate(orGate);
if (result == null) result = caseGate(orGate);
+ if (result == null) result = caseRandomEvent(orGate);
if (result == null) result = caseEvent(orGate);
if (result == null) result = defaultCase(theEObject);
return result;
@@ -132,10 +138,37 @@ public class FtSwitch extends Switch {
KOfMGate kOfMGate = (KOfMGate)theEObject;
T result = caseKOfMGate(kOfMGate);
if (result == null) result = caseGate(kOfMGate);
+ if (result == null) result = caseRandomEvent(kOfMGate);
if (result == null) result = caseEvent(kOfMGate);
if (result == null) result = defaultCase(theEObject);
return result;
}
+ case FtPackage.RELIABILITY_MODEL: {
+ ReliabilityModel reliabilityModel = (ReliabilityModel)theEObject;
+ T result = caseReliabilityModel(reliabilityModel);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FtPackage.CONSTANT_MODEL: {
+ ConstantModel constantModel = (ConstantModel)theEObject;
+ T result = caseConstantModel(constantModel);
+ if (result == null) result = caseReliabilityModel(constantModel);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FtPackage.EVENT: {
+ Event event = (Event)theEObject;
+ T result = caseEvent(event);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case FtPackage.CONSTANT_EVENT: {
+ ConstantEvent constantEvent = (ConstantEvent)theEObject;
+ T result = caseConstantEvent(constantEvent);
+ if (result == null) result = caseEvent(constantEvent);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
default: return defaultCase(theEObject);
}
}
@@ -156,17 +189,17 @@ public class FtSwitch extends Switch {
}
/**
- * Returns the result of interpreting the object as an instance of 'Event '.
+ * Returns the result of interpreting the object as an instance of 'Random Event '.
*
* This implementation returns null;
* returning a non-null result will terminate the switch.
*
* @param object the target of the switch.
- * @return the result of interpreting the object as an instance of 'Event '.
+ * @return the result of interpreting the object as an instance of 'Random Event '.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseEvent(Event object) {
+ public T caseRandomEvent(RandomEvent object) {
return null;
}
@@ -290,6 +323,66 @@ public class FtSwitch extends Switch {
return null;
}
+ /**
+ * Returns the result of interpreting the object as an instance of 'Reliability Model '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Reliability Model '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseReliabilityModel(ReliabilityModel object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Constant Model '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Constant Model '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConstantModel(ConstantModel object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Event '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Event '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEvent(Event object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of 'Constant Event '.
+ *
+ * This implementation returns null;
+ * returning a non-null result will terminate the switch.
+ *
+ * @param object the target of the switch.
+ * @return the result of interpreting the object as an instance of 'Constant Event '.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseConstantEvent(ConstantEvent object) {
+ return null;
+ }
+
/**
* Returns the result of interpreting the object as an instance of 'EObject '.
*
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/ft.ecore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/ft.ecore
index f1f410a7..afe9395e 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/ft.ecore
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/ft.ecore
@@ -2,22 +2,22 @@
-
+
+ eType="#//RandomEvent" containment="true"/>
+ eType="#//RandomEvent"/>
-
+
-
+
-
-
+
+
@@ -30,6 +30,13 @@
-
+
+
+
+
+
+
+
+
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/ft.genmodel b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/ft.genmodel
index b5f63c34..7dcd0ae7 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/ft.genmodel
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/model/ft.genmodel
@@ -11,8 +11,8 @@
-
-
+
+
@@ -31,7 +31,14 @@
-
+
+
+
+
+
+
+
+
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 0c5c0fe8..16bc44f2 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/representations.aird
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/representations.aird
@@ -1074,7 +1074,7 @@
-
+
@@ -1087,7 +1087,7 @@
-
+
@@ -1096,7 +1096,7 @@
-
+
@@ -1105,7 +1105,7 @@
-
+
@@ -1114,7 +1114,7 @@
-
+
@@ -1127,7 +1127,7 @@
-
+
@@ -1140,7 +1140,7 @@
-
+
@@ -1149,7 +1149,7 @@
-
+
@@ -1158,7 +1158,7 @@
-
+
@@ -1167,46 +1167,86 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
@@ -1354,9 +1394,73 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
KEEP_LOCATION
@@ -1367,9 +1471,9 @@
-
-
-
+
+
+
KEEP_LOCATION
KEEP_SIZE
KEEP_RATIO
@@ -1379,8 +1483,8 @@
-
-
+
+
@@ -1583,14 +1687,6 @@
-
-
-
-
-
-
-
-
@@ -1628,20 +1724,127 @@
-
+
-
-
-
- labelSize
+
+
+ bold
-
- labelSize
-
+
+
+
+
+ KEEP_LOCATION
+ KEEP_SIZE
+ KEEP_RATIO
+
+ italic
+
+
+
+
+
+
+
+ KEEP_LOCATION
+ KEEP_SIZE
+ KEEP_RATIO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ italic
+
+
+
+
+
+
+
+
+ KEEP_LOCATION
+ KEEP_SIZE
+ KEEP_RATIO
+
+ italic
+
+
+
+
+
+
+
+
+
+
+ italic
+
+
+
+
+
+
+
+
+ KEEP_LOCATION
+ KEEP_SIZE
+ KEEP_RATIO
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ italic
+
+
+
+
+
+
+
+
+
+
+
+ italic
+
+
+
+
+
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 91eeedc5..ce704acf 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
@@ -13,4 +13,11 @@ Require-Bundle: com.google.guava,
org.eclipse.viatra.query.runtime,
org.eclipse.viatra.query.runtime.rete,
org.eclipse.viatra.query.runtime.localsearch,
- hu.bme.mit.inf.dslreasoner.faulttree.components
+ hu.bme.mit.inf.dslreasoner.faulttree.components,
+ hu.bme.mit.inf.dslreasoner.logic.model,
+ com.github.jnr.constants;bundle-version="0.9.8",
+ org.apache.commons.lang;bundle-version="2.6.0"
+Export-Package: hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft,
+ hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft,
+ hu.bme.mit.inf.dslreasoner.faulttree.transformation.ft2galileo,
+ hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/build.properties b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/build.properties
index 34d2e4d2..d8e2f0e9 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/build.properties
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/build.properties
@@ -1,4 +1,5 @@
-source.. = src/
+source.. = src/,\
+ xtend-gen/
output.. = bin/
bin.includes = META-INF/,\
.
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.xtend
index caaffc3c..a522654c 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.xtend
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.xtend
@@ -1,10 +1,24 @@
package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtFactory
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent
class Cft2FtTransformation {
def createFaultTree(ComponentFaultTree componentFaultTree) {
- // TODO
- throw new UnsupportedOperationException()
+ val materializer = new EventMaterializer
+ val topEvent = materializer.getOrMaterialize(componentFaultTree.topEvent)
+ switch (topEvent) {
+ ConstantEvent:
+ FtFactory.eINSTANCE.createConstantModel => [
+ failed = topEvent.failed
+ ]
+ RandomEvent: {
+ val builder = new FaultTreeBuilder
+ builder.addTopLevel(topEvent)
+ builder.faultTree
+ }
+ }
}
-}
\ No newline at end of file
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventCollection.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventCollection.xtend
new file mode 100644
index 00000000..102dc57e
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventCollection.xtend
@@ -0,0 +1,90 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft
+
+import com.google.common.collect.ImmutableSet
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent
+import java.util.Set
+import org.eclipse.xtend.lib.annotations.Data
+
+@Data
+class EventCollection {
+ val int falseEventCount
+ val int trueEventCount
+ val Set randomEvents
+
+ def containsFalseEvent() {
+ falseEventCount >= 1
+ }
+
+ def containsTrueEvent() {
+ trueEventCount >= 1
+ }
+
+ def getVariableEventCount() {
+ randomEvents.size
+ }
+
+ def containsRandomEvent() {
+ variableEventCount >= 1
+ }
+
+ def getCount() {
+ falseEventCount + trueEventCount + variableEventCount
+ }
+
+ def isEmpty() {
+ !containsFalseEvent && !containsTrueEvent && !containsRandomEvent
+ }
+
+ def containsExactlyOneRandomEvent() {
+ !containsFalseEvent && !containsTrueEvent && variableEventCount == 1
+ }
+
+ def toSingleRandomEvent() {
+ if (!containsExactlyOneRandomEvent) {
+ throw new IllegalStateException("Input collection is not a single random event")
+ }
+ randomEvents.head
+ }
+
+ static def builder() {
+ new Builder()
+ }
+
+ static class Builder {
+ var falseEventCount = 0
+ var trueEventCount = 0
+ val randomEventsBuilder = ImmutableSet.builder
+
+ private new() {
+ }
+
+ def add(Event event) {
+ switch (event) {
+ ConstantEvent:
+ if (event.failed) {
+ trueEventCount++
+ } else {
+ falseEventCount++
+ }
+ RandomEvent:
+ randomEventsBuilder.add(event)
+ default:
+ throw new IllegalArgumentException("Unknown event: " + event)
+ }
+ this
+ }
+
+ def addAll(EventCollection materializedEvens) {
+ falseEventCount += materializedEvens.falseEventCount
+ trueEventCount += materializedEvens.trueEventCount
+ randomEventsBuilder.addAll(materializedEvens.randomEvents)
+ this
+ }
+
+ def build() {
+ new EventCollection(falseEventCount, trueEventCount, randomEventsBuilder.build)
+ }
+ }
+}
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
new file mode 100644
index 00000000..85396e4d
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.xtend
@@ -0,0 +1,192 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft
+
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.AndGateDefinition
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.BasicEventDefinition
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.GateDefinition
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.OrGateDefinition
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtFactory
+import java.util.LinkedHashSet
+import java.util.Map
+import org.eclipse.emf.ecore.util.EcoreUtil
+import org.eclipse.xtend.lib.annotations.Data
+
+class EventMaterializer {
+ extension val FtFactory = FtFactory.eINSTANCE
+
+ val Map, Event> materializationCache = newHashMap
+ val Map, EventCollection> multipleInputCache = newHashMap
+ val ConstantEvent falseEvent
+ val ConstantEvent trueEvent
+ val path = new LinkedHashSet>
+
+ new() {
+ falseEvent = createConstantEvent => [
+ failed = false
+ ]
+ trueEvent = createConstantEvent => [
+ failed = true
+ ]
+ }
+
+ def getOrMaterialize(Output output) {
+ getOrMaterialize(output.component, output.eventDeclaration)
+ }
+
+ def Event getOrMaterialize(Component component, EventDeclaration eventDeclaration) {
+ val eventKey = new EventKey(component, eventDeclaration)
+ pushEventKey(eventKey)
+ try {
+ materializationCache.computeIfAbsent(eventKey)[materialize(it.component, it.event)]
+ } finally {
+ popEventKey(eventKey)
+ }
+ }
+
+ protected def materialize(Component component, EventDeclaration eventDeclaration) {
+ val eventName = component.name + "_" + eventDeclaration.name
+ val event = switch (eventDeclaration) {
+ InputEvent:
+ return materializeConnectedEvent(component, eventDeclaration)
+ BasicEventDefinition: {
+ val basicEvent = createBasicEvent
+ basicEvent.distribution = EcoreUtil.copy(eventDeclaration.distribution)
+ basicEvent
+ }
+ GateDefinition: {
+ val inputs = collectInputs(component, eventDeclaration)
+ val gate = switch (eventDeclaration) {
+ AndGateDefinition:
+ if (inputs.containsFalseEvent) {
+ return falseEvent
+ } else if (inputs.empty) {
+ return trueEvent
+ } else if (inputs.containsExactlyOneRandomEvent) {
+ return inputs.toSingleRandomEvent
+ } else {
+ createAndGate
+ }
+ OrGateDefinition:
+ if (inputs.containsTrueEvent) {
+ return trueEvent
+ } else if (inputs.empty) {
+ return falseEvent
+ } else if (inputs.containsExactlyOneRandomEvent) {
+ return inputs.toSingleRandomEvent
+ } else {
+ createOrGate
+ }
+ KOfMGateDefinition: {
+ val requiredTrueInputs = inputs.count * eventDeclaration.k / eventDeclaration.m
+ val k = requiredTrueInputs - inputs.getTrueEventCount
+ val m = inputs.variableEventCount
+ if (k == 0) {
+ return trueEvent
+ } else if (k > m) {
+ return falseEvent
+ } else if (inputs.containsExactlyOneRandomEvent) {
+ return inputs.toSingleRandomEvent
+ } else if (k == 1) {
+ createOrGate
+ } else if (k == m) {
+ createAndGate
+ } else {
+ val kOfMGate = createKOfMGate
+ kOfMGate.k = k
+ kOfMGate
+ }
+ }
+ default:
+ throw new IllegalArgumentException("Unknown gate definition: " + eventDeclaration)
+ }
+ gate.inputEvents.addAll(inputs.getRandomEvents)
+ gate
+ }
+ default:
+ throw new IllegalArgumentException("Unknown event declaration: " + eventDeclaration)
+ }
+ event.name = eventName
+ event
+ }
+
+ protected def materializeConnectedEvent(Component component, InputEvent inputEvent) {
+ if (inputEvent.multiple) {
+ throw new IllegalArgumentException('''Cannot materialize multiple nput «component.name»_«inputEvent.name»''')
+ }
+ val input = findInput(component, inputEvent)
+ val incomingConnections = input.incomingConnections
+ if (incomingConnections.size != 1) {
+ throw new IllegalArgumentException('''Input «component.name»_«inputEvent.name» has «incomingConnections.size» connections instead of 1''')
+ }
+ val output = incomingConnections.head.output
+ getOrMaterialize(output.component, output.eventDeclaration)
+ }
+
+ protected def collectInputs(Component component, GateDefinition gateDefinition) {
+ val builder = EventCollection.builder
+ for (inputEventDeclaration : gateDefinition.inputEvents) {
+ switch (inputEventDeclaration) {
+ InputEvent case inputEventDeclaration.multiple: {
+ val materializedEvents = getOrMaterializeConnectedEvents(component, inputEventDeclaration)
+ builder.addAll(materializedEvents)
+ }
+ default:
+ builder.add(getOrMaterialize(component, inputEventDeclaration))
+ }
+ }
+ builder.build
+ }
+
+ protected def getOrMaterializeConnectedEvents(Component component, InputEvent inputEvent) {
+ val inputKey = new EventKey(component, inputEvent)
+ pushEventKey(inputKey)
+ try {
+ multipleInputCache.computeIfAbsent(inputKey)[materializeConnectedEvents(it.component, it.event)]
+ } finally {
+ popEventKey(inputKey)
+ }
+ }
+
+ protected def materializeConnectedEvents(Component component, InputEvent inputEvent) {
+ val input = findInput(component, inputEvent)
+ val builder = EventCollection.builder
+ for (connection : input.incomingConnections) {
+ val materializedEvent = getOrMaterialize(connection.output)
+ builder.add(materializedEvent)
+ }
+ builder.build
+ }
+
+ protected def findInput(Component component, InputEvent inputEvent) {
+ val input = component.inputs.findFirst[it.inputEvent == inputEvent]
+ if (input === null) {
+ throw new IllegalArgumentException('''No input «inputEvent» in component «component»''')
+ }
+ return input
+ }
+
+ private def pushEventKey(EventKey extends EventDeclaration> eventKey) {
+ if (!path.add(eventKey)) {
+ throw new IllegalStateException(
+ '''Circular dependency [«FOR ancestor : path»«ancestor», «ENDFOR»«eventKey»] detected''')
+ }
+ }
+
+ private def popEventKey(EventKey extends EventDeclaration> eventKey) {
+ path.remove(eventKey)
+ }
+
+ @Data
+ protected static class EventKey {
+ val Component component
+ val T event
+
+ override toString() '''«component.name»_«event.name»'''
+ }
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.xtend
new file mode 100644
index 00000000..0b0afea6
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.xtend
@@ -0,0 +1,39 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft
+
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtFactory
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Gate
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent
+import java.util.Collection
+import org.eclipse.xtend.lib.annotations.Accessors
+
+class FaultTreeBuilder {
+ @Accessors
+ val faultTree = FtFactory.eINSTANCE.createFaultTree
+
+ def addTopLevel(RandomEvent event) {
+ if (faultTree.topEvent !== null) {
+ throw new IllegalStateException("Top event was already set")
+ }
+ add(event)
+ faultTree.topEvent = event
+ }
+
+ protected def void add(RandomEvent event) {
+ if (faultTree.eContainer == faultTree) {
+ return
+ }
+ if (faultTree.eContainer !== null) {
+ throw new IllegalStateException("Event is already in a different fault tree")
+ }
+ faultTree.events += event
+ if (event instanceof Gate) {
+ addAll(event.inputEvents)
+ }
+ }
+
+ protected def addAll(Collection events) {
+ for (event : events) {
+ add(event)
+ }
+ }
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.xtend
index 36aac5e1..062de3df 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.xtend
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.xtend
@@ -23,5 +23,6 @@ class Ecore2CftTransformation {
for (handler : mappingHandlers) {
handler.instantiateConnections(trace)
}
+ trace.componentFaultTree
}
}
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
new file mode 100644
index 00000000..732d9fed
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.xtend
@@ -0,0 +1,56 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ft2galileo
+
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.AndGate
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.BasicEvent
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantDistribution
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Distribution
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ExponentialDistribution
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FaultTree
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Gate
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.OrGate
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent
+import org.eclipse.xtend2.lib.StringConcatenationClient
+
+class Ft2GalileoTransformation {
+ def toGalileo(FaultTree faultTree) '''
+ toplevel «faultTree.topEvent.name»;
+ «FOR event : faultTree.events»
+ «event.name» «defineEvent(event)»;
+ «ENDFOR»
+ '''
+
+ protected dispatch def defineEvent(BasicEvent basicEvent) {
+ defineDistribution(basicEvent.distribution)
+ }
+
+ protected dispatch def StringConcatenationClient defineDistribution(ConstantDistribution distribution) {
+ '''p=«distribution.p»'''
+ }
+
+ protected dispatch def StringConcatenationClient defineDistribution(ExponentialDistribution distribution) {
+ '''lambda=«distribution.lambda»'''
+ }
+
+ protected dispatch def StringConcatenationClient defineDistribution(Distribution distribution) {
+ throw new IllegalArgumentException("Unknown distribution: " + distribution)
+ }
+
+ protected dispatch def StringConcatenationClient defineEvent(Gate gate) {
+ '''«defineGate(gate)» «FOR input : gate.inputEvents SEPARATOR " "»«input.name»«ENDFOR»'''
+ }
+
+ protected dispatch def StringConcatenationClient defineGate(AndGate gate) '''and'''
+
+ protected dispatch def StringConcatenationClient defineGate(OrGate gate) '''or'''
+
+ protected dispatch def StringConcatenationClient defineGate(KOfMGate gate) '''«gate.k»of«gate.inputEvents.size»'''
+
+ protected dispatch def StringConcatenationClient defineGate(Gate gate) {
+ throw new IllegalArgumentException("Unknown gate: " + gate)
+ }
+
+ protected dispatch def StringConcatenationClient defineEvent(RandomEvent randomEvent) {
+ throw new IllegalArgumentException("Unknown random even: " + randomEvent)
+ }
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ReliabilityResult.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ReliabilityResult.xtend
new file mode 100644
index 00000000..19c3d17d
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ReliabilityResult.xtend
@@ -0,0 +1,51 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver
+
+import org.eclipse.xtend.lib.annotations.Data
+import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
+
+abstract class ReliabilityResult {
+ public static val TIMEOUT = new Unknown("Solver timed out")
+ public static val MEMOUT = new Unknown("Solver out of memory")
+
+ abstract def Solution getOrThrow()
+
+ @Data
+ static final class Solution extends ReliabilityResult {
+ val double lowerBound
+ val double upperBound
+
+ new(double value) {
+ this(value, value)
+ }
+
+ new(double lowerBound, double upperBound) {
+ if (lowerBound > upperBound) {
+ throw new IllegalArgumentException("lowerBound must not be larger than upperBound")
+ }
+ this.lowerBound = lowerBound
+ this.upperBound = upperBound
+ }
+
+ override getOrThrow() {
+ this
+ }
+ }
+
+ @Data
+ static final class Unknown extends ReliabilityResult {
+ val String message
+ val Throwable cause
+
+ @FinalFieldsConstructor
+ new() {
+ }
+
+ new(String message) {
+ this(message, null)
+ }
+
+ override getOrThrow() {
+ throw new RuntimeException(message, cause)
+ }
+ }
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftConfiguration.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftConfiguration.xtend
new file mode 100644
index 00000000..d9059bfc
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftConfiguration.xtend
@@ -0,0 +1,45 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver
+
+import hu.bme.mit.inf.dslreasoner.logic.model.builder.SolverConfiguration
+
+final class StormDftConfiguration extends SolverConfiguration {
+ public static val DEFAULT_SOLVER_PATH = "storm-dft"
+
+ public double precision = 1e-6
+
+ public boolean bisimulation = true
+
+ public boolean symmetryReduction = true
+
+ public boolean modularization = true
+
+ public boolean dontCarePropagation = true
+
+ public double approximation = 0
+
+ public var approximationHeuristic = ApproximationHeuristic.NONE
+
+ public FtAnalysisObjective objective
+
+ def isApproximationInUse() {
+ approximationHeuristic != ApproximationHeuristic.NONE
+ }
+}
+
+abstract class FtAnalysisObjective {
+ public static val MTTF = new FtAnalysisObjective {
+ }
+
+ private new() {
+ }
+
+ static final class TimeBound extends FtAnalysisObjective {
+ public double timeBound = 0
+ }
+}
+
+enum ApproximationHeuristic {
+ NONE,
+ DEPTH
+// See https://github.com/moves-rwth/storm/issues/35 for additional approximation heuristics.
+}
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
new file mode 100644
index 00000000..91c6a0d0
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.xtend
@@ -0,0 +1,186 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver
+
+import com.google.common.collect.ImmutableList
+import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel
+import hu.bme.mit.inf.dslreasoner.logic.model.builder.SolverConfiguration
+import java.io.BufferedReader
+import java.io.IOException
+import java.io.InputStream
+import java.io.InputStreamReader
+import java.util.regex.Pattern
+import jnr.constants.platform.Signal
+import org.apache.commons.lang.SystemUtils
+
+class StormDftException extends RuntimeException {
+ new(String s) {
+ super(s)
+ }
+
+ new(String s, Exception e) {
+ super(s, e)
+ }
+}
+
+class StormDftHandler {
+ static val DOUBLE_REGEX = "[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?"
+ static val SINGLE_RESULT_GROUP = "single"
+ static val LOWER_BOUND_GROUP = "lower"
+ static val UPPER_BOUND_GROUP = "upper"
+ static val RESULT_REGEX = '''^Result:\s*\[(?:(?<«SINGLE_RESULT_GROUP»>«DOUBLE_REGEX»)|\((?<«LOWER_BOUND_GROUP»>«DOUBLE_REGEX»),\s*(?<«UPPER_BOUND_GROUP»>«DOUBLE_REGEX»)\))\]'''
+ static val RESULT_PATTERN = Pattern.compile(RESULT_REGEX)
+
+ // See http://hg.openjdk.java.net/jdk7/jdk7/jdk/file/jdk7-b147/src/solaris/native/java/lang/UNIXProcess_md.c#l332
+ static val SIGNAL_EXIT_VALUE_OFFSET = if(SystemUtils.IS_OS_SOLARIS) 0 else 0x80
+
+ static val STORM_GENERAL_ERROR = (-1).bitwiseAnd(0xff)
+ static val STORM_TIMEOUT = (-2).bitwiseAnd(0xff)
+ static val STORM_MEMOUT = (-3).bitwiseAnd(0xff)
+
+ def callSolver(String dftFilePath, StormDftConfiguration configuration) {
+ val commandLine = configuration.toCommandLine(dftFilePath)
+ val documentationLevel = configuration.documentationLevel
+ val printOutput = documentationLevel == DocumentationLevel.NORMAL ||
+ documentationLevel == DocumentationLevel.FULL
+ val processBuilder = new ProcessBuilder().command(commandLine)
+ var Process process = null
+ try {
+ try {
+ process = processBuilder.start
+ process.outputStream.close
+ val result = readOutput(process.inputStream, printOutput)
+ val error = readError(process.errorStream, printOutput)
+ val exitValue = process.waitFor
+ if (result === null) {
+ interpretExitStatus(exitValue, error)
+ } else {
+ result
+ }
+ } catch (IOException e) {
+ throw new StormDftException("Error during input/output handling of the stochastic solver.", e)
+ }
+ } catch (Exception e) {
+ if (process !== null) {
+ process.destroyForcibly.waitFor
+ }
+ throw e
+ }
+ }
+
+ private def toCommandLine(extension StormDftConfiguration configuration, String dftFilePath) {
+ extension val optionsBuilder = ImmutableList.builder
+ add(solverPath ?: StormDftConfiguration.DEFAULT_SOLVER_PATH)
+ if (runtimeLimit != SolverConfiguration.Unlimited) {
+ add("--timeout", runtimeLimit.toString)
+ }
+ add("--precision", precision.toString)
+ if (bisimulation) {
+ add("--bisimulation")
+ }
+ if (symmetryReduction) {
+ add("--symmetryreduction")
+ }
+ if (modularization) {
+ add("--modularisation")
+ }
+ if (!dontCarePropagation) {
+ add("--disabledc")
+ }
+ if (approximationInUse) {
+ val heuristicName = switch (approximationHeuristic) {
+ case DEPTH:
+ "depth"
+ default:
+ throw new IllegalArgumentException("Unknown approximation heuristic: " + approximationHeuristic)
+ }
+ add("--approximation", approximation.toString, "--approximationheuristic", heuristicName)
+ }
+ add("--dftfile", dftFilePath)
+ switch (objective) {
+ case FtAnalysisObjective.MTTF:
+ add("--expectedtime")
+ FtAnalysisObjective.TimeBound:
+ add("--timebound")
+ default:
+ throw new IllegalArgumentException("Unknown analysis objective: " + objective)
+ }
+ if (documentationLevel == DocumentationLevel.FULL) {
+ add("--verbose")
+ }
+ build
+ }
+
+ private def readOutput(InputStream inputStream, boolean printOutput) {
+ val bufferedReader = new BufferedReader(new InputStreamReader(inputStream))
+ try {
+ var String line
+ while ((line = bufferedReader.readLine) !== null) {
+ if (printOutput) {
+ println(line)
+ }
+ val matcher = RESULT_PATTERN.matcher(line)
+ if (matcher.find) {
+ try {
+ val single = matcher.group(SINGLE_RESULT_GROUP)
+ if (single !== null) {
+ val singleValue = Double.parseDouble(single)
+ return new ReliabilityResult.Solution(singleValue)
+ }
+ val lower = matcher.group(LOWER_BOUND_GROUP)
+ val upper = matcher.group(UPPER_BOUND_GROUP)
+ if (lower !== null && upper !== null) {
+ val lowerValue = Double.parseDouble(lower)
+ val upperValue = Double.parseDouble(upper)
+ return new ReliabilityResult.Solution(lowerValue, upperValue)
+ }
+ throw new StormDftException("Inconsistent stochastic solver output: " + line)
+ } catch (NumberFormatException e) {
+ throw new StormDftException("Malformatted number from stochastic solver.", e)
+ }
+ }
+ }
+ } finally {
+ bufferedReader.close
+ }
+ null
+ }
+
+ private def readError(InputStream inputStream, boolean printOutput) {
+ val bufferedReader = new BufferedReader(new InputStreamReader(inputStream))
+ try {
+ val lines = newArrayList
+ var String line
+ while ((line = bufferedReader.readLine) !== null) {
+ if (printOutput) {
+ System.err.println(line)
+ }
+ lines += line
+ }
+ lines.join("\n")
+ } finally {
+ bufferedReader.close
+ }
+ }
+
+ private def interpretExitStatus(int exitValue, String error) {
+ switch (exitValue) {
+ case STORM_GENERAL_ERROR:
+ throw new StormDftException("Storm error: " + error)
+ case STORM_TIMEOUT,
+ case SIGNAL_EXIT_VALUE_OFFSET + Signal.SIGXCPU.intValue:
+ ReliabilityResult.TIMEOUT
+ case STORM_MEMOUT,
+ case SIGNAL_EXIT_VALUE_OFFSET + Signal.SIGXFSZ.intValue:
+ ReliabilityResult.MEMOUT
+ default: {
+ if (exitValue > SIGNAL_EXIT_VALUE_OFFSET) {
+ val signalNumber = exitValue - SIGNAL_EXIT_VALUE_OFFSET
+ val signal = Signal.values.findFirst[intValue == signalNumber]
+ if (signal !== null) {
+ throw new StormDftException("Storm unexpectedly killed by signal " + signal + ": " + error)
+ }
+ }
+ throw new StormDftException("Storm unexpectedly exit with status " + exitValue + ": " + error)
+ }
+ }
+ }
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftSolver.xtend b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftSolver.xtend
new file mode 100644
index 00000000..931b9f39
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftSolver.xtend
@@ -0,0 +1,43 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver
+
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FaultTree
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ReliabilityModel
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ft2galileo.Ft2GalileoTransformation
+import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace
+
+class StormDftSolver {
+ static val DFT_FILE_NAME = "ft.dft"
+
+ val ft2Galileo = new Ft2GalileoTransformation
+ val handler = new StormDftHandler
+
+ def solve(ReliabilityModel reliabilityModel, StormDftConfiguration configuration,
+ ReasonerWorkspace reasonerWorkspace) {
+ switch (reliabilityModel) {
+ FaultTree:
+ solve(reliabilityModel, configuration, reasonerWorkspace)
+ ConstantModel: {
+ val result = if (reliabilityModel.failed) {
+ 0
+ } else {
+ switch (objective : configuration.objective) {
+ case FtAnalysisObjective.MTTF: Double.POSITIVE_INFINITY
+ FtAnalysisObjective.TimeBound: 1
+ default: throw new IllegalArgumentException("Unknown objective: " + objective)
+ }
+ }
+ new ReliabilityResult.Solution(result)
+ }
+ default:
+ throw new IllegalArgumentException("Unknown reliability model: " + reliabilityModel)
+ }
+ }
+
+ def solve(FaultTree faultTree, StormDftConfiguration configuration, ReasonerWorkspace reasonerWorkspace) {
+ val galileo = ft2Galileo.toGalileo(faultTree)
+ reasonerWorkspace.writeText(DFT_FILE_NAME, galileo)
+ val dftFilePath = reasonerWorkspace.getFile(DFT_FILE_NAME).absolutePath
+ handler.callSolver(dftFilePath, configuration)
+ }
+}
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 3e751774..20f1f4a7 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.Cft2FtTransformation.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.Cft2FtTransformation.xtendbin 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
new file mode 100644
index 00000000..54ba3d09
Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventCollection.xtendbin 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
new file mode 100644
index 00000000..271c9cc0
Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventMaterializer.xtendbin 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
new file mode 100644
index 00000000..db3a7e73
Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.FaultTreeBuilder.xtendbin 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 70156b02..75154a4c 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
@@ -1 +1,8 @@
/.Cft2FtTransformation.java._trace
+/.EventMaterializer.java._trace
+/.MaterializedEvent.java._trace
+/.CollectedInputs.java._trace
+/.MaterializedEventCollection.java._trace
+/.FaultTreeBuilder.java._trace
+/.FaultModelBuilder.java._trace
+/.EventCollection.java._trace
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.java
index ae750806..e87b8865 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.java
@@ -1,10 +1,49 @@
package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft;
import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FaultTree;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtFactory;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ReliabilityModel;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft.EventMaterializer;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft.FaultTreeBuilder;
+import org.eclipse.xtext.xbase.lib.ObjectExtensions;
+import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
@SuppressWarnings("all")
public class Cft2FtTransformation {
- public void createFaultTree(final ComponentFaultTree componentFaultTree) {
- throw new UnsupportedOperationException();
+ public ReliabilityModel createFaultTree(final ComponentFaultTree componentFaultTree) {
+ ReliabilityModel _xblockexpression = null;
+ {
+ final EventMaterializer materializer = new EventMaterializer();
+ final Event topEvent = materializer.getOrMaterialize(componentFaultTree.getTopEvent());
+ ReliabilityModel _switchResult = null;
+ boolean _matched = false;
+ if (topEvent instanceof ConstantEvent) {
+ _matched=true;
+ ConstantModel _createConstantModel = FtFactory.eINSTANCE.createConstantModel();
+ final Procedure1 _function = (ConstantModel it) -> {
+ it.setFailed(((ConstantEvent)topEvent).isFailed());
+ };
+ _switchResult = ObjectExtensions.operator_doubleArrow(_createConstantModel, _function);
+ }
+ if (!_matched) {
+ if (topEvent instanceof RandomEvent) {
+ _matched=true;
+ FaultTree _xblockexpression_1 = null;
+ {
+ final FaultTreeBuilder builder = new FaultTreeBuilder();
+ builder.addTopLevel(((RandomEvent)topEvent));
+ _xblockexpression_1 = builder.getFaultTree();
+ }
+ _switchResult = _xblockexpression_1;
+ }
+ }
+ _xblockexpression = _switchResult;
+ }
+ return _xblockexpression;
}
}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventCollection.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventCollection.java
new file mode 100644
index 00000000..dceef9f8
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventCollection.java
@@ -0,0 +1,188 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft;
+
+import com.google.common.collect.ImmutableSet;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent;
+import java.util.Set;
+import org.eclipse.xtend.lib.annotations.Data;
+import org.eclipse.xtext.xbase.lib.IterableExtensions;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@Data
+@SuppressWarnings("all")
+public class EventCollection {
+ public static class Builder {
+ private int falseEventCount = 0;
+
+ private int trueEventCount = 0;
+
+ private final ImmutableSet.Builder randomEventsBuilder = ImmutableSet.builder();
+
+ private Builder() {
+ }
+
+ public EventCollection.Builder add(final Event event) {
+ EventCollection.Builder _xblockexpression = null;
+ {
+ boolean _matched = false;
+ if (event instanceof ConstantEvent) {
+ _matched=true;
+ boolean _isFailed = ((ConstantEvent)event).isFailed();
+ if (_isFailed) {
+ this.trueEventCount++;
+ } else {
+ this.falseEventCount++;
+ }
+ }
+ if (!_matched) {
+ if (event instanceof RandomEvent) {
+ _matched=true;
+ this.randomEventsBuilder.add(((RandomEvent)event));
+ }
+ }
+ if (!_matched) {
+ throw new IllegalArgumentException(("Unknown event: " + event));
+ }
+ _xblockexpression = this;
+ }
+ return _xblockexpression;
+ }
+
+ public EventCollection.Builder addAll(final EventCollection materializedEvens) {
+ EventCollection.Builder _xblockexpression = null;
+ {
+ int _falseEventCount = this.falseEventCount;
+ this.falseEventCount = (_falseEventCount + materializedEvens.falseEventCount);
+ int _trueEventCount = this.trueEventCount;
+ this.trueEventCount = (_trueEventCount + materializedEvens.trueEventCount);
+ this.randomEventsBuilder.addAll(materializedEvens.randomEvents);
+ _xblockexpression = this;
+ }
+ return _xblockexpression;
+ }
+
+ public EventCollection build() {
+ ImmutableSet _build = this.randomEventsBuilder.build();
+ return new EventCollection(this.falseEventCount, this.trueEventCount, _build);
+ }
+ }
+
+ private final int falseEventCount;
+
+ private final int trueEventCount;
+
+ private final Set randomEvents;
+
+ public boolean containsFalseEvent() {
+ return (this.falseEventCount >= 1);
+ }
+
+ public boolean containsTrueEvent() {
+ return (this.trueEventCount >= 1);
+ }
+
+ public int getVariableEventCount() {
+ return this.randomEvents.size();
+ }
+
+ public boolean containsRandomEvent() {
+ int _variableEventCount = this.getVariableEventCount();
+ return (_variableEventCount >= 1);
+ }
+
+ public int getCount() {
+ int _variableEventCount = this.getVariableEventCount();
+ return ((this.falseEventCount + this.trueEventCount) + _variableEventCount);
+ }
+
+ public boolean isEmpty() {
+ return (((!this.containsFalseEvent()) && (!this.containsTrueEvent())) && (!this.containsRandomEvent()));
+ }
+
+ public boolean containsExactlyOneRandomEvent() {
+ return (((!this.containsFalseEvent()) && (!this.containsTrueEvent())) && (this.getVariableEventCount() == 1));
+ }
+
+ public RandomEvent toSingleRandomEvent() {
+ RandomEvent _xblockexpression = null;
+ {
+ boolean _containsExactlyOneRandomEvent = this.containsExactlyOneRandomEvent();
+ boolean _not = (!_containsExactlyOneRandomEvent);
+ if (_not) {
+ throw new IllegalStateException("Input collection is not a single random event");
+ }
+ _xblockexpression = IterableExtensions.head(this.randomEvents);
+ }
+ return _xblockexpression;
+ }
+
+ public static EventCollection.Builder builder() {
+ return new EventCollection.Builder();
+ }
+
+ public EventCollection(final int falseEventCount, final int trueEventCount, final Set randomEvents) {
+ super();
+ this.falseEventCount = falseEventCount;
+ this.trueEventCount = trueEventCount;
+ this.randomEvents = randomEvents;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + this.falseEventCount;
+ result = prime * result + this.trueEventCount;
+ return prime * result + ((this.randomEvents== null) ? 0 : this.randomEvents.hashCode());
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ EventCollection other = (EventCollection) obj;
+ if (other.falseEventCount != this.falseEventCount)
+ return false;
+ if (other.trueEventCount != this.trueEventCount)
+ return false;
+ if (this.randomEvents == null) {
+ if (other.randomEvents != null)
+ return false;
+ } else if (!this.randomEvents.equals(other.randomEvents))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ ToStringBuilder b = new ToStringBuilder(this);
+ b.add("falseEventCount", this.falseEventCount);
+ b.add("trueEventCount", this.trueEventCount);
+ b.add("randomEvents", this.randomEvents);
+ return b.toString();
+ }
+
+ @Pure
+ public int getFalseEventCount() {
+ return this.falseEventCount;
+ }
+
+ @Pure
+ public int getTrueEventCount() {
+ return this.trueEventCount;
+ }
+
+ @Pure
+ public Set getRandomEvents() {
+ return this.randomEvents;
+ }
+}
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
new file mode 100644
index 00000000..70481341
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/EventMaterializer.java
@@ -0,0 +1,456 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft;
+
+import com.google.common.base.Objects;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.AndGateDefinition;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.BasicEventDefinition;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.EventDeclaration;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.GateDefinition;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Input;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.InputEvent;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.KOfMGateDefinition;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.OrGateDefinition;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Output;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.AndGate;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.BasicEvent;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Distribution;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtFactory;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Gate;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.OrGate;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft.EventCollection;
+import java.util.LinkedHashSet;
+import java.util.Map;
+import java.util.function.Function;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.xtend.lib.annotations.Data;
+import org.eclipse.xtend2.lib.StringConcatenation;
+import org.eclipse.xtext.xbase.lib.CollectionLiterals;
+import org.eclipse.xtext.xbase.lib.Extension;
+import org.eclipse.xtext.xbase.lib.Functions.Function1;
+import org.eclipse.xtext.xbase.lib.IterableExtensions;
+import org.eclipse.xtext.xbase.lib.ObjectExtensions;
+import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
+import org.eclipse.xtext.xbase.lib.Pure;
+
+@SuppressWarnings("all")
+public class EventMaterializer {
+ @Data
+ protected static class EventKey {
+ private final Component component;
+
+ private final T event;
+
+ @Override
+ public String toString() {
+ StringConcatenation _builder = new StringConcatenation();
+ String _name = this.component.getName();
+ _builder.append(_name);
+ _builder.append("_");
+ String _name_1 = this.event.getName();
+ _builder.append(_name_1);
+ return _builder.toString();
+ }
+
+ public EventKey(final Component component, final T event) {
+ super();
+ this.component = component;
+ this.event = event;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.component== null) ? 0 : this.component.hashCode());
+ return prime * result + ((this.event== null) ? 0 : this.event.hashCode());
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ EventMaterializer.EventKey> other = (EventMaterializer.EventKey>) obj;
+ if (this.component == null) {
+ if (other.component != null)
+ return false;
+ } else if (!this.component.equals(other.component))
+ return false;
+ if (this.event == null) {
+ if (other.event != null)
+ return false;
+ } else if (!this.event.equals(other.event))
+ return false;
+ return true;
+ }
+
+ @Pure
+ public Component getComponent() {
+ return this.component;
+ }
+
+ @Pure
+ public T getEvent() {
+ return this.event;
+ }
+ }
+
+ @Extension
+ private final FtFactory _ftFactory = FtFactory.eINSTANCE;
+
+ private final Map, Event> materializationCache = CollectionLiterals., Event>newHashMap();
+
+ private final Map, EventCollection> multipleInputCache = CollectionLiterals., EventCollection>newHashMap();
+
+ private final ConstantEvent falseEvent;
+
+ private final ConstantEvent trueEvent;
+
+ private final LinkedHashSet> path = new LinkedHashSet>();
+
+ public EventMaterializer() {
+ ConstantEvent _createConstantEvent = this._ftFactory.createConstantEvent();
+ final Procedure1 _function = (ConstantEvent it) -> {
+ it.setFailed(false);
+ };
+ ConstantEvent _doubleArrow = ObjectExtensions.operator_doubleArrow(_createConstantEvent, _function);
+ this.falseEvent = _doubleArrow;
+ ConstantEvent _createConstantEvent_1 = this._ftFactory.createConstantEvent();
+ final Procedure1 _function_1 = (ConstantEvent it) -> {
+ it.setFailed(true);
+ };
+ ConstantEvent _doubleArrow_1 = ObjectExtensions.operator_doubleArrow(_createConstantEvent_1, _function_1);
+ this.trueEvent = _doubleArrow_1;
+ }
+
+ public Event getOrMaterialize(final Output output) {
+ return this.getOrMaterialize(output.getComponent(), output.getEventDeclaration());
+ }
+
+ public Event getOrMaterialize(final Component component, final EventDeclaration eventDeclaration) {
+ Event _xblockexpression = null;
+ {
+ final EventMaterializer.EventKey eventKey = new EventMaterializer.EventKey(component, eventDeclaration);
+ this.pushEventKey(eventKey);
+ Event _xtrycatchfinallyexpression = null;
+ try {
+ final Function, Event> _function = (EventMaterializer.EventKey it) -> {
+ return this.materialize(it.component, it.event);
+ };
+ _xtrycatchfinallyexpression = this.materializationCache.computeIfAbsent(eventKey, _function);
+ } finally {
+ this.popEventKey(eventKey);
+ }
+ _xblockexpression = _xtrycatchfinallyexpression;
+ }
+ return _xblockexpression;
+ }
+
+ protected Event materialize(final Component component, final EventDeclaration eventDeclaration) {
+ RandomEvent _xblockexpression = null;
+ {
+ String _name = component.getName();
+ String _plus = (_name + "_");
+ String _name_1 = eventDeclaration.getName();
+ final String eventName = (_plus + _name_1);
+ RandomEvent _switchResult = null;
+ boolean _matched = false;
+ if (eventDeclaration instanceof InputEvent) {
+ _matched=true;
+ return this.materializeConnectedEvent(component, ((InputEvent)eventDeclaration));
+ }
+ if (!_matched) {
+ if (eventDeclaration instanceof BasicEventDefinition) {
+ _matched=true;
+ BasicEvent _xblockexpression_1 = null;
+ {
+ final BasicEvent basicEvent = this._ftFactory.createBasicEvent();
+ basicEvent.setDistribution(EcoreUtil.copy(((BasicEventDefinition)eventDeclaration).getDistribution()));
+ _xblockexpression_1 = basicEvent;
+ }
+ _switchResult = _xblockexpression_1;
+ }
+ }
+ if (!_matched) {
+ if (eventDeclaration instanceof GateDefinition) {
+ _matched=true;
+ Gate _xblockexpression_1 = null;
+ {
+ final EventCollection inputs = this.collectInputs(component, ((GateDefinition)eventDeclaration));
+ Gate _switchResult_1 = null;
+ boolean _matched_1 = false;
+ if (eventDeclaration instanceof AndGateDefinition) {
+ _matched_1=true;
+ AndGate _xifexpression = null;
+ boolean _containsFalseEvent = inputs.containsFalseEvent();
+ if (_containsFalseEvent) {
+ return this.falseEvent;
+ } else {
+ AndGate _xifexpression_1 = null;
+ boolean _isEmpty = inputs.isEmpty();
+ if (_isEmpty) {
+ return this.trueEvent;
+ } else {
+ AndGate _xifexpression_2 = null;
+ boolean _containsExactlyOneRandomEvent = inputs.containsExactlyOneRandomEvent();
+ if (_containsExactlyOneRandomEvent) {
+ return inputs.toSingleRandomEvent();
+ } else {
+ _xifexpression_2 = this._ftFactory.createAndGate();
+ }
+ _xifexpression_1 = _xifexpression_2;
+ }
+ _xifexpression = _xifexpression_1;
+ }
+ _switchResult_1 = _xifexpression;
+ }
+ if (!_matched_1) {
+ if (eventDeclaration instanceof OrGateDefinition) {
+ _matched_1=true;
+ OrGate _xifexpression = null;
+ boolean _containsTrueEvent = inputs.containsTrueEvent();
+ if (_containsTrueEvent) {
+ return this.trueEvent;
+ } else {
+ OrGate _xifexpression_1 = null;
+ boolean _isEmpty = inputs.isEmpty();
+ if (_isEmpty) {
+ return this.falseEvent;
+ } else {
+ OrGate _xifexpression_2 = null;
+ boolean _containsExactlyOneRandomEvent = inputs.containsExactlyOneRandomEvent();
+ if (_containsExactlyOneRandomEvent) {
+ return inputs.toSingleRandomEvent();
+ } else {
+ _xifexpression_2 = this._ftFactory.createOrGate();
+ }
+ _xifexpression_1 = _xifexpression_2;
+ }
+ _xifexpression = _xifexpression_1;
+ }
+ _switchResult_1 = _xifexpression;
+ }
+ }
+ if (!_matched_1) {
+ if (eventDeclaration instanceof KOfMGateDefinition) {
+ _matched_1=true;
+ Gate _xblockexpression_2 = null;
+ {
+ int _count = inputs.getCount();
+ int _k = ((KOfMGateDefinition)eventDeclaration).getK();
+ int _multiply = (_count * _k);
+ int _m = ((KOfMGateDefinition)eventDeclaration).getM();
+ final int requiredTrueInputs = (_multiply / _m);
+ int _trueEventCount = inputs.getTrueEventCount();
+ final int k = (requiredTrueInputs - _trueEventCount);
+ final int m = inputs.getVariableEventCount();
+ Gate _xifexpression = null;
+ if ((k == 0)) {
+ return this.trueEvent;
+ } else {
+ Gate _xifexpression_1 = null;
+ if ((k > m)) {
+ return this.falseEvent;
+ } else {
+ Gate _xifexpression_2 = null;
+ boolean _containsExactlyOneRandomEvent = inputs.containsExactlyOneRandomEvent();
+ if (_containsExactlyOneRandomEvent) {
+ return inputs.toSingleRandomEvent();
+ } else {
+ Gate _xifexpression_3 = null;
+ if ((k == 1)) {
+ _xifexpression_3 = this._ftFactory.createOrGate();
+ } else {
+ Gate _xifexpression_4 = null;
+ if ((k == m)) {
+ _xifexpression_4 = this._ftFactory.createAndGate();
+ } else {
+ KOfMGate _xblockexpression_3 = null;
+ {
+ final KOfMGate kOfMGate = this._ftFactory.createKOfMGate();
+ kOfMGate.setK(k);
+ _xblockexpression_3 = kOfMGate;
+ }
+ _xifexpression_4 = _xblockexpression_3;
+ }
+ _xifexpression_3 = _xifexpression_4;
+ }
+ _xifexpression_2 = _xifexpression_3;
+ }
+ _xifexpression_1 = _xifexpression_2;
+ }
+ _xifexpression = _xifexpression_1;
+ }
+ _xblockexpression_2 = _xifexpression;
+ }
+ _switchResult_1 = _xblockexpression_2;
+ }
+ }
+ if (!_matched_1) {
+ throw new IllegalArgumentException(("Unknown gate definition: " + eventDeclaration));
+ }
+ final Gate gate = _switchResult_1;
+ gate.getInputEvents().addAll(inputs.getRandomEvents());
+ _xblockexpression_1 = gate;
+ }
+ _switchResult = _xblockexpression_1;
+ }
+ }
+ if (!_matched) {
+ throw new IllegalArgumentException(("Unknown event declaration: " + eventDeclaration));
+ }
+ final RandomEvent event = _switchResult;
+ event.setName(eventName);
+ _xblockexpression = event;
+ }
+ return _xblockexpression;
+ }
+
+ protected Event materializeConnectedEvent(final Component component, final InputEvent inputEvent) {
+ Event _xblockexpression = null;
+ {
+ boolean _isMultiple = inputEvent.isMultiple();
+ if (_isMultiple) {
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("Cannot materialize multiple nput ");
+ String _name = component.getName();
+ _builder.append(_name);
+ _builder.append("_");
+ String _name_1 = inputEvent.getName();
+ _builder.append(_name_1);
+ throw new IllegalArgumentException(_builder.toString());
+ }
+ final Input input = this.findInput(component, inputEvent);
+ final EList incomingConnections = input.getIncomingConnections();
+ int _size = incomingConnections.size();
+ boolean _notEquals = (_size != 1);
+ if (_notEquals) {
+ StringConcatenation _builder_1 = new StringConcatenation();
+ _builder_1.append("Input ");
+ String _name_2 = component.getName();
+ _builder_1.append(_name_2);
+ _builder_1.append("_");
+ String _name_3 = inputEvent.getName();
+ _builder_1.append(_name_3);
+ _builder_1.append(" has ");
+ int _size_1 = incomingConnections.size();
+ _builder_1.append(_size_1);
+ _builder_1.append(" connections instead of 1");
+ throw new IllegalArgumentException(_builder_1.toString());
+ }
+ final Output output = IterableExtensions.head(incomingConnections).getOutput();
+ _xblockexpression = this.getOrMaterialize(output.getComponent(), output.getEventDeclaration());
+ }
+ return _xblockexpression;
+ }
+
+ protected EventCollection collectInputs(final Component component, final GateDefinition gateDefinition) {
+ EventCollection _xblockexpression = null;
+ {
+ final EventCollection.Builder builder = EventCollection.builder();
+ EList _inputEvents = gateDefinition.getInputEvents();
+ for (final EventDeclaration inputEventDeclaration : _inputEvents) {
+ boolean _matched = false;
+ if (inputEventDeclaration instanceof InputEvent) {
+ boolean _isMultiple = ((InputEvent)inputEventDeclaration).isMultiple();
+ if (_isMultiple) {
+ _matched=true;
+ final EventCollection materializedEvents = this.getOrMaterializeConnectedEvents(component, ((InputEvent)inputEventDeclaration));
+ builder.addAll(materializedEvents);
+ }
+ }
+ if (!_matched) {
+ builder.add(this.getOrMaterialize(component, inputEventDeclaration));
+ }
+ }
+ _xblockexpression = builder.build();
+ }
+ return _xblockexpression;
+ }
+
+ protected EventCollection getOrMaterializeConnectedEvents(final Component component, final InputEvent inputEvent) {
+ EventCollection _xblockexpression = null;
+ {
+ final EventMaterializer.EventKey inputKey = new EventMaterializer.EventKey(component, inputEvent);
+ this.pushEventKey(inputKey);
+ EventCollection _xtrycatchfinallyexpression = null;
+ try {
+ final Function, EventCollection> _function = (EventMaterializer.EventKey it) -> {
+ return this.materializeConnectedEvents(it.component, it.event);
+ };
+ _xtrycatchfinallyexpression = this.multipleInputCache.computeIfAbsent(inputKey, _function);
+ } finally {
+ this.popEventKey(inputKey);
+ }
+ _xblockexpression = _xtrycatchfinallyexpression;
+ }
+ return _xblockexpression;
+ }
+
+ protected EventCollection materializeConnectedEvents(final Component component, final InputEvent inputEvent) {
+ EventCollection _xblockexpression = null;
+ {
+ final Input input = this.findInput(component, inputEvent);
+ final EventCollection.Builder builder = EventCollection.builder();
+ EList _incomingConnections = input.getIncomingConnections();
+ for (final Connection connection : _incomingConnections) {
+ {
+ final Event materializedEvent = this.getOrMaterialize(connection.getOutput());
+ builder.add(materializedEvent);
+ }
+ }
+ _xblockexpression = builder.build();
+ }
+ return _xblockexpression;
+ }
+
+ protected Input findInput(final Component component, final InputEvent inputEvent) {
+ final Function1 _function = (Input it) -> {
+ InputEvent _inputEvent = it.getInputEvent();
+ return Boolean.valueOf(Objects.equal(_inputEvent, inputEvent));
+ };
+ final Input input = IterableExtensions. findFirst(component.getInputs(), _function);
+ if ((input == null)) {
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("No input ");
+ _builder.append(inputEvent);
+ _builder.append(" in component ");
+ _builder.append(component);
+ throw new IllegalArgumentException(_builder.toString());
+ }
+ return input;
+ }
+
+ private void pushEventKey(final EventMaterializer.EventKey extends EventDeclaration> eventKey) {
+ boolean _add = this.path.add(eventKey);
+ boolean _not = (!_add);
+ if (_not) {
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("Circular dependency [");
+ {
+ for(final EventMaterializer.EventKey extends EventDeclaration> ancestor : this.path) {
+ _builder.append(ancestor);
+ _builder.append(", ");
+ }
+ }
+ _builder.append(eventKey);
+ _builder.append("] detected");
+ throw new IllegalStateException(_builder.toString());
+ }
+ }
+
+ private boolean popEventKey(final EventMaterializer.EventKey extends EventDeclaration> eventKey) {
+ return this.path.remove(eventKey);
+ }
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.java
new file mode 100644
index 00000000..9b2dfd76
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.java
@@ -0,0 +1,57 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft;
+
+import com.google.common.base.Objects;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FaultTree;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtFactory;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Gate;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent;
+import java.util.Collection;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.xtend.lib.annotations.Accessors;
+import org.eclipse.xtext.xbase.lib.Pure;
+
+@SuppressWarnings("all")
+public class FaultTreeBuilder {
+ @Accessors
+ private final FaultTree faultTree = FtFactory.eINSTANCE.createFaultTree();
+
+ public void addTopLevel(final RandomEvent event) {
+ RandomEvent _topEvent = this.faultTree.getTopEvent();
+ boolean _tripleNotEquals = (_topEvent != null);
+ if (_tripleNotEquals) {
+ throw new IllegalStateException("Top event was already set");
+ }
+ this.add(event);
+ this.faultTree.setTopEvent(event);
+ }
+
+ protected void add(final RandomEvent event) {
+ EObject _eContainer = this.faultTree.eContainer();
+ boolean _equals = Objects.equal(_eContainer, this.faultTree);
+ if (_equals) {
+ return;
+ }
+ EObject _eContainer_1 = this.faultTree.eContainer();
+ boolean _tripleNotEquals = (_eContainer_1 != null);
+ if (_tripleNotEquals) {
+ throw new IllegalStateException("Event is already in a different fault tree");
+ }
+ EList _events = this.faultTree.getEvents();
+ _events.add(event);
+ if ((event instanceof Gate)) {
+ this.addAll(((Gate)event).getInputEvents());
+ }
+ }
+
+ protected void addAll(final Collection events) {
+ for (final RandomEvent event : events) {
+ this.add(event);
+ }
+ }
+
+ @Pure
+ public FaultTree getFaultTree() {
+ return this.faultTree;
+ }
+}
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 d26ae359..f705fefe 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentFaultTreeTrace.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentFaultTreeTrace.xtendbin 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 03d6064f..bab76345 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentInstanceTrace.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentInstanceTrace.xtendbin 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 1f6758ac..257bfc56 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentNameGenerator.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.ComponentNameGenerator.xtendbin 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 3569c02f..a1339a18 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.Ecore2CftTransformation.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.Ecore2CftTransformation.xtendbin 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 378550ba..ba19d0fb 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.InputTrace.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.InputTrace.xtendbin 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 0b0e534a..1e8612b2 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.LookupHandler.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.LookupHandler.xtendbin 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 5e26d4e4..ebe80f2e 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.MappingHandler.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.MappingHandler.xtendbin 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 8fb7f13f..03bd16f8 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.MappingQueries.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/.MappingQueries.xtendbin differ
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.java
index 8b2d9d97..a63c8e78 100644
--- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.java
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ecore2cft/Ecore2CftTransformation.java
@@ -3,6 +3,7 @@ package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft;
import com.google.common.collect.ImmutableList;
import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.MappingDefinition;
import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.TransformationDefinition;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree;
import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.ComponentFaultTreeTrace;
import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.MappingHandler;
import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ecore2cft.MappingQueries;
@@ -23,13 +24,18 @@ public class Ecore2CftTransformation {
this.mappingHandlers = ImmutableList.copyOf(ListExtensions.map(transformationDefinition.getMappingDefinitions(), _function));
}
- public void createComponentFaultTree() {
- final ComponentFaultTreeTrace trace = new ComponentFaultTreeTrace();
- for (final MappingHandler handler : this.mappingHandlers) {
- handler.instantiateComponents(trace);
- }
- for (final MappingHandler handler_1 : this.mappingHandlers) {
- handler_1.instantiateConnections(trace);
+ public ComponentFaultTree createComponentFaultTree() {
+ ComponentFaultTree _xblockexpression = null;
+ {
+ final ComponentFaultTreeTrace trace = new ComponentFaultTreeTrace();
+ for (final MappingHandler handler : this.mappingHandlers) {
+ handler.instantiateComponents(trace);
+ }
+ for (final MappingHandler handler_1 : this.mappingHandlers) {
+ handler_1.instantiateConnections(trace);
+ }
+ _xblockexpression = trace.getComponentFaultTree();
}
+ return _xblockexpression;
}
}
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
new file mode 100644
index 00000000..9fe75a0f
Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.Ft2GalileoTransformation.xtendbin 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
new file mode 100644
index 00000000..3f932890
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.gitignore
@@ -0,0 +1 @@
+/.Ft2GalileoTransformation.java._trace
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
new file mode 100644
index 00000000..e900c62a
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/Ft2GalileoTransformation.java
@@ -0,0 +1,181 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.ft2galileo;
+
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.AndGate;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.BasicEvent;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantDistribution;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Distribution;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ExponentialDistribution;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FaultTree;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Gate;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.KOfMGate;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.OrGate;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent;
+import java.util.Arrays;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.xtend2.lib.StringConcatenation;
+import org.eclipse.xtend2.lib.StringConcatenationClient;
+
+@SuppressWarnings("all")
+public class Ft2GalileoTransformation {
+ public CharSequence toGalileo(final FaultTree faultTree) {
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("toplevel ");
+ String _name = faultTree.getTopEvent().getName();
+ _builder.append(_name);
+ _builder.append(";");
+ _builder.newLineIfNotEmpty();
+ {
+ EList _events = faultTree.getEvents();
+ for(final RandomEvent event : _events) {
+ String _name_1 = event.getName();
+ _builder.append(_name_1);
+ _builder.append(" ");
+ StringConcatenationClient _defineEvent = this.defineEvent(event);
+ _builder.append(_defineEvent);
+ _builder.append(";");
+ _builder.newLineIfNotEmpty();
+ }
+ }
+ return _builder;
+ }
+
+ protected StringConcatenationClient _defineEvent(final BasicEvent basicEvent) {
+ return this.defineDistribution(basicEvent.getDistribution());
+ }
+
+ protected StringConcatenationClient _defineDistribution(final ConstantDistribution distribution) {
+ StringConcatenationClient _client = new StringConcatenationClient() {
+ @Override
+ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
+ _builder.append("p=");
+ double _p = distribution.getP();
+ _builder.append(_p);
+ }
+ };
+ return _client;
+ }
+
+ protected StringConcatenationClient _defineDistribution(final ExponentialDistribution distribution) {
+ StringConcatenationClient _client = new StringConcatenationClient() {
+ @Override
+ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
+ _builder.append("lambda=");
+ double _lambda = distribution.getLambda();
+ _builder.append(_lambda);
+ }
+ };
+ return _client;
+ }
+
+ protected StringConcatenationClient _defineDistribution(final Distribution distribution) {
+ throw new IllegalArgumentException(("Unknown distribution: " + distribution));
+ }
+
+ protected StringConcatenationClient _defineEvent(final Gate gate) {
+ StringConcatenationClient _client = new StringConcatenationClient() {
+ @Override
+ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
+ StringConcatenationClient _defineGate = Ft2GalileoTransformation.this.defineGate(gate);
+ _builder.append(_defineGate);
+ _builder.append(" ");
+ {
+ EList _inputEvents = gate.getInputEvents();
+ boolean _hasElements = false;
+ for(final RandomEvent input : _inputEvents) {
+ if (!_hasElements) {
+ _hasElements = true;
+ } else {
+ _builder.appendImmediate(" ", "");
+ }
+ String _name = input.getName();
+ _builder.append(_name);
+ }
+ }
+ }
+ };
+ return _client;
+ }
+
+ protected StringConcatenationClient _defineGate(final AndGate gate) {
+ StringConcatenationClient _client = new StringConcatenationClient() {
+ @Override
+ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
+ _builder.append("and");
+ }
+ };
+ return _client;
+ }
+
+ protected StringConcatenationClient _defineGate(final OrGate gate) {
+ StringConcatenationClient _client = new StringConcatenationClient() {
+ @Override
+ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
+ _builder.append("or");
+ }
+ };
+ return _client;
+ }
+
+ protected StringConcatenationClient _defineGate(final KOfMGate gate) {
+ StringConcatenationClient _client = new StringConcatenationClient() {
+ @Override
+ protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
+ int _k = gate.getK();
+ _builder.append(_k);
+ _builder.append("of");
+ int _size = gate.getInputEvents().size();
+ _builder.append(_size);
+ }
+ };
+ return _client;
+ }
+
+ protected StringConcatenationClient _defineGate(final Gate gate) {
+ throw new IllegalArgumentException(("Unknown gate: " + gate));
+ }
+
+ protected StringConcatenationClient _defineEvent(final RandomEvent randomEvent) {
+ throw new IllegalArgumentException(("Unknown random even: " + randomEvent));
+ }
+
+ protected StringConcatenationClient defineEvent(final RandomEvent basicEvent) {
+ if (basicEvent instanceof BasicEvent) {
+ return _defineEvent((BasicEvent)basicEvent);
+ } else if (basicEvent instanceof Gate) {
+ return _defineEvent((Gate)basicEvent);
+ } else if (basicEvent != null) {
+ return _defineEvent(basicEvent);
+ } else {
+ throw new IllegalArgumentException("Unhandled parameter types: " +
+ Arrays.asList(basicEvent).toString());
+ }
+ }
+
+ protected StringConcatenationClient defineDistribution(final Distribution distribution) {
+ if (distribution instanceof ConstantDistribution) {
+ return _defineDistribution((ConstantDistribution)distribution);
+ } else if (distribution instanceof ExponentialDistribution) {
+ return _defineDistribution((ExponentialDistribution)distribution);
+ } else if (distribution != null) {
+ return _defineDistribution(distribution);
+ } else {
+ throw new IllegalArgumentException("Unhandled parameter types: " +
+ Arrays.asList(distribution).toString());
+ }
+ }
+
+ protected StringConcatenationClient defineGate(final Gate gate) {
+ if (gate instanceof AndGate) {
+ return _defineGate((AndGate)gate);
+ } else if (gate instanceof KOfMGate) {
+ return _defineGate((KOfMGate)gate);
+ } else if (gate instanceof OrGate) {
+ return _defineGate((OrGate)gate);
+ } else if (gate != null) {
+ return _defineGate(gate);
+ } else {
+ throw new IllegalArgumentException("Unhandled parameter types: " +
+ Arrays.asList(gate).toString());
+ }
+ }
+}
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
new file mode 100644
index 00000000..57c4608d
Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.ReliabilityResult.xtendbin 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
new file mode 100644
index 00000000..f5cb52f4
Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftConfiguration.xtendbin 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
new file mode 100644
index 00000000..5dad0728
Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftHandler.xtendbin 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
new file mode 100644
index 00000000..abd8a501
Binary files /dev/null and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftSolver.xtendbin 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
new file mode 100644
index 00000000..59cc8fe8
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.gitignore
@@ -0,0 +1,9 @@
+/.StormDftSolver.java._trace
+/.StormDftConfiguration.java._trace
+/.StormDftMttfConfiguration.java._trace
+/.FtAnalysisObjective.java._trace
+/.ApproximationHeuristic.java._trace
+/.StormDftHandler.java._trace
+/.StormDftException.java._trace
+/.ReliabilityModelSolution.java._trace
+/.ReliabilityResult.java._trace
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ApproximationHeuristic.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ApproximationHeuristic.java
new file mode 100644
index 00000000..822d4f36
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ApproximationHeuristic.java
@@ -0,0 +1,8 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver;
+
+@SuppressWarnings("all")
+public enum ApproximationHeuristic {
+ NONE,
+
+ DEPTH;
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/FtAnalysisObjective.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/FtAnalysisObjective.java
new file mode 100644
index 00000000..528ada42
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/FtAnalysisObjective.java
@@ -0,0 +1,14 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver;
+
+@SuppressWarnings("all")
+public abstract class FtAnalysisObjective {
+ public static final class TimeBound extends FtAnalysisObjective {
+ public double timeBound = 0;
+ }
+
+ public static final FtAnalysisObjective MTTF = new FtAnalysisObjective() {
+ };
+
+ private FtAnalysisObjective() {
+ }
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ReliabilityResult.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ReliabilityResult.java
new file mode 100644
index 00000000..c8c8b000
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/ReliabilityResult.java
@@ -0,0 +1,156 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver;
+
+import org.eclipse.xtend.lib.annotations.Data;
+import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor;
+import org.eclipse.xtext.xbase.lib.Pure;
+import org.eclipse.xtext.xbase.lib.util.ToStringBuilder;
+
+@SuppressWarnings("all")
+public abstract class ReliabilityResult {
+ @Data
+ public static final class Solution extends ReliabilityResult {
+ private final double lowerBound;
+
+ private final double upperBound;
+
+ public Solution(final double value) {
+ this(value, value);
+ }
+
+ public Solution(final double lowerBound, final double upperBound) {
+ if ((lowerBound > upperBound)) {
+ throw new IllegalArgumentException("lowerBound must not be larger than upperBound");
+ }
+ this.lowerBound = lowerBound;
+ this.upperBound = upperBound;
+ }
+
+ @Override
+ public ReliabilityResult.Solution getOrThrow() {
+ return this;
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + (int) (Double.doubleToLongBits(this.lowerBound) ^ (Double.doubleToLongBits(this.lowerBound) >>> 32));
+ return prime * result + (int) (Double.doubleToLongBits(this.upperBound) ^ (Double.doubleToLongBits(this.upperBound) >>> 32));
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ReliabilityResult.Solution other = (ReliabilityResult.Solution) obj;
+ if (Double.doubleToLongBits(other.lowerBound) != Double.doubleToLongBits(this.lowerBound))
+ return false;
+ if (Double.doubleToLongBits(other.upperBound) != Double.doubleToLongBits(this.upperBound))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ return new ToStringBuilder(this)
+ .addAllFields()
+ .toString();
+ }
+
+ @Pure
+ public double getLowerBound() {
+ return this.lowerBound;
+ }
+
+ @Pure
+ public double getUpperBound() {
+ return this.upperBound;
+ }
+ }
+
+ @Data
+ public static final class Unknown extends ReliabilityResult {
+ private final String message;
+
+ private final Throwable cause;
+
+ @FinalFieldsConstructor
+ public Unknown(final String message, final Throwable cause) {
+ super();
+ this.message = message;
+ this.cause = cause;
+ }
+
+ public Unknown(final String message) {
+ this(message, null);
+ }
+
+ @Override
+ public ReliabilityResult.Solution getOrThrow() {
+ throw new RuntimeException(this.message, this.cause);
+ }
+
+ @Override
+ @Pure
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + ((this.message== null) ? 0 : this.message.hashCode());
+ return prime * result + ((this.cause== null) ? 0 : this.cause.hashCode());
+ }
+
+ @Override
+ @Pure
+ public boolean equals(final Object obj) {
+ if (this == obj)
+ return true;
+ if (obj == null)
+ return false;
+ if (getClass() != obj.getClass())
+ return false;
+ ReliabilityResult.Unknown other = (ReliabilityResult.Unknown) obj;
+ if (this.message == null) {
+ if (other.message != null)
+ return false;
+ } else if (!this.message.equals(other.message))
+ return false;
+ if (this.cause == null) {
+ if (other.cause != null)
+ return false;
+ } else if (!this.cause.equals(other.cause))
+ return false;
+ return true;
+ }
+
+ @Override
+ @Pure
+ public String toString() {
+ return new ToStringBuilder(this)
+ .addAllFields()
+ .toString();
+ }
+
+ @Pure
+ public String getMessage() {
+ return this.message;
+ }
+
+ @Pure
+ public Throwable getCause() {
+ return this.cause;
+ }
+ }
+
+ public static final ReliabilityResult.Unknown TIMEOUT = new ReliabilityResult.Unknown("Solver timed out");
+
+ public static final ReliabilityResult.Unknown MEMOUT = new ReliabilityResult.Unknown("Solver out of memory");
+
+ public abstract ReliabilityResult.Solution getOrThrow();
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftConfiguration.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftConfiguration.java
new file mode 100644
index 00000000..e1bb3625
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftConfiguration.java
@@ -0,0 +1,31 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver;
+
+import com.google.common.base.Objects;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.ApproximationHeuristic;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.FtAnalysisObjective;
+import hu.bme.mit.inf.dslreasoner.logic.model.builder.SolverConfiguration;
+
+@SuppressWarnings("all")
+public final class StormDftConfiguration extends SolverConfiguration {
+ public static final String DEFAULT_SOLVER_PATH = "storm-dft";
+
+ public double precision = 1e-6;
+
+ public boolean bisimulation = true;
+
+ public boolean symmetryReduction = true;
+
+ public boolean modularization = true;
+
+ public boolean dontCarePropagation = true;
+
+ public double approximation = 0;
+
+ public ApproximationHeuristic approximationHeuristic = ApproximationHeuristic.NONE;
+
+ public FtAnalysisObjective objective;
+
+ public boolean isApproximationInUse() {
+ return (!Objects.equal(this.approximationHeuristic, ApproximationHeuristic.NONE));
+ }
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftException.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftException.java
new file mode 100644
index 00000000..955c9ed1
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftException.java
@@ -0,0 +1,12 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver;
+
+@SuppressWarnings("all")
+public class StormDftException extends RuntimeException {
+ public StormDftException(final String s) {
+ super(s);
+ }
+
+ public StormDftException(final String s, final Exception e) {
+ super(s, e);
+ }
+}
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
new file mode 100644
index 00000000..003d9cc5
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftHandler.java
@@ -0,0 +1,351 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver;
+
+import com.google.common.base.Objects;
+import com.google.common.collect.ImmutableList;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.ApproximationHeuristic;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.FtAnalysisObjective;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.ReliabilityResult;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.StormDftConfiguration;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.StormDftException;
+import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel;
+import hu.bme.mit.inf.dslreasoner.logic.model.builder.SolverConfiguration;
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.util.ArrayList;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import jnr.constants.platform.Signal;
+import org.apache.commons.lang.SystemUtils;
+import org.eclipse.xtend2.lib.StringConcatenation;
+import org.eclipse.xtext.xbase.lib.CollectionLiterals;
+import org.eclipse.xtext.xbase.lib.Conversions;
+import org.eclipse.xtext.xbase.lib.Exceptions;
+import org.eclipse.xtext.xbase.lib.Extension;
+import org.eclipse.xtext.xbase.lib.Functions.Function0;
+import org.eclipse.xtext.xbase.lib.Functions.Function1;
+import org.eclipse.xtext.xbase.lib.InputOutput;
+import org.eclipse.xtext.xbase.lib.IterableExtensions;
+
+@SuppressWarnings("all")
+public class StormDftHandler {
+ private static final String DOUBLE_REGEX = "[-+]?[0-9]*\\.?[0-9]+([eE][-+]?[0-9]+)?";
+
+ private static final String SINGLE_RESULT_GROUP = "single";
+
+ private static final String LOWER_BOUND_GROUP = "lower";
+
+ private static final String UPPER_BOUND_GROUP = "upper";
+
+ private static final String RESULT_REGEX = new Function0() {
+ public String apply() {
+ StringConcatenation _builder = new StringConcatenation();
+ _builder.append("^Result:\\s*\\[(?:(?<");
+ _builder.append(StormDftHandler.SINGLE_RESULT_GROUP);
+ _builder.append(">");
+ _builder.append(StormDftHandler.DOUBLE_REGEX);
+ _builder.append(")|\\((?<");
+ _builder.append(StormDftHandler.LOWER_BOUND_GROUP);
+ _builder.append(">");
+ _builder.append(StormDftHandler.DOUBLE_REGEX);
+ _builder.append("),\\s*(?<");
+ _builder.append(StormDftHandler.UPPER_BOUND_GROUP);
+ _builder.append(">");
+ _builder.append(StormDftHandler.DOUBLE_REGEX);
+ _builder.append(")\\))\\]");
+ return _builder.toString();
+ }
+ }.apply();
+
+ private static final Pattern RESULT_PATTERN = Pattern.compile(StormDftHandler.RESULT_REGEX);
+
+ private static final int SIGNAL_EXIT_VALUE_OFFSET = new Function0() {
+ public Integer apply() {
+ int _xifexpression = (int) 0;
+ if (SystemUtils.IS_OS_SOLARIS) {
+ _xifexpression = 0;
+ } else {
+ _xifexpression = 0x80;
+ }
+ return _xifexpression;
+ }
+ }.apply().intValue();
+
+ private static final int STORM_GENERAL_ERROR = ((-1) & 0xff);
+
+ private static final int STORM_TIMEOUT = ((-2) & 0xff);
+
+ private static final int STORM_MEMOUT = ((-3) & 0xff);
+
+ public ReliabilityResult callSolver(final String dftFilePath, final StormDftConfiguration configuration) {
+ try {
+ ReliabilityResult _xblockexpression = null;
+ {
+ final ImmutableList commandLine = this.toCommandLine(configuration, dftFilePath);
+ final DocumentationLevel documentationLevel = configuration.documentationLevel;
+ final boolean printOutput = (Objects.equal(documentationLevel, DocumentationLevel.NORMAL) ||
+ Objects.equal(documentationLevel, DocumentationLevel.FULL));
+ final ProcessBuilder processBuilder = new ProcessBuilder().command(commandLine);
+ Process process = null;
+ ReliabilityResult _xtrycatchfinallyexpression = null;
+ try {
+ ReliabilityResult _xtrycatchfinallyexpression_1 = null;
+ try {
+ ReliabilityResult _xblockexpression_1 = null;
+ {
+ process = processBuilder.start();
+ process.getOutputStream().close();
+ final ReliabilityResult.Solution result = this.readOutput(process.getInputStream(), printOutput);
+ final String error = this.readError(process.getErrorStream(), printOutput);
+ final int exitValue = process.waitFor();
+ ReliabilityResult _xifexpression = null;
+ if ((result == null)) {
+ _xifexpression = this.interpretExitStatus(exitValue, error);
+ } else {
+ _xifexpression = result;
+ }
+ _xblockexpression_1 = _xifexpression;
+ }
+ _xtrycatchfinallyexpression_1 = _xblockexpression_1;
+ } catch (final Throwable _t) {
+ if (_t instanceof IOException) {
+ final IOException e = (IOException)_t;
+ throw new StormDftException("Error during input/output handling of the stochastic solver.", e);
+ } else {
+ throw Exceptions.sneakyThrow(_t);
+ }
+ }
+ _xtrycatchfinallyexpression = _xtrycatchfinallyexpression_1;
+ } catch (final Throwable _t_1) {
+ if (_t_1 instanceof Exception) {
+ final Exception e_1 = (Exception)_t_1;
+ if ((process != null)) {
+ process.destroyForcibly().waitFor();
+ }
+ throw e_1;
+ } else {
+ throw Exceptions.sneakyThrow(_t_1);
+ }
+ }
+ _xblockexpression = _xtrycatchfinallyexpression;
+ }
+ return _xblockexpression;
+ } catch (Throwable _e) {
+ throw Exceptions.sneakyThrow(_e);
+ }
+ }
+
+ private ImmutableList toCommandLine(@Extension final StormDftConfiguration configuration, final String dftFilePath) {
+ ImmutableList _xblockexpression = null;
+ {
+ @Extension
+ final ImmutableList.Builder optionsBuilder = ImmutableList.builder();
+ String _elvis = null;
+ if (configuration.solverPath != null) {
+ _elvis = configuration.solverPath;
+ } else {
+ _elvis = StormDftConfiguration.DEFAULT_SOLVER_PATH;
+ }
+ optionsBuilder.add(_elvis);
+ if ((configuration.runtimeLimit != SolverConfiguration.Unlimited)) {
+ optionsBuilder.add("--timeout", Integer.valueOf(configuration.runtimeLimit).toString());
+ }
+ optionsBuilder.add("--precision", Double.valueOf(configuration.precision).toString());
+ if (configuration.bisimulation) {
+ optionsBuilder.add("--bisimulation");
+ }
+ if (configuration.symmetryReduction) {
+ optionsBuilder.add("--symmetryreduction");
+ }
+ if (configuration.modularization) {
+ optionsBuilder.add("--modularisation");
+ }
+ if ((!configuration.dontCarePropagation)) {
+ optionsBuilder.add("--disabledc");
+ }
+ boolean _isApproximationInUse = configuration.isApproximationInUse();
+ if (_isApproximationInUse) {
+ String _switchResult = null;
+ final ApproximationHeuristic approximationHeuristic = configuration.approximationHeuristic;
+ if (approximationHeuristic != null) {
+ switch (approximationHeuristic) {
+ case DEPTH:
+ _switchResult = "depth";
+ break;
+ default:
+ throw new IllegalArgumentException(("Unknown approximation heuristic: " + configuration.approximationHeuristic));
+ }
+ } else {
+ throw new IllegalArgumentException(("Unknown approximation heuristic: " + configuration.approximationHeuristic));
+ }
+ final String heuristicName = _switchResult;
+ optionsBuilder.add("--approximation", Double.valueOf(configuration.approximation).toString(), "--approximationheuristic", heuristicName);
+ }
+ optionsBuilder.add("--dftfile", dftFilePath);
+ final FtAnalysisObjective objective = configuration.objective;
+ boolean _matched = false;
+ if (Objects.equal(objective, FtAnalysisObjective.MTTF)) {
+ _matched=true;
+ optionsBuilder.add("--expectedtime");
+ }
+ if (!_matched) {
+ if (objective instanceof FtAnalysisObjective.TimeBound) {
+ _matched=true;
+ optionsBuilder.add("--timebound");
+ }
+ }
+ if (!_matched) {
+ throw new IllegalArgumentException(("Unknown analysis objective: " + configuration.objective));
+ }
+ boolean _equals = Objects.equal(configuration.documentationLevel, DocumentationLevel.FULL);
+ if (_equals) {
+ optionsBuilder.add("--verbose");
+ }
+ _xblockexpression = optionsBuilder.build();
+ }
+ return _xblockexpression;
+ }
+
+ private ReliabilityResult.Solution readOutput(final InputStream inputStream, final boolean printOutput) {
+ try {
+ Object _xblockexpression = null;
+ {
+ InputStreamReader _inputStreamReader = new InputStreamReader(inputStream);
+ final BufferedReader bufferedReader = new BufferedReader(_inputStreamReader);
+ try {
+ String line = null;
+ while (((line = bufferedReader.readLine()) != null)) {
+ {
+ if (printOutput) {
+ InputOutput.println(line);
+ }
+ final Matcher matcher = StormDftHandler.RESULT_PATTERN.matcher(line);
+ boolean _find = matcher.find();
+ if (_find) {
+ try {
+ final String single = matcher.group(StormDftHandler.SINGLE_RESULT_GROUP);
+ if ((single != null)) {
+ final double singleValue = Double.parseDouble(single);
+ return new ReliabilityResult.Solution(singleValue);
+ }
+ final String lower = matcher.group(StormDftHandler.LOWER_BOUND_GROUP);
+ final String upper = matcher.group(StormDftHandler.UPPER_BOUND_GROUP);
+ if (((lower != null) && (upper != null))) {
+ final double lowerValue = Double.parseDouble(lower);
+ final double upperValue = Double.parseDouble(upper);
+ return new ReliabilityResult.Solution(lowerValue, upperValue);
+ }
+ throw new StormDftException(("Inconsistent stochastic solver output: " + line));
+ } catch (final Throwable _t) {
+ if (_t instanceof NumberFormatException) {
+ final NumberFormatException e = (NumberFormatException)_t;
+ throw new StormDftException("Malformatted number from stochastic solver.", e);
+ } else {
+ throw Exceptions.sneakyThrow(_t);
+ }
+ }
+ }
+ }
+ }
+ } finally {
+ bufferedReader.close();
+ }
+ _xblockexpression = null;
+ }
+ return ((ReliabilityResult.Solution)_xblockexpression);
+ } catch (Throwable _e) {
+ throw Exceptions.sneakyThrow(_e);
+ }
+ }
+
+ private String readError(final InputStream inputStream, final boolean printOutput) {
+ try {
+ String _xblockexpression = null;
+ {
+ InputStreamReader _inputStreamReader = new InputStreamReader(inputStream);
+ final BufferedReader bufferedReader = new BufferedReader(_inputStreamReader);
+ String _xtrycatchfinallyexpression = null;
+ try {
+ String _xblockexpression_1 = null;
+ {
+ final ArrayList lines = CollectionLiterals.newArrayList();
+ String line = null;
+ while (((line = bufferedReader.readLine()) != null)) {
+ {
+ if (printOutput) {
+ System.err.println(line);
+ }
+ lines.add(line);
+ }
+ }
+ _xblockexpression_1 = IterableExtensions.join(lines, "\n");
+ }
+ _xtrycatchfinallyexpression = _xblockexpression_1;
+ } finally {
+ bufferedReader.close();
+ }
+ _xblockexpression = _xtrycatchfinallyexpression;
+ }
+ return _xblockexpression;
+ } catch (Throwable _e) {
+ throw Exceptions.sneakyThrow(_e);
+ }
+ }
+
+ private ReliabilityResult.Unknown interpretExitStatus(final int exitValue, final String error) {
+ ReliabilityResult.Unknown _switchResult = null;
+ boolean _matched = false;
+ if (Objects.equal(exitValue, StormDftHandler.STORM_GENERAL_ERROR)) {
+ _matched=true;
+ throw new StormDftException(("Storm error: " + error));
+ }
+ if (!_matched) {
+ if (Objects.equal(exitValue, StormDftHandler.STORM_TIMEOUT)) {
+ _matched=true;
+ }
+ if (!_matched) {
+ int _intValue = Signal.SIGXCPU.intValue();
+ int _plus = (StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET + _intValue);
+ if (Objects.equal(exitValue, _plus)) {
+ _matched=true;
+ }
+ }
+ if (_matched) {
+ _switchResult = ReliabilityResult.TIMEOUT;
+ }
+ }
+ if (!_matched) {
+ if (Objects.equal(exitValue, StormDftHandler.STORM_MEMOUT)) {
+ _matched=true;
+ }
+ if (!_matched) {
+ int _intValue_1 = Signal.SIGXFSZ.intValue();
+ int _plus_1 = (StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET + _intValue_1);
+ if (Objects.equal(exitValue, _plus_1)) {
+ _matched=true;
+ }
+ }
+ if (_matched) {
+ _switchResult = ReliabilityResult.MEMOUT;
+ }
+ }
+ if (!_matched) {
+ {
+ if ((exitValue > StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET)) {
+ final int signalNumber = (exitValue - StormDftHandler.SIGNAL_EXIT_VALUE_OFFSET);
+ final Function1 _function = (Signal it) -> {
+ int _intValue_2 = it.intValue();
+ return Boolean.valueOf((_intValue_2 == signalNumber));
+ };
+ final Signal signal = IterableExtensions.findFirst(((Iterable)Conversions.doWrapArray(Signal.values())), _function);
+ if ((signal != null)) {
+ throw new StormDftException(((("Storm unexpectedly killed by signal " + signal) + ": ") + error));
+ }
+ }
+ throw new StormDftException(((("Storm unexpectedly exit with status " + Integer.valueOf(exitValue)) + ": ") + error));
+ }
+ }
+ return _switchResult;
+ }
+}
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftSolver.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftSolver.java
new file mode 100644
index 00000000..491e7fc1
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/StormDftSolver.java
@@ -0,0 +1,79 @@
+package hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver;
+
+import com.google.common.base.Objects;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FaultTree;
+import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ReliabilityModel;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.ft2galileo.Ft2GalileoTransformation;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.FtAnalysisObjective;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.ReliabilityResult;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.StormDftConfiguration;
+import hu.bme.mit.inf.dslreasoner.faulttree.transformation.solver.StormDftHandler;
+import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace;
+
+@SuppressWarnings("all")
+public class StormDftSolver {
+ private static final String DFT_FILE_NAME = "ft.dft";
+
+ private final Ft2GalileoTransformation ft2Galileo = new Ft2GalileoTransformation();
+
+ private final StormDftHandler handler = new StormDftHandler();
+
+ public ReliabilityResult solve(final ReliabilityModel reliabilityModel, final StormDftConfiguration configuration, final ReasonerWorkspace reasonerWorkspace) {
+ ReliabilityResult _switchResult = null;
+ boolean _matched = false;
+ if (reliabilityModel instanceof FaultTree) {
+ _matched=true;
+ _switchResult = this.solve(((FaultTree)reliabilityModel), configuration, reasonerWorkspace);
+ }
+ if (!_matched) {
+ if (reliabilityModel instanceof ConstantModel) {
+ _matched=true;
+ ReliabilityResult.Solution _xblockexpression = null;
+ {
+ double _xifexpression = (double) 0;
+ boolean _isFailed = ((ConstantModel)reliabilityModel).isFailed();
+ if (_isFailed) {
+ _xifexpression = 0;
+ } else {
+ double _switchResult_1 = (double) 0;
+ final FtAnalysisObjective objective = configuration.objective;
+ boolean _matched_1 = false;
+ if (Objects.equal(objective, FtAnalysisObjective.MTTF)) {
+ _matched_1=true;
+ _switchResult_1 = Double.POSITIVE_INFINITY;
+ }
+ if (!_matched_1) {
+ if (objective instanceof FtAnalysisObjective.TimeBound) {
+ _matched_1=true;
+ _switchResult_1 = 1;
+ }
+ }
+ if (!_matched_1) {
+ throw new IllegalArgumentException(("Unknown objective: " + objective));
+ }
+ _xifexpression = _switchResult_1;
+ }
+ final double result = _xifexpression;
+ _xblockexpression = new ReliabilityResult.Solution(result);
+ }
+ _switchResult = _xblockexpression;
+ }
+ }
+ if (!_matched) {
+ throw new IllegalArgumentException(("Unknown reliability model: " + reliabilityModel));
+ }
+ return _switchResult;
+ }
+
+ public ReliabilityResult solve(final FaultTree faultTree, final StormDftConfiguration configuration, final ReasonerWorkspace reasonerWorkspace) {
+ ReliabilityResult _xblockexpression = null;
+ {
+ final CharSequence galileo = this.ft2Galileo.toGalileo(faultTree);
+ reasonerWorkspace.writeText(StormDftSolver.DFT_FILE_NAME, galileo);
+ final String dftFilePath = reasonerWorkspace.getFile(StormDftSolver.DFT_FILE_NAME).getAbsolutePath();
+ _xblockexpression = this.handler.callSolver(dftFilePath, configuration);
+ }
+ return _xblockexpression;
+ }
+}
--
cgit v1.2.3-70-g09d2