diff options
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/BasePrice.java')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/BasePrice.java | 195 |
1 files changed, 0 insertions, 195 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/BasePrice.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/BasePrice.java deleted file mode 100644 index 833148f9..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/BasePrice.java +++ /dev/null | |||
@@ -1,195 +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 java.util.Arrays; | ||
7 | import java.util.LinkedHashSet; | ||
8 | import java.util.List; | ||
9 | import java.util.Set; | ||
10 | import org.eclipse.emf.ecore.EClass; | ||
11 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; | ||
12 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher; | ||
13 | import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; | ||
14 | import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; | ||
15 | import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey; | ||
16 | import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; | ||
17 | import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; | ||
18 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; | ||
19 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; | ||
20 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint; | ||
21 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue; | ||
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 basePrice(Spacecraft : Spacecraft, BasePrice : java Double) { | ||
34 | * CubeSat3U(Spacecraft); | ||
35 | * BasePrice == 250000.0; | ||
36 | * } or { | ||
37 | * CubeSat6U(Spacecraft); | ||
38 | * BasePrice == 750000.0; | ||
39 | * } or { | ||
40 | * SmallSat(Spacecraft); | ||
41 | * BasePrice == 3000000.0; | ||
42 | * } | ||
43 | * </pre></code> | ||
44 | * | ||
45 | * @see GenericPatternMatcher | ||
46 | * @see GenericPatternMatch | ||
47 | * | ||
48 | */ | ||
49 | @SuppressWarnings("all") | ||
50 | public final class BasePrice extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { | ||
51 | private BasePrice() { | ||
52 | super(GeneratedPQuery.INSTANCE); | ||
53 | } | ||
54 | |||
55 | /** | ||
56 | * @return the singleton instance of the query specification | ||
57 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | ||
58 | * | ||
59 | */ | ||
60 | public static BasePrice instance() { | ||
61 | try{ | ||
62 | return LazyHolder.INSTANCE; | ||
63 | } catch (ExceptionInInitializerError err) { | ||
64 | throw processInitializerError(err); | ||
65 | } | ||
66 | } | ||
67 | |||
68 | /** | ||
69 | * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice (visibility: PUBLIC, simpleName: BasePrice, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice, 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 | ||
70 | * <b>not</b> at the class load time of the outer class, | ||
71 | * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice (visibility: PUBLIC, simpleName: BasePrice, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice, 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()}. | ||
72 | * | ||
73 | * <p> This workaround is required e.g. to support recursion. | ||
74 | * | ||
75 | */ | ||
76 | private static class LazyHolder { | ||
77 | private static final BasePrice INSTANCE = new BasePrice(); | ||
78 | |||
79 | /** | ||
80 | * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. | ||
81 | * This initialization order is required to support indirect recursion. | ||
82 | * | ||
83 | * <p> The static initializer is defined using a helper field to work around limitations of the code generator. | ||
84 | * | ||
85 | */ | ||
86 | private static final Object STATIC_INITIALIZER = ensureInitialized(); | ||
87 | |||
88 | public static Object ensureInitialized() { | ||
89 | INSTANCE.ensureInitializedInternal(); | ||
90 | return null; | ||
91 | } | ||
92 | } | ||
93 | |||
94 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | ||
95 | private static final BasePrice.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | ||
96 | |||
97 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | ||
98 | |||
99 | private final PParameter parameter_BasePrice = new PParameter("BasePrice", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT); | ||
100 | |||
101 | private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_BasePrice); | ||
102 | |||
103 | private GeneratedPQuery() { | ||
104 | super(PVisibility.PRIVATE); | ||
105 | } | ||
106 | |||
107 | @Override | ||
108 | public String getFullyQualifiedName() { | ||
109 | return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.basePrice"; | ||
110 | } | ||
111 | |||
112 | @Override | ||
113 | public List<String> getParameterNames() { | ||
114 | return Arrays.asList("Spacecraft","BasePrice"); | ||
115 | } | ||
116 | |||
117 | @Override | ||
118 | public List<PParameter> getParameters() { | ||
119 | return parameters; | ||
120 | } | ||
121 | |||
122 | @Override | ||
123 | public Set<PBody> doGetContainedBodies() { | ||
124 | setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); | ||
125 | Set<PBody> bodies = new LinkedHashSet<>(); | ||
126 | { | ||
127 | PBody body = new PBody(this); | ||
128 | PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft"); | ||
129 | PVariable var_BasePrice = body.getOrCreateVariableByName("BasePrice"); | ||
130 | new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | ||
131 | new TypeFilterConstraint(body, Tuples.flatTupleOf(var_BasePrice), new JavaTransitiveInstancesKey(java.lang.Double.class)); | ||
132 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
133 | new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft), | ||
134 | new ExportedParameter(body, var_BasePrice, parameter_BasePrice) | ||
135 | )); | ||
136 | // CubeSat3U(Spacecraft) | ||
137 | new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CubeSat3U"))); | ||
138 | // BasePrice == 250000.0 | ||
139 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); | ||
140 | new ConstantValue(body, var__virtual_0_, 250000.0); | ||
141 | new Equality(body, var_BasePrice, var__virtual_0_); | ||
142 | bodies.add(body); | ||
143 | } | ||
144 | { | ||
145 | PBody body = new PBody(this); | ||
146 | PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft"); | ||
147 | PVariable var_BasePrice = body.getOrCreateVariableByName("BasePrice"); | ||
148 | new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | ||
149 | new TypeFilterConstraint(body, Tuples.flatTupleOf(var_BasePrice), new JavaTransitiveInstancesKey(java.lang.Double.class)); | ||
150 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
151 | new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft), | ||
152 | new ExportedParameter(body, var_BasePrice, parameter_BasePrice) | ||
153 | )); | ||
154 | // CubeSat6U(Spacecraft) | ||
155 | new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CubeSat6U"))); | ||
156 | // BasePrice == 750000.0 | ||
157 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); | ||
158 | new ConstantValue(body, var__virtual_0_, 750000.0); | ||
159 | new Equality(body, var_BasePrice, var__virtual_0_); | ||
160 | bodies.add(body); | ||
161 | } | ||
162 | { | ||
163 | PBody body = new PBody(this); | ||
164 | PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft"); | ||
165 | PVariable var_BasePrice = body.getOrCreateVariableByName("BasePrice"); | ||
166 | new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | ||
167 | new TypeFilterConstraint(body, Tuples.flatTupleOf(var_BasePrice), new JavaTransitiveInstancesKey(java.lang.Double.class)); | ||
168 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
169 | new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft), | ||
170 | new ExportedParameter(body, var_BasePrice, parameter_BasePrice) | ||
171 | )); | ||
172 | // SmallSat(Spacecraft) | ||
173 | new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "SmallSat"))); | ||
174 | // BasePrice == 3000000.0 | ||
175 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); | ||
176 | new ConstantValue(body, var__virtual_0_, 3000000.0); | ||
177 | new Equality(body, var_BasePrice, var__virtual_0_); | ||
178 | bodies.add(body); | ||
179 | } | ||
180 | return bodies; | ||
181 | } | ||
182 | } | ||
183 | |||
184 | private static double evaluateExpression_1_1() { | ||
185 | return 250000.0; | ||
186 | } | ||
187 | |||
188 | private static double evaluateExpression_2_1() { | ||
189 | return 750000.0; | ||
190 | } | ||
191 | |||
192 | private static double evaluateExpression_3_1() { | ||
193 | return 3000000.0; | ||
194 | } | ||
195 | } | ||