aboutsummaryrefslogtreecommitdiffstats
path: root/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kris7topher@gmail.com>2019-05-21 17:00:01 -0400
committerLibravatar Kristóf Marussy <kris7topher@gmail.com>2019-05-21 17:00:01 -0400
commitfd3684b5440dacca0c4bf4be15930555a79e2100 (patch)
tree24120a5c7fdae1532529fa0c4687dc1078cd1cde /Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java
parentInterval hull aggregation operator (diff)
downloadVIATRA-Generator-fd3684b5440dacca0c4bf4be15930555a79e2100.tar.gz
VIATRA-Generator-fd3684b5440dacca0c4bf4be15930555a79e2100.tar.zst
VIATRA-Generator-fd3684b5440dacca0c4bf4be15930555a79e2100.zip
VIATRA DSE and COIN-OR CBC implementations of CPS case study
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java')
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java553
1 files changed, 553 insertions, 0 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java
new file mode 100644
index 00000000..f475c9e9
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java
@@ -0,0 +1,553 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.cps.queries;
5
6import hu.bme.mit.inf.dslreasoner.domains.cps.HostType;
7import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.UnallocatedAppInstance;
8import java.util.Arrays;
9import java.util.Collection;
10import java.util.LinkedHashSet;
11import java.util.List;
12import java.util.Objects;
13import java.util.Optional;
14import java.util.Set;
15import java.util.function.Consumer;
16import java.util.stream.Collectors;
17import java.util.stream.Stream;
18import org.apache.log4j.Logger;
19import org.eclipse.emf.ecore.EClass;
20import org.eclipse.viatra.query.runtime.api.IPatternMatch;
21import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
22import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
23import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
24import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
25import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
26import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
27import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
28import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
29import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
30import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
31import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
34import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
35import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
37import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
38import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
39import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
40import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
41import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
42
43/**
44 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
45 *
46 * <p>Original source:
47 * <code><pre>
48 * pattern createHostInstance(HostType : HostType) {
49 * find unallocatedAppInstance(App);
50 * ApplicationInstance.type.requirements.hostType(App, HostType);
51 * }
52 * </pre></code>
53 *
54 * @see Matcher
55 * @see Match
56 *
57 */
58@SuppressWarnings("all")
59public final class CreateHostInstance extends BaseGeneratedEMFQuerySpecification<CreateHostInstance.Matcher> {
60 /**
61 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.createHostInstance pattern,
62 * to be used in conjunction with {@link Matcher}.
63 *
64 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
65 * Each instance is a (possibly partial) substitution of pattern parameters,
66 * usable to represent a match of the pattern in the result of a query,
67 * or to specify the bound (fixed) input parameters when issuing a query.
68 *
69 * @see Matcher
70 *
71 */
72 public static abstract class Match extends BasePatternMatch {
73 private HostType fHostType;
74
75 private static List<String> parameterNames = makeImmutableList("HostType");
76
77 private Match(final HostType pHostType) {
78 this.fHostType = pHostType;
79 }
80
81 @Override
82 public Object get(final String parameterName) {
83 if ("HostType".equals(parameterName)) return this.fHostType;
84 return null;
85 }
86
87 public HostType getHostType() {
88 return this.fHostType;
89 }
90
91 @Override
92 public boolean set(final String parameterName, final Object newValue) {
93 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
94 if ("HostType".equals(parameterName) ) {
95 this.fHostType = (HostType) newValue;
96 return true;
97 }
98 return false;
99 }
100
101 public void setHostType(final HostType pHostType) {
102 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
103 this.fHostType = pHostType;
104 }
105
106 @Override
107 public String patternName() {
108 return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.createHostInstance";
109 }
110
111 @Override
112 public List<String> parameterNames() {
113 return CreateHostInstance.Match.parameterNames;
114 }
115
116 @Override
117 public Object[] toArray() {
118 return new Object[]{fHostType};
119 }
120
121 @Override
122 public CreateHostInstance.Match toImmutable() {
123 return isMutable() ? newMatch(fHostType) : this;
124 }
125
126 @Override
127 public String prettyPrint() {
128 StringBuilder result = new StringBuilder();
129 result.append("\"HostType\"=" + prettyPrintValue(fHostType));
130 return result.toString();
131 }
132
133 @Override
134 public int hashCode() {
135 return Objects.hash(fHostType);
136 }
137
138 @Override
139 public boolean equals(final Object obj) {
140 if (this == obj)
141 return true;
142 if (obj == null) {
143 return false;
144 }
145 if ((obj instanceof CreateHostInstance.Match)) {
146 CreateHostInstance.Match other = (CreateHostInstance.Match) obj;
147 return Objects.equals(fHostType, other.fHostType);
148 } else {
149 // this should be infrequent
150 if (!(obj instanceof IPatternMatch)) {
151 return false;
152 }
153 IPatternMatch otherSig = (IPatternMatch) obj;
154 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
155 }
156 }
157
158 @Override
159 public CreateHostInstance specification() {
160 return CreateHostInstance.instance();
161 }
162
163 /**
164 * Returns an empty, mutable match.
165 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
166 *
167 * @return the empty match.
168 *
169 */
170 public static CreateHostInstance.Match newEmptyMatch() {
171 return new Mutable(null);
172 }
173
174 /**
175 * Returns a mutable (partial) match.
176 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
177 *
178 * @param pHostType the fixed value of pattern parameter HostType, or null if not bound.
179 * @return the new, mutable (partial) match object.
180 *
181 */
182 public static CreateHostInstance.Match newMutableMatch(final HostType pHostType) {
183 return new Mutable(pHostType);
184 }
185
186 /**
187 * Returns a new (partial) match.
188 * This can be used e.g. to call the matcher with a partial match.
189 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
190 * @param pHostType the fixed value of pattern parameter HostType, or null if not bound.
191 * @return the (partial) match object.
192 *
193 */
194 public static CreateHostInstance.Match newMatch(final HostType pHostType) {
195 return new Immutable(pHostType);
196 }
197
198 private static final class Mutable extends CreateHostInstance.Match {
199 Mutable(final HostType pHostType) {
200 super(pHostType);
201 }
202
203 @Override
204 public boolean isMutable() {
205 return true;
206 }
207 }
208
209 private static final class Immutable extends CreateHostInstance.Match {
210 Immutable(final HostType pHostType) {
211 super(pHostType);
212 }
213
214 @Override
215 public boolean isMutable() {
216 return false;
217 }
218 }
219 }
220
221 /**
222 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.createHostInstance pattern,
223 * providing pattern-specific query methods.
224 *
225 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
226 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
227 *
228 * <p>Matches of the pattern will be represented as {@link Match}.
229 *
230 * <p>Original source:
231 * <code><pre>
232 * pattern createHostInstance(HostType : HostType) {
233 * find unallocatedAppInstance(App);
234 * ApplicationInstance.type.requirements.hostType(App, HostType);
235 * }
236 * </pre></code>
237 *
238 * @see Match
239 * @see CreateHostInstance
240 *
241 */
242 public static class Matcher extends BaseMatcher<CreateHostInstance.Match> {
243 /**
244 * Initializes the pattern matcher within an existing VIATRA Query engine.
245 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
246 *
247 * @param engine the existing VIATRA Query engine in which this matcher will be created.
248 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
249 *
250 */
251 public static CreateHostInstance.Matcher on(final ViatraQueryEngine engine) {
252 // check if matcher already exists
253 Matcher matcher = engine.getExistingMatcher(querySpecification());
254 if (matcher == null) {
255 matcher = (Matcher)engine.getMatcher(querySpecification());
256 }
257 return matcher;
258 }
259
260 /**
261 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
262 * @return an initialized matcher
263 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
264 *
265 */
266 public static CreateHostInstance.Matcher create() {
267 return new Matcher();
268 }
269
270 private static final int POSITION_HOSTTYPE = 0;
271
272 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(CreateHostInstance.Matcher.class);
273
274 /**
275 * Initializes the pattern matcher within an existing VIATRA Query engine.
276 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
277 *
278 * @param engine the existing VIATRA Query engine in which this matcher will be created.
279 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
280 *
281 */
282 private Matcher() {
283 super(querySpecification());
284 }
285
286 /**
287 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
288 * @param pHostType the fixed value of pattern parameter HostType, or null if not bound.
289 * @return matches represented as a Match object.
290 *
291 */
292 public Collection<CreateHostInstance.Match> getAllMatches(final HostType pHostType) {
293 return rawStreamAllMatches(new Object[]{pHostType}).collect(Collectors.toSet());
294 }
295
296 /**
297 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
298 * </p>
299 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
300 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
301 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
302 * @param pHostType the fixed value of pattern parameter HostType, or null if not bound.
303 * @return a stream of matches represented as a Match object.
304 *
305 */
306 public Stream<CreateHostInstance.Match> streamAllMatches(final HostType pHostType) {
307 return rawStreamAllMatches(new Object[]{pHostType});
308 }
309
310 /**
311 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
312 * Neither determinism nor randomness of selection is guaranteed.
313 * @param pHostType the fixed value of pattern parameter HostType, or null if not bound.
314 * @return a match represented as a Match object, or null if no match is found.
315 *
316 */
317 public Optional<CreateHostInstance.Match> getOneArbitraryMatch(final HostType pHostType) {
318 return rawGetOneArbitraryMatch(new Object[]{pHostType});
319 }
320
321 /**
322 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
323 * under any possible substitution of the unspecified parameters (if any).
324 * @param pHostType the fixed value of pattern parameter HostType, or null if not bound.
325 * @return true if the input is a valid (partial) match of the pattern.
326 *
327 */
328 public boolean hasMatch(final HostType pHostType) {
329 return rawHasMatch(new Object[]{pHostType});
330 }
331
332 /**
333 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
334 * @param pHostType the fixed value of pattern parameter HostType, or null if not bound.
335 * @return the number of pattern matches found.
336 *
337 */
338 public int countMatches(final HostType pHostType) {
339 return rawCountMatches(new Object[]{pHostType});
340 }
341
342 /**
343 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
344 * Neither determinism nor randomness of selection is guaranteed.
345 * @param pHostType the fixed value of pattern parameter HostType, or null if not bound.
346 * @param processor the action that will process the selected match.
347 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
348 *
349 */
350 public boolean forOneArbitraryMatch(final HostType pHostType, final Consumer<? super CreateHostInstance.Match> processor) {
351 return rawForOneArbitraryMatch(new Object[]{pHostType}, processor);
352 }
353
354 /**
355 * Returns a new (partial) match.
356 * This can be used e.g. to call the matcher with a partial match.
357 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
358 * @param pHostType the fixed value of pattern parameter HostType, or null if not bound.
359 * @return the (partial) match object.
360 *
361 */
362 public CreateHostInstance.Match newMatch(final HostType pHostType) {
363 return CreateHostInstance.Match.newMatch(pHostType);
364 }
365
366 /**
367 * Retrieve the set of values that occur in matches for HostType.
368 * @return the Set of all values or empty set if there are no matches
369 *
370 */
371 protected Stream<HostType> rawStreamAllValuesOfHostType(final Object[] parameters) {
372 return rawStreamAllValues(POSITION_HOSTTYPE, parameters).map(HostType.class::cast);
373 }
374
375 /**
376 * Retrieve the set of values that occur in matches for HostType.
377 * @return the Set of all values or empty set if there are no matches
378 *
379 */
380 public Set<HostType> getAllValuesOfHostType() {
381 return rawStreamAllValuesOfHostType(emptyArray()).collect(Collectors.toSet());
382 }
383
384 /**
385 * Retrieve the set of values that occur in matches for HostType.
386 * @return the Set of all values or empty set if there are no matches
387 *
388 */
389 public Stream<HostType> streamAllValuesOfHostType() {
390 return rawStreamAllValuesOfHostType(emptyArray());
391 }
392
393 @Override
394 protected CreateHostInstance.Match tupleToMatch(final Tuple t) {
395 try {
396 return CreateHostInstance.Match.newMatch((HostType) t.get(POSITION_HOSTTYPE));
397 } catch(ClassCastException e) {
398 LOGGER.error("Element(s) in tuple not properly typed!",e);
399 return null;
400 }
401 }
402
403 @Override
404 protected CreateHostInstance.Match arrayToMatch(final Object[] match) {
405 try {
406 return CreateHostInstance.Match.newMatch((HostType) match[POSITION_HOSTTYPE]);
407 } catch(ClassCastException e) {
408 LOGGER.error("Element(s) in array not properly typed!",e);
409 return null;
410 }
411 }
412
413 @Override
414 protected CreateHostInstance.Match arrayToMatchMutable(final Object[] match) {
415 try {
416 return CreateHostInstance.Match.newMutableMatch((HostType) match[POSITION_HOSTTYPE]);
417 } catch(ClassCastException e) {
418 LOGGER.error("Element(s) in array not properly typed!",e);
419 return null;
420 }
421 }
422
423 /**
424 * @return the singleton instance of the query specification of this pattern
425 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
426 *
427 */
428 public static IQuerySpecification<CreateHostInstance.Matcher> querySpecification() {
429 return CreateHostInstance.instance();
430 }
431 }
432
433 private CreateHostInstance() {
434 super(GeneratedPQuery.INSTANCE);
435 }
436
437 /**
438 * @return the singleton instance of the query specification
439 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
440 *
441 */
442 public static CreateHostInstance instance() {
443 try{
444 return LazyHolder.INSTANCE;
445 } catch (ExceptionInInitializerError err) {
446 throw processInitializerError(err);
447 }
448 }
449
450 @Override
451 protected CreateHostInstance.Matcher instantiate(final ViatraQueryEngine engine) {
452 return CreateHostInstance.Matcher.on(engine);
453 }
454
455 @Override
456 public CreateHostInstance.Matcher instantiate() {
457 return CreateHostInstance.Matcher.create();
458 }
459
460 @Override
461 public CreateHostInstance.Match newEmptyMatch() {
462 return CreateHostInstance.Match.newEmptyMatch();
463 }
464
465 @Override
466 public CreateHostInstance.Match newMatch(final Object... parameters) {
467 return CreateHostInstance.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.HostType) parameters[0]);
468 }
469
470 /**
471 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance (visibility: PUBLIC, simpleName: CreateHostInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
472 * <b>not</b> at the class load time of the outer class,
473 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance (visibility: PUBLIC, simpleName: CreateHostInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
474 *
475 * <p> This workaround is required e.g. to support recursion.
476 *
477 */
478 private static class LazyHolder {
479 private static final CreateHostInstance INSTANCE = new CreateHostInstance();
480
481 /**
482 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
483 * This initialization order is required to support indirect recursion.
484 *
485 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
486 *
487 */
488 private static final Object STATIC_INITIALIZER = ensureInitialized();
489
490 public static Object ensureInitialized() {
491 INSTANCE.ensureInitializedInternal();
492 return null;
493 }
494 }
495
496 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
497 private static final CreateHostInstance.GeneratedPQuery INSTANCE = new GeneratedPQuery();
498
499 private final PParameter parameter_HostType = new PParameter("HostType", "hu.bme.mit.inf.dslreasoner.domains.cps.HostType", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostType")), PParameterDirection.INOUT);
500
501 private final List<PParameter> parameters = Arrays.asList(parameter_HostType);
502
503 private GeneratedPQuery() {
504 super(PVisibility.PUBLIC);
505 }
506
507 @Override
508 public String getFullyQualifiedName() {
509 return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.createHostInstance";
510 }
511
512 @Override
513 public List<String> getParameterNames() {
514 return Arrays.asList("HostType");
515 }
516
517 @Override
518 public List<PParameter> getParameters() {
519 return parameters;
520 }
521
522 @Override
523 public Set<PBody> doGetContainedBodies() {
524 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
525 Set<PBody> bodies = new LinkedHashSet<>();
526 {
527 PBody body = new PBody(this);
528 PVariable var_HostType = body.getOrCreateVariableByName("HostType");
529 PVariable var_App = body.getOrCreateVariableByName("App");
530 new TypeConstraint(body, Tuples.flatTupleOf(var_HostType), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType")));
531 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
532 new ExportedParameter(body, var_HostType, parameter_HostType)
533 ));
534 // find unallocatedAppInstance(App)
535 new PositivePatternCall(body, Tuples.flatTupleOf(var_App), UnallocatedAppInstance.instance().getInternalQueryRepresentation());
536 // ApplicationInstance.type.requirements.hostType(App, HostType)
537 new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance")));
538 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
539 new TypeConstraint(body, Tuples.flatTupleOf(var_App, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "type")));
540 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationType")));
541 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
542 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationType", "requirements")));
543 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement")));
544 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
545 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ResourceRequirement", "hostType")));
546 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType")));
547 new Equality(body, var__virtual_2_, var_HostType);
548 bodies.add(body);
549 }
550 return bodies;
551 }
552 }
553}