From 436ec038c24c42e615feb22a0fed029494bc74ea Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 7 May 2019 11:54:19 -0400 Subject: Revert "Try to restructure satellite case study" This reverts commit 9b83e33c055660f6de218d1b672f67734675f1f6. --- .../configs/generation.vsconfig | 2 +- .../ecore-gen/satellite/CommSubsystem.java | 27 - .../ecore-gen/satellite/CommunicatingElement.java | 17 +- .../ecore-gen/satellite/CubeSat.java | 16 - .../ecore-gen/satellite/CubeSat3U.java | 2 +- .../ecore-gen/satellite/CubeSat6U.java | 2 +- .../ecore-gen/satellite/SatellitePackage.java | 162 +--- .../ecore-gen/satellite/Spacecraft.java | 1 + .../satellite/impl/CommSubsystemImpl.java | 91 --- .../satellite/impl/CommunicatingElementImpl.java | 78 +- .../ecore-gen/satellite/impl/CubeSat3UImpl.java | 2 +- .../ecore-gen/satellite/impl/CubeSat6UImpl.java | 2 +- .../ecore-gen/satellite/impl/CubeSatImpl.java | 37 - .../satellite/impl/SatellitePackageImpl.java | 59 +- .../ecore-gen/satellite/impl/SpacecraftImpl.java | 12 +- .../satellite/util/SatelliteAdapterFactory.java | 19 - .../ecore-gen/satellite/util/SatelliteSwitch.java | 30 - .../model/satellite.aird | 143 ++-- .../model/satellite.ecore | 10 +- .../model/satellite.genmodel | 4 +- .../outputs/debug/generated3valued.vql_deactivated | 582 ++++++-------- .../outputs/debug/generation.logicproblem | 876 ++++++++++----------- .../outputs/debug/init.partialmodel | 17 +- .../plugin.xml | 12 +- .../domains/satellite/queries/.gitignore | 2 - ...icationLinkDoesNotStartAtContainingElement.java | 579 ++++++++++++++ .../queries/CommunicationLinkOfElement.java | 705 ----------------- .../satellite/queries/CommunicationLoop.java | 6 +- .../satellite/queries/CubeSatWithKaAntenna.java | 6 +- .../queries/IncompatibleSourceAndTargetBand.java | 6 +- .../queries/IncompatibleSourceAndTargetGain.java | 6 +- .../satellite/queries/KaAntennaGainLow.java | 6 +- .../queries/MultipleCommunicationLinks.java | 576 -------------- .../satellite/queries/NoLinkToGroundStation.java | 6 +- .../queries/NoPotentialLinkToGroundStation.java | 6 +- .../queries/NotEnoughInterferometryPayloads.java | 6 +- .../satellite/queries/SatelliteQueries.java | 25 +- .../domains/satellite/queries/SmallSat.java | 50 +- .../satellite/queries/SpacecraftOfKind.java | 10 +- .../queries/ThreeUCubeSatWithNonUhfCrossLink.java | 6 +- .../satellite/queries/UhfAntennaGainNotLow.java | 6 +- .../satellite/queries/XAntennaGainNotMedium.java | 6 +- .../internal/AtLeastTwoInterferometryPayloads.java | 2 +- .../queries/internal/CommSubsystemBand.java | 4 +- .../queries/internal/CommSubsystemBandUhf.java | 2 +- .../queries/internal/CommSubsystemGain.java | 4 +- .../queries/internal/CommSubsystemGainLow.java | 2 +- .../queries/internal/CommSubsystemGainMedium.java | 2 +- .../satellite/queries/internal/CubeSat3U.java | 2 +- .../queries/internal/DirectCommunicationLink.java | 4 +- .../queries/internal/GroundStationNetwork.java | 2 +- .../internal/IndirectCommunicationLink.java | 4 +- .../queries/internal/IndirectLinkAllowed.java | 4 +- .../satellite/queries/internal/LinkAllowed.java | 4 +- .../queries/internal/MatchingAntenna.java | 6 +- .../queries/internal/SatelliteQueriesAll.java | 9 +- .../SpacecraftWithInterferometryPayload.java | 4 +- .../domains/satellite/queries/SatelliteQueries.vql | 18 +- 58 files changed, 1537 insertions(+), 2752 deletions(-) delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSatImpl.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkDoesNotStartAtContainingElement.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkOfElement.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/MultipleCommunicationLinks.java diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig index 726f838f..1942980c 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig @@ -7,7 +7,7 @@ generate { partial-model = { "inputs/SatelliteInstance.xmi"} solver = ViatraSolver scope = { - #node += 8..16 + #node += 16..32 } config = { diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java index 1cee0c0d..072a9705 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java @@ -15,7 +15,6 @@ import org.eclipse.emf.ecore.EObject; * * * @see satellite.SatellitePackage#getCommSubsystem() @@ -81,30 +80,4 @@ public interface CommSubsystem extends EObject { */ void setGain(AntennaGain value); - /** - * Returns the value of the 'Communication Link' containment reference. - * - *

- * If the meaning of the 'Communication Link' containment reference isn't clear, - * there really should be more of a description here... - *

- * - * @return the value of the 'Communication Link' containment reference. - * @see #setCommunicationLink(DirectedCommunicationLink) - * @see satellite.SatellitePackage#getCommSubsystem_CommunicationLink() - * @model containment="true" - * @generated - */ - DirectedCommunicationLink getCommunicationLink(); - - /** - * Sets the value of the '{@link satellite.CommSubsystem#getCommunicationLink Communication Link}' containment reference. - * - * - * @param value the new value of the 'Communication Link' containment reference. - * @see #getCommunicationLink() - * @generated - */ - void setCommunicationLink(DirectedCommunicationLink value); - } // CommSubsystem diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommunicatingElement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommunicatingElement.java index 6e12fd9f..b96b281f 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommunicatingElement.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommunicatingElement.java @@ -41,18 +41,29 @@ public interface CommunicatingElement extends EObject { EList getCommSubsystem(); /** - * Returns the value of the 'Communication Link' reference. + * Returns the value of the 'Communication Link' containment reference. * *

* If the meaning of the 'Communication Link' containment reference isn't clear, * there really should be more of a description here... *

* - * @return the value of the 'Communication Link' reference. + * @return the value of the 'Communication Link' containment reference. + * @see #setCommunicationLink(DirectedCommunicationLink) * @see satellite.SatellitePackage#getCommunicatingElement_CommunicationLink() - * @model transient="true" changeable="false" volatile="true" derived="true" + * @model containment="true" * @generated */ DirectedCommunicationLink getCommunicationLink(); + /** + * Sets the value of the '{@link satellite.CommunicatingElement#getCommunicationLink Communication Link}' containment reference. + * + * + * @param value the new value of the 'Communication Link' containment reference. + * @see #getCommunicationLink() + * @generated + */ + void setCommunicationLink(DirectedCommunicationLink value); + } // CommunicatingElement diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat.java deleted file mode 100644 index a38926d4..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat.java +++ /dev/null @@ -1,16 +0,0 @@ -/** - */ -package satellite; - -/** - * - * A representation of the model object 'Cube Sat'. - * - * - * - * @see satellite.SatellitePackage#getCubeSat() - * @model abstract="true" - * @generated - */ -public interface CubeSat extends Spacecraft { -} // CubeSat diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat3U.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat3U.java index c68bf52c..5758e165 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat3U.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat3U.java @@ -12,5 +12,5 @@ package satellite; * @model * @generated */ -public interface CubeSat3U extends CubeSat { +public interface CubeSat3U extends Spacecraft { } // CubeSat3U diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat6U.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat6U.java index 5ade601a..a8d8830f 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat6U.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CubeSat6U.java @@ -12,5 +12,5 @@ package satellite; * @model * @generated */ -public interface CubeSat6U extends CubeSat { +public interface CubeSat6U extends Spacecraft { } // CubeSat6U diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java index 6e8723ae..f0d80ac2 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java @@ -179,7 +179,7 @@ public interface SatellitePackage extends EPackage { int COMMUNICATING_ELEMENT__COMM_SUBSYSTEM = 0; /** - * The feature id for the 'Communication Link' reference. + * The feature id for the 'Communication Link' containment reference. * * * @generated @@ -225,7 +225,7 @@ public interface SatellitePackage extends EPackage { int GROUND_STATION_NETWORK__COMM_SUBSYSTEM = COMMUNICATING_ELEMENT__COMM_SUBSYSTEM; /** - * The feature id for the 'Communication Link' reference. + * The feature id for the 'Communication Link' containment reference. * * * @generated @@ -271,7 +271,7 @@ public interface SatellitePackage extends EPackage { int SPACECRAFT__COMM_SUBSYSTEM = COMMUNICATING_ELEMENT__COMM_SUBSYSTEM; /** - * The feature id for the 'Communication Link' reference. + * The feature id for the 'Communication Link' containment reference. * * * @generated @@ -343,15 +343,6 @@ public interface SatellitePackage extends EPackage { */ int COMM_SUBSYSTEM__GAIN = 1; - /** - * The feature id for the 'Communication Link' containment reference. - * - * - * @generated - * @ordered - */ - int COMM_SUBSYSTEM__COMMUNICATION_LINK = 2; - /** * The number of structural features of the 'Comm Subsystem' class. * @@ -359,7 +350,7 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int COMM_SUBSYSTEM_FEATURE_COUNT = 3; + int COMM_SUBSYSTEM_FEATURE_COUNT = 2; /** * The number of operations of the 'Comm Subsystem' class. @@ -472,70 +463,6 @@ public interface SatellitePackage extends EPackage { */ int INTERFEROMETRY_PAYLOAD_OPERATION_COUNT = PAYLOAD_OPERATION_COUNT + 0; - /** - * The meta object id for the '{@link satellite.impl.CubeSatImpl Cube Sat}' class. - * - * - * @see satellite.impl.CubeSatImpl - * @see satellite.impl.SatellitePackageImpl#getCubeSat() - * @generated - */ - int CUBE_SAT = 12; - - /** - * The feature id for the 'Comm Subsystem' containment reference list. - * - * - * @generated - * @ordered - */ - int CUBE_SAT__COMM_SUBSYSTEM = SPACECRAFT__COMM_SUBSYSTEM; - - /** - * The feature id for the 'Communication Link' reference. - * - * - * @generated - * @ordered - */ - int CUBE_SAT__COMMUNICATION_LINK = SPACECRAFT__COMMUNICATION_LINK; - - /** - * The feature id for the 'Payload' containment reference. - * - * - * @generated - * @ordered - */ - int CUBE_SAT__PAYLOAD = SPACECRAFT__PAYLOAD; - - /** - * The feature id for the 'Kind' attribute. - * - * - * @generated - * @ordered - */ - int CUBE_SAT__KIND = SPACECRAFT__KIND; - - /** - * The number of structural features of the 'Cube Sat' class. - * - * - * @generated - * @ordered - */ - int CUBE_SAT_FEATURE_COUNT = SPACECRAFT_FEATURE_COUNT + 0; - - /** - * The number of operations of the 'Cube Sat' class. - * - * - * @generated - * @ordered - */ - int CUBE_SAT_OPERATION_COUNT = SPACECRAFT_OPERATION_COUNT + 0; - /** * The meta object id for the '{@link satellite.impl.CubeSat3UImpl Cube Sat3 U}' class. * @@ -553,16 +480,16 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int CUBE_SAT3_U__COMM_SUBSYSTEM = CUBE_SAT__COMM_SUBSYSTEM; + int CUBE_SAT3_U__COMM_SUBSYSTEM = SPACECRAFT__COMM_SUBSYSTEM; /** - * The feature id for the 'Communication Link' reference. + * The feature id for the 'Communication Link' containment reference. * * * @generated * @ordered */ - int CUBE_SAT3_U__COMMUNICATION_LINK = CUBE_SAT__COMMUNICATION_LINK; + int CUBE_SAT3_U__COMMUNICATION_LINK = SPACECRAFT__COMMUNICATION_LINK; /** * The feature id for the 'Payload' containment reference. @@ -571,7 +498,7 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int CUBE_SAT3_U__PAYLOAD = CUBE_SAT__PAYLOAD; + int CUBE_SAT3_U__PAYLOAD = SPACECRAFT__PAYLOAD; /** * The feature id for the 'Kind' attribute. @@ -580,7 +507,7 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int CUBE_SAT3_U__KIND = CUBE_SAT__KIND; + int CUBE_SAT3_U__KIND = SPACECRAFT__KIND; /** * The number of structural features of the 'Cube Sat3 U' class. @@ -589,7 +516,7 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int CUBE_SAT3_U_FEATURE_COUNT = CUBE_SAT_FEATURE_COUNT + 0; + int CUBE_SAT3_U_FEATURE_COUNT = SPACECRAFT_FEATURE_COUNT + 0; /** * The number of operations of the 'Cube Sat3 U' class. @@ -598,7 +525,7 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int CUBE_SAT3_U_OPERATION_COUNT = CUBE_SAT_OPERATION_COUNT + 0; + int CUBE_SAT3_U_OPERATION_COUNT = SPACECRAFT_OPERATION_COUNT + 0; /** * The meta object id for the '{@link satellite.impl.CubeSat6UImpl Cube Sat6 U}' class. @@ -617,16 +544,16 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int CUBE_SAT6_U__COMM_SUBSYSTEM = CUBE_SAT__COMM_SUBSYSTEM; + int CUBE_SAT6_U__COMM_SUBSYSTEM = SPACECRAFT__COMM_SUBSYSTEM; /** - * The feature id for the 'Communication Link' reference. + * The feature id for the 'Communication Link' containment reference. * * * @generated * @ordered */ - int CUBE_SAT6_U__COMMUNICATION_LINK = CUBE_SAT__COMMUNICATION_LINK; + int CUBE_SAT6_U__COMMUNICATION_LINK = SPACECRAFT__COMMUNICATION_LINK; /** * The feature id for the 'Payload' containment reference. @@ -635,7 +562,7 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int CUBE_SAT6_U__PAYLOAD = CUBE_SAT__PAYLOAD; + int CUBE_SAT6_U__PAYLOAD = SPACECRAFT__PAYLOAD; /** * The feature id for the 'Kind' attribute. @@ -644,7 +571,7 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int CUBE_SAT6_U__KIND = CUBE_SAT__KIND; + int CUBE_SAT6_U__KIND = SPACECRAFT__KIND; /** * The number of structural features of the 'Cube Sat6 U' class. @@ -653,7 +580,7 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int CUBE_SAT6_U_FEATURE_COUNT = CUBE_SAT_FEATURE_COUNT + 0; + int CUBE_SAT6_U_FEATURE_COUNT = SPACECRAFT_FEATURE_COUNT + 0; /** * The number of operations of the 'Cube Sat6 U' class. @@ -662,7 +589,7 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int CUBE_SAT6_U_OPERATION_COUNT = CUBE_SAT_OPERATION_COUNT + 0; + int CUBE_SAT6_U_OPERATION_COUNT = SPACECRAFT_OPERATION_COUNT + 0; /** * The meta object id for the '{@link satellite.impl.SmallSatImpl Small Sat}' class. @@ -684,7 +611,7 @@ public interface SatellitePackage extends EPackage { int SMALL_SAT__COMM_SUBSYSTEM = SPACECRAFT__COMM_SUBSYSTEM; /** - * The feature id for the 'Communication Link' reference. + * The feature id for the 'Communication Link' containment reference. * * * @generated @@ -736,7 +663,7 @@ public interface SatellitePackage extends EPackage { * @see satellite.impl.SatellitePackageImpl#getTransceiverBand() * @generated */ - int TRANSCEIVER_BAND = 13; + int TRANSCEIVER_BAND = 12; /** * The meta object id for the '{@link satellite.AntennaGain Antenna Gain}' enum. @@ -746,7 +673,7 @@ public interface SatellitePackage extends EPackage { * @see satellite.impl.SatellitePackageImpl#getAntennaGain() * @generated */ - int ANTENNA_GAIN = 14; + int ANTENNA_GAIN = 13; /** * The meta object id for the '{@link satellite.SpacecraftKind Spacecraft Kind}' enum. @@ -756,7 +683,7 @@ public interface SatellitePackage extends EPackage { * @see satellite.impl.SatellitePackageImpl#getSpacecraftKind() * @generated */ - int SPACECRAFT_KIND = 15; + int SPACECRAFT_KIND = 14; /** * Returns the meta object for class '{@link satellite.ConstellationMission Constellation Mission}'. @@ -833,10 +760,10 @@ public interface SatellitePackage extends EPackage { EReference getCommunicatingElement_CommSubsystem(); /** - * Returns the meta object for the reference '{@link satellite.CommunicatingElement#getCommunicationLink Communication Link}'. + * Returns the meta object for the containment reference '{@link satellite.CommunicatingElement#getCommunicationLink Communication Link}'. * * - * @return the meta object for the reference 'Communication Link'. + * @return the meta object for the containment reference 'Communication Link'. * @see satellite.CommunicatingElement#getCommunicationLink() * @see #getCommunicatingElement() * @generated @@ -917,17 +844,6 @@ public interface SatellitePackage extends EPackage { */ EAttribute getCommSubsystem_Gain(); - /** - * Returns the meta object for the containment reference '{@link satellite.CommSubsystem#getCommunicationLink Communication Link}'. - * - * - * @return the meta object for the containment reference 'Communication Link'. - * @see satellite.CommSubsystem#getCommunicationLink() - * @see #getCommSubsystem() - * @generated - */ - EReference getCommSubsystem_CommunicationLink(); - /** * Returns the meta object for class '{@link satellite.DirectedCommunicationLink Directed Communication Link}'. * @@ -1010,16 +926,6 @@ public interface SatellitePackage extends EPackage { */ EClass getSmallSat(); - /** - * Returns the meta object for class '{@link satellite.CubeSat Cube Sat}'. - * - * - * @return the meta object for class 'Cube Sat'. - * @see satellite.CubeSat - * @generated - */ - EClass getCubeSat(); - /** * Returns the meta object for enum '{@link satellite.TransceiverBand Transceiver Band}'. * @@ -1137,7 +1043,7 @@ public interface SatellitePackage extends EPackage { EReference COMMUNICATING_ELEMENT__COMM_SUBSYSTEM = eINSTANCE.getCommunicatingElement_CommSubsystem(); /** - * The meta object literal for the 'Communication Link' reference feature. + * The meta object literal for the 'Communication Link' containment reference feature. * * * @generated @@ -1206,14 +1112,6 @@ public interface SatellitePackage extends EPackage { */ EAttribute COMM_SUBSYSTEM__GAIN = eINSTANCE.getCommSubsystem_Gain(); - /** - * The meta object literal for the 'Communication Link' containment reference feature. - * - * - * @generated - */ - EReference COMM_SUBSYSTEM__COMMUNICATION_LINK = eINSTANCE.getCommSubsystem_CommunicationLink(); - /** * The meta object literal for the '{@link satellite.impl.DirectedCommunicationLinkImpl Directed Communication Link}' class. * @@ -1290,16 +1188,6 @@ public interface SatellitePackage extends EPackage { */ EClass SMALL_SAT = eINSTANCE.getSmallSat(); - /** - * The meta object literal for the '{@link satellite.impl.CubeSatImpl Cube Sat}' class. - * - * - * @see satellite.impl.CubeSatImpl - * @see satellite.impl.SatellitePackageImpl#getCubeSat() - * @generated - */ - EClass CUBE_SAT = eINSTANCE.getCubeSat(); - /** * The meta object literal for the '{@link satellite.TransceiverBand Transceiver Band}' enum. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/Spacecraft.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/Spacecraft.java index 6f72322e..d8775572 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/Spacecraft.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/Spacecraft.java @@ -59,6 +59,7 @@ public interface Spacecraft extends CommunicatingElement { * @see satellite.SpacecraftKind * @see satellite.SatellitePackage#getSpacecraft_Kind() * @model required="true" transient="true" changeable="false" volatile="true" derived="true" + * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.satellite.queries.spacecraftOfKind'" * @generated */ SpacecraftKind getKind(); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java index 70ee268e..cf8f1fe8 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java @@ -4,16 +4,13 @@ package satellite.impl; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import satellite.AntennaGain; import satellite.CommSubsystem; -import satellite.DirectedCommunicationLink; import satellite.SatellitePackage; import satellite.TransceiverBand; @@ -27,7 +24,6 @@ import satellite.TransceiverBand; * * * @generated @@ -73,16 +69,6 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C */ protected AntennaGain gain = GAIN_EDEFAULT; - /** - * The cached value of the '{@link #getCommunicationLink() Communication Link}' containment reference. - * - * - * @see #getCommunicationLink() - * @generated - * @ordered - */ - protected DirectedCommunicationLink communicationLink; - /** * * @@ -150,73 +136,6 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C gain)); } - /** - * - * - * @generated - */ - @Override - public DirectedCommunicationLink getCommunicationLink() { - return communicationLink; - } - - /** - * - * - * @generated - */ - public NotificationChain basicSetCommunicationLink(DirectedCommunicationLink newCommunicationLink, - NotificationChain msgs) { - DirectedCommunicationLink oldCommunicationLink = communicationLink; - communicationLink = newCommunicationLink; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, - SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK, oldCommunicationLink, newCommunicationLink); - if (msgs == null) - msgs = notification; - else - msgs.add(notification); - } - return msgs; - } - - /** - * - * - * @generated - */ - @Override - public void setCommunicationLink(DirectedCommunicationLink newCommunicationLink) { - if (newCommunicationLink != communicationLink) { - NotificationChain msgs = null; - if (communicationLink != null) - msgs = ((InternalEObject) communicationLink).eInverseRemove(this, - EOPPOSITE_FEATURE_BASE - SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK, null, msgs); - if (newCommunicationLink != null) - msgs = ((InternalEObject) newCommunicationLink).eInverseAdd(this, - EOPPOSITE_FEATURE_BASE - SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK, null, msgs); - msgs = basicSetCommunicationLink(newCommunicationLink, msgs); - if (msgs != null) - msgs.dispatch(); - } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK, - newCommunicationLink, newCommunicationLink)); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK: - return basicSetCommunicationLink(null, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); - } - /** * * @@ -229,8 +148,6 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C return getBand(); case SatellitePackage.COMM_SUBSYSTEM__GAIN: return getGain(); - case SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK: - return getCommunicationLink(); } return super.eGet(featureID, resolve, coreType); } @@ -249,9 +166,6 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C case SatellitePackage.COMM_SUBSYSTEM__GAIN: setGain((AntennaGain) newValue); return; - case SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK: - setCommunicationLink((DirectedCommunicationLink) newValue); - return; } super.eSet(featureID, newValue); } @@ -270,9 +184,6 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C case SatellitePackage.COMM_SUBSYSTEM__GAIN: setGain(GAIN_EDEFAULT); return; - case SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK: - setCommunicationLink((DirectedCommunicationLink) null); - return; } super.eUnset(featureID); } @@ -289,8 +200,6 @@ public class CommSubsystemImpl extends MinimalEObjectImpl.Container implements C return band != BAND_EDEFAULT; case SatellitePackage.COMM_SUBSYSTEM__GAIN: return gain != GAIN_EDEFAULT; - case SatellitePackage.COMM_SUBSYSTEM__COMMUNICATION_LINK: - return communicationLink != null; } return super.eIsSet(featureID); } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommunicatingElementImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommunicatingElementImpl.java index f472580b..1f79da3b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommunicatingElementImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommunicatingElementImpl.java @@ -3,12 +3,16 @@ package satellite.impl; import java.util.Collection; + +import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; + +import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; import org.eclipse.emf.ecore.util.EObjectContainmentEList; @@ -44,6 +48,16 @@ public abstract class CommunicatingElementImpl extends MinimalEObjectImpl.Contai */ protected EList commSubsystem; + /** + * The cached value of the '{@link #getCommunicationLink() Communication Link}' containment reference. + * + * + * @see #getCommunicationLink() + * @generated + * @ordered + */ + protected DirectedCommunicationLink communicationLink; + /** * * @@ -84,10 +98,7 @@ public abstract class CommunicatingElementImpl extends MinimalEObjectImpl.Contai */ @Override public DirectedCommunicationLink getCommunicationLink() { - DirectedCommunicationLink communicationLink = basicGetCommunicationLink(); - return communicationLink != null && communicationLink.eIsProxy() - ? (DirectedCommunicationLink) eResolveProxy((InternalEObject) communicationLink) - : communicationLink; + return communicationLink; } /** @@ -95,11 +106,46 @@ public abstract class CommunicatingElementImpl extends MinimalEObjectImpl.Contai * * @generated */ - public DirectedCommunicationLink basicGetCommunicationLink() { - // TODO: implement this method to return the 'Communication Link' reference - // -> do not perform proxy resolution - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); + public NotificationChain basicSetCommunicationLink(DirectedCommunicationLink newCommunicationLink, + NotificationChain msgs) { + DirectedCommunicationLink oldCommunicationLink = communicationLink; + communicationLink = newCommunicationLink; + if (eNotificationRequired()) { + ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, + SatellitePackage.COMMUNICATING_ELEMENT__COMMUNICATION_LINK, oldCommunicationLink, + newCommunicationLink); + if (msgs == null) + msgs = notification; + else + msgs.add(notification); + } + return msgs; + } + + /** + * + * + * @generated + */ + @Override + public void setCommunicationLink(DirectedCommunicationLink newCommunicationLink) { + if (newCommunicationLink != communicationLink) { + NotificationChain msgs = null; + if (communicationLink != null) + msgs = ((InternalEObject) communicationLink).eInverseRemove(this, + EOPPOSITE_FEATURE_BASE - SatellitePackage.COMMUNICATING_ELEMENT__COMMUNICATION_LINK, null, + msgs); + if (newCommunicationLink != null) + msgs = ((InternalEObject) newCommunicationLink).eInverseAdd(this, + EOPPOSITE_FEATURE_BASE - SatellitePackage.COMMUNICATING_ELEMENT__COMMUNICATION_LINK, null, + msgs); + msgs = basicSetCommunicationLink(newCommunicationLink, msgs); + if (msgs != null) + msgs.dispatch(); + } else if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, + SatellitePackage.COMMUNICATING_ELEMENT__COMMUNICATION_LINK, newCommunicationLink, + newCommunicationLink)); } /** @@ -112,6 +158,8 @@ public abstract class CommunicatingElementImpl extends MinimalEObjectImpl.Contai switch (featureID) { case SatellitePackage.COMMUNICATING_ELEMENT__COMM_SUBSYSTEM: return ((InternalEList) getCommSubsystem()).basicRemove(otherEnd, msgs); + case SatellitePackage.COMMUNICATING_ELEMENT__COMMUNICATION_LINK: + return basicSetCommunicationLink(null, msgs); } return super.eInverseRemove(otherEnd, featureID, msgs); } @@ -127,9 +175,7 @@ public abstract class CommunicatingElementImpl extends MinimalEObjectImpl.Contai case SatellitePackage.COMMUNICATING_ELEMENT__COMM_SUBSYSTEM: return getCommSubsystem(); case SatellitePackage.COMMUNICATING_ELEMENT__COMMUNICATION_LINK: - if (resolve) - return getCommunicationLink(); - return basicGetCommunicationLink(); + return getCommunicationLink(); } return super.eGet(featureID, resolve, coreType); } @@ -147,6 +193,9 @@ public abstract class CommunicatingElementImpl extends MinimalEObjectImpl.Contai getCommSubsystem().clear(); getCommSubsystem().addAll((Collection) newValue); return; + case SatellitePackage.COMMUNICATING_ELEMENT__COMMUNICATION_LINK: + setCommunicationLink((DirectedCommunicationLink) newValue); + return; } super.eSet(featureID, newValue); } @@ -162,6 +211,9 @@ public abstract class CommunicatingElementImpl extends MinimalEObjectImpl.Contai case SatellitePackage.COMMUNICATING_ELEMENT__COMM_SUBSYSTEM: getCommSubsystem().clear(); return; + case SatellitePackage.COMMUNICATING_ELEMENT__COMMUNICATION_LINK: + setCommunicationLink((DirectedCommunicationLink) null); + return; } super.eUnset(featureID); } @@ -177,7 +229,7 @@ public abstract class CommunicatingElementImpl extends MinimalEObjectImpl.Contai case SatellitePackage.COMMUNICATING_ELEMENT__COMM_SUBSYSTEM: return commSubsystem != null && !commSubsystem.isEmpty(); case SatellitePackage.COMMUNICATING_ELEMENT__COMMUNICATION_LINK: - return basicGetCommunicationLink() != null; + return communicationLink != null; } return super.eIsSet(featureID); } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSat3UImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSat3UImpl.java index 350a9bcc..a7ba37a7 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSat3UImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSat3UImpl.java @@ -14,7 +14,7 @@ import satellite.SatellitePackage; * * @generated */ -public class CubeSat3UImpl extends CubeSatImpl implements CubeSat3U { +public class CubeSat3UImpl extends SpacecraftImpl implements CubeSat3U { /** * * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSat6UImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSat6UImpl.java index 3b9c5988..d4f42e6c 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSat6UImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSat6UImpl.java @@ -14,7 +14,7 @@ import satellite.SatellitePackage; * * @generated */ -public class CubeSat6UImpl extends CubeSatImpl implements CubeSat6U { +public class CubeSat6UImpl extends SpacecraftImpl implements CubeSat6U { /** * * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSatImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSatImpl.java deleted file mode 100644 index 660bd062..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CubeSatImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - */ -package satellite.impl; - -import org.eclipse.emf.ecore.EClass; - -import satellite.CubeSat; -import satellite.SatellitePackage; - -/** - * - * An implementation of the model object 'Cube Sat'. - * - * - * @generated - */ -public abstract class CubeSatImpl extends SpacecraftImpl implements CubeSat { - /** - * - * - * @generated - */ - protected CubeSatImpl() { - super(); - } - - /** - * - * - * @generated - */ - @Override - protected EClass eStaticClass() { - return SatellitePackage.Literals.CUBE_SAT; - } - -} //CubeSatImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java index 68e4ce30..2347fe07 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java @@ -14,7 +14,6 @@ import satellite.AntennaGain; import satellite.CommSubsystem; import satellite.CommunicatingElement; import satellite.ConstellationMission; -import satellite.CubeSat; import satellite.CubeSat3U; import satellite.CubeSat6U; import satellite.DirectedCommunicationLink; @@ -120,13 +119,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka */ private EClass smallSatEClass = null; - /** - * - * - * @generated - */ - private EClass cubeSatEClass = null; - /** * * @@ -362,16 +354,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka return (EAttribute) commSubsystemEClass.getEStructuralFeatures().get(1); } - /** - * - * - * @generated - */ - @Override - public EReference getCommSubsystem_CommunicationLink() { - return (EReference) commSubsystemEClass.getEStructuralFeatures().get(2); - } - /** * * @@ -452,16 +434,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka return smallSatEClass; } - /** - * - * - * @generated - */ - @Override - public EClass getCubeSat() { - return cubeSatEClass; - } - /** * * @@ -542,7 +514,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka commSubsystemEClass = createEClass(COMM_SUBSYSTEM); createEAttribute(commSubsystemEClass, COMM_SUBSYSTEM__BAND); createEAttribute(commSubsystemEClass, COMM_SUBSYSTEM__GAIN); - createEReference(commSubsystemEClass, COMM_SUBSYSTEM__COMMUNICATION_LINK); directedCommunicationLinkEClass = createEClass(DIRECTED_COMMUNICATION_LINK); createEReference(directedCommunicationLinkEClass, DIRECTED_COMMUNICATION_LINK__SOURCE); @@ -558,8 +529,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka smallSatEClass = createEClass(SMALL_SAT); - cubeSatEClass = createEClass(CUBE_SAT); - // Create enums transceiverBandEEnum = createEEnum(TRANSCEIVER_BAND); antennaGainEEnum = createEEnum(ANTENNA_GAIN); @@ -599,10 +568,9 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka groundStationNetworkEClass.getESuperTypes().add(this.getCommunicatingElement()); spacecraftEClass.getESuperTypes().add(this.getCommunicatingElement()); interferometryPayloadEClass.getESuperTypes().add(this.getPayload()); - cubeSat3UEClass.getESuperTypes().add(this.getCubeSat()); - cubeSat6UEClass.getESuperTypes().add(this.getCubeSat()); + cubeSat3UEClass.getESuperTypes().add(this.getSpacecraft()); + cubeSat6UEClass.getESuperTypes().add(this.getSpacecraft()); smallSatEClass.getESuperTypes().add(this.getSpacecraft()); - cubeSatEClass.getESuperTypes().add(this.getSpacecraft()); // Initialize classes, features, and operations; add parameters initEClass(constellationMissionEClass, ConstellationMission.class, "ConstellationMission", IS_ABSTRACT, @@ -626,8 +594,8 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka 2, CommunicatingElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getCommunicatingElement_CommunicationLink(), this.getDirectedCommunicationLink(), null, - "communicationLink", null, 0, 1, CommunicatingElement.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, - !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); + "communicationLink", null, 0, 1, CommunicatingElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, + IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(groundStationNetworkEClass, GroundStationNetwork.class, "GroundStationNetwork", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -646,9 +614,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getCommSubsystem_Gain(), this.getAntennaGain(), "gain", null, 1, 1, CommSubsystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getCommSubsystem_CommunicationLink(), this.getDirectedCommunicationLink(), null, - "communicationLink", null, 0, 1, CommSubsystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, - IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(directedCommunicationLinkEClass, DirectedCommunicationLink.class, "DirectedCommunicationLink", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -673,8 +638,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka initEClass(smallSatEClass, SmallSat.class, "SmallSat", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEClass(cubeSatEClass, CubeSat.class, "CubeSat", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - // Initialize enums and add enum literals initEEnum(transceiverBandEEnum, TransceiverBand.class, "TransceiverBand"); addEEnumLiteral(transceiverBandEEnum, TransceiverBand.UHF); @@ -697,6 +660,8 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka // Create annotations // http://www.eclipse.org/emf/2002/Ecore createEcoreAnnotations(); + // org.eclipse.viatra.query.querybasedfeature + createOrgAnnotations(); } /** @@ -710,4 +675,16 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka addAnnotation(this, source, new String[] { "settingDelegates", "org.eclipse.viatra.query.querybasedfeature" }); } + /** + * Initializes the annotations for org.eclipse.viatra.query.querybasedfeature. + * + * + * @generated + */ + protected void createOrgAnnotations() { + String source = "org.eclipse.viatra.query.querybasedfeature"; + addAnnotation(getSpacecraft_Kind(), source, + new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.spacecraftOfKind" }); + } + } //SatellitePackageImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SpacecraftImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SpacecraftImpl.java index ef98fb07..73609fbd 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SpacecraftImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SpacecraftImpl.java @@ -6,6 +6,7 @@ import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; @@ -41,14 +42,15 @@ public abstract class SpacecraftImpl extends CommunicatingElementImpl implements protected Payload payload; /** - * The default value of the '{@link #getKind() Kind}' attribute. + * The cached setting delegate for the '{@link #getKind() Kind}' attribute. * * * @see #getKind() * @generated * @ordered */ - protected static final SpacecraftKind KIND_EDEFAULT = SpacecraftKind.CUBE_SAT3_U; + protected EStructuralFeature.Internal.SettingDelegate KIND__ESETTING_DELEGATE = ((EStructuralFeature.Internal) SatellitePackage.Literals.SPACECRAFT__KIND) + .getSettingDelegate(); /** * @@ -128,9 +130,7 @@ public abstract class SpacecraftImpl extends CommunicatingElementImpl implements */ @Override public SpacecraftKind getKind() { - // TODO: implement this method to return the 'Kind' attribute - // Ensure that you remove @generated or mark it @generated NOT - throw new UnsupportedOperationException(); + return (SpacecraftKind) KIND__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); } /** @@ -204,7 +204,7 @@ public abstract class SpacecraftImpl extends CommunicatingElementImpl implements case SatellitePackage.SPACECRAFT__PAYLOAD: return payload != null; case SatellitePackage.SPACECRAFT__KIND: - return getKind() != KIND_EDEFAULT; + return KIND__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); } return super.eIsSet(featureID); } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/util/SatelliteAdapterFactory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/util/SatelliteAdapterFactory.java index f71d8da5..1ecf7b19 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/util/SatelliteAdapterFactory.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/util/SatelliteAdapterFactory.java @@ -126,11 +126,6 @@ public class SatelliteAdapterFactory extends AdapterFactoryImpl { return createSmallSatAdapter(); } - @Override - public Adapter caseCubeSat(CubeSat object) { - return createCubeSatAdapter(); - } - @Override public Adapter defaultCase(EObject object) { return createEObjectAdapter(); @@ -318,20 +313,6 @@ public class SatelliteAdapterFactory extends AdapterFactoryImpl { return null; } - /** - * Creates a new adapter for an object of class '{@link satellite.CubeSat Cube Sat}'. - * - * This default implementation returns null so that we can easily ignore cases; - * it's useful to ignore a case when inheritance will catch all the cases anyway. - * - * @return the new adapter. - * @see satellite.CubeSat - * @generated - */ - public Adapter createCubeSatAdapter() { - return null; - } - /** * Creates a new adapter for the default case. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/util/SatelliteSwitch.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/util/SatelliteSwitch.java index 1e2fb04b..3eb78d75 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/util/SatelliteSwitch.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/util/SatelliteSwitch.java @@ -140,8 +140,6 @@ public class SatelliteSwitch extends Switch { case SatellitePackage.CUBE_SAT3_U: { CubeSat3U cubeSat3U = (CubeSat3U) theEObject; T result = caseCubeSat3U(cubeSat3U); - if (result == null) - result = caseCubeSat(cubeSat3U); if (result == null) result = caseSpacecraft(cubeSat3U); if (result == null) @@ -153,8 +151,6 @@ public class SatelliteSwitch extends Switch { case SatellitePackage.CUBE_SAT6_U: { CubeSat6U cubeSat6U = (CubeSat6U) theEObject; T result = caseCubeSat6U(cubeSat6U); - if (result == null) - result = caseCubeSat(cubeSat6U); if (result == null) result = caseSpacecraft(cubeSat6U); if (result == null) @@ -174,17 +170,6 @@ public class SatelliteSwitch extends Switch { result = defaultCase(theEObject); return result; } - case SatellitePackage.CUBE_SAT: { - CubeSat cubeSat = (CubeSat) theEObject; - T result = caseCubeSat(cubeSat); - if (result == null) - result = caseSpacecraft(cubeSat); - if (result == null) - result = caseCommunicatingElement(cubeSat); - if (result == null) - result = defaultCase(theEObject); - return result; - } default: return defaultCase(theEObject); } @@ -370,21 +355,6 @@ public class SatelliteSwitch extends Switch { return null; } - /** - * Returns the result of interpreting the object as an instance of 'Cube Sat'. - * - * This implementation returns null; - * returning a non-null result will terminate the switch. - * - * @param object the target of the switch. - * @return the result of interpreting the object as an instance of 'Cube Sat'. - * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) - * @generated - */ - public T caseCubeSat(CubeSat object) { - return null; - } - /** * Returns the result of interpreting the object as an instance of 'EObject'. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.aird b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.aird index 4ffc0ea3..31575c3c 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.aird +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.aird @@ -1307,16 +1307,6 @@ ../src/hu/bme/mit/inf/dslreasoner/domains/satellite/metrics/SatelliteMetrics.vql java:/Objects/org.eclipse.viatra.query.runtime.matchers.aggregators.max java:/Objects/hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind - java:/Objects/satellite.Payload - java:/Objects/hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat - java:/Objects/satellite.CubeSat - java:/Objects/satellite.Spacecraft - java:/Objects/satellite.CommunicatingElement - java:/Objects/satellite.SpacecraftKind - java:/Objects/satellite.CommSubsystem - java:/Objects/satellite.DirectedCommunicationLink - java:/Objects/satellite.TransceiverBand - java:/Objects/satellite.AntennaGain @@ -1369,24 +1359,6 @@ - - - - - - - - - - - - - - - - - - @@ -1643,6 +1615,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -1655,7 +1659,7 @@ - + @@ -1771,38 +1775,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1848,7 +1820,7 @@ - + KEEP_LOCATION @@ -1915,7 +1887,7 @@ - + KEEP_LOCATION @@ -1988,7 +1960,7 @@ - + KEEP_LOCATION @@ -2034,6 +2006,30 @@ + + + + + + labelSize + + + labelSize + + + + + + + + + + bold + + + + + @@ -2219,25 +2215,6 @@ - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore index 002c8fd8..ae9197da 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore @@ -18,11 +18,7 @@ - -
- - + containment="true"/> @@ -38,8 +34,6 @@ - @@ -48,7 +42,7 @@ + eType="#//CommSubsystem"/> diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel index b570f05e..f8b6d75b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel @@ -35,7 +35,7 @@ - + @@ -45,7 +45,6 @@ - @@ -56,6 +55,5 @@ - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generated3valued.vql_deactivated b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generated3valued.vql_deactivated index d28c0d4d..853b7b54 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generated3valued.vql_deactivated +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generated3valued.vql_deactivated @@ -110,22 +110,22 @@ private pattern mayInstanceOfConstellationMission_class(problem:LogicProblem, in find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfInterferometryMission_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); neg find scopeDisallowsNewConstellationMission_class(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfInterferometryMission_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); neg find scopeDisallowsNewConstellationMission_class(problem, interpretation); neg find isPrimitive(element); } or @@ -154,20 +154,20 @@ private pattern mayInstanceOfInterferometryMission_class(problem:LogicProblem, i find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); neg find scopeDisallowsNewInterferometryMission_class(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); neg find scopeDisallowsNewInterferometryMission_class(problem, interpretation); neg find isPrimitive(element); } or @@ -196,10 +196,10 @@ private pattern mayInstanceOfCommunicatingElement_class(problem:LogicProblem, in find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfCommunicatingElement_class_UndefinedPart(problem,interpretation,element); neg find scopeDisallowsNewCommunicatingElement_class(problem, interpretation); neg find isPrimitive(element); @@ -207,10 +207,10 @@ private pattern mayInstanceOfCommunicatingElement_class(problem:LogicProblem, in find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfCommunicatingElement_class_UndefinedPart(problem,interpretation,element); neg find scopeDisallowsNewCommunicatingElement_class(problem, interpretation); neg find isPrimitive(element); @@ -240,9 +240,9 @@ private pattern mayInstanceOfGroundStationNetwork_class(problem:LogicProblem, in find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfCommunicatingElement_class_UndefinedPart(problem,interpretation,element); neg find scopeDisallowsNewGroundStationNetwork_class(problem, interpretation); neg find isPrimitive(element); @@ -250,9 +250,9 @@ private pattern mayInstanceOfGroundStationNetwork_class(problem:LogicProblem, in find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfCommunicatingElement_class_UndefinedPart(problem,interpretation,element); neg find scopeDisallowsNewGroundStationNetwork_class(problem, interpretation); neg find isPrimitive(element); @@ -282,24 +282,24 @@ private pattern mayInstanceOfSpacecraft_class(problem:LogicProblem, interpretati find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCubeSat_class(problem,interpretation,element); + neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfSmallSat_class(problem,interpretation,element); neg find scopeDisallowsNewSpacecraft_class(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCubeSat_class(problem,interpretation,element); + neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfSmallSat_class(problem,interpretation,element); neg find scopeDisallowsNewSpacecraft_class(problem, interpretation); neg find isPrimitive(element); } or @@ -328,20 +328,20 @@ private pattern mayInstanceOfCommSubsystem_class(problem:LogicProblem, interpret find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); neg find scopeDisallowsNewCommSubsystem_class(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); neg find scopeDisallowsNewCommSubsystem_class(problem, interpretation); neg find isPrimitive(element); } or @@ -369,19 +369,19 @@ private pattern mayInstanceOfDirectedCommunicationLink_class(problem:LogicProble { find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find scopeDisallowsNewDirectedCommunicationLink_class(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find scopeDisallowsNewDirectedCommunicationLink_class(problem, interpretation); neg find isPrimitive(element); } or @@ -410,20 +410,20 @@ private pattern mayInstanceOfPayload_class(problem:LogicProblem, interpretation: find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfInterferometryPayload_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find scopeDisallowsNewPayload_class(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfInterferometryPayload_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find scopeDisallowsNewPayload_class(problem, interpretation); neg find isPrimitive(element); } or @@ -452,18 +452,18 @@ private pattern mayInstanceOfInterferometryPayload_class(problem:LogicProblem, i find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find scopeDisallowsNewInterferometryPayload_class(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find scopeDisallowsNewInterferometryPayload_class(problem, interpretation); neg find isPrimitive(element); } or @@ -491,25 +491,25 @@ private pattern mayInstanceOfCubeSat3U_class(problem:LogicProblem, interpretatio { find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfSmallSat_class(problem,interpretation,element); neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find scopeDisallowsNewCubeSat3U_class(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfSmallSat_class(problem,interpretation,element); neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find scopeDisallowsNewCubeSat3U_class(problem, interpretation); neg find isPrimitive(element); } or @@ -538,24 +538,24 @@ private pattern mayInstanceOfCubeSat6U_class(problem:LogicProblem, interpretatio find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfSmallSat_class(problem,interpretation,element); neg find scopeDisallowsNewCubeSat6U_class(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfSmallSat_class(problem,interpretation,element); neg find scopeDisallowsNewCubeSat6U_class(problem, interpretation); neg find isPrimitive(element); } or @@ -584,22 +584,22 @@ private pattern mayInstanceOfSmallSat_class(problem:LogicProblem, interpretation find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCubeSat_class(problem,interpretation,element); + neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find scopeDisallowsNewSmallSat_class(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCubeSat_class(problem,interpretation,element); + neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find scopeDisallowsNewSmallSat_class(problem, interpretation); neg find isPrimitive(element); } or @@ -628,26 +628,26 @@ private pattern mayInstanceOfCubeSat_class(problem:LogicProblem, interpretation: find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); + neg find mustInstanceOfSmallSat_class(problem,interpretation,element); neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find scopeDisallowsNewCubeSat_class(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); + neg find mustInstanceOfSmallSat_class(problem,interpretation,element); neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find scopeDisallowsNewCubeSat_class(problem, interpretation); neg find isPrimitive(element); } or @@ -760,9 +760,9 @@ private pattern mayInstanceOfConstellationMission_class_UndefinedPart(problem:Lo find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfInterferometryMission_class(problem,interpretation,element); neg find scopeDisallowsNewConstellationMission_class_UndefinedPart(problem, interpretation); neg find isPrimitive(element); @@ -770,9 +770,9 @@ private pattern mayInstanceOfConstellationMission_class_UndefinedPart(problem:Lo find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfInterferometryMission_class(problem,interpretation,element); neg find scopeDisallowsNewConstellationMission_class_UndefinedPart(problem, interpretation); neg find isPrimitive(element); @@ -823,18 +823,18 @@ private pattern mayInstanceOfInterferometryMission_class_UndefinedPart(problem:L find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find scopeDisallowsNewInterferometryMission_class_UndefinedPart(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find scopeDisallowsNewInterferometryMission_class_UndefinedPart(problem, interpretation); neg find isPrimitive(element); } or @@ -884,10 +884,10 @@ private pattern mayInstanceOfCommunicatingElement_class_UndefinedPart(problem:Lo find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfSpacecraft_class(problem,interpretation,element); neg find scopeDisallowsNewCommunicatingElement_class_UndefinedPart(problem, interpretation); neg find isPrimitive(element); @@ -895,10 +895,10 @@ private pattern mayInstanceOfCommunicatingElement_class_UndefinedPart(problem:Lo find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfSpacecraft_class(problem,interpretation,element); neg find scopeDisallowsNewCommunicatingElement_class_UndefinedPart(problem, interpretation); neg find isPrimitive(element); @@ -949,9 +949,9 @@ private pattern mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem:Lo find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfSpacecraft_class(problem,interpretation,element); neg find scopeDisallowsNewGroundStationNetwork_class_UndefinedPart(problem, interpretation); neg find isPrimitive(element); @@ -959,9 +959,9 @@ private pattern mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem:Lo find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfSpacecraft_class(problem,interpretation,element); neg find scopeDisallowsNewGroundStationNetwork_class_UndefinedPart(problem, interpretation); neg find isPrimitive(element); @@ -1012,18 +1012,18 @@ private pattern mayInstanceOfCommSubsystem_class_UndefinedPart(problem:LogicProb find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find scopeDisallowsNewCommSubsystem_class_UndefinedPart(problem, interpretation); neg find isPrimitive(element); } or { find interpretation(problem,interpretation); PartialInterpretation.openWorldElements(interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find scopeDisallowsNewCommSubsystem_class_UndefinedPart(problem, interpretation); neg find isPrimitive(element); } or @@ -1155,39 +1155,21 @@ private pattern mayInRelationcommSubsystem_reference_CommunicatingElement( /** * Matcher for detecting tuples t where []communicationLink reference CommunicatingElement(source,target) */ - private pattern mustInRelationcommunicationLink_reference_CommunicatingElement( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) - { - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkOfElement(problem,interpretation,source,target); - } -/** - * Matcher for detecting tuples t where []communicationLink reference CommunicatingElement(source,target) - */ - private pattern mayInRelationcommunicationLink_reference_CommunicatingElement( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) - { - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkOfElement(problem,interpretation,source,target); - } -/** - * Matcher for detecting tuples t where []payload reference Spacecraft(source,target) - */ -private pattern mustInRelationpayload_reference_Spacecraft( +private pattern mustInRelationcommunicationLink_reference_CommunicatingElement( problem:LogicProblem, interpretation:PartialInterpretation, source: DefinedElement, target:DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"payload reference Spacecraft"); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"communicationLink reference CommunicatingElement"); PartialRelationInterpretation.relationlinks(relationIterpretation,link); BinaryElementRelationLink.param1(link,source); BinaryElementRelationLink.param2(link,target); } /** - * Matcher for detecting tuples t where <>payload reference Spacecraft(source,target) + * Matcher for detecting tuples t where <>communicationLink reference CommunicatingElement(source,target) */ -private pattern mayInRelationpayload_reference_Spacecraft( +private pattern mayInRelationcommunicationLink_reference_CommunicatingElement( problem:LogicProblem, interpretation:PartialInterpretation, source: DefinedElement, target:DefinedElement) { @@ -1196,11 +1178,11 @@ private pattern mayInRelationpayload_reference_Spacecraft( find mayExist(problem, interpretation, source); find mayExist(problem, interpretation, target); // Type consistency - find mayInstanceOfSpacecraft_class(problem,interpretation,source); - find mayInstanceOfPayload_class(problem,interpretation,target); + find mayInstanceOfCommunicatingElement_class(problem,interpretation,source); + find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,target); // There are "numberOfExistingReferences" currently existing instances of the reference from the source, // the upper bound of the multiplicity should be considered. - numberOfExistingReferences == count find mustInRelationpayload_reference_Spacecraft(problem,interpretation,source,_); + numberOfExistingReferences == count find mustInRelationcommunicationLink_reference_CommunicatingElement(problem,interpretation,source,_); check(numberOfExistingReferences < 1); // The reference is containment, then a new reference cannot be create if: // 1. Multiple parents @@ -1208,26 +1190,26 @@ private pattern mayInRelationpayload_reference_Spacecraft( // 2. Circle in the containment hierarchy neg find mustTransitiveContains(source,target); } or { - find mustInRelationpayload_reference_Spacecraft(problem,interpretation,source,target); + find mustInRelationcommunicationLink_reference_CommunicatingElement(problem,interpretation,source,target); } /** - * Matcher for detecting tuples t where []communicationLink reference CommSubsystem(source,target) + * Matcher for detecting tuples t where []payload reference Spacecraft(source,target) */ -private pattern mustInRelationcommunicationLink_reference_CommSubsystem( +private pattern mustInRelationpayload_reference_Spacecraft( problem:LogicProblem, interpretation:PartialInterpretation, source: DefinedElement, target:DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"communicationLink reference CommSubsystem"); + PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"payload reference Spacecraft"); PartialRelationInterpretation.relationlinks(relationIterpretation,link); BinaryElementRelationLink.param1(link,source); BinaryElementRelationLink.param2(link,target); } /** - * Matcher for detecting tuples t where <>communicationLink reference CommSubsystem(source,target) + * Matcher for detecting tuples t where <>payload reference Spacecraft(source,target) */ -private pattern mayInRelationcommunicationLink_reference_CommSubsystem( +private pattern mayInRelationpayload_reference_Spacecraft( problem:LogicProblem, interpretation:PartialInterpretation, source: DefinedElement, target:DefinedElement) { @@ -1236,11 +1218,11 @@ private pattern mayInRelationcommunicationLink_reference_CommSubsystem( find mayExist(problem, interpretation, source); find mayExist(problem, interpretation, target); // Type consistency - find mayInstanceOfCommSubsystem_class(problem,interpretation,source); - find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,target); + find mayInstanceOfSpacecraft_class(problem,interpretation,source); + find mayInstanceOfPayload_class(problem,interpretation,target); // There are "numberOfExistingReferences" currently existing instances of the reference from the source, // the upper bound of the multiplicity should be considered. - numberOfExistingReferences == count find mustInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,source,_); + numberOfExistingReferences == count find mustInRelationpayload_reference_Spacecraft(problem,interpretation,source,_); check(numberOfExistingReferences < 1); // The reference is containment, then a new reference cannot be create if: // 1. Multiple parents @@ -1248,7 +1230,7 @@ private pattern mayInRelationcommunicationLink_reference_CommSubsystem( // 2. Circle in the containment hierarchy neg find mustTransitiveContains(source,target); } or { - find mustInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,source,target); + find mustInRelationpayload_reference_Spacecraft(problem,interpretation,source,target); } /** * Matcher for detecting tuples t where []source reference DirectedCommunicationLink(source,target) @@ -1412,118 +1394,69 @@ private pattern mayInRelationgain_attribute_CommSubsystem( ////////// // 1.3 Relation Definition Indexers ////////// -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries multipleCommunicationLinks -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_multipleCommunicationLinks( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - // Element is exported - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,var_virtual0,var_virtual1); - find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_Link1); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual2); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); - find mustInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,var_virtual2,var_virtual3); - find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual3); - find mustEquivalent(problem, interpretation, var_virtual3, var_Link2); - neg find mayEquivalent(problem, interpretation, var_Link1, var_Link2); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_multipleCommunicationLinks( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find interpretation(problem,interpretation); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - // Element is exported - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mayInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,var_virtual0,var_virtual1); - find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual1); - find mayEquivalent(problem, interpretation, var_virtual1, var_Link1); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual2); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); - find mayInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,var_virtual2,var_virtual3); - find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual3); - find mayEquivalent(problem, interpretation, var_virtual3, var_Link2); - neg find mustEquivalent(problem, interpretation, var_Link1, var_Link2); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_multipleCommunicationLinks( +// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries communicationLinkDoesNotStartAtContainingElement +private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement( problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - // Element is exported - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,var_virtual0,var_virtual1); - find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_Link1); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual2); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); - find mustInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,var_virtual2,var_virtual3); - find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual3); - find mustEquivalent(problem, interpretation, var_virtual3, var_Link2); - neg find mustEquivalent(problem, interpretation, var_Link1, var_Link2); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries communicationLinkOfElement -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkOfElement( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element, var_Link) + var_Link) { find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_Link); - // Element is exported // Link is exported find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,var_virtual0,var_virtual1); - find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_Link); + find mustInRelationcommunicationLink_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); + find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual0); + find mustEquivalent(problem, interpretation, var_virtual0, var_Link); + find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_Link); + find mustInRelationsource_reference_DirectedCommunicationLink(problem,interpretation,var_Link,var_virtual1); + find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); + find mustEquivalent(problem, interpretation, var_virtual1, var_SourceComm); + find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_SourceElement); + find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_SourceElement,var_virtual2); + find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); + find mustEquivalent(problem, interpretation, var_virtual2, var_SourceComm); + neg find mayEquivalent(problem, interpretation, var_Element, var_SourceElement); } -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkOfElement( +private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement( problem:LogicProblem, interpretation:PartialInterpretation, - var_Element, var_Link) + var_Link) { find interpretation(problem,interpretation); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_Link); - // Element is exported // Link is exported find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mayInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,var_virtual0,var_virtual1); - find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual1); - find mayEquivalent(problem, interpretation, var_virtual1, var_Link); + find mayInRelationcommunicationLink_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); + find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual0); + find mayEquivalent(problem, interpretation, var_virtual0, var_Link); + find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_Link); + find mayInRelationsource_reference_DirectedCommunicationLink(problem,interpretation,var_Link,var_virtual1); + find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); + find mayEquivalent(problem, interpretation, var_virtual1, var_SourceComm); + find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_SourceElement); + find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_SourceElement,var_virtual2); + find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); + find mayEquivalent(problem, interpretation, var_virtual2, var_SourceComm); + neg find mustEquivalent(problem, interpretation, var_Element, var_SourceElement); } -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkOfElement( +private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement( problem:LogicProblem, interpretation:PartialInterpretation, - var_Element, var_Link) + var_Link) { find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_Link); - // Element is exported // Link is exported find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,var_virtual0,var_virtual1); - find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_Link); + find mustInRelationcommunicationLink_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); + find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_virtual0); + find mustEquivalent(problem, interpretation, var_virtual0, var_Link); + find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,var_Link); + find mustInRelationsource_reference_DirectedCommunicationLink(problem,interpretation,var_Link,var_virtual1); + find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); + find mustEquivalent(problem, interpretation, var_virtual1, var_SourceComm); + find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_SourceElement); + find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_SourceElement,var_virtual2); + find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); + find mustEquivalent(problem, interpretation, var_virtual2, var_SourceComm); + neg find mustEquivalent(problem, interpretation, var_Element, var_SourceElement); } // Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries notEnoughInterferometryPayloads private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_notEnoughInterferometryPayloads( @@ -2942,9 +2875,9 @@ private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterp { find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,source,target); }or - { find mustInRelationpayload_reference_Spacecraft(problem,interpretation,source,target); }or + { find mustInRelationcommunicationLink_reference_CommunicatingElement(problem,interpretation,source,target); }or - { find mustInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,source,target); } + { find mustInRelationpayload_reference_Spacecraft(problem,interpretation,source,target); } private pattern mustTransitiveContains(source,target) { find mustContains2+(source,target); @@ -2955,10 +2888,10 @@ private pattern mustTransitiveContains(source,target) { ////////// // 2.1 Invalidated by WF Queries ////////// -pattern invalidatedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_multipleCommunicationLinks(problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) +pattern invalidatedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement(problem:LogicProblem, interpretation:PartialInterpretation, + var_Link) { - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_multipleCommunicationLinks(problem,interpretation,var_Element); + find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement(problem,interpretation,var_Link); } pattern invalidatedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_notEnoughInterferometryPayloads(problem:LogicProblem, interpretation:PartialInterpretation, var_Mission) @@ -3088,10 +3021,10 @@ pattern unfinishedLowerMultiplicity_gain_attribute_CommSubsystem(problem:LogicPr ////////// // 3.2 Unfinishedness Measured by WF Queries ////////// -pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_multipleCommunicationLinks(problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) +pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement(problem:LogicProblem, interpretation:PartialInterpretation, + var_Link) { - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_multipleCommunicationLinks(problem,interpretation,var_Element); + find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement(problem,interpretation,var_Link); } pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_notEnoughInterferometryPayloads(problem:LogicProblem, interpretation:PartialInterpretation, var_Mission) @@ -3157,55 +3090,55 @@ pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_querie private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) { find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,root); + find mustInstanceOfInterferometryPayload_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfCubeSat6U_class(problem,interpretation,root); + find mustInstanceOfSpacecraft_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfSmallSat_class(problem,interpretation,root); + find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,root); + find mustInstanceOfCubeSat_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfPayload_class(problem,interpretation,root); + find mustInstanceOfConstellationMission_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,root); + find mustInstanceOfInterferometryMission_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,root); + find mustInstanceOfCubeSat3U_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfCubeSat_class(problem,interpretation,root); + find mustInstanceOfCommunicatingElement_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfCubeSat3U_class(problem,interpretation,root); + find mustInstanceOfCubeSat6U_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfInterferometryPayload_class(problem,interpretation,root); + find mustInstanceOfSmallSat_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfConstellationMission_class(problem,interpretation,root); + find mustInstanceOfCommSubsystem_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfInterferometryMission_class(problem,interpretation,root); + find mustInstanceOfGroundStationNetwork_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class(problem,interpretation,root); + find mustInstanceOfPayload_class(problem,interpretation,root); find mustExist(problem, interpretation, root); }or{ find interpretation(problem,interpretation); @@ -3248,87 +3181,99 @@ private pattern hasElementInContainment(problem:LogicProblem, interpretation:Par find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,root); find mustExist(problem, interpretation, root); } -pattern createObject_GroundStationNetwork_class_UndefinedPart_by_groundStationNetwork_reference_ConstellationMission( +pattern createObject_DirectedCommunicationLink_class_by_communicationLink_reference_CommunicatingElement( problem:LogicProblem, interpretation:PartialInterpretation, relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, container:DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"GroundStationNetwork class UndefinedPart"); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"DirectedCommunicationLink class"); PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"groundStationNetwork reference ConstellationMission"); - find mustInstanceOfConstellationMission_class(problem,interpretation,container); - find mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,newObject); - find mayInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,container,newObject); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"communicationLink reference CommunicatingElement"); + find mustInstanceOfCommunicatingElement_class(problem,interpretation,container); + find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,newObject); + find mayInRelationcommunicationLink_reference_CommunicatingElement(problem,interpretation,container,newObject); find mustExist(problem, interpretation, container); neg find mustExist(problem, interpretation, newObject); } -pattern createObject_GroundStationNetwork_class_UndefinedPart( +pattern createObject_DirectedCommunicationLink_class( problem:LogicProblem, interpretation:PartialInterpretation, typeInterpretation:PartialComplexTypeInterpretation) { find interpretation(problem,interpretation); neg find hasElementInContainment(problem,interpretation); PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"GroundStationNetwork class UndefinedPart"); - find mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,newObject); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"DirectedCommunicationLink class"); + find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,newObject); find mayExist(problem, interpretation, newObject); neg find mustExist(problem, interpretation, newObject); } -pattern createObject_SmallSat_class_by_spacecraft_reference_ConstellationMission( +pattern createObject_InterferometryMission_class_UndefinedPart( + problem:LogicProblem, interpretation:PartialInterpretation, + typeInterpretation:PartialComplexTypeInterpretation) +{ + find interpretation(problem,interpretation); + neg find hasElementInContainment(problem,interpretation); + PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InterferometryMission class UndefinedPart"); + find mayInstanceOfInterferometryMission_class_UndefinedPart(problem,interpretation,newObject); + find mayExist(problem, interpretation, newObject); + neg find mustExist(problem, interpretation, newObject); +} +pattern createObject_InterferometryPayload_class_by_payload_reference_Spacecraft( problem:LogicProblem, interpretation:PartialInterpretation, relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, container:DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"SmallSat class"); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InterferometryPayload class"); PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"spacecraft reference ConstellationMission"); - find mustInstanceOfConstellationMission_class(problem,interpretation,container); - find mayInstanceOfSmallSat_class(problem,interpretation,newObject); - find mayInRelationspacecraft_reference_ConstellationMission(problem,interpretation,container,newObject); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"payload reference Spacecraft"); + find mustInstanceOfSpacecraft_class(problem,interpretation,container); + find mayInstanceOfInterferometryPayload_class(problem,interpretation,newObject); + find mayInRelationpayload_reference_Spacecraft(problem,interpretation,container,newObject); find mustExist(problem, interpretation, container); neg find mustExist(problem, interpretation, newObject); } -pattern createObject_SmallSat_class( +pattern createObject_InterferometryPayload_class( problem:LogicProblem, interpretation:PartialInterpretation, typeInterpretation:PartialComplexTypeInterpretation) { find interpretation(problem,interpretation); neg find hasElementInContainment(problem,interpretation); PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"SmallSat class"); - find mayInstanceOfSmallSat_class(problem,interpretation,newObject); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InterferometryPayload class"); + find mayInstanceOfInterferometryPayload_class(problem,interpretation,newObject); find mayExist(problem, interpretation, newObject); neg find mustExist(problem, interpretation, newObject); } -pattern createObject_DirectedCommunicationLink_class_by_communicationLink_reference_CommSubsystem( +pattern createObject_GroundStationNetwork_class_UndefinedPart_by_groundStationNetwork_reference_ConstellationMission( problem:LogicProblem, interpretation:PartialInterpretation, relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, container:DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"DirectedCommunicationLink class"); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"GroundStationNetwork class UndefinedPart"); PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"communicationLink reference CommSubsystem"); - find mustInstanceOfCommSubsystem_class(problem,interpretation,container); - find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,newObject); - find mayInRelationcommunicationLink_reference_CommSubsystem(problem,interpretation,container,newObject); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"groundStationNetwork reference ConstellationMission"); + find mustInstanceOfConstellationMission_class(problem,interpretation,container); + find mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,newObject); + find mayInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,container,newObject); find mustExist(problem, interpretation, container); neg find mustExist(problem, interpretation, newObject); } -pattern createObject_DirectedCommunicationLink_class( +pattern createObject_GroundStationNetwork_class_UndefinedPart( problem:LogicProblem, interpretation:PartialInterpretation, typeInterpretation:PartialComplexTypeInterpretation) { find interpretation(problem,interpretation); neg find hasElementInContainment(problem,interpretation); PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"DirectedCommunicationLink class"); - find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,newObject); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"GroundStationNetwork class UndefinedPart"); + find mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,newObject); find mayExist(problem, interpretation, newObject); neg find mustExist(problem, interpretation, newObject); } @@ -3360,31 +3305,31 @@ pattern createObject_CubeSat3U_class( find mayExist(problem, interpretation, newObject); neg find mustExist(problem, interpretation, newObject); } -pattern createObject_CubeSat6U_class_by_spacecraft_reference_ConstellationMission( +pattern createObject_SmallSat_class_by_spacecraft_reference_ConstellationMission( problem:LogicProblem, interpretation:PartialInterpretation, relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, container:DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"CubeSat6U class"); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"SmallSat class"); PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"spacecraft reference ConstellationMission"); find mustInstanceOfConstellationMission_class(problem,interpretation,container); - find mayInstanceOfCubeSat6U_class(problem,interpretation,newObject); + find mayInstanceOfSmallSat_class(problem,interpretation,newObject); find mayInRelationspacecraft_reference_ConstellationMission(problem,interpretation,container,newObject); find mustExist(problem, interpretation, container); neg find mustExist(problem, interpretation, newObject); } -pattern createObject_CubeSat6U_class( +pattern createObject_SmallSat_class( problem:LogicProblem, interpretation:PartialInterpretation, typeInterpretation:PartialComplexTypeInterpretation) { find interpretation(problem,interpretation); neg find hasElementInContainment(problem,interpretation); PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"CubeSat6U class"); - find mayInstanceOfCubeSat6U_class(problem,interpretation,newObject); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"SmallSat class"); + find mayInstanceOfSmallSat_class(problem,interpretation,newObject); find mayExist(problem, interpretation, newObject); neg find mustExist(problem, interpretation, newObject); } @@ -3416,43 +3361,31 @@ pattern createObject_CommSubsystem_class_UndefinedPart( find mayExist(problem, interpretation, newObject); neg find mustExist(problem, interpretation, newObject); } -pattern createObject_InterferometryMission_class_UndefinedPart( - problem:LogicProblem, interpretation:PartialInterpretation, - typeInterpretation:PartialComplexTypeInterpretation) -{ - find interpretation(problem,interpretation); - neg find hasElementInContainment(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InterferometryMission class UndefinedPart"); - find mayInstanceOfInterferometryMission_class_UndefinedPart(problem,interpretation,newObject); - find mayExist(problem, interpretation, newObject); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_InterferometryPayload_class_by_payload_reference_Spacecraft( +pattern createObject_CubeSat6U_class_by_spacecraft_reference_ConstellationMission( problem:LogicProblem, interpretation:PartialInterpretation, relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, container:DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InterferometryPayload class"); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"CubeSat6U class"); PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"payload reference Spacecraft"); - find mustInstanceOfSpacecraft_class(problem,interpretation,container); - find mayInstanceOfInterferometryPayload_class(problem,interpretation,newObject); - find mayInRelationpayload_reference_Spacecraft(problem,interpretation,container,newObject); + PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"spacecraft reference ConstellationMission"); + find mustInstanceOfConstellationMission_class(problem,interpretation,container); + find mayInstanceOfCubeSat6U_class(problem,interpretation,newObject); + find mayInRelationspacecraft_reference_ConstellationMission(problem,interpretation,container,newObject); find mustExist(problem, interpretation, container); neg find mustExist(problem, interpretation, newObject); } -pattern createObject_InterferometryPayload_class( +pattern createObject_CubeSat6U_class( problem:LogicProblem, interpretation:PartialInterpretation, typeInterpretation:PartialComplexTypeInterpretation) { find interpretation(problem,interpretation); neg find hasElementInContainment(problem,interpretation); PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InterferometryPayload class"); - find mayInstanceOfInterferometryPayload_class(problem,interpretation,newObject); + PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"CubeSat6U class"); + find mayInstanceOfCubeSat6U_class(problem,interpretation,newObject); find mayExist(problem, interpretation, newObject); neg find mustExist(problem, interpretation, newObject); } @@ -3460,114 +3393,99 @@ pattern createObject_InterferometryPayload_class( ////////// // 4.2 Type refinement ////////// -pattern refineTypeTo_GroundStationNetwork_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { +pattern refineTypeTo_DirectedCommunicationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,element); + find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfSpacecraft_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); } -pattern refineTypeTo_SmallSat_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { +pattern refineTypeTo_InterferometryMission_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); + find mayInstanceOfInterferometryMission_class_UndefinedPart(problem,interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfInterferometryMission_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); } -pattern refineTypeTo_DirectedCommunicationLink_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { +pattern refineTypeTo_InterferometryPayload_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); + find mayInstanceOfInterferometryPayload_class(problem,interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfInterferometryPayload_class(problem,interpretation,element); +} +pattern refineTypeTo_GroundStationNetwork_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { + find interpretation(problem,interpretation); + PartialInterpretation.newElements(interpretation,element); + find mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfSpacecraft_class(problem,interpretation,element); } pattern refineTypeTo_CubeSat3U_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); find mayInstanceOfCubeSat3U_class(problem,interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); + neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); + neg find mustInstanceOfSmallSat_class(problem,interpretation,element); neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); } -pattern refineTypeTo_CubeSat6U_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { +pattern refineTypeTo_SmallSat_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfCubeSat6U_class(problem,interpretation,element); + find mayInstanceOfSmallSat_class(problem,interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); + neg find mustInstanceOfCubeSat_class(problem,interpretation,element); + neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfSmallSat_class(problem,interpretation,element); } pattern refineTypeTo_CommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); find mayInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); -} -pattern refineTypeTo_InterferometryMission_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfInterferometryMission_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfInterferometryMission_class_UndefinedPart(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); } -pattern refineTypeTo_InterferometryPayload_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { +pattern refineTypeTo_CubeSat6U_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { find interpretation(problem,interpretation); PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfInterferometryPayload_class(problem,interpretation,element); + find mayInstanceOfCubeSat6U_class(problem,interpretation,element); neg find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); + neg find mustInstanceOfPayload_class(problem,interpretation,element); neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfInterferometryPayload_class(problem,interpretation,element); + neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); + neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); + neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); + neg find mustInstanceOfSmallSat_class(problem,interpretation,element); + neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); } ////////// // 4.3 Relation refinement ////////// -pattern refineRelation_communicationLink_reference_CommunicatingElement( - problem:LogicProblem, interpretation:PartialInterpretation, - relationIterpretation:PartialRelationInterpretation, - from: DefinedElement, to: DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"communicationLink reference CommunicatingElement"); - find mustExist(problem, interpretation, from); - find mustExist(problem, interpretation, to); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,from); - find mustInstanceOfDirectedCommunicationLink_class(problem,interpretation,to); - find mayInRelationcommunicationLink_reference_CommunicatingElement(problem,interpretation,from,to); - neg find mustInRelationcommunicationLink_reference_CommunicatingElement(problem,interpretation,from,to); -} pattern refineRelation_source_reference_DirectedCommunicationLink( problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generation.logicproblem b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generation.logicproblem index 2164c23c..2a54174a 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generation.logicproblem +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generation.logicproblem @@ -648,38 +648,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -689,15 +658,15 @@ - - - + + + - + @@ -710,25 +679,25 @@ - - - + + + - - - + + + - - + + - + @@ -738,15 +707,15 @@ - - - + + + - + @@ -759,25 +728,25 @@ - - - + + + - - - + + + - - + + - + @@ -787,15 +756,15 @@ - - - + + + - + @@ -808,25 +777,25 @@ - - - + + + - - - + + + - - + + - + @@ -836,15 +805,15 @@ - - - + + + - + @@ -857,25 +826,25 @@ - - - + + + - - - + + + - - + + - + @@ -885,15 +854,15 @@ - - - + + + - + @@ -906,31 +875,31 @@ - - - + + + - - - + + + - - + + - + - + @@ -942,34 +911,46 @@ - + - + - + - + - + - + - + - + + + + + + + + + + + + + @@ -978,55 +959,55 @@ - + - + - + - + - + - + - + - + - + - + - + - + @@ -1038,10 +1019,10 @@ - + - + @@ -1050,7 +1031,7 @@ - + @@ -1062,7 +1043,7 @@ - + @@ -1074,38 +1055,26 @@ - - - - - - - - - - - - - + - - + + - + - - + + @@ -1122,7 +1091,7 @@ - + @@ -1130,10 +1099,6 @@ - - - - @@ -1142,7 +1107,7 @@ - + @@ -1154,90 +1119,48 @@ - - - - + + + + - - - - - + + - + - - + + - - - + + + - - - - - - + + - - - - - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -1245,18 +1168,18 @@ - + - - + + - + @@ -1271,26 +1194,26 @@ - + - - - + + + - - - + + + - - + + - + @@ -1306,22 +1229,22 @@ - - + + - - + + - + - + @@ -1336,32 +1259,32 @@ - - + + - + - - + + - + - - - + + + - + @@ -1376,32 +1299,32 @@ - - + + - + - - + + - + - - - + + + - + @@ -1412,11 +1335,11 @@ - + - + @@ -1431,14 +1354,14 @@ - - - - + + + + - - + + @@ -1449,16 +1372,16 @@ - + - - - - + + + + - + @@ -1468,24 +1391,24 @@ - - - - + + + + - + - + - + @@ -1517,46 +1440,46 @@ - + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - - + + - - - + + + - + @@ -1564,27 +1487,27 @@ - + - + - - - + + + - + @@ -1595,11 +1518,11 @@ - + - + @@ -1620,35 +1543,35 @@ - - - + + + - - - + + + - - + + - + - - + + - + - + @@ -1665,33 +1588,33 @@ - - - + + + - - - + + + - + - - - + + + - - - + + + - + @@ -1702,14 +1625,14 @@ - - - + + + - + @@ -1726,33 +1649,33 @@ - - - + + + - - - + + + - + - - - + + + - - - + + + - + @@ -1763,14 +1686,14 @@ - - - + + + - + @@ -1782,23 +1705,23 @@ - + - - - + + + - - + + - + @@ -1810,18 +1733,18 @@ - + - - - + + + - + @@ -1833,23 +1756,23 @@ - + - - - + + + - - + + - + @@ -1861,18 +1784,18 @@ - + - - - + + + - + @@ -1887,26 +1810,26 @@ - + - - - + + + - + - - - + + + - + @@ -1927,48 +1850,48 @@ - + - - + + - - + + - - - + + + - + - - - + + + - - + + - + - - + + - + @@ -1980,18 +1903,18 @@ - + - - - + + + - + @@ -1999,13 +1922,13 @@ - + - + @@ -2020,31 +1943,31 @@ - + - + - - + + - - - + + + - - + + - + @@ -2052,13 +1975,13 @@ - + - + @@ -2070,31 +1993,31 @@ - + - + - + - + - + - + @@ -2113,7 +2036,7 @@ - + @@ -2122,62 +2045,59 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - - + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/init.partialmodel b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/init.partialmodel index f7827e03..6589a3ca 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/init.partialmodel +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/init.partialmodel @@ -1,5 +1,5 @@ - + @@ -55,11 +55,6 @@ - - - - - @@ -68,11 +63,11 @@ - - + + - + @@ -81,8 +76,8 @@ - - + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml index d019e891..5d75b948 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml @@ -1,19 +1,15 @@ + + + - - - - - - - - + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/.gitignore index 4354da2c..6f361334 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/.gitignore @@ -23,5 +23,3 @@ /.SpacecraftOfKind.java._trace /.NoPotentialLinkToGroundStation.java._trace /.SmallSat.java._trace -/.CommunicationLinkOfElement.java._trace -/.MultipleCommunicationLinks.java._trace diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkDoesNotStartAtContainingElement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkDoesNotStartAtContainingElement.java new file mode 100644 index 00000000..dde3c20f --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkDoesNotStartAtContainingElement.java @@ -0,0 +1,579 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; + +import hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink; +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; +import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; +import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; + +/** + * A pattern-specific query specification that can instantiate Matcher in a type-safe way. + * + *

Original source: + *

+ *         {@literal @}Constraint(severity = "error", key = {Link},
+ *         	message = "Communication links must start from the containing element.")
+ *         pattern communicationLinkDoesNotStartAtContainingElement(Link : DirectedCommunicationLink) {
+ *         	CommunicatingElement.communicationLink(Element, Link);
+ *         	DirectedCommunicationLink.source(Link, SourceComm);
+ *         	CommunicatingElement.commSubsystem(SourceElement, SourceComm);
+ *         	Element != SourceElement;
+ *         }
+ * 
+ * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class CommunicationLinkDoesNotStartAtContainingElement extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement pattern, + * to be used in conjunction with {@link Matcher}. + * + *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. + * Each instance is a (possibly partial) substitution of pattern parameters, + * usable to represent a match of the pattern in the result of a query, + * or to specify the bound (fixed) input parameters when issuing a query. + * + * @see Matcher + * + */ + public static abstract class Match extends BasePatternMatch { + private DirectedCommunicationLink fLink; + + private static List parameterNames = makeImmutableList("Link"); + + private Match(final DirectedCommunicationLink pLink) { + this.fLink = pLink; + } + + @Override + public Object get(final String parameterName) { + if ("Link".equals(parameterName)) return this.fLink; + return null; + } + + public DirectedCommunicationLink getLink() { + return this.fLink; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("Link".equals(parameterName) ) { + this.fLink = (DirectedCommunicationLink) newValue; + return true; + } + return false; + } + + public void setLink(final DirectedCommunicationLink pLink) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fLink = pLink; + } + + @Override + public String patternName() { + return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement"; + } + + @Override + public List parameterNames() { + return CommunicationLinkDoesNotStartAtContainingElement.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fLink}; + } + + @Override + public CommunicationLinkDoesNotStartAtContainingElement.Match toImmutable() { + return isMutable() ? newMatch(fLink) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"Link\"=" + prettyPrintValue(fLink)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fLink); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof CommunicationLinkDoesNotStartAtContainingElement.Match)) { + CommunicationLinkDoesNotStartAtContainingElement.Match other = (CommunicationLinkDoesNotStartAtContainingElement.Match) obj; + return Objects.equals(fLink, other.fLink); + } else { + // this should be infrequent + if (!(obj instanceof IPatternMatch)) { + return false; + } + IPatternMatch otherSig = (IPatternMatch) obj; + return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); + } + } + + @Override + public CommunicationLinkDoesNotStartAtContainingElement specification() { + return CommunicationLinkDoesNotStartAtContainingElement.instance(); + } + + /** + * Returns an empty, mutable match. + * Fields of the mutable match can be filled to create a partial match, usable as matcher input. + * + * @return the empty match. + * + */ + public static CommunicationLinkDoesNotStartAtContainingElement.Match newEmptyMatch() { + return new Mutable(null); + } + + /** + * Returns a mutable (partial) match. + * Fields of the mutable match can be filled to create a partial match, usable as matcher input. + * + * @param pLink the fixed value of pattern parameter Link, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static CommunicationLinkDoesNotStartAtContainingElement.Match newMutableMatch(final DirectedCommunicationLink pLink) { + return new Mutable(pLink); + } + + /** + * Returns a new (partial) match. + * This can be used e.g. to call the matcher with a partial match. + *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pLink the fixed value of pattern parameter Link, or null if not bound. + * @return the (partial) match object. + * + */ + public static CommunicationLinkDoesNotStartAtContainingElement.Match newMatch(final DirectedCommunicationLink pLink) { + return new Immutable(pLink); + } + + private static final class Mutable extends CommunicationLinkDoesNotStartAtContainingElement.Match { + Mutable(final DirectedCommunicationLink pLink) { + super(pLink); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends CommunicationLinkDoesNotStartAtContainingElement.Match { + Immutable(final DirectedCommunicationLink pLink) { + super(pLink); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement pattern, + * providing pattern-specific query methods. + * + *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, + * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. + * + *

Matches of the pattern will be represented as {@link Match}. + * + *

Original source: + *

+   * {@literal @}Constraint(severity = "error", key = {Link},
+   * 	message = "Communication links must start from the containing element.")
+   * pattern communicationLinkDoesNotStartAtContainingElement(Link : DirectedCommunicationLink) {
+   * 	CommunicatingElement.communicationLink(Element, Link);
+   * 	DirectedCommunicationLink.source(Link, SourceComm);
+   * 	CommunicatingElement.commSubsystem(SourceElement, SourceComm);
+   * 	Element != SourceElement;
+   * }
+   * 
+ * + * @see Match + * @see CommunicationLinkDoesNotStartAtContainingElement + * + */ + public static class Matcher extends BaseMatcher { + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + public static CommunicationLinkDoesNotStartAtContainingElement.Matcher on(final ViatraQueryEngine engine) { + // check if matcher already exists + Matcher matcher = engine.getExistingMatcher(querySpecification()); + if (matcher == null) { + matcher = (Matcher)engine.getMatcher(querySpecification()); + } + return matcher; + } + + /** + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * @return an initialized matcher + * @noreference This method is for internal matcher initialization by the framework, do not call it manually. + * + */ + public static CommunicationLinkDoesNotStartAtContainingElement.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_LINK = 0; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(CommunicationLinkDoesNotStartAtContainingElement.Matcher.class); + + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + private Matcher() { + super(querySpecification()); + } + + /** + * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pLink the fixed value of pattern parameter Link, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final DirectedCommunicationLink pLink) { + return rawStreamAllMatches(new Object[]{pLink}).collect(Collectors.toSet()); + } + + /** + * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. + *

+ * NOTE: It is important not to modify the source model while the stream is being processed. + * If the match set of the pattern changes during processing, the contents of the stream is undefined. + * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. + * @param pLink the fixed value of pattern parameter Link, or null if not bound. + * @return a stream of matches represented as a Match object. + * + */ + public Stream streamAllMatches(final DirectedCommunicationLink pLink) { + return rawStreamAllMatches(new Object[]{pLink}); + } + + /** + * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. + * Neither determinism nor randomness of selection is guaranteed. + * @param pLink the fixed value of pattern parameter Link, or null if not bound. + * @return a match represented as a Match object, or null if no match is found. + * + */ + public Optional getOneArbitraryMatch(final DirectedCommunicationLink pLink) { + return rawGetOneArbitraryMatch(new Object[]{pLink}); + } + + /** + * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, + * under any possible substitution of the unspecified parameters (if any). + * @param pLink the fixed value of pattern parameter Link, or null if not bound. + * @return true if the input is a valid (partial) match of the pattern. + * + */ + public boolean hasMatch(final DirectedCommunicationLink pLink) { + return rawHasMatch(new Object[]{pLink}); + } + + /** + * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pLink the fixed value of pattern parameter Link, or null if not bound. + * @return the number of pattern matches found. + * + */ + public int countMatches(final DirectedCommunicationLink pLink) { + return rawCountMatches(new Object[]{pLink}); + } + + /** + * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. + * Neither determinism nor randomness of selection is guaranteed. + * @param pLink the fixed value of pattern parameter Link, or null if not bound. + * @param processor the action that will process the selected match. + * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked + * + */ + public boolean forOneArbitraryMatch(final DirectedCommunicationLink pLink, final Consumer processor) { + return rawForOneArbitraryMatch(new Object[]{pLink}, processor); + } + + /** + * Returns a new (partial) match. + * This can be used e.g. to call the matcher with a partial match. + *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pLink the fixed value of pattern parameter Link, or null if not bound. + * @return the (partial) match object. + * + */ + public CommunicationLinkDoesNotStartAtContainingElement.Match newMatch(final DirectedCommunicationLink pLink) { + return CommunicationLinkDoesNotStartAtContainingElement.Match.newMatch(pLink); + } + + /** + * Retrieve the set of values that occur in matches for Link. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfLink(final Object[] parameters) { + return rawStreamAllValues(POSITION_LINK, parameters).map(DirectedCommunicationLink.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for Link. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfLink() { + return rawStreamAllValuesOfLink(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for Link. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfLink() { + return rawStreamAllValuesOfLink(emptyArray()); + } + + @Override + protected CommunicationLinkDoesNotStartAtContainingElement.Match tupleToMatch(final Tuple t) { + try { + return CommunicationLinkDoesNotStartAtContainingElement.Match.newMatch((DirectedCommunicationLink) t.get(POSITION_LINK)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected CommunicationLinkDoesNotStartAtContainingElement.Match arrayToMatch(final Object[] match) { + try { + return CommunicationLinkDoesNotStartAtContainingElement.Match.newMatch((DirectedCommunicationLink) match[POSITION_LINK]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected CommunicationLinkDoesNotStartAtContainingElement.Match arrayToMatchMutable(final Object[] match) { + try { + return CommunicationLinkDoesNotStartAtContainingElement.Match.newMutableMatch((DirectedCommunicationLink) match[POSITION_LINK]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + /** + * @return the singleton instance of the query specification of this pattern + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static IQuerySpecification querySpecification() { + return CommunicationLinkDoesNotStartAtContainingElement.instance(); + } + } + + private CommunicationLinkDoesNotStartAtContainingElement() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static CommunicationLinkDoesNotStartAtContainingElement instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected CommunicationLinkDoesNotStartAtContainingElement.Matcher instantiate(final ViatraQueryEngine engine) { + return CommunicationLinkDoesNotStartAtContainingElement.Matcher.on(engine); + } + + @Override + public CommunicationLinkDoesNotStartAtContainingElement.Matcher instantiate() { + return CommunicationLinkDoesNotStartAtContainingElement.Matcher.create(); + } + + @Override + public CommunicationLinkDoesNotStartAtContainingElement.Match newEmptyMatch() { + return CommunicationLinkDoesNotStartAtContainingElement.Match.newEmptyMatch(); + } + + @Override + public CommunicationLinkDoesNotStartAtContainingElement.Match newMatch(final Object... parameters) { + return CommunicationLinkDoesNotStartAtContainingElement.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink) parameters[0]); + } + + /** + * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement (visibility: PUBLIC, simpleName: CommunicationLinkDoesNotStartAtContainingElement, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement (visibility: PUBLIC, simpleName: CommunicationLinkDoesNotStartAtContainingElement, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * + *

This workaround is required e.g. to support recursion. + * + */ + private static class LazyHolder { + private static final CommunicationLinkDoesNotStartAtContainingElement INSTANCE = new CommunicationLinkDoesNotStartAtContainingElement(); + + /** + * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. + * This initialization order is required to support indirect recursion. + * + *

The static initializer is defined using a helper field to work around limitations of the code generator. + * + */ + private static final Object STATIC_INITIALIZER = ensureInitialized(); + + public static Object ensureInitialized() { + INSTANCE.ensureInitializedInternal(); + return null; + } + } + + private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { + private static final CommunicationLinkDoesNotStartAtContainingElement.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_Link = new PParameter("Link", "hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_Link); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkDoesNotStartAtContainingElement"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("Link"); + } + + @Override + public List getParameters() { + return parameters; + } + + @Override + public Set doGetContainedBodies() { + setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); + Set bodies = new LinkedHashSet<>(); + { + PBody body = new PBody(this); + PVariable var_Link = body.getOrCreateVariableByName("Link"); + PVariable var_Element = body.getOrCreateVariableByName("Element"); + PVariable var_SourceComm = body.getOrCreateVariableByName("SourceComm"); + PVariable var_SourceElement = body.getOrCreateVariableByName("SourceElement"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_Link, parameter_Link) + )); + // CommunicatingElement.communicationLink(Element, Link) + new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Element, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "communicationLink"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); + new Equality(body, var__virtual_0_, var_Link); + // DirectedCommunicationLink.source(Link, SourceComm) + new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Link, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "DirectedCommunicationLink", "source"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); + new Equality(body, var__virtual_1_, var_SourceComm); + // CommunicatingElement.commSubsystem(SourceElement, SourceComm) + new TypeConstraint(body, Tuples.flatTupleOf(var_SourceElement), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); + PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_SourceElement, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); + new Equality(body, var__virtual_2_, var_SourceComm); + // Element != SourceElement + new Inequality(body, var_Element, var_SourceElement); + bodies.add(body); + } + { + PAnnotation annotation = new PAnnotation("Constraint"); + annotation.addAttribute("severity", "error"); + annotation.addAttribute("key", Arrays.asList(new Object[] { + new ParameterReference("Link") + })); + annotation.addAttribute("message", "Communication links must start from the containing element."); + addAnnotation(annotation); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkOfElement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkOfElement.java deleted file mode 100644 index 1327c6bf..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLinkOfElement.java +++ /dev/null @@ -1,705 +0,0 @@ -/** - * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql - */ -package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.CommunicatingElement; -import satellite.DirectedCommunicationLink; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         {@literal @}QueryBasedFeature(feature = "communicationLink")
- *         pattern communicationLinkOfElement(Element : CommunicatingElement, Link : DirectedCommunicationLink) {
- *         	CommunicatingElement.commSubsystem.communicationLink(Element, Link);
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class CommunicationLinkOfElement extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkOfElement pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private CommunicatingElement fElement; - - private DirectedCommunicationLink fLink; - - private static List parameterNames = makeImmutableList("Element", "Link"); - - private Match(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { - this.fElement = pElement; - this.fLink = pLink; - } - - @Override - public Object get(final String parameterName) { - if ("Element".equals(parameterName)) return this.fElement; - if ("Link".equals(parameterName)) return this.fLink; - return null; - } - - public CommunicatingElement getElement() { - return this.fElement; - } - - public DirectedCommunicationLink getLink() { - return this.fLink; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("Element".equals(parameterName) ) { - this.fElement = (CommunicatingElement) newValue; - return true; - } - if ("Link".equals(parameterName) ) { - this.fLink = (DirectedCommunicationLink) newValue; - return true; - } - return false; - } - - public void setElement(final CommunicatingElement pElement) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fElement = pElement; - } - - public void setLink(final DirectedCommunicationLink pLink) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fLink = pLink; - } - - @Override - public String patternName() { - return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkOfElement"; - } - - @Override - public List parameterNames() { - return CommunicationLinkOfElement.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fElement, fLink}; - } - - @Override - public CommunicationLinkOfElement.Match toImmutable() { - return isMutable() ? newMatch(fElement, fLink) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"Element\"=" + prettyPrintValue(fElement) + ", "); - result.append("\"Link\"=" + prettyPrintValue(fLink)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fElement, fLink); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof CommunicationLinkOfElement.Match)) { - CommunicationLinkOfElement.Match other = (CommunicationLinkOfElement.Match) obj; - return Objects.equals(fElement, other.fElement) && Objects.equals(fLink, other.fLink); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public CommunicationLinkOfElement specification() { - return CommunicationLinkOfElement.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static CommunicationLinkOfElement.Match newEmptyMatch() { - return new Mutable(null, null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @param pLink the fixed value of pattern parameter Link, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static CommunicationLinkOfElement.Match newMutableMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { - return new Mutable(pElement, pLink); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @param pLink the fixed value of pattern parameter Link, or null if not bound. - * @return the (partial) match object. - * - */ - public static CommunicationLinkOfElement.Match newMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { - return new Immutable(pElement, pLink); - } - - private static final class Mutable extends CommunicationLinkOfElement.Match { - Mutable(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { - super(pElement, pLink); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends CommunicationLinkOfElement.Match { - Immutable(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { - super(pElement, pLink); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkOfElement pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * {@literal @}QueryBasedFeature(feature = "communicationLink")
-   * pattern communicationLinkOfElement(Element : CommunicatingElement, Link : DirectedCommunicationLink) {
-   * 	CommunicatingElement.commSubsystem.communicationLink(Element, Link);
-   * }
-   * 
- * - * @see Match - * @see CommunicationLinkOfElement - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static CommunicationLinkOfElement.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static CommunicationLinkOfElement.Matcher create() { - return new Matcher(); - } - - private static final int POSITION_ELEMENT = 0; - - private static final int POSITION_LINK = 1; - - private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(CommunicationLinkOfElement.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @param pLink the fixed value of pattern parameter Link, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { - return rawStreamAllMatches(new Object[]{pElement, pLink}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @param pLink the fixed value of pattern parameter Link, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { - return rawStreamAllMatches(new Object[]{pElement, pLink}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @param pLink the fixed value of pattern parameter Link, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { - return rawGetOneArbitraryMatch(new Object[]{pElement, pLink}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @param pLink the fixed value of pattern parameter Link, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { - return rawHasMatch(new Object[]{pElement, pLink}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @param pLink the fixed value of pattern parameter Link, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { - return rawCountMatches(new Object[]{pElement, pLink}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @param pLink the fixed value of pattern parameter Link, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pElement, pLink}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @param pLink the fixed value of pattern parameter Link, or null if not bound. - * @return the (partial) match object. - * - */ - public CommunicationLinkOfElement.Match newMatch(final CommunicatingElement pElement, final DirectedCommunicationLink pLink) { - return CommunicationLinkOfElement.Match.newMatch(pElement, pLink); - } - - /** - * Retrieve the set of values that occur in matches for Element. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfElement(final Object[] parameters) { - return rawStreamAllValues(POSITION_ELEMENT, parameters).map(CommunicatingElement.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Element. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfElement() { - return rawStreamAllValuesOfElement(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Element. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfElement() { - return rawStreamAllValuesOfElement(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Element. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * - * @return the Stream of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfElement(final CommunicationLinkOfElement.Match partialMatch) { - return rawStreamAllValuesOfElement(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Element. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * - * @return the Stream of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfElement(final DirectedCommunicationLink pLink) { - return rawStreamAllValuesOfElement(new Object[]{null, pLink}); - } - - /** - * Retrieve the set of values that occur in matches for Element. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfElement(final CommunicationLinkOfElement.Match partialMatch) { - return rawStreamAllValuesOfElement(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Element. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfElement(final DirectedCommunicationLink pLink) { - return rawStreamAllValuesOfElement(new Object[]{null, pLink}).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Link. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfLink(final Object[] parameters) { - return rawStreamAllValues(POSITION_LINK, parameters).map(DirectedCommunicationLink.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Link. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfLink() { - return rawStreamAllValuesOfLink(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Link. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfLink() { - return rawStreamAllValuesOfLink(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Link. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * - * @return the Stream of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfLink(final CommunicationLinkOfElement.Match partialMatch) { - return rawStreamAllValuesOfLink(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Link. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * - * @return the Stream of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfLink(final CommunicatingElement pElement) { - return rawStreamAllValuesOfLink(new Object[]{pElement, null}); - } - - /** - * Retrieve the set of values that occur in matches for Link. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfLink(final CommunicationLinkOfElement.Match partialMatch) { - return rawStreamAllValuesOfLink(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Link. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfLink(final CommunicatingElement pElement) { - return rawStreamAllValuesOfLink(new Object[]{pElement, null}).collect(Collectors.toSet()); - } - - @Override - protected CommunicationLinkOfElement.Match tupleToMatch(final Tuple t) { - try { - return CommunicationLinkOfElement.Match.newMatch((CommunicatingElement) t.get(POSITION_ELEMENT), (DirectedCommunicationLink) t.get(POSITION_LINK)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected CommunicationLinkOfElement.Match arrayToMatch(final Object[] match) { - try { - return CommunicationLinkOfElement.Match.newMatch((CommunicatingElement) match[POSITION_ELEMENT], (DirectedCommunicationLink) match[POSITION_LINK]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected CommunicationLinkOfElement.Match arrayToMatchMutable(final Object[] match) { - try { - return CommunicationLinkOfElement.Match.newMutableMatch((CommunicatingElement) match[POSITION_ELEMENT], (DirectedCommunicationLink) match[POSITION_LINK]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return CommunicationLinkOfElement.instance(); - } - } - - private CommunicationLinkOfElement() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static CommunicationLinkOfElement instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected CommunicationLinkOfElement.Matcher instantiate(final ViatraQueryEngine engine) { - return CommunicationLinkOfElement.Matcher.on(engine); - } - - @Override - public CommunicationLinkOfElement.Matcher instantiate() { - return CommunicationLinkOfElement.Matcher.create(); - } - - @Override - public CommunicationLinkOfElement.Match newEmptyMatch() { - return CommunicationLinkOfElement.Match.newEmptyMatch(); - } - - @Override - public CommunicationLinkOfElement.Match newMatch(final Object... parameters) { - return CommunicationLinkOfElement.Match.newMatch((satellite.CommunicatingElement) parameters[0], (satellite.DirectedCommunicationLink) parameters[1]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement (visibility: PUBLIC, simpleName: CommunicationLinkOfElement, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement (visibility: PUBLIC, simpleName: CommunicationLinkOfElement, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private static final CommunicationLinkOfElement INSTANCE = new CommunicationLinkOfElement(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private static final Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private static final CommunicationLinkOfElement.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_Element = new PParameter("Element", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); - - private final PParameter parameter_Link = new PParameter("Link", "satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_Element, parameter_Link); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.communicationLinkOfElement"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("Element","Link"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_Element = body.getOrCreateVariableByName("Element"); - PVariable var_Link = body.getOrCreateVariableByName("Link"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); - new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Element, parameter_Element), - new ExportedParameter(body, var_Link, parameter_Link) - )); - // CommunicatingElement.commSubsystem.communicationLink(Element, Link) - new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Element, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); - PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "communicationLink"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); - new Equality(body, var__virtual_1_, var_Link); - bodies.add(body); - } - { - PAnnotation annotation = new PAnnotation("QueryBasedFeature"); - annotation.addAttribute("feature", "communicationLink"); - addAnnotation(annotation); - } - return bodies; - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLoop.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLoop.java index ede57df8..f5835baf 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLoop.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CommunicationLoop.java @@ -3,6 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink; import java.util.Arrays; import java.util.Collection; @@ -38,7 +39,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.CommunicatingElement; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -472,7 +472,7 @@ public final class CommunicationLoop extends BaseGeneratedEMFQuerySpecification< @Override public CommunicationLoop.Match newMatch(final Object... parameters) { - return CommunicationLoop.Match.newMatch((satellite.CommunicatingElement) parameters[0]); + return CommunicationLoop.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement) parameters[0]); } /** @@ -504,7 +504,7 @@ public final class CommunicationLoop extends BaseGeneratedEMFQuerySpecification< private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final CommunicationLoop.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Element = new PParameter("Element", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); + private final PParameter parameter_Element = new PParameter("Element", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Element); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CubeSatWithKaAntenna.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CubeSatWithKaAntenna.java index b73cb23f..ba69943a 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CubeSatWithKaAntenna.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CubeSatWithKaAntenna.java @@ -3,6 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SmallSat; import java.util.Arrays; import java.util.Collection; @@ -43,7 +44,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.Spacecraft; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -477,7 +477,7 @@ public final class CubeSatWithKaAntenna extends BaseGeneratedEMFQuerySpecificati @Override public CubeSatWithKaAntenna.Match newMatch(final Object... parameters) { - return CubeSatWithKaAntenna.Match.newMatch((satellite.Spacecraft) parameters[0]); + return CubeSatWithKaAntenna.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft) parameters[0]); } /** @@ -509,7 +509,7 @@ public final class CubeSatWithKaAntenna extends BaseGeneratedEMFQuerySpecificati private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final CubeSatWithKaAntenna.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); + 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); private final List parameters = Arrays.asList(parameter_Spacecraft); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetBand.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetBand.java index f2713f45..4cacc34b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetBand.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetBand.java @@ -3,6 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBand; import java.util.Arrays; import java.util.Collection; @@ -42,7 +43,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.DirectedCommunicationLink; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -480,7 +480,7 @@ public final class IncompatibleSourceAndTargetBand extends BaseGeneratedEMFQuery @Override public IncompatibleSourceAndTargetBand.Match newMatch(final Object... parameters) { - return IncompatibleSourceAndTargetBand.Match.newMatch((satellite.DirectedCommunicationLink) parameters[0]); + return IncompatibleSourceAndTargetBand.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink) parameters[0]); } /** @@ -512,7 +512,7 @@ public final class IncompatibleSourceAndTargetBand extends BaseGeneratedEMFQuery private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final IncompatibleSourceAndTargetBand.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Link = new PParameter("Link", "satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); + private final PParameter parameter_Link = new PParameter("Link", "hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Link); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetGain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetGain.java index 33a4b067..3f247613 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetGain.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/IncompatibleSourceAndTargetGain.java @@ -3,6 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGain; import java.util.Arrays; import java.util.Collection; @@ -42,7 +43,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.DirectedCommunicationLink; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -476,7 +476,7 @@ public final class IncompatibleSourceAndTargetGain extends BaseGeneratedEMFQuery @Override public IncompatibleSourceAndTargetGain.Match newMatch(final Object... parameters) { - return IncompatibleSourceAndTargetGain.Match.newMatch((satellite.DirectedCommunicationLink) parameters[0]); + return IncompatibleSourceAndTargetGain.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink) parameters[0]); } /** @@ -508,7 +508,7 @@ public final class IncompatibleSourceAndTargetGain extends BaseGeneratedEMFQuery private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final IncompatibleSourceAndTargetGain.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Link = new PParameter("Link", "satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); + private final PParameter parameter_Link = new PParameter("Link", "hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "DirectedCommunicationLink")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Link); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/KaAntennaGainLow.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/KaAntennaGainLow.java index 37c35bfe..18f6c32f 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/KaAntennaGainLow.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/KaAntennaGainLow.java @@ -3,6 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem; import java.util.Arrays; import java.util.Collection; import java.util.LinkedHashSet; @@ -41,7 +42,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.CommSubsystem; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -475,7 +475,7 @@ public final class KaAntennaGainLow extends BaseGeneratedEMFQuerySpecification parameters = Arrays.asList(parameter_Comm); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/MultipleCommunicationLinks.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/MultipleCommunicationLinks.java deleted file mode 100644 index ad82ead9..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/MultipleCommunicationLinks.java +++ /dev/null @@ -1,576 +0,0 @@ -/** - * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql - */ -package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; - -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; -import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.CommunicatingElement; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

Original source: - *

- *         {@literal @}Constraint(severity = "error", key = {Element},
- *         	message = "Only one communication link is allowed per element.")
- *         pattern multipleCommunicationLinks(Element : CommunicatingElement) {
- *         	CommunicatingElement.commSubsystem.communicationLink(Element, Link1);
- *         	CommunicatingElement.commSubsystem.communicationLink(Element, Link2);
- *         	Link1 != Link2;
- *         }
- * 
- * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class MultipleCommunicationLinks extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.multipleCommunicationLinks pattern, - * to be used in conjunction with {@link Matcher}. - * - *

Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. - * Each instance is a (possibly partial) substitution of pattern parameters, - * usable to represent a match of the pattern in the result of a query, - * or to specify the bound (fixed) input parameters when issuing a query. - * - * @see Matcher - * - */ - public static abstract class Match extends BasePatternMatch { - private CommunicatingElement fElement; - - private static List parameterNames = makeImmutableList("Element"); - - private Match(final CommunicatingElement pElement) { - this.fElement = pElement; - } - - @Override - public Object get(final String parameterName) { - if ("Element".equals(parameterName)) return this.fElement; - return null; - } - - public CommunicatingElement getElement() { - return this.fElement; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("Element".equals(parameterName) ) { - this.fElement = (CommunicatingElement) newValue; - return true; - } - return false; - } - - public void setElement(final CommunicatingElement pElement) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fElement = pElement; - } - - @Override - public String patternName() { - return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.multipleCommunicationLinks"; - } - - @Override - public List parameterNames() { - return MultipleCommunicationLinks.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fElement}; - } - - @Override - public MultipleCommunicationLinks.Match toImmutable() { - return isMutable() ? newMatch(fElement) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"Element\"=" + prettyPrintValue(fElement)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fElement); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof MultipleCommunicationLinks.Match)) { - MultipleCommunicationLinks.Match other = (MultipleCommunicationLinks.Match) obj; - return Objects.equals(fElement, other.fElement); - } else { - // this should be infrequent - if (!(obj instanceof IPatternMatch)) { - return false; - } - IPatternMatch otherSig = (IPatternMatch) obj; - return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); - } - } - - @Override - public MultipleCommunicationLinks specification() { - return MultipleCommunicationLinks.instance(); - } - - /** - * Returns an empty, mutable match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @return the empty match. - * - */ - public static MultipleCommunicationLinks.Match newEmptyMatch() { - return new Mutable(null); - } - - /** - * Returns a mutable (partial) match. - * Fields of the mutable match can be filled to create a partial match, usable as matcher input. - * - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static MultipleCommunicationLinks.Match newMutableMatch(final CommunicatingElement pElement) { - return new Mutable(pElement); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @return the (partial) match object. - * - */ - public static MultipleCommunicationLinks.Match newMatch(final CommunicatingElement pElement) { - return new Immutable(pElement); - } - - private static final class Mutable extends MultipleCommunicationLinks.Match { - Mutable(final CommunicatingElement pElement) { - super(pElement); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends MultipleCommunicationLinks.Match { - Immutable(final CommunicatingElement pElement) { - super(pElement); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.multipleCommunicationLinks pattern, - * providing pattern-specific query methods. - * - *

Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)}, - * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}. - * - *

Matches of the pattern will be represented as {@link Match}. - * - *

Original source: - *

-   * {@literal @}Constraint(severity = "error", key = {Element},
-   * 	message = "Only one communication link is allowed per element.")
-   * pattern multipleCommunicationLinks(Element : CommunicatingElement) {
-   * 	CommunicatingElement.commSubsystem.communicationLink(Element, Link1);
-   * 	CommunicatingElement.commSubsystem.communicationLink(Element, Link2);
-   * 	Link1 != Link2;
-   * }
-   * 
- * - * @see Match - * @see MultipleCommunicationLinks - * - */ - public static class Matcher extends BaseMatcher { - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - public static MultipleCommunicationLinks.Matcher on(final ViatraQueryEngine engine) { - // check if matcher already exists - Matcher matcher = engine.getExistingMatcher(querySpecification()); - if (matcher == null) { - matcher = (Matcher)engine.getMatcher(querySpecification()); - } - return matcher; - } - - /** - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * @return an initialized matcher - * @noreference This method is for internal matcher initialization by the framework, do not call it manually. - * - */ - public static MultipleCommunicationLinks.Matcher create() { - return new Matcher(); - } - - private static final int POSITION_ELEMENT = 0; - - private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(MultipleCommunicationLinks.Matcher.class); - - /** - * Initializes the pattern matcher within an existing VIATRA Query engine. - * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. - * - * @param engine the existing VIATRA Query engine in which this matcher will be created. - * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation - * - */ - private Matcher() { - super(querySpecification()); - } - - /** - * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final CommunicatingElement pElement) { - return rawStreamAllMatches(new Object[]{pElement}).collect(Collectors.toSet()); - } - - /** - * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. - *

- * NOTE: It is important not to modify the source model while the stream is being processed. - * If the match set of the pattern changes during processing, the contents of the stream is undefined. - * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final CommunicatingElement pElement) { - return rawStreamAllMatches(new Object[]{pElement}); - } - - /** - * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final CommunicatingElement pElement) { - return rawGetOneArbitraryMatch(new Object[]{pElement}); - } - - /** - * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match, - * under any possible substitution of the unspecified parameters (if any). - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final CommunicatingElement pElement) { - return rawHasMatch(new Object[]{pElement}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final CommunicatingElement pElement) { - return rawCountMatches(new Object[]{pElement}); - } - - /** - * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters. - * Neither determinism nor randomness of selection is guaranteed. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @param processor the action that will process the selected match. - * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked - * - */ - public boolean forOneArbitraryMatch(final CommunicatingElement pElement, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pElement}, processor); - } - - /** - * Returns a new (partial) match. - * This can be used e.g. to call the matcher with a partial match. - *

The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. - * @param pElement the fixed value of pattern parameter Element, or null if not bound. - * @return the (partial) match object. - * - */ - public MultipleCommunicationLinks.Match newMatch(final CommunicatingElement pElement) { - return MultipleCommunicationLinks.Match.newMatch(pElement); - } - - /** - * Retrieve the set of values that occur in matches for Element. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfElement(final Object[] parameters) { - return rawStreamAllValues(POSITION_ELEMENT, parameters).map(CommunicatingElement.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Element. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfElement() { - return rawStreamAllValuesOfElement(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Element. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfElement() { - return rawStreamAllValuesOfElement(emptyArray()); - } - - @Override - protected MultipleCommunicationLinks.Match tupleToMatch(final Tuple t) { - try { - return MultipleCommunicationLinks.Match.newMatch((CommunicatingElement) t.get(POSITION_ELEMENT)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected MultipleCommunicationLinks.Match arrayToMatch(final Object[] match) { - try { - return MultipleCommunicationLinks.Match.newMatch((CommunicatingElement) match[POSITION_ELEMENT]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected MultipleCommunicationLinks.Match arrayToMatchMutable(final Object[] match) { - try { - return MultipleCommunicationLinks.Match.newMutableMatch((CommunicatingElement) match[POSITION_ELEMENT]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - /** - * @return the singleton instance of the query specification of this pattern - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static IQuerySpecification querySpecification() { - return MultipleCommunicationLinks.instance(); - } - } - - private MultipleCommunicationLinks() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static MultipleCommunicationLinks instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected MultipleCommunicationLinks.Matcher instantiate(final ViatraQueryEngine engine) { - return MultipleCommunicationLinks.Matcher.on(engine); - } - - @Override - public MultipleCommunicationLinks.Matcher instantiate() { - return MultipleCommunicationLinks.Matcher.create(); - } - - @Override - public MultipleCommunicationLinks.Match newEmptyMatch() { - return MultipleCommunicationLinks.Match.newEmptyMatch(); - } - - @Override - public MultipleCommunicationLinks.Match newMatch(final Object... parameters) { - return MultipleCommunicationLinks.Match.newMatch((satellite.CommunicatingElement) parameters[0]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks (visibility: PUBLIC, simpleName: MultipleCommunicationLinks, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks (visibility: PUBLIC, simpleName: MultipleCommunicationLinks, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private static final MultipleCommunicationLinks INSTANCE = new MultipleCommunicationLinks(); - - /** - * Statically initializes the query specification after the field {@link #INSTANCE} is assigned. - * This initialization order is required to support indirect recursion. - * - *

The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private static final Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private static final MultipleCommunicationLinks.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_Element = new PParameter("Element", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_Element); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.multipleCommunicationLinks"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("Element"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_Element = body.getOrCreateVariableByName("Element"); - PVariable var_Link1 = body.getOrCreateVariableByName("Link1"); - PVariable var_Link2 = body.getOrCreateVariableByName("Link2"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Element, parameter_Element) - )); - // CommunicatingElement.commSubsystem.communicationLink(Element, Link1) - new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Element, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); - PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "communicationLink"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); - new Equality(body, var__virtual_1_, var_Link1); - // CommunicatingElement.commSubsystem.communicationLink(Element, Link2) - new TypeConstraint(body, Tuples.flatTupleOf(var_Element), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); - PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Element, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); - PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}"); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_, var__virtual_3_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "communicationLink"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_3_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); - new Equality(body, var__virtual_3_, var_Link2); - // Link1 != Link2 - new Inequality(body, var_Link1, var_Link2); - bodies.add(body); - } - { - PAnnotation annotation = new PAnnotation("Constraint"); - annotation.addAttribute("severity", "error"); - annotation.addAttribute("key", Arrays.asList(new Object[] { - new ParameterReference("Element") - })); - annotation.addAttribute("message", "Only one communication link is allowed per element."); - addAnnotation(annotation); - } - return bodies; - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoLinkToGroundStation.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoLinkToGroundStation.java index 45952f33..598f3a6b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoLinkToGroundStation.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoLinkToGroundStation.java @@ -3,6 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink; import java.util.Arrays; import java.util.Collection; @@ -40,7 +41,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.Spacecraft; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -476,7 +476,7 @@ public final class NoLinkToGroundStation extends BaseGeneratedEMFQuerySpecificat @Override public NoLinkToGroundStation.Match newMatch(final Object... parameters) { - return NoLinkToGroundStation.Match.newMatch((satellite.Spacecraft) parameters[0]); + return NoLinkToGroundStation.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft) parameters[0]); } /** @@ -508,7 +508,7 @@ public final class NoLinkToGroundStation extends BaseGeneratedEMFQuerySpecificat private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final NoLinkToGroundStation.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); + 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); private final List parameters = Arrays.asList(parameter_Spacecraft); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoPotentialLinkToGroundStation.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoPotentialLinkToGroundStation.java index 3366de46..1e8f8502 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoPotentialLinkToGroundStation.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NoPotentialLinkToGroundStation.java @@ -3,6 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectLinkAllowed; import java.util.Arrays; import java.util.Collection; @@ -40,7 +41,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.Spacecraft; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -472,7 +472,7 @@ public final class NoPotentialLinkToGroundStation extends BaseGeneratedEMFQueryS @Override public NoPotentialLinkToGroundStation.Match newMatch(final Object... parameters) { - return NoPotentialLinkToGroundStation.Match.newMatch((satellite.Spacecraft) parameters[0]); + return NoPotentialLinkToGroundStation.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft) parameters[0]); } /** @@ -504,7 +504,7 @@ public final class NoPotentialLinkToGroundStation extends BaseGeneratedEMFQueryS private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final NoPotentialLinkToGroundStation.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); + 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); private final List parameters = Arrays.asList(parameter_Spacecraft); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NotEnoughInterferometryPayloads.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NotEnoughInterferometryPayloads.java index bdd97100..d75dea5f 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NotEnoughInterferometryPayloads.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/NotEnoughInterferometryPayloads.java @@ -3,6 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.InterferometryMission; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AtLeastTwoInterferometryPayloads; import java.util.Arrays; import java.util.Collection; @@ -38,7 +39,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.InterferometryMission; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -472,7 +472,7 @@ public final class NotEnoughInterferometryPayloads extends BaseGeneratedEMFQuery @Override public NotEnoughInterferometryPayloads.Match newMatch(final Object... parameters) { - return NotEnoughInterferometryPayloads.Match.newMatch((satellite.InterferometryMission) parameters[0]); + return NotEnoughInterferometryPayloads.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.InterferometryMission) parameters[0]); } /** @@ -504,7 +504,7 @@ public final class NotEnoughInterferometryPayloads extends BaseGeneratedEMFQuery private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final NotEnoughInterferometryPayloads.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Mission = new PParameter("Mission", "satellite.InterferometryMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "InterferometryMission")), PParameterDirection.INOUT); + private final PParameter parameter_Mission = new PParameter("Mission", "hu.bme.mit.inf.dslreasoner.domains.satellite.InterferometryMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "InterferometryMission")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Mission); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java index d7378783..c86761ce 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java @@ -3,13 +3,12 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement; +import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetGain; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.KaAntennaGainLow; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoPotentialLinkToGroundStation; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; @@ -29,8 +28,7 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; * in order to achieve better performance than one-by-one on-demand matcher initialization. * *

From package hu.bme.mit.inf.dslreasoner.domains.satellite.queries, the group contains the definition of the following patterns:

    - *
  • multipleCommunicationLinks
  • - *
  • communicationLinkOfElement
  • + *
  • communicationLinkDoesNotStartAtContainingElement
  • *
  • notEnoughInterferometryPayloads
  • *
  • noLinkToGroundStation
  • *
  • noPotentialLinkToGroundStation
  • @@ -68,8 +66,7 @@ public final class SatelliteQueries extends BaseGeneratedPatternGroup { private static SatelliteQueries INSTANCE; private SatelliteQueries() { - querySpecifications.add(MultipleCommunicationLinks.instance()); - querySpecifications.add(CommunicationLinkOfElement.instance()); + querySpecifications.add(CommunicationLinkDoesNotStartAtContainingElement.instance()); querySpecifications.add(NotEnoughInterferometryPayloads.instance()); querySpecifications.add(NoLinkToGroundStation.instance()); querySpecifications.add(NoPotentialLinkToGroundStation.instance()); @@ -85,20 +82,12 @@ public final class SatelliteQueries extends BaseGeneratedPatternGroup { querySpecifications.add(SpacecraftOfKind.instance()); } - public MultipleCommunicationLinks getMultipleCommunicationLinks() { - return MultipleCommunicationLinks.instance(); + public CommunicationLinkDoesNotStartAtContainingElement getCommunicationLinkDoesNotStartAtContainingElement() { + return CommunicationLinkDoesNotStartAtContainingElement.instance(); } - public MultipleCommunicationLinks.Matcher getMultipleCommunicationLinks(final ViatraQueryEngine engine) { - return MultipleCommunicationLinks.Matcher.on(engine); - } - - public CommunicationLinkOfElement getCommunicationLinkOfElement() { - return CommunicationLinkOfElement.instance(); - } - - public CommunicationLinkOfElement.Matcher getCommunicationLinkOfElement(final ViatraQueryEngine engine) { - return CommunicationLinkOfElement.Matcher.on(engine); + public CommunicationLinkDoesNotStartAtContainingElement.Matcher getCommunicationLinkDoesNotStartAtContainingElement(final ViatraQueryEngine engine) { + return CommunicationLinkDoesNotStartAtContainingElement.Matcher.on(engine); } public NotEnoughInterferometryPayloads getNotEnoughInterferometryPayloads() { diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SmallSat.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SmallSat.java index 4791740e..7bc497ab 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SmallSat.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SmallSat.java @@ -64,11 +64,11 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification parameterNames = makeImmutableList("Sat"); - private Match(final satellite.SmallSat pSat) { + private Match(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { this.fSat = pSat; } @@ -78,7 +78,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification getAllMatches(final satellite.SmallSat pSat) { + public Collection getAllMatches(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { return rawStreamAllMatches(new Object[]{pSat}).collect(Collectors.toSet()); } @@ -296,7 +296,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification streamAllMatches(final satellite.SmallSat pSat) { + public Stream streamAllMatches(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { return rawStreamAllMatches(new Object[]{pSat}); } @@ -307,7 +307,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification getOneArbitraryMatch(final satellite.SmallSat pSat) { + public Optional getOneArbitraryMatch(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat) { return rawGetOneArbitraryMatch(new Object[]{pSat}); } @@ -318,7 +318,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification processor) { + public boolean forOneArbitraryMatch(final hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat pSat, final Consumer processor) { return rawForOneArbitraryMatch(new Object[]{pSat}, processor); } @@ -352,7 +352,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification rawStreamAllValuesOfSat(final Object[] parameters) { - return rawStreamAllValues(POSITION_SAT, parameters).map(satellite.SmallSat.class::cast); + protected Stream rawStreamAllValuesOfSat(final Object[] parameters) { + return rawStreamAllValues(POSITION_SAT, parameters).map(hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat.class::cast); } /** @@ -370,7 +370,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification getAllValuesOfSat() { + public Set getAllValuesOfSat() { return rawStreamAllValuesOfSat(emptyArray()).collect(Collectors.toSet()); } @@ -379,14 +379,14 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification streamAllValuesOfSat() { + public Stream streamAllValuesOfSat() { return rawStreamAllValuesOfSat(emptyArray()); } @Override protected SmallSat.Match tupleToMatch(final Tuple t) { try { - return SmallSat.Match.newMatch((satellite.SmallSat) t.get(POSITION_SAT)); + return SmallSat.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat) t.get(POSITION_SAT)); } catch(ClassCastException e) { LOGGER.error("Element(s) in tuple not properly typed!",e); return null; @@ -396,7 +396,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecification parameters = Arrays.asList(parameter_Sat); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SpacecraftOfKind.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SpacecraftOfKind.java index ed0bd7dc..52602bb5 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SpacecraftOfKind.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SpacecraftOfKind.java @@ -3,6 +3,8 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; +import hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind; import java.util.Arrays; import java.util.Collection; import java.util.LinkedHashSet; @@ -39,8 +41,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.Spacecraft; -import satellite.SpacecraftKind; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -628,7 +628,7 @@ public final class SpacecraftOfKind extends BaseGeneratedEMFQuerySpecification parameters = Arrays.asList(parameter_Spacecraft, parameter_Kind); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/ThreeUCubeSatWithNonUhfCrossLink.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/ThreeUCubeSatWithNonUhfCrossLink.java index 51b224b1..6408033b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/ThreeUCubeSatWithNonUhfCrossLink.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/ThreeUCubeSatWithNonUhfCrossLink.java @@ -3,6 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBandUhf; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.GroundStationNetwork; import java.util.Arrays; @@ -41,7 +42,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.CubeSat3U; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -485,7 +485,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer @Override public ThreeUCubeSatWithNonUhfCrossLink.Match newMatch(final Object... parameters) { - return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch((satellite.CubeSat3U) parameters[0]); + return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U) parameters[0]); } /** @@ -517,7 +517,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final ThreeUCubeSatWithNonUhfCrossLink.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Sat = new PParameter("Sat", "satellite.CubeSat3U", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CubeSat3U")), PParameterDirection.INOUT); + private final PParameter parameter_Sat = new PParameter("Sat", "hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CubeSat3U")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Sat); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/UhfAntennaGainNotLow.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/UhfAntennaGainNotLow.java index 99e472ea..62222ded 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/UhfAntennaGainNotLow.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/UhfAntennaGainNotLow.java @@ -3,6 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGainLow; import java.util.Arrays; import java.util.Collection; @@ -43,7 +44,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.CommSubsystem; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -483,7 +483,7 @@ public final class UhfAntennaGainNotLow extends BaseGeneratedEMFQuerySpecificati @Override public UhfAntennaGainNotLow.Match newMatch(final Object... parameters) { - return UhfAntennaGainNotLow.Match.newMatch((satellite.CommSubsystem) parameters[0]); + return UhfAntennaGainNotLow.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem) parameters[0]); } /** @@ -515,7 +515,7 @@ public final class UhfAntennaGainNotLow extends BaseGeneratedEMFQuerySpecificati private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final UhfAntennaGainNotLow.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); + private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Comm); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java index b50962c5..dbe6d26e 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/XAntennaGainNotMedium.java @@ -3,6 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; +import hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGainMedium; import java.util.Arrays; import java.util.Collection; @@ -43,7 +44,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; -import satellite.CommSubsystem; /** * A pattern-specific query specification that can instantiate Matcher in a type-safe way. @@ -477,7 +477,7 @@ public final class XAntennaGainNotMedium extends BaseGeneratedEMFQuerySpecificat @Override public XAntennaGainNotMedium.Match newMatch(final Object... parameters) { - return XAntennaGainNotMedium.Match.newMatch((satellite.CommSubsystem) parameters[0]); + return XAntennaGainNotMedium.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem) parameters[0]); } /** @@ -509,7 +509,7 @@ public final class XAntennaGainNotMedium extends BaseGeneratedEMFQuerySpecificat private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final XAntennaGainNotMedium.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); + private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Comm); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AtLeastTwoInterferometryPayloads.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AtLeastTwoInterferometryPayloads.java index 58e7e183..d560ac93 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AtLeastTwoInterferometryPayloads.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AtLeastTwoInterferometryPayloads.java @@ -88,7 +88,7 @@ public final class AtLeastTwoInterferometryPayloads extends BaseGeneratedEMFQuer private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final AtLeastTwoInterferometryPayloads.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Mission = new PParameter("Mission", "satellite.InterferometryMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "InterferometryMission")), PParameterDirection.INOUT); + private final PParameter parameter_Mission = new PParameter("Mission", "hu.bme.mit.inf.dslreasoner.domains.satellite.InterferometryMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "InterferometryMission")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Mission); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBand.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBand.java index 609e0b93..a0009587 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBand.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBand.java @@ -87,9 +87,9 @@ public final class CommSubsystemBand extends BaseGeneratedEMFQuerySpecificationW private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final CommSubsystemBand.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); + private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); - private final PParameter parameter_Band = new PParameter("Band", "satellite.TransceiverBand", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "TransceiverBand")), PParameterDirection.INOUT); + private final PParameter parameter_Band = new PParameter("Band", "hu.bme.mit.inf.dslreasoner.domains.satellite.TransceiverBand", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "TransceiverBand")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Comm, parameter_Band); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBandUhf.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBandUhf.java index bc25ea59..51175ce3 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBandUhf.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemBandUhf.java @@ -88,7 +88,7 @@ public final class CommSubsystemBandUhf extends BaseGeneratedEMFQuerySpecificati private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final CommSubsystemBandUhf.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); + private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Comm); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGain.java index 69793a96..e2e0e2a1 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGain.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGain.java @@ -87,9 +87,9 @@ public final class CommSubsystemGain extends BaseGeneratedEMFQuerySpecificationW private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final CommSubsystemGain.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); + private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); - private final PParameter parameter_Gain = new PParameter("Gain", "satellite.AntennaGain", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "AntennaGain")), PParameterDirection.INOUT); + private final PParameter parameter_Gain = new PParameter("Gain", "hu.bme.mit.inf.dslreasoner.domains.satellite.AntennaGain", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "AntennaGain")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Comm, parameter_Gain); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainLow.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainLow.java index fd24f163..04ee67da 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainLow.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainLow.java @@ -88,7 +88,7 @@ public final class CommSubsystemGainLow extends BaseGeneratedEMFQuerySpecificati private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final CommSubsystemGainLow.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); + private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Comm); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainMedium.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainMedium.java index 82b77bbc..4b3bc03b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainMedium.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CommSubsystemGainMedium.java @@ -88,7 +88,7 @@ public final class CommSubsystemGainMedium extends BaseGeneratedEMFQuerySpecific private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final CommSubsystemGainMedium.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Comm = new PParameter("Comm", "satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); + private final PParameter parameter_Comm = new PParameter("Comm", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommSubsystem")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Comm); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CubeSat3U.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CubeSat3U.java index acc60475..fe789893 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CubeSat3U.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/CubeSat3U.java @@ -83,7 +83,7 @@ public final class CubeSat3U extends BaseGeneratedEMFQuerySpecificationWithGener private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final CubeSat3U.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Sat = new PParameter("Sat", "satellite.CubeSat3U", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CubeSat3U")), PParameterDirection.INOUT); + private final PParameter parameter_Sat = new PParameter("Sat", "hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CubeSat3U")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Sat); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/DirectCommunicationLink.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/DirectCommunicationLink.java index a2123354..d6f5c53b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/DirectCommunicationLink.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/DirectCommunicationLink.java @@ -88,9 +88,9 @@ public final class DirectCommunicationLink extends BaseGeneratedEMFQuerySpecific private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final DirectCommunicationLink.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Source = new PParameter("Source", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); + private final PParameter parameter_Source = new PParameter("Source", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); - private final PParameter parameter_Target = new PParameter("Target", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); + private final PParameter parameter_Target = new PParameter("Target", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Source, parameter_Target); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/GroundStationNetwork.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/GroundStationNetwork.java index 606cdfed..93b1a01b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/GroundStationNetwork.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/GroundStationNetwork.java @@ -83,7 +83,7 @@ public final class GroundStationNetwork extends BaseGeneratedEMFQuerySpecificati private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final GroundStationNetwork.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Network = new PParameter("Network", "satellite.GroundStationNetwork", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "GroundStationNetwork")), PParameterDirection.INOUT); + private final PParameter parameter_Network = new PParameter("Network", "hu.bme.mit.inf.dslreasoner.domains.satellite.GroundStationNetwork", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "GroundStationNetwork")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Network); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectCommunicationLink.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectCommunicationLink.java index dee8a83c..6d5e475c 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectCommunicationLink.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectCommunicationLink.java @@ -85,9 +85,9 @@ public final class IndirectCommunicationLink extends BaseGeneratedEMFQuerySpecif private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final IndirectCommunicationLink.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Source = new PParameter("Source", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); + private final PParameter parameter_Source = new PParameter("Source", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); - private final PParameter parameter_Target = new PParameter("Target", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); + private final PParameter parameter_Target = new PParameter("Target", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_Source, parameter_Target); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectLinkAllowed.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectLinkAllowed.java index 31381a09..27648bf3 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectLinkAllowed.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IndirectLinkAllowed.java @@ -85,9 +85,9 @@ public final class IndirectLinkAllowed extends BaseGeneratedEMFQuerySpecificatio private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final IndirectLinkAllowed.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_From = new PParameter("From", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); + private final PParameter parameter_From = new PParameter("From", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); - private final PParameter parameter_To = new PParameter("To", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); + private final PParameter parameter_To = new PParameter("To", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_From, parameter_To); 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 index 7118d657..e7529aa2 100644 --- 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 @@ -96,9 +96,9 @@ public final class LinkAllowed extends BaseGeneratedEMFQuerySpecificationWithGen private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final LinkAllowed.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_From = new PParameter("From", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); + private final PParameter parameter_From = new PParameter("From", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); - private final PParameter parameter_To = new PParameter("To", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); + private final PParameter parameter_To = new PParameter("To", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_From, parameter_To); 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..b4f0d9e9 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 @@ -90,11 +90,11 @@ public final class MatchingAntenna extends BaseGeneratedEMFQuerySpecificationWit private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final MatchingAntenna.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_From = new PParameter("From", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); + private final PParameter parameter_From = new PParameter("From", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); - private final PParameter parameter_To = new PParameter("To", "satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); + private final PParameter parameter_To = new PParameter("To", "hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "CommunicatingElement")), PParameterDirection.INOUT); - private final PParameter parameter_Band = new PParameter("Band", "satellite.TransceiverBand", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "TransceiverBand")), PParameterDirection.INOUT); + private final PParameter parameter_Band = new PParameter("Band", "hu.bme.mit.inf.dslreasoner.domains.satellite.TransceiverBand", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "TransceiverBand")), PParameterDirection.INOUT); private final List parameters = Arrays.asList(parameter_From, parameter_To, parameter_Band); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java index 591215cd..36fa4557 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java @@ -3,13 +3,12 @@ */ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkOfElement; +import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetGain; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.KaAntennaGainLow; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.MultipleCommunicationLinks; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoPotentialLinkToGroundStation; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; @@ -40,8 +39,7 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; *

    A private group that includes private patterns as well. Only intended use case is for pattern testing. * *

    From package hu.bme.mit.inf.dslreasoner.domains.satellite.queries, the group contains the definition of the following patterns:

      - *
    • multipleCommunicationLinks
    • - *
    • communicationLinkOfElement
    • + *
    • communicationLinkDoesNotStartAtContainingElement
    • *
    • notEnoughInterferometryPayloads
    • *
    • atLeastTwoInterferometryPayloads
    • *
    • spacecraftWithInterferometryPayload
    • @@ -93,8 +91,7 @@ public final class SatelliteQueriesAll extends BaseGeneratedPatternGroup { private static SatelliteQueriesAll INSTANCE; private SatelliteQueriesAll() { - querySpecifications.add(MultipleCommunicationLinks.instance()); - querySpecifications.add(CommunicationLinkOfElement.instance()); + querySpecifications.add(CommunicationLinkDoesNotStartAtContainingElement.instance()); querySpecifications.add(NotEnoughInterferometryPayloads.instance()); querySpecifications.add(AtLeastTwoInterferometryPayloads.instance()); querySpecifications.add(SpacecraftWithInterferometryPayload.instance()); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithInterferometryPayload.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithInterferometryPayload.java index 9566c4c5..f8e6ca4f 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithInterferometryPayload.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithInterferometryPayload.java @@ -87,9 +87,9 @@ public final class SpacecraftWithInterferometryPayload extends BaseGeneratedEMFQ private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { private static final SpacecraftWithInterferometryPayload.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - private final PParameter parameter_Mission = new PParameter("Mission", "satellite.ConstellationMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "ConstellationMission")), PParameterDirection.INOUT); + private final PParameter parameter_Mission = new PParameter("Mission", "hu.bme.mit.inf.dslreasoner.domains.satellite.ConstellationMission", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "ConstellationMission")), PParameterDirection.INOUT); - private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); + 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); private final List parameters = Arrays.asList(parameter_Mission, parameter_Spacecraft); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql index edffd941..40553e29 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql @@ -2,17 +2,13 @@ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries import "http://www.example.org/satellite" -@Constraint(severity = "error", key = {Element}, - message = "Only one communication link is allowed per element.") -pattern multipleCommunicationLinks(Element : CommunicatingElement) { - CommunicatingElement.commSubsystem.communicationLink(Element, Link1); - CommunicatingElement.commSubsystem.communicationLink(Element, Link2); - Link1 != Link2; -} - -@QueryBasedFeature(feature = "communicationLink") -pattern communicationLinkOfElement(Element : CommunicatingElement, Link : DirectedCommunicationLink) { - CommunicatingElement.commSubsystem.communicationLink(Element, Link); +@Constraint(severity = "error", key = {Link}, + message = "Communication links must start from the containing element.") +pattern communicationLinkDoesNotStartAtContainingElement(Link : DirectedCommunicationLink) { + CommunicatingElement.communicationLink(Element, Link); + DirectedCommunicationLink.source(Link, SourceComm); + CommunicatingElement.commSubsystem(SourceElement, SourceComm); + Element != SourceElement; } // At least two spacecraft must have the interferometry payload configured -- cgit v1.2.3-70-g09d2