diff options
author | 2019-08-01 18:38:15 +0200 | |
---|---|---|
committer | 2019-08-01 18:38:15 +0200 | |
commit | 6eb760ee960cd3efe51ca6e4107153c09838a1da (patch) | |
tree | 2edd0e21be50265f65f0cfd2fd43f18a252aef02 /Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/LinkAllowed.java | |
parent | Dump required Xbase version down to 2.17 (diff) | |
download | VIATRA-Generator-6eb760ee960cd3efe51ca6e4107153c09838a1da.tar.gz VIATRA-Generator-6eb760ee960cd3efe51ca6e4107153c09838a1da.tar.zst VIATRA-Generator-6eb760ee960cd3efe51ca6e4107153c09838a1da.zip |
Clean up CPS and Satellite domains
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/LinkAllowed.java')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/LinkAllowed.java | 180 |
1 files changed, 0 insertions, 180 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/LinkAllowed.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/LinkAllowed.java deleted file mode 100644 index c3f6bb82..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/LinkAllowed.java +++ /dev/null | |||
@@ -1,180 +0,0 @@ | |||
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.internal.CubeSat3U; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MatchingAntenna; | ||
8 | import java.util.Arrays; | ||
9 | import java.util.LinkedHashSet; | ||
10 | import java.util.List; | ||
11 | import java.util.Set; | ||
12 | import org.eclipse.emf.ecore.EClass; | ||
13 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; | ||
14 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher; | ||
15 | import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; | ||
16 | import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; | ||
17 | import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; | ||
18 | import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; | ||
19 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; | ||
20 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall; | ||
21 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; | ||
22 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; | ||
23 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; | ||
24 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; | ||
25 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | ||
26 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | ||
27 | |||
28 | /** | ||
29 | * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way. | ||
30 | * | ||
31 | * <p>Original source: | ||
32 | * <code><pre> | ||
33 | * private pattern linkAllowed(From : Spacecraft, To : CommunicatingElement) { | ||
34 | * find matchingAntenna(From, To); | ||
35 | * neg find cubeSat3U(From); | ||
36 | * } or { | ||
37 | * find matchingAntenna(From, To); | ||
38 | * CubeSat3U(From); | ||
39 | * } or { | ||
40 | * find matchingAntenna(From, To); | ||
41 | * CubeSat3U(From); | ||
42 | * GroundStationNetwork(To); | ||
43 | * } | ||
44 | * </pre></code> | ||
45 | * | ||
46 | * @see GenericPatternMatcher | ||
47 | * @see GenericPatternMatch | ||
48 | * | ||
49 | */ | ||
50 | @SuppressWarnings("all") | ||
51 | public final class LinkAllowed extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { | ||
52 | private LinkAllowed() { | ||
53 | super(GeneratedPQuery.INSTANCE); | ||
54 | } | ||
55 | |||
56 | /** | ||
57 | * @return the singleton instance of the query specification | ||
58 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | ||
59 | * | ||
60 | */ | ||
61 | public static LinkAllowed instance() { | ||
62 | try{ | ||
63 | return LazyHolder.INSTANCE; | ||
64 | } catch (ExceptionInInitializerError err) { | ||
65 | throw processInitializerError(err); | ||
66 | } | ||
67 | } | ||
68 | |||
69 | /** | ||
70 | * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.LinkAllowed (visibility: PUBLIC, simpleName: LinkAllowed, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.LinkAllowed, 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 | ||
71 | * <b>not</b> at the class load time of the outer class, | ||
72 | * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.LinkAllowed (visibility: PUBLIC, simpleName: LinkAllowed, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.LinkAllowed, 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()}. | ||
73 | * | ||
74 | * <p> This workaround is required e.g. to support recursion. | ||
75 | * | ||
76 | */ | ||
77 | private static class LazyHolder { | ||
78 | private static final LinkAllowed INSTANCE = new LinkAllowed(); | ||
79 | |||
80 | /** | ||
81 | * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. | ||
82 | * This initialization order is required to support indirect recursion. | ||
83 | * | ||
84 | * <p> The static initializer is defined using a helper field to work around limitations of the code generator. | ||
85 | * | ||
86 | */ | ||
87 | private static final Object STATIC_INITIALIZER = ensureInitialized(); | ||
88 | |||
89 | public static Object ensureInitialized() { | ||
90 | INSTANCE.ensureInitializedInternal(); | ||
91 | return null; | ||
92 | } | ||
93 | } | ||
94 | |||
95 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | ||
96 | private static final LinkAllowed.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | ||
97 | |||
98 | private final PParameter parameter_From = new PParameter("From", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | ||
99 | |||
100 | private final PParameter parameter_To = new PParameter("To", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); | ||
101 | |||
102 | private final List<PParameter> parameters = Arrays.asList(parameter_From, parameter_To); | ||
103 | |||
104 | private GeneratedPQuery() { | ||
105 | super(PVisibility.PRIVATE); | ||
106 | } | ||
107 | |||
108 | @Override | ||
109 | public String getFullyQualifiedName() { | ||
110 | return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.linkAllowed"; | ||
111 | } | ||
112 | |||
113 | @Override | ||
114 | public List<String> getParameterNames() { | ||
115 | return Arrays.asList("From","To"); | ||
116 | } | ||
117 | |||
118 | @Override | ||
119 | public List<PParameter> getParameters() { | ||
120 | return parameters; | ||
121 | } | ||
122 | |||
123 | @Override | ||
124 | public Set<PBody> doGetContainedBodies() { | ||
125 | setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); | ||
126 | Set<PBody> bodies = new LinkedHashSet<>(); | ||
127 | { | ||
128 | PBody body = new PBody(this); | ||
129 | PVariable var_From = body.getOrCreateVariableByName("From"); | ||
130 | PVariable var_To = body.getOrCreateVariableByName("To"); | ||
131 | new TypeConstraint(body, Tuples.flatTupleOf(var_From), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | ||
132 | new TypeConstraint(body, Tuples.flatTupleOf(var_To), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | ||
133 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
134 | new ExportedParameter(body, var_From, parameter_From), | ||
135 | new ExportedParameter(body, var_To, parameter_To) | ||
136 | )); | ||
137 | // find matchingAntenna(From, To) | ||
138 | new PositivePatternCall(body, Tuples.flatTupleOf(var_From, var_To), MatchingAntenna.instance().getInternalQueryRepresentation()); | ||
139 | // neg find cubeSat3U(From) | ||
140 | new NegativePatternCall(body, Tuples.flatTupleOf(var_From), CubeSat3U.instance().getInternalQueryRepresentation()); | ||
141 | bodies.add(body); | ||
142 | } | ||
143 | { | ||
144 | PBody body = new PBody(this); | ||
145 | PVariable var_From = body.getOrCreateVariableByName("From"); | ||
146 | PVariable var_To = body.getOrCreateVariableByName("To"); | ||
147 | new TypeConstraint(body, Tuples.flatTupleOf(var_From), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | ||
148 | new TypeConstraint(body, Tuples.flatTupleOf(var_To), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | ||
149 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
150 | new ExportedParameter(body, var_From, parameter_From), | ||
151 | new ExportedParameter(body, var_To, parameter_To) | ||
152 | )); | ||
153 | // find matchingAntenna(From, To) | ||
154 | new PositivePatternCall(body, Tuples.flatTupleOf(var_From, var_To), MatchingAntenna.instance().getInternalQueryRepresentation()); | ||
155 | // CubeSat3U(From) | ||
156 | new TypeConstraint(body, Tuples.flatTupleOf(var_From), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CubeSat3U"))); | ||
157 | bodies.add(body); | ||
158 | } | ||
159 | { | ||
160 | PBody body = new PBody(this); | ||
161 | PVariable var_From = body.getOrCreateVariableByName("From"); | ||
162 | PVariable var_To = body.getOrCreateVariableByName("To"); | ||
163 | new TypeConstraint(body, Tuples.flatTupleOf(var_From), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | ||
164 | new TypeConstraint(body, Tuples.flatTupleOf(var_To), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | ||
165 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
166 | new ExportedParameter(body, var_From, parameter_From), | ||
167 | new ExportedParameter(body, var_To, parameter_To) | ||
168 | )); | ||
169 | // find matchingAntenna(From, To) | ||
170 | new PositivePatternCall(body, Tuples.flatTupleOf(var_From, var_To), MatchingAntenna.instance().getInternalQueryRepresentation()); | ||
171 | // CubeSat3U(From) | ||
172 | new TypeConstraint(body, Tuples.flatTupleOf(var_From), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CubeSat3U"))); | ||
173 | // GroundStationNetwork(To) | ||
174 | new TypeConstraint(body, Tuples.flatTupleOf(var_To), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "GroundStationNetwork"))); | ||
175 | bodies.add(body); | ||
176 | } | ||
177 | return bodies; | ||
178 | } | ||
179 | } | ||
180 | } | ||