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/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.xtend | |
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/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.xtend')
-rw-r--r-- | Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.xtend | 39 |
1 files changed, 0 insertions, 39 deletions
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 deleted file mode 100644 index 0b0afea6..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.transformation/src/hu/bme/mit/inf/dslreasoner/faulttree/transformation/cft2ft/FaultTreeBuilder.xtend +++ /dev/null | |||
@@ -1,39 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.transformation.cft2ft | ||
2 | |||
3 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.FtFactory | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.Gate | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.ft.RandomEvent | ||
6 | import java.util.Collection | ||
7 | import org.eclipse.xtend.lib.annotations.Accessors | ||
8 | |||
9 | class FaultTreeBuilder { | ||
10 | @Accessors | ||
11 | val faultTree = FtFactory.eINSTANCE.createFaultTree | ||
12 | |||
13 | def addTopLevel(RandomEvent event) { | ||
14 | if (faultTree.topEvent !== null) { | ||
15 | throw new IllegalStateException("Top event was already set") | ||
16 | } | ||
17 | add(event) | ||
18 | faultTree.topEvent = event | ||
19 | } | ||
20 | |||
21 | protected def void add(RandomEvent event) { | ||
22 | if (faultTree.eContainer == faultTree) { | ||
23 | return | ||
24 | } | ||
25 | if (faultTree.eContainer !== null) { | ||
26 | throw new IllegalStateException("Event is already in a different fault tree") | ||
27 | } | ||
28 | faultTree.events += event | ||
29 | if (event instanceof Gate) { | ||
30 | addAll(event.inputEvents) | ||
31 | } | ||
32 | } | ||
33 | |||
34 | protected def addAll(Collection<RandomEvent> events) { | ||
35 | for (event : events) { | ||
36 | add(event) | ||
37 | } | ||
38 | } | ||
39 | } | ||