diff options
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries')
4 files changed, 274 insertions, 0 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java index 9025d93a..d7326877 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java | |||
@@ -5,6 +5,8 @@ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; | |||
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; |
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; | 7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; |
8 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric; | ||
9 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CoverageMetric; | ||
8 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; | 10 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; |
9 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; | 11 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; |
10 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; | 12 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; |
@@ -12,6 +14,7 @@ import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoPotentialLinkToGro | |||
12 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; | 14 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; |
13 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SmallSat; | 15 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SmallSat; |
14 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.ThreeUCubeSatWithNonUhfCrossLink; | 16 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.ThreeUCubeSatWithNonUhfCrossLink; |
17 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.TimeMetric; | ||
15 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; | 18 | import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; |
16 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; | 19 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; |
17 | 20 | ||
@@ -32,6 +35,9 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; | |||
32 | * <li>threeUCubeSatWithNonUhfCrossLink</li> | 35 | * <li>threeUCubeSatWithNonUhfCrossLink</li> |
33 | * <li>cubeSatWithKaAntenna</li> | 36 | * <li>cubeSatWithKaAntenna</li> |
34 | * <li>smallSat</li> | 37 | * <li>smallSat</li> |
38 | * <li>coverageMetric</li> | ||
39 | * <li>timeMetric</li> | ||
40 | * <li>costMetric</li> | ||
35 | * </ul> | 41 | * </ul> |
36 | * | 42 | * |
37 | * @see IQueryGroup | 43 | * @see IQueryGroup |
@@ -65,6 +71,9 @@ public final class SatelliteQueries extends BaseGeneratedPatternGroup { | |||
65 | querySpecifications.add(ThreeUCubeSatWithNonUhfCrossLink.instance()); | 71 | querySpecifications.add(ThreeUCubeSatWithNonUhfCrossLink.instance()); |
66 | querySpecifications.add(CubeSatWithKaAntenna.instance()); | 72 | querySpecifications.add(CubeSatWithKaAntenna.instance()); |
67 | querySpecifications.add(SmallSat.instance()); | 73 | querySpecifications.add(SmallSat.instance()); |
74 | querySpecifications.add(CoverageMetric.instance()); | ||
75 | querySpecifications.add(TimeMetric.instance()); | ||
76 | querySpecifications.add(CostMetric.instance()); | ||
68 | } | 77 | } |
69 | 78 | ||
70 | public CommunicationLinkDoesNotStartAtContainingElement getCommunicationLinkDoesNotStartAtContainingElement() { | 79 | public CommunicationLinkDoesNotStartAtContainingElement getCommunicationLinkDoesNotStartAtContainingElement() { |
@@ -138,4 +147,28 @@ public final class SatelliteQueries extends BaseGeneratedPatternGroup { | |||
138 | public SmallSat.Matcher getSmallSat(final ViatraQueryEngine engine) { | 147 | public SmallSat.Matcher getSmallSat(final ViatraQueryEngine engine) { |
139 | return SmallSat.Matcher.on(engine); | 148 | return SmallSat.Matcher.on(engine); |
140 | } | 149 | } |
150 | |||
151 | public CoverageMetric getCoverageMetric() { | ||
152 | return CoverageMetric.instance(); | ||
153 | } | ||
154 | |||
155 | public CoverageMetric.Matcher getCoverageMetric(final ViatraQueryEngine engine) { | ||
156 | return CoverageMetric.Matcher.on(engine); | ||
157 | } | ||
158 | |||
159 | public TimeMetric getTimeMetric() { | ||
160 | return TimeMetric.instance(); | ||
161 | } | ||
162 | |||
163 | public TimeMetric.Matcher getTimeMetric(final ViatraQueryEngine engine) { | ||
164 | return TimeMetric.Matcher.on(engine); | ||
165 | } | ||
166 | |||
167 | public CostMetric getCostMetric() { | ||
168 | return CostMetric.instance(); | ||
169 | } | ||
170 | |||
171 | public CostMetric.Matcher getCostMetric(final ViatraQueryEngine engine) { | ||
172 | return CostMetric.Matcher.on(engine); | ||
173 | } | ||
141 | } | 174 | } |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore index 58443486..2f9ae41d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore | |||
@@ -67,3 +67,4 @@ | |||
67 | /.CubeSat6U.java._trace | 67 | /.CubeSat6U.java._trace |
68 | /.MatchingCommSubsystem.java._trace | 68 | /.MatchingCommSubsystem.java._trace |
69 | /.TransmittingCommSubsystem.java._trace | 69 | /.TransmittingCommSubsystem.java._trace |
70 | /.SpacecraftOfKindCount.java._trace | ||
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java index 4093e2b2..0235dbec 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java | |||
@@ -5,6 +5,8 @@ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal; | |||
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; | 6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; |
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; | 7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; |
8 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric; | ||
9 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CoverageMetric; | ||
8 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; | 10 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; |
9 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; | 11 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; |
10 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; | 12 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; |
@@ -12,18 +14,33 @@ import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoPotentialLinkToGro | |||
12 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; | 14 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; |
13 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SmallSat; | 15 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SmallSat; |
14 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.ThreeUCubeSatWithNonUhfCrossLink; | 16 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.ThreeUCubeSatWithNonUhfCrossLink; |
17 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.TimeMetric; | ||
18 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AdditionalCommSubsystemCost; | ||
15 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AtLeastTwoInterferometryPayloads; | 19 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AtLeastTwoInterferometryPayloads; |
20 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice; | ||
16 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBandUhf; | 21 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBandUhf; |
17 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CubeSat3U; | 22 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CubeSat3U; |
18 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CubeSat6U; | 23 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CubeSat6U; |
19 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.DirectCommunicationLink; | 24 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.DirectCommunicationLink; |
20 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.GroundStationNetwork; | 25 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.GroundStationNetwork; |
26 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData; | ||
21 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink; | 27 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink; |
22 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectLinkAllowed; | 28 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectLinkAllowed; |
29 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.InterferometryPayloadCost; | ||
23 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.LinkAllowed; | 30 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.LinkAllowed; |
24 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MatchingAntenna; | 31 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MatchingAntenna; |
25 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MatchingCommSubsystem; | 32 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MatchingCommSubsystem; |
33 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCost; | ||
34 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCoverage; | ||
35 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionTime; | ||
36 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.ScienceData; | ||
37 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftCost; | ||
38 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKindCount; | ||
39 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftUplink; | ||
26 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithInterferometryPayload; | 40 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithInterferometryPayload; |
41 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithTwoCommSubsystems; | ||
42 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitRate; | ||
43 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitTime; | ||
27 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmittingCommSubsystem; | 44 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmittingCommSubsystem; |
28 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; | 45 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; |
29 | 46 | ||
@@ -55,6 +72,23 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; | |||
55 | * <li>groundStationNetwork</li> | 72 | * <li>groundStationNetwork</li> |
56 | * <li>cubeSatWithKaAntenna</li> | 73 | * <li>cubeSatWithKaAntenna</li> |
57 | * <li>smallSat</li> | 74 | * <li>smallSat</li> |
75 | * <li>coverageMetric</li> | ||
76 | * <li>missionCoverage</li> | ||
77 | * <li>timeMetric</li> | ||
78 | * <li>missionTime</li> | ||
79 | * <li>transmitTime</li> | ||
80 | * <li>incomingData</li> | ||
81 | * <li>scienceData</li> | ||
82 | * <li>transmitRate</li> | ||
83 | * <li>spacecraftUplink</li> | ||
84 | * <li>costMetric</li> | ||
85 | * <li>missionCost</li> | ||
86 | * <li>spacecraftCost</li> | ||
87 | * <li>spacecraftOfKindCount</li> | ||
88 | * <li>basePrice</li> | ||
89 | * <li>interferometryPayloadCost</li> | ||
90 | * <li>additionalCommSubsystemCost</li> | ||
91 | * <li>spacecraftWithTwoCommSubsystems</li> | ||
58 | * </ul> | 92 | * </ul> |
59 | * | 93 | * |
60 | * @see IQueryGroup | 94 | * @see IQueryGroup |
@@ -101,5 +135,22 @@ public final class SatelliteQueriesAll extends BaseGeneratedPatternGroup { | |||
101 | querySpecifications.add(GroundStationNetwork.instance()); | 135 | querySpecifications.add(GroundStationNetwork.instance()); |
102 | querySpecifications.add(CubeSatWithKaAntenna.instance()); | 136 | querySpecifications.add(CubeSatWithKaAntenna.instance()); |
103 | querySpecifications.add(SmallSat.instance()); | 137 | querySpecifications.add(SmallSat.instance()); |
138 | querySpecifications.add(CoverageMetric.instance()); | ||
139 | querySpecifications.add(MissionCoverage.instance()); | ||
140 | querySpecifications.add(TimeMetric.instance()); | ||
141 | querySpecifications.add(MissionTime.instance()); | ||
142 | querySpecifications.add(TransmitTime.instance()); | ||
143 | querySpecifications.add(IncomingData.instance()); | ||
144 | querySpecifications.add(ScienceData.instance()); | ||
145 | querySpecifications.add(TransmitRate.instance()); | ||
146 | querySpecifications.add(SpacecraftUplink.instance()); | ||
147 | querySpecifications.add(CostMetric.instance()); | ||
148 | querySpecifications.add(MissionCost.instance()); | ||
149 | querySpecifications.add(SpacecraftCost.instance()); | ||
150 | querySpecifications.add(SpacecraftOfKindCount.instance()); | ||
151 | querySpecifications.add(BasePrice.instance()); | ||
152 | querySpecifications.add(InterferometryPayloadCost.instance()); | ||
153 | querySpecifications.add(AdditionalCommSubsystemCost.instance()); | ||
154 | querySpecifications.add(SpacecraftWithTwoCommSubsystems.instance()); | ||
104 | } | 155 | } |
105 | } | 156 | } |
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKindCount.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKindCount.java new file mode 100644 index 00000000..3c4f9244 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKindCount.java | |||
@@ -0,0 +1,189 @@ | |||
1 | /** | ||
2 | * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql | ||
3 | */ | ||
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal; | ||
5 | |||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SmallSat; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CubeSat3U; | ||
8 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CubeSat6U; | ||
9 | import java.util.Arrays; | ||
10 | import java.util.LinkedHashSet; | ||
11 | import java.util.List; | ||
12 | import java.util.Set; | ||
13 | import org.eclipse.emf.ecore.EClass; | ||
14 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; | ||
15 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher; | ||
16 | import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; | ||
17 | import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; | ||
18 | import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey; | ||
19 | import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; | ||
20 | import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; | ||
21 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; | ||
22 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; | ||
23 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.PatternMatchCounter; | ||
24 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint; | ||
25 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; | ||
26 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; | ||
27 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; | ||
28 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | ||
29 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | ||
30 | |||
31 | /** | ||
32 | * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way. | ||
33 | * | ||
34 | * <p>Original source: | ||
35 | * <code><pre> | ||
36 | * private pattern spacecraftOfKindCount(Sat : Spacecraft, Count : java Integer) { | ||
37 | * CubeSat3U(Sat); | ||
38 | * Count == count find cubeSat3U(_); | ||
39 | * } or { | ||
40 | * CubeSat6U(Sat); | ||
41 | * Count == count find cubeSat6U(_); | ||
42 | * } or { | ||
43 | * SmallSat(Sat); | ||
44 | * Count == count find smallSat(_); | ||
45 | * } | ||
46 | * </pre></code> | ||
47 | * | ||
48 | * @see GenericPatternMatcher | ||
49 | * @see GenericPatternMatch | ||
50 | * | ||
51 | */ | ||
52 | @SuppressWarnings("all") | ||
53 | public final class SpacecraftOfKindCount extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { | ||
54 | private SpacecraftOfKindCount() { | ||
55 | super(GeneratedPQuery.INSTANCE); | ||
56 | } | ||
57 | |||
58 | /** | ||
59 | * @return the singleton instance of the query specification | ||
60 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | ||
61 | * | ||
62 | */ | ||
63 | public static SpacecraftOfKindCount instance() { | ||
64 | try{ | ||
65 | return LazyHolder.INSTANCE; | ||
66 | } catch (ExceptionInInitializerError err) { | ||
67 | throw processInitializerError(err); | ||
68 | } | ||
69 | } | ||
70 | |||
71 | /** | ||
72 | * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKindCount (visibility: PUBLIC, simpleName: SpacecraftOfKindCount, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKindCount, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created | ||
73 | * <b>not</b> at the class load time of the outer class, | ||
74 | * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKindCount (visibility: PUBLIC, simpleName: SpacecraftOfKindCount, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKindCount, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. | ||
75 | * | ||
76 | * <p> This workaround is required e.g. to support recursion. | ||
77 | * | ||
78 | */ | ||
79 | private static class LazyHolder { | ||
80 | private static final SpacecraftOfKindCount INSTANCE = new SpacecraftOfKindCount(); | ||
81 | |||
82 | /** | ||
83 | * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. | ||
84 | * This initialization order is required to support indirect recursion. | ||
85 | * | ||
86 | * <p> The static initializer is defined using a helper field to work around limitations of the code generator. | ||
87 | * | ||
88 | */ | ||
89 | private static final Object STATIC_INITIALIZER = ensureInitialized(); | ||
90 | |||
91 | public static Object ensureInitialized() { | ||
92 | INSTANCE.ensureInitializedInternal(); | ||
93 | return null; | ||
94 | } | ||
95 | } | ||
96 | |||
97 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | ||
98 | private static final SpacecraftOfKindCount.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | ||
99 | |||
100 | private final PParameter parameter_Sat = new PParameter("Sat", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | ||
101 | |||
102 | private final PParameter parameter_Count = new PParameter("Count", "java.lang.Integer", new JavaTransitiveInstancesKey(java.lang.Integer.class), PParameterDirection.INOUT); | ||
103 | |||
104 | private final List<PParameter> parameters = Arrays.asList(parameter_Sat, parameter_Count); | ||
105 | |||
106 | private GeneratedPQuery() { | ||
107 | super(PVisibility.PRIVATE); | ||
108 | } | ||
109 | |||
110 | @Override | ||
111 | public String getFullyQualifiedName() { | ||
112 | return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.spacecraftOfKindCount"; | ||
113 | } | ||
114 | |||
115 | @Override | ||
116 | public List<String> getParameterNames() { | ||
117 | return Arrays.asList("Sat","Count"); | ||
118 | } | ||
119 | |||
120 | @Override | ||
121 | public List<PParameter> getParameters() { | ||
122 | return parameters; | ||
123 | } | ||
124 | |||
125 | @Override | ||
126 | public Set<PBody> doGetContainedBodies() { | ||
127 | setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); | ||
128 | Set<PBody> bodies = new LinkedHashSet<>(); | ||
129 | { | ||
130 | PBody body = new PBody(this); | ||
131 | PVariable var_Sat = body.getOrCreateVariableByName("Sat"); | ||
132 | PVariable var_Count = body.getOrCreateVariableByName("Count"); | ||
133 | PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); | ||
134 | new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | ||
135 | new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Count), new JavaTransitiveInstancesKey(java.lang.Integer.class)); | ||
136 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
137 | new ExportedParameter(body, var_Sat, parameter_Sat), | ||
138 | new ExportedParameter(body, var_Count, parameter_Count) | ||
139 | )); | ||
140 | // CubeSat3U(Sat) | ||
141 | new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CubeSat3U"))); | ||
142 | // Count == count find cubeSat3U(_) | ||
143 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); | ||
144 | new PatternMatchCounter(body, Tuples.flatTupleOf(var___0_), CubeSat3U.instance().getInternalQueryRepresentation(), var__virtual_0_); | ||
145 | new Equality(body, var_Count, var__virtual_0_); | ||
146 | bodies.add(body); | ||
147 | } | ||
148 | { | ||
149 | PBody body = new PBody(this); | ||
150 | PVariable var_Sat = body.getOrCreateVariableByName("Sat"); | ||
151 | PVariable var_Count = body.getOrCreateVariableByName("Count"); | ||
152 | PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); | ||
153 | new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | ||
154 | new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Count), new JavaTransitiveInstancesKey(java.lang.Integer.class)); | ||
155 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
156 | new ExportedParameter(body, var_Sat, parameter_Sat), | ||
157 | new ExportedParameter(body, var_Count, parameter_Count) | ||
158 | )); | ||
159 | // CubeSat6U(Sat) | ||
160 | new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CubeSat6U"))); | ||
161 | // Count == count find cubeSat6U(_) | ||
162 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); | ||
163 | new PatternMatchCounter(body, Tuples.flatTupleOf(var___0_), CubeSat6U.instance().getInternalQueryRepresentation(), var__virtual_0_); | ||
164 | new Equality(body, var_Count, var__virtual_0_); | ||
165 | bodies.add(body); | ||
166 | } | ||
167 | { | ||
168 | PBody body = new PBody(this); | ||
169 | PVariable var_Sat = body.getOrCreateVariableByName("Sat"); | ||
170 | PVariable var_Count = body.getOrCreateVariableByName("Count"); | ||
171 | PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); | ||
172 | new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | ||
173 | new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Count), new JavaTransitiveInstancesKey(java.lang.Integer.class)); | ||
174 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
175 | new ExportedParameter(body, var_Sat, parameter_Sat), | ||
176 | new ExportedParameter(body, var_Count, parameter_Count) | ||
177 | )); | ||
178 | // SmallSat(Sat) | ||
179 | new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "SmallSat"))); | ||
180 | // Count == count find smallSat(_) | ||
181 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); | ||
182 | new PatternMatchCounter(body, Tuples.flatTupleOf(var___0_), SmallSat.instance().getInternalQueryRepresentation(), var__virtual_0_); | ||
183 | new Equality(body, var_Count, var__virtual_0_); | ||
184 | bodies.add(body); | ||
185 | } | ||
186 | return bodies; | ||
187 | } | ||
188 | } | ||
189 | } | ||