diff options
Diffstat (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MatchingAntenna.java')
-rw-r--r-- | Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MatchingAntenna.java | 67 |
1 files changed, 20 insertions, 47 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MatchingAntenna.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MatchingAntenna.java index 3a52ad1d..6ee10814 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MatchingAntenna.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MatchingAntenna.java | |||
@@ -3,22 +3,22 @@ | |||
3 | */ | 3 | */ |
4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal; | 4 | package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal; |
5 | 5 | ||
6 | import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MatchingCommSubsystem; | ||
6 | import java.util.Arrays; | 7 | import java.util.Arrays; |
7 | import java.util.LinkedHashSet; | 8 | import java.util.LinkedHashSet; |
8 | import java.util.List; | 9 | import java.util.List; |
9 | import java.util.Set; | 10 | import java.util.Set; |
10 | import org.eclipse.emf.ecore.EClass; | 11 | import org.eclipse.emf.ecore.EClass; |
11 | import org.eclipse.emf.ecore.EDataType; | ||
12 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; | 12 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; |
13 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher; | 13 | import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher; |
14 | import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; | 14 | import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; |
15 | import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey; | ||
16 | import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; | 15 | import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; |
17 | import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; | 16 | import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; |
18 | import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; | 17 | import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; |
19 | import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; | 18 | import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; |
20 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; | 19 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; |
21 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; | 20 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; |
21 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; | ||
22 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; | 22 | import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; |
23 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; | 23 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; |
24 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; | 24 | import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; |
@@ -30,11 +30,10 @@ import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; | |||
30 | * | 30 | * |
31 | * <p>Original source: | 31 | * <p>Original source: |
32 | * <code><pre> | 32 | * <code><pre> |
33 | * private pattern matchingAntenna(From : Spacecraft, To : CommunicatingElement, Band : TransceiverBand) { | 33 | * private pattern matchingAntenna(From : Spacecraft, To : CommunicatingElement) { |
34 | * CommunicatingElement.commSubsystem.band(From, Band); | 34 | * CommunicatingElement.commSubsystem(From, FromSys); |
35 | * CommunicatingElement.commSubsystem.band(To, Band); | 35 | * CommunicatingElement.commSubsystem(To, ToSys); |
36 | * CommunicatingElement.commSubsystem.gain(From, Gain); | 36 | * find matchingCommSubsystem(FromSys, ToSys); |
37 | * CommunicatingElement.commSubsystem.gain(To, Gain); | ||
38 | * } | 37 | * } |
39 | * </pre></code> | 38 | * </pre></code> |
40 | * | 39 | * |
@@ -94,9 +93,7 @@ public final class MatchingAntenna extends BaseGeneratedEMFQuerySpecificationWit | |||
94 | 93 | ||
95 | private final PParameter parameter_To = new PParameter("To", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); | 94 | private final PParameter parameter_To = new PParameter("To", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); |
96 | 95 | ||
97 | private final PParameter parameter_Band = new PParameter("Band", "satellite.TransceiverBand", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "TransceiverBand")), PParameterDirection.INOUT); | 96 | private final List<PParameter> parameters = Arrays.asList(parameter_From, parameter_To); |
98 | |||
99 | private final List<PParameter> parameters = Arrays.asList(parameter_From, parameter_To, parameter_Band); | ||
100 | 97 | ||
101 | private GeneratedPQuery() { | 98 | private GeneratedPQuery() { |
102 | super(PVisibility.PRIVATE); | 99 | super(PVisibility.PRIVATE); |
@@ -109,7 +106,7 @@ public final class MatchingAntenna extends BaseGeneratedEMFQuerySpecificationWit | |||
109 | 106 | ||
110 | @Override | 107 | @Override |
111 | public List<String> getParameterNames() { | 108 | public List<String> getParameterNames() { |
112 | return Arrays.asList("From","To","Band"); | 109 | return Arrays.asList("From","To"); |
113 | } | 110 | } |
114 | 111 | ||
115 | @Override | 112 | @Override |
@@ -125,52 +122,28 @@ public final class MatchingAntenna extends BaseGeneratedEMFQuerySpecificationWit | |||
125 | PBody body = new PBody(this); | 122 | PBody body = new PBody(this); |
126 | PVariable var_From = body.getOrCreateVariableByName("From"); | 123 | PVariable var_From = body.getOrCreateVariableByName("From"); |
127 | PVariable var_To = body.getOrCreateVariableByName("To"); | 124 | PVariable var_To = body.getOrCreateVariableByName("To"); |
128 | PVariable var_Band = body.getOrCreateVariableByName("Band"); | 125 | PVariable var_FromSys = body.getOrCreateVariableByName("FromSys"); |
129 | PVariable var_Gain = body.getOrCreateVariableByName("Gain"); | 126 | PVariable var_ToSys = body.getOrCreateVariableByName("ToSys"); |
130 | new TypeConstraint(body, Tuples.flatTupleOf(var_From), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); | 127 | new TypeConstraint(body, Tuples.flatTupleOf(var_From), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); |
131 | new TypeConstraint(body, Tuples.flatTupleOf(var_To), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | 128 | new TypeConstraint(body, Tuples.flatTupleOf(var_To), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); |
132 | new TypeConstraint(body, Tuples.flatTupleOf(var_Band), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "TransceiverBand"))); | ||
133 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( | 129 | body.setSymbolicParameters(Arrays.<ExportedParameter>asList( |
134 | new ExportedParameter(body, var_From, parameter_From), | 130 | new ExportedParameter(body, var_From, parameter_From), |
135 | new ExportedParameter(body, var_To, parameter_To), | 131 | new ExportedParameter(body, var_To, parameter_To) |
136 | new ExportedParameter(body, var_Band, parameter_Band) | ||
137 | )); | 132 | )); |
138 | // CommunicatingElement.commSubsystem.band(From, Band) | 133 | // CommunicatingElement.commSubsystem(From, FromSys) |
139 | new TypeConstraint(body, Tuples.flatTupleOf(var_From), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | 134 | new TypeConstraint(body, Tuples.flatTupleOf(var_From), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); |
140 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); | 135 | PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); |
141 | new TypeConstraint(body, Tuples.flatTupleOf(var_From, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); | 136 | new TypeConstraint(body, Tuples.flatTupleOf(var_From, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); |
142 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); | 137 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); |
143 | PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); | 138 | new Equality(body, var__virtual_0_, var_FromSys); |
144 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "band"))); | 139 | // CommunicatingElement.commSubsystem(To, ToSys) |
145 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "TransceiverBand"))); | ||
146 | new Equality(body, var__virtual_1_, var_Band); | ||
147 | // CommunicatingElement.commSubsystem.band(To, Band) | ||
148 | new TypeConstraint(body, Tuples.flatTupleOf(var_To), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | 140 | new TypeConstraint(body, Tuples.flatTupleOf(var_To), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); |
149 | PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); | 141 | PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); |
150 | new TypeConstraint(body, Tuples.flatTupleOf(var_To, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); | 142 | new TypeConstraint(body, Tuples.flatTupleOf(var_To, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); |
151 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); | 143 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); |
152 | PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}"); | 144 | new Equality(body, var__virtual_1_, var_ToSys); |
153 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_, var__virtual_3_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "band"))); | 145 | // find matchingCommSubsystem(FromSys, ToSys) |
154 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_3_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "TransceiverBand"))); | 146 | new PositivePatternCall(body, Tuples.flatTupleOf(var_FromSys, var_ToSys), MatchingCommSubsystem.instance().getInternalQueryRepresentation()); |
155 | new Equality(body, var__virtual_3_, var_Band); | ||
156 | // CommunicatingElement.commSubsystem.gain(From, Gain) | ||
157 | new TypeConstraint(body, Tuples.flatTupleOf(var_From), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | ||
158 | PVariable var__virtual_4_ = body.getOrCreateVariableByName(".virtual{4}"); | ||
159 | new TypeConstraint(body, Tuples.flatTupleOf(var_From, var__virtual_4_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); | ||
160 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_4_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); | ||
161 | PVariable var__virtual_5_ = body.getOrCreateVariableByName(".virtual{5}"); | ||
162 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_4_, var__virtual_5_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "gain"))); | ||
163 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_5_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "AntennaGain"))); | ||
164 | new Equality(body, var__virtual_5_, var_Gain); | ||
165 | // CommunicatingElement.commSubsystem.gain(To, Gain) | ||
166 | new TypeConstraint(body, Tuples.flatTupleOf(var_To), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); | ||
167 | PVariable var__virtual_6_ = body.getOrCreateVariableByName(".virtual{6}"); | ||
168 | new TypeConstraint(body, Tuples.flatTupleOf(var_To, var__virtual_6_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); | ||
169 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_6_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); | ||
170 | PVariable var__virtual_7_ = body.getOrCreateVariableByName(".virtual{7}"); | ||
171 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_6_, var__virtual_7_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "gain"))); | ||
172 | new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_7_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "AntennaGain"))); | ||
173 | new Equality(body, var__virtual_7_, var_Gain); | ||
174 | bodies.add(body); | 147 | bodies.add(body); |
175 | } | 148 | } |
176 | return bodies; | 149 | return bodies; |