diff options
Diffstat (limited to 'Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme')
3 files changed, 0 insertions, 72 deletions
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 deleted file mode 100644 index 0e63880f..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.CftExtensions.xtendbin +++ /dev/null | |||
Binary files differ | |||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.gitignore b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.gitignore deleted file mode 100644 index 2ba78568..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/.gitignore +++ /dev/null | |||
@@ -1,3 +0,0 @@ | |||
1 | /.CftExtensions.java._trace | ||
2 | /.CftExtensions.xtendbin | ||
3 | /CftExtensions.java | ||
diff --git a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/CftExtensions.java b/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/CftExtensions.java deleted file mode 100644 index dbc6b279..00000000 --- a/Stochastic/hu.bme.mit.inf.dslreasoner.faulttree.model/xtend-gen/hu/bme/mit/inf/dslreasoner/faulttree/model/util/CftExtensions.java +++ /dev/null | |||
@@ -1,69 +0,0 @@ | |||
1 | package hu.bme.mit.inf.dslreasoner.faulttree.model.util; | ||
2 | |||
3 | import com.google.common.base.Objects; | ||
4 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Component; | ||
5 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Connection; | ||
6 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.ModalElement; | ||
7 | import hu.bme.mit.inf.dslreasoner.faulttree.model.cft.Modality; | ||
8 | |||
9 | @SuppressWarnings("all") | ||
10 | public final class CftExtensions { | ||
11 | private CftExtensions() { | ||
12 | throw new IllegalStateException("This is a static utility class and should not be instantiated directly."); | ||
13 | } | ||
14 | |||
15 | public static boolean isMoreConcreteThan(final Modality newModality, final Modality original) { | ||
16 | boolean _switchResult = false; | ||
17 | if (original != null) { | ||
18 | switch (original) { | ||
19 | case MAY: | ||
20 | _switchResult = (!Objects.equal(newModality, Modality.MAY)); | ||
21 | break; | ||
22 | case CURRENT: | ||
23 | _switchResult = Objects.equal(newModality, Modality.MUST); | ||
24 | break; | ||
25 | case MUST: | ||
26 | _switchResult = false; | ||
27 | break; | ||
28 | default: | ||
29 | break; | ||
30 | } | ||
31 | } | ||
32 | return _switchResult; | ||
33 | } | ||
34 | |||
35 | public static boolean currentlyExists(final ModalElement element) { | ||
36 | Modality _exists = element.getExists(); | ||
37 | return (!Objects.equal(_exists, Modality.MAY)); | ||
38 | } | ||
39 | |||
40 | public static boolean mustExist(final ModalElement element) { | ||
41 | Modality _exists = element.getExists(); | ||
42 | return Objects.equal(_exists, Modality.MUST); | ||
43 | } | ||
44 | |||
45 | public static boolean appearsExactlyOnce(final Component componentInstance) { | ||
46 | return (CftExtensions.mustExist(componentInstance) && (!componentInstance.isMultipleAllowed())); | ||
47 | } | ||
48 | |||
49 | /** | ||
50 | * Checks whether the connection and its target component are both currently present. | ||
51 | * | ||
52 | * A currently present connection without a present target component is a partial model error, | ||
53 | * so we throw an exception instead of returning <code>false</code>. | ||
54 | * | ||
55 | * @param connection The connection to check. | ||
56 | * @throws IllegalStateException When the target component is not currently present. | ||
57 | */ | ||
58 | public static boolean isCurrentlyConnected(final Connection connection) { | ||
59 | boolean _xblockexpression = false; | ||
60 | { | ||
61 | boolean _currentlyExists = CftExtensions.currentlyExists(connection.getOutput().getComponent()); | ||
62 | if (_currentlyExists) { | ||
63 | throw new IllegalStateException("Inconsistent partial model: current connection to a component that may not currently exist"); | ||
64 | } | ||
65 | _xblockexpression = CftExtensions.currentlyExists(connection); | ||
66 | } | ||
67 | return _xblockexpression; | ||
68 | } | ||
69 | } | ||