diff options
author | 2019-05-04 17:56:18 -0400 | |
---|---|---|
committer | 2019-05-04 17:56:18 -0400 | |
commit | b9aaa826e1e7504958b6e75f35e9dcd09086a13e (patch) | |
tree | df7b83804e74efb86fb845862c5523d04d7edeb1 /Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IncomingData.java | |
parent | Merge remote-tracking branch 'origin/master' into kris (diff) | |
download | VIATRA-Generator-b9aaa826e1e7504958b6e75f35e9dcd09086a13e.tar.gz VIATRA-Generator-b9aaa826e1e7504958b6e75f35e9dcd09086a13e.tar.zst VIATRA-Generator-b9aaa826e1e7504958b6e75f35e9dcd09086a13e.zip |
Metrics for satellite case study
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IncomingData.java')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IncomingData.java | 145 |
1 files changed, 145 insertions, 0 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IncomingData.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IncomingData.java new file mode 100644 index 00000000..114bbf33 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IncomingData.java | |||
@@ -0,0 +1,145 @@ | |||
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.IndirectCommunicationLink; | ||
7 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.ScienceData; | ||
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.context.common.JavaTransitiveInstancesKey; | ||
18 | import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; | ||
19 | import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; | ||
20 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; | ||
21 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint; | ||
22 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; | ||
23 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; | ||
24 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; | ||
25 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; | ||
26 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; | ||
27 | import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | ||
28 | |||
29 | /** | ||
30 | * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way. | ||
31 | * | ||
32 | * <p>Original source: | ||
33 | * <code><pre> | ||
34 | * private pattern incomingData(Spacecraft : Spacecraft, Source : Spacecraft, Data : java Double) { | ||
35 | * find indirectCommunicationLink(Source, Spacecraft); | ||
36 | * find scienceData(Source, Data); | ||
37 | * } | ||
38 | * </pre></code> | ||
39 | * | ||
40 | * @see GenericPatternMatcher | ||
41 | * @see GenericPatternMatch | ||
42 | * | ||
43 | */ | ||
44 | @SuppressWarnings("all") | ||
45 | public final class IncomingData extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { | ||
46 | private IncomingData() { | ||
47 | super(GeneratedPQuery.INSTANCE); | ||
48 | } | ||
49 | |||
50 | /** | ||
51 | * @return the singleton instance of the query specification | ||
52 | * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded | ||
53 | * | ||
54 | */ | ||
55 | public static IncomingData instance() { | ||
56 | try{ | ||
57 | return LazyHolder.INSTANCE; | ||
58 | } catch (ExceptionInInitializerError err) { | ||
59 | throw processInitializerError(err); | ||
60 | } | ||
61 | } | ||
62 | |||
63 | /** | ||
64 | * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData (visibility: PUBLIC, simpleName: IncomingData, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData, 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 | ||
65 | * <b>not</b> at the class load time of the outer class, | ||
66 | * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData (visibility: PUBLIC, simpleName: IncomingData, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData, 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()}. | ||
67 | * | ||
68 | * <p> This workaround is required e.g. to support recursion. | ||
69 | * | ||
70 | */ | ||
71 | private static class LazyHolder { | ||
72 | private static final IncomingData INSTANCE = new IncomingData(); | ||
73 | |||
74 | /** | ||
75 | * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned. | ||
76 | * This initialization order is required to support indirect recursion. | ||
77 | * | ||
78 | * <p> The static initializer is defined using a helper field to work around limitations of the code generator. | ||
79 | * | ||
80 | */ | ||
81 | private static final Object STATIC_INITIALIZER = ensureInitialized(); | ||
82 | |||
83 | public static Object ensureInitialized() { | ||
84 | INSTANCE.ensureInitializedInternal(); | ||
85 | return null; | ||
86 | } | ||
87 | } | ||
88 | |||
89 | private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { | ||
90 | private static final IncomingData.GeneratedPQuery INSTANCE = new GeneratedPQuery(); | ||
91 | |||
92 | private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | ||
93 | |||
94 | private final PParameter parameter_Source = new PParameter("Source", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); | ||
95 | |||
96 | private final PParameter parameter_Data = new PParameter("Data", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT); | ||
97 | |||
98 | private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_Source, parameter_Data); | ||
99 | |||
100 | private GeneratedPQuery() { | ||
101 | super(PVisibility.PRIVATE); | ||
102 | } | ||
103 | |||
104 | @Override | ||
105 | public String getFullyQualifiedName() { | ||
106 | return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.incomingData"; | ||
107 | } | ||
108 | |||
109 | @Override | ||
110 | public List<String> getParameterNames() { | ||
111 | return Arrays.asList("Spacecraft","Source","Data"); | ||
112 | } | ||
113 | |||
114 | @Override | ||
115 | public List<PParameter> getParameters() { | ||
116 | return parameters; | ||
117 | } | ||
118 | |||
119 | @Override | ||
120 | public Set<PBody> doGetContainedBodies() { | ||
121 | setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); | ||
122 | Set<PBody> bodies = new LinkedHashSet<>(); | ||
123 | { | ||
124 | PBody body = new PBody(this); | ||
125 | PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft"); | ||
126 | PVariable var_Source = body.getOrCreateVariableByName("Source"); | ||
127 | PVariable var_Data = body.getOrCreateVariableByName("Data"); | ||
128 | new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | ||
129 | new TypeConstraint(body, Tuples.flatTupleOf(var_Source), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | ||
130 | new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Data), new JavaTransitiveInstancesKey(java.lang.Double.class)); | ||
131 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | ||
132 | new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft), | ||
133 | new ExportedParameter(body, var_Source, parameter_Source), | ||
134 | new ExportedParameter(body, var_Data, parameter_Data) | ||
135 | )); | ||
136 | // find indirectCommunicationLink(Source, Spacecraft) | ||
137 | new PositivePatternCall(body, Tuples.flatTupleOf(var_Source, var_Spacecraft), IndirectCommunicationLink.instance().getInternalQueryRepresentation()); | ||
138 | // find scienceData(Source, Data) | ||
139 | new PositivePatternCall(body, Tuples.flatTupleOf(var_Source, var_Data), ScienceData.instance().getInternalQueryRepresentation()); | ||
140 | bodies.add(body); | ||
141 | } | ||
142 | return bodies; | ||
143 | } | ||
144 | } | ||
145 | } | ||