diff options
author | 2019-08-01 14:49:53 +0200 | |
---|---|---|
committer | 2019-08-01 14:49:53 +0200 | |
commit | 972baab642bd889d2c3476c0c9e17a6929e0c318 (patch) | |
tree | 8f724cb348c60e4fc45d446d8532988ed8e40748 /Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.java | |
parent | Counting scope propagator (simpler than BasicTypeHierarchy) (diff) | |
download | VIATRA-Generator-972baab642bd889d2c3476c0c9e17a6929e0c318.tar.gz VIATRA-Generator-972baab642bd889d2c3476c0c9e17a6929e0c318.tar.zst VIATRA-Generator-972baab642bd889d2c3476c0c9e17a6929e0c318.zip |
[Stochastic] Remove fault tree support for now
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.java')
-rw-r--r-- | Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.java | 49 |
1 files changed, 0 insertions, 49 deletions
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 deleted file mode 100644 index e87b8865..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/Cft2FtTransformation.java +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft; | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ComponentFaultTree; | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantEvent; | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ConstantModel; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Event; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FaultTree; | ||
8 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtFactory; | ||
9 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent; | ||
10 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.ReliabilityModel; | ||
11 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft.EventMaterializer; | ||
12 | import hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft.FaultTreeBuilder; | ||
13 | import org.eclipse.xtext.xbase.lib.ObjectExtensions; | ||
14 | import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; | ||
15 | |||
16 | @SuppressWarnings("all") | ||
17 | public class Cft2FtTransformation { | ||
18 | public ReliabilityModel createFaultTree(final ComponentFaultTree componentFaultTree) { | ||
19 | ReliabilityModel _xblockexpression = null; | ||
20 | { | ||
21 | final EventMaterializer materializer = new EventMaterializer(); | ||
22 | final Event topEvent = materializer.getOrMaterialize(componentFaultTree.getTopEvent()); | ||
23 | ReliabilityModel _switchResult = null; | ||
24 | boolean _matched = false; | ||
25 | if (topEvent instanceof ConstantEvent) { | ||
26 | _matched=true; | ||
27 | ConstantModel _createConstantModel = FtFactory.eINSTANCE.createConstantModel(); | ||
28 | final Procedure1<ConstantModel> _function = (ConstantModel it) -> { | ||
29 | it.setFailed(((ConstantEvent)topEvent).isFailed()); | ||
30 | }; | ||
31 | _switchResult = ObjectExtensions.<ConstantModel>operator_doubleArrow(_createConstantModel, _function); | ||
32 | } | ||
33 | if (!_matched) { | ||
34 | if (topEvent instanceof RandomEvent) { | ||
35 | _matched=true; | ||
36 | FaultTree _xblockexpression_1 = null; | ||
37 | { | ||
38 | final FaultTreeBuilder builder = new FaultTreeBuilder(); | ||
39 | builder.addTopLevel(((RandomEvent)topEvent)); | ||
40 | _xblockexpression_1 = builder.getFaultTree(); | ||
41 | } | ||
42 | _switchResult = _xblockexpression_1; | ||
43 | } | ||
44 | } | ||
45 | _xblockexpression = _switchResult; | ||
46 | } | ||
47 | return _xblockexpression; | ||
48 | } | ||
49 | } | ||