From 2f99ce37e5380c8e53fb3515cc2bc5d48bd3d7fd Mon Sep 17 00:00:00 2001
From: Kristóf Marussy
Date: Fri, 11 Jan 2019 15:41:57 +0100
Subject: Build with Eclipse 2018.12, generated files change
---
.../META-INF/MANIFEST.MF | 44 +++++++++---------
.../plugin.xml | 52 +++++++++++-----------
2 files changed, 48 insertions(+), 48 deletions(-)
(limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model')
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF
index 8e1bba03..338e8c09 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/META-INF/MANIFEST.MF
@@ -7,29 +7,29 @@ Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: hu.bme.mit.inf.dslreasoner.logic.model.builder,
- hu.bme.mit.inf.dslreasoner.logic.model.builder.consistencychecker,
- hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage,
- hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl,
- hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.util,
- hu.bme.mit.inf.dslreasoner.logic.model.logicproblem,
- hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.impl,
- hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.util,
- hu.bme.mit.inf.dslreasoner.logic.model.logicresult,
- hu.bme.mit.inf.dslreasoner.logic.model.logicresult.impl,
- hu.bme.mit.inf.dslreasoner.logic.model.logicresult.util,
- hu.bme.mit.inf.dslreasoner.logic.model.patterns,
- hu.bme.mit.inf.dslreasoner.logic.model.statistics,
- hu.bme.mit.inf.dslreasoner.util,
- hu.bme.mit.inf.dslreasoner.workspace
+ hu.bme.mit.inf.dslreasoner.logic.model.builder.consistencychecker,
+ hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage,
+ hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.impl,
+ hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.util,
+ hu.bme.mit.inf.dslreasoner.logic.model.logicproblem,
+ hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.impl,
+ hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.util,
+ hu.bme.mit.inf.dslreasoner.logic.model.logicresult,
+ hu.bme.mit.inf.dslreasoner.logic.model.logicresult.impl,
+ hu.bme.mit.inf.dslreasoner.logic.model.logicresult.util,
+ hu.bme.mit.inf.dslreasoner.logic.model.patterns,
+ hu.bme.mit.inf.dslreasoner.logic.model.statistics,
+ hu.bme.mit.inf.dslreasoner.util,
+ hu.bme.mit.inf.dslreasoner.workspace
Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.ecore;visibility:=reexport,
- com.google.guava,
- org.eclipse.xtend.lib,
- org.eclipse.xtext.xbase.lib,
- org.eclipse.core.resources;bundle-version="3.8.101",
- org.eclipse.viatra.query.runtime;bundle-version="1.3.0",
- org.apache.commons.lang;bundle-version="2.6.0",
- org.eclipse.emf.ecore.xmi;bundle-version="2.13.0"
+ org.eclipse.emf.ecore;visibility:=reexport,
+ com.google.guava,
+ org.eclipse.xtend.lib,
+ org.eclipse.xtext.xbase.lib,
+ org.eclipse.core.resources;bundle-version="3.8.101",
+ org.eclipse.viatra.query.runtime;bundle-version="1.3.0",
+ org.apache.commons.lang;bundle-version="2.6.0",
+ org.eclipse.emf.ecore.xmi;bundle-version="2.13.0"
Import-Package: org.apache.log4j
Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.logic.model
Bundle-ActivationPolicy: lazy
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/plugin.xml b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/plugin.xml
index 413002e2..bad09614 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/plugin.xml
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/plugin.xml
@@ -1,27 +1,27 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+-->
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--
cgit v1.2.3-70-g09d2
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
---
.../.ApplicationConfigurationIdeModule.xtendbin | Bin 1701 -> 1701 bytes
.../ide/.ApplicationConfigurationIdeSetup.xtendbin | Bin 2526 -> 2526 bytes
.../plugin.xml | 12 +-
.../logic/model/builder/LogicSolver.xtend | 6 +-
.../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 ++++
108 files changed, 4251 insertions(+), 704 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 'Framework/hu.bme.mit.inf.dslreasoner.logic.model')
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin
index 879d3171..d13742f9 100644
Binary files a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin and b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin differ
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin
index 1583d4f9..dc0a79cc 100644
Binary files a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin and b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin differ
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ui/plugin.xml b/Application/hu.bme.mit.inf.dslreasoner.application.ui/plugin.xml
index 099d6993..304df098 100644
--- a/Application/hu.bme.mit.inf.dslreasoner.application.ui/plugin.xml
+++ b/Application/hu.bme.mit.inf.dslreasoner.application.ui/plugin.xml
@@ -419,12 +419,20 @@
point="org.eclipse.ui.menus">
+ locationURI="popup:hu.bme.mit.inf.dslreasoner.application.ui.menu">
+
+
+
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend
index f1d410d8..d88e2a52 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend
@@ -34,7 +34,7 @@ public class LogicReasonerException extends Exception {
}
}
-abstract class LogicSolverConfiguration {
+abstract class SolverConfiguration {
public static val Unlimited = -1;
public static val String UndefinedPath = null
@@ -42,7 +42,7 @@ abstract class LogicSolverConfiguration {
public String solverPath = UndefinedPath
/** Max runtime limit in seconds. */
public int runtimeLimit = Unlimited
- /** Max runtime limit in seconds. */
+ /** Max memory limit in megabytes. */
public int memoryLimit = Unlimited
/** Documentation level of the solver. */
public DocumentationLevel documentationLevel = DocumentationLevel::NONE
@@ -52,7 +52,9 @@ abstract class LogicSolverConfiguration {
* or via a listener registered by {@link progressMonitor.addCancelListener}
*/
public SolverProgressMonitor progressMonitor = new NullSolverProgressMonitor
+}
+abstract class LogicSolverConfiguration extends SolverConfiguration {
public var TypeScopes typeScopes = new TypeScopes;
public var SolutionScope solutionScope = new SolutionScope
}
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
From 3f9b1c92cc35fa4ed9672a2b8601f4c22af24921 Mon Sep 17 00:00:00 2001
From: Kristóf Marussy
Date: Sun, 7 Apr 2019 13:46:36 +0200
Subject: Infrastructure for objective functions
---
.../.ApplicationConfigurationIdeModule.xtendbin | Bin 1701 -> 1701 bytes
.../ide/.ApplicationConfigurationIdeSetup.xtendbin | Bin 2526 -> 2526 bytes
.../execution/GenerationTaskExecutor.xtend | 2 +-
.../application/execution/SolverLoader.xtend | 2 +-
.../ApplicationConfigurationScopeProvider.xtend | 2 +-
.../logic/model/builder/LogicSolver.xtend | 2 +-
.../dlsreasoner/alloy/reasoner/AlloySolver.xtend | 2 +-
.../alloy/reasoner/builder/AlloyHandler.xtend | 6 +-
.../MultiplicityGoalConstraintCalculator.xtend | 10 +-
.../viatrasolver/reasoner/ViatraReasoner.xtend | 188 +++++++++++----------
.../reasoner/ViatraReasonerConfiguration.xtend | 12 +-
.../dse/BestFirstStrategyForModelGeneration.java | 57 +++----
.../viatrasolver/reasoner/dse/DseUtils.xtend | 65 +++++++
.../reasoner/dse/IThreeValuedObjective.xtend | 10 ++
.../reasoner/dse/LoggerSolutionFoundHandler.xtend | 24 +++
.../dse/ModelGenerationCompositeObjective.xtend | 77 +++++----
.../viatrasolver/reasoner/dse/SolutionCopier.xtend | 74 ++++++++
.../reasoner/dse/SolutionStoreWithCopy.xtend | 52 ------
.../SurelyViolatedObjectiveGlobalConstraint.xtend | 29 ++++
.../dse/UnfinishedMultiplicityObjective.xtend | 2 +-
.../reasoner/dse/UnfinishedWFObjective.xtend | 56 ------
.../reasoner/dse/ViatraReasonerSolutionSaver.xtend | 99 +++++++++++
.../reasoner/dse/WF2ObjectiveConverter.xtend | 44 +++--
.../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
.../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 9417 -> 9417 bytes
.../validation/.CftLanguageValidator.xtendbin | Bin 1760 -> 1760 bytes
.../faulttree/model/util/.CftExtensions.xtendbin | Bin 4295 -> 4295 bytes
.../cft2ft/.Cft2FtTransformation.xtendbin | Bin 2825 -> 2825 bytes
.../cft2ft/.EventCollection.xtendbin | Bin 7022 -> 7022 bytes
.../cft2ft/.EventMaterializer.xtendbin | Bin 12110 -> 12110 bytes
.../cft2ft/.FaultTreeBuilder.xtendbin | Bin 4029 -> 4029 bytes
.../ecore2cft/.ComponentFaultTreeTrace.xtendbin | Bin 5530 -> 5530 bytes
.../ecore2cft/.ComponentInstanceTrace.xtendbin | Bin 5932 -> 5932 bytes
.../ecore2cft/.ComponentNameGenerator.xtendbin | Bin 3472 -> 3472 bytes
.../ecore2cft/.Ecore2CftTransformation.xtendbin | Bin 3431 -> 3431 bytes
.../transformation/ecore2cft/.InputTrace.xtendbin | Bin 4202 -> 4202 bytes
.../ecore2cft/.LookupHandler.xtendbin | Bin 5169 -> 5169 bytes
.../ecore2cft/.MappingHandler.xtendbin | Bin 6876 -> 6876 bytes
.../ecore2cft/.MappingQueries.xtendbin | Bin 4833 -> 4833 bytes
.../ft2galileo/.Ft2GalileoTransformation.xtendbin | Bin 4794 -> 4794 bytes
.../solver/.ReliabilityResult.xtendbin | Bin 5435 -> 5435 bytes
.../solver/.StormDftConfiguration.xtendbin | Bin 4311 -> 4311 bytes
.../solver/.StormDftHandler.xtendbin | Bin 13570 -> 13570 bytes
.../transformation/solver/.StormDftSolver.xtendbin | Bin 4801 -> 4801 bytes
.../bin/.gitignore | 1 +
.../configs/generation.vsconfig | 2 +-
63 files changed, 514 insertions(+), 304 deletions(-)
create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/DseUtils.xtend
create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/IThreeValuedObjective.xtend
create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/LoggerSolutionFoundHandler.xtend
create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionCopier.xtend
delete mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionStoreWithCopy.xtend
create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SurelyViolatedObjectiveGlobalConstraint.xtend
delete mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend
create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend
create mode 100644 Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/bin/.gitignore
(limited to 'Framework/hu.bme.mit.inf.dslreasoner.logic.model')
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin
index 213b9134..ba53fa44 100644
Binary files a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin and b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin differ
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin
index 21d26265..81608794 100644
Binary files a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin and b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin differ
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend
index 3e879539..35ffaf65 100644
--- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend
+++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/GenerationTaskExecutor.xtend
@@ -138,7 +138,7 @@ class GenerationTaskExecutor {
// 5.2 set values that defined directly
solverConfig.solutionScope = new SolutionScope => [
- it.numberOfRequiredSolution = if(task.numberSpecified) {
+ it.numberOfRequiredSolutions = if(task.numberSpecified) {
task.number
} else {
1
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend
index a9573fbf..9eceef5f 100644
--- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend
+++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend
@@ -75,7 +75,7 @@ class SolverLoader {
]
} else if(solver === Solver::VIATRA_SOLVER) {
return new ViatraReasonerConfiguration => [c|
- c.debugCongiguration.partialInterpretatioVisualiser = new GraphvizVisualiser
+ c.debugConfiguration.partialInterpretatioVisualiser = new GraphvizVisualiser
if(config.containsKey("diversity-range")) {
val stringValue = config.get("diversity-range")
try{
diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend
index 9d7e8aec..4daf9831 100644
--- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend
+++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/scoping/ApplicationConfigurationScopeProvider.xtend
@@ -10,6 +10,7 @@ import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.EPackageI
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelElement
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.MetamodelEntry
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.PatternEntry
+import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ReliabilityObjectiveFunction
import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ViatraImport
import hu.bme.mit.inf.dslreasoner.faulttree.components.cftLanguage.CftModel
import org.eclipse.emf.ecore.EClass
@@ -22,7 +23,6 @@ import org.eclipse.xtext.naming.IQualifiedNameConverter
import org.eclipse.xtext.scoping.Scopes
import static hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ApplicationConfigurationPackage.Literals.*
-import hu.bme.mit.inf.dslreasoner.application.applicationConfiguration.ReliabilityObjectiveFunction
/**
* This class contains custom scoping description.
diff --git a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend
index d88e2a52..e62a3cb7 100644
--- a/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend
+++ b/Framework/hu.bme.mit.inf.dslreasoner.logic.model/src/hu/bme/mit/inf/dslreasoner/logic/model/builder/LogicSolver.xtend
@@ -159,7 +159,7 @@ public class TypeScopes {
*/
public class SolutionScope {
public static val All = Integer.MAX_VALUE;
- public var numberOfRequiredSolution = 1
+ public var numberOfRequiredSolutions = 1
}
/** Progress monitor class for a solver to
* (optionally) report progress via {@link worked}
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloySolver.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloySolver.xtend
index 432651af..ceb78e99 100644
--- a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloySolver.xtend
+++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/AlloySolver.xtend
@@ -57,7 +57,7 @@ class AlloySolver extends LogicReasoner{
val result2 = handler.callSolver(alloyProblem,workspace,alloyConfig,alloyCode)
alloyConfig.progressMonitor.workedSearchFinished
- val logicResult = backwardMapper.transformOutput(problem,configuration.solutionScope.numberOfRequiredSolution,result2,forwardTrace,transformationTime)
+ val logicResult = backwardMapper.transformOutput(problem,configuration.solutionScope.numberOfRequiredSolutions,result2,forwardTrace,transformationTime)
alloyConfig.progressMonitor.workedBackwardTransformationFinished
//val solverFinish = System.currentTimeMillis-solverStart
// Finish: Solving Alloy problem
diff --git a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend
index ebbca624..033ced04 100644
--- a/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend
+++ b/Solvers/Alloy-Solver/hu.bme.mit.inf.dlsreasoner.alloy.reasoner/src/hu/bme/mit/inf/dlsreasoner/alloy/reasoner/builder/AlloyHandler.xtend
@@ -184,7 +184,7 @@ class AlloyCallerWithTimeout implements Callable>>{
} else {
lastAnswer = lastAnswer.next
}
- configuration.progressMonitor.workedBackwardTransformation(configuration.solutionScope.numberOfRequiredSolution)
+ configuration.progressMonitor.workedBackwardTransformation(configuration.solutionScope.numberOfRequiredSolutions)
val runtime = System.currentTimeMillis -startTime
synchronized(this) {
@@ -201,8 +201,8 @@ class AlloyCallerWithTimeout implements Callable>>{
}
def hasEnoughSolution(List> answers) {
- if(configuration.solutionScope.numberOfRequiredSolution < 0) return false
- else return answers.size() == configuration.solutionScope.numberOfRequiredSolution
+ if(configuration.solutionScope.numberOfRequiredSolutions < 0) return false
+ else return answers.size() == configuration.solutionScope.numberOfRequiredSolutions
}
public def getPartialAnswers() {
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/MultiplicityGoalConstraintCalculator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/MultiplicityGoalConstraintCalculator.xtend
index e05160d0..4b9629df 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/MultiplicityGoalConstraintCalculator.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/MultiplicityGoalConstraintCalculator.xtend
@@ -11,28 +11,28 @@ class MultiplicityGoalConstraintCalculator {
val IQuerySpecification> querySpecification;
var ViatraQueryMatcher> matcher;
- public new(String targetRelationName, IQuerySpecification> querySpecification) {
+ new(String targetRelationName, IQuerySpecification> querySpecification) {
this.targetRelationName = targetRelationName
this.querySpecification = querySpecification
this.matcher = null
}
- public new(MultiplicityGoalConstraintCalculator other) {
+ new(MultiplicityGoalConstraintCalculator other) {
this.targetRelationName = other.targetRelationName
this.querySpecification = other.querySpecification
this.matcher = null
}
- def public getName() {
+ def getName() {
targetRelationName
}
- def public init(Notifier notifier) {
+ def init(Notifier notifier) {
val engine = ViatraQueryEngine.on(new EMFScope(notifier))
matcher = querySpecification.getMatcher(engine)
}
- def public calculateValue() {
+ def calculateValue() {
var res = 0
val allMatches = this.matcher.allMatches
for(match : allMatches) {
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend
index 6639e5f3..8831b0ff 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend
@@ -17,11 +17,13 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par
import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.IdentifierBasedStateCoderFactory
import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.NeighbourhoodBasedStateCoderFactory
import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.BestFirstStrategyForModelGeneration
+import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.LoggerSolutionFoundHandler
import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.ModelGenerationCompositeObjective
import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.PartialModelAsLogicInterpretation
import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.ScopeObjective
+import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.SurelyViolatedObjectiveGlobalConstraint
import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.UnfinishedMultiplicityObjective
-import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.UnfinishedWFObjective
+import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.ViatraReasonerSolutionSaver
import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.WF2ObjectiveConverter
import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace
import java.util.List
@@ -31,44 +33,41 @@ import org.eclipse.viatra.dse.api.DesignSpaceExplorer
import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel
import org.eclipse.viatra.dse.solutionstore.SolutionStore
import org.eclipse.viatra.dse.statecode.IStateCoderFactory
-import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.SolutionStoreWithDiversityDescriptor
-import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.DiversityGranularity
-class ViatraReasoner extends LogicReasoner{
+class ViatraReasoner extends LogicReasoner {
val PartialInterpretationInitialiser initialiser = new PartialInterpretationInitialiser()
val ModelGenerationMethodProvider modelGenerationMethodProvider = new ModelGenerationMethodProvider
- val extension LogicresultFactory factory = LogicresultFactory.eINSTANCE
+ val extension LogicresultFactory factory = LogicresultFactory.eINSTANCE
val WF2ObjectiveConverter wf2ObjectiveConverter = new WF2ObjectiveConverter
-
-
- override solve(LogicProblem problem, LogicSolverConfiguration configuration, ReasonerWorkspace workspace) throws LogicReasonerException {
+
+ override solve(LogicProblem problem, LogicSolverConfiguration configuration,
+ ReasonerWorkspace workspace) throws LogicReasonerException {
val viatraConfig = configuration.asConfig
-
- if(viatraConfig.debugCongiguration.logging) {
+
+ if (viatraConfig.debugConfiguration.logging) {
DesignSpaceExplorer.turnOnLogging(DseLoggingLevel.VERBOSE_FULL)
} else {
DesignSpaceExplorer.turnOnLogging(DseLoggingLevel.WARN)
}
-
+
val DesignSpaceExplorer dse = new DesignSpaceExplorer();
-
+
dse.addMetaModelPackage(LogiclanguagePackage.eINSTANCE)
dse.addMetaModelPackage(LogicproblemPackage.eINSTANCE)
dse.addMetaModelPackage(PartialinterpretationPackage.eINSTANCE)
-
+
val transformationStartTime = System.nanoTime
-
-
-
- val emptySolution = initialiser.initialisePartialInterpretation(problem,viatraConfig.typeScopes).output
- if((viatraConfig.documentationLevel == DocumentationLevel::FULL || viatraConfig.documentationLevel == DocumentationLevel::NORMAL) && workspace !== null) {
- workspace.writeModel(emptySolution,"init.partialmodel")
- }
+
+ val emptySolution = initialiser.initialisePartialInterpretation(problem, viatraConfig.typeScopes).output
+ if ((viatraConfig.documentationLevel == DocumentationLevel::FULL ||
+ viatraConfig.documentationLevel == DocumentationLevel::NORMAL) && workspace !== null) {
+ workspace.writeModel(emptySolution, "init.partialmodel")
+ }
emptySolution.problemConainer = problem
-
+
val ScopePropagator scopePropagator = new ScopePropagator(emptySolution)
- scopePropagator.propagateAllScopeConstraints
-
+ scopePropagator.propagateAllScopeConstraints
+
val method = modelGenerationMethodProvider.createModelGenerationMethod(
problem,
emptySolution,
@@ -78,138 +77,151 @@ class ViatraReasoner extends LogicReasoner{
scopePropagator,
viatraConfig.documentationLevel
)
-
+
dse.addObjective(new ModelGenerationCompositeObjective(
new ScopeObjective,
method.unfinishedMultiplicities.map[new UnfinishedMultiplicityObjective(it)],
- new UnfinishedWFObjective(method.unfinishedWF)
+ wf2ObjectiveConverter.createCompletenessObjective(method.unfinishedWF)
))
- dse.addGlobalConstraint(wf2ObjectiveConverter.createInvalidationObjective(method.invalidWF))
- for(additionalConstraint : viatraConfig.searchSpaceConstraints.additionalGlobalConstraints) {
+ val solutionStore = new SolutionStore(configuration.solutionScope.numberOfRequiredSolutions)
+ solutionStore.registerSolutionFoundHandler(new LoggerSolutionFoundHandler(viatraConfig))
+ val solutionSaver = new ViatraReasonerSolutionSaver(newArrayOfSize(0, 0))
+ val solutionCopier = solutionSaver.solutionCopier
+ solutionStore.withSolutionSaver(solutionSaver)
+ dse.solutionStore = solutionStore
+
+ dse.addGlobalConstraint(wf2ObjectiveConverter.createInvalidationGlobalConstraint(method.invalidWF))
+ dse.addGlobalConstraint(new SurelyViolatedObjectiveGlobalConstraint(solutionSaver))
+ for (additionalConstraint : viatraConfig.searchSpaceConstraints.additionalGlobalConstraints) {
dse.addGlobalConstraint(additionalConstraint.apply(method))
}
-
- dse.setInitialModel(emptySolution,false)
-
- val IStateCoderFactory statecoder = if(viatraConfig.stateCoderStrategy == StateCoderStrategy.Neighbourhood) {
- new NeighbourhoodBasedStateCoderFactory
- } else {
- new IdentifierBasedStateCoderFactory
- }
+
+ dse.setInitialModel(emptySolution, false)
+
+ val IStateCoderFactory statecoder = if (viatraConfig.stateCoderStrategy == StateCoderStrategy.Neighbourhood) {
+ new NeighbourhoodBasedStateCoderFactory
+ } else {
+ new IdentifierBasedStateCoderFactory
+ }
dse.stateCoderFactory = statecoder
-
+
dse.maxNumberOfThreads = 1
-
- val solutionStore = new SolutionStore(configuration.solutionScope.numberOfRequiredSolution)
- dse.solutionStore = solutionStore
-
- for(rule : method.relationRefinementRules) {
+
+ for (rule : method.relationRefinementRules) {
dse.addTransformationRule(rule)
}
- for(rule : method.objectRefinementRules) {
+ for (rule : method.objectRefinementRules) {
dse.addTransformationRule(rule)
}
-
- val strategy = new BestFirstStrategyForModelGeneration(workspace,viatraConfig,method)
+
+ val strategy = new BestFirstStrategyForModelGeneration(workspace, viatraConfig, method)
viatraConfig.progressMonitor.workedForwardTransformation
-
+
val transformationTime = System.nanoTime - transformationStartTime
val solverStartTime = System.nanoTime
-
+
var boolean stoppedByTimeout
- var boolean stoppedByException
- try{
- stoppedByTimeout = dse.startExplorationWithTimeout(strategy,configuration.runtimeLimit*1000);
- stoppedByException = false
+ try {
+ stoppedByTimeout = dse.startExplorationWithTimeout(strategy, configuration.runtimeLimit * 1000);
} catch (NullPointerException npe) {
stoppedByTimeout = false
- stoppedByException = true
}
val solverTime = System.nanoTime - solverStartTime
viatraConfig.progressMonitor.workedSearchFinished
-
- //additionalMatches = strategy.solutionStoreWithCopy.additionalMatches
+
+ // additionalMatches = strategy.solutionStoreWithCopy.additionalMatches
val statistics = createStatistics => [
- //it.solverTime = viatraConfig.runtimeLimit
- it.solverTime = (solverTime/1000000) as int
- it.transformationTime = (transformationTime/1000000) as int
- for(x : 0.. [
- it.name = '''_Solution«x»FoundAt'''
- it.value = (strategy.solutionStoreWithCopy.allRuntimes.get(x)/1000000) as int
+ it.name = '''_Solution«pair.key»FoundAt'''
+ it.value = (pair.value / 1000000) as int
]
}
it.entries += createIntStatisticEntry => [
- it.name = "TransformationExecutionTime" it.value = (method.statistics.transformationExecutionTime/1000000) as int
+ it.name = "TransformationExecutionTime"
+ it.value = (method.statistics.transformationExecutionTime / 1000000) as int
]
it.entries += createIntStatisticEntry => [
- it.name = "TypeAnalysisTime" it.value = (method.statistics.PreliminaryTypeAnalisisTime/1000000) as int
+ it.name = "TypeAnalysisTime"
+ it.value = (method.statistics.PreliminaryTypeAnalisisTime / 1000000) as int
]
it.entries += createIntStatisticEntry => [
- it.name = "StateCoderTime" it.value = (statecoder.runtime/1000000) as int
+ it.name = "StateCoderTime"
+ it.value = (statecoder.runtime / 1000000) as int
]
it.entries += createIntStatisticEntry => [
- it.name = "StateCoderFailCount" it.value = strategy.numberOfStatecoderFail
+ it.name = "StateCoderFailCount"
+ it.value = strategy.numberOfStatecoderFail
]
it.entries += createIntStatisticEntry => [
- it.name = "SolutionCopyTime" it.value = (strategy.solutionStoreWithCopy.sumRuntime/1000000) as int
+ it.name = "SolutionCopyTime"
+ it.value = (solutionCopier.getTotalCopierRuntime / 1000000) as int
]
- if(strategy.solutionStoreWithDiversityDescriptor.isActive) {
+ if (strategy.solutionStoreWithDiversityDescriptor.isActive) {
it.entries += createIntStatisticEntry => [
- it.name = "SolutionDiversityCheckTime" it.value = (strategy.solutionStoreWithDiversityDescriptor.sumRuntime/1000000) as int
+ it.name = "SolutionDiversityCheckTime"
+ it.value = (strategy.solutionStoreWithDiversityDescriptor.sumRuntime / 1000000) as int
]
it.entries += createRealStatisticEntry => [
- it.name = "SolutionDiversitySuccessRate" it.value = strategy.solutionStoreWithDiversityDescriptor.successRate
+ it.name = "SolutionDiversitySuccessRate"
+ it.value = strategy.solutionStoreWithDiversityDescriptor.successRate
]
}
]
-
+
viatraConfig.progressMonitor.workedBackwardTransformationFinished
-
- if(stoppedByTimeout) {
- return createInsuficientResourcesResult=>[
+
+ if (stoppedByTimeout) {
+ return createInsuficientResourcesResult => [
it.problem = problem
- it.resourceName="time"
- it.representation += strategy.solutionStoreWithCopy.solutions
+ it.resourceName = "time"
+ it.representation += solutionCopier.getPartialInterpretations(true)
it.statistics = statistics
]
} else {
- if(solutionStore.solutions.empty) {
+ if (solutionStore.solutions.empty) {
return createInconsistencyResult => [
it.problem = problem
- it.representation += strategy.solutionStoreWithCopy.solutions
+ it.representation += solutionCopier.getPartialInterpretations(true)
it.statistics = statistics
]
} else {
return createModelResult => [
it.problem = problem
- it.trace = strategy.solutionStoreWithCopy.copyTraces
- it.representation += strategy.solutionStoreWithCopy.solutions
+ it.trace = solutionCopier.getTraces(true)
+ it.representation += solutionCopier.getPartialInterpretations(true)
it.statistics = statistics
]
}
}
}
- private def dispatch long runtime(NeighbourhoodBasedStateCoderFactory sc) {
- sc.sumStatecoderRuntime
- }
+ private def dispatch long runtime(NeighbourhoodBasedStateCoderFactory sc) {
+ sc.sumStatecoderRuntime
+ }
- private def dispatch long runtime(IdentifierBasedStateCoderFactory sc) {
- sc.sumStatecoderRuntime
- }
+ private def dispatch long runtime(IdentifierBasedStateCoderFactory sc) {
+ sc.sumStatecoderRuntime
+ }
override getInterpretations(ModelResult modelResult) {
- val indexes = 0..>;
- val res = indexes.map[i | new PartialModelAsLogicInterpretation(modelResult.representation.get(i) as PartialInterpretation,traces.get(i))].toList
+ val res = indexes.map [ i |
+ new PartialModelAsLogicInterpretation(modelResult.representation.get(i) as PartialInterpretation,
+ traces.get(i))
+ ].toList
return res
}
-
+
private def ViatraReasonerConfiguration asConfig(LogicSolverConfiguration configuration) {
- if(configuration instanceof ViatraReasonerConfiguration) {
+ if (configuration instanceof ViatraReasonerConfiguration) {
return configuration
- } else throw new IllegalArgumentException('''Wrong configuration. Expected: «ViatraReasonerConfiguration.name», but got: «configuration.class.name»"''')
+ } else
+ throw new IllegalArgumentException('''Wrong configuration. Expected: «ViatraReasonerConfiguration.name», but got: «configuration.class.name»"''')
}
}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend
index c4d7e231..9ef23c59 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend
@@ -12,7 +12,7 @@ import java.util.List
import java.util.Set
import org.eclipse.xtext.xbase.lib.Functions.Function1
-public enum StateCoderStrategy {
+enum StateCoderStrategy {
Neighbourhood, NeighbourhoodWithEquivalence, IDBased, DefinedByDiversity
}
@@ -40,14 +40,14 @@ class ViatraReasonerConfiguration extends LogicSolverConfiguration{
/**
* Configuration for debugging support.
*/
- public var DebugConfiguration debugCongiguration = new DebugConfiguration
+ public var DebugConfiguration debugConfiguration = new DebugConfiguration
/**
* Configuration for cutting search space.
*/
public var SearchSpaceConstraint searchSpaceConstraints = new SearchSpaceConstraint
}
-public class DiversityDescriptor {
+class DiversityDescriptor {
public var ensureDiversity = false
public static val FixPointRange = -1
public var int range = FixPointRange
@@ -57,19 +57,19 @@ public class DiversityDescriptor {
public var Set relevantRelations = null
}
-public class DebugConfiguration {
+class DebugConfiguration {
public var logging = false
public var PartialInterpretationVisualiser partialInterpretatioVisualiser = null;
public var partalInterpretationVisualisationFrequency = 1
}
-public class InternalConsistencyCheckerConfiguration {
+class InternalConsistencyCheckerConfiguration {
public var LogicReasoner internalIncosnsitencyDetector = null
public var LogicSolverConfiguration internalInconsistencDetectorConfiguration = null
public var incternalConsistencyCheckingFrequency = 1
}
-public class SearchSpaceConstraint {
+class SearchSpaceConstraint {
public static val UNLIMITED_MAXDEPTH = Integer.MAX_VALUE
public var int maxDepth = UNLIMITED_MAXDEPTH
public var List> additionalGlobalConstraints = new LinkedList
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java
index 60f46033..1234d54b 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java
@@ -75,7 +75,6 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
// Running
private PriorityQueue trajectoiresToExplore;
private SolutionStore solutionStore;
- private SolutionStoreWithCopy solutionStoreWithCopy;
private SolutionStoreWithDiversityDescriptor solutionStoreWithDiversityDescriptor;
private volatile boolean isInterrupted = false;
private ModelResult modelResultByInternalSolver = null;
@@ -97,9 +96,6 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
this.method = method;
}
- public SolutionStoreWithCopy getSolutionStoreWithCopy() {
- return solutionStoreWithCopy;
- }
public SolutionStoreWithDiversityDescriptor getSolutionStoreWithDiversityDescriptor() {
return solutionStoreWithDiversityDescriptor;
}
@@ -121,7 +117,6 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
matchers.add(matcher);
}
- this.solutionStoreWithCopy = new SolutionStoreWithCopy();
this.solutionStoreWithDiversityDescriptor = new SolutionStoreWithDiversityDescriptor(configuration.diversityRequirement);
final ObjectiveComparatorHelper objectiveComparatorHelper = context.getObjectiveComparatorHelper();
@@ -146,13 +141,13 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
return;
}
- final Fitness firstFittness = context.calculateFitness();
- checkForSolution(firstFittness);
+ final Fitness firstfitness = context.calculateFitness();
+ checkForSolution(firstfitness);
final ObjectiveComparatorHelper objectiveComparatorHelper = context.getObjectiveComparatorHelper();
final Object[] firstTrajectory = context.getTrajectory().toArray(new Object[0]);
- TrajectoryWithFitness currentTrajectoryWithFittness = new TrajectoryWithFitness(firstTrajectory, firstFittness);
- trajectoiresToExplore.add(currentTrajectoryWithFittness);
+ TrajectoryWithFitness currentTrajectoryWithfitness = new TrajectoryWithFitness(firstTrajectory, firstfitness);
+ trajectoiresToExplore.add(currentTrajectoryWithfitness);
//if(configuration)
visualiseCurrentState();
@@ -167,22 +162,22 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
mainLoop: while (!isInterrupted && !configuration.progressMonitor.isCancelled()) {
- if (currentTrajectoryWithFittness == null) {
+ if (currentTrajectoryWithfitness == null) {
if (trajectoiresToExplore.isEmpty()) {
logger.debug("State space is fully traversed.");
return;
} else {
- currentTrajectoryWithFittness = selectState();
+ currentTrajectoryWithfitness = selectState();
if (logger.isDebugEnabled()) {
logger.debug("Current trajectory: " + Arrays.toString(context.getTrajectory().toArray()));
- logger.debug("New trajectory is chosen: " + currentTrajectoryWithFittness);
+ logger.debug("New trajectory is chosen: " + currentTrajectoryWithfitness);
}
- context.getDesignSpaceManager().executeTrajectoryWithMinimalBacktrackWithoutStateCoding(currentTrajectoryWithFittness.trajectory);
+ context.getDesignSpaceManager().executeTrajectoryWithMinimalBacktrackWithoutStateCoding(currentTrajectoryWithfitness.trajectory);
}
}
// visualiseCurrentState();
-// boolean consistencyCheckResult = checkConsistency(currentTrajectoryWithFittness);
+// boolean consistencyCheckResult = checkConsistency(currentTrajectoryWithfitness);
// if(consistencyCheckResult == true) {
// continue mainLoop;
// }
@@ -194,7 +189,7 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
final Object nextActivation = iterator.next();
// if (!iterator.hasNext()) {
// logger.debug("Last untraversed activation of the state.");
-// trajectoiresToExplore.remove(currentTrajectoryWithFittness);
+// trajectoiresToExplore.remove(currentTrajectoryWithfitness);
// }
logger.debug("Executing new activation: " + nextActivation);
context.executeAcitvationId(nextActivation);
@@ -209,7 +204,7 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
// System.out.println("---------");
// }
- boolean consistencyCheckResult = checkConsistency(currentTrajectoryWithFittness);
+ boolean consistencyCheckResult = checkConsistency(currentTrajectoryWithfitness);
if(consistencyCheckResult == true) { continue mainLoop; }
if (context.isCurrentStateAlreadyTraversed()) {
@@ -227,31 +222,31 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
continue;
}
- TrajectoryWithFitness nextTrajectoryWithFittness = new TrajectoryWithFitness(
+ TrajectoryWithFitness nextTrajectoryWithfitness = new TrajectoryWithFitness(
context.getTrajectory().toArray(), nextFitness);
- trajectoiresToExplore.add(nextTrajectoryWithFittness);
+ trajectoiresToExplore.add(nextTrajectoryWithfitness);
- int compare = objectiveComparatorHelper.compare(currentTrajectoryWithFittness.fitness,
- nextTrajectoryWithFittness.fitness);
+ int compare = objectiveComparatorHelper.compare(currentTrajectoryWithfitness.fitness,
+ nextTrajectoryWithfitness.fitness);
if (compare < 0) {
logger.debug("Better fitness, moving on: " + nextFitness);
- currentTrajectoryWithFittness = nextTrajectoryWithFittness;
+ currentTrajectoryWithfitness = nextTrajectoryWithfitness;
continue mainLoop;
} else if (compare == 0) {
logger.debug("Equally good fitness, moving on: " + nextFitness);
- currentTrajectoryWithFittness = nextTrajectoryWithFittness;
+ currentTrajectoryWithfitness = nextTrajectoryWithfitness;
continue mainLoop;
} else {
logger.debug("Worse fitness.");
- currentTrajectoryWithFittness = null;
+ currentTrajectoryWithfitness = null;
continue mainLoop;
}
}
}
logger.debug("State is fully traversed.");
- trajectoiresToExplore.remove(currentTrajectoryWithFittness);
- currentTrajectoryWithFittness = null;
+ trajectoiresToExplore.remove(currentTrajectoryWithfitness);
+ currentTrajectoryWithfitness = null;
}
logger.info("Interrupted.");
@@ -269,15 +264,11 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
return activationIds;
}
- private void checkForSolution(final Fitness fittness) {
- if (fittness.isSatisifiesHardObjectives()) {
+ private void checkForSolution(final Fitness fitness) {
+ if (fitness.isSatisifiesHardObjectives()) {
if (solutionStoreWithDiversityDescriptor.isDifferent(context)) {
- solutionStoreWithCopy.newSolution(context);
solutionStoreWithDiversityDescriptor.newSolution(context);
solutionStore.newSolution(context);
- configuration.progressMonitor.workedModelFound(configuration.solutionScope.numberOfRequiredSolution);
-
- logger.debug("Found a solution.");
}
}
}
@@ -311,11 +302,11 @@ public class BestFirstStrategyForModelGeneration implements IStrategy {
}
public void visualiseCurrentState() {
- PartialInterpretationVisualiser partialInterpretatioVisualiser = configuration.debugCongiguration.partialInterpretatioVisualiser;
+ PartialInterpretationVisualiser partialInterpretatioVisualiser = configuration.debugConfiguration.partialInterpretatioVisualiser;
if(partialInterpretatioVisualiser != null && this.configuration.documentationLevel == DocumentationLevel.FULL && workspace != null) {
PartialInterpretation p = (PartialInterpretation) (context.getModel());
int id = ++numberOfPrintedModel;
- if (id % configuration.debugCongiguration.partalInterpretationVisualisationFrequency == 0) {
+ if (id % configuration.debugConfiguration.partalInterpretationVisualisationFrequency == 0) {
PartialInterpretationVisualisation visualisation = partialInterpretatioVisualiser.visualiseConcretization(p);
visualisation.writeToFile(workspace, String.format("state%09d.png", id));
}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/DseUtils.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/DseUtils.xtend
new file mode 100644
index 00000000..3a897aa3
--- /dev/null
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/DseUtils.xtend
@@ -0,0 +1,65 @@
+package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse
+
+import org.eclipse.viatra.dse.base.ThreadContext
+import org.eclipse.viatra.dse.objectives.Comparators
+import org.eclipse.viatra.dse.objectives.Fitness
+import org.eclipse.viatra.dse.objectives.IObjective
+
+final class DseUtils {
+ private new() {
+ throw new IllegalStateException("This is a static utility class and should not be instantiated directly.")
+ }
+
+ static def calculateFitness(ThreadContext it, (IObjective)=>Double getFitness) {
+ val result = new Fitness
+ var boolean satisifiesHardObjectives = true
+ for (objective : objectives) {
+ val fitness = getFitness.apply(objective)
+ result.put(objective.name, fitness)
+ if (objective.isHardObjective() && !objective.satisifiesHardObjective(fitness)) {
+ satisifiesHardObjectives = false
+ }
+ }
+ result.satisifiesHardObjectives = satisifiesHardObjectives
+ result
+ }
+
+ static def caclulateBestPossibleFitness(ThreadContext threadContext) {
+ threadContext.calculateFitness [ objective |
+ if (objective instanceof IThreeValuedObjective) {
+ objective.getBestPossibleFitness(threadContext)
+ } else {
+ switch (objective.comparator) {
+ case Comparators.LOWER_IS_BETTER:
+ Double.NEGATIVE_INFINITY
+ case Comparators.HIGHER_IS_BETTER:
+ Double.POSITIVE_INFINITY
+ case Comparators.DIFFERENCE_TO_ZERO_IS_BETTER:
+ 0.0
+ default:
+ throw new IllegalArgumentException("Unknown comparator for non-three-valued objective: " +
+ objective.name)
+ }
+ }
+ ]
+ }
+
+ static def caclulateWorstPossibleFitness(ThreadContext threadContext) {
+ threadContext.calculateFitness [ objective |
+ if (objective instanceof IThreeValuedObjective) {
+ objective.getWorstPossibleFitness(threadContext)
+ } else {
+ switch (objective.comparator) {
+ case Comparators.LOWER_IS_BETTER,
+ case Comparators.DIFFERENCE_TO_ZERO_IS_BETTER:
+ Double.POSITIVE_INFINITY
+ case Comparators.HIGHER_IS_BETTER:
+ Double.NEGATIVE_INFINITY
+ default:
+ throw new IllegalArgumentException("Unknown comparator for non-three-valued objective: " +
+ objective.name)
+ }
+ }
+ ]
+ }
+}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/IThreeValuedObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/IThreeValuedObjective.xtend
new file mode 100644
index 00000000..8c93d4ec
--- /dev/null
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/IThreeValuedObjective.xtend
@@ -0,0 +1,10 @@
+package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse
+
+import org.eclipse.viatra.dse.base.ThreadContext
+import org.eclipse.viatra.dse.objectives.IObjective
+
+interface IThreeValuedObjective extends IObjective {
+ def Double getWorstPossibleFitness(ThreadContext threadContext)
+
+ def Double getBestPossibleFitness(ThreadContext threadContext)
+}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/LoggerSolutionFoundHandler.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/LoggerSolutionFoundHandler.xtend
new file mode 100644
index 00000000..39ef5f9a
--- /dev/null
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/LoggerSolutionFoundHandler.xtend
@@ -0,0 +1,24 @@
+package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse
+
+import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration
+import org.apache.log4j.Logger
+import org.eclipse.viatra.dse.api.SolutionTrajectory
+import org.eclipse.viatra.dse.base.ThreadContext
+import org.eclipse.viatra.dse.solutionstore.ISolutionFoundHandler
+import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
+
+@FinalFieldsConstructor
+class LoggerSolutionFoundHandler implements ISolutionFoundHandler {
+ val ViatraReasonerConfiguration configuration
+
+ val logger = Logger.getLogger(SolutionCopier)
+
+ override solutionFound(ThreadContext context, SolutionTrajectory trajectory) {
+ configuration.progressMonitor.workedModelFound(configuration.solutionScope.numberOfRequiredSolutions)
+ logger.debug("Found a solution.")
+ }
+
+ override solutionTriedToSave(ThreadContext context, SolutionTrajectory trajectory) {
+ // We are not interested in invalid solutions, ignore.
+ }
+}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend
index 2489c751..af6d1bbd 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend
@@ -1,11 +1,12 @@
package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse
+import com.google.common.collect.ImmutableList
import java.util.Comparator
import java.util.List
import org.eclipse.viatra.dse.base.ThreadContext
import org.eclipse.viatra.dse.objectives.Comparators
import org.eclipse.viatra.dse.objectives.IObjective
-import org.eclipse.viatra.dse.objectives.impl.BaseObjective
+import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
//class ViatraReasonerNumbers {
// public static val scopePriority = 2
@@ -22,64 +23,66 @@ import org.eclipse.viatra.dse.objectives.impl.BaseObjective
// public static val compositePriority = 2
//}
-class ModelGenerationCompositeObjective implements IObjective{
- val ScopeObjective scopeObjective
- val List unfinishedMultiplicityObjectives
- val UnfinishedWFObjective unfinishedWFObjective
-
- public new(
- ScopeObjective scopeObjective,
- List unfinishedMultiplicityObjectives,
- UnfinishedWFObjective unfinishedWFObjective)
- {
- this.scopeObjective = scopeObjective
- this.unfinishedMultiplicityObjectives = unfinishedMultiplicityObjectives
- this.unfinishedWFObjective = unfinishedWFObjective
- }
-
+@FinalFieldsConstructor
+class ModelGenerationCompositeObjective implements IThreeValuedObjective {
+ val IObjective scopeObjective
+ val List unfinishedMultiplicityObjectives
+ val IObjective unfinishedWFObjective
+
override init(ThreadContext context) {
this.scopeObjective.init(context)
this.unfinishedMultiplicityObjectives.forEach[it.init(context)]
this.unfinishedWFObjective.init(context)
}
-
+
override createNew() {
return new ModelGenerationCompositeObjective(
- this.scopeObjective, this.unfinishedMultiplicityObjectives, this.unfinishedWFObjective)
+ scopeObjective.createNew,
+ ImmutableList.copyOf(unfinishedMultiplicityObjectives.map[createNew]),
+ unfinishedWFObjective.createNew
+ )
}
-
+
override getComparator() { Comparators.LOWER_IS_BETTER }
+
override getFitness(ThreadContext context) {
var sum = 0.0
val scopeFitnes = scopeObjective.getFitness(context)
- //val unfinishedMultiplicitiesFitneses = unfinishedMultiplicityObjectives.map[x|x.getFitness(context)]
+ // val unfinishedMultiplicitiesFitneses = unfinishedMultiplicityObjectives.map[x|x.getFitness(context)]
val unfinishedWFsFitness = unfinishedWFObjective.getFitness(context)
-
- sum+=scopeFitnes
+
+ sum += scopeFitnes
var multiplicity = 0.0
- for(multiplicityObjective : unfinishedMultiplicityObjectives) {
- multiplicity+=multiplicityObjective.getFitness(context)//*0.5
+ for (multiplicityObjective : unfinishedMultiplicityObjectives) {
+ multiplicity += multiplicityObjective.getFitness(context) // *0.5
}
- sum+=multiplicity
- sum += unfinishedWFsFitness//*0.5
-
- //println('''Sum=«sum»|Scope=«scopeFitnes»|Multiplicity=«multiplicity»|WFs=«unfinishedWFsFitness»''')
-
+ sum += multiplicity
+ sum += unfinishedWFsFitness // *0.5
+ // println('''Sum=«sum»|Scope=«scopeFitnes»|Multiplicity=«multiplicity»|WFs=«unfinishedWFsFitness»''')
return sum
}
- override getLevel() { 2 }
- override getName() { "CompositeUnfinishednessObjective"}
+ override getWorstPossibleFitness(ThreadContext threadContext) {
+ Double.POSITIVE_INFINITY
+ }
+ override getBestPossibleFitness(ThreadContext threadContext) {
+ 0.0
+ }
+
+ override getLevel() { 2 }
+
+ override getName() { "CompositeUnfinishednessObjective" }
+
override isHardObjective() { true }
+
override satisifiesHardObjective(Double fitness) { fitness <= 0.001 }
-
-
+
override setComparator(Comparator comparator) {
- throw new UnsupportedOperationException("TODO: auto-generated method stub")
+ throw new UnsupportedOperationException("Model generation objective comparator cannot be set.")
}
+
override setLevel(int level) {
- throw new UnsupportedOperationException("TODO: auto-generated method stub")
+ throw new UnsupportedOperationException("Model generation objective level cannot be set.")
}
-
-}
\ No newline at end of file
+}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionCopier.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionCopier.xtend
new file mode 100644
index 00000000..d036257d
--- /dev/null
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionCopier.xtend
@@ -0,0 +1,74 @@
+package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse
+
+import com.google.common.collect.ImmutableList
+import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
+import java.util.LinkedHashMap
+import java.util.List
+import java.util.Map
+import org.eclipse.emf.ecore.EObject
+import org.eclipse.emf.ecore.util.EcoreUtil
+import org.eclipse.viatra.dse.base.ThreadContext
+import org.eclipse.xtend.lib.annotations.Accessors
+import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
+
+@FinalFieldsConstructor
+class CopiedSolution {
+ @Accessors val PartialInterpretation partialInterpretations
+ @Accessors val Map trace
+ @Accessors val long copierRuntime
+ @Accessors var boolean current = true
+}
+
+class SolutionCopier {
+ val copiedSolutions = new LinkedHashMap
+
+ long startTime = System.nanoTime
+ @Accessors(PUBLIC_GETTER) long totalCopierRuntime = 0
+
+ def void copySolution(ThreadContext context, Object solutionId) {
+ val existingCopy = copiedSolutions.get(solutionId)
+ if (existingCopy === null) {
+ val copyStart = System.nanoTime
+ val solution = context.model as PartialInterpretation
+ val copier = new EcoreUtil.Copier
+ val copiedPartialInterpretation = copier.copy(solution) as PartialInterpretation
+ copier.copyReferences
+ totalCopierRuntime += System.nanoTime - copyStart
+ val copierRuntime = System.nanoTime - startTime
+ val copiedSolution = new CopiedSolution(copiedPartialInterpretation, copier, copierRuntime)
+ copiedSolutions.put(solutionId, copiedSolution)
+ } else {
+ existingCopy.current = true
+ }
+ }
+
+ def void markAsObsolete(Object solutionId) {
+ val copiedSolution = copiedSolutions.get(solutionId)
+ if (copiedSolution === null) {
+ throw new IllegalStateException("No solution to mark as obsolete for state code: " + solutionId)
+ }
+ copiedSolution.current = false
+ }
+
+ def List getPartialInterpretations(boolean currentOnly) {
+ getListOfCopiedSolutions(currentOnly).map[partialInterpretations]
+ }
+
+ def List> getTraces(boolean currentOnly) {
+ getListOfCopiedSolutions(currentOnly).map[trace]
+ }
+
+ def List getAllCopierRuntimes(boolean currentOnly) {
+ getListOfCopiedSolutions(currentOnly).map[copierRuntime]
+ }
+
+ def List getListOfCopiedSolutions(boolean currentOnly) {
+ val values = copiedSolutions.values
+ val filteredSolutions = if (currentOnly) {
+ values.filter[current]
+ } else {
+ values
+ }
+ ImmutableList.copyOf(filteredSolutions)
+ }
+}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionStoreWithCopy.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionStoreWithCopy.xtend
deleted file mode 100644
index a8b7301e..00000000
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionStoreWithCopy.xtend
+++ /dev/null
@@ -1,52 +0,0 @@
-package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse
-
-import java.util.List
-import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation
-import java.util.LinkedList
-import org.eclipse.emf.ecore.EObject
-import java.util.Map
-import org.eclipse.emf.ecore.util.EcoreUtil
-import org.eclipse.viatra.dse.base.ThreadContext
-import java.util.TreeMap
-import java.util.SortedMap
-
-class SolutionStoreWithCopy {
-
- long runtime = 0
- List solutions = new LinkedList
- //public List> additionalMatches = new LinkedList
- List> copyTraces = new LinkedList
-
- long sartTime = System.nanoTime
- List solutionTimes = new LinkedList
-
- /*def newSolution(ThreadContext context, SortedMap additonalMatch) {
- additionalMatches+= additonalMatch
- newSolution(context)
- }*/
-
- def newSolution(ThreadContext context) {
- //print(System.nanoTime-initTime + ";")
- val copyStart = System.nanoTime
- val solution = context.model as PartialInterpretation
- val copier = new EcoreUtil.Copier
- val solutionCopy = copier.copy(solution) as PartialInterpretation
- copier.copyReferences
- solutions.add(solutionCopy)
- copyTraces.add(copier)
- runtime += System.nanoTime - copyStart
- solutionTimes.add(System.nanoTime-sartTime)
- }
- def getSumRuntime() {
- return runtime
- }
- def getAllRuntimes() {
- return solutionTimes
- }
- def getSolutions() {
- solutions
- }
- def getCopyTraces() {
- return copyTraces
- }
-}
\ No newline at end of file
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SurelyViolatedObjectiveGlobalConstraint.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SurelyViolatedObjectiveGlobalConstraint.xtend
new file mode 100644
index 00000000..7fd494a0
--- /dev/null
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SurelyViolatedObjectiveGlobalConstraint.xtend
@@ -0,0 +1,29 @@
+package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse
+
+import org.eclipse.viatra.dse.base.ThreadContext
+import org.eclipse.viatra.dse.objectives.IGlobalConstraint
+import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor
+
+@FinalFieldsConstructor
+class SurelyViolatedObjectiveGlobalConstraint implements IGlobalConstraint {
+ val ViatraReasonerSolutionSaver solutionSaver
+
+ override init(ThreadContext context) {
+ if (solutionSaver !== null) {
+ return
+ }
+ }
+
+ override createNew() {
+ this
+ }
+
+ override getName() {
+ class.name
+ }
+
+ override checkGlobalConstraint(ThreadContext context) {
+ val bestFitness = DseUtils.caclulateBestPossibleFitness(context)
+ bestFitness.satisifiesHardObjectives && !solutionSaver.isFitnessDominated(bestFitness)
+ }
+}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedMultiplicityObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedMultiplicityObjective.xtend
index aad9a448..7d0a7884 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedMultiplicityObjective.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedMultiplicityObjective.xtend
@@ -9,7 +9,7 @@ import org.eclipse.viatra.dse.objectives.Comparators
class UnfinishedMultiplicityObjective implements IObjective {
val MultiplicityGoalConstraintCalculator unfinishedMultiplicity;
- public new(MultiplicityGoalConstraintCalculator unfinishedMultiplicity) {
+ new(MultiplicityGoalConstraintCalculator unfinishedMultiplicity) {
this.unfinishedMultiplicity = unfinishedMultiplicity
}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend
deleted file mode 100644
index e0111cf6..00000000
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend
+++ /dev/null
@@ -1,56 +0,0 @@
-package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse
-
-import org.eclipse.viatra.dse.objectives.IObjective
-import org.eclipse.viatra.query.runtime.api.IPatternMatch
-import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher
-import org.eclipse.viatra.query.runtime.api.IQuerySpecification
-import java.util.Collection
-import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine
-import org.eclipse.viatra.query.runtime.emf.EMFScope
-import org.eclipse.viatra.dse.base.ThreadContext
-import java.util.List
-import org.eclipse.viatra.dse.objectives.Comparators
-import java.util.ArrayList
-import java.util.Comparator
-
-class UnfinishedWFObjective implements IObjective {
- Collection extends IQuerySpecification extends ViatraQueryMatcher extends IPatternMatch>>> unfinishedWFs
- val List> matchers
-
- public new(Collection extends IQuerySpecification extends ViatraQueryMatcher extends IPatternMatch>>> unfinishedWFs) {
- this.unfinishedWFs = unfinishedWFs
- matchers = new ArrayList(unfinishedWFs.size)
- }
- override getName() '''unfinishedWFs'''
- override createNew() {
- return new UnfinishedWFObjective(unfinishedWFs)
- }
- override init(ThreadContext context) {
- val engine = context.queryEngine//ViatraQueryEngine.on(new EMFScope(context.model))
- for(unfinishedWF : unfinishedWFs) {
- matchers += unfinishedWF.getMatcher(engine)
- }
- }
-
- override getComparator() { Comparators.LOWER_IS_BETTER }
- override getFitness(ThreadContext context) {
- var sumOfMatches = 0
- for(matcher : matchers) {
- val number = matcher.countMatches
- //println('''«matcher.patternName» = «number»''')
- sumOfMatches+=number
- }
- return sumOfMatches.doubleValue
- }
-
- override getLevel() { 2 }
- override isHardObjective() { true }
- override satisifiesHardObjective(Double fitness) { return fitness <=0.01 }
-
- override setComparator(Comparator comparator) {
- throw new UnsupportedOperationException("TODO: auto-generated method stub")
- }
- override setLevel(int level) {
- throw new UnsupportedOperationException("TODO: auto-generated method stub")
- }
-}
\ No newline at end of file
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend
new file mode 100644
index 00000000..5877778e
--- /dev/null
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend
@@ -0,0 +1,99 @@
+package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse
+
+import java.util.HashMap
+import java.util.Map
+import org.eclipse.viatra.dse.api.DSEException
+import org.eclipse.viatra.dse.api.Solution
+import org.eclipse.viatra.dse.api.SolutionTrajectory
+import org.eclipse.viatra.dse.base.ThreadContext
+import org.eclipse.viatra.dse.objectives.Fitness
+import org.eclipse.viatra.dse.objectives.IObjective
+import org.eclipse.viatra.dse.objectives.ObjectiveComparatorHelper
+import org.eclipse.viatra.dse.solutionstore.SolutionStore.ISolutionSaver
+import org.eclipse.xtend.lib.annotations.Accessors
+
+/**
+ * Based on {@link org.eclipse.viatra.dse.solutionstore.SolutionStore.BestSolutionSaver}.
+ */
+class ViatraReasonerSolutionSaver implements ISolutionSaver {
+ @Accessors val solutionCopier = new SolutionCopier
+ val boolean hasExtremalObjectives
+ val ObjectiveComparatorHelper comparatorHelper
+ val Map trajectories = new HashMap
+
+ @Accessors(PUBLIC_SETTER) var Map solutionsCollection
+
+ new(IObjective[][] leveledExtremalObjectives) {
+ comparatorHelper = new ObjectiveComparatorHelper(leveledExtremalObjectives)
+ hasExtremalObjectives = leveledExtremalObjectives.exists[!empty]
+ }
+
+ override saveSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory) {
+ if (hasExtremalObjectives) {
+ saveBestSolutionOnly(context, id, solutionTrajectory)
+ } else {
+ basicSaveSolution(context, id, solutionTrajectory)
+ }
+ }
+
+ private def saveBestSolutionOnly(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory) {
+ val fitness = context.lastFitness
+ val dominatedTrajectories = newArrayList
+ for (entry : trajectories.entrySet) {
+ val isLastFitnessBetter = comparatorHelper.compare(fitness, entry.value)
+ if (isLastFitnessBetter < 0) {
+ // Found a trajectory that dominates the current one, no need to save
+ return false
+ }
+ if (isLastFitnessBetter > 0) {
+ dominatedTrajectories += entry.key
+ }
+ }
+ // We must save the new trajectory before removing dominated trajectories
+ // to avoid removing the current solution when it is reachable only via dominated trajectories.
+ val solutionSaved = basicSaveSolution(context, id, solutionTrajectory)
+ for (dominatedTrajectory : dominatedTrajectories) {
+ trajectories -= dominatedTrajectory
+ val dominatedSolution = dominatedTrajectory.solution
+ if (!dominatedSolution.trajectories.remove(dominatedTrajectory)) {
+ throw new DSEException(
+ "Dominated solution is not reachable from dominated trajectory. This should never happen!")
+ }
+ if (dominatedSolution.trajectories.empty) {
+ val dominatedSolutionId = dominatedSolution.stateCode
+ solutionCopier.markAsObsolete(dominatedSolutionId)
+ solutionsCollection -= dominatedSolutionId
+ }
+ }
+ solutionSaved
+ }
+
+ private def basicSaveSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory) {
+ val fitness = context.lastFitness
+ var boolean solutionSaved = false
+ var dseSolution = solutionsCollection.get(id)
+ if (dseSolution === null) {
+ solutionCopier.copySolution(context, id)
+ dseSolution = new Solution(id, solutionTrajectory)
+ solutionsCollection.put(id, dseSolution)
+ solutionSaved = true
+ } else {
+ solutionSaved = dseSolution.trajectories.add(solutionTrajectory)
+ }
+ if (solutionSaved) {
+ solutionTrajectory.solution = dseSolution
+ trajectories.put(solutionTrajectory, fitness)
+ }
+ solutionSaved
+ }
+
+ def isFitnessDominated(Fitness fitness) {
+ for (existingFitness : trajectories.values) {
+ val isNewFitnessBetter = comparatorHelper.compare(fitness, existingFitness)
+ if (isNewFitnessBetter < 0) {
+ return true
+ }
+ }
+ false
+ }
+}
diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/WF2ObjectiveConverter.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/WF2ObjectiveConverter.xtend
index 5a528a9e..c601de40 100644
--- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/WF2ObjectiveConverter.xtend
+++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/WF2ObjectiveConverter.xtend
@@ -1,5 +1,6 @@
package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse
+import com.google.common.collect.ImmutableList
import java.util.ArrayList
import java.util.Collection
import org.eclipse.viatra.dse.objectives.Comparators
@@ -12,25 +13,34 @@ import org.eclipse.viatra.query.runtime.api.IQuerySpecification
import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher
class WF2ObjectiveConverter {
-
+ static val UNFINISHED_WFS_NAME = "unfinishedWFs"
+ static val INVALIDATED_WFS_NAME = "invalidatedWFs"
+
def createCompletenessObjective(
- Collection extends IQuerySpecification extends ViatraQueryMatcher extends IPatternMatch>>> unfinishedWF)
- {
- val res = new ConstraintsObjective('''unfinishedWFs''',
- unfinishedWF.map[
- new QueryConstraint(it.fullyQualifiedName,it,2.0)
- ].toList
+ Collection extends IQuerySpecification extends ViatraQueryMatcher extends IPatternMatch>>> unfinishedWF) {
+ createConstraintObjective(UNFINISHED_WFS_NAME, unfinishedWF)
+ }
+
+ def createInvalidationObjective(
+ Collection extends IQuerySpecification extends ViatraQueryMatcher extends IPatternMatch>>> invalidatedByWF) {
+ createConstraintObjective(INVALIDATED_WFS_NAME, invalidatedByWF)
+ }
+
+ def IGlobalConstraint createInvalidationGlobalConstraint(
+ Collection extends IQuerySpecification extends ViatraQueryMatcher extends IPatternMatch>>> invalidatedByWF) {
+ new ModelQueriesGlobalConstraint(INVALIDATED_WFS_NAME, new ArrayList(invalidatedByWF))
+ }
+
+ private def createConstraintObjective(String name,
+ Collection extends IQuerySpecification extends ViatraQueryMatcher extends IPatternMatch>>> queries) {
+ val res = new ConstraintsObjective(
+ name,
+ ImmutableList.copyOf(queries.map [
+ new QueryConstraint(it.fullyQualifiedName, it, 1.0)
+ ])
)
res.withComparator(Comparators.LOWER_IS_BETTER)
res.level = 2
- return res
- }
-
- def IGlobalConstraint createInvalidationObjective(
- Collection extends IQuerySpecification extends ViatraQueryMatcher extends IPatternMatch>>> invalidatedByWF)
- {
- return new ModelQueriesGlobalConstraint('''invalidatedWFs''',
- new ArrayList(invalidatedByWF)
- )
+ res
}
-}
\ No newline at end of file
+}
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 b05b37d4..2c3fb067 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 7a01ace8..dd1a46c1 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 0e56af1c..1694059d 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 e3b08949..e89abd97 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 a9a231c9..c2485146 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 c96ad697..cdef3946 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 7c4945f3..04b65373 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 6f9ed2db..13419ed3 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 319b1a7b..42bf1c75 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 64980787..09c27dfe 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/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 e3eb300d..25c11260 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 cf472a5c..7a10919f 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 9e436c25..f4a74d7b 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 8dcb67ce..8d4c818e 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 f55b7c31..79e0e382 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 1f55e190..51f5e2fe 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 d7439d22..cf8f603b 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 4fbc7cd3..116d5bc1 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 5b585e60..7a6eb47e 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 481a23f6..fbb89193 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/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.CftExtensions.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.CftExtensions.xtendbin
index 390ee219..0e63880f 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.CftExtensions.xtendbin and b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.CftExtensions.xtendbin differ
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 594bfecb..dfae40e9 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
index a868ae36..0aaf712d 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventCollection.xtendbin 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
index f7ca5531..e51f73a6 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.EventMaterializer.xtendbin 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
index 1d15efbb..89e003dc 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/.FaultTreeBuilder.xtendbin 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/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 3fce519e..028440a8 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 564e58c4..d542ba2d 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 ebcfced8..949da0cd 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 d4b5ecdb..82c045e2 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 1faa21b3..ffd70c04 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 afc40951..418c71d4 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 419b9490..86c0d704 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 0e703f40..c9dda5c4 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/ft2galileo/.Ft2GalileoTransformation.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.Ft2GalileoTransformation.xtendbin
index 41e6e441..0956e6e0 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/ft2galileo/.Ft2GalileoTransformation.xtendbin 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/solver/.ReliabilityResult.xtendbin b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.ReliabilityResult.xtendbin
index ef8c3b88..cdaacb58 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.ReliabilityResult.xtendbin 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
index 4aff77d3..6e1908aa 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftConfiguration.xtendbin 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
index a2c634bc..5772b0e7 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftHandler.xtendbin 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
index 45f12291..e1c1a8c7 100644
Binary files a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/solver/.StormDftSolver.xtendbin 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.ui/bin/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/bin/.gitignore
new file mode 100644
index 00000000..1c0a02cd
--- /dev/null
+++ b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.ui/bin/.gitignore
@@ -0,0 +1 @@
+/hu/
diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/configs/generation.vsconfig b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/configs/generation.vsconfig
index 9a073728..490d6942 100644
--- a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/configs/generation.vsconfig
+++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/configs/generation.vsconfig
@@ -7,7 +7,7 @@ generate {
partial-model = { "inputs/FamInstance.xmi"}
solver = ViatraSolver
scope = {
- #node = 5
+ #node = 500
}
config = {
--
cgit v1.2.3-70-g09d2