aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kristóf Marussy <kris7topher@gmail.com>2019-05-04 17:56:18 -0400
committerLibravatar Kristóf Marussy <kris7topher@gmail.com>2019-05-04 17:56:18 -0400
commitb9aaa826e1e7504958b6e75f35e9dcd09086a13e (patch)
treedf7b83804e74efb86fb845862c5523d04d7edeb1
parentMerge remote-tracking branch 'origin/master' into kris (diff)
downloadVIATRA-Generator-b9aaa826e1e7504958b6e75f35e9dcd09086a13e.tar.gz
VIATRA-Generator-b9aaa826e1e7504958b6e75f35e9dcd09086a13e.tar.zst
VIATRA-Generator-b9aaa826e1e7504958b6e75f35e9dcd09086a13e.zip
Metrics for satellite case study
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF6
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SatelliteFactory.java27
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SatellitePackage.java265
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/Spacecraft.java30
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SpacecraftKind.java241
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/CubeSat3UImpl.java37
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/CubeSat6UImpl.java37
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SatelliteFactoryImpl.java65
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SatellitePackageImpl.java93
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SmallSatImpl.java37
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java71
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/util/SatelliteAdapterFactory.java57
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/util/SatelliteSwitch.java78
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.aird251
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore9
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel9
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml3
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/metrics/.gitignore2
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/metrics/internal/.gitignore2
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/.gitignore6
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CostMetric.java544
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CoverageMetric.java552
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java33
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/ThreeUCubeSatWithNonUhfCrossLink.java103
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/TimeMetric.java544
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore18
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AdditionalCommSubsystemCost.java173
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/BasePrice.java216
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IncomingData.java145
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/InterferometryPayloadCost.java175
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionCost.java183
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionCoverage.java183
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionTime.java183
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java51
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/ScienceData.java179
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SmallSat.java23
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftCost.java215
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKind.java140
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftUplink.java171
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithTwoCommSubsystems.java146
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/TransmitRate.java277
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/TransmitTime.java200
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql142
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/runner/.SatelliteGeneratorMain.xtendbinbin2931 -> 0 bytes
-rw-r--r--Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/runner/SatelliteGeneratorMain.java15
45 files changed, 5119 insertions, 818 deletions
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF
index 7b37655a..39b038d2 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF
@@ -3,10 +3,12 @@ Bundle-ManifestVersion: 2
3Bundle-Name: %pluginName 3Bundle-Name: %pluginName
4Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.domains.satellite;singleton:=true 4Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.domains.satellite;singleton:=true
5Bundle-Version: 0.1.0.qualifier 5Bundle-Version: 0.1.0.qualifier
6Bundle-ClassPath: .
6Bundle-Vendor: %providerName 7Bundle-Vendor: %providerName
7Bundle-Localization: plugin 8Bundle-Localization: plugin
8Export-Package: hu.bme.mit.inf.dslreasoner.domains.satellite, 9Export-Package: hu.bme.mit.inf.dslreasoner.domains.satellite,
9 hu.bme.mit.inf.dslreasoner.domains.satellite.impl, 10 hu.bme.mit.inf.dslreasoner.domains.satellite.impl,
11 hu.bme.mit.inf.dslreasoner.domains.satellite.metrics,
10 hu.bme.mit.inf.dslreasoner.domains.satellite.queries, 12 hu.bme.mit.inf.dslreasoner.domains.satellite.queries,
11 hu.bme.mit.inf.dslreasoner.domains.satellite.runner, 13 hu.bme.mit.inf.dslreasoner.domains.satellite.runner,
12 hu.bme.mit.inf.dslreasoner.domains.satellite.util 14 hu.bme.mit.inf.dslreasoner.domains.satellite.util
@@ -17,7 +19,7 @@ Require-Bundle: org.eclipse.viatra.query.runtime,
17 org.eclipse.emf.ecore;visibility:=reexport, 19 org.eclipse.emf.ecore;visibility:=reexport,
18 org.eclipse.core.runtime, 20 org.eclipse.core.runtime,
19 hu.bme.mit.inf.dslreasoner.application 21 hu.bme.mit.inf.dslreasoner.application
20Bundle-RequiredExecutionEnvironment: JavaSE-1.8
21Bundle-ActivationPolicy: lazy
22Import-Package: org.apache.log4j 22Import-Package: org.apache.log4j
23Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.domains.satellite 23Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.domains.satellite
24Bundle-ActivationPolicy: lazy
25Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SatelliteFactory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SatelliteFactory.java
index 3b77a668..958bbc08 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SatelliteFactory.java
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SatelliteFactory.java
@@ -40,33 +40,6 @@ public interface SatelliteFactory extends EFactory {
40 GroundStationNetwork createGroundStationNetwork(); 40 GroundStationNetwork createGroundStationNetwork();
41 41
42 /** 42 /**
43 * Returns a new object of class '<em>Cube Sat3 U</em>'.
44 * <!-- begin-user-doc -->
45 * <!-- end-user-doc -->
46 * @return a new object of class '<em>Cube Sat3 U</em>'.
47 * @generated
48 */
49 CubeSat3U createCubeSat3U();
50
51 /**
52 * Returns a new object of class '<em>Cube Sat6 U</em>'.
53 * <!-- begin-user-doc -->
54 * <!-- end-user-doc -->
55 * @return a new object of class '<em>Cube Sat6 U</em>'.
56 * @generated
57 */
58 CubeSat6U createCubeSat6U();
59
60 /**
61 * Returns a new object of class '<em>Small Sat</em>'.
62 * <!-- begin-user-doc -->
63 * <!-- end-user-doc -->
64 * @return a new object of class '<em>Small Sat</em>'.
65 * @generated
66 */
67 SmallSat createSmallSat();
68
69 /**
70 * Returns a new object of class '<em>Comm Subsystem</em>'. 43 * Returns a new object of class '<em>Comm Subsystem</em>'.
71 * <!-- begin-user-doc --> 44 * <!-- begin-user-doc -->
72 * <!-- end-user-doc --> 45 * <!-- end-user-doc -->
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SatellitePackage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SatellitePackage.java
index 7c590f4f..61da12a0 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SatellitePackage.java
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SatellitePackage.java
@@ -288,187 +288,31 @@ public interface SatellitePackage extends EPackage {
288 int SPACECRAFT__PAYLOAD = COMMUNICATING_ELEMENT_FEATURE_COUNT + 0; 288 int SPACECRAFT__PAYLOAD = COMMUNICATING_ELEMENT_FEATURE_COUNT + 0;
289 289
290 /** 290 /**
291 * The number of structural features of the '<em>Spacecraft</em>' class. 291 * The feature id for the '<em><b>Kind</b></em>' attribute.
292 * <!-- begin-user-doc -->
293 * <!-- end-user-doc -->
294 * @generated
295 * @ordered
296 */
297 int SPACECRAFT_FEATURE_COUNT = COMMUNICATING_ELEMENT_FEATURE_COUNT + 1;
298
299 /**
300 * The number of operations of the '<em>Spacecraft</em>' class.
301 * <!-- begin-user-doc -->
302 * <!-- end-user-doc -->
303 * @generated
304 * @ordered
305 */
306 int SPACECRAFT_OPERATION_COUNT = COMMUNICATING_ELEMENT_OPERATION_COUNT + 0;
307
308 /**
309 * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CubeSat3UImpl <em>Cube Sat3 U</em>}' class.
310 * <!-- begin-user-doc -->
311 * <!-- end-user-doc -->
312 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CubeSat3UImpl
313 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getCubeSat3U()
314 * @generated
315 */
316 int CUBE_SAT3_U = 5;
317
318 /**
319 * The feature id for the '<em><b>Comm Subsystem</b></em>' containment reference list.
320 * <!-- begin-user-doc -->
321 * <!-- end-user-doc -->
322 * @generated
323 * @ordered
324 */
325 int CUBE_SAT3_U__COMM_SUBSYSTEM = SPACECRAFT__COMM_SUBSYSTEM;
326
327 /**
328 * The feature id for the '<em><b>Communication Link</b></em>' containment reference.
329 * <!-- begin-user-doc -->
330 * <!-- end-user-doc -->
331 * @generated
332 * @ordered
333 */
334 int CUBE_SAT3_U__COMMUNICATION_LINK = SPACECRAFT__COMMUNICATION_LINK;
335
336 /**
337 * The feature id for the '<em><b>Payload</b></em>' containment reference.
338 * <!-- begin-user-doc -->
339 * <!-- end-user-doc -->
340 * @generated
341 * @ordered
342 */
343 int CUBE_SAT3_U__PAYLOAD = SPACECRAFT__PAYLOAD;
344
345 /**
346 * The number of structural features of the '<em>Cube Sat3 U</em>' class.
347 * <!-- begin-user-doc -->
348 * <!-- end-user-doc -->
349 * @generated
350 * @ordered
351 */
352 int CUBE_SAT3_U_FEATURE_COUNT = SPACECRAFT_FEATURE_COUNT + 0;
353
354 /**
355 * The number of operations of the '<em>Cube Sat3 U</em>' class.
356 * <!-- begin-user-doc -->
357 * <!-- end-user-doc -->
358 * @generated
359 * @ordered
360 */
361 int CUBE_SAT3_U_OPERATION_COUNT = SPACECRAFT_OPERATION_COUNT + 0;
362
363 /**
364 * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CubeSat6UImpl <em>Cube Sat6 U</em>}' class.
365 * <!-- begin-user-doc -->
366 * <!-- end-user-doc -->
367 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CubeSat6UImpl
368 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getCubeSat6U()
369 * @generated
370 */
371 int CUBE_SAT6_U = 6;
372
373 /**
374 * The feature id for the '<em><b>Comm Subsystem</b></em>' containment reference list.
375 * <!-- begin-user-doc -->
376 * <!-- end-user-doc -->
377 * @generated
378 * @ordered
379 */
380 int CUBE_SAT6_U__COMM_SUBSYSTEM = SPACECRAFT__COMM_SUBSYSTEM;
381
382 /**
383 * The feature id for the '<em><b>Communication Link</b></em>' containment reference.
384 * <!-- begin-user-doc -->
385 * <!-- end-user-doc -->
386 * @generated
387 * @ordered
388 */
389 int CUBE_SAT6_U__COMMUNICATION_LINK = SPACECRAFT__COMMUNICATION_LINK;
390
391 /**
392 * The feature id for the '<em><b>Payload</b></em>' containment reference.
393 * <!-- begin-user-doc -->
394 * <!-- end-user-doc -->
395 * @generated
396 * @ordered
397 */
398 int CUBE_SAT6_U__PAYLOAD = SPACECRAFT__PAYLOAD;
399
400 /**
401 * The number of structural features of the '<em>Cube Sat6 U</em>' class.
402 * <!-- begin-user-doc -->
403 * <!-- end-user-doc -->
404 * @generated
405 * @ordered
406 */
407 int CUBE_SAT6_U_FEATURE_COUNT = SPACECRAFT_FEATURE_COUNT + 0;
408
409 /**
410 * The number of operations of the '<em>Cube Sat6 U</em>' class.
411 * <!-- begin-user-doc -->
412 * <!-- end-user-doc -->
413 * @generated
414 * @ordered
415 */
416 int CUBE_SAT6_U_OPERATION_COUNT = SPACECRAFT_OPERATION_COUNT + 0;
417
418 /**
419 * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SmallSatImpl <em>Small Sat</em>}' class.
420 * <!-- begin-user-doc -->
421 * <!-- end-user-doc -->
422 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SmallSatImpl
423 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getSmallSat()
424 * @generated
425 */
426 int SMALL_SAT = 7;
427
428 /**
429 * The feature id for the '<em><b>Comm Subsystem</b></em>' containment reference list.
430 * <!-- begin-user-doc -->
431 * <!-- end-user-doc -->
432 * @generated
433 * @ordered
434 */
435 int SMALL_SAT__COMM_SUBSYSTEM = SPACECRAFT__COMM_SUBSYSTEM;
436
437 /**
438 * The feature id for the '<em><b>Communication Link</b></em>' containment reference.
439 * <!-- begin-user-doc --> 292 * <!-- begin-user-doc -->
440 * <!-- end-user-doc --> 293 * <!-- end-user-doc -->
441 * @generated 294 * @generated
442 * @ordered 295 * @ordered
443 */ 296 */
444 int SMALL_SAT__COMMUNICATION_LINK = SPACECRAFT__COMMUNICATION_LINK; 297 int SPACECRAFT__KIND = COMMUNICATING_ELEMENT_FEATURE_COUNT + 1;
445 298
446 /** 299 /**
447 * The feature id for the '<em><b>Payload</b></em>' containment reference. 300 * The number of structural features of the '<em>Spacecraft</em>' class.
448 * <!-- begin-user-doc -->
449 * <!-- end-user-doc -->
450 * @generated
451 * @ordered
452 */
453 int SMALL_SAT__PAYLOAD = SPACECRAFT__PAYLOAD;
454
455 /**
456 * The number of structural features of the '<em>Small Sat</em>' class.
457 * <!-- begin-user-doc --> 301 * <!-- begin-user-doc -->
458 * <!-- end-user-doc --> 302 * <!-- end-user-doc -->
459 * @generated 303 * @generated
460 * @ordered 304 * @ordered
461 */ 305 */
462 int SMALL_SAT_FEATURE_COUNT = SPACECRAFT_FEATURE_COUNT + 0; 306 int SPACECRAFT_FEATURE_COUNT = COMMUNICATING_ELEMENT_FEATURE_COUNT + 2;
463 307
464 /** 308 /**
465 * The number of operations of the '<em>Small Sat</em>' class. 309 * The number of operations of the '<em>Spacecraft</em>' class.
466 * <!-- begin-user-doc --> 310 * <!-- begin-user-doc -->
467 * <!-- end-user-doc --> 311 * <!-- end-user-doc -->
468 * @generated 312 * @generated
469 * @ordered 313 * @ordered
470 */ 314 */
471 int SMALL_SAT_OPERATION_COUNT = SPACECRAFT_OPERATION_COUNT + 0; 315 int SPACECRAFT_OPERATION_COUNT = COMMUNICATING_ELEMENT_OPERATION_COUNT + 0;
472 316
473 /** 317 /**
474 * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CommSubsystemImpl <em>Comm Subsystem</em>}' class. 318 * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CommSubsystemImpl <em>Comm Subsystem</em>}' class.
@@ -478,7 +322,7 @@ public interface SatellitePackage extends EPackage {
478 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getCommSubsystem() 322 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getCommSubsystem()
479 * @generated 323 * @generated
480 */ 324 */
481 int COMM_SUBSYSTEM = 8; 325 int COMM_SUBSYSTEM = 5;
482 326
483 /** 327 /**
484 * The feature id for the '<em><b>Band</b></em>' attribute. 328 * The feature id for the '<em><b>Band</b></em>' attribute.
@@ -524,7 +368,7 @@ public interface SatellitePackage extends EPackage {
524 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getDirectedCommunicationLink() 368 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getDirectedCommunicationLink()
525 * @generated 369 * @generated
526 */ 370 */
527 int DIRECTED_COMMUNICATION_LINK = 9; 371 int DIRECTED_COMMUNICATION_LINK = 6;
528 372
529 /** 373 /**
530 * The feature id for the '<em><b>Source</b></em>' reference. 374 * The feature id for the '<em><b>Source</b></em>' reference.
@@ -570,7 +414,7 @@ public interface SatellitePackage extends EPackage {
570 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getPayload() 414 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getPayload()
571 * @generated 415 * @generated
572 */ 416 */
573 int PAYLOAD = 10; 417 int PAYLOAD = 7;
574 418
575 /** 419 /**
576 * The number of structural features of the '<em>Payload</em>' class. 420 * The number of structural features of the '<em>Payload</em>' class.
@@ -598,7 +442,7 @@ public interface SatellitePackage extends EPackage {
598 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getInterferometryPayload() 442 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getInterferometryPayload()
599 * @generated 443 * @generated
600 */ 444 */
601 int INTERFEROMETRY_PAYLOAD = 11; 445 int INTERFEROMETRY_PAYLOAD = 8;
602 446
603 /** 447 /**
604 * The number of structural features of the '<em>Interferometry Payload</em>' class. 448 * The number of structural features of the '<em>Interferometry Payload</em>' class.
@@ -626,7 +470,7 @@ public interface SatellitePackage extends EPackage {
626 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getTransceiverBand() 470 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getTransceiverBand()
627 * @generated 471 * @generated
628 */ 472 */
629 int TRANSCEIVER_BAND = 12; 473 int TRANSCEIVER_BAND = 9;
630 474
631 /** 475 /**
632 * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.AntennaGain <em>Antenna Gain</em>}' enum. 476 * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.AntennaGain <em>Antenna Gain</em>}' enum.
@@ -636,7 +480,17 @@ public interface SatellitePackage extends EPackage {
636 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getAntennaGain() 480 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getAntennaGain()
637 * @generated 481 * @generated
638 */ 482 */
639 int ANTENNA_GAIN = 13; 483 int ANTENNA_GAIN = 10;
484
485 /**
486 * The meta object id for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind <em>Spacecraft Kind</em>}' enum.
487 * <!-- begin-user-doc -->
488 * <!-- end-user-doc -->
489 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind
490 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getSpacecraftKind()
491 * @generated
492 */
493 int SPACECRAFT_KIND = 11;
640 494
641 /** 495 /**
642 * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.ConstellationMission <em>Constellation Mission</em>}'. 496 * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.ConstellationMission <em>Constellation Mission</em>}'.
@@ -755,34 +609,15 @@ public interface SatellitePackage extends EPackage {
755 EReference getSpacecraft_Payload(); 609 EReference getSpacecraft_Payload();
756 610
757 /** 611 /**
758 * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U <em>Cube Sat3 U</em>}'. 612 * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft#getKind <em>Kind</em>}'.
759 * <!-- begin-user-doc -->
760 * <!-- end-user-doc -->
761 * @return the meta object for class '<em>Cube Sat3 U</em>'.
762 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U
763 * @generated
764 */
765 EClass getCubeSat3U();
766
767 /**
768 * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat6U <em>Cube Sat6 U</em>}'.
769 * <!-- begin-user-doc --> 613 * <!-- begin-user-doc -->
770 * <!-- end-user-doc --> 614 * <!-- end-user-doc -->
771 * @return the meta object for class '<em>Cube Sat6 U</em>'. 615 * @return the meta object for the attribute '<em>Kind</em>'.
772 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat6U 616 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft#getKind()
773 * @generated 617 * @see #getSpacecraft()
774 */
775 EClass getCubeSat6U();
776
777 /**
778 * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat <em>Small Sat</em>}'.
779 * <!-- begin-user-doc -->
780 * <!-- end-user-doc -->
781 * @return the meta object for class '<em>Small Sat</em>'.
782 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat
783 * @generated 618 * @generated
784 */ 619 */
785 EClass getSmallSat(); 620 EAttribute getSpacecraft_Kind();
786 621
787 /** 622 /**
788 * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem <em>Comm Subsystem</em>}'. 623 * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem <em>Comm Subsystem</em>}'.
@@ -889,6 +724,16 @@ public interface SatellitePackage extends EPackage {
889 EEnum getAntennaGain(); 724 EEnum getAntennaGain();
890 725
891 /** 726 /**
727 * Returns the meta object for enum '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind <em>Spacecraft Kind</em>}'.
728 * <!-- begin-user-doc -->
729 * <!-- end-user-doc -->
730 * @return the meta object for enum '<em>Spacecraft Kind</em>'.
731 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind
732 * @generated
733 */
734 EEnum getSpacecraftKind();
735
736 /**
892 * Returns the factory that creates the instances of the model. 737 * Returns the factory that creates the instances of the model.
893 * <!-- begin-user-doc --> 738 * <!-- begin-user-doc -->
894 * <!-- end-user-doc --> 739 * <!-- end-user-doc -->
@@ -1011,34 +856,12 @@ public interface SatellitePackage extends EPackage {
1011 EReference SPACECRAFT__PAYLOAD = eINSTANCE.getSpacecraft_Payload(); 856 EReference SPACECRAFT__PAYLOAD = eINSTANCE.getSpacecraft_Payload();
1012 857
1013 /** 858 /**
1014 * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CubeSat3UImpl <em>Cube Sat3 U</em>}' class. 859 * The meta object literal for the '<em><b>Kind</b></em>' attribute feature.
1015 * <!-- begin-user-doc --> 860 * <!-- begin-user-doc -->
1016 * <!-- end-user-doc --> 861 * <!-- end-user-doc -->
1017 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CubeSat3UImpl
1018 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getCubeSat3U()
1019 * @generated 862 * @generated
1020 */ 863 */
1021 EClass CUBE_SAT3_U = eINSTANCE.getCubeSat3U(); 864 EAttribute SPACECRAFT__KIND = eINSTANCE.getSpacecraft_Kind();
1022
1023 /**
1024 * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CubeSat6UImpl <em>Cube Sat6 U</em>}' class.
1025 * <!-- begin-user-doc -->
1026 * <!-- end-user-doc -->
1027 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CubeSat6UImpl
1028 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getCubeSat6U()
1029 * @generated
1030 */
1031 EClass CUBE_SAT6_U = eINSTANCE.getCubeSat6U();
1032
1033 /**
1034 * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SmallSatImpl <em>Small Sat</em>}' class.
1035 * <!-- begin-user-doc -->
1036 * <!-- end-user-doc -->
1037 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SmallSatImpl
1038 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getSmallSat()
1039 * @generated
1040 */
1041 EClass SMALL_SAT = eINSTANCE.getSmallSat();
1042 865
1043 /** 866 /**
1044 * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CommSubsystemImpl <em>Comm Subsystem</em>}' class. 867 * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.CommSubsystemImpl <em>Comm Subsystem</em>}' class.
@@ -1132,6 +955,16 @@ public interface SatellitePackage extends EPackage {
1132 */ 955 */
1133 EEnum ANTENNA_GAIN = eINSTANCE.getAntennaGain(); 956 EEnum ANTENNA_GAIN = eINSTANCE.getAntennaGain();
1134 957
958 /**
959 * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind <em>Spacecraft Kind</em>}' enum.
960 * <!-- begin-user-doc -->
961 * <!-- end-user-doc -->
962 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind
963 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SatellitePackageImpl#getSpacecraftKind()
964 * @generated
965 */
966 EEnum SPACECRAFT_KIND = eINSTANCE.getSpacecraftKind();
967
1135 } 968 }
1136 969
1137} //SatellitePackage 970} //SatellitePackage
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/Spacecraft.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/Spacecraft.java
index 2e5e5044..cc4b85a1 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/Spacecraft.java
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/Spacecraft.java
@@ -12,6 +12,7 @@ package hu.bme.mit.inf.dslreasoner.domains.satellite;
12 * </p> 12 * </p>
13 * <ul> 13 * <ul>
14 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft#getPayload <em>Payload</em>}</li> 14 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft#getPayload <em>Payload</em>}</li>
15 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft#getKind <em>Kind</em>}</li>
15 * </ul> 16 * </ul>
16 * 17 *
17 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage#getSpacecraft() 18 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage#getSpacecraft()
@@ -45,4 +46,33 @@ public interface Spacecraft extends CommunicatingElement {
45 */ 46 */
46 void setPayload(Payload value); 47 void setPayload(Payload value);
47 48
49 /**
50 * Returns the value of the '<em><b>Kind</b></em>' attribute.
51 * The literals are from the enumeration {@link hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind}.
52 * <!-- begin-user-doc -->
53 * <p>
54 * If the meaning of the '<em>Kind</em>' attribute isn't clear,
55 * there really should be more of a description here...
56 * </p>
57 * <!-- end-user-doc -->
58 * @return the value of the '<em>Kind</em>' attribute.
59 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind
60 * @see #setKind(SpacecraftKind)
61 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage#getSpacecraft_Kind()
62 * @model required="true"
63 * @generated
64 */
65 SpacecraftKind getKind();
66
67 /**
68 * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft#getKind <em>Kind</em>}' attribute.
69 * <!-- begin-user-doc -->
70 * <!-- end-user-doc -->
71 * @param value the new value of the '<em>Kind</em>' attribute.
72 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind
73 * @see #getKind()
74 * @generated
75 */
76 void setKind(SpacecraftKind value);
77
48} // Spacecraft 78} // Spacecraft
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SpacecraftKind.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SpacecraftKind.java
new file mode 100644
index 00000000..8be6abc1
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/SpacecraftKind.java
@@ -0,0 +1,241 @@
1/**
2 */
3package hu.bme.mit.inf.dslreasoner.domains.satellite;
4
5import java.util.Arrays;
6import java.util.Collections;
7import java.util.List;
8
9import org.eclipse.emf.common.util.Enumerator;
10
11/**
12 * <!-- begin-user-doc -->
13 * A representation of the literals of the enumeration '<em><b>Spacecraft Kind</b></em>',
14 * and utility methods for working with them.
15 * <!-- end-user-doc -->
16 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage#getSpacecraftKind()
17 * @model
18 * @generated
19 */
20public enum SpacecraftKind implements Enumerator {
21 /**
22 * The '<em><b>Cube Sat3 U</b></em>' literal object.
23 * <!-- begin-user-doc -->
24 * <!-- end-user-doc -->
25 * @see #CUBE_SAT3_U_VALUE
26 * @generated
27 * @ordered
28 */
29 CUBE_SAT3_U(0, "CubeSat3U", "CubeSat3U"),
30
31 /**
32 * The '<em><b>Cube Sat6 U</b></em>' literal object.
33 * <!-- begin-user-doc -->
34 * <!-- end-user-doc -->
35 * @see #CUBE_SAT6_U_VALUE
36 * @generated
37 * @ordered
38 */
39 CUBE_SAT6_U(1, "CubeSat6U", "CubeSat6U"),
40 /**
41 * The '<em><b>Small Sat</b></em>' literal object.
42 * <!-- begin-user-doc -->
43 * <!-- end-user-doc -->
44 * @see #SMALL_SAT_VALUE
45 * @generated
46 * @ordered
47 */
48 SMALL_SAT(2, "SmallSat", "SmallSat");
49
50 /**
51 * The '<em><b>Cube Sat3 U</b></em>' literal value.
52 * <!-- begin-user-doc -->
53 * <p>
54 * If the meaning of '<em><b>Cube Sat3 U</b></em>' literal object isn't clear,
55 * there really should be more of a description here...
56 * </p>
57 * <!-- end-user-doc -->
58 * @see #CUBE_SAT3_U
59 * @model name="CubeSat3U"
60 * @generated
61 * @ordered
62 */
63 public static final int CUBE_SAT3_U_VALUE = 0;
64
65 /**
66 * The '<em><b>Cube Sat6 U</b></em>' literal value.
67 * <!-- begin-user-doc -->
68 * <p>
69 * If the meaning of '<em><b>Cube Sat6 U</b></em>' literal object isn't clear,
70 * there really should be more of a description here...
71 * </p>
72 * <!-- end-user-doc -->
73 * @see #CUBE_SAT6_U
74 * @model name="CubeSat6U"
75 * @generated
76 * @ordered
77 */
78 public static final int CUBE_SAT6_U_VALUE = 1;
79
80 /**
81 * The '<em><b>Small Sat</b></em>' literal value.
82 * <!-- begin-user-doc -->
83 * <p>
84 * If the meaning of '<em><b>Small Sat</b></em>' literal object isn't clear,
85 * there really should be more of a description here...
86 * </p>
87 * <!-- end-user-doc -->
88 * @see #SMALL_SAT
89 * @model name="SmallSat"
90 * @generated
91 * @ordered
92 */
93 public static final int SMALL_SAT_VALUE = 2;
94
95 /**
96 * An array of all the '<em><b>Spacecraft Kind</b></em>' enumerators.
97 * <!-- begin-user-doc -->
98 * <!-- end-user-doc -->
99 * @generated
100 */
101 private static final SpacecraftKind[] VALUES_ARRAY = new SpacecraftKind[] { CUBE_SAT3_U, CUBE_SAT6_U, SMALL_SAT, };
102
103 /**
104 * A public read-only list of all the '<em><b>Spacecraft Kind</b></em>' enumerators.
105 * <!-- begin-user-doc -->
106 * <!-- end-user-doc -->
107 * @generated
108 */
109 public static final List<SpacecraftKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
110
111 /**
112 * Returns the '<em><b>Spacecraft Kind</b></em>' literal with the specified literal value.
113 * <!-- begin-user-doc -->
114 * <!-- end-user-doc -->
115 * @param literal the literal.
116 * @return the matching enumerator or <code>null</code>.
117 * @generated
118 */
119 public static SpacecraftKind get(String literal) {
120 for (int i = 0; i < VALUES_ARRAY.length; ++i) {
121 SpacecraftKind result = VALUES_ARRAY[i];
122 if (result.toString().equals(literal)) {
123 return result;
124 }
125 }
126 return null;
127 }
128
129 /**
130 * Returns the '<em><b>Spacecraft Kind</b></em>' literal with the specified name.
131 * <!-- begin-user-doc -->
132 * <!-- end-user-doc -->
133 * @param name the name.
134 * @return the matching enumerator or <code>null</code>.
135 * @generated
136 */
137 public static SpacecraftKind getByName(String name) {
138 for (int i = 0; i < VALUES_ARRAY.length; ++i) {
139 SpacecraftKind result = VALUES_ARRAY[i];
140 if (result.getName().equals(name)) {
141 return result;
142 }
143 }
144 return null;
145 }
146
147 /**
148 * Returns the '<em><b>Spacecraft Kind</b></em>' literal with the specified integer value.
149 * <!-- begin-user-doc -->
150 * <!-- end-user-doc -->
151 * @param value the integer value.
152 * @return the matching enumerator or <code>null</code>.
153 * @generated
154 */
155 public static SpacecraftKind get(int value) {
156 switch (value) {
157 case CUBE_SAT3_U_VALUE:
158 return CUBE_SAT3_U;
159 case CUBE_SAT6_U_VALUE:
160 return CUBE_SAT6_U;
161 case SMALL_SAT_VALUE:
162 return SMALL_SAT;
163 }
164 return null;
165 }
166
167 /**
168 * <!-- begin-user-doc -->
169 * <!-- end-user-doc -->
170 * @generated
171 */
172 private final int value;
173
174 /**
175 * <!-- begin-user-doc -->
176 * <!-- end-user-doc -->
177 * @generated
178 */
179 private final String name;
180
181 /**
182 * <!-- begin-user-doc -->
183 * <!-- end-user-doc -->
184 * @generated
185 */
186 private final String literal;
187
188 /**
189 * Only this class can construct instances.
190 * <!-- begin-user-doc -->
191 * <!-- end-user-doc -->
192 * @generated
193 */
194 private SpacecraftKind(int value, String name, String literal) {
195 this.value = value;
196 this.name = name;
197 this.literal = literal;
198 }
199
200 /**
201 * <!-- begin-user-doc -->
202 * <!-- end-user-doc -->
203 * @generated
204 */
205 @Override
206 public int getValue() {
207 return value;
208 }
209
210 /**
211 * <!-- begin-user-doc -->
212 * <!-- end-user-doc -->
213 * @generated
214 */
215 @Override
216 public String getName() {
217 return name;
218 }
219
220 /**
221 * <!-- begin-user-doc -->
222 * <!-- end-user-doc -->
223 * @generated
224 */
225 @Override
226 public String getLiteral() {
227 return literal;
228 }
229
230 /**
231 * Returns the literal value of the enumerator, which is its string representation.
232 * <!-- begin-user-doc -->
233 * <!-- end-user-doc -->
234 * @generated
235 */
236 @Override
237 public String toString() {
238 return literal;
239 }
240
241} //SpacecraftKind
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/CubeSat3UImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/CubeSat3UImpl.java
deleted file mode 100644
index 0057b3d4..00000000
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/CubeSat3UImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
1/**
2 */
3package hu.bme.mit.inf.dslreasoner.domains.satellite.impl;
4
5import hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U;
6import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage;
7
8import org.eclipse.emf.ecore.EClass;
9
10/**
11 * <!-- begin-user-doc -->
12 * An implementation of the model object '<em><b>Cube Sat3 U</b></em>'.
13 * <!-- end-user-doc -->
14 *
15 * @generated
16 */
17public class CubeSat3UImpl extends SpacecraftImpl implements CubeSat3U {
18 /**
19 * <!-- begin-user-doc -->
20 * <!-- end-user-doc -->
21 * @generated
22 */
23 protected CubeSat3UImpl() {
24 super();
25 }
26
27 /**
28 * <!-- begin-user-doc -->
29 * <!-- end-user-doc -->
30 * @generated
31 */
32 @Override
33 protected EClass eStaticClass() {
34 return SatellitePackage.Literals.CUBE_SAT3_U;
35 }
36
37} //CubeSat3UImpl
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/CubeSat6UImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/CubeSat6UImpl.java
deleted file mode 100644
index 3f34c6ea..00000000
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/CubeSat6UImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
1/**
2 */
3package hu.bme.mit.inf.dslreasoner.domains.satellite.impl;
4
5import hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat6U;
6import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage;
7
8import org.eclipse.emf.ecore.EClass;
9
10/**
11 * <!-- begin-user-doc -->
12 * An implementation of the model object '<em><b>Cube Sat6 U</b></em>'.
13 * <!-- end-user-doc -->
14 *
15 * @generated
16 */
17public class CubeSat6UImpl extends SpacecraftImpl implements CubeSat6U {
18 /**
19 * <!-- begin-user-doc -->
20 * <!-- end-user-doc -->
21 * @generated
22 */
23 protected CubeSat6UImpl() {
24 super();
25 }
26
27 /**
28 * <!-- begin-user-doc -->
29 * <!-- end-user-doc -->
30 * @generated
31 */
32 @Override
33 protected EClass eStaticClass() {
34 return SatellitePackage.Literals.CUBE_SAT6_U;
35 }
36
37} //CubeSat6UImpl
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SatelliteFactoryImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SatelliteFactoryImpl.java
index 5deb0c05..0cb07cfa 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SatelliteFactoryImpl.java
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SatelliteFactoryImpl.java
@@ -61,12 +61,6 @@ public class SatelliteFactoryImpl extends EFactoryImpl implements SatelliteFacto
61 return createInterferometryMission(); 61 return createInterferometryMission();
62 case SatellitePackage.GROUND_STATION_NETWORK: 62 case SatellitePackage.GROUND_STATION_NETWORK:
63 return createGroundStationNetwork(); 63 return createGroundStationNetwork();
64 case SatellitePackage.CUBE_SAT3_U:
65 return createCubeSat3U();
66 case SatellitePackage.CUBE_SAT6_U:
67 return createCubeSat6U();
68 case SatellitePackage.SMALL_SAT:
69 return createSmallSat();
70 case SatellitePackage.COMM_SUBSYSTEM: 64 case SatellitePackage.COMM_SUBSYSTEM:
71 return createCommSubsystem(); 65 return createCommSubsystem();
72 case SatellitePackage.DIRECTED_COMMUNICATION_LINK: 66 case SatellitePackage.DIRECTED_COMMUNICATION_LINK:
@@ -90,6 +84,8 @@ public class SatelliteFactoryImpl extends EFactoryImpl implements SatelliteFacto
90 return createTransceiverBandFromString(eDataType, initialValue); 84 return createTransceiverBandFromString(eDataType, initialValue);
91 case SatellitePackage.ANTENNA_GAIN: 85 case SatellitePackage.ANTENNA_GAIN:
92 return createAntennaGainFromString(eDataType, initialValue); 86 return createAntennaGainFromString(eDataType, initialValue);
87 case SatellitePackage.SPACECRAFT_KIND:
88 return createSpacecraftKindFromString(eDataType, initialValue);
93 default: 89 default:
94 throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); 90 throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
95 } 91 }
@@ -107,6 +103,8 @@ public class SatelliteFactoryImpl extends EFactoryImpl implements SatelliteFacto
107 return convertTransceiverBandToString(eDataType, instanceValue); 103 return convertTransceiverBandToString(eDataType, instanceValue);
108 case SatellitePackage.ANTENNA_GAIN: 104 case SatellitePackage.ANTENNA_GAIN:
109 return convertAntennaGainToString(eDataType, instanceValue); 105 return convertAntennaGainToString(eDataType, instanceValue);
106 case SatellitePackage.SPACECRAFT_KIND:
107 return convertSpacecraftKindToString(eDataType, instanceValue);
110 default: 108 default:
111 throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); 109 throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
112 } 110 }
@@ -140,39 +138,6 @@ public class SatelliteFactoryImpl extends EFactoryImpl implements SatelliteFacto
140 * @generated 138 * @generated
141 */ 139 */
142 @Override 140 @Override
143 public CubeSat3U createCubeSat3U() {
144 CubeSat3UImpl cubeSat3U = new CubeSat3UImpl();
145 return cubeSat3U;
146 }
147
148 /**
149 * <!-- begin-user-doc -->
150 * <!-- end-user-doc -->
151 * @generated
152 */
153 @Override
154 public CubeSat6U createCubeSat6U() {
155 CubeSat6UImpl cubeSat6U = new CubeSat6UImpl();
156 return cubeSat6U;
157 }
158
159 /**
160 * <!-- begin-user-doc -->
161 * <!-- end-user-doc -->
162 * @generated
163 */
164 @Override
165 public SmallSat createSmallSat() {
166 SmallSatImpl smallSat = new SmallSatImpl();
167 return smallSat;
168 }
169
170 /**
171 * <!-- begin-user-doc -->
172 * <!-- end-user-doc -->
173 * @generated
174 */
175 @Override
176 public CommSubsystem createCommSubsystem() { 141 public CommSubsystem createCommSubsystem() {
177 CommSubsystemImpl commSubsystem = new CommSubsystemImpl(); 142 CommSubsystemImpl commSubsystem = new CommSubsystemImpl();
178 return commSubsystem; 143 return commSubsystem;
@@ -249,6 +214,28 @@ public class SatelliteFactoryImpl extends EFactoryImpl implements SatelliteFacto
249 * <!-- end-user-doc --> 214 * <!-- end-user-doc -->
250 * @generated 215 * @generated
251 */ 216 */
217 public SpacecraftKind createSpacecraftKindFromString(EDataType eDataType, String initialValue) {
218 SpacecraftKind result = SpacecraftKind.get(initialValue);
219 if (result == null)
220 throw new IllegalArgumentException(
221 "The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
222 return result;
223 }
224
225 /**
226 * <!-- begin-user-doc -->
227 * <!-- end-user-doc -->
228 * @generated
229 */
230 public String convertSpacecraftKindToString(EDataType eDataType, Object instanceValue) {
231 return instanceValue == null ? null : instanceValue.toString();
232 }
233
234 /**
235 * <!-- begin-user-doc -->
236 * <!-- end-user-doc -->
237 * @generated
238 */
252 @Override 239 @Override
253 public SatellitePackage getSatellitePackage() { 240 public SatellitePackage getSatellitePackage() {
254 return (SatellitePackage) getEPackage(); 241 return (SatellitePackage) getEPackage();
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SatellitePackageImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SatellitePackageImpl.java
index 067eabd4..48ba32b8 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SatellitePackageImpl.java
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SatellitePackageImpl.java
@@ -6,8 +6,6 @@ import hu.bme.mit.inf.dslreasoner.domains.satellite.AntennaGain;
6import hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem; 6import hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem;
7import hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement; 7import hu.bme.mit.inf.dslreasoner.domains.satellite.CommunicatingElement;
8import hu.bme.mit.inf.dslreasoner.domains.satellite.ConstellationMission; 8import hu.bme.mit.inf.dslreasoner.domains.satellite.ConstellationMission;
9import hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U;
10import hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat6U;
11import hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink; 9import hu.bme.mit.inf.dslreasoner.domains.satellite.DirectedCommunicationLink;
12import hu.bme.mit.inf.dslreasoner.domains.satellite.GroundStationNetwork; 10import hu.bme.mit.inf.dslreasoner.domains.satellite.GroundStationNetwork;
13import hu.bme.mit.inf.dslreasoner.domains.satellite.InterferometryMission; 11import hu.bme.mit.inf.dslreasoner.domains.satellite.InterferometryMission;
@@ -15,8 +13,8 @@ import hu.bme.mit.inf.dslreasoner.domains.satellite.InterferometryPayload;
15import hu.bme.mit.inf.dslreasoner.domains.satellite.Payload; 13import hu.bme.mit.inf.dslreasoner.domains.satellite.Payload;
16import hu.bme.mit.inf.dslreasoner.domains.satellite.SatelliteFactory; 14import hu.bme.mit.inf.dslreasoner.domains.satellite.SatelliteFactory;
17import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage; 15import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage;
18import hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat;
19import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; 16import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft;
17import hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind;
20import hu.bme.mit.inf.dslreasoner.domains.satellite.TransceiverBand; 18import hu.bme.mit.inf.dslreasoner.domains.satellite.TransceiverBand;
21 19
22import org.eclipse.emf.ecore.EAttribute; 20import org.eclipse.emf.ecore.EAttribute;
@@ -74,27 +72,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka
74 * <!-- end-user-doc --> 72 * <!-- end-user-doc -->
75 * @generated 73 * @generated
76 */ 74 */
77 private EClass cubeSat3UEClass = null;
78
79 /**
80 * <!-- begin-user-doc -->
81 * <!-- end-user-doc -->
82 * @generated
83 */
84 private EClass cubeSat6UEClass = null;
85
86 /**
87 * <!-- begin-user-doc -->
88 * <!-- end-user-doc -->
89 * @generated
90 */
91 private EClass smallSatEClass = null;
92
93 /**
94 * <!-- begin-user-doc -->
95 * <!-- end-user-doc -->
96 * @generated
97 */
98 private EClass commSubsystemEClass = null; 75 private EClass commSubsystemEClass = null;
99 76
100 /** 77 /**
@@ -133,6 +110,13 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka
133 private EEnum antennaGainEEnum = null; 110 private EEnum antennaGainEEnum = null;
134 111
135 /** 112 /**
113 * <!-- begin-user-doc -->
114 * <!-- end-user-doc -->
115 * @generated
116 */
117 private EEnum spacecraftKindEEnum = null;
118
119 /**
136 * Creates an instance of the model <b>Package</b>, registered with 120 * Creates an instance of the model <b>Package</b>, registered with
137 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package 121 * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
138 * package URI value. 122 * package URI value.
@@ -312,28 +296,8 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka
312 * @generated 296 * @generated
313 */ 297 */
314 @Override 298 @Override
315 public EClass getCubeSat3U() { 299 public EAttribute getSpacecraft_Kind() {
316 return cubeSat3UEClass; 300 return (EAttribute) spacecraftEClass.getEStructuralFeatures().get(1);
317 }
318
319 /**
320 * <!-- begin-user-doc -->
321 * <!-- end-user-doc -->
322 * @generated
323 */
324 @Override
325 public EClass getCubeSat6U() {
326 return cubeSat6UEClass;
327 }
328
329 /**
330 * <!-- begin-user-doc -->
331 * <!-- end-user-doc -->
332 * @generated
333 */
334 @Override
335 public EClass getSmallSat() {
336 return smallSatEClass;
337 } 301 }
338 302
339 /** 303 /**
@@ -442,6 +406,16 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka
442 * @generated 406 * @generated
443 */ 407 */
444 @Override 408 @Override
409 public EEnum getSpacecraftKind() {
410 return spacecraftKindEEnum;
411 }
412
413 /**
414 * <!-- begin-user-doc -->
415 * <!-- end-user-doc -->
416 * @generated
417 */
418 @Override
445 public SatelliteFactory getSatelliteFactory() { 419 public SatelliteFactory getSatelliteFactory() {
446 return (SatelliteFactory) getEFactoryInstance(); 420 return (SatelliteFactory) getEFactoryInstance();
447 } 421 }
@@ -481,12 +455,7 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka
481 455
482 spacecraftEClass = createEClass(SPACECRAFT); 456 spacecraftEClass = createEClass(SPACECRAFT);
483 createEReference(spacecraftEClass, SPACECRAFT__PAYLOAD); 457 createEReference(spacecraftEClass, SPACECRAFT__PAYLOAD);
484 458 createEAttribute(spacecraftEClass, SPACECRAFT__KIND);
485 cubeSat3UEClass = createEClass(CUBE_SAT3_U);
486
487 cubeSat6UEClass = createEClass(CUBE_SAT6_U);
488
489 smallSatEClass = createEClass(SMALL_SAT);
490 459
491 commSubsystemEClass = createEClass(COMM_SUBSYSTEM); 460 commSubsystemEClass = createEClass(COMM_SUBSYSTEM);
492 createEAttribute(commSubsystemEClass, COMM_SUBSYSTEM__BAND); 461 createEAttribute(commSubsystemEClass, COMM_SUBSYSTEM__BAND);
@@ -503,6 +472,7 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka
503 // Create enums 472 // Create enums
504 transceiverBandEEnum = createEEnum(TRANSCEIVER_BAND); 473 transceiverBandEEnum = createEEnum(TRANSCEIVER_BAND);
505 antennaGainEEnum = createEEnum(ANTENNA_GAIN); 474 antennaGainEEnum = createEEnum(ANTENNA_GAIN);
475 spacecraftKindEEnum = createEEnum(SPACECRAFT_KIND);
506 } 476 }
507 477
508 /** 478 /**
@@ -537,9 +507,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka
537 interferometryMissionEClass.getESuperTypes().add(this.getConstellationMission()); 507 interferometryMissionEClass.getESuperTypes().add(this.getConstellationMission());
538 groundStationNetworkEClass.getESuperTypes().add(this.getCommunicatingElement()); 508 groundStationNetworkEClass.getESuperTypes().add(this.getCommunicatingElement());
539 spacecraftEClass.getESuperTypes().add(this.getCommunicatingElement()); 509 spacecraftEClass.getESuperTypes().add(this.getCommunicatingElement());
540 cubeSat3UEClass.getESuperTypes().add(this.getSpacecraft());
541 cubeSat6UEClass.getESuperTypes().add(this.getSpacecraft());
542 smallSatEClass.getESuperTypes().add(this.getSpacecraft());
543 interferometryPayloadEClass.getESuperTypes().add(this.getPayload()); 510 interferometryPayloadEClass.getESuperTypes().add(this.getPayload());
544 511
545 // Initialize classes, features, and operations; add parameters 512 // Initialize classes, features, and operations; add parameters
@@ -575,15 +542,8 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka
575 initEReference(getSpacecraft_Payload(), this.getPayload(), null, "payload", null, 0, 1, Spacecraft.class, 542 initEReference(getSpacecraft_Payload(), this.getPayload(), null, "payload", null, 0, 1, Spacecraft.class,
576 !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, 543 !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE,
577 IS_UNIQUE, !IS_DERIVED, IS_ORDERED); 544 IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
578 545 initEAttribute(getSpacecraft_Kind(), this.getSpacecraftKind(), "kind", null, 1, 1, Spacecraft.class,
579 initEClass(cubeSat3UEClass, CubeSat3U.class, "CubeSat3U", !IS_ABSTRACT, !IS_INTERFACE, 546 !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
580 IS_GENERATED_INSTANCE_CLASS);
581
582 initEClass(cubeSat6UEClass, CubeSat6U.class, "CubeSat6U", !IS_ABSTRACT, !IS_INTERFACE,
583 IS_GENERATED_INSTANCE_CLASS);
584
585 initEClass(smallSatEClass, SmallSat.class, "SmallSat", !IS_ABSTRACT, !IS_INTERFACE,
586 IS_GENERATED_INSTANCE_CLASS);
587 547
588 initEClass(commSubsystemEClass, CommSubsystem.class, "CommSubsystem", !IS_ABSTRACT, !IS_INTERFACE, 548 initEClass(commSubsystemEClass, CommSubsystem.class, "CommSubsystem", !IS_ABSTRACT, !IS_INTERFACE,
589 IS_GENERATED_INSTANCE_CLASS); 549 IS_GENERATED_INSTANCE_CLASS);
@@ -617,6 +577,11 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka
617 addEEnumLiteral(antennaGainEEnum, AntennaGain.MEDIUM); 577 addEEnumLiteral(antennaGainEEnum, AntennaGain.MEDIUM);
618 addEEnumLiteral(antennaGainEEnum, AntennaGain.HIGH); 578 addEEnumLiteral(antennaGainEEnum, AntennaGain.HIGH);
619 579
580 initEEnum(spacecraftKindEEnum, SpacecraftKind.class, "SpacecraftKind");
581 addEEnumLiteral(spacecraftKindEEnum, SpacecraftKind.CUBE_SAT3_U);
582 addEEnumLiteral(spacecraftKindEEnum, SpacecraftKind.CUBE_SAT6_U);
583 addEEnumLiteral(spacecraftKindEEnum, SpacecraftKind.SMALL_SAT);
584
620 // Create resource 585 // Create resource
621 createResource(eNS_URI); 586 createResource(eNS_URI);
622 } 587 }
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SmallSatImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SmallSatImpl.java
deleted file mode 100644
index 522991ad..00000000
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SmallSatImpl.java
+++ /dev/null
@@ -1,37 +0,0 @@
1/**
2 */
3package hu.bme.mit.inf.dslreasoner.domains.satellite.impl;
4
5import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage;
6import hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat;
7
8import org.eclipse.emf.ecore.EClass;
9
10/**
11 * <!-- begin-user-doc -->
12 * An implementation of the model object '<em><b>Small Sat</b></em>'.
13 * <!-- end-user-doc -->
14 *
15 * @generated
16 */
17public class SmallSatImpl extends SpacecraftImpl implements SmallSat {
18 /**
19 * <!-- begin-user-doc -->
20 * <!-- end-user-doc -->
21 * @generated
22 */
23 protected SmallSatImpl() {
24 super();
25 }
26
27 /**
28 * <!-- begin-user-doc -->
29 * <!-- end-user-doc -->
30 * @generated
31 */
32 @Override
33 protected EClass eStaticClass() {
34 return SatellitePackage.Literals.SMALL_SAT;
35 }
36
37} //SmallSatImpl
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java
index caefd377..2135af2c 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/impl/SpacecraftImpl.java
@@ -6,6 +6,7 @@ import hu.bme.mit.inf.dslreasoner.domains.satellite.Payload;
6import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage; 6import hu.bme.mit.inf.dslreasoner.domains.satellite.SatellitePackage;
7import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft; 7import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft;
8 8
9import hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind;
9import org.eclipse.emf.common.notify.Notification; 10import org.eclipse.emf.common.notify.Notification;
10import org.eclipse.emf.common.notify.NotificationChain; 11import org.eclipse.emf.common.notify.NotificationChain;
11 12
@@ -23,6 +24,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
23 * </p> 24 * </p>
24 * <ul> 25 * <ul>
25 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SpacecraftImpl#getPayload <em>Payload</em>}</li> 26 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SpacecraftImpl#getPayload <em>Payload</em>}</li>
27 * <li>{@link hu.bme.mit.inf.dslreasoner.domains.satellite.impl.SpacecraftImpl#getKind <em>Kind</em>}</li>
26 * </ul> 28 * </ul>
27 * 29 *
28 * @generated 30 * @generated
@@ -39,6 +41,25 @@ public abstract class SpacecraftImpl extends CommunicatingElementImpl implements
39 protected Payload payload; 41 protected Payload payload;
40 42
41 /** 43 /**
44 * The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
45 * <!-- begin-user-doc -->
46 * <!-- end-user-doc -->
47 * @see #getKind()
48 * @generated
49 * @ordered
50 */
51 protected static final SpacecraftKind KIND_EDEFAULT = SpacecraftKind.CUBE_SAT3_U;
52 /**
53 * The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
54 * <!-- begin-user-doc -->
55 * <!-- end-user-doc -->
56 * @see #getKind()
57 * @generated
58 * @ordered
59 */
60 protected SpacecraftKind kind = KIND_EDEFAULT;
61
62 /**
42 * <!-- begin-user-doc --> 63 * <!-- begin-user-doc -->
43 * <!-- end-user-doc --> 64 * <!-- end-user-doc -->
44 * @generated 65 * @generated
@@ -115,6 +136,29 @@ public abstract class SpacecraftImpl extends CommunicatingElementImpl implements
115 * @generated 136 * @generated
116 */ 137 */
117 @Override 138 @Override
139 public SpacecraftKind getKind() {
140 return kind;
141 }
142
143 /**
144 * <!-- begin-user-doc -->
145 * <!-- end-user-doc -->
146 * @generated
147 */
148 @Override
149 public void setKind(SpacecraftKind newKind) {
150 SpacecraftKind oldKind = kind;
151 kind = newKind == null ? KIND_EDEFAULT : newKind;
152 if (eNotificationRequired())
153 eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.SPACECRAFT__KIND, oldKind, kind));
154 }
155
156 /**
157 * <!-- begin-user-doc -->
158 * <!-- end-user-doc -->
159 * @generated
160 */
161 @Override
118 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { 162 public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
119 switch (featureID) { 163 switch (featureID) {
120 case SatellitePackage.SPACECRAFT__PAYLOAD: 164 case SatellitePackage.SPACECRAFT__PAYLOAD:
@@ -133,6 +177,8 @@ public abstract class SpacecraftImpl extends CommunicatingElementImpl implements
133 switch (featureID) { 177 switch (featureID) {
134 case SatellitePackage.SPACECRAFT__PAYLOAD: 178 case SatellitePackage.SPACECRAFT__PAYLOAD:
135 return getPayload(); 179 return getPayload();
180 case SatellitePackage.SPACECRAFT__KIND:
181 return getKind();
136 } 182 }
137 return super.eGet(featureID, resolve, coreType); 183 return super.eGet(featureID, resolve, coreType);
138 } 184 }
@@ -148,6 +194,9 @@ public abstract class SpacecraftImpl extends CommunicatingElementImpl implements
148 case SatellitePackage.SPACECRAFT__PAYLOAD: 194 case SatellitePackage.SPACECRAFT__PAYLOAD:
149 setPayload((Payload) newValue); 195 setPayload((Payload) newValue);
150 return; 196 return;
197 case SatellitePackage.SPACECRAFT__KIND:
198 setKind((SpacecraftKind) newValue);
199 return;
151 } 200 }
152 super.eSet(featureID, newValue); 201 super.eSet(featureID, newValue);
153 } 202 }
@@ -163,6 +212,9 @@ public abstract class SpacecraftImpl extends CommunicatingElementImpl implements
163 case SatellitePackage.SPACECRAFT__PAYLOAD: 212 case SatellitePackage.SPACECRAFT__PAYLOAD:
164 setPayload((Payload) null); 213 setPayload((Payload) null);
165 return; 214 return;
215 case SatellitePackage.SPACECRAFT__KIND:
216 setKind(KIND_EDEFAULT);
217 return;
166 } 218 }
167 super.eUnset(featureID); 219 super.eUnset(featureID);
168 } 220 }
@@ -177,8 +229,27 @@ public abstract class SpacecraftImpl extends CommunicatingElementImpl implements
177 switch (featureID) { 229 switch (featureID) {
178 case SatellitePackage.SPACECRAFT__PAYLOAD: 230 case SatellitePackage.SPACECRAFT__PAYLOAD:
179 return payload != null; 231 return payload != null;
232 case SatellitePackage.SPACECRAFT__KIND:
233 return kind != KIND_EDEFAULT;
180 } 234 }
181 return super.eIsSet(featureID); 235 return super.eIsSet(featureID);
182 } 236 }
183 237
238 /**
239 * <!-- begin-user-doc -->
240 * <!-- end-user-doc -->
241 * @generated
242 */
243 @Override
244 public String toString() {
245 if (eIsProxy())
246 return super.toString();
247
248 StringBuilder result = new StringBuilder(super.toString());
249 result.append(" (kind: ");
250 result.append(kind);
251 result.append(')');
252 return result.toString();
253 }
254
184} //SpacecraftImpl 255} //SpacecraftImpl
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/util/SatelliteAdapterFactory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/util/SatelliteAdapterFactory.java
index c2ba615b..639a40b7 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/util/SatelliteAdapterFactory.java
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/util/SatelliteAdapterFactory.java
@@ -92,21 +92,6 @@ public class SatelliteAdapterFactory extends AdapterFactoryImpl {
92 } 92 }
93 93
94 @Override 94 @Override
95 public Adapter caseCubeSat3U(CubeSat3U object) {
96 return createCubeSat3UAdapter();
97 }
98
99 @Override
100 public Adapter caseCubeSat6U(CubeSat6U object) {
101 return createCubeSat6UAdapter();
102 }
103
104 @Override
105 public Adapter caseSmallSat(SmallSat object) {
106 return createSmallSatAdapter();
107 }
108
109 @Override
110 public Adapter caseCommSubsystem(CommSubsystem object) { 95 public Adapter caseCommSubsystem(CommSubsystem object) {
111 return createCommSubsystemAdapter(); 96 return createCommSubsystemAdapter();
112 } 97 }
@@ -216,48 +201,6 @@ public class SatelliteAdapterFactory extends AdapterFactoryImpl {
216 } 201 }
217 202
218 /** 203 /**
219 * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U <em>Cube Sat3 U</em>}'.
220 * <!-- begin-user-doc -->
221 * This default implementation returns null so that we can easily ignore cases;
222 * it's useful to ignore a case when inheritance will catch all the cases anyway.
223 * <!-- end-user-doc -->
224 * @return the new adapter.
225 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U
226 * @generated
227 */
228 public Adapter createCubeSat3UAdapter() {
229 return null;
230 }
231
232 /**
233 * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat6U <em>Cube Sat6 U</em>}'.
234 * <!-- begin-user-doc -->
235 * This default implementation returns null so that we can easily ignore cases;
236 * it's useful to ignore a case when inheritance will catch all the cases anyway.
237 * <!-- end-user-doc -->
238 * @return the new adapter.
239 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat6U
240 * @generated
241 */
242 public Adapter createCubeSat6UAdapter() {
243 return null;
244 }
245
246 /**
247 * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat <em>Small Sat</em>}'.
248 * <!-- begin-user-doc -->
249 * This default implementation returns null so that we can easily ignore cases;
250 * it's useful to ignore a case when inheritance will catch all the cases anyway.
251 * <!-- end-user-doc -->
252 * @return the new adapter.
253 * @see hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat
254 * @generated
255 */
256 public Adapter createSmallSatAdapter() {
257 return null;
258 }
259
260 /**
261 * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem <em>Comm Subsystem</em>}'. 204 * Creates a new adapter for an object of class '{@link hu.bme.mit.inf.dslreasoner.domains.satellite.CommSubsystem <em>Comm Subsystem</em>}'.
262 * <!-- begin-user-doc --> 205 * <!-- begin-user-doc -->
263 * This default implementation returns null so that we can easily ignore cases; 206 * This default implementation returns null so that we can easily ignore cases;
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/util/SatelliteSwitch.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/util/SatelliteSwitch.java
index 65b24430..e78a1cd2 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/util/SatelliteSwitch.java
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/util/SatelliteSwitch.java
@@ -107,39 +107,6 @@ public class SatelliteSwitch<T> extends Switch<T> {
107 result = defaultCase(theEObject); 107 result = defaultCase(theEObject);
108 return result; 108 return result;
109 } 109 }
110 case SatellitePackage.CUBE_SAT3_U: {
111 CubeSat3U cubeSat3U = (CubeSat3U) theEObject;
112 T result = caseCubeSat3U(cubeSat3U);
113 if (result == null)
114 result = caseSpacecraft(cubeSat3U);
115 if (result == null)
116 result = caseCommunicatingElement(cubeSat3U);
117 if (result == null)
118 result = defaultCase(theEObject);
119 return result;
120 }
121 case SatellitePackage.CUBE_SAT6_U: {
122 CubeSat6U cubeSat6U = (CubeSat6U) theEObject;
123 T result = caseCubeSat6U(cubeSat6U);
124 if (result == null)
125 result = caseSpacecraft(cubeSat6U);
126 if (result == null)
127 result = caseCommunicatingElement(cubeSat6U);
128 if (result == null)
129 result = defaultCase(theEObject);
130 return result;
131 }
132 case SatellitePackage.SMALL_SAT: {
133 SmallSat smallSat = (SmallSat) theEObject;
134 T result = caseSmallSat(smallSat);
135 if (result == null)
136 result = caseSpacecraft(smallSat);
137 if (result == null)
138 result = caseCommunicatingElement(smallSat);
139 if (result == null)
140 result = defaultCase(theEObject);
141 return result;
142 }
143 case SatellitePackage.COMM_SUBSYSTEM: { 110 case SatellitePackage.COMM_SUBSYSTEM: {
144 CommSubsystem commSubsystem = (CommSubsystem) theEObject; 111 CommSubsystem commSubsystem = (CommSubsystem) theEObject;
145 T result = caseCommSubsystem(commSubsystem); 112 T result = caseCommSubsystem(commSubsystem);
@@ -251,51 +218,6 @@ public class SatelliteSwitch<T> extends Switch<T> {
251 } 218 }
252 219
253 /** 220 /**
254 * Returns the result of interpreting the object as an instance of '<em>Cube Sat3 U</em>'.
255 * <!-- begin-user-doc -->
256 * This implementation returns null;
257 * returning a non-null result will terminate the switch.
258 * <!-- end-user-doc -->
259 * @param object the target of the switch.
260 * @return the result of interpreting the object as an instance of '<em>Cube Sat3 U</em>'.
261 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
262 * @generated
263 */
264 public T caseCubeSat3U(CubeSat3U object) {
265 return null;
266 }
267
268 /**
269 * Returns the result of interpreting the object as an instance of '<em>Cube Sat6 U</em>'.
270 * <!-- begin-user-doc -->
271 * This implementation returns null;
272 * returning a non-null result will terminate the switch.
273 * <!-- end-user-doc -->
274 * @param object the target of the switch.
275 * @return the result of interpreting the object as an instance of '<em>Cube Sat6 U</em>'.
276 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
277 * @generated
278 */
279 public T caseCubeSat6U(CubeSat6U object) {
280 return null;
281 }
282
283 /**
284 * Returns the result of interpreting the object as an instance of '<em>Small Sat</em>'.
285 * <!-- begin-user-doc -->
286 * This implementation returns null;
287 * returning a non-null result will terminate the switch.
288 * <!-- end-user-doc -->
289 * @param object the target of the switch.
290 * @return the result of interpreting the object as an instance of '<em>Small Sat</em>'.
291 * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
292 * @generated
293 */
294 public T caseSmallSat(SmallSat object) {
295 return null;
296 }
297
298 /**
299 * Returns the result of interpreting the object as an instance of '<em>Comm Subsystem</em>'. 221 * Returns the result of interpreting the object as an instance of '<em>Comm Subsystem</em>'.
300 * <!-- begin-user-doc --> 222 * <!-- begin-user-doc -->
301 * This implementation returns null; 223 * This implementation returns null;
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 3aa1cc06..569089d8 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
@@ -1277,6 +1277,35 @@
1277 <semanticResources>java:/Objects/java.io.Console</semanticResources> 1277 <semanticResources>java:/Objects/java.io.Console</semanticResources>
1278 <semanticResources>java:/Objects/java.io.FileOutputStream</semanticResources> 1278 <semanticResources>java:/Objects/java.io.FileOutputStream</semanticResources>
1279 <semanticResources>../inputs/SatelliteInstance.xmi</semanticResources> 1279 <semanticResources>../inputs/SatelliteInstance.xmi</semanticResources>
1280 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.StandaloneScriptExecutor</semanticResources>
1281 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.ScriptConsole</semanticResources>
1282 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.ScriptConsoleDecorator</semanticResources>
1283 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.ApplicationConfigurationStandaloneSetup</semanticResources>
1284 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.StandardOutputBasedScriptConsole</semanticResources>
1285 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor</semanticResources>
1286 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.util.ApplicationConfigurationParser</semanticResources>
1287 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.PatternLanguageWithRSSetup</semanticResources>
1288 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.PatternLanguageWithRSModule</semanticResources>
1289 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.ApplicationConfigurationStandaloneRuntimeModule</semanticResources>
1290 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.validation.ApplicationConfigurationValidator</semanticResources>
1291 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor</semanticResources>
1292 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.MetamodelLoader</semanticResources>
1293 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.validation.MetamodelValidator</semanticResources>
1294 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.ModelLoader</semanticResources>
1295 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.validation.QueryAndMetamodelValidator</semanticResources>
1296 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.QueryLoader</semanticResources>
1297 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.ScopeLoader</semanticResources>
1298 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.SolverLoader</semanticResources>
1299 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.valueconverter.QualifiedNameValueConverter</semanticResources>
1300 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.NullWorkspace</semanticResources>
1301 <semanticResources>java:/Objects/hu.bme.mit.inf.dslreasoner.application.execution.EclipseBasedProgressMonitor</semanticResources>
1302 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.aggregators.count</semanticResources>
1303 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.AggregatorType</semanticResources>
1304 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.IAggregatorFactory</semanticResources>
1305 <semanticResources>java:/Objects/java.lang.annotation.Inherited</semanticResources>
1306 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.aggregators.min</semanticResources>
1307 <semanticResources>../src/hu/bme/mit/inf/dslreasoner/domains/satellite/metrics/SatelliteMetrics.vql</semanticResources>
1308 <semanticResources>java:/Objects/org.eclipse.viatra.query.runtime.matchers.aggregators.max</semanticResources>
1280 <ownedViews xmi:type="viewpoint:DView" uid="_reOHEF0qEemRYLyXht2IrQ"> 1309 <ownedViews xmi:type="viewpoint:DView" uid="_reOHEF0qEemRYLyXht2IrQ">
1281 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/> 1310 <viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
1282 <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_re1yIF0qEemRYLyXht2IrQ" name="satellite" repPath="#_rel6gF0qEemRYLyXht2IrQ"> 1311 <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" uid="_re1yIF0qEemRYLyXht2IrQ" name="satellite" repPath="#_rel6gF0qEemRYLyXht2IrQ">
@@ -1370,39 +1399,16 @@
1370 <children xmi:type="notation:Node" xmi:id="_Aq3OgF0sEemRYLyXht2IrQ" type="2003" element="_AqsPYF0sEemRYLyXht2IrQ"> 1399 <children xmi:type="notation:Node" xmi:id="_Aq3OgF0sEemRYLyXht2IrQ" type="2003" element="_AqsPYF0sEemRYLyXht2IrQ">
1371 <children xmi:type="notation:Node" xmi:id="_Aq31kF0sEemRYLyXht2IrQ" type="5007"/> 1400 <children xmi:type="notation:Node" xmi:id="_Aq31kF0sEemRYLyXht2IrQ" type="5007"/>
1372 <children xmi:type="notation:Node" xmi:id="_Aq31kV0sEemRYLyXht2IrQ" type="7004"> 1401 <children xmi:type="notation:Node" xmi:id="_Aq31kV0sEemRYLyXht2IrQ" type="7004">
1402 <children xmi:type="notation:Node" xmi:id="_-9pX8G60Eem3gIPdAp40Tw" type="3010" element="_-9TZsG60Eem3gIPdAp40Tw">
1403 <styles xmi:type="notation:FontStyle" xmi:id="_-9pX8W60Eem3gIPdAp40Tw" fontColor="2697711" fontName="Noto Sans" fontHeight="8"/>
1404 <layoutConstraint xmi:type="notation:Location" xmi:id="_-9pX8m60Eem3gIPdAp40Tw"/>
1405 </children>
1373 <styles xmi:type="notation:SortingStyle" xmi:id="_Aq31kl0sEemRYLyXht2IrQ"/> 1406 <styles xmi:type="notation:SortingStyle" xmi:id="_Aq31kl0sEemRYLyXht2IrQ"/>
1374 <styles xmi:type="notation:FilteringStyle" xmi:id="_Aq31k10sEemRYLyXht2IrQ"/> 1407 <styles xmi:type="notation:FilteringStyle" xmi:id="_Aq31k10sEemRYLyXht2IrQ"/>
1375 </children> 1408 </children>
1376 <styles xmi:type="notation:ShapeStyle" xmi:id="_Aq3OgV0sEemRYLyXht2IrQ" fontName="Noto Sans" fontHeight="8"/> 1409 <styles xmi:type="notation:ShapeStyle" xmi:id="_Aq3OgV0sEemRYLyXht2IrQ" fontName="Noto Sans" fontHeight="8"/>
1377 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Aq3Ogl0sEemRYLyXht2IrQ" x="338" y="325" width="120" height="100"/> 1410 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Aq3Ogl0sEemRYLyXht2IrQ" x="338" y="325" width="120" height="100"/>
1378 </children> 1411 </children>
1379 <children xmi:type="notation:Node" xmi:id="_H1d0AF0sEemRYLyXht2IrQ" type="2003" element="_H1OjcF0sEemRYLyXht2IrQ">
1380 <children xmi:type="notation:Node" xmi:id="_H1ebEF0sEemRYLyXht2IrQ" type="5007"/>
1381 <children xmi:type="notation:Node" xmi:id="_H1ebEV0sEemRYLyXht2IrQ" type="7004">
1382 <styles xmi:type="notation:SortingStyle" xmi:id="_H1ebEl0sEemRYLyXht2IrQ"/>
1383 <styles xmi:type="notation:FilteringStyle" xmi:id="_H1ebE10sEemRYLyXht2IrQ"/>
1384 </children>
1385 <styles xmi:type="notation:ShapeStyle" xmi:id="_H1d0AV0sEemRYLyXht2IrQ" fontName="Noto Sans" fontHeight="8"/>
1386 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_H1d0Al0sEemRYLyXht2IrQ" x="208" y="481" width="120" height="100"/>
1387 </children>
1388 <children xmi:type="notation:Node" xmi:id="_I4glYF0sEemRYLyXht2IrQ" type="2003" element="_I4Si8F0sEemRYLyXht2IrQ">
1389 <children xmi:type="notation:Node" xmi:id="_I4hMcF0sEemRYLyXht2IrQ" type="5007"/>
1390 <children xmi:type="notation:Node" xmi:id="_I4hzgF0sEemRYLyXht2IrQ" type="7004">
1391 <styles xmi:type="notation:SortingStyle" xmi:id="_I4hzgV0sEemRYLyXht2IrQ"/>
1392 <styles xmi:type="notation:FilteringStyle" xmi:id="_I4hzgl0sEemRYLyXht2IrQ"/>
1393 </children>
1394 <styles xmi:type="notation:ShapeStyle" xmi:id="_I4glYV0sEemRYLyXht2IrQ" fontName="Noto Sans" fontHeight="8"/>
1395 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_I4glYl0sEemRYLyXht2IrQ" x="351" y="481" width="120" height="100"/>
1396 </children>
1397 <children xmi:type="notation:Node" xmi:id="_K1IDEF0sEemRYLyXht2IrQ" type="2003" element="_K04LcF0sEemRYLyXht2IrQ">
1398 <children xmi:type="notation:Node" xmi:id="_K1IDE10sEemRYLyXht2IrQ" type="5007"/>
1399 <children xmi:type="notation:Node" xmi:id="_K1IqIF0sEemRYLyXht2IrQ" type="7004">
1400 <styles xmi:type="notation:SortingStyle" xmi:id="_K1IqIV0sEemRYLyXht2IrQ"/>
1401 <styles xmi:type="notation:FilteringStyle" xmi:id="_K1IqIl0sEemRYLyXht2IrQ"/>
1402 </children>
1403 <styles xmi:type="notation:ShapeStyle" xmi:id="_K1IDEV0sEemRYLyXht2IrQ" fontName="Noto Sans" fontHeight="8"/>
1404 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_K1IDEl0sEemRYLyXht2IrQ" x="494" y="481" width="120" height="100"/>
1405 </children>
1406 <children xmi:type="notation:Node" xmi:id="_j0vs4F0tEemRYLyXht2IrQ" type="2003" element="_j0eAEF0tEemRYLyXht2IrQ"> 1412 <children xmi:type="notation:Node" xmi:id="_j0vs4F0tEemRYLyXht2IrQ" type="2003" element="_j0eAEF0tEemRYLyXht2IrQ">
1407 <children xmi:type="notation:Node" xmi:id="_j0wT8F0tEemRYLyXht2IrQ" type="5007"/> 1413 <children xmi:type="notation:Node" xmi:id="_j0wT8F0tEemRYLyXht2IrQ" type="5007"/>
1408 <children xmi:type="notation:Node" xmi:id="_j0wT8V0tEemRYLyXht2IrQ" type="7004"> 1414 <children xmi:type="notation:Node" xmi:id="_j0wT8V0tEemRYLyXht2IrQ" type="7004">
@@ -1489,6 +1495,27 @@
1489 <styles xmi:type="notation:ShapeStyle" xmi:id="_45PdkV0xEemRYLyXht2IrQ" fontName="Noto Sans" fontHeight="8"/> 1495 <styles xmi:type="notation:ShapeStyle" xmi:id="_45PdkV0xEemRYLyXht2IrQ" fontName="Noto Sans" fontHeight="8"/>
1490 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_45Pdkl0xEemRYLyXht2IrQ" x="39" y="481" width="146" height="100"/> 1496 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_45Pdkl0xEemRYLyXht2IrQ" x="39" y="481" width="146" height="100"/>
1491 </children> 1497 </children>
1498 <children xmi:type="notation:Node" xmi:id="_2omYkG60Eem3gIPdAp40Tw" type="2003" element="_2oBw0G60Eem3gIPdAp40Tw">
1499 <children xmi:type="notation:Node" xmi:id="_2orREG60Eem3gIPdAp40Tw" type="5007"/>
1500 <children xmi:type="notation:Node" xmi:id="_2or4IG60Eem3gIPdAp40Tw" type="7004">
1501 <children xmi:type="notation:Node" xmi:id="_5QV24G60Eem3gIPdAp40Tw" type="3010" element="_5P_4oG60Eem3gIPdAp40Tw">
1502 <styles xmi:type="notation:FontStyle" xmi:id="_5QV24W60Eem3gIPdAp40Tw" fontName="Noto Sans" fontHeight="8"/>
1503 <layoutConstraint xmi:type="notation:Location" xmi:id="_5QV24m60Eem3gIPdAp40Tw"/>
1504 </children>
1505 <children xmi:type="notation:Node" xmi:id="_6f0hwG60Eem3gIPdAp40Tw" type="3010" element="_6fjcAG60Eem3gIPdAp40Tw">
1506 <styles xmi:type="notation:FontStyle" xmi:id="_6f0hwW60Eem3gIPdAp40Tw" fontName="Noto Sans" fontHeight="8"/>
1507 <layoutConstraint xmi:type="notation:Location" xmi:id="_6f0hwm60Eem3gIPdAp40Tw"/>
1508 </children>
1509 <children xmi:type="notation:Node" xmi:id="_7SZ1QG60Eem3gIPdAp40Tw" type="3010" element="_7R9JUG60Eem3gIPdAp40Tw">
1510 <styles xmi:type="notation:FontStyle" xmi:id="_7SZ1QW60Eem3gIPdAp40Tw" fontName="Noto Sans" fontHeight="8"/>
1511 <layoutConstraint xmi:type="notation:Location" xmi:id="_7SZ1Qm60Eem3gIPdAp40Tw"/>
1512 </children>
1513 <styles xmi:type="notation:SortingStyle" xmi:id="_2or4IW60Eem3gIPdAp40Tw"/>
1514 <styles xmi:type="notation:FilteringStyle" xmi:id="_2or4Im60Eem3gIPdAp40Tw"/>
1515 </children>
1516 <styles xmi:type="notation:ShapeStyle" xmi:id="_2omYkW60Eem3gIPdAp40Tw" fontName="Noto Sans" fontHeight="8"/>
1517 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_2omYkm60Eem3gIPdAp40Tw" x="990" y="325" width="120" height="100"/>
1518 </children>
1492 <styles xmi:type="notation:DiagramStyle" xmi:id="_rfAxQl0qEemRYLyXht2IrQ"/> 1519 <styles xmi:type="notation:DiagramStyle" xmi:id="_rfAxQl0qEemRYLyXht2IrQ"/>
1493 <edges xmi:type="notation:Edge" xmi:id="_0jV4gF0qEemRYLyXht2IrQ" type="4001" element="_0jIdIF0qEemRYLyXht2IrQ" source="_vlcbIF0qEemRYLyXht2IrQ" target="_tNH44F0qEemRYLyXht2IrQ"> 1520 <edges xmi:type="notation:Edge" xmi:id="_0jV4gF0qEemRYLyXht2IrQ" type="4001" element="_0jIdIF0qEemRYLyXht2IrQ" source="_vlcbIF0qEemRYLyXht2IrQ" target="_tNH44F0qEemRYLyXht2IrQ">
1494 <children xmi:type="notation:Node" xmi:id="_0jXGoF0qEemRYLyXht2IrQ" type="6001"> 1521 <children xmi:type="notation:Node" xmi:id="_0jXGoF0qEemRYLyXht2IrQ" type="6001">
@@ -1506,54 +1533,6 @@
1506 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_0jaxAF0qEemRYLyXht2IrQ" id="(0.410958904109589,0.01)"/> 1533 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_0jaxAF0qEemRYLyXht2IrQ" id="(0.410958904109589,0.01)"/>
1507 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_0jaxAV0qEemRYLyXht2IrQ" id="(0.4548611111111111,0.5)"/> 1534 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_0jaxAV0qEemRYLyXht2IrQ" id="(0.4548611111111111,0.5)"/>
1508 </edges> 1535 </edges>
1509 <edges xmi:type="notation:Edge" xmi:id="_Mr9B0F0sEemRYLyXht2IrQ" type="4001" element="_MruYUF0sEemRYLyXht2IrQ" source="_H1d0AF0sEemRYLyXht2IrQ" target="_Aq3OgF0sEemRYLyXht2IrQ">
1510 <children xmi:type="notation:Node" xmi:id="_Mr9o4F0sEemRYLyXht2IrQ" type="6001">
1511 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Mr9o4V0sEemRYLyXht2IrQ" y="-10"/>
1512 </children>
1513 <children xmi:type="notation:Node" xmi:id="_Mr9o4l0sEemRYLyXht2IrQ" type="6002">
1514 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Mr9o410sEemRYLyXht2IrQ" y="10"/>
1515 </children>
1516 <children xmi:type="notation:Node" xmi:id="_Mr9o5F0sEemRYLyXht2IrQ" type="6003">
1517 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Mr9o5V0sEemRYLyXht2IrQ" y="10"/>
1518 </children>
1519 <styles xmi:type="notation:ConnectorStyle" xmi:id="_Mr9B0V0sEemRYLyXht2IrQ" routing="Tree"/>
1520 <styles xmi:type="notation:FontStyle" xmi:id="_Mr9B0l0sEemRYLyXht2IrQ" fontName="Noto Sans" fontHeight="8"/>
1521 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Mr9B010sEemRYLyXht2IrQ" points="[0, 0, -91, 111]$[91, -111, 0, 0]"/>
1522 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Mr9o5l0sEemRYLyXht2IrQ" id="(0.4406779661016949,0.0)"/>
1523 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Mr9o510sEemRYLyXht2IrQ" id="(0.5,0.5)"/>
1524 </edges>
1525 <edges xmi:type="notation:Edge" xmi:id="_M-rwkF0sEemRYLyXht2IrQ" type="4001" element="_M-gxcF0sEemRYLyXht2IrQ" source="_I4glYF0sEemRYLyXht2IrQ" target="_Aq3OgF0sEemRYLyXht2IrQ">
1526 <children xmi:type="notation:Node" xmi:id="_M-rwlF0sEemRYLyXht2IrQ" type="6001">
1527 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-rwlV0sEemRYLyXht2IrQ" y="-10"/>
1528 </children>
1529 <children xmi:type="notation:Node" xmi:id="_M-rwll0sEemRYLyXht2IrQ" type="6002">
1530 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-rwl10sEemRYLyXht2IrQ" y="10"/>
1531 </children>
1532 <children xmi:type="notation:Node" xmi:id="_M-rwmF0sEemRYLyXht2IrQ" type="6003">
1533 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_M-rwmV0sEemRYLyXht2IrQ" y="10"/>
1534 </children>
1535 <styles xmi:type="notation:ConnectorStyle" xmi:id="_M-rwkV0sEemRYLyXht2IrQ" routing="Tree"/>
1536 <styles xmi:type="notation:FontStyle" xmi:id="_M-rwkl0sEemRYLyXht2IrQ" fontName="Noto Sans" fontHeight="8"/>
1537 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_M-rwk10sEemRYLyXht2IrQ" points="[0, 0, -20, 52]$[20, -52, 0, 0]"/>
1538 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_M-sXoF0sEemRYLyXht2IrQ" id="(0.3305084745762712,0.0)"/>
1539 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_M-sXoV0sEemRYLyXht2IrQ" id="(0.5,0.5)"/>
1540 </edges>
1541 <edges xmi:type="notation:Edge" xmi:id="_NTXAEF0sEemRYLyXht2IrQ" type="4001" element="_NTGhZl0sEemRYLyXht2IrQ" source="_K1IDEF0sEemRYLyXht2IrQ" target="_Aq3OgF0sEemRYLyXht2IrQ">
1542 <children xmi:type="notation:Node" xmi:id="_NTXAFF0sEemRYLyXht2IrQ" type="6001">
1543 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NTXAFV0sEemRYLyXht2IrQ" y="-10"/>
1544 </children>
1545 <children xmi:type="notation:Node" xmi:id="_NTXAFl0sEemRYLyXht2IrQ" type="6002">
1546 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NTXAF10sEemRYLyXht2IrQ" y="10"/>
1547 </children>
1548 <children xmi:type="notation:Node" xmi:id="_NTXnIF0sEemRYLyXht2IrQ" type="6003">
1549 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NTXnIV0sEemRYLyXht2IrQ" y="10"/>
1550 </children>
1551 <styles xmi:type="notation:ConnectorStyle" xmi:id="_NTXAEV0sEemRYLyXht2IrQ" routing="Tree"/>
1552 <styles xmi:type="notation:FontStyle" xmi:id="_NTXAEl0sEemRYLyXht2IrQ" fontName="Noto Sans" fontHeight="8"/>
1553 <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_NTXAE10sEemRYLyXht2IrQ" points="[0, 0, 143, 52]$[-143, -52, 0, 0]"/>
1554 <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NTXnIl0sEemRYLyXht2IrQ" id="(0.3305084745762712,0.0)"/>
1555 <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_NTXnI10sEemRYLyXht2IrQ" id="(0.5,0.5)"/>
1556 </edges>
1557 <edges xmi:type="notation:Edge" xmi:id="_Npck0F0sEemRYLyXht2IrQ" type="4001" element="_NpQ-pl0sEemRYLyXht2IrQ" source="__OldwF0rEemRYLyXht2IrQ" target="_3UIIoF0rEemRYLyXht2IrQ"> 1536 <edges xmi:type="notation:Edge" xmi:id="_Npck0F0sEemRYLyXht2IrQ" type="4001" element="_NpQ-pl0sEemRYLyXht2IrQ" source="__OldwF0rEemRYLyXht2IrQ" target="_3UIIoF0rEemRYLyXht2IrQ">
1558 <children xmi:type="notation:Node" xmi:id="_NpdL4F0sEemRYLyXht2IrQ" type="6001"> 1537 <children xmi:type="notation:Node" xmi:id="_NpdL4F0sEemRYLyXht2IrQ" type="6001">
1559 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NpdL4V0sEemRYLyXht2IrQ" y="-10"/> 1538 <layoutConstraint xmi:type="notation:Bounds" xmi:id="_NpdL4V0sEemRYLyXht2IrQ" y="-10"/>
@@ -1782,86 +1761,25 @@
1782 </ownedStyle> 1761 </ownedStyle>
1783 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> 1762 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
1784 </ownedDiagramElements> 1763 </ownedDiagramElements>
1785 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_AqsPYF0sEemRYLyXht2IrQ" name="Spacecraft" tooltipText="" outgoingEdges="_PEp-k10sEemRYLyXht2IrQ _3GzPll0xEemRYLyXht2IrQ" incomingEdges="_MruYUF0sEemRYLyXht2IrQ _M-gxcF0sEemRYLyXht2IrQ _NTGhZl0sEemRYLyXht2IrQ _PdH6PF0yEemRYLyXht2IrQ" width="12" height="10"> 1764 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_AqsPYF0sEemRYLyXht2IrQ" name="Spacecraft" tooltipText="" outgoingEdges="_PEp-k10sEemRYLyXht2IrQ _3GzPll0xEemRYLyXht2IrQ" incomingEdges="_PdH6PF0yEemRYLyXht2IrQ" width="12" height="10">
1786 <target xmi:type="ecore:EClass" href="satellite.ecore#//Spacecraft"/> 1765 <target xmi:type="ecore:EClass" href="satellite.ecore#//Spacecraft"/>
1787 <semanticElements xmi:type="ecore:EClass" href="satellite.ecore#//Spacecraft"/> 1766 <semanticElements xmi:type="ecore:EClass" href="satellite.ecore#//Spacecraft"/>
1788 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> 1767 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
1789 <arrangeConstraints>KEEP_SIZE</arrangeConstraints> 1768 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
1790 <arrangeConstraints>KEEP_RATIO</arrangeConstraints> 1769 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
1791 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_B6m_I10sEemRYLyXht2IrQ" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="228,228,228"> 1770 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_ApvGVG61Eem3gIPdAp40Tw" iconPath="/org.eclipse.emf.ecoretools.design/icons/full/obj16/EClass_abstract.gif" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="228,228,228">
1792 <labelFormat>italic</labelFormat> 1771 <labelFormat>italic</labelFormat>
1793 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/> 1772 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@conditionnalStyles.1/@style"/>
1794 </ownedStyle> 1773 </ownedStyle>
1795 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/> 1774 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
1796 </ownedDiagramElements> 1775 <ownedElements xmi:type="diagram:DNodeListElement" uid="_-9TZsG60Eem3gIPdAp40Tw" name="kind : SpacecraftKind = CubeSat3U" tooltipText="">
1797 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_H1OjcF0sEemRYLyXht2IrQ" name="CubeSat3U" tooltipText="" outgoingEdges="_MruYUF0sEemRYLyXht2IrQ" width="12" height="10"> 1776 <target xmi:type="ecore:EAttribute" href="satellite.ecore#//Spacecraft/kind"/>
1798 <target xmi:type="ecore:EClass" href="satellite.ecore#//CubeSat3U"/> 1777 <semanticElements xmi:type="ecore:EAttribute" href="satellite.ecore#//Spacecraft/kind"/>
1799 <semanticElements xmi:type="ecore:EClass" href="satellite.ecore#//CubeSat3U"/> 1778 <ownedStyle xmi:type="diagram:BundledImage" uid="_BUQqAW61Eem3gIPdAp40Tw" labelAlignment="LEFT" description="_028-wF0vEemRYLyXht2IrQ">
1800 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints> 1779 <labelFormat>bold</labelFormat>
1801 <arrangeConstraints>KEEP_SIZE</arrangeConstraints> 1780 </ownedStyle>
1802 <arrangeConstraints>KEEP_RATIO</arrangeConstraints> 1781 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@subNodeMappings[name='EC%20EAttribute']"/>
1803 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_H1PKgF0sEemRYLyXht2IrQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216"> 1782 </ownedElements>
1804 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
1805 </ownedStyle>
1806 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
1807 </ownedDiagramElements>
1808 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_I4Si8F0sEemRYLyXht2IrQ" name="CubeSat6U" tooltipText="" outgoingEdges="_M-gxcF0sEemRYLyXht2IrQ" width="12" height="10">
1809 <target xmi:type="ecore:EClass" href="satellite.ecore#//CubeSat6U"/>
1810 <semanticElements xmi:type="ecore:EClass" href="satellite.ecore#//CubeSat6U"/>
1811 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
1812 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
1813 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
1814 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_I4TxEF0sEemRYLyXht2IrQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
1815 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
1816 </ownedStyle>
1817 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
1818 </ownedDiagramElements>
1819 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_K04LcF0sEemRYLyXht2IrQ" name="SmallSat" tooltipText="" outgoingEdges="_NTGhZl0sEemRYLyXht2IrQ" width="12" height="10">
1820 <target xmi:type="ecore:EClass" href="satellite.ecore#//SmallSat"/>
1821 <semanticElements xmi:type="ecore:EClass" href="satellite.ecore#//SmallSat"/>
1822 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
1823 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
1824 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
1825 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_K04ygF0sEemRYLyXht2IrQ" borderSize="1" borderSizeComputationExpression="1" backgroundStyle="Liquid" foregroundColor="255,252,216">
1826 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']/@style"/>
1827 </ownedStyle>
1828 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EClass']"/>
1829 </ownedDiagramElements>
1830 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_MruYUF0sEemRYLyXht2IrQ" sourceNode="_H1OjcF0sEemRYLyXht2IrQ" targetNode="_AqsPYF0sEemRYLyXht2IrQ">
1831 <target xmi:type="ecore:EClass" href="satellite.ecore#//CubeSat3U"/>
1832 <semanticElements xmi:type="ecore:EClass" href="satellite.ecore#//CubeSat3U"/>
1833 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_Mru_YF0sEemRYLyXht2IrQ" targetArrow="InputClosedArrow" routingStyle="tree">
1834 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
1835 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_Mru_YV0sEemRYLyXht2IrQ" showIcon="false">
1836 <labelFormat>italic</labelFormat>
1837 </beginLabelStyle>
1838 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_Mru_Yl0sEemRYLyXht2IrQ" showIcon="false"/>
1839 </ownedStyle>
1840 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
1841 </ownedDiagramElements>
1842 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_M-gxcF0sEemRYLyXht2IrQ" sourceNode="_I4Si8F0sEemRYLyXht2IrQ" targetNode="_AqsPYF0sEemRYLyXht2IrQ">
1843 <target xmi:type="ecore:EClass" href="satellite.ecore#//CubeSat6U"/>
1844 <semanticElements xmi:type="ecore:EClass" href="satellite.ecore#//CubeSat6U"/>
1845 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_M-hYgF0sEemRYLyXht2IrQ" targetArrow="InputClosedArrow" routingStyle="tree">
1846 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
1847 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_M-hYgV0sEemRYLyXht2IrQ" showIcon="false">
1848 <labelFormat>italic</labelFormat>
1849 </beginLabelStyle>
1850 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_M-hYgl0sEemRYLyXht2IrQ" showIcon="false"/>
1851 </ownedStyle>
1852 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
1853 </ownedDiagramElements>
1854 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_NTGhZl0sEemRYLyXht2IrQ" sourceNode="_K04LcF0sEemRYLyXht2IrQ" targetNode="_AqsPYF0sEemRYLyXht2IrQ">
1855 <target xmi:type="ecore:EClass" href="satellite.ecore#//SmallSat"/>
1856 <semanticElements xmi:type="ecore:EClass" href="satellite.ecore#//SmallSat"/>
1857 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_NTIWkF0sEemRYLyXht2IrQ" targetArrow="InputClosedArrow" routingStyle="tree">
1858 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
1859 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_NTIWkV0sEemRYLyXht2IrQ" showIcon="false">
1860 <labelFormat>italic</labelFormat>
1861 </beginLabelStyle>
1862 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_NTIWkl0sEemRYLyXht2IrQ" showIcon="false"/>
1863 </ownedStyle>
1864 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
1865 </ownedDiagramElements> 1783 </ownedDiagramElements>
1866 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_NpQ-pl0sEemRYLyXht2IrQ" sourceNode="__OYCYF0rEemRYLyXht2IrQ" targetNode="_3T7UUF0rEemRYLyXht2IrQ"> 1784 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_NpQ-pl0sEemRYLyXht2IrQ" sourceNode="__OYCYF0rEemRYLyXht2IrQ" targetNode="_3T7UUF0rEemRYLyXht2IrQ">
1867 <target xmi:type="ecore:EClass" href="satellite.ecore#//GroundStationNetwork"/> 1785 <target xmi:type="ecore:EClass" href="satellite.ecore#//GroundStationNetwork"/>
@@ -1878,12 +1796,12 @@
1878 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_PEp-k10sEemRYLyXht2IrQ" sourceNode="_AqsPYF0sEemRYLyXht2IrQ" targetNode="_3T7UUF0rEemRYLyXht2IrQ"> 1796 <ownedDiagramElements xmi:type="diagram:DEdge" uid="_PEp-k10sEemRYLyXht2IrQ" sourceNode="_AqsPYF0sEemRYLyXht2IrQ" targetNode="_3T7UUF0rEemRYLyXht2IrQ">
1879 <target xmi:type="ecore:EClass" href="satellite.ecore#//Spacecraft"/> 1797 <target xmi:type="ecore:EClass" href="satellite.ecore#//Spacecraft"/>
1880 <semanticElements xmi:type="ecore:EClass" href="satellite.ecore#//Spacecraft"/> 1798 <semanticElements xmi:type="ecore:EClass" href="satellite.ecore#//Spacecraft"/>
1881 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_PEqloF0sEemRYLyXht2IrQ" targetArrow="InputClosedArrow" routingStyle="tree"> 1799 <ownedStyle xmi:type="diagram:EdgeStyle" uid="_Ap43UG61Eem3gIPdAp40Tw" targetArrow="InputClosedArrow" routingStyle="tree">
1882 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/> 1800 <description xmi:type="style:EdgeStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']/@style"/>
1883 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_PEqloV0sEemRYLyXht2IrQ" showIcon="false"> 1801 <beginLabelStyle xmi:type="diagram:BeginLabelStyle" uid="_Ap43UW61Eem3gIPdAp40Tw" showIcon="false">
1884 <labelFormat>italic</labelFormat> 1802 <labelFormat>italic</labelFormat>
1885 </beginLabelStyle> 1803 </beginLabelStyle>
1886 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_PEqlol0sEemRYLyXht2IrQ" showIcon="false"/> 1804 <centerLabelStyle xmi:type="diagram:CenterLabelStyle" uid="_Ap43Um61Eem3gIPdAp40Tw" showIcon="false"/>
1887 </ownedStyle> 1805 </ownedStyle>
1888 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/> 1806 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC%20ESupertypes']"/>
1889 </ownedDiagramElements> 1807 </ownedDiagramElements>
@@ -2111,6 +2029,41 @@
2111 </ownedStyle> 2029 </ownedStyle>
2112 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/> 2030 <actualMapping xmi:type="description_1:EdgeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@edgeMappings[name='EC_EReference']"/>
2113 </ownedDiagramElements> 2031 </ownedDiagramElements>
2032 <ownedDiagramElements xmi:type="diagram:DNodeList" uid="_2oBw0G60Eem3gIPdAp40Tw" name="SpacecraftKind" tooltipText="" width="12" height="10">
2033 <target xmi:type="ecore:EEnum" href="satellite.ecore#//SpacecraftKind"/>
2034 <semanticElements xmi:type="ecore:EEnum" href="satellite.ecore#//SpacecraftKind"/>
2035 <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
2036 <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
2037 <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
2038 <ownedStyle xmi:type="diagram:FlatContainerStyle" uid="_2oC-8G60Eem3gIPdAp40Tw" borderSize="1" borderSizeComputationExpression="1" borderColor="125,125,125" backgroundStyle="Liquid" foregroundColor="221,236,202">
2039 <description xmi:type="style:FlatContainerStyleDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@style"/>
2040 </ownedStyle>
2041 <actualMapping xmi:type="description_1:ContainerMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']"/>
2042 <ownedElements xmi:type="diagram:DNodeListElement" uid="_5P_4oG60Eem3gIPdAp40Tw" name="CubeSat3U" tooltipText="">
2043 <target xmi:type="ecore:EEnumLiteral" href="satellite.ecore#//SpacecraftKind/CubeSat3U"/>
2044 <semanticElements xmi:type="ecore:EEnumLiteral" href="satellite.ecore#//SpacecraftKind/CubeSat3U"/>
2045 <ownedStyle xmi:type="diagram:BundledImage" uid="_5QAfsG60Eem3gIPdAp40Tw" labelAlignment="LEFT">
2046 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
2047 </ownedStyle>
2048 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
2049 </ownedElements>
2050 <ownedElements xmi:type="diagram:DNodeListElement" uid="_6fjcAG60Eem3gIPdAp40Tw" name="SubeSat6U" tooltipText="">
2051 <target xmi:type="ecore:EEnumLiteral" href="satellite.ecore#//SpacecraftKind/SubeSat6U"/>
2052 <semanticElements xmi:type="ecore:EEnumLiteral" href="satellite.ecore#//SpacecraftKind/SubeSat6U"/>
2053 <ownedStyle xmi:type="diagram:BundledImage" uid="_6fjcAW60Eem3gIPdAp40Tw" labelAlignment="LEFT">
2054 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
2055 </ownedStyle>
2056 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
2057 </ownedElements>
2058 <ownedElements xmi:type="diagram:DNodeListElement" uid="_7R9JUG60Eem3gIPdAp40Tw" name="SmallSat" tooltipText="">
2059 <target xmi:type="ecore:EEnumLiteral" href="satellite.ecore#//SpacecraftKind/SmallSat"/>
2060 <semanticElements xmi:type="ecore:EEnumLiteral" href="satellite.ecore#//SpacecraftKind/SmallSat"/>
2061 <ownedStyle xmi:type="diagram:BundledImage" uid="_7R-XcG60Eem3gIPdAp40Tw" labelAlignment="LEFT">
2062 <description xmi:type="style:BundledImageDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']/@style"/>
2063 </ownedStyle>
2064 <actualMapping xmi:type="description_1:NodeMapping" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer/@containerMappings[name='EC%20EEnum']/@subNodeMappings[name='EC%20EEnumLiteral']"/>
2065 </ownedElements>
2066 </ownedDiagramElements>
2114 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/> 2067 <description xmi:type="description_1:DiagramDescription" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']"/>
2115 <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_reoWwF0qEemRYLyXht2IrQ"/> 2068 <filterVariableHistory xmi:type="diagram:FilterVariableHistory" uid="_reoWwF0qEemRYLyXht2IrQ"/>
2116 <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/> 2069 <activatedLayers xmi:type="description_1:Layer" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']/@ownedRepresentations[name='Entities']/@defaultLayer"/>
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 d439fe23..99766ab7 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
@@ -21,10 +21,8 @@
21 <eClassifiers xsi:type="ecore:EClass" name="Spacecraft" abstract="true" eSuperTypes="#//CommunicatingElement"> 21 <eClassifiers xsi:type="ecore:EClass" name="Spacecraft" abstract="true" eSuperTypes="#//CommunicatingElement">
22 <eStructuralFeatures xsi:type="ecore:EReference" name="payload" eType="#//Payload" 22 <eStructuralFeatures xsi:type="ecore:EReference" name="payload" eType="#//Payload"
23 containment="true"/> 23 containment="true"/>
24 <eStructuralFeatures xsi:type="ecore:EAttribute" name="kind" lowerBound="1" eType="#//SpacecraftKind"/>
24 </eClassifiers> 25 </eClassifiers>
25 <eClassifiers xsi:type="ecore:EClass" name="CubeSat3U" eSuperTypes="#//Spacecraft"/>
26 <eClassifiers xsi:type="ecore:EClass" name="CubeSat6U" eSuperTypes="#//Spacecraft"/>
27 <eClassifiers xsi:type="ecore:EClass" name="SmallSat" eSuperTypes="#//Spacecraft"/>
28 <eClassifiers xsi:type="ecore:EClass" name="CommSubsystem"> 26 <eClassifiers xsi:type="ecore:EClass" name="CommSubsystem">
29 <eStructuralFeatures xsi:type="ecore:EAttribute" name="band" lowerBound="1" eType="#//TransceiverBand"/> 27 <eStructuralFeatures xsi:type="ecore:EAttribute" name="band" lowerBound="1" eType="#//TransceiverBand"/>
30 <eStructuralFeatures xsi:type="ecore:EAttribute" name="gain" lowerBound="1" eType="#//AntennaGain"/> 28 <eStructuralFeatures xsi:type="ecore:EAttribute" name="gain" lowerBound="1" eType="#//AntennaGain"/>
@@ -47,4 +45,9 @@
47 </eClassifiers> 45 </eClassifiers>
48 <eClassifiers xsi:type="ecore:EClass" name="Payload" abstract="true"/> 46 <eClassifiers xsi:type="ecore:EClass" name="Payload" abstract="true"/>
49 <eClassifiers xsi:type="ecore:EClass" name="InterferometryPayload" eSuperTypes="#//Payload"/> 47 <eClassifiers xsi:type="ecore:EClass" name="InterferometryPayload" eSuperTypes="#//Payload"/>
48 <eClassifiers xsi:type="ecore:EEnum" name="SpacecraftKind">
49 <eLiterals name="CubeSat3U"/>
50 <eLiterals name="CubeSat6U" value="1"/>
51 <eLiterals name="SmallSat" value="2"/>
52 </eClassifiers>
50</ecore:EPackage> 53</ecore:EPackage>
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 a90d5b26..61a4104a 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
@@ -22,6 +22,11 @@
22 <genEnumLiterals ecoreEnumLiteral="satellite.ecore#//AntennaGain/MEDIUM"/> 22 <genEnumLiterals ecoreEnumLiteral="satellite.ecore#//AntennaGain/MEDIUM"/>
23 <genEnumLiterals ecoreEnumLiteral="satellite.ecore#//AntennaGain/HIGH"/> 23 <genEnumLiterals ecoreEnumLiteral="satellite.ecore#//AntennaGain/HIGH"/>
24 </genEnums> 24 </genEnums>
25 <genEnums typeSafeEnumCompatible="false" ecoreEnum="satellite.ecore#//SpacecraftKind">
26 <genEnumLiterals ecoreEnumLiteral="satellite.ecore#//SpacecraftKind/CubeSat3U"/>
27 <genEnumLiterals ecoreEnumLiteral="satellite.ecore#//SpacecraftKind/CubeSat6U"/>
28 <genEnumLiterals ecoreEnumLiteral="satellite.ecore#//SpacecraftKind/SmallSat"/>
29 </genEnums>
25 <genClasses ecoreClass="satellite.ecore#//ConstellationMission"> 30 <genClasses ecoreClass="satellite.ecore#//ConstellationMission">
26 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//ConstellationMission/groundStationNetwork"/> 31 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//ConstellationMission/groundStationNetwork"/>
27 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//ConstellationMission/spacecraft"/> 32 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//ConstellationMission/spacecraft"/>
@@ -36,10 +41,8 @@
36 <genClasses ecoreClass="satellite.ecore#//GroundStationNetwork"/> 41 <genClasses ecoreClass="satellite.ecore#//GroundStationNetwork"/>
37 <genClasses ecoreClass="satellite.ecore#//Spacecraft"> 42 <genClasses ecoreClass="satellite.ecore#//Spacecraft">
38 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//Spacecraft/payload"/> 43 <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference satellite.ecore#//Spacecraft/payload"/>
44 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute satellite.ecore#//Spacecraft/kind"/>
39 </genClasses> 45 </genClasses>
40 <genClasses ecoreClass="satellite.ecore#//CubeSat3U"/>
41 <genClasses ecoreClass="satellite.ecore#//CubeSat6U"/>
42 <genClasses ecoreClass="satellite.ecore#//SmallSat"/>
43 <genClasses ecoreClass="satellite.ecore#//CommSubsystem"> 46 <genClasses ecoreClass="satellite.ecore#//CommSubsystem">
44 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute satellite.ecore#//CommSubsystem/band"/> 47 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute satellite.ecore#//CommSubsystem/band"/>
45 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute satellite.ecore#//CommSubsystem/gain"/> 48 <genFeatures createChild="false" ecoreFeature="ecore:EAttribute satellite.ecore#//CommSubsystem/gain"/>
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 3f4b1691..0cdd345c 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml
@@ -17,6 +17,9 @@
17 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.kaAntennaGainLow"/> 17 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.kaAntennaGainLow"/>
18 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.threeUCubeSatWithNonUhfCrossLink"/> 18 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.threeUCubeSatWithNonUhfCrossLink"/>
19 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.cubeSatWithKaAntenna"/> 19 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.cubeSatWithKaAntenna"/>
20 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.coverageMetric"/>
21 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.timeMetric"/>
22 <query-specification fqn="hu.bme.mit.inf.dslreasoner.domains.satellite.queries.costMetric"/>
20 </group> 23 </group>
21 </extension> 24 </extension>
22</plugin> 25</plugin>
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/metrics/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/metrics/.gitignore
new file mode 100644
index 00000000..3e7cd5e2
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/metrics/.gitignore
@@ -0,0 +1,2 @@
1/.CoverageMetric.java._trace
2/.SatelliteMetrics.java._trace
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/metrics/internal/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/metrics/internal/.gitignore
new file mode 100644
index 00000000..d3195cfc
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/metrics/internal/.gitignore
@@ -0,0 +1,2 @@
1/.MissionCoverage.java._trace
2/.SatelliteMetricsAll.java._trace
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 29459700..5f0d5b4b 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
@@ -14,3 +14,9 @@
14/.CubeSatWithKaAntenna.java._trace 14/.CubeSatWithKaAntenna.java._trace
15/.ThreeUCubeSatWithNonUhfCrossLink.java._trace 15/.ThreeUCubeSatWithNonUhfCrossLink.java._trace
16/.CommunicationLinkDoesNotStartAtContainingElement.java._trace 16/.CommunicationLinkDoesNotStartAtContainingElement.java._trace
17/.SpacecraftWithInterferometryPayload.java._trace
18/.SatelliteMetrics.java._trace
19/.CoverageMetric.java._trace
20/.TimeMetric.java._trace
21/.CostMetric.java._trace
22/.SpacecraftCost.java._trace
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CostMetric.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CostMetric.java
new file mode 100644
index 00000000..474719b2
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CostMetric.java
@@ -0,0 +1,544 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCost;
7import java.util.Arrays;
8import java.util.Collection;
9import java.util.LinkedHashSet;
10import java.util.List;
11import java.util.Objects;
12import java.util.Optional;
13import java.util.Set;
14import java.util.function.Consumer;
15import java.util.stream.Collectors;
16import java.util.stream.Stream;
17import org.apache.log4j.Logger;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.matchers.aggregators.sum;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
29import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.AggregatorConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
34import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
37import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
38import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
39import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
40
41/**
42 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
43 *
44 * <p>Original source:
45 * <code><pre>
46 * // Cost
47 *
48 * pattern costMetric(Cost : java Double) {
49 * Cost == sum find missionCost(_, #_);
50 * }
51 * </pre></code>
52 *
53 * @see Matcher
54 * @see Match
55 *
56 */
57@SuppressWarnings("all")
58public final class CostMetric extends BaseGeneratedEMFQuerySpecification<CostMetric.Matcher> {
59 /**
60 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.costMetric pattern,
61 * to be used in conjunction with {@link Matcher}.
62 *
63 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
64 * Each instance is a (possibly partial) substitution of pattern parameters,
65 * usable to represent a match of the pattern in the result of a query,
66 * or to specify the bound (fixed) input parameters when issuing a query.
67 *
68 * @see Matcher
69 *
70 */
71 public static abstract class Match extends BasePatternMatch {
72 private Double fCost;
73
74 private static List<String> parameterNames = makeImmutableList("Cost");
75
76 private Match(final Double pCost) {
77 this.fCost = pCost;
78 }
79
80 @Override
81 public Object get(final String parameterName) {
82 if ("Cost".equals(parameterName)) return this.fCost;
83 return null;
84 }
85
86 public Double getCost() {
87 return this.fCost;
88 }
89
90 @Override
91 public boolean set(final String parameterName, final Object newValue) {
92 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
93 if ("Cost".equals(parameterName) ) {
94 this.fCost = (Double) newValue;
95 return true;
96 }
97 return false;
98 }
99
100 public void setCost(final Double pCost) {
101 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
102 this.fCost = pCost;
103 }
104
105 @Override
106 public String patternName() {
107 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.costMetric";
108 }
109
110 @Override
111 public List<String> parameterNames() {
112 return CostMetric.Match.parameterNames;
113 }
114
115 @Override
116 public Object[] toArray() {
117 return new Object[]{fCost};
118 }
119
120 @Override
121 public CostMetric.Match toImmutable() {
122 return isMutable() ? newMatch(fCost) : this;
123 }
124
125 @Override
126 public String prettyPrint() {
127 StringBuilder result = new StringBuilder();
128 result.append("\"Cost\"=" + prettyPrintValue(fCost));
129 return result.toString();
130 }
131
132 @Override
133 public int hashCode() {
134 return Objects.hash(fCost);
135 }
136
137 @Override
138 public boolean equals(final Object obj) {
139 if (this == obj)
140 return true;
141 if (obj == null) {
142 return false;
143 }
144 if ((obj instanceof CostMetric.Match)) {
145 CostMetric.Match other = (CostMetric.Match) obj;
146 return Objects.equals(fCost, other.fCost);
147 } else {
148 // this should be infrequent
149 if (!(obj instanceof IPatternMatch)) {
150 return false;
151 }
152 IPatternMatch otherSig = (IPatternMatch) obj;
153 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
154 }
155 }
156
157 @Override
158 public CostMetric specification() {
159 return CostMetric.instance();
160 }
161
162 /**
163 * Returns an empty, mutable match.
164 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
165 *
166 * @return the empty match.
167 *
168 */
169 public static CostMetric.Match newEmptyMatch() {
170 return new Mutable(null);
171 }
172
173 /**
174 * Returns a mutable (partial) match.
175 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
176 *
177 * @param pCost the fixed value of pattern parameter Cost, or null if not bound.
178 * @return the new, mutable (partial) match object.
179 *
180 */
181 public static CostMetric.Match newMutableMatch(final Double pCost) {
182 return new Mutable(pCost);
183 }
184
185 /**
186 * Returns a new (partial) match.
187 * This can be used e.g. to call the matcher with a partial match.
188 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
189 * @param pCost the fixed value of pattern parameter Cost, or null if not bound.
190 * @return the (partial) match object.
191 *
192 */
193 public static CostMetric.Match newMatch(final Double pCost) {
194 return new Immutable(pCost);
195 }
196
197 private static final class Mutable extends CostMetric.Match {
198 Mutable(final Double pCost) {
199 super(pCost);
200 }
201
202 @Override
203 public boolean isMutable() {
204 return true;
205 }
206 }
207
208 private static final class Immutable extends CostMetric.Match {
209 Immutable(final Double pCost) {
210 super(pCost);
211 }
212
213 @Override
214 public boolean isMutable() {
215 return false;
216 }
217 }
218 }
219
220 /**
221 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.costMetric pattern,
222 * providing pattern-specific query methods.
223 *
224 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
225 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
226 *
227 * <p>Matches of the pattern will be represented as {@link Match}.
228 *
229 * <p>Original source:
230 * <code><pre>
231 * // Cost
232 *
233 * pattern costMetric(Cost : java Double) {
234 * Cost == sum find missionCost(_, #_);
235 * }
236 * </pre></code>
237 *
238 * @see Match
239 * @see CostMetric
240 *
241 */
242 public static class Matcher extends BaseMatcher<CostMetric.Match> {
243 /**
244 * Initializes the pattern matcher within an existing VIATRA Query engine.
245 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
246 *
247 * @param engine the existing VIATRA Query engine in which this matcher will be created.
248 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
249 *
250 */
251 public static CostMetric.Matcher on(final ViatraQueryEngine engine) {
252 // check if matcher already exists
253 Matcher matcher = engine.getExistingMatcher(querySpecification());
254 if (matcher == null) {
255 matcher = (Matcher)engine.getMatcher(querySpecification());
256 }
257 return matcher;
258 }
259
260 /**
261 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
262 * @return an initialized matcher
263 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
264 *
265 */
266 public static CostMetric.Matcher create() {
267 return new Matcher();
268 }
269
270 private static final int POSITION_COST = 0;
271
272 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(CostMetric.Matcher.class);
273
274 /**
275 * Initializes the pattern matcher within an existing VIATRA Query engine.
276 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
277 *
278 * @param engine the existing VIATRA Query engine in which this matcher will be created.
279 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
280 *
281 */
282 private Matcher() {
283 super(querySpecification());
284 }
285
286 /**
287 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
288 * @param pCost the fixed value of pattern parameter Cost, or null if not bound.
289 * @return matches represented as a Match object.
290 *
291 */
292 public Collection<CostMetric.Match> getAllMatches(final Double pCost) {
293 return rawStreamAllMatches(new Object[]{pCost}).collect(Collectors.toSet());
294 }
295
296 /**
297 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
298 * </p>
299 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
300 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
301 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
302 * @param pCost the fixed value of pattern parameter Cost, or null if not bound.
303 * @return a stream of matches represented as a Match object.
304 *
305 */
306 public Stream<CostMetric.Match> streamAllMatches(final Double pCost) {
307 return rawStreamAllMatches(new Object[]{pCost});
308 }
309
310 /**
311 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
312 * Neither determinism nor randomness of selection is guaranteed.
313 * @param pCost the fixed value of pattern parameter Cost, or null if not bound.
314 * @return a match represented as a Match object, or null if no match is found.
315 *
316 */
317 public Optional<CostMetric.Match> getOneArbitraryMatch(final Double pCost) {
318 return rawGetOneArbitraryMatch(new Object[]{pCost});
319 }
320
321 /**
322 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
323 * under any possible substitution of the unspecified parameters (if any).
324 * @param pCost the fixed value of pattern parameter Cost, or null if not bound.
325 * @return true if the input is a valid (partial) match of the pattern.
326 *
327 */
328 public boolean hasMatch(final Double pCost) {
329 return rawHasMatch(new Object[]{pCost});
330 }
331
332 /**
333 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
334 * @param pCost the fixed value of pattern parameter Cost, or null if not bound.
335 * @return the number of pattern matches found.
336 *
337 */
338 public int countMatches(final Double pCost) {
339 return rawCountMatches(new Object[]{pCost});
340 }
341
342 /**
343 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
344 * Neither determinism nor randomness of selection is guaranteed.
345 * @param pCost the fixed value of pattern parameter Cost, or null if not bound.
346 * @param processor the action that will process the selected match.
347 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
348 *
349 */
350 public boolean forOneArbitraryMatch(final Double pCost, final Consumer<? super CostMetric.Match> processor) {
351 return rawForOneArbitraryMatch(new Object[]{pCost}, processor);
352 }
353
354 /**
355 * Returns a new (partial) match.
356 * This can be used e.g. to call the matcher with a partial match.
357 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
358 * @param pCost the fixed value of pattern parameter Cost, or null if not bound.
359 * @return the (partial) match object.
360 *
361 */
362 public CostMetric.Match newMatch(final Double pCost) {
363 return CostMetric.Match.newMatch(pCost);
364 }
365
366 /**
367 * Retrieve the set of values that occur in matches for Cost.
368 * @return the Set of all values or empty set if there are no matches
369 *
370 */
371 protected Stream<Double> rawStreamAllValuesOfCost(final Object[] parameters) {
372 return rawStreamAllValues(POSITION_COST, parameters).map(Double.class::cast);
373 }
374
375 /**
376 * Retrieve the set of values that occur in matches for Cost.
377 * @return the Set of all values or empty set if there are no matches
378 *
379 */
380 public Set<Double> getAllValuesOfCost() {
381 return rawStreamAllValuesOfCost(emptyArray()).collect(Collectors.toSet());
382 }
383
384 /**
385 * Retrieve the set of values that occur in matches for Cost.
386 * @return the Set of all values or empty set if there are no matches
387 *
388 */
389 public Stream<Double> streamAllValuesOfCost() {
390 return rawStreamAllValuesOfCost(emptyArray());
391 }
392
393 @Override
394 protected CostMetric.Match tupleToMatch(final Tuple t) {
395 try {
396 return CostMetric.Match.newMatch((Double) t.get(POSITION_COST));
397 } catch(ClassCastException e) {
398 LOGGER.error("Element(s) in tuple not properly typed!",e);
399 return null;
400 }
401 }
402
403 @Override
404 protected CostMetric.Match arrayToMatch(final Object[] match) {
405 try {
406 return CostMetric.Match.newMatch((Double) match[POSITION_COST]);
407 } catch(ClassCastException e) {
408 LOGGER.error("Element(s) in array not properly typed!",e);
409 return null;
410 }
411 }
412
413 @Override
414 protected CostMetric.Match arrayToMatchMutable(final Object[] match) {
415 try {
416 return CostMetric.Match.newMutableMatch((Double) match[POSITION_COST]);
417 } catch(ClassCastException e) {
418 LOGGER.error("Element(s) in array not properly typed!",e);
419 return null;
420 }
421 }
422
423 /**
424 * @return the singleton instance of the query specification of this pattern
425 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
426 *
427 */
428 public static IQuerySpecification<CostMetric.Matcher> querySpecification() {
429 return CostMetric.instance();
430 }
431 }
432
433 private CostMetric() {
434 super(GeneratedPQuery.INSTANCE);
435 }
436
437 /**
438 * @return the singleton instance of the query specification
439 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
440 *
441 */
442 public static CostMetric instance() {
443 try{
444 return LazyHolder.INSTANCE;
445 } catch (ExceptionInInitializerError err) {
446 throw processInitializerError(err);
447 }
448 }
449
450 @Override
451 protected CostMetric.Matcher instantiate(final ViatraQueryEngine engine) {
452 return CostMetric.Matcher.on(engine);
453 }
454
455 @Override
456 public CostMetric.Matcher instantiate() {
457 return CostMetric.Matcher.create();
458 }
459
460 @Override
461 public CostMetric.Match newEmptyMatch() {
462 return CostMetric.Match.newEmptyMatch();
463 }
464
465 @Override
466 public CostMetric.Match newMatch(final Object... parameters) {
467 return CostMetric.Match.newMatch((java.lang.Double) parameters[0]);
468 }
469
470 /**
471 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric (visibility: PUBLIC, simpleName: CostMetric, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
472 * <b>not</b> at the class load time of the outer class,
473 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric (visibility: PUBLIC, simpleName: CostMetric, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
474 *
475 * <p> This workaround is required e.g. to support recursion.
476 *
477 */
478 private static class LazyHolder {
479 private static final CostMetric INSTANCE = new CostMetric();
480
481 /**
482 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
483 * This initialization order is required to support indirect recursion.
484 *
485 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
486 *
487 */
488 private static final Object STATIC_INITIALIZER = ensureInitialized();
489
490 public static Object ensureInitialized() {
491 INSTANCE.ensureInitializedInternal();
492 return null;
493 }
494 }
495
496 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
497 private static final CostMetric.GeneratedPQuery INSTANCE = new GeneratedPQuery();
498
499 private final PParameter parameter_Cost = new PParameter("Cost", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
500
501 private final List<PParameter> parameters = Arrays.asList(parameter_Cost);
502
503 private GeneratedPQuery() {
504 super(PVisibility.PUBLIC);
505 }
506
507 @Override
508 public String getFullyQualifiedName() {
509 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.costMetric";
510 }
511
512 @Override
513 public List<String> getParameterNames() {
514 return Arrays.asList("Cost");
515 }
516
517 @Override
518 public List<PParameter> getParameters() {
519 return parameters;
520 }
521
522 @Override
523 public Set<PBody> doGetContainedBodies() {
524 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
525 Set<PBody> bodies = new LinkedHashSet<>();
526 {
527 PBody body = new PBody(this);
528 PVariable var_Cost = body.getOrCreateVariableByName("Cost");
529 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
530 PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
531 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Cost), new JavaTransitiveInstancesKey(java.lang.Double.class));
532 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
533 new ExportedParameter(body, var_Cost, parameter_Cost)
534 ));
535 // Cost == sum find missionCost(_, #_)
536 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
537 new AggregatorConstraint(new sum().getAggregatorLogic(Double.class), body, Tuples.flatTupleOf(var___0_, var___1_), MissionCost.instance().getInternalQueryRepresentation(), var__virtual_0_, 1);
538 new Equality(body, var_Cost, var__virtual_0_);
539 bodies.add(body);
540 }
541 return bodies;
542 }
543 }
544}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CoverageMetric.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CoverageMetric.java
new file mode 100644
index 00000000..23b02ce4
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/CoverageMetric.java
@@ -0,0 +1,552 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCoverage;
7import java.util.Arrays;
8import java.util.Collection;
9import java.util.LinkedHashSet;
10import java.util.List;
11import java.util.Objects;
12import java.util.Optional;
13import java.util.Set;
14import java.util.function.Consumer;
15import java.util.stream.Collectors;
16import java.util.stream.Stream;
17import org.apache.log4j.Logger;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.matchers.aggregators.sum;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
29import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.AggregatorConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
34import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
37import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
38import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
39import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
40
41/**
42 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
43 *
44 * <p>Original source:
45 * <code><pre>
46 * //
47 * // Metrics
48 * //
49 *
50 * // Coverage
51 *
52 * pattern coverageMetric(Coverage : java Double) {
53 * Coverage == sum find missionCoverage(_, #_);
54 * }
55 * </pre></code>
56 *
57 * @see Matcher
58 * @see Match
59 *
60 */
61@SuppressWarnings("all")
62public final class CoverageMetric extends BaseGeneratedEMFQuerySpecification<CoverageMetric.Matcher> {
63 /**
64 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.coverageMetric pattern,
65 * to be used in conjunction with {@link Matcher}.
66 *
67 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
68 * Each instance is a (possibly partial) substitution of pattern parameters,
69 * usable to represent a match of the pattern in the result of a query,
70 * or to specify the bound (fixed) input parameters when issuing a query.
71 *
72 * @see Matcher
73 *
74 */
75 public static abstract class Match extends BasePatternMatch {
76 private Double fCoverage;
77
78 private static List<String> parameterNames = makeImmutableList("Coverage");
79
80 private Match(final Double pCoverage) {
81 this.fCoverage = pCoverage;
82 }
83
84 @Override
85 public Object get(final String parameterName) {
86 if ("Coverage".equals(parameterName)) return this.fCoverage;
87 return null;
88 }
89
90 public Double getCoverage() {
91 return this.fCoverage;
92 }
93
94 @Override
95 public boolean set(final String parameterName, final Object newValue) {
96 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
97 if ("Coverage".equals(parameterName) ) {
98 this.fCoverage = (Double) newValue;
99 return true;
100 }
101 return false;
102 }
103
104 public void setCoverage(final Double pCoverage) {
105 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
106 this.fCoverage = pCoverage;
107 }
108
109 @Override
110 public String patternName() {
111 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.coverageMetric";
112 }
113
114 @Override
115 public List<String> parameterNames() {
116 return CoverageMetric.Match.parameterNames;
117 }
118
119 @Override
120 public Object[] toArray() {
121 return new Object[]{fCoverage};
122 }
123
124 @Override
125 public CoverageMetric.Match toImmutable() {
126 return isMutable() ? newMatch(fCoverage) : this;
127 }
128
129 @Override
130 public String prettyPrint() {
131 StringBuilder result = new StringBuilder();
132 result.append("\"Coverage\"=" + prettyPrintValue(fCoverage));
133 return result.toString();
134 }
135
136 @Override
137 public int hashCode() {
138 return Objects.hash(fCoverage);
139 }
140
141 @Override
142 public boolean equals(final Object obj) {
143 if (this == obj)
144 return true;
145 if (obj == null) {
146 return false;
147 }
148 if ((obj instanceof CoverageMetric.Match)) {
149 CoverageMetric.Match other = (CoverageMetric.Match) obj;
150 return Objects.equals(fCoverage, other.fCoverage);
151 } else {
152 // this should be infrequent
153 if (!(obj instanceof IPatternMatch)) {
154 return false;
155 }
156 IPatternMatch otherSig = (IPatternMatch) obj;
157 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
158 }
159 }
160
161 @Override
162 public CoverageMetric specification() {
163 return CoverageMetric.instance();
164 }
165
166 /**
167 * Returns an empty, mutable match.
168 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
169 *
170 * @return the empty match.
171 *
172 */
173 public static CoverageMetric.Match newEmptyMatch() {
174 return new Mutable(null);
175 }
176
177 /**
178 * Returns a mutable (partial) match.
179 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
180 *
181 * @param pCoverage the fixed value of pattern parameter Coverage, or null if not bound.
182 * @return the new, mutable (partial) match object.
183 *
184 */
185 public static CoverageMetric.Match newMutableMatch(final Double pCoverage) {
186 return new Mutable(pCoverage);
187 }
188
189 /**
190 * Returns a new (partial) match.
191 * This can be used e.g. to call the matcher with a partial match.
192 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
193 * @param pCoverage the fixed value of pattern parameter Coverage, or null if not bound.
194 * @return the (partial) match object.
195 *
196 */
197 public static CoverageMetric.Match newMatch(final Double pCoverage) {
198 return new Immutable(pCoverage);
199 }
200
201 private static final class Mutable extends CoverageMetric.Match {
202 Mutable(final Double pCoverage) {
203 super(pCoverage);
204 }
205
206 @Override
207 public boolean isMutable() {
208 return true;
209 }
210 }
211
212 private static final class Immutable extends CoverageMetric.Match {
213 Immutable(final Double pCoverage) {
214 super(pCoverage);
215 }
216
217 @Override
218 public boolean isMutable() {
219 return false;
220 }
221 }
222 }
223
224 /**
225 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.coverageMetric pattern,
226 * providing pattern-specific query methods.
227 *
228 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
229 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
230 *
231 * <p>Matches of the pattern will be represented as {@link Match}.
232 *
233 * <p>Original source:
234 * <code><pre>
235 * //
236 * // Metrics
237 * //
238 *
239 * // Coverage
240 *
241 * pattern coverageMetric(Coverage : java Double) {
242 * Coverage == sum find missionCoverage(_, #_);
243 * }
244 * </pre></code>
245 *
246 * @see Match
247 * @see CoverageMetric
248 *
249 */
250 public static class Matcher extends BaseMatcher<CoverageMetric.Match> {
251 /**
252 * Initializes the pattern matcher within an existing VIATRA Query engine.
253 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
254 *
255 * @param engine the existing VIATRA Query engine in which this matcher will be created.
256 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
257 *
258 */
259 public static CoverageMetric.Matcher on(final ViatraQueryEngine engine) {
260 // check if matcher already exists
261 Matcher matcher = engine.getExistingMatcher(querySpecification());
262 if (matcher == null) {
263 matcher = (Matcher)engine.getMatcher(querySpecification());
264 }
265 return matcher;
266 }
267
268 /**
269 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
270 * @return an initialized matcher
271 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
272 *
273 */
274 public static CoverageMetric.Matcher create() {
275 return new Matcher();
276 }
277
278 private static final int POSITION_COVERAGE = 0;
279
280 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(CoverageMetric.Matcher.class);
281
282 /**
283 * Initializes the pattern matcher within an existing VIATRA Query engine.
284 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
285 *
286 * @param engine the existing VIATRA Query engine in which this matcher will be created.
287 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
288 *
289 */
290 private Matcher() {
291 super(querySpecification());
292 }
293
294 /**
295 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
296 * @param pCoverage the fixed value of pattern parameter Coverage, or null if not bound.
297 * @return matches represented as a Match object.
298 *
299 */
300 public Collection<CoverageMetric.Match> getAllMatches(final Double pCoverage) {
301 return rawStreamAllMatches(new Object[]{pCoverage}).collect(Collectors.toSet());
302 }
303
304 /**
305 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
306 * </p>
307 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
308 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
309 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
310 * @param pCoverage the fixed value of pattern parameter Coverage, or null if not bound.
311 * @return a stream of matches represented as a Match object.
312 *
313 */
314 public Stream<CoverageMetric.Match> streamAllMatches(final Double pCoverage) {
315 return rawStreamAllMatches(new Object[]{pCoverage});
316 }
317
318 /**
319 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
320 * Neither determinism nor randomness of selection is guaranteed.
321 * @param pCoverage the fixed value of pattern parameter Coverage, or null if not bound.
322 * @return a match represented as a Match object, or null if no match is found.
323 *
324 */
325 public Optional<CoverageMetric.Match> getOneArbitraryMatch(final Double pCoverage) {
326 return rawGetOneArbitraryMatch(new Object[]{pCoverage});
327 }
328
329 /**
330 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
331 * under any possible substitution of the unspecified parameters (if any).
332 * @param pCoverage the fixed value of pattern parameter Coverage, or null if not bound.
333 * @return true if the input is a valid (partial) match of the pattern.
334 *
335 */
336 public boolean hasMatch(final Double pCoverage) {
337 return rawHasMatch(new Object[]{pCoverage});
338 }
339
340 /**
341 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
342 * @param pCoverage the fixed value of pattern parameter Coverage, or null if not bound.
343 * @return the number of pattern matches found.
344 *
345 */
346 public int countMatches(final Double pCoverage) {
347 return rawCountMatches(new Object[]{pCoverage});
348 }
349
350 /**
351 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
352 * Neither determinism nor randomness of selection is guaranteed.
353 * @param pCoverage the fixed value of pattern parameter Coverage, or null if not bound.
354 * @param processor the action that will process the selected match.
355 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
356 *
357 */
358 public boolean forOneArbitraryMatch(final Double pCoverage, final Consumer<? super CoverageMetric.Match> processor) {
359 return rawForOneArbitraryMatch(new Object[]{pCoverage}, processor);
360 }
361
362 /**
363 * Returns a new (partial) match.
364 * This can be used e.g. to call the matcher with a partial match.
365 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
366 * @param pCoverage the fixed value of pattern parameter Coverage, or null if not bound.
367 * @return the (partial) match object.
368 *
369 */
370 public CoverageMetric.Match newMatch(final Double pCoverage) {
371 return CoverageMetric.Match.newMatch(pCoverage);
372 }
373
374 /**
375 * Retrieve the set of values that occur in matches for Coverage.
376 * @return the Set of all values or empty set if there are no matches
377 *
378 */
379 protected Stream<Double> rawStreamAllValuesOfCoverage(final Object[] parameters) {
380 return rawStreamAllValues(POSITION_COVERAGE, parameters).map(Double.class::cast);
381 }
382
383 /**
384 * Retrieve the set of values that occur in matches for Coverage.
385 * @return the Set of all values or empty set if there are no matches
386 *
387 */
388 public Set<Double> getAllValuesOfCoverage() {
389 return rawStreamAllValuesOfCoverage(emptyArray()).collect(Collectors.toSet());
390 }
391
392 /**
393 * Retrieve the set of values that occur in matches for Coverage.
394 * @return the Set of all values or empty set if there are no matches
395 *
396 */
397 public Stream<Double> streamAllValuesOfCoverage() {
398 return rawStreamAllValuesOfCoverage(emptyArray());
399 }
400
401 @Override
402 protected CoverageMetric.Match tupleToMatch(final Tuple t) {
403 try {
404 return CoverageMetric.Match.newMatch((Double) t.get(POSITION_COVERAGE));
405 } catch(ClassCastException e) {
406 LOGGER.error("Element(s) in tuple not properly typed!",e);
407 return null;
408 }
409 }
410
411 @Override
412 protected CoverageMetric.Match arrayToMatch(final Object[] match) {
413 try {
414 return CoverageMetric.Match.newMatch((Double) match[POSITION_COVERAGE]);
415 } catch(ClassCastException e) {
416 LOGGER.error("Element(s) in array not properly typed!",e);
417 return null;
418 }
419 }
420
421 @Override
422 protected CoverageMetric.Match arrayToMatchMutable(final Object[] match) {
423 try {
424 return CoverageMetric.Match.newMutableMatch((Double) match[POSITION_COVERAGE]);
425 } catch(ClassCastException e) {
426 LOGGER.error("Element(s) in array not properly typed!",e);
427 return null;
428 }
429 }
430
431 /**
432 * @return the singleton instance of the query specification of this pattern
433 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
434 *
435 */
436 public static IQuerySpecification<CoverageMetric.Matcher> querySpecification() {
437 return CoverageMetric.instance();
438 }
439 }
440
441 private CoverageMetric() {
442 super(GeneratedPQuery.INSTANCE);
443 }
444
445 /**
446 * @return the singleton instance of the query specification
447 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
448 *
449 */
450 public static CoverageMetric instance() {
451 try{
452 return LazyHolder.INSTANCE;
453 } catch (ExceptionInInitializerError err) {
454 throw processInitializerError(err);
455 }
456 }
457
458 @Override
459 protected CoverageMetric.Matcher instantiate(final ViatraQueryEngine engine) {
460 return CoverageMetric.Matcher.on(engine);
461 }
462
463 @Override
464 public CoverageMetric.Matcher instantiate() {
465 return CoverageMetric.Matcher.create();
466 }
467
468 @Override
469 public CoverageMetric.Match newEmptyMatch() {
470 return CoverageMetric.Match.newEmptyMatch();
471 }
472
473 @Override
474 public CoverageMetric.Match newMatch(final Object... parameters) {
475 return CoverageMetric.Match.newMatch((java.lang.Double) parameters[0]);
476 }
477
478 /**
479 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CoverageMetric (visibility: PUBLIC, simpleName: CoverageMetric, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CoverageMetric, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
480 * <b>not</b> at the class load time of the outer class,
481 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CoverageMetric (visibility: PUBLIC, simpleName: CoverageMetric, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CoverageMetric, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
482 *
483 * <p> This workaround is required e.g. to support recursion.
484 *
485 */
486 private static class LazyHolder {
487 private static final CoverageMetric INSTANCE = new CoverageMetric();
488
489 /**
490 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
491 * This initialization order is required to support indirect recursion.
492 *
493 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
494 *
495 */
496 private static final Object STATIC_INITIALIZER = ensureInitialized();
497
498 public static Object ensureInitialized() {
499 INSTANCE.ensureInitializedInternal();
500 return null;
501 }
502 }
503
504 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
505 private static final CoverageMetric.GeneratedPQuery INSTANCE = new GeneratedPQuery();
506
507 private final PParameter parameter_Coverage = new PParameter("Coverage", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
508
509 private final List<PParameter> parameters = Arrays.asList(parameter_Coverage);
510
511 private GeneratedPQuery() {
512 super(PVisibility.PUBLIC);
513 }
514
515 @Override
516 public String getFullyQualifiedName() {
517 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.coverageMetric";
518 }
519
520 @Override
521 public List<String> getParameterNames() {
522 return Arrays.asList("Coverage");
523 }
524
525 @Override
526 public List<PParameter> getParameters() {
527 return parameters;
528 }
529
530 @Override
531 public Set<PBody> doGetContainedBodies() {
532 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
533 Set<PBody> bodies = new LinkedHashSet<>();
534 {
535 PBody body = new PBody(this);
536 PVariable var_Coverage = body.getOrCreateVariableByName("Coverage");
537 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
538 PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
539 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Coverage), new JavaTransitiveInstancesKey(java.lang.Double.class));
540 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
541 new ExportedParameter(body, var_Coverage, parameter_Coverage)
542 ));
543 // Coverage == sum find missionCoverage(_, #_)
544 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
545 new AggregatorConstraint(new sum().getAggregatorLogic(Double.class), body, Tuples.flatTupleOf(var___0_, var___1_), MissionCoverage.instance().getInternalQueryRepresentation(), var__virtual_0_, 1);
546 new Equality(body, var_Coverage, var__virtual_0_);
547 bodies.add(body);
548 }
549 return bodies;
550 }
551 }
552}
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 d4d72391..b6601c28 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
@@ -5,6 +5,8 @@ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries;
5 5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; 6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement;
7import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; 7import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop;
8import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric;
9import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CoverageMetric;
8import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; 10import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna;
9import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; 11import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand;
10import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetGain; 12import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetGain;
@@ -12,6 +14,7 @@ import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.KaAntennaGainLow;
12import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; 14import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation;
13import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; 15import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads;
14import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.ThreeUCubeSatWithNonUhfCrossLink; 16import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.ThreeUCubeSatWithNonUhfCrossLink;
17import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.TimeMetric;
15import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.UhfAntennaGainNotLow; 18import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.UhfAntennaGainNotLow;
16import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.XAntennaGainNotMedium; 19import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.XAntennaGainNotMedium;
17import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; 20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
@@ -36,6 +39,9 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup;
36 * <li>kaAntennaGainLow</li> 39 * <li>kaAntennaGainLow</li>
37 * <li>threeUCubeSatWithNonUhfCrossLink</li> 40 * <li>threeUCubeSatWithNonUhfCrossLink</li>
38 * <li>cubeSatWithKaAntenna</li> 41 * <li>cubeSatWithKaAntenna</li>
42 * <li>coverageMetric</li>
43 * <li>timeMetric</li>
44 * <li>costMetric</li>
39 * </ul> 45 * </ul>
40 * 46 *
41 * @see IQueryGroup 47 * @see IQueryGroup
@@ -71,6 +77,9 @@ public final class SatelliteQueries extends BaseGeneratedPatternGroup {
71 querySpecifications.add(KaAntennaGainLow.instance()); 77 querySpecifications.add(KaAntennaGainLow.instance());
72 querySpecifications.add(ThreeUCubeSatWithNonUhfCrossLink.instance()); 78 querySpecifications.add(ThreeUCubeSatWithNonUhfCrossLink.instance());
73 querySpecifications.add(CubeSatWithKaAntenna.instance()); 79 querySpecifications.add(CubeSatWithKaAntenna.instance());
80 querySpecifications.add(CoverageMetric.instance());
81 querySpecifications.add(TimeMetric.instance());
82 querySpecifications.add(CostMetric.instance());
74 } 83 }
75 84
76 public CommunicationLinkDoesNotStartAtContainingElement getCommunicationLinkDoesNotStartAtContainingElement() { 85 public CommunicationLinkDoesNotStartAtContainingElement getCommunicationLinkDoesNotStartAtContainingElement() {
@@ -160,4 +169,28 @@ public final class SatelliteQueries extends BaseGeneratedPatternGroup {
160 public CubeSatWithKaAntenna.Matcher getCubeSatWithKaAntenna(final ViatraQueryEngine engine) { 169 public CubeSatWithKaAntenna.Matcher getCubeSatWithKaAntenna(final ViatraQueryEngine engine) {
161 return CubeSatWithKaAntenna.Matcher.on(engine); 170 return CubeSatWithKaAntenna.Matcher.on(engine);
162 } 171 }
172
173 public CoverageMetric getCoverageMetric() {
174 return CoverageMetric.instance();
175 }
176
177 public CoverageMetric.Matcher getCoverageMetric(final ViatraQueryEngine engine) {
178 return CoverageMetric.Matcher.on(engine);
179 }
180
181 public TimeMetric getTimeMetric() {
182 return TimeMetric.instance();
183 }
184
185 public TimeMetric.Matcher getTimeMetric(final ViatraQueryEngine engine) {
186 return TimeMetric.Matcher.on(engine);
187 }
188
189 public CostMetric getCostMetric() {
190 return CostMetric.instance();
191 }
192
193 public CostMetric.Matcher getCostMetric(final ViatraQueryEngine engine) {
194 return CostMetric.Matcher.on(engine);
195 }
163} 196}
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 6408033b..6500c9d3 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,7 +3,7 @@
3 */ 3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; 4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries;
5 5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U; 6import hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft;
7import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBandUhf; 7import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBandUhf;
8import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.GroundStationNetwork; 8import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.GroundStationNetwork;
9import java.util.Arrays; 9import java.util.Arrays;
@@ -18,6 +18,7 @@ import java.util.stream.Collectors;
18import java.util.stream.Stream; 18import java.util.stream.Stream;
19import org.apache.log4j.Logger; 19import org.apache.log4j.Logger;
20import org.eclipse.emf.ecore.EClass; 20import org.eclipse.emf.ecore.EClass;
21import org.eclipse.emf.ecore.EDataType;
21import org.eclipse.viatra.query.runtime.api.IPatternMatch; 22import org.eclipse.viatra.query.runtime.api.IPatternMatch;
22import org.eclipse.viatra.query.runtime.api.IQuerySpecification; 23import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; 24import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
@@ -26,6 +27,7 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificat
26import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; 27import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
27import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; 28import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
28import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; 29import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
30import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
29import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; 31import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
30import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; 32import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; 33import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
@@ -35,6 +37,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterRe
35import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; 37import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
36import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; 38import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
37import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall; 39import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
40import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue;
38import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; 41import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
39import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; 42import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
40import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; 43import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
@@ -53,7 +56,8 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
53 * 56 *
54 * {@literal @}Constraint(severity = "error", key = {Sat}, 57 * {@literal @}Constraint(severity = "error", key = {Sat},
55 * message = "3U CubeSats can only cross-link using UHF.") 58 * message = "3U CubeSats can only cross-link using UHF.")
56 * pattern threeUCubeSatWithNonUhfCrossLink(Sat : CubeSat3U) { 59 * pattern threeUCubeSatWithNonUhfCrossLink(Sat : Spacecraft) {
60 * Spacecraft.kind(Sat, SpacecraftKind::CubeSat3U);
57 * CommunicatingElement.commSubsystem(Sat, SourceComm); 61 * CommunicatingElement.commSubsystem(Sat, SourceComm);
58 * neg find commSubsystemBandUhf(SourceComm); 62 * neg find commSubsystemBandUhf(SourceComm);
59 * DirectedCommunicationLink.source(Link, SourceComm); 63 * DirectedCommunicationLink.source(Link, SourceComm);
@@ -82,11 +86,11 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
82 * 86 *
83 */ 87 */
84 public static abstract class Match extends BasePatternMatch { 88 public static abstract class Match extends BasePatternMatch {
85 private CubeSat3U fSat; 89 private Spacecraft fSat;
86 90
87 private static List<String> parameterNames = makeImmutableList("Sat"); 91 private static List<String> parameterNames = makeImmutableList("Sat");
88 92
89 private Match(final CubeSat3U pSat) { 93 private Match(final Spacecraft pSat) {
90 this.fSat = pSat; 94 this.fSat = pSat;
91 } 95 }
92 96
@@ -96,7 +100,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
96 return null; 100 return null;
97 } 101 }
98 102
99 public CubeSat3U getSat() { 103 public Spacecraft getSat() {
100 return this.fSat; 104 return this.fSat;
101 } 105 }
102 106
@@ -104,13 +108,13 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
104 public boolean set(final String parameterName, final Object newValue) { 108 public boolean set(final String parameterName, final Object newValue) {
105 if (!isMutable()) throw new java.lang.UnsupportedOperationException(); 109 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
106 if ("Sat".equals(parameterName) ) { 110 if ("Sat".equals(parameterName) ) {
107 this.fSat = (CubeSat3U) newValue; 111 this.fSat = (Spacecraft) newValue;
108 return true; 112 return true;
109 } 113 }
110 return false; 114 return false;
111 } 115 }
112 116
113 public void setSat(final CubeSat3U pSat) { 117 public void setSat(final Spacecraft pSat) {
114 if (!isMutable()) throw new java.lang.UnsupportedOperationException(); 118 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
115 this.fSat = pSat; 119 this.fSat = pSat;
116 } 120 }
@@ -191,7 +195,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
191 * @return the new, mutable (partial) match object. 195 * @return the new, mutable (partial) match object.
192 * 196 *
193 */ 197 */
194 public static ThreeUCubeSatWithNonUhfCrossLink.Match newMutableMatch(final CubeSat3U pSat) { 198 public static ThreeUCubeSatWithNonUhfCrossLink.Match newMutableMatch(final Spacecraft pSat) {
195 return new Mutable(pSat); 199 return new Mutable(pSat);
196 } 200 }
197 201
@@ -203,12 +207,12 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
203 * @return the (partial) match object. 207 * @return the (partial) match object.
204 * 208 *
205 */ 209 */
206 public static ThreeUCubeSatWithNonUhfCrossLink.Match newMatch(final CubeSat3U pSat) { 210 public static ThreeUCubeSatWithNonUhfCrossLink.Match newMatch(final Spacecraft pSat) {
207 return new Immutable(pSat); 211 return new Immutable(pSat);
208 } 212 }
209 213
210 private static final class Mutable extends ThreeUCubeSatWithNonUhfCrossLink.Match { 214 private static final class Mutable extends ThreeUCubeSatWithNonUhfCrossLink.Match {
211 Mutable(final CubeSat3U pSat) { 215 Mutable(final Spacecraft pSat) {
212 super(pSat); 216 super(pSat);
213 } 217 }
214 218
@@ -219,7 +223,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
219 } 223 }
220 224
221 private static final class Immutable extends ThreeUCubeSatWithNonUhfCrossLink.Match { 225 private static final class Immutable extends ThreeUCubeSatWithNonUhfCrossLink.Match {
222 Immutable(final CubeSat3U pSat) { 226 Immutable(final Spacecraft pSat) {
223 super(pSat); 227 super(pSat);
224 } 228 }
225 229
@@ -246,7 +250,8 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
246 * 250 *
247 * {@literal @}Constraint(severity = "error", key = {Sat}, 251 * {@literal @}Constraint(severity = "error", key = {Sat},
248 * message = "3U CubeSats can only cross-link using UHF.") 252 * message = "3U CubeSats can only cross-link using UHF.")
249 * pattern threeUCubeSatWithNonUhfCrossLink(Sat : CubeSat3U) { 253 * pattern threeUCubeSatWithNonUhfCrossLink(Sat : Spacecraft) {
254 * Spacecraft.kind(Sat, SpacecraftKind::CubeSat3U);
250 * CommunicatingElement.commSubsystem(Sat, SourceComm); 255 * CommunicatingElement.commSubsystem(Sat, SourceComm);
251 * neg find commSubsystemBandUhf(SourceComm); 256 * neg find commSubsystemBandUhf(SourceComm);
252 * DirectedCommunicationLink.source(Link, SourceComm); 257 * DirectedCommunicationLink.source(Link, SourceComm);
@@ -310,7 +315,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
310 * @return matches represented as a Match object. 315 * @return matches represented as a Match object.
311 * 316 *
312 */ 317 */
313 public Collection<ThreeUCubeSatWithNonUhfCrossLink.Match> getAllMatches(final CubeSat3U pSat) { 318 public Collection<ThreeUCubeSatWithNonUhfCrossLink.Match> getAllMatches(final Spacecraft pSat) {
314 return rawStreamAllMatches(new Object[]{pSat}).collect(Collectors.toSet()); 319 return rawStreamAllMatches(new Object[]{pSat}).collect(Collectors.toSet());
315 } 320 }
316 321
@@ -324,7 +329,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
324 * @return a stream of matches represented as a Match object. 329 * @return a stream of matches represented as a Match object.
325 * 330 *
326 */ 331 */
327 public Stream<ThreeUCubeSatWithNonUhfCrossLink.Match> streamAllMatches(final CubeSat3U pSat) { 332 public Stream<ThreeUCubeSatWithNonUhfCrossLink.Match> streamAllMatches(final Spacecraft pSat) {
328 return rawStreamAllMatches(new Object[]{pSat}); 333 return rawStreamAllMatches(new Object[]{pSat});
329 } 334 }
330 335
@@ -335,7 +340,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
335 * @return a match represented as a Match object, or null if no match is found. 340 * @return a match represented as a Match object, or null if no match is found.
336 * 341 *
337 */ 342 */
338 public Optional<ThreeUCubeSatWithNonUhfCrossLink.Match> getOneArbitraryMatch(final CubeSat3U pSat) { 343 public Optional<ThreeUCubeSatWithNonUhfCrossLink.Match> getOneArbitraryMatch(final Spacecraft pSat) {
339 return rawGetOneArbitraryMatch(new Object[]{pSat}); 344 return rawGetOneArbitraryMatch(new Object[]{pSat});
340 } 345 }
341 346
@@ -346,7 +351,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
346 * @return true if the input is a valid (partial) match of the pattern. 351 * @return true if the input is a valid (partial) match of the pattern.
347 * 352 *
348 */ 353 */
349 public boolean hasMatch(final CubeSat3U pSat) { 354 public boolean hasMatch(final Spacecraft pSat) {
350 return rawHasMatch(new Object[]{pSat}); 355 return rawHasMatch(new Object[]{pSat});
351 } 356 }
352 357
@@ -356,7 +361,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
356 * @return the number of pattern matches found. 361 * @return the number of pattern matches found.
357 * 362 *
358 */ 363 */
359 public int countMatches(final CubeSat3U pSat) { 364 public int countMatches(final Spacecraft pSat) {
360 return rawCountMatches(new Object[]{pSat}); 365 return rawCountMatches(new Object[]{pSat});
361 } 366 }
362 367
@@ -368,7 +373,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
368 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked 373 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
369 * 374 *
370 */ 375 */
371 public boolean forOneArbitraryMatch(final CubeSat3U pSat, final Consumer<? super ThreeUCubeSatWithNonUhfCrossLink.Match> processor) { 376 public boolean forOneArbitraryMatch(final Spacecraft pSat, final Consumer<? super ThreeUCubeSatWithNonUhfCrossLink.Match> processor) {
372 return rawForOneArbitraryMatch(new Object[]{pSat}, processor); 377 return rawForOneArbitraryMatch(new Object[]{pSat}, processor);
373 } 378 }
374 379
@@ -380,7 +385,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
380 * @return the (partial) match object. 385 * @return the (partial) match object.
381 * 386 *
382 */ 387 */
383 public ThreeUCubeSatWithNonUhfCrossLink.Match newMatch(final CubeSat3U pSat) { 388 public ThreeUCubeSatWithNonUhfCrossLink.Match newMatch(final Spacecraft pSat) {
384 return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch(pSat); 389 return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch(pSat);
385 } 390 }
386 391
@@ -389,8 +394,8 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
389 * @return the Set of all values or empty set if there are no matches 394 * @return the Set of all values or empty set if there are no matches
390 * 395 *
391 */ 396 */
392 protected Stream<CubeSat3U> rawStreamAllValuesOfSat(final Object[] parameters) { 397 protected Stream<Spacecraft> rawStreamAllValuesOfSat(final Object[] parameters) {
393 return rawStreamAllValues(POSITION_SAT, parameters).map(CubeSat3U.class::cast); 398 return rawStreamAllValues(POSITION_SAT, parameters).map(Spacecraft.class::cast);
394 } 399 }
395 400
396 /** 401 /**
@@ -398,7 +403,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
398 * @return the Set of all values or empty set if there are no matches 403 * @return the Set of all values or empty set if there are no matches
399 * 404 *
400 */ 405 */
401 public Set<CubeSat3U> getAllValuesOfSat() { 406 public Set<Spacecraft> getAllValuesOfSat() {
402 return rawStreamAllValuesOfSat(emptyArray()).collect(Collectors.toSet()); 407 return rawStreamAllValuesOfSat(emptyArray()).collect(Collectors.toSet());
403 } 408 }
404 409
@@ -407,14 +412,14 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
407 * @return the Set of all values or empty set if there are no matches 412 * @return the Set of all values or empty set if there are no matches
408 * 413 *
409 */ 414 */
410 public Stream<CubeSat3U> streamAllValuesOfSat() { 415 public Stream<Spacecraft> streamAllValuesOfSat() {
411 return rawStreamAllValuesOfSat(emptyArray()); 416 return rawStreamAllValuesOfSat(emptyArray());
412 } 417 }
413 418
414 @Override 419 @Override
415 protected ThreeUCubeSatWithNonUhfCrossLink.Match tupleToMatch(final Tuple t) { 420 protected ThreeUCubeSatWithNonUhfCrossLink.Match tupleToMatch(final Tuple t) {
416 try { 421 try {
417 return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch((CubeSat3U) t.get(POSITION_SAT)); 422 return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch((Spacecraft) t.get(POSITION_SAT));
418 } catch(ClassCastException e) { 423 } catch(ClassCastException e) {
419 LOGGER.error("Element(s) in tuple not properly typed!",e); 424 LOGGER.error("Element(s) in tuple not properly typed!",e);
420 return null; 425 return null;
@@ -424,7 +429,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
424 @Override 429 @Override
425 protected ThreeUCubeSatWithNonUhfCrossLink.Match arrayToMatch(final Object[] match) { 430 protected ThreeUCubeSatWithNonUhfCrossLink.Match arrayToMatch(final Object[] match) {
426 try { 431 try {
427 return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch((CubeSat3U) match[POSITION_SAT]); 432 return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch((Spacecraft) match[POSITION_SAT]);
428 } catch(ClassCastException e) { 433 } catch(ClassCastException e) {
429 LOGGER.error("Element(s) in array not properly typed!",e); 434 LOGGER.error("Element(s) in array not properly typed!",e);
430 return null; 435 return null;
@@ -434,7 +439,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
434 @Override 439 @Override
435 protected ThreeUCubeSatWithNonUhfCrossLink.Match arrayToMatchMutable(final Object[] match) { 440 protected ThreeUCubeSatWithNonUhfCrossLink.Match arrayToMatchMutable(final Object[] match) {
436 try { 441 try {
437 return ThreeUCubeSatWithNonUhfCrossLink.Match.newMutableMatch((CubeSat3U) match[POSITION_SAT]); 442 return ThreeUCubeSatWithNonUhfCrossLink.Match.newMutableMatch((Spacecraft) match[POSITION_SAT]);
438 } catch(ClassCastException e) { 443 } catch(ClassCastException e) {
439 LOGGER.error("Element(s) in array not properly typed!",e); 444 LOGGER.error("Element(s) in array not properly typed!",e);
440 return null; 445 return null;
@@ -485,7 +490,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
485 490
486 @Override 491 @Override
487 public ThreeUCubeSatWithNonUhfCrossLink.Match newMatch(final Object... parameters) { 492 public ThreeUCubeSatWithNonUhfCrossLink.Match newMatch(final Object... parameters) {
488 return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.CubeSat3U) parameters[0]); 493 return ThreeUCubeSatWithNonUhfCrossLink.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft) parameters[0]);
489 } 494 }
490 495
491 /** 496 /**
@@ -517,7 +522,7 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
517 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { 522 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
518 private static final ThreeUCubeSatWithNonUhfCrossLink.GeneratedPQuery INSTANCE = new GeneratedPQuery(); 523 private static final ThreeUCubeSatWithNonUhfCrossLink.GeneratedPQuery INSTANCE = new GeneratedPQuery();
519 524
520 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); 525 private final PParameter parameter_Sat = new PParameter("Sat", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT);
521 526
522 private final List<PParameter> parameters = Arrays.asList(parameter_Sat); 527 private final List<PParameter> parameters = Arrays.asList(parameter_Sat);
523 528
@@ -551,36 +556,44 @@ public final class ThreeUCubeSatWithNonUhfCrossLink extends BaseGeneratedEMFQuer
551 PVariable var_Link = body.getOrCreateVariableByName("Link"); 556 PVariable var_Link = body.getOrCreateVariableByName("Link");
552 PVariable var_TargetComm = body.getOrCreateVariableByName("TargetComm"); 557 PVariable var_TargetComm = body.getOrCreateVariableByName("TargetComm");
553 PVariable var_Target = body.getOrCreateVariableByName("Target"); 558 PVariable var_Target = body.getOrCreateVariableByName("Target");
554 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CubeSat3U"))); 559 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
555 body.setSymbolicParameters(Arrays.<ExportedParameter>asList( 560 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
556 new ExportedParameter(body, var_Sat, parameter_Sat) 561 new ExportedParameter(body, var_Sat, parameter_Sat)
557 )); 562 ));
563 // Spacecraft.kind(Sat, SpacecraftKind::CubeSat3U)
564 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
565 new ConstantValue(body, var__virtual_0_, getEnumLiteral("http://www.example.org/satellite", "SpacecraftKind", "CubeSat3U").getInstance());
566 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
567 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
568 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "Spacecraft", "kind")));
569 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "SpacecraftKind")));
570 new Equality(body, var__virtual_1_, var__virtual_0_);
558 // CommunicatingElement.commSubsystem(Sat, SourceComm) 571 // CommunicatingElement.commSubsystem(Sat, SourceComm)
559 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); 572 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement")));
560 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); 573 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
561 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); 574 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem")));
562 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); 575 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem")));
563 new Equality(body, var__virtual_0_, var_SourceComm); 576 new Equality(body, var__virtual_2_, var_SourceComm);
564 // neg find commSubsystemBandUhf(SourceComm) 577 // neg find commSubsystemBandUhf(SourceComm)
565 new NegativePatternCall(body, Tuples.flatTupleOf(var_SourceComm), CommSubsystemBandUhf.instance().getInternalQueryRepresentation()); 578 new NegativePatternCall(body, Tuples.flatTupleOf(var_SourceComm), CommSubsystemBandUhf.instance().getInternalQueryRepresentation());
566 // DirectedCommunicationLink.source(Link, SourceComm) 579 // DirectedCommunicationLink.source(Link, SourceComm)
567 new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); 580 new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink")));
568 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); 581 PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}");
569 new TypeConstraint(body, Tuples.flatTupleOf(var_Link, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "DirectedCommunicationLink", "source"))); 582 new TypeConstraint(body, Tuples.flatTupleOf(var_Link, var__virtual_3_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "DirectedCommunicationLink", "source")));
570 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); 583 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_3_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem")));
571 new Equality(body, var__virtual_1_, var_SourceComm); 584 new Equality(body, var__virtual_3_, var_SourceComm);
572 // DirectedCommunicationLink.target(Link, TargetComm) 585 // DirectedCommunicationLink.target(Link, TargetComm)
573 new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink"))); 586 new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink")));
574 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); 587 PVariable var__virtual_4_ = body.getOrCreateVariableByName(".virtual{4}");
575 new TypeConstraint(body, Tuples.flatTupleOf(var_Link, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "DirectedCommunicationLink", "target"))); 588 new TypeConstraint(body, Tuples.flatTupleOf(var_Link, var__virtual_4_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "DirectedCommunicationLink", "target")));
576 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); 589 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_4_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem")));
577 new Equality(body, var__virtual_2_, var_TargetComm); 590 new Equality(body, var__virtual_4_, var_TargetComm);
578 // CommunicatingElement.commSubsystem(Target, TargetComm) 591 // CommunicatingElement.commSubsystem(Target, TargetComm)
579 new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement"))); 592 new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement")));
580 PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}"); 593 PVariable var__virtual_5_ = body.getOrCreateVariableByName(".virtual{5}");
581 new TypeConstraint(body, Tuples.flatTupleOf(var_Target, var__virtual_3_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem"))); 594 new TypeConstraint(body, Tuples.flatTupleOf(var_Target, var__virtual_5_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem")));
582 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_3_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem"))); 595 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_5_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem")));
583 new Equality(body, var__virtual_3_, var_TargetComm); 596 new Equality(body, var__virtual_5_, var_TargetComm);
584 // neg find groundStationNetwork(Target) 597 // neg find groundStationNetwork(Target)
585 new NegativePatternCall(body, Tuples.flatTupleOf(var_Target), GroundStationNetwork.instance().getInternalQueryRepresentation()); 598 new NegativePatternCall(body, Tuples.flatTupleOf(var_Target), GroundStationNetwork.instance().getInternalQueryRepresentation());
586 bodies.add(body); 599 bodies.add(body);
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/TimeMetric.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/TimeMetric.java
new file mode 100644
index 00000000..45d4cc35
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/TimeMetric.java
@@ -0,0 +1,544 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionTime;
7import java.util.Arrays;
8import java.util.Collection;
9import java.util.LinkedHashSet;
10import java.util.List;
11import java.util.Objects;
12import java.util.Optional;
13import java.util.Set;
14import java.util.function.Consumer;
15import java.util.stream.Collectors;
16import java.util.stream.Stream;
17import org.apache.log4j.Logger;
18import org.eclipse.viatra.query.runtime.api.IPatternMatch;
19import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
20import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
21import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
22import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
23import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
24import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
25import org.eclipse.viatra.query.runtime.matchers.aggregators.sum;
26import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
27import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
28import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
29import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.AggregatorConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
34import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
37import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
38import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
39import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
40
41/**
42 * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
43 *
44 * <p>Original source:
45 * <code><pre>
46 * // Time
47 *
48 * pattern timeMetric(Time : java Double) {
49 * Time == sum find missionTime(_, #_);
50 * }
51 * </pre></code>
52 *
53 * @see Matcher
54 * @see Match
55 *
56 */
57@SuppressWarnings("all")
58public final class TimeMetric extends BaseGeneratedEMFQuerySpecification<TimeMetric.Matcher> {
59 /**
60 * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.timeMetric pattern,
61 * to be used in conjunction with {@link Matcher}.
62 *
63 * <p>Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned.
64 * Each instance is a (possibly partial) substitution of pattern parameters,
65 * usable to represent a match of the pattern in the result of a query,
66 * or to specify the bound (fixed) input parameters when issuing a query.
67 *
68 * @see Matcher
69 *
70 */
71 public static abstract class Match extends BasePatternMatch {
72 private Double fTime;
73
74 private static List<String> parameterNames = makeImmutableList("Time");
75
76 private Match(final Double pTime) {
77 this.fTime = pTime;
78 }
79
80 @Override
81 public Object get(final String parameterName) {
82 if ("Time".equals(parameterName)) return this.fTime;
83 return null;
84 }
85
86 public Double getTime() {
87 return this.fTime;
88 }
89
90 @Override
91 public boolean set(final String parameterName, final Object newValue) {
92 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
93 if ("Time".equals(parameterName) ) {
94 this.fTime = (Double) newValue;
95 return true;
96 }
97 return false;
98 }
99
100 public void setTime(final Double pTime) {
101 if (!isMutable()) throw new java.lang.UnsupportedOperationException();
102 this.fTime = pTime;
103 }
104
105 @Override
106 public String patternName() {
107 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.timeMetric";
108 }
109
110 @Override
111 public List<String> parameterNames() {
112 return TimeMetric.Match.parameterNames;
113 }
114
115 @Override
116 public Object[] toArray() {
117 return new Object[]{fTime};
118 }
119
120 @Override
121 public TimeMetric.Match toImmutable() {
122 return isMutable() ? newMatch(fTime) : this;
123 }
124
125 @Override
126 public String prettyPrint() {
127 StringBuilder result = new StringBuilder();
128 result.append("\"Time\"=" + prettyPrintValue(fTime));
129 return result.toString();
130 }
131
132 @Override
133 public int hashCode() {
134 return Objects.hash(fTime);
135 }
136
137 @Override
138 public boolean equals(final Object obj) {
139 if (this == obj)
140 return true;
141 if (obj == null) {
142 return false;
143 }
144 if ((obj instanceof TimeMetric.Match)) {
145 TimeMetric.Match other = (TimeMetric.Match) obj;
146 return Objects.equals(fTime, other.fTime);
147 } else {
148 // this should be infrequent
149 if (!(obj instanceof IPatternMatch)) {
150 return false;
151 }
152 IPatternMatch otherSig = (IPatternMatch) obj;
153 return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray());
154 }
155 }
156
157 @Override
158 public TimeMetric specification() {
159 return TimeMetric.instance();
160 }
161
162 /**
163 * Returns an empty, mutable match.
164 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
165 *
166 * @return the empty match.
167 *
168 */
169 public static TimeMetric.Match newEmptyMatch() {
170 return new Mutable(null);
171 }
172
173 /**
174 * Returns a mutable (partial) match.
175 * Fields of the mutable match can be filled to create a partial match, usable as matcher input.
176 *
177 * @param pTime the fixed value of pattern parameter Time, or null if not bound.
178 * @return the new, mutable (partial) match object.
179 *
180 */
181 public static TimeMetric.Match newMutableMatch(final Double pTime) {
182 return new Mutable(pTime);
183 }
184
185 /**
186 * Returns a new (partial) match.
187 * This can be used e.g. to call the matcher with a partial match.
188 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
189 * @param pTime the fixed value of pattern parameter Time, or null if not bound.
190 * @return the (partial) match object.
191 *
192 */
193 public static TimeMetric.Match newMatch(final Double pTime) {
194 return new Immutable(pTime);
195 }
196
197 private static final class Mutable extends TimeMetric.Match {
198 Mutable(final Double pTime) {
199 super(pTime);
200 }
201
202 @Override
203 public boolean isMutable() {
204 return true;
205 }
206 }
207
208 private static final class Immutable extends TimeMetric.Match {
209 Immutable(final Double pTime) {
210 super(pTime);
211 }
212
213 @Override
214 public boolean isMutable() {
215 return false;
216 }
217 }
218 }
219
220 /**
221 * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.satellite.queries.timeMetric pattern,
222 * providing pattern-specific query methods.
223 *
224 * <p>Use the pattern matcher on a given model via {@link #on(ViatraQueryEngine)},
225 * e.g. in conjunction with {@link ViatraQueryEngine#on(QueryScope)}.
226 *
227 * <p>Matches of the pattern will be represented as {@link Match}.
228 *
229 * <p>Original source:
230 * <code><pre>
231 * // Time
232 *
233 * pattern timeMetric(Time : java Double) {
234 * Time == sum find missionTime(_, #_);
235 * }
236 * </pre></code>
237 *
238 * @see Match
239 * @see TimeMetric
240 *
241 */
242 public static class Matcher extends BaseMatcher<TimeMetric.Match> {
243 /**
244 * Initializes the pattern matcher within an existing VIATRA Query engine.
245 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
246 *
247 * @param engine the existing VIATRA Query engine in which this matcher will be created.
248 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
249 *
250 */
251 public static TimeMetric.Matcher on(final ViatraQueryEngine engine) {
252 // check if matcher already exists
253 Matcher matcher = engine.getExistingMatcher(querySpecification());
254 if (matcher == null) {
255 matcher = (Matcher)engine.getMatcher(querySpecification());
256 }
257 return matcher;
258 }
259
260 /**
261 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
262 * @return an initialized matcher
263 * @noreference This method is for internal matcher initialization by the framework, do not call it manually.
264 *
265 */
266 public static TimeMetric.Matcher create() {
267 return new Matcher();
268 }
269
270 private static final int POSITION_TIME = 0;
271
272 private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(TimeMetric.Matcher.class);
273
274 /**
275 * Initializes the pattern matcher within an existing VIATRA Query engine.
276 * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned.
277 *
278 * @param engine the existing VIATRA Query engine in which this matcher will be created.
279 * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation
280 *
281 */
282 private Matcher() {
283 super(querySpecification());
284 }
285
286 /**
287 * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters.
288 * @param pTime the fixed value of pattern parameter Time, or null if not bound.
289 * @return matches represented as a Match object.
290 *
291 */
292 public Collection<TimeMetric.Match> getAllMatches(final Double pTime) {
293 return rawStreamAllMatches(new Object[]{pTime}).collect(Collectors.toSet());
294 }
295
296 /**
297 * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters.
298 * </p>
299 * <strong>NOTE</strong>: It is important not to modify the source model while the stream is being processed.
300 * If the match set of the pattern changes during processing, the contents of the stream is <strong>undefined</strong>.
301 * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code.
302 * @param pTime the fixed value of pattern parameter Time, or null if not bound.
303 * @return a stream of matches represented as a Match object.
304 *
305 */
306 public Stream<TimeMetric.Match> streamAllMatches(final Double pTime) {
307 return rawStreamAllMatches(new Object[]{pTime});
308 }
309
310 /**
311 * Returns an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
312 * Neither determinism nor randomness of selection is guaranteed.
313 * @param pTime the fixed value of pattern parameter Time, or null if not bound.
314 * @return a match represented as a Match object, or null if no match is found.
315 *
316 */
317 public Optional<TimeMetric.Match> getOneArbitraryMatch(final Double pTime) {
318 return rawGetOneArbitraryMatch(new Object[]{pTime});
319 }
320
321 /**
322 * Indicates whether the given combination of specified pattern parameters constitute a valid pattern match,
323 * under any possible substitution of the unspecified parameters (if any).
324 * @param pTime the fixed value of pattern parameter Time, or null if not bound.
325 * @return true if the input is a valid (partial) match of the pattern.
326 *
327 */
328 public boolean hasMatch(final Double pTime) {
329 return rawHasMatch(new Object[]{pTime});
330 }
331
332 /**
333 * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters.
334 * @param pTime the fixed value of pattern parameter Time, or null if not bound.
335 * @return the number of pattern matches found.
336 *
337 */
338 public int countMatches(final Double pTime) {
339 return rawCountMatches(new Object[]{pTime});
340 }
341
342 /**
343 * Executes the given processor on an arbitrarily chosen match of the pattern that conforms to the given fixed values of some parameters.
344 * Neither determinism nor randomness of selection is guaranteed.
345 * @param pTime the fixed value of pattern parameter Time, or null if not bound.
346 * @param processor the action that will process the selected match.
347 * @return true if the pattern has at least one match with the given parameter values, false if the processor was not invoked
348 *
349 */
350 public boolean forOneArbitraryMatch(final Double pTime, final Consumer<? super TimeMetric.Match> processor) {
351 return rawForOneArbitraryMatch(new Object[]{pTime}, processor);
352 }
353
354 /**
355 * Returns a new (partial) match.
356 * This can be used e.g. to call the matcher with a partial match.
357 * <p>The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object.
358 * @param pTime the fixed value of pattern parameter Time, or null if not bound.
359 * @return the (partial) match object.
360 *
361 */
362 public TimeMetric.Match newMatch(final Double pTime) {
363 return TimeMetric.Match.newMatch(pTime);
364 }
365
366 /**
367 * Retrieve the set of values that occur in matches for Time.
368 * @return the Set of all values or empty set if there are no matches
369 *
370 */
371 protected Stream<Double> rawStreamAllValuesOfTime(final Object[] parameters) {
372 return rawStreamAllValues(POSITION_TIME, parameters).map(Double.class::cast);
373 }
374
375 /**
376 * Retrieve the set of values that occur in matches for Time.
377 * @return the Set of all values or empty set if there are no matches
378 *
379 */
380 public Set<Double> getAllValuesOfTime() {
381 return rawStreamAllValuesOfTime(emptyArray()).collect(Collectors.toSet());
382 }
383
384 /**
385 * Retrieve the set of values that occur in matches for Time.
386 * @return the Set of all values or empty set if there are no matches
387 *
388 */
389 public Stream<Double> streamAllValuesOfTime() {
390 return rawStreamAllValuesOfTime(emptyArray());
391 }
392
393 @Override
394 protected TimeMetric.Match tupleToMatch(final Tuple t) {
395 try {
396 return TimeMetric.Match.newMatch((Double) t.get(POSITION_TIME));
397 } catch(ClassCastException e) {
398 LOGGER.error("Element(s) in tuple not properly typed!",e);
399 return null;
400 }
401 }
402
403 @Override
404 protected TimeMetric.Match arrayToMatch(final Object[] match) {
405 try {
406 return TimeMetric.Match.newMatch((Double) match[POSITION_TIME]);
407 } catch(ClassCastException e) {
408 LOGGER.error("Element(s) in array not properly typed!",e);
409 return null;
410 }
411 }
412
413 @Override
414 protected TimeMetric.Match arrayToMatchMutable(final Object[] match) {
415 try {
416 return TimeMetric.Match.newMutableMatch((Double) match[POSITION_TIME]);
417 } catch(ClassCastException e) {
418 LOGGER.error("Element(s) in array not properly typed!",e);
419 return null;
420 }
421 }
422
423 /**
424 * @return the singleton instance of the query specification of this pattern
425 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
426 *
427 */
428 public static IQuerySpecification<TimeMetric.Matcher> querySpecification() {
429 return TimeMetric.instance();
430 }
431 }
432
433 private TimeMetric() {
434 super(GeneratedPQuery.INSTANCE);
435 }
436
437 /**
438 * @return the singleton instance of the query specification
439 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
440 *
441 */
442 public static TimeMetric instance() {
443 try{
444 return LazyHolder.INSTANCE;
445 } catch (ExceptionInInitializerError err) {
446 throw processInitializerError(err);
447 }
448 }
449
450 @Override
451 protected TimeMetric.Matcher instantiate(final ViatraQueryEngine engine) {
452 return TimeMetric.Matcher.on(engine);
453 }
454
455 @Override
456 public TimeMetric.Matcher instantiate() {
457 return TimeMetric.Matcher.create();
458 }
459
460 @Override
461 public TimeMetric.Match newEmptyMatch() {
462 return TimeMetric.Match.newEmptyMatch();
463 }
464
465 @Override
466 public TimeMetric.Match newMatch(final Object... parameters) {
467 return TimeMetric.Match.newMatch((java.lang.Double) parameters[0]);
468 }
469
470 /**
471 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.TimeMetric (visibility: PUBLIC, simpleName: TimeMetric, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.TimeMetric, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
472 * <b>not</b> at the class load time of the outer class,
473 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.TimeMetric (visibility: PUBLIC, simpleName: TimeMetric, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.TimeMetric, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
474 *
475 * <p> This workaround is required e.g. to support recursion.
476 *
477 */
478 private static class LazyHolder {
479 private static final TimeMetric INSTANCE = new TimeMetric();
480
481 /**
482 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
483 * This initialization order is required to support indirect recursion.
484 *
485 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
486 *
487 */
488 private static final Object STATIC_INITIALIZER = ensureInitialized();
489
490 public static Object ensureInitialized() {
491 INSTANCE.ensureInitializedInternal();
492 return null;
493 }
494 }
495
496 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
497 private static final TimeMetric.GeneratedPQuery INSTANCE = new GeneratedPQuery();
498
499 private final PParameter parameter_Time = new PParameter("Time", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
500
501 private final List<PParameter> parameters = Arrays.asList(parameter_Time);
502
503 private GeneratedPQuery() {
504 super(PVisibility.PUBLIC);
505 }
506
507 @Override
508 public String getFullyQualifiedName() {
509 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.timeMetric";
510 }
511
512 @Override
513 public List<String> getParameterNames() {
514 return Arrays.asList("Time");
515 }
516
517 @Override
518 public List<PParameter> getParameters() {
519 return parameters;
520 }
521
522 @Override
523 public Set<PBody> doGetContainedBodies() {
524 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
525 Set<PBody> bodies = new LinkedHashSet<>();
526 {
527 PBody body = new PBody(this);
528 PVariable var_Time = body.getOrCreateVariableByName("Time");
529 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
530 PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
531 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Time), new JavaTransitiveInstancesKey(java.lang.Double.class));
532 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
533 new ExportedParameter(body, var_Time, parameter_Time)
534 ));
535 // Time == sum find missionTime(_, #_)
536 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
537 new AggregatorConstraint(new sum().getAggregatorLogic(Double.class), body, Tuples.flatTupleOf(var___0_, var___1_), MissionTime.instance().getInternalQueryRepresentation(), var__virtual_0_, 1);
538 new Equality(body, var_Time, var__virtual_0_);
539 bodies.add(body);
540 }
541 return bodies;
542 }
543 }
544}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore
index b3aca298..f72ce8f1 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore
@@ -13,3 +13,21 @@
13/.CommSubsystemGainLow.java._trace 13/.CommSubsystemGainLow.java._trace
14/.CommSubsystemGainMedium.java._trace 14/.CommSubsystemGainMedium.java._trace
15/.CommSubsystemBandUhf.java._trace 15/.CommSubsystemBandUhf.java._trace
16/.MissionCoverage.java._trace
17/.SatelliteMetricsAll.java._trace
18/.MissionTime.java._trace
19/.TimeMetric.java._trace
20/.TransmitTime.java._trace
21/.TransmitRate.java._trace
22/.SpacecraftUplink.java._trace
23/.MissionScienceData.java._trace
24/.IndirectScienceData.java._trace
25/.ScienceData.java._trace
26/.IncomingData.java._trace
27/.MissionCost.java._trace
28/.BasePrice.java._trace
29/.SpacecraftOfKind.java._trace
30/.InterferometryPayloadCost.java._trace
31/.AdditionalCommSubsystemCost.java._trace
32/.SpacecraftWithTwoCommSubsystems.java._trace
33/.SpacecraftCost.java._trace
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AdditionalCommSubsystemCost.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AdditionalCommSubsystemCost.java
new file mode 100644
index 00000000..61b1da52
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/AdditionalCommSubsystemCost.java
@@ -0,0 +1,173 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithTwoCommSubsystems;
7import java.util.Arrays;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Set;
11import org.eclipse.emf.ecore.EClass;
12import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
14import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
15import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
16import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
17import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
18import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
19import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
20import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
21import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
22import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
23import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue;
24import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
25import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
26import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
27import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
28import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
29import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
30
31/**
32 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
33 *
34 * <p>Original source:
35 * <code><pre>
36 * private pattern additionalCommSubsystemCost(Spacecraft : Spacecraft, Cost : java Double) {
37 * find spacecraftWithTwoCommSubsystems(Spacecraft);
38 * Cost == 100000.0;
39 * } or {
40 * neg find spacecraftWithTwoCommSubsystems(Spacecraft);
41 * Cost == 0.0;
42 * }
43 * </pre></code>
44 *
45 * @see GenericPatternMatcher
46 * @see GenericPatternMatch
47 *
48 */
49@SuppressWarnings("all")
50public final class AdditionalCommSubsystemCost extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
51 private AdditionalCommSubsystemCost() {
52 super(GeneratedPQuery.INSTANCE);
53 }
54
55 /**
56 * @return the singleton instance of the query specification
57 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
58 *
59 */
60 public static AdditionalCommSubsystemCost instance() {
61 try{
62 return LazyHolder.INSTANCE;
63 } catch (ExceptionInInitializerError err) {
64 throw processInitializerError(err);
65 }
66 }
67
68 /**
69 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AdditionalCommSubsystemCost (visibility: PUBLIC, simpleName: AdditionalCommSubsystemCost, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AdditionalCommSubsystemCost, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
70 * <b>not</b> at the class load time of the outer class,
71 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AdditionalCommSubsystemCost (visibility: PUBLIC, simpleName: AdditionalCommSubsystemCost, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AdditionalCommSubsystemCost, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
72 *
73 * <p> This workaround is required e.g. to support recursion.
74 *
75 */
76 private static class LazyHolder {
77 private static final AdditionalCommSubsystemCost INSTANCE = new AdditionalCommSubsystemCost();
78
79 /**
80 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
81 * This initialization order is required to support indirect recursion.
82 *
83 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
84 *
85 */
86 private static final Object STATIC_INITIALIZER = ensureInitialized();
87
88 public static Object ensureInitialized() {
89 INSTANCE.ensureInitializedInternal();
90 return null;
91 }
92 }
93
94 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
95 private static final AdditionalCommSubsystemCost.GeneratedPQuery INSTANCE = new GeneratedPQuery();
96
97 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);
98
99 private final PParameter parameter_Cost = new PParameter("Cost", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
100
101 private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_Cost);
102
103 private GeneratedPQuery() {
104 super(PVisibility.PRIVATE);
105 }
106
107 @Override
108 public String getFullyQualifiedName() {
109 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.additionalCommSubsystemCost";
110 }
111
112 @Override
113 public List<String> getParameterNames() {
114 return Arrays.asList("Spacecraft","Cost");
115 }
116
117 @Override
118 public List<PParameter> getParameters() {
119 return parameters;
120 }
121
122 @Override
123 public Set<PBody> doGetContainedBodies() {
124 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
125 Set<PBody> bodies = new LinkedHashSet<>();
126 {
127 PBody body = new PBody(this);
128 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
129 PVariable var_Cost = body.getOrCreateVariableByName("Cost");
130 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
131 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Cost), new JavaTransitiveInstancesKey(java.lang.Double.class));
132 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
133 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
134 new ExportedParameter(body, var_Cost, parameter_Cost)
135 ));
136 // find spacecraftWithTwoCommSubsystems(Spacecraft)
137 new PositivePatternCall(body, Tuples.flatTupleOf(var_Spacecraft), SpacecraftWithTwoCommSubsystems.instance().getInternalQueryRepresentation());
138 // Cost == 100000.0
139 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
140 new ConstantValue(body, var__virtual_0_, 100000.0);
141 new Equality(body, var_Cost, var__virtual_0_);
142 bodies.add(body);
143 }
144 {
145 PBody body = new PBody(this);
146 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
147 PVariable var_Cost = body.getOrCreateVariableByName("Cost");
148 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
149 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Cost), new JavaTransitiveInstancesKey(java.lang.Double.class));
150 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
151 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
152 new ExportedParameter(body, var_Cost, parameter_Cost)
153 ));
154 // neg find spacecraftWithTwoCommSubsystems(Spacecraft)
155 new NegativePatternCall(body, Tuples.flatTupleOf(var_Spacecraft), SpacecraftWithTwoCommSubsystems.instance().getInternalQueryRepresentation());
156 // Cost == 0.0
157 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
158 new ConstantValue(body, var__virtual_0_, 0.0);
159 new Equality(body, var_Cost, var__virtual_0_);
160 bodies.add(body);
161 }
162 return bodies;
163 }
164 }
165
166 private static double evaluateExpression_1_1() {
167 return 100000.0;
168 }
169
170 private static double evaluateExpression_2_1() {
171 return 0.0;
172 }
173}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/BasePrice.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/BasePrice.java
new file mode 100644
index 00000000..c70f4c8b
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/BasePrice.java
@@ -0,0 +1,216 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import java.util.Arrays;
7import java.util.LinkedHashSet;
8import java.util.List;
9import java.util.Set;
10import org.eclipse.emf.ecore.EClass;
11import org.eclipse.emf.ecore.EDataType;
12import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
14import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
15import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
16import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
17import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
18import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
19import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
20import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
21import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
22import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
23import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
24import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue;
25import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
26import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
27import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
28import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
29import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
30
31/**
32 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
33 *
34 * <p>Original source:
35 * <code><pre>
36 * private pattern basePrice(Spacecraft : Spacecraft, BasePrice : java Double) {
37 * Spacecraft.kind(Spacecraft, SpacecraftKind::CubeSat3U);
38 * BasePrice == 250000.0;
39 * } or {
40 * Spacecraft.kind(Spacecraft, SpacecraftKind::CubeSat6U);
41 * BasePrice == 750000.0;
42 * } or {
43 * Spacecraft.kind(Spacecraft, SpacecraftKind::SmallSat);
44 * BasePrice == 3000000.0;
45 * }
46 * </pre></code>
47 *
48 * @see GenericPatternMatcher
49 * @see GenericPatternMatch
50 *
51 */
52@SuppressWarnings("all")
53public final class BasePrice extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
54 private BasePrice() {
55 super(GeneratedPQuery.INSTANCE);
56 }
57
58 /**
59 * @return the singleton instance of the query specification
60 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
61 *
62 */
63 public static BasePrice instance() {
64 try{
65 return LazyHolder.INSTANCE;
66 } catch (ExceptionInInitializerError err) {
67 throw processInitializerError(err);
68 }
69 }
70
71 /**
72 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice (visibility: PUBLIC, simpleName: BasePrice, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
73 * <b>not</b> at the class load time of the outer class,
74 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice (visibility: PUBLIC, simpleName: BasePrice, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
75 *
76 * <p> This workaround is required e.g. to support recursion.
77 *
78 */
79 private static class LazyHolder {
80 private static final BasePrice INSTANCE = new BasePrice();
81
82 /**
83 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
84 * This initialization order is required to support indirect recursion.
85 *
86 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
87 *
88 */
89 private static final Object STATIC_INITIALIZER = ensureInitialized();
90
91 public static Object ensureInitialized() {
92 INSTANCE.ensureInitializedInternal();
93 return null;
94 }
95 }
96
97 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
98 private static final BasePrice.GeneratedPQuery INSTANCE = new GeneratedPQuery();
99
100 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);
101
102 private final PParameter parameter_BasePrice = new PParameter("BasePrice", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
103
104 private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_BasePrice);
105
106 private GeneratedPQuery() {
107 super(PVisibility.PRIVATE);
108 }
109
110 @Override
111 public String getFullyQualifiedName() {
112 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.basePrice";
113 }
114
115 @Override
116 public List<String> getParameterNames() {
117 return Arrays.asList("Spacecraft","BasePrice");
118 }
119
120 @Override
121 public List<PParameter> getParameters() {
122 return parameters;
123 }
124
125 @Override
126 public Set<PBody> doGetContainedBodies() {
127 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
128 Set<PBody> bodies = new LinkedHashSet<>();
129 {
130 PBody body = new PBody(this);
131 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
132 PVariable var_BasePrice = body.getOrCreateVariableByName("BasePrice");
133 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
134 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_BasePrice), new JavaTransitiveInstancesKey(java.lang.Double.class));
135 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
136 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
137 new ExportedParameter(body, var_BasePrice, parameter_BasePrice)
138 ));
139 // Spacecraft.kind(Spacecraft, SpacecraftKind::CubeSat3U)
140 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
141 new ConstantValue(body, var__virtual_0_, getEnumLiteral("http://www.example.org/satellite", "SpacecraftKind", "CubeSat3U").getInstance());
142 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
143 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
144 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "Spacecraft", "kind")));
145 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "SpacecraftKind")));
146 new Equality(body, var__virtual_1_, var__virtual_0_);
147 // BasePrice == 250000.0
148 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
149 new ConstantValue(body, var__virtual_2_, 250000.0);
150 new Equality(body, var_BasePrice, var__virtual_2_);
151 bodies.add(body);
152 }
153 {
154 PBody body = new PBody(this);
155 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
156 PVariable var_BasePrice = body.getOrCreateVariableByName("BasePrice");
157 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
158 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_BasePrice), new JavaTransitiveInstancesKey(java.lang.Double.class));
159 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
160 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
161 new ExportedParameter(body, var_BasePrice, parameter_BasePrice)
162 ));
163 // Spacecraft.kind(Spacecraft, SpacecraftKind::CubeSat6U)
164 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
165 new ConstantValue(body, var__virtual_0_, getEnumLiteral("http://www.example.org/satellite", "SpacecraftKind", "CubeSat6U").getInstance());
166 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
167 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
168 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "Spacecraft", "kind")));
169 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "SpacecraftKind")));
170 new Equality(body, var__virtual_1_, var__virtual_0_);
171 // BasePrice == 750000.0
172 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
173 new ConstantValue(body, var__virtual_2_, 750000.0);
174 new Equality(body, var_BasePrice, var__virtual_2_);
175 bodies.add(body);
176 }
177 {
178 PBody body = new PBody(this);
179 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
180 PVariable var_BasePrice = body.getOrCreateVariableByName("BasePrice");
181 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
182 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_BasePrice), new JavaTransitiveInstancesKey(java.lang.Double.class));
183 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
184 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
185 new ExportedParameter(body, var_BasePrice, parameter_BasePrice)
186 ));
187 // Spacecraft.kind(Spacecraft, SpacecraftKind::SmallSat)
188 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
189 new ConstantValue(body, var__virtual_0_, getEnumLiteral("http://www.example.org/satellite", "SpacecraftKind", "SmallSat").getInstance());
190 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
191 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
192 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "Spacecraft", "kind")));
193 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "SpacecraftKind")));
194 new Equality(body, var__virtual_1_, var__virtual_0_);
195 // BasePrice == 3000000.0
196 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
197 new ConstantValue(body, var__virtual_2_, 3000000.0);
198 new Equality(body, var_BasePrice, var__virtual_2_);
199 bodies.add(body);
200 }
201 return bodies;
202 }
203 }
204
205 private static double evaluateExpression_1_1() {
206 return 250000.0;
207 }
208
209 private static double evaluateExpression_2_1() {
210 return 750000.0;
211 }
212
213 private static double evaluateExpression_3_1() {
214 return 3000000.0;
215 }
216}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IncomingData.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IncomingData.java
new file mode 100644
index 00000000..114bbf33
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/IncomingData.java
@@ -0,0 +1,145 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink;
7import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.ScienceData;
8import java.util.Arrays;
9import java.util.LinkedHashSet;
10import java.util.List;
11import java.util.Set;
12import org.eclipse.emf.ecore.EClass;
13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
14import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
15import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
16import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
17import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
18import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
19import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
20import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
21import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
22import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
23import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
24import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
25import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
26import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
27import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
28
29/**
30 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
31 *
32 * <p>Original source:
33 * <code><pre>
34 * private pattern incomingData(Spacecraft : Spacecraft, Source : Spacecraft, Data : java Double) {
35 * find indirectCommunicationLink(Source, Spacecraft);
36 * find scienceData(Source, Data);
37 * }
38 * </pre></code>
39 *
40 * @see GenericPatternMatcher
41 * @see GenericPatternMatch
42 *
43 */
44@SuppressWarnings("all")
45public final class IncomingData extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
46 private IncomingData() {
47 super(GeneratedPQuery.INSTANCE);
48 }
49
50 /**
51 * @return the singleton instance of the query specification
52 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
53 *
54 */
55 public static IncomingData instance() {
56 try{
57 return LazyHolder.INSTANCE;
58 } catch (ExceptionInInitializerError err) {
59 throw processInitializerError(err);
60 }
61 }
62
63 /**
64 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData (visibility: PUBLIC, simpleName: IncomingData, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
65 * <b>not</b> at the class load time of the outer class,
66 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData (visibility: PUBLIC, simpleName: IncomingData, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
67 *
68 * <p> This workaround is required e.g. to support recursion.
69 *
70 */
71 private static class LazyHolder {
72 private static final IncomingData INSTANCE = new IncomingData();
73
74 /**
75 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
76 * This initialization order is required to support indirect recursion.
77 *
78 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
79 *
80 */
81 private static final Object STATIC_INITIALIZER = ensureInitialized();
82
83 public static Object ensureInitialized() {
84 INSTANCE.ensureInitializedInternal();
85 return null;
86 }
87 }
88
89 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
90 private static final IncomingData.GeneratedPQuery INSTANCE = new GeneratedPQuery();
91
92 private final PParameter parameter_Spacecraft = new PParameter("Spacecraft", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT);
93
94 private final PParameter parameter_Source = new PParameter("Source", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT);
95
96 private final PParameter parameter_Data = new PParameter("Data", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
97
98 private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_Source, parameter_Data);
99
100 private GeneratedPQuery() {
101 super(PVisibility.PRIVATE);
102 }
103
104 @Override
105 public String getFullyQualifiedName() {
106 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.incomingData";
107 }
108
109 @Override
110 public List<String> getParameterNames() {
111 return Arrays.asList("Spacecraft","Source","Data");
112 }
113
114 @Override
115 public List<PParameter> getParameters() {
116 return parameters;
117 }
118
119 @Override
120 public Set<PBody> doGetContainedBodies() {
121 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
122 Set<PBody> bodies = new LinkedHashSet<>();
123 {
124 PBody body = new PBody(this);
125 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
126 PVariable var_Source = body.getOrCreateVariableByName("Source");
127 PVariable var_Data = body.getOrCreateVariableByName("Data");
128 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
129 new TypeConstraint(body, Tuples.flatTupleOf(var_Source), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
130 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Data), new JavaTransitiveInstancesKey(java.lang.Double.class));
131 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
132 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
133 new ExportedParameter(body, var_Source, parameter_Source),
134 new ExportedParameter(body, var_Data, parameter_Data)
135 ));
136 // find indirectCommunicationLink(Source, Spacecraft)
137 new PositivePatternCall(body, Tuples.flatTupleOf(var_Source, var_Spacecraft), IndirectCommunicationLink.instance().getInternalQueryRepresentation());
138 // find scienceData(Source, Data)
139 new PositivePatternCall(body, Tuples.flatTupleOf(var_Source, var_Data), ScienceData.instance().getInternalQueryRepresentation());
140 bodies.add(body);
141 }
142 return bodies;
143 }
144 }
145}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/InterferometryPayloadCost.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/InterferometryPayloadCost.java
new file mode 100644
index 00000000..205d896a
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/InterferometryPayloadCost.java
@@ -0,0 +1,175 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithInterferometryPayload;
7import java.util.Arrays;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Set;
11import org.eclipse.emf.ecore.EClass;
12import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
14import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
15import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
16import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
17import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
18import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
19import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
20import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
21import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall;
22import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
23import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue;
24import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
25import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
26import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
27import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
28import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
29import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
30
31/**
32 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
33 *
34 * <p>Original source:
35 * <code><pre>
36 * private pattern interferometryPayloadCost(Spacecraft : Spacecraft, Cost : java Double) {
37 * find spacecraftWithInterferometryPayload(_, Spacecraft);
38 * Cost == 50000.0;
39 * } or {
40 * neg find spacecraftWithInterferometryPayload(_, Spacecraft);
41 * Cost == 0.0;
42 * }
43 * </pre></code>
44 *
45 * @see GenericPatternMatcher
46 * @see GenericPatternMatch
47 *
48 */
49@SuppressWarnings("all")
50public final class InterferometryPayloadCost extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
51 private InterferometryPayloadCost() {
52 super(GeneratedPQuery.INSTANCE);
53 }
54
55 /**
56 * @return the singleton instance of the query specification
57 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
58 *
59 */
60 public static InterferometryPayloadCost instance() {
61 try{
62 return LazyHolder.INSTANCE;
63 } catch (ExceptionInInitializerError err) {
64 throw processInitializerError(err);
65 }
66 }
67
68 /**
69 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.InterferometryPayloadCost (visibility: PUBLIC, simpleName: InterferometryPayloadCost, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.InterferometryPayloadCost, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
70 * <b>not</b> at the class load time of the outer class,
71 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.InterferometryPayloadCost (visibility: PUBLIC, simpleName: InterferometryPayloadCost, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.InterferometryPayloadCost, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
72 *
73 * <p> This workaround is required e.g. to support recursion.
74 *
75 */
76 private static class LazyHolder {
77 private static final InterferometryPayloadCost INSTANCE = new InterferometryPayloadCost();
78
79 /**
80 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
81 * This initialization order is required to support indirect recursion.
82 *
83 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
84 *
85 */
86 private static final Object STATIC_INITIALIZER = ensureInitialized();
87
88 public static Object ensureInitialized() {
89 INSTANCE.ensureInitializedInternal();
90 return null;
91 }
92 }
93
94 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
95 private static final InterferometryPayloadCost.GeneratedPQuery INSTANCE = new GeneratedPQuery();
96
97 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);
98
99 private final PParameter parameter_Cost = new PParameter("Cost", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
100
101 private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_Cost);
102
103 private GeneratedPQuery() {
104 super(PVisibility.PRIVATE);
105 }
106
107 @Override
108 public String getFullyQualifiedName() {
109 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.interferometryPayloadCost";
110 }
111
112 @Override
113 public List<String> getParameterNames() {
114 return Arrays.asList("Spacecraft","Cost");
115 }
116
117 @Override
118 public List<PParameter> getParameters() {
119 return parameters;
120 }
121
122 @Override
123 public Set<PBody> doGetContainedBodies() {
124 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
125 Set<PBody> bodies = new LinkedHashSet<>();
126 {
127 PBody body = new PBody(this);
128 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
129 PVariable var_Cost = body.getOrCreateVariableByName("Cost");
130 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
131 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
132 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Cost), new JavaTransitiveInstancesKey(java.lang.Double.class));
133 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
134 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
135 new ExportedParameter(body, var_Cost, parameter_Cost)
136 ));
137 // find spacecraftWithInterferometryPayload(_, Spacecraft)
138 new PositivePatternCall(body, Tuples.flatTupleOf(var___0_, var_Spacecraft), SpacecraftWithInterferometryPayload.instance().getInternalQueryRepresentation());
139 // Cost == 50000.0
140 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
141 new ConstantValue(body, var__virtual_0_, 50000.0);
142 new Equality(body, var_Cost, var__virtual_0_);
143 bodies.add(body);
144 }
145 {
146 PBody body = new PBody(this);
147 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
148 PVariable var_Cost = body.getOrCreateVariableByName("Cost");
149 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
150 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
151 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Cost), new JavaTransitiveInstancesKey(java.lang.Double.class));
152 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
153 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
154 new ExportedParameter(body, var_Cost, parameter_Cost)
155 ));
156 // neg find spacecraftWithInterferometryPayload(_, Spacecraft)
157 new NegativePatternCall(body, Tuples.flatTupleOf(var___0_, var_Spacecraft), SpacecraftWithInterferometryPayload.instance().getInternalQueryRepresentation());
158 // Cost == 0.0
159 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
160 new ConstantValue(body, var__virtual_0_, 0.0);
161 new Equality(body, var_Cost, var__virtual_0_);
162 bodies.add(body);
163 }
164 return bodies;
165 }
166 }
167
168 private static double evaluateExpression_1_1() {
169 return 50000.0;
170 }
171
172 private static double evaluateExpression_2_1() {
173 return 0.0;
174 }
175}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionCost.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionCost.java
new file mode 100644
index 00000000..0374195f
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionCost.java
@@ -0,0 +1,183 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftCost;
7import java.util.Arrays;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Set;
11import org.eclipse.emf.ecore.EClass;
12import org.eclipse.emf.ecore.EDataType;
13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
14import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
15import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
16import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
17import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
18import org.eclipse.viatra.query.runtime.matchers.aggregators.sum;
19import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
20import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
21import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator;
22import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider;
23import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
24import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
25import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.AggregatorConstraint;
26import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
27import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
28import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
35
36/**
37 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
38 *
39 * <p>Original source:
40 * <code><pre>
41 * private pattern missionCost(Mission : InterferometryMission, Cost : java Double) {
42 * InterferometryMission.observationTime(Mission, ObservationTime);
43 * SpacecraftCost == sum find spacecraftCost(Mission, _, #_);
44 * Cost == eval(SpacecraftCost + 100000.0 ObservationTime);
45 * }
46 * </pre></code>
47 *
48 * @see GenericPatternMatcher
49 * @see GenericPatternMatch
50 *
51 */
52@SuppressWarnings("all")
53public final class MissionCost extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
54 private MissionCost() {
55 super(GeneratedPQuery.INSTANCE);
56 }
57
58 /**
59 * @return the singleton instance of the query specification
60 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
61 *
62 */
63 public static MissionCost instance() {
64 try{
65 return LazyHolder.INSTANCE;
66 } catch (ExceptionInInitializerError err) {
67 throw processInitializerError(err);
68 }
69 }
70
71 /**
72 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCost (visibility: PUBLIC, simpleName: MissionCost, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCost, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
73 * <b>not</b> at the class load time of the outer class,
74 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCost (visibility: PUBLIC, simpleName: MissionCost, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCost, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
75 *
76 * <p> This workaround is required e.g. to support recursion.
77 *
78 */
79 private static class LazyHolder {
80 private static final MissionCost INSTANCE = new MissionCost();
81
82 /**
83 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
84 * This initialization order is required to support indirect recursion.
85 *
86 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
87 *
88 */
89 private static final Object STATIC_INITIALIZER = ensureInitialized();
90
91 public static Object ensureInitialized() {
92 INSTANCE.ensureInitializedInternal();
93 return null;
94 }
95 }
96
97 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
98 private static final MissionCost.GeneratedPQuery INSTANCE = new GeneratedPQuery();
99
100 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);
101
102 private final PParameter parameter_Cost = new PParameter("Cost", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
103
104 private final List<PParameter> parameters = Arrays.asList(parameter_Mission, parameter_Cost);
105
106 private GeneratedPQuery() {
107 super(PVisibility.PRIVATE);
108 }
109
110 @Override
111 public String getFullyQualifiedName() {
112 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.missionCost";
113 }
114
115 @Override
116 public List<String> getParameterNames() {
117 return Arrays.asList("Mission","Cost");
118 }
119
120 @Override
121 public List<PParameter> getParameters() {
122 return parameters;
123 }
124
125 @Override
126 public Set<PBody> doGetContainedBodies() {
127 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
128 Set<PBody> bodies = new LinkedHashSet<>();
129 {
130 PBody body = new PBody(this);
131 PVariable var_Mission = body.getOrCreateVariableByName("Mission");
132 PVariable var_Cost = body.getOrCreateVariableByName("Cost");
133 PVariable var_ObservationTime = body.getOrCreateVariableByName("ObservationTime");
134 PVariable var_SpacecraftCost = body.getOrCreateVariableByName("SpacecraftCost");
135 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
136 PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
137 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "InterferometryMission")));
138 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Cost), new JavaTransitiveInstancesKey(java.lang.Double.class));
139 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
140 new ExportedParameter(body, var_Mission, parameter_Mission),
141 new ExportedParameter(body, var_Cost, parameter_Cost)
142 ));
143 // InterferometryMission.observationTime(Mission, ObservationTime)
144 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "InterferometryMission")));
145 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
146 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "InterferometryMission", "observationTime")));
147 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EFloat")));
148 new Equality(body, var__virtual_0_, var_ObservationTime);
149 // SpacecraftCost == sum find spacecraftCost(Mission, _, #_)
150 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
151 new AggregatorConstraint(new sum().getAggregatorLogic(Double.class), body, Tuples.flatTupleOf(var_Mission, var___0_, var___1_), SpacecraftCost.instance().getInternalQueryRepresentation(), var__virtual_1_, 2);
152 new Equality(body, var_SpacecraftCost, var__virtual_1_);
153 // Cost == eval(SpacecraftCost + 100000.0 * ObservationTime)
154 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
155 new ExpressionEvaluation(body, new IExpressionEvaluator() {
156
157 @Override
158 public String getShortDescription() {
159 return "Expression evaluation from pattern missionCost";
160 }
161
162 @Override
163 public Iterable<String> getInputParameterNames() {
164 return Arrays.asList("ObservationTime", "SpacecraftCost");}
165
166 @Override
167 public Object evaluateExpression(IValueProvider provider) throws Exception {
168 Float ObservationTime = (Float) provider.getValue("ObservationTime");
169 Double SpacecraftCost = (Double) provider.getValue("SpacecraftCost");
170 return evaluateExpression_1_1(ObservationTime, SpacecraftCost);
171 }
172 }, var__virtual_2_ );
173 new Equality(body, var_Cost, var__virtual_2_);
174 bodies.add(body);
175 }
176 return bodies;
177 }
178 }
179
180 private static double evaluateExpression_1_1(final Float ObservationTime, final Double SpacecraftCost) {
181 return ((SpacecraftCost).doubleValue() + (100000.0 * (ObservationTime).floatValue()));
182 }
183}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionCoverage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionCoverage.java
new file mode 100644
index 00000000..583c2175
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionCoverage.java
@@ -0,0 +1,183 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithInterferometryPayload;
7import java.util.Arrays;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Set;
11import org.eclipse.emf.ecore.EClass;
12import org.eclipse.emf.ecore.EDataType;
13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
14import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
15import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
16import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
17import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
18import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
19import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
20import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator;
21import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider;
22import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
23import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
24import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
25import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
26import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
27import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.PatternMatchCounter;
28import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
30import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
33import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
34
35/**
36 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
37 *
38 * <p>Original source:
39 * <code><pre>
40 * private pattern missionCoverage(Mission : InterferometryMission, Coverage : java Double) {
41 * InterferometryMission.observationTime(Mission, ObservationTime);
42 * ObserverCount == count find spacecraftWithInterferometryPayload(Mission, _);
43 * Coverage == eval(Math.pow(1 - 2.0 / ObserverCount, 1 + 9 (1.0 / ObservationTime)) + 0.05 ObservationTime / 3);
44 * }
45 * </pre></code>
46 *
47 * @see GenericPatternMatcher
48 * @see GenericPatternMatch
49 *
50 */
51@SuppressWarnings("all")
52public final class MissionCoverage extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
53 private MissionCoverage() {
54 super(GeneratedPQuery.INSTANCE);
55 }
56
57 /**
58 * @return the singleton instance of the query specification
59 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
60 *
61 */
62 public static MissionCoverage instance() {
63 try{
64 return LazyHolder.INSTANCE;
65 } catch (ExceptionInInitializerError err) {
66 throw processInitializerError(err);
67 }
68 }
69
70 /**
71 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCoverage (visibility: PUBLIC, simpleName: MissionCoverage, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCoverage, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
72 * <b>not</b> at the class load time of the outer class,
73 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCoverage (visibility: PUBLIC, simpleName: MissionCoverage, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCoverage, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
74 *
75 * <p> This workaround is required e.g. to support recursion.
76 *
77 */
78 private static class LazyHolder {
79 private static final MissionCoverage INSTANCE = new MissionCoverage();
80
81 /**
82 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
83 * This initialization order is required to support indirect recursion.
84 *
85 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
86 *
87 */
88 private static final Object STATIC_INITIALIZER = ensureInitialized();
89
90 public static Object ensureInitialized() {
91 INSTANCE.ensureInitializedInternal();
92 return null;
93 }
94 }
95
96 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
97 private static final MissionCoverage.GeneratedPQuery INSTANCE = new GeneratedPQuery();
98
99 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);
100
101 private final PParameter parameter_Coverage = new PParameter("Coverage", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
102
103 private final List<PParameter> parameters = Arrays.asList(parameter_Mission, parameter_Coverage);
104
105 private GeneratedPQuery() {
106 super(PVisibility.PRIVATE);
107 }
108
109 @Override
110 public String getFullyQualifiedName() {
111 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.missionCoverage";
112 }
113
114 @Override
115 public List<String> getParameterNames() {
116 return Arrays.asList("Mission","Coverage");
117 }
118
119 @Override
120 public List<PParameter> getParameters() {
121 return parameters;
122 }
123
124 @Override
125 public Set<PBody> doGetContainedBodies() {
126 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
127 Set<PBody> bodies = new LinkedHashSet<>();
128 {
129 PBody body = new PBody(this);
130 PVariable var_Mission = body.getOrCreateVariableByName("Mission");
131 PVariable var_Coverage = body.getOrCreateVariableByName("Coverage");
132 PVariable var_ObservationTime = body.getOrCreateVariableByName("ObservationTime");
133 PVariable var_ObserverCount = body.getOrCreateVariableByName("ObserverCount");
134 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
135 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "InterferometryMission")));
136 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Coverage), new JavaTransitiveInstancesKey(java.lang.Double.class));
137 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
138 new ExportedParameter(body, var_Mission, parameter_Mission),
139 new ExportedParameter(body, var_Coverage, parameter_Coverage)
140 ));
141 // InterferometryMission.observationTime(Mission, ObservationTime)
142 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "InterferometryMission")));
143 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
144 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "InterferometryMission", "observationTime")));
145 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EFloat")));
146 new Equality(body, var__virtual_0_, var_ObservationTime);
147 // ObserverCount == count find spacecraftWithInterferometryPayload(Mission, _)
148 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
149 new PatternMatchCounter(body, Tuples.flatTupleOf(var_Mission, var___0_), SpacecraftWithInterferometryPayload.instance().getInternalQueryRepresentation(), var__virtual_1_);
150 new Equality(body, var_ObserverCount, var__virtual_1_);
151 // Coverage == eval(Math.pow(1 - 2.0 / ObserverCount, 1 + 9 * (1.0 / ObservationTime)) + 0.05 * ObservationTime / 3)
152 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
153 new ExpressionEvaluation(body, new IExpressionEvaluator() {
154
155 @Override
156 public String getShortDescription() {
157 return "Expression evaluation from pattern missionCoverage";
158 }
159
160 @Override
161 public Iterable<String> getInputParameterNames() {
162 return Arrays.asList("ObservationTime", "ObserverCount");}
163
164 @Override
165 public Object evaluateExpression(IValueProvider provider) throws Exception {
166 Float ObservationTime = (Float) provider.getValue("ObservationTime");
167 Integer ObserverCount = (Integer) provider.getValue("ObserverCount");
168 return evaluateExpression_1_1(ObservationTime, ObserverCount);
169 }
170 }, var__virtual_2_ );
171 new Equality(body, var_Coverage, var__virtual_2_);
172 bodies.add(body);
173 }
174 return bodies;
175 }
176 }
177
178 private static double evaluateExpression_1_1(final Float ObservationTime, final Integer ObserverCount) {
179 double _pow = Math.pow((1 - (2.0 / (ObserverCount).intValue())), (1 + (9 * (1.0 / (ObservationTime).floatValue()))));
180 double _plus = (_pow + ((0.05 * (ObservationTime).floatValue()) / 3));
181 return _plus;
182 }
183}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionTime.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionTime.java
new file mode 100644
index 00000000..3ad42bf5
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/MissionTime.java
@@ -0,0 +1,183 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitTime;
7import java.util.Arrays;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Set;
11import org.eclipse.emf.ecore.EClass;
12import org.eclipse.emf.ecore.EDataType;
13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
14import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
15import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
16import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
17import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
18import org.eclipse.viatra.query.runtime.matchers.aggregators.sum;
19import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
20import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
21import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator;
22import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider;
23import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
24import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
25import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.AggregatorConstraint;
26import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
27import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
28import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
31import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
34import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
35
36/**
37 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
38 *
39 * <p>Original source:
40 * <code><pre>
41 * private pattern missionTime(Mission : InterferometryMission, Time : java Double) {
42 * InterferometryMission.observationTime(Mission, ObservationTime);
43 * TrasmitTime == sum find transmitTime(Mission, _, #_);
44 * Time == eval(TrasmitTime + 60.0 ObservationTime);
45 * }
46 * </pre></code>
47 *
48 * @see GenericPatternMatcher
49 * @see GenericPatternMatch
50 *
51 */
52@SuppressWarnings("all")
53public final class MissionTime extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
54 private MissionTime() {
55 super(GeneratedPQuery.INSTANCE);
56 }
57
58 /**
59 * @return the singleton instance of the query specification
60 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
61 *
62 */
63 public static MissionTime instance() {
64 try{
65 return LazyHolder.INSTANCE;
66 } catch (ExceptionInInitializerError err) {
67 throw processInitializerError(err);
68 }
69 }
70
71 /**
72 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionTime (visibility: PUBLIC, simpleName: MissionTime, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionTime, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
73 * <b>not</b> at the class load time of the outer class,
74 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionTime (visibility: PUBLIC, simpleName: MissionTime, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionTime, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
75 *
76 * <p> This workaround is required e.g. to support recursion.
77 *
78 */
79 private static class LazyHolder {
80 private static final MissionTime INSTANCE = new MissionTime();
81
82 /**
83 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
84 * This initialization order is required to support indirect recursion.
85 *
86 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
87 *
88 */
89 private static final Object STATIC_INITIALIZER = ensureInitialized();
90
91 public static Object ensureInitialized() {
92 INSTANCE.ensureInitializedInternal();
93 return null;
94 }
95 }
96
97 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
98 private static final MissionTime.GeneratedPQuery INSTANCE = new GeneratedPQuery();
99
100 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);
101
102 private final PParameter parameter_Time = new PParameter("Time", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
103
104 private final List<PParameter> parameters = Arrays.asList(parameter_Mission, parameter_Time);
105
106 private GeneratedPQuery() {
107 super(PVisibility.PRIVATE);
108 }
109
110 @Override
111 public String getFullyQualifiedName() {
112 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.missionTime";
113 }
114
115 @Override
116 public List<String> getParameterNames() {
117 return Arrays.asList("Mission","Time");
118 }
119
120 @Override
121 public List<PParameter> getParameters() {
122 return parameters;
123 }
124
125 @Override
126 public Set<PBody> doGetContainedBodies() {
127 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
128 Set<PBody> bodies = new LinkedHashSet<>();
129 {
130 PBody body = new PBody(this);
131 PVariable var_Mission = body.getOrCreateVariableByName("Mission");
132 PVariable var_Time = body.getOrCreateVariableByName("Time");
133 PVariable var_ObservationTime = body.getOrCreateVariableByName("ObservationTime");
134 PVariable var_TrasmitTime = body.getOrCreateVariableByName("TrasmitTime");
135 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
136 PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
137 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "InterferometryMission")));
138 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Time), new JavaTransitiveInstancesKey(java.lang.Double.class));
139 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
140 new ExportedParameter(body, var_Mission, parameter_Mission),
141 new ExportedParameter(body, var_Time, parameter_Time)
142 ));
143 // InterferometryMission.observationTime(Mission, ObservationTime)
144 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "InterferometryMission")));
145 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
146 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "InterferometryMission", "observationTime")));
147 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EFloat")));
148 new Equality(body, var__virtual_0_, var_ObservationTime);
149 // TrasmitTime == sum find transmitTime(Mission, _, #_)
150 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
151 new AggregatorConstraint(new sum().getAggregatorLogic(Double.class), body, Tuples.flatTupleOf(var_Mission, var___0_, var___1_), TransmitTime.instance().getInternalQueryRepresentation(), var__virtual_1_, 2);
152 new Equality(body, var_TrasmitTime, var__virtual_1_);
153 // Time == eval(TrasmitTime + 60.0 * ObservationTime)
154 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
155 new ExpressionEvaluation(body, new IExpressionEvaluator() {
156
157 @Override
158 public String getShortDescription() {
159 return "Expression evaluation from pattern missionTime";
160 }
161
162 @Override
163 public Iterable<String> getInputParameterNames() {
164 return Arrays.asList("ObservationTime", "TrasmitTime");}
165
166 @Override
167 public Object evaluateExpression(IValueProvider provider) throws Exception {
168 Float ObservationTime = (Float) provider.getValue("ObservationTime");
169 Double TrasmitTime = (Double) provider.getValue("TrasmitTime");
170 return evaluateExpression_1_1(ObservationTime, TrasmitTime);
171 }
172 }, var__virtual_2_ );
173 new Equality(body, var_Time, var__virtual_2_);
174 bodies.add(body);
175 }
176 return bodies;
177 }
178 }
179
180 private static double evaluateExpression_1_1(final Float ObservationTime, final Double TrasmitTime) {
181 return ((TrasmitTime).doubleValue() + (60.0 * (ObservationTime).floatValue()));
182 }
183}
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 7f1be700..2f310711 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
@@ -5,6 +5,8 @@ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5 5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; 6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement;
7import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; 7import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop;
8import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric;
9import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CoverageMetric;
8import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; 10import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna;
9import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; 11import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand;
10import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetGain; 12import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetGain;
@@ -12,9 +14,12 @@ import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.KaAntennaGainLow;
12import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; 14import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation;
13import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; 15import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads;
14import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.ThreeUCubeSatWithNonUhfCrossLink; 16import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.ThreeUCubeSatWithNonUhfCrossLink;
17import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.TimeMetric;
15import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.UhfAntennaGainNotLow; 18import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.UhfAntennaGainNotLow;
16import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.XAntennaGainNotMedium; 19import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.XAntennaGainNotMedium;
20import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AdditionalCommSubsystemCost;
17import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AtLeastTwoInterferometryPayloads; 21import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AtLeastTwoInterferometryPayloads;
22import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice;
18import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBand; 23import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBand;
19import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBandUhf; 24import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBandUhf;
20import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGain; 25import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGain;
@@ -22,9 +27,21 @@ import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsyst
22import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGainMedium; 27import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemGainMedium;
23import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.DirectCommunicationLink; 28import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.DirectCommunicationLink;
24import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.GroundStationNetwork; 29import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.GroundStationNetwork;
30import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData;
25import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink; 31import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink;
32import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.InterferometryPayloadCost;
33import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCost;
34import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCoverage;
35import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionTime;
36import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.ScienceData;
26import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SmallSat; 37import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SmallSat;
38import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftCost;
39import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKind;
40import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftUplink;
27import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithInterferometryPayload; 41import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithInterferometryPayload;
42import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithTwoCommSubsystems;
43import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitRate;
44import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitTime;
28import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; 45import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup;
29 46
30/** 47/**
@@ -55,6 +72,23 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup;
55 * <li>groundStationNetwork</li> 72 * <li>groundStationNetwork</li>
56 * <li>cubeSatWithKaAntenna</li> 73 * <li>cubeSatWithKaAntenna</li>
57 * <li>smallSat</li> 74 * <li>smallSat</li>
75 * <li>coverageMetric</li>
76 * <li>missionCoverage</li>
77 * <li>timeMetric</li>
78 * <li>missionTime</li>
79 * <li>transmitTime</li>
80 * <li>incomingData</li>
81 * <li>scienceData</li>
82 * <li>transmitRate</li>
83 * <li>spacecraftUplink</li>
84 * <li>costMetric</li>
85 * <li>missionCost</li>
86 * <li>spacecraftCost</li>
87 * <li>spacecraftOfKind</li>
88 * <li>basePrice</li>
89 * <li>interferometryPayloadCost</li>
90 * <li>additionalCommSubsystemCost</li>
91 * <li>spacecraftWithTwoCommSubsystems</li>
58 * </ul> 92 * </ul>
59 * 93 *
60 * @see IQueryGroup 94 * @see IQueryGroup
@@ -101,5 +135,22 @@ public final class SatelliteQueriesAll extends BaseGeneratedPatternGroup {
101 querySpecifications.add(GroundStationNetwork.instance()); 135 querySpecifications.add(GroundStationNetwork.instance());
102 querySpecifications.add(CubeSatWithKaAntenna.instance()); 136 querySpecifications.add(CubeSatWithKaAntenna.instance());
103 querySpecifications.add(SmallSat.instance()); 137 querySpecifications.add(SmallSat.instance());
138 querySpecifications.add(CoverageMetric.instance());
139 querySpecifications.add(MissionCoverage.instance());
140 querySpecifications.add(TimeMetric.instance());
141 querySpecifications.add(MissionTime.instance());
142 querySpecifications.add(TransmitTime.instance());
143 querySpecifications.add(IncomingData.instance());
144 querySpecifications.add(ScienceData.instance());
145 querySpecifications.add(TransmitRate.instance());
146 querySpecifications.add(SpacecraftUplink.instance());
147 querySpecifications.add(CostMetric.instance());
148 querySpecifications.add(MissionCost.instance());
149 querySpecifications.add(SpacecraftCost.instance());
150 querySpecifications.add(SpacecraftOfKind.instance());
151 querySpecifications.add(BasePrice.instance());
152 querySpecifications.add(InterferometryPayloadCost.instance());
153 querySpecifications.add(AdditionalCommSubsystemCost.instance());
154 querySpecifications.add(SpacecraftWithTwoCommSubsystems.instance());
104 } 155 }
105} 156}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/ScienceData.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/ScienceData.java
new file mode 100644
index 00000000..b558e51e
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/ScienceData.java
@@ -0,0 +1,179 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import java.util.Arrays;
7import java.util.LinkedHashSet;
8import java.util.List;
9import java.util.Set;
10import org.eclipse.emf.ecore.EClass;
11import org.eclipse.emf.ecore.EDataType;
12import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
14import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
15import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
16import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
17import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
18import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
19import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator;
20import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider;
21import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
22import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
23import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
24import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
25import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
26import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
27import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
28import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
29import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
30import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
31import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
32
33/**
34 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
35 *
36 * <p>Original source:
37 * <code><pre>
38 * private pattern scienceData(Spacecraft : Spacecraft, Data : java Double) {
39 * ConstellationMission.spacecraft(Mission, Spacecraft);
40 * InterferometryMission.observationTime(Mission, ObservationTime);
41 * Data == eval(12.0 ObservationTime);
42 * }
43 * </pre></code>
44 *
45 * @see GenericPatternMatcher
46 * @see GenericPatternMatch
47 *
48 */
49@SuppressWarnings("all")
50public final class ScienceData extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
51 private ScienceData() {
52 super(GeneratedPQuery.INSTANCE);
53 }
54
55 /**
56 * @return the singleton instance of the query specification
57 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
58 *
59 */
60 public static ScienceData instance() {
61 try{
62 return LazyHolder.INSTANCE;
63 } catch (ExceptionInInitializerError err) {
64 throw processInitializerError(err);
65 }
66 }
67
68 /**
69 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.ScienceData (visibility: PUBLIC, simpleName: ScienceData, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.ScienceData, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
70 * <b>not</b> at the class load time of the outer class,
71 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.ScienceData (visibility: PUBLIC, simpleName: ScienceData, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.ScienceData, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
72 *
73 * <p> This workaround is required e.g. to support recursion.
74 *
75 */
76 private static class LazyHolder {
77 private static final ScienceData INSTANCE = new ScienceData();
78
79 /**
80 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
81 * This initialization order is required to support indirect recursion.
82 *
83 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
84 *
85 */
86 private static final Object STATIC_INITIALIZER = ensureInitialized();
87
88 public static Object ensureInitialized() {
89 INSTANCE.ensureInitializedInternal();
90 return null;
91 }
92 }
93
94 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
95 private static final ScienceData.GeneratedPQuery INSTANCE = new GeneratedPQuery();
96
97 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);
98
99 private final PParameter parameter_Data = new PParameter("Data", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
100
101 private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_Data);
102
103 private GeneratedPQuery() {
104 super(PVisibility.PRIVATE);
105 }
106
107 @Override
108 public String getFullyQualifiedName() {
109 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.scienceData";
110 }
111
112 @Override
113 public List<String> getParameterNames() {
114 return Arrays.asList("Spacecraft","Data");
115 }
116
117 @Override
118 public List<PParameter> getParameters() {
119 return parameters;
120 }
121
122 @Override
123 public Set<PBody> doGetContainedBodies() {
124 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
125 Set<PBody> bodies = new LinkedHashSet<>();
126 {
127 PBody body = new PBody(this);
128 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
129 PVariable var_Data = body.getOrCreateVariableByName("Data");
130 PVariable var_Mission = body.getOrCreateVariableByName("Mission");
131 PVariable var_ObservationTime = body.getOrCreateVariableByName("ObservationTime");
132 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
133 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Data), new JavaTransitiveInstancesKey(java.lang.Double.class));
134 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
135 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
136 new ExportedParameter(body, var_Data, parameter_Data)
137 ));
138 // ConstellationMission.spacecraft(Mission, Spacecraft)
139 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "ConstellationMission")));
140 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
141 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "ConstellationMission", "spacecraft")));
142 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
143 new Equality(body, var__virtual_0_, var_Spacecraft);
144 // InterferometryMission.observationTime(Mission, ObservationTime)
145 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "InterferometryMission")));
146 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
147 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "InterferometryMission", "observationTime")));
148 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EFloat")));
149 new Equality(body, var__virtual_1_, var_ObservationTime);
150 // Data == eval(12.0 * ObservationTime)
151 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
152 new ExpressionEvaluation(body, new IExpressionEvaluator() {
153
154 @Override
155 public String getShortDescription() {
156 return "Expression evaluation from pattern scienceData";
157 }
158
159 @Override
160 public Iterable<String> getInputParameterNames() {
161 return Arrays.asList("ObservationTime");}
162
163 @Override
164 public Object evaluateExpression(IValueProvider provider) throws Exception {
165 Float ObservationTime = (Float) provider.getValue("ObservationTime");
166 return evaluateExpression_1_1(ObservationTime);
167 }
168 }, var__virtual_2_ );
169 new Equality(body, var_Data, var__virtual_2_);
170 bodies.add(body);
171 }
172 return bodies;
173 }
174 }
175
176 private static double evaluateExpression_1_1(final Float ObservationTime) {
177 return (12.0 * (ObservationTime).floatValue());
178 }
179}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SmallSat.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SmallSat.java
index 252db290..d74ed28a 100644
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SmallSat.java
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SmallSat.java
@@ -8,13 +8,18 @@ import java.util.LinkedHashSet;
8import java.util.List; 8import java.util.List;
9import java.util.Set; 9import java.util.Set;
10import org.eclipse.emf.ecore.EClass; 10import org.eclipse.emf.ecore.EClass;
11import org.eclipse.emf.ecore.EDataType;
11import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; 12import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
12import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher; 13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
13import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; 14import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
15import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
16import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
14import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; 17import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
15import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; 18import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
16import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; 19import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
20import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
17import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; 21import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
22import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue;
18import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; 23import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
19import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; 24import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
20import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; 25import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
@@ -26,8 +31,8 @@ import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
26 * 31 *
27 * <p>Original source: 32 * <p>Original source:
28 * <code><pre> 33 * <code><pre>
29 * private pattern smallSat(Sat : SmallSat) { 34 * private pattern smallSat(Sat : Spacecraft) {
30 * SmallSat(Sat); 35 * Spacecraft.kind(Sat, SpacecraftKind::SmallSat);
31 * } 36 * }
32 * </pre></code> 37 * </pre></code>
33 * 38 *
@@ -83,7 +88,7 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecificationWithGeneri
83 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { 88 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
84 private static final SmallSat.GeneratedPQuery INSTANCE = new GeneratedPQuery(); 89 private static final SmallSat.GeneratedPQuery INSTANCE = new GeneratedPQuery();
85 90
86 private final PParameter parameter_Sat = new PParameter("Sat", "hu.bme.mit.inf.dslreasoner.domains.satellite.SmallSat", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "SmallSat")), PParameterDirection.INOUT); 91 private final PParameter parameter_Sat = new PParameter("Sat", "hu.bme.mit.inf.dslreasoner.domains.satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT);
87 92
88 private final List<PParameter> parameters = Arrays.asList(parameter_Sat); 93 private final List<PParameter> parameters = Arrays.asList(parameter_Sat);
89 94
@@ -113,12 +118,18 @@ public final class SmallSat extends BaseGeneratedEMFQuerySpecificationWithGeneri
113 { 118 {
114 PBody body = new PBody(this); 119 PBody body = new PBody(this);
115 PVariable var_Sat = body.getOrCreateVariableByName("Sat"); 120 PVariable var_Sat = body.getOrCreateVariableByName("Sat");
116 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "SmallSat"))); 121 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
117 body.setSymbolicParameters(Arrays.<ExportedParameter>asList( 122 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
118 new ExportedParameter(body, var_Sat, parameter_Sat) 123 new ExportedParameter(body, var_Sat, parameter_Sat)
119 )); 124 ));
120 // SmallSat(Sat) 125 // Spacecraft.kind(Sat, SpacecraftKind::SmallSat)
121 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "SmallSat"))); 126 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
127 new ConstantValue(body, var__virtual_0_, getEnumLiteral("http://www.example.org/satellite", "SpacecraftKind", "SmallSat").getInstance());
128 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
129 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
130 new TypeConstraint(body, Tuples.flatTupleOf(var_Sat, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "Spacecraft", "kind")));
131 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "SpacecraftKind")));
132 new Equality(body, var__virtual_1_, var__virtual_0_);
122 bodies.add(body); 133 bodies.add(body);
123 } 134 }
124 return bodies; 135 return bodies;
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftCost.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftCost.java
new file mode 100644
index 00000000..65fed74a
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftCost.java
@@ -0,0 +1,215 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AdditionalCommSubsystemCost;
7import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice;
8import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.InterferometryPayloadCost;
9import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKind;
10import java.util.Arrays;
11import java.util.LinkedHashSet;
12import java.util.List;
13import java.util.Set;
14import org.eclipse.emf.ecore.EClass;
15import org.eclipse.emf.ecore.EDataType;
16import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
17import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
18import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
19import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
20import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
21import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
22import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
23import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator;
24import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider;
25import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
26import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
27import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
28import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.PatternMatchCounter;
31import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
32import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
33import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
34import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
35import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
36import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
37import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
38
39/**
40 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
41 *
42 * <p>Original source:
43 * <code><pre>
44 * private pattern spacecraftCost(Mission : InterferometryMission, Spacecraft : Spacecraft, Cost : java Double) {
45 * ConstellationMission.spacecraft(Mission, Spacecraft);
46 * Spacecraft.kind(Spacecraft, Kind);
47 * KindCount == count find spacecraftOfKind(_, Kind);
48 * find basePrice(Spacecraft, BasePrice);
49 * find interferometryPayloadCost(Spacecraft, InterferometryPayloadCost);
50 * find additionalCommSubsystemCost(Spacecraft, AdditionalCommSubsystemCost);
51 * Cost == eval(BasePrice Math.pow(KindCount, -0.25) + InterferometryPayloadCost + AdditionalCommSubsystemCost);
52 * }
53 * </pre></code>
54 *
55 * @see GenericPatternMatcher
56 * @see GenericPatternMatch
57 *
58 */
59@SuppressWarnings("all")
60public final class SpacecraftCost extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
61 private SpacecraftCost() {
62 super(GeneratedPQuery.INSTANCE);
63 }
64
65 /**
66 * @return the singleton instance of the query specification
67 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
68 *
69 */
70 public static SpacecraftCost instance() {
71 try{
72 return LazyHolder.INSTANCE;
73 } catch (ExceptionInInitializerError err) {
74 throw processInitializerError(err);
75 }
76 }
77
78 /**
79 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftCost (visibility: PUBLIC, simpleName: SpacecraftCost, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftCost, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
80 * <b>not</b> at the class load time of the outer class,
81 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftCost (visibility: PUBLIC, simpleName: SpacecraftCost, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftCost, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
82 *
83 * <p> This workaround is required e.g. to support recursion.
84 *
85 */
86 private static class LazyHolder {
87 private static final SpacecraftCost INSTANCE = new SpacecraftCost();
88
89 /**
90 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
91 * This initialization order is required to support indirect recursion.
92 *
93 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
94 *
95 */
96 private static final Object STATIC_INITIALIZER = ensureInitialized();
97
98 public static Object ensureInitialized() {
99 INSTANCE.ensureInitializedInternal();
100 return null;
101 }
102 }
103
104 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
105 private static final SpacecraftCost.GeneratedPQuery INSTANCE = new GeneratedPQuery();
106
107 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);
108
109 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);
110
111 private final PParameter parameter_Cost = new PParameter("Cost", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
112
113 private final List<PParameter> parameters = Arrays.asList(parameter_Mission, parameter_Spacecraft, parameter_Cost);
114
115 private GeneratedPQuery() {
116 super(PVisibility.PRIVATE);
117 }
118
119 @Override
120 public String getFullyQualifiedName() {
121 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.spacecraftCost";
122 }
123
124 @Override
125 public List<String> getParameterNames() {
126 return Arrays.asList("Mission","Spacecraft","Cost");
127 }
128
129 @Override
130 public List<PParameter> getParameters() {
131 return parameters;
132 }
133
134 @Override
135 public Set<PBody> doGetContainedBodies() {
136 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
137 Set<PBody> bodies = new LinkedHashSet<>();
138 {
139 PBody body = new PBody(this);
140 PVariable var_Mission = body.getOrCreateVariableByName("Mission");
141 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
142 PVariable var_Cost = body.getOrCreateVariableByName("Cost");
143 PVariable var_Kind = body.getOrCreateVariableByName("Kind");
144 PVariable var_KindCount = body.getOrCreateVariableByName("KindCount");
145 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
146 PVariable var_BasePrice = body.getOrCreateVariableByName("BasePrice");
147 PVariable var_InterferometryPayloadCost = body.getOrCreateVariableByName("InterferometryPayloadCost");
148 PVariable var_AdditionalCommSubsystemCost = body.getOrCreateVariableByName("AdditionalCommSubsystemCost");
149 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "InterferometryMission")));
150 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
151 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Cost), new JavaTransitiveInstancesKey(java.lang.Double.class));
152 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
153 new ExportedParameter(body, var_Mission, parameter_Mission),
154 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
155 new ExportedParameter(body, var_Cost, parameter_Cost)
156 ));
157 // ConstellationMission.spacecraft(Mission, Spacecraft)
158 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "ConstellationMission")));
159 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
160 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "ConstellationMission", "spacecraft")));
161 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
162 new Equality(body, var__virtual_0_, var_Spacecraft);
163 // Spacecraft.kind(Spacecraft, Kind)
164 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
165 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
166 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "Spacecraft", "kind")));
167 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "SpacecraftKind")));
168 new Equality(body, var__virtual_1_, var_Kind);
169 // KindCount == count find spacecraftOfKind(_, Kind)
170 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
171 new PatternMatchCounter(body, Tuples.flatTupleOf(var___0_, var_Kind), SpacecraftOfKind.instance().getInternalQueryRepresentation(), var__virtual_2_);
172 new Equality(body, var_KindCount, var__virtual_2_);
173 // find basePrice(Spacecraft, BasePrice)
174 new PositivePatternCall(body, Tuples.flatTupleOf(var_Spacecraft, var_BasePrice), BasePrice.instance().getInternalQueryRepresentation());
175 // find interferometryPayloadCost(Spacecraft, InterferometryPayloadCost)
176 new PositivePatternCall(body, Tuples.flatTupleOf(var_Spacecraft, var_InterferometryPayloadCost), InterferometryPayloadCost.instance().getInternalQueryRepresentation());
177 // find additionalCommSubsystemCost(Spacecraft, AdditionalCommSubsystemCost)
178 new PositivePatternCall(body, Tuples.flatTupleOf(var_Spacecraft, var_AdditionalCommSubsystemCost), AdditionalCommSubsystemCost.instance().getInternalQueryRepresentation());
179 // Cost == eval(BasePrice * Math.pow(KindCount, -0.25) + InterferometryPayloadCost + AdditionalCommSubsystemCost)
180 PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}");
181 new ExpressionEvaluation(body, new IExpressionEvaluator() {
182
183 @Override
184 public String getShortDescription() {
185 return "Expression evaluation from pattern spacecraftCost";
186 }
187
188 @Override
189 public Iterable<String> getInputParameterNames() {
190 return Arrays.asList("AdditionalCommSubsystemCost", "BasePrice", "InterferometryPayloadCost", "KindCount");}
191
192 @Override
193 public Object evaluateExpression(IValueProvider provider) throws Exception {
194 Double AdditionalCommSubsystemCost = (Double) provider.getValue("AdditionalCommSubsystemCost");
195 Double BasePrice = (Double) provider.getValue("BasePrice");
196 Double InterferometryPayloadCost = (Double) provider.getValue("InterferometryPayloadCost");
197 Integer KindCount = (Integer) provider.getValue("KindCount");
198 return evaluateExpression_1_1(AdditionalCommSubsystemCost, BasePrice, InterferometryPayloadCost, KindCount);
199 }
200 }, var__virtual_3_ );
201 new Equality(body, var_Cost, var__virtual_3_);
202 bodies.add(body);
203 }
204 return bodies;
205 }
206 }
207
208 private static double evaluateExpression_1_1(final Double AdditionalCommSubsystemCost, final Double BasePrice, final Double InterferometryPayloadCost, final Integer KindCount) {
209 double _pow = Math.pow((KindCount).intValue(), (-0.25));
210 double _multiply = ((BasePrice).doubleValue() * _pow);
211 double _plus = (_multiply + (InterferometryPayloadCost).doubleValue());
212 double _plus_1 = (_plus + (AdditionalCommSubsystemCost).doubleValue());
213 return _plus_1;
214 }
215}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKind.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKind.java
new file mode 100644
index 00000000..5e49aa58
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKind.java
@@ -0,0 +1,140 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import java.util.Arrays;
7import java.util.LinkedHashSet;
8import java.util.List;
9import java.util.Set;
10import org.eclipse.emf.ecore.EClass;
11import org.eclipse.emf.ecore.EDataType;
12import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
14import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
15import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
16import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
17import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
18import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
19import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
20import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
21import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
22import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
23import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
24import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
25import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
26import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
27
28/**
29 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
30 *
31 * <p>Original source:
32 * <code><pre>
33 * private pattern spacecraftOfKind(Spacecraft : Spacecraft, Kind : SpacecraftKind) {
34 * Spacecraft.kind(Spacecraft, Kind);
35 * }
36 * </pre></code>
37 *
38 * @see GenericPatternMatcher
39 * @see GenericPatternMatch
40 *
41 */
42@SuppressWarnings("all")
43public final class SpacecraftOfKind extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
44 private SpacecraftOfKind() {
45 super(GeneratedPQuery.INSTANCE);
46 }
47
48 /**
49 * @return the singleton instance of the query specification
50 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
51 *
52 */
53 public static SpacecraftOfKind instance() {
54 try{
55 return LazyHolder.INSTANCE;
56 } catch (ExceptionInInitializerError err) {
57 throw processInitializerError(err);
58 }
59 }
60
61 /**
62 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKind (visibility: PUBLIC, simpleName: SpacecraftOfKind, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKind, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
63 * <b>not</b> at the class load time of the outer class,
64 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKind (visibility: PUBLIC, simpleName: SpacecraftOfKind, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKind, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
65 *
66 * <p> This workaround is required e.g. to support recursion.
67 *
68 */
69 private static class LazyHolder {
70 private static final SpacecraftOfKind INSTANCE = new SpacecraftOfKind();
71
72 /**
73 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
74 * This initialization order is required to support indirect recursion.
75 *
76 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
77 *
78 */
79 private static final Object STATIC_INITIALIZER = ensureInitialized();
80
81 public static Object ensureInitialized() {
82 INSTANCE.ensureInitializedInternal();
83 return null;
84 }
85 }
86
87 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
88 private static final SpacecraftOfKind.GeneratedPQuery INSTANCE = new GeneratedPQuery();
89
90 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);
91
92 private final PParameter parameter_Kind = new PParameter("Kind", "hu.bme.mit.inf.dslreasoner.domains.satellite.SpacecraftKind", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.example.org/satellite", "SpacecraftKind")), PParameterDirection.INOUT);
93
94 private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_Kind);
95
96 private GeneratedPQuery() {
97 super(PVisibility.PRIVATE);
98 }
99
100 @Override
101 public String getFullyQualifiedName() {
102 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.spacecraftOfKind";
103 }
104
105 @Override
106 public List<String> getParameterNames() {
107 return Arrays.asList("Spacecraft","Kind");
108 }
109
110 @Override
111 public List<PParameter> getParameters() {
112 return parameters;
113 }
114
115 @Override
116 public Set<PBody> doGetContainedBodies() {
117 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
118 Set<PBody> bodies = new LinkedHashSet<>();
119 {
120 PBody body = new PBody(this);
121 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
122 PVariable var_Kind = body.getOrCreateVariableByName("Kind");
123 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
124 new TypeConstraint(body, Tuples.flatTupleOf(var_Kind), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "SpacecraftKind")));
125 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
126 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
127 new ExportedParameter(body, var_Kind, parameter_Kind)
128 ));
129 // Spacecraft.kind(Spacecraft, Kind)
130 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
131 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
132 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "Spacecraft", "kind")));
133 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "SpacecraftKind")));
134 new Equality(body, var__virtual_0_, var_Kind);
135 bodies.add(body);
136 }
137 return bodies;
138 }
139 }
140}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftUplink.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftUplink.java
new file mode 100644
index 00000000..966ff6f8
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftUplink.java
@@ -0,0 +1,171 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import java.util.Arrays;
7import java.util.LinkedHashSet;
8import java.util.List;
9import java.util.Set;
10import org.eclipse.emf.ecore.EClass;
11import org.eclipse.emf.ecore.EDataType;
12import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
14import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
15import org.eclipse.viatra.query.runtime.emf.types.EDataTypeInSlotsKey;
16import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
17import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
18import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
19import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
20import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
21import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
22import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
23import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
24import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
25import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
26import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
27
28/**
29 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
30 *
31 * <p>Original source:
32 * <code><pre>
33 * private pattern spacecraftUplink(Spacecraft : Spacecraft, Band : TransceiverBand, Target : CommunicatingElement) {
34 * CommunicatingElement.communicationLink(Spacecraft, Link);
35 * DirectedCommunicationLink.source.band(Link, Band);
36 * DirectedCommunicationLink.target(Link, TargetSubsystem);
37 * CommunicatingElement.commSubsystem(Target, TargetSubsystem);
38 * }
39 * </pre></code>
40 *
41 * @see GenericPatternMatcher
42 * @see GenericPatternMatch
43 *
44 */
45@SuppressWarnings("all")
46public final class SpacecraftUplink extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
47 private SpacecraftUplink() {
48 super(GeneratedPQuery.INSTANCE);
49 }
50
51 /**
52 * @return the singleton instance of the query specification
53 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
54 *
55 */
56 public static SpacecraftUplink instance() {
57 try{
58 return LazyHolder.INSTANCE;
59 } catch (ExceptionInInitializerError err) {
60 throw processInitializerError(err);
61 }
62 }
63
64 /**
65 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftUplink (visibility: PUBLIC, simpleName: SpacecraftUplink, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftUplink, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
66 * <b>not</b> at the class load time of the outer class,
67 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftUplink (visibility: PUBLIC, simpleName: SpacecraftUplink, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftUplink, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
68 *
69 * <p> This workaround is required e.g. to support recursion.
70 *
71 */
72 private static class LazyHolder {
73 private static final SpacecraftUplink INSTANCE = new SpacecraftUplink();
74
75 /**
76 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
77 * This initialization order is required to support indirect recursion.
78 *
79 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
80 *
81 */
82 private static final Object STATIC_INITIALIZER = ensureInitialized();
83
84 public static Object ensureInitialized() {
85 INSTANCE.ensureInitializedInternal();
86 return null;
87 }
88 }
89
90 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
91 private static final SpacecraftUplink.GeneratedPQuery INSTANCE = new GeneratedPQuery();
92
93 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);
94
95 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);
96
97 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);
98
99 private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_Band, parameter_Target);
100
101 private GeneratedPQuery() {
102 super(PVisibility.PRIVATE);
103 }
104
105 @Override
106 public String getFullyQualifiedName() {
107 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.spacecraftUplink";
108 }
109
110 @Override
111 public List<String> getParameterNames() {
112 return Arrays.asList("Spacecraft","Band","Target");
113 }
114
115 @Override
116 public List<PParameter> getParameters() {
117 return parameters;
118 }
119
120 @Override
121 public Set<PBody> doGetContainedBodies() {
122 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
123 Set<PBody> bodies = new LinkedHashSet<>();
124 {
125 PBody body = new PBody(this);
126 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
127 PVariable var_Band = body.getOrCreateVariableByName("Band");
128 PVariable var_Target = body.getOrCreateVariableByName("Target");
129 PVariable var_Link = body.getOrCreateVariableByName("Link");
130 PVariable var_TargetSubsystem = body.getOrCreateVariableByName("TargetSubsystem");
131 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
132 new TypeConstraint(body, Tuples.flatTupleOf(var_Band), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "TransceiverBand")));
133 new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement")));
134 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
135 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
136 new ExportedParameter(body, var_Band, parameter_Band),
137 new ExportedParameter(body, var_Target, parameter_Target)
138 ));
139 // CommunicatingElement.communicationLink(Spacecraft, Link)
140 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement")));
141 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
142 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "communicationLink")));
143 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink")));
144 new Equality(body, var__virtual_0_, var_Link);
145 // DirectedCommunicationLink.source.band(Link, Band)
146 new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink")));
147 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
148 new TypeConstraint(body, Tuples.flatTupleOf(var_Link, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "DirectedCommunicationLink", "source")));
149 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem")));
150 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
151 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommSubsystem", "band")));
152 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.example.org/satellite", "TransceiverBand")));
153 new Equality(body, var__virtual_2_, var_Band);
154 // DirectedCommunicationLink.target(Link, TargetSubsystem)
155 new TypeConstraint(body, Tuples.flatTupleOf(var_Link), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "DirectedCommunicationLink")));
156 PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}");
157 new TypeConstraint(body, Tuples.flatTupleOf(var_Link, var__virtual_3_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "DirectedCommunicationLink", "target")));
158 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_3_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem")));
159 new Equality(body, var__virtual_3_, var_TargetSubsystem);
160 // CommunicatingElement.commSubsystem(Target, TargetSubsystem)
161 new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommunicatingElement")));
162 PVariable var__virtual_4_ = body.getOrCreateVariableByName(".virtual{4}");
163 new TypeConstraint(body, Tuples.flatTupleOf(var_Target, var__virtual_4_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem")));
164 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_4_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem")));
165 new Equality(body, var__virtual_4_, var_TargetSubsystem);
166 bodies.add(body);
167 }
168 return bodies;
169 }
170 }
171}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithTwoCommSubsystems.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithTwoCommSubsystems.java
new file mode 100644
index 00000000..98f1be7b
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftWithTwoCommSubsystems.java
@@ -0,0 +1,146 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import java.util.Arrays;
7import java.util.LinkedHashSet;
8import java.util.List;
9import java.util.Set;
10import org.eclipse.emf.ecore.EClass;
11import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
12import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
13import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
14import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
15import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
16import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
17import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
18import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
19import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
20import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality;
21import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
22import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
23import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
24import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
25import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
26
27/**
28 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
29 *
30 * <p>Original source:
31 * <code><pre>
32 * private pattern spacecraftWithTwoCommSubsystems(Spacecraft : Spacecraft) {
33 * Spacecraft.commSubsystem(Spacecraft, Subsystem1);
34 * Spacecraft.commSubsystem(Spacecraft, Subsystem2);
35 * Subsystem1 != Subsystem2;
36 * }
37 * </pre></code>
38 *
39 * @see GenericPatternMatcher
40 * @see GenericPatternMatch
41 *
42 */
43@SuppressWarnings("all")
44public final class SpacecraftWithTwoCommSubsystems extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
45 private SpacecraftWithTwoCommSubsystems() {
46 super(GeneratedPQuery.INSTANCE);
47 }
48
49 /**
50 * @return the singleton instance of the query specification
51 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
52 *
53 */
54 public static SpacecraftWithTwoCommSubsystems instance() {
55 try{
56 return LazyHolder.INSTANCE;
57 } catch (ExceptionInInitializerError err) {
58 throw processInitializerError(err);
59 }
60 }
61
62 /**
63 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithTwoCommSubsystems (visibility: PUBLIC, simpleName: SpacecraftWithTwoCommSubsystems, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithTwoCommSubsystems, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
64 * <b>not</b> at the class load time of the outer class,
65 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithTwoCommSubsystems (visibility: PUBLIC, simpleName: SpacecraftWithTwoCommSubsystems, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithTwoCommSubsystems, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
66 *
67 * <p> This workaround is required e.g. to support recursion.
68 *
69 */
70 private static class LazyHolder {
71 private static final SpacecraftWithTwoCommSubsystems INSTANCE = new SpacecraftWithTwoCommSubsystems();
72
73 /**
74 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
75 * This initialization order is required to support indirect recursion.
76 *
77 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
78 *
79 */
80 private static final Object STATIC_INITIALIZER = ensureInitialized();
81
82 public static Object ensureInitialized() {
83 INSTANCE.ensureInitializedInternal();
84 return null;
85 }
86 }
87
88 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
89 private static final SpacecraftWithTwoCommSubsystems.GeneratedPQuery INSTANCE = new GeneratedPQuery();
90
91 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);
92
93 private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft);
94
95 private GeneratedPQuery() {
96 super(PVisibility.PRIVATE);
97 }
98
99 @Override
100 public String getFullyQualifiedName() {
101 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.spacecraftWithTwoCommSubsystems";
102 }
103
104 @Override
105 public List<String> getParameterNames() {
106 return Arrays.asList("Spacecraft");
107 }
108
109 @Override
110 public List<PParameter> getParameters() {
111 return parameters;
112 }
113
114 @Override
115 public Set<PBody> doGetContainedBodies() {
116 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
117 Set<PBody> bodies = new LinkedHashSet<>();
118 {
119 PBody body = new PBody(this);
120 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
121 PVariable var_Subsystem1 = body.getOrCreateVariableByName("Subsystem1");
122 PVariable var_Subsystem2 = body.getOrCreateVariableByName("Subsystem2");
123 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
124 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
125 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft)
126 ));
127 // Spacecraft.commSubsystem(Spacecraft, Subsystem1)
128 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
129 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
130 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem")));
131 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem")));
132 new Equality(body, var__virtual_0_, var_Subsystem1);
133 // Spacecraft.commSubsystem(Spacecraft, Subsystem2)
134 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
135 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
136 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "CommunicatingElement", "commSubsystem")));
137 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CommSubsystem")));
138 new Equality(body, var__virtual_1_, var_Subsystem2);
139 // Subsystem1 != Subsystem2
140 new Inequality(body, var_Subsystem1, var_Subsystem2);
141 bodies.add(body);
142 }
143 return bodies;
144 }
145 }
146}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/TransmitRate.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/TransmitRate.java
new file mode 100644
index 00000000..2faa7733
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/TransmitRate.java
@@ -0,0 +1,277 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftUplink;
7import java.util.Arrays;
8import java.util.LinkedHashSet;
9import java.util.List;
10import java.util.Set;
11import org.eclipse.emf.ecore.EClass;
12import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
13import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
14import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
15import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
16import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
17import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
18import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
19import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
20import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
21import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
22import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.ConstantValue;
23import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
24import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
25import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
26import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
27import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
28import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
29
30/**
31 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
32 *
33 * <p>Original source:
34 * <code><pre>
35 * private pattern transmitRate(Spacecraft : Spacecraft, TransmitRate : java Double) {
36 * find spacecraftUplink(Spacecraft, TransceiverBand::UHF, Target);
37 * Spacecraft(Target);
38 * TransmitRate == 5.0;
39 * } or {
40 * find spacecraftUplink(Spacecraft, TransceiverBand::X, Target);
41 * Spacecraft(Target);
42 * TransmitRate == 1.6;
43 * } or {
44 * find spacecraftUplink(Spacecraft, TransceiverBand::X, Target);
45 * GroundStationNetwork(Target);
46 * TransmitRate == 0.7;
47 * } or {
48 * find spacecraftUplink(Spacecraft, TransceiverBand::Ka, Target);
49 * Spacecraft(Target);
50 * TransmitRate == 220.0;
51 * } or {
52 * find spacecraftUplink(Spacecraft, TransceiverBand::Ka, Target);
53 * GroundStationNetwork(Target);
54 * TransmitRate == 80.0;
55 * }
56 * </pre></code>
57 *
58 * @see GenericPatternMatcher
59 * @see GenericPatternMatch
60 *
61 */
62@SuppressWarnings("all")
63public final class TransmitRate extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
64 private TransmitRate() {
65 super(GeneratedPQuery.INSTANCE);
66 }
67
68 /**
69 * @return the singleton instance of the query specification
70 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
71 *
72 */
73 public static TransmitRate instance() {
74 try{
75 return LazyHolder.INSTANCE;
76 } catch (ExceptionInInitializerError err) {
77 throw processInitializerError(err);
78 }
79 }
80
81 /**
82 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitRate (visibility: PUBLIC, simpleName: TransmitRate, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitRate, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
83 * <b>not</b> at the class load time of the outer class,
84 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitRate (visibility: PUBLIC, simpleName: TransmitRate, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitRate, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
85 *
86 * <p> This workaround is required e.g. to support recursion.
87 *
88 */
89 private static class LazyHolder {
90 private static final TransmitRate INSTANCE = new TransmitRate();
91
92 /**
93 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
94 * This initialization order is required to support indirect recursion.
95 *
96 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
97 *
98 */
99 private static final Object STATIC_INITIALIZER = ensureInitialized();
100
101 public static Object ensureInitialized() {
102 INSTANCE.ensureInitializedInternal();
103 return null;
104 }
105 }
106
107 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
108 private static final TransmitRate.GeneratedPQuery INSTANCE = new GeneratedPQuery();
109
110 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);
111
112 private final PParameter parameter_TransmitRate = new PParameter("TransmitRate", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
113
114 private final List<PParameter> parameters = Arrays.asList(parameter_Spacecraft, parameter_TransmitRate);
115
116 private GeneratedPQuery() {
117 super(PVisibility.PRIVATE);
118 }
119
120 @Override
121 public String getFullyQualifiedName() {
122 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.transmitRate";
123 }
124
125 @Override
126 public List<String> getParameterNames() {
127 return Arrays.asList("Spacecraft","TransmitRate");
128 }
129
130 @Override
131 public List<PParameter> getParameters() {
132 return parameters;
133 }
134
135 @Override
136 public Set<PBody> doGetContainedBodies() {
137 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
138 Set<PBody> bodies = new LinkedHashSet<>();
139 {
140 PBody body = new PBody(this);
141 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
142 PVariable var_TransmitRate = body.getOrCreateVariableByName("TransmitRate");
143 PVariable var_Target = body.getOrCreateVariableByName("Target");
144 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
145 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_TransmitRate), new JavaTransitiveInstancesKey(java.lang.Double.class));
146 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
147 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
148 new ExportedParameter(body, var_TransmitRate, parameter_TransmitRate)
149 ));
150 // find spacecraftUplink(Spacecraft, TransceiverBand::UHF, Target)
151 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
152 new ConstantValue(body, var__virtual_0_, getEnumLiteral("http://www.example.org/satellite", "TransceiverBand", "UHF").getInstance());
153 new PositivePatternCall(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_0_, var_Target), SpacecraftUplink.instance().getInternalQueryRepresentation());
154 // Spacecraft(Target)
155 new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
156 // TransmitRate == 5.0
157 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
158 new ConstantValue(body, var__virtual_1_, 5.0);
159 new Equality(body, var_TransmitRate, var__virtual_1_);
160 bodies.add(body);
161 }
162 {
163 PBody body = new PBody(this);
164 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
165 PVariable var_TransmitRate = body.getOrCreateVariableByName("TransmitRate");
166 PVariable var_Target = body.getOrCreateVariableByName("Target");
167 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
168 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_TransmitRate), new JavaTransitiveInstancesKey(java.lang.Double.class));
169 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
170 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
171 new ExportedParameter(body, var_TransmitRate, parameter_TransmitRate)
172 ));
173 // find spacecraftUplink(Spacecraft, TransceiverBand::X, Target)
174 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
175 new ConstantValue(body, var__virtual_0_, getEnumLiteral("http://www.example.org/satellite", "TransceiverBand", "X").getInstance());
176 new PositivePatternCall(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_0_, var_Target), SpacecraftUplink.instance().getInternalQueryRepresentation());
177 // Spacecraft(Target)
178 new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
179 // TransmitRate == 1.6
180 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
181 new ConstantValue(body, var__virtual_1_, 1.6);
182 new Equality(body, var_TransmitRate, var__virtual_1_);
183 bodies.add(body);
184 }
185 {
186 PBody body = new PBody(this);
187 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
188 PVariable var_TransmitRate = body.getOrCreateVariableByName("TransmitRate");
189 PVariable var_Target = body.getOrCreateVariableByName("Target");
190 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
191 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_TransmitRate), new JavaTransitiveInstancesKey(java.lang.Double.class));
192 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
193 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
194 new ExportedParameter(body, var_TransmitRate, parameter_TransmitRate)
195 ));
196 // find spacecraftUplink(Spacecraft, TransceiverBand::X, Target)
197 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
198 new ConstantValue(body, var__virtual_0_, getEnumLiteral("http://www.example.org/satellite", "TransceiverBand", "X").getInstance());
199 new PositivePatternCall(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_0_, var_Target), SpacecraftUplink.instance().getInternalQueryRepresentation());
200 // GroundStationNetwork(Target)
201 new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "GroundStationNetwork")));
202 // TransmitRate == 0.7
203 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
204 new ConstantValue(body, var__virtual_1_, 0.7);
205 new Equality(body, var_TransmitRate, var__virtual_1_);
206 bodies.add(body);
207 }
208 {
209 PBody body = new PBody(this);
210 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
211 PVariable var_TransmitRate = body.getOrCreateVariableByName("TransmitRate");
212 PVariable var_Target = body.getOrCreateVariableByName("Target");
213 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
214 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_TransmitRate), new JavaTransitiveInstancesKey(java.lang.Double.class));
215 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
216 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
217 new ExportedParameter(body, var_TransmitRate, parameter_TransmitRate)
218 ));
219 // find spacecraftUplink(Spacecraft, TransceiverBand::Ka, Target)
220 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
221 new ConstantValue(body, var__virtual_0_, getEnumLiteral("http://www.example.org/satellite", "TransceiverBand", "Ka").getInstance());
222 new PositivePatternCall(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_0_, var_Target), SpacecraftUplink.instance().getInternalQueryRepresentation());
223 // Spacecraft(Target)
224 new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
225 // TransmitRate == 220.0
226 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
227 new ConstantValue(body, var__virtual_1_, 220.0);
228 new Equality(body, var_TransmitRate, var__virtual_1_);
229 bodies.add(body);
230 }
231 {
232 PBody body = new PBody(this);
233 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
234 PVariable var_TransmitRate = body.getOrCreateVariableByName("TransmitRate");
235 PVariable var_Target = body.getOrCreateVariableByName("Target");
236 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
237 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_TransmitRate), new JavaTransitiveInstancesKey(java.lang.Double.class));
238 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
239 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
240 new ExportedParameter(body, var_TransmitRate, parameter_TransmitRate)
241 ));
242 // find spacecraftUplink(Spacecraft, TransceiverBand::Ka, Target)
243 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
244 new ConstantValue(body, var__virtual_0_, getEnumLiteral("http://www.example.org/satellite", "TransceiverBand", "Ka").getInstance());
245 new PositivePatternCall(body, Tuples.flatTupleOf(var_Spacecraft, var__virtual_0_, var_Target), SpacecraftUplink.instance().getInternalQueryRepresentation());
246 // GroundStationNetwork(Target)
247 new TypeConstraint(body, Tuples.flatTupleOf(var_Target), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "GroundStationNetwork")));
248 // TransmitRate == 80.0
249 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
250 new ConstantValue(body, var__virtual_1_, 80.0);
251 new Equality(body, var_TransmitRate, var__virtual_1_);
252 bodies.add(body);
253 }
254 return bodies;
255 }
256 }
257
258 private static double evaluateExpression_1_1() {
259 return 5.0;
260 }
261
262 private static double evaluateExpression_2_1() {
263 return 1.6;
264 }
265
266 private static double evaluateExpression_3_1() {
267 return 0.7;
268 }
269
270 private static double evaluateExpression_4_1() {
271 return 220.0;
272 }
273
274 private static double evaluateExpression_5_1() {
275 return 80.0;
276 }
277}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/TransmitTime.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/TransmitTime.java
new file mode 100644
index 00000000..eb338bec
--- /dev/null
+++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/TransmitTime.java
@@ -0,0 +1,200 @@
1/**
2 * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql
3 */
4package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal;
5
6import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData;
7import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.ScienceData;
8import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitRate;
9import java.util.Arrays;
10import java.util.LinkedHashSet;
11import java.util.List;
12import java.util.Set;
13import org.eclipse.emf.ecore.EClass;
14import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
15import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher;
16import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
17import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
18import org.eclipse.viatra.query.runtime.matchers.aggregators.sum;
19import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
20import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey;
21import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator;
22import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider;
23import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
24import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
25import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.AggregatorConstraint;
26import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
27import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
28import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExpressionEvaluation;
29import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint;
30import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall;
31import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
32import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
33import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
34import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
35import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
36import org.eclipse.xtext.xbase.lib.DoubleExtensions;
37
38/**
39 * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way.
40 *
41 * <p>Original source:
42 * <code><pre>
43 * private pattern transmitTime(Mission : InterferometryMission, Spacecraft : Spacecraft, TransmitTime : java Double) {
44 * ConstellationMission.spacecraft(Mission, Spacecraft);
45 * find scienceData(Spacecraft, ScienceData);
46 * IncomingData == sum find incomingData(Spacecraft, _, #_);
47 * find transmitRate(Spacecraft, TransmitRate);
48 * TransmitTime == eval((ScienceData + IncomingData) / (7.5 TransmitRate));
49 * }
50 * </pre></code>
51 *
52 * @see GenericPatternMatcher
53 * @see GenericPatternMatch
54 *
55 */
56@SuppressWarnings("all")
57public final class TransmitTime extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher {
58 private TransmitTime() {
59 super(GeneratedPQuery.INSTANCE);
60 }
61
62 /**
63 * @return the singleton instance of the query specification
64 * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded
65 *
66 */
67 public static TransmitTime instance() {
68 try{
69 return LazyHolder.INSTANCE;
70 } catch (ExceptionInInitializerError err) {
71 throw processInitializerError(err);
72 }
73 }
74
75 /**
76 * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitTime (visibility: PUBLIC, simpleName: TransmitTime, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitTime, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created
77 * <b>not</b> at the class load time of the outer class,
78 * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitTime (visibility: PUBLIC, simpleName: TransmitTime, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitTime, deprecated: <unset>) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}.
79 *
80 * <p> This workaround is required e.g. to support recursion.
81 *
82 */
83 private static class LazyHolder {
84 private static final TransmitTime INSTANCE = new TransmitTime();
85
86 /**
87 * Statically initializes the query specification <b>after</b> the field {@link #INSTANCE} is assigned.
88 * This initialization order is required to support indirect recursion.
89 *
90 * <p> The static initializer is defined using a helper field to work around limitations of the code generator.
91 *
92 */
93 private static final Object STATIC_INITIALIZER = ensureInitialized();
94
95 public static Object ensureInitialized() {
96 INSTANCE.ensureInitializedInternal();
97 return null;
98 }
99 }
100
101 private static class GeneratedPQuery extends BaseGeneratedEMFPQuery {
102 private static final TransmitTime.GeneratedPQuery INSTANCE = new GeneratedPQuery();
103
104 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);
105
106 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);
107
108 private final PParameter parameter_TransmitTime = new PParameter("TransmitTime", "java.lang.Double", new JavaTransitiveInstancesKey(java.lang.Double.class), PParameterDirection.INOUT);
109
110 private final List<PParameter> parameters = Arrays.asList(parameter_Mission, parameter_Spacecraft, parameter_TransmitTime);
111
112 private GeneratedPQuery() {
113 super(PVisibility.PRIVATE);
114 }
115
116 @Override
117 public String getFullyQualifiedName() {
118 return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.transmitTime";
119 }
120
121 @Override
122 public List<String> getParameterNames() {
123 return Arrays.asList("Mission","Spacecraft","TransmitTime");
124 }
125
126 @Override
127 public List<PParameter> getParameters() {
128 return parameters;
129 }
130
131 @Override
132 public Set<PBody> doGetContainedBodies() {
133 setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED));
134 Set<PBody> bodies = new LinkedHashSet<>();
135 {
136 PBody body = new PBody(this);
137 PVariable var_Mission = body.getOrCreateVariableByName("Mission");
138 PVariable var_Spacecraft = body.getOrCreateVariableByName("Spacecraft");
139 PVariable var_TransmitTime = body.getOrCreateVariableByName("TransmitTime");
140 PVariable var_ScienceData = body.getOrCreateVariableByName("ScienceData");
141 PVariable var_IncomingData = body.getOrCreateVariableByName("IncomingData");
142 PVariable var___0_ = body.getOrCreateVariableByName("_<0>");
143 PVariable var___1_ = body.getOrCreateVariableByName("_<1>");
144 PVariable var_TransmitRate = body.getOrCreateVariableByName("TransmitRate");
145 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "InterferometryMission")));
146 new TypeConstraint(body, Tuples.flatTupleOf(var_Spacecraft), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
147 new TypeFilterConstraint(body, Tuples.flatTupleOf(var_TransmitTime), new JavaTransitiveInstancesKey(java.lang.Double.class));
148 body.setSymbolicParameters(Arrays.<ExportedParameter>asList(
149 new ExportedParameter(body, var_Mission, parameter_Mission),
150 new ExportedParameter(body, var_Spacecraft, parameter_Spacecraft),
151 new ExportedParameter(body, var_TransmitTime, parameter_TransmitTime)
152 ));
153 // ConstellationMission.spacecraft(Mission, Spacecraft)
154 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "ConstellationMission")));
155 PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}");
156 new TypeConstraint(body, Tuples.flatTupleOf(var_Mission, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/satellite", "ConstellationMission", "spacecraft")));
157 new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft")));
158 new Equality(body, var__virtual_0_, var_Spacecraft);
159 // find scienceData(Spacecraft, ScienceData)
160 new PositivePatternCall(body, Tuples.flatTupleOf(var_Spacecraft, var_ScienceData), ScienceData.instance().getInternalQueryRepresentation());
161 // IncomingData == sum find incomingData(Spacecraft, _, #_)
162 PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}");
163 new AggregatorConstraint(new sum().getAggregatorLogic(Double.class), body, Tuples.flatTupleOf(var_Spacecraft, var___0_, var___1_), IncomingData.instance().getInternalQueryRepresentation(), var__virtual_1_, 2);
164 new Equality(body, var_IncomingData, var__virtual_1_);
165 // find transmitRate(Spacecraft, TransmitRate)
166 new PositivePatternCall(body, Tuples.flatTupleOf(var_Spacecraft, var_TransmitRate), TransmitRate.instance().getInternalQueryRepresentation());
167 // TransmitTime == eval((ScienceData + IncomingData) / (7.5 * TransmitRate))
168 PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}");
169 new ExpressionEvaluation(body, new IExpressionEvaluator() {
170
171 @Override
172 public String getShortDescription() {
173 return "Expression evaluation from pattern transmitTime";
174 }
175
176 @Override
177 public Iterable<String> getInputParameterNames() {
178 return Arrays.asList("IncomingData", "ScienceData", "TransmitRate");}
179
180 @Override
181 public Object evaluateExpression(IValueProvider provider) throws Exception {
182 Double IncomingData = (Double) provider.getValue("IncomingData");
183 Double ScienceData = (Double) provider.getValue("ScienceData");
184 Double TransmitRate = (Double) provider.getValue("TransmitRate");
185 return evaluateExpression_1_1(IncomingData, ScienceData, TransmitRate);
186 }
187 }, var__virtual_2_ );
188 new Equality(body, var_TransmitTime, var__virtual_2_);
189 bodies.add(body);
190 }
191 return bodies;
192 }
193 }
194
195 private static double evaluateExpression_1_1(final Double IncomingData, final Double ScienceData, final Double TransmitRate) {
196 double _plus = DoubleExtensions.operator_plus(ScienceData, IncomingData);
197 double _divide = (_plus / (7.5 * (TransmitRate).doubleValue()));
198 return _divide;
199 }
200}
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 d0542b4a..7ca948cc 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
@@ -133,7 +133,8 @@ pattern kaAntennaGainLow(Comm : CommSubsystem) {
133 133
134@Constraint(severity = "error", key = {Sat}, 134@Constraint(severity = "error", key = {Sat},
135 message = "3U CubeSats can only cross-link using UHF.") 135 message = "3U CubeSats can only cross-link using UHF.")
136pattern threeUCubeSatWithNonUhfCrossLink(Sat : CubeSat3U) { 136pattern threeUCubeSatWithNonUhfCrossLink(Sat : Spacecraft) {
137 Spacecraft.kind(Sat, SpacecraftKind::CubeSat3U);
137 CommunicatingElement.commSubsystem(Sat, SourceComm); 138 CommunicatingElement.commSubsystem(Sat, SourceComm);
138 neg find commSubsystemBandUhf(SourceComm); 139 neg find commSubsystemBandUhf(SourceComm);
139 DirectedCommunicationLink.source(Link, SourceComm); 140 DirectedCommunicationLink.source(Link, SourceComm);
@@ -159,6 +160,141 @@ pattern cubeSatWithKaAntenna(Spacecraft : Spacecraft) {
159 neg find smallSat(Spacecraft); 160 neg find smallSat(Spacecraft);
160} 161}
161 162
162private pattern smallSat(Sat : SmallSat) { 163private pattern smallSat(Sat : Spacecraft) {
163 SmallSat(Sat); 164 Spacecraft.kind(Sat, SpacecraftKind::SmallSat);
165}
166
167//
168// Metrics
169//
170
171// Coverage
172
173pattern coverageMetric(Coverage : java Double) {
174 Coverage == sum find missionCoverage(_, #_);
175}
176
177private pattern missionCoverage(Mission : InterferometryMission, Coverage : java Double) {
178 InterferometryMission.observationTime(Mission, ObservationTime);
179 ObserverCount == count find spacecraftWithInterferometryPayload(Mission, _);
180 Coverage == eval(Math.pow(1 - 2.0 / ObserverCount, 1 + 9 * (1.0 / ObservationTime)) + 0.05 * ObservationTime / 3);
181}
182
183// Time
184
185pattern timeMetric(Time : java Double) {
186 Time == sum find missionTime(_, #_);
187}
188
189private pattern missionTime(Mission : InterferometryMission, Time : java Double) {
190 InterferometryMission.observationTime(Mission, ObservationTime);
191 TrasmitTime == sum find transmitTime(Mission, _, #_);
192 Time == eval(TrasmitTime + 60.0 * ObservationTime);
193}
194
195private pattern transmitTime(Mission : InterferometryMission, Spacecraft : Spacecraft, TransmitTime : java Double) {
196 ConstellationMission.spacecraft(Mission, Spacecraft);
197 find scienceData(Spacecraft, ScienceData);
198 IncomingData == sum find incomingData(Spacecraft, _, #_);
199 find transmitRate(Spacecraft, TransmitRate);
200 TransmitTime == eval((ScienceData + IncomingData) / (7.5 * TransmitRate));
201}
202
203private pattern incomingData(Spacecraft : Spacecraft, Source : Spacecraft, Data : java Double) {
204 find indirectCommunicationLink(Source, Spacecraft);
205 find scienceData(Source, Data);
206}
207
208private pattern scienceData(Spacecraft : Spacecraft, Data : java Double) {
209 ConstellationMission.spacecraft(Mission, Spacecraft);
210 InterferometryMission.observationTime(Mission, ObservationTime);
211 Data == eval(12.0 * ObservationTime);
212}
213
214private pattern transmitRate(Spacecraft : Spacecraft, TransmitRate : java Double) {
215 find spacecraftUplink(Spacecraft, TransceiverBand::UHF, Target);
216 Spacecraft(Target);
217 TransmitRate == 5.0;
218} or {
219 find spacecraftUplink(Spacecraft, TransceiverBand::X, Target);
220 Spacecraft(Target);
221 TransmitRate == 1.6;
222} or {
223 find spacecraftUplink(Spacecraft, TransceiverBand::X, Target);
224 GroundStationNetwork(Target);
225 TransmitRate == 0.7;
226} or {
227 find spacecraftUplink(Spacecraft, TransceiverBand::Ka, Target);
228 Spacecraft(Target);
229 TransmitRate == 220.0;
230} or {
231 find spacecraftUplink(Spacecraft, TransceiverBand::Ka, Target);
232 GroundStationNetwork(Target);
233 TransmitRate == 80.0;
234}
235
236private pattern spacecraftUplink(Spacecraft : Spacecraft, Band : TransceiverBand, Target : CommunicatingElement) {
237 CommunicatingElement.communicationLink(Spacecraft, Link);
238 DirectedCommunicationLink.source.band(Link, Band);
239 DirectedCommunicationLink.target(Link, TargetSubsystem);
240 CommunicatingElement.commSubsystem(Target, TargetSubsystem);
241}
242
243// Cost
244
245pattern costMetric(Cost : java Double) {
246 Cost == sum find missionCost(_, #_);
247}
248
249private pattern missionCost(Mission : InterferometryMission, Cost : java Double) {
250 InterferometryMission.observationTime(Mission, ObservationTime);
251 SpacecraftCost == sum find spacecraftCost(Mission, _, #_);
252 Cost == eval(SpacecraftCost + 100000.0 * ObservationTime);
253}
254
255private pattern spacecraftCost(Mission : InterferometryMission, Spacecraft : Spacecraft, Cost : java Double) {
256 ConstellationMission.spacecraft(Mission, Spacecraft);
257 Spacecraft.kind(Spacecraft, Kind);
258 KindCount == count find spacecraftOfKind(_, Kind);
259 find basePrice(Spacecraft, BasePrice);
260 find interferometryPayloadCost(Spacecraft, InterferometryPayloadCost);
261 find additionalCommSubsystemCost(Spacecraft, AdditionalCommSubsystemCost);
262 Cost == eval(BasePrice * Math.pow(KindCount, -0.25) + InterferometryPayloadCost + AdditionalCommSubsystemCost);
263}
264
265private pattern spacecraftOfKind(Spacecraft : Spacecraft, Kind : SpacecraftKind) {
266 Spacecraft.kind(Spacecraft, Kind);
267}
268
269private pattern basePrice(Spacecraft : Spacecraft, BasePrice : java Double) {
270 Spacecraft.kind(Spacecraft, SpacecraftKind::CubeSat3U);
271 BasePrice == 250000.0;
272} or {
273 Spacecraft.kind(Spacecraft, SpacecraftKind::CubeSat6U);
274 BasePrice == 750000.0;
275} or {
276 Spacecraft.kind(Spacecraft, SpacecraftKind::SmallSat);
277 BasePrice == 3000000.0;
278}
279
280private pattern interferometryPayloadCost(Spacecraft : Spacecraft, Cost : java Double) {
281 find spacecraftWithInterferometryPayload(_, Spacecraft);
282 Cost == 50000.0;
283} or {
284 neg find spacecraftWithInterferometryPayload(_, Spacecraft);
285 Cost == 0.0;
286}
287
288private pattern additionalCommSubsystemCost(Spacecraft : Spacecraft, Cost : java Double) {
289 find spacecraftWithTwoCommSubsystems(Spacecraft);
290 Cost == 100000.0;
291} or {
292 neg find spacecraftWithTwoCommSubsystems(Spacecraft);
293 Cost == 0.0;
294}
295
296private pattern spacecraftWithTwoCommSubsystems(Spacecraft : Spacecraft) {
297 Spacecraft.commSubsystem(Spacecraft, Subsystem1);
298 Spacecraft.commSubsystem(Spacecraft, Subsystem2);
299 Subsystem1 != Subsystem2;
164} 300}
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/runner/.SatelliteGeneratorMain.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/runner/.SatelliteGeneratorMain.xtendbin
deleted file mode 100644
index d2d60846..00000000
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/runner/.SatelliteGeneratorMain.xtendbin
+++ /dev/null
Binary files differ
diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/runner/SatelliteGeneratorMain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/runner/SatelliteGeneratorMain.java
deleted file mode 100644
index f6890163..00000000
--- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/runner/SatelliteGeneratorMain.java
+++ /dev/null
@@ -1,15 +0,0 @@
1package hu.bme.mit.inf.dslreasoner.domains.satellite.runner;
2
3import hu.bme.mit.inf.dslreasoner.application.execution.StandaloneScriptExecutor;
4import org.eclipse.xtext.xbase.lib.InputOutput;
5
6@SuppressWarnings("all")
7public final class SatelliteGeneratorMain {
8 private SatelliteGeneratorMain() {
9 throw new IllegalStateException("This is a static utility class and should not be instantiated directly.");
10 }
11
12 public static void main(final String[] args) {
13 InputOutput.<String>println(StandaloneScriptExecutor.executeScript("configs/generation.vsconfig"));
14 }
15}