From c1f185fd8fc2c3dfc123d9271726c588963c7c01 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Mon, 8 Apr 2019 00:58:00 +0200 Subject: Objective POC implementation --- .../optimization/ThreeValuedCostObjective.xtend | 86 ++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend') diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend new file mode 100644 index 00000000..362ef4a3 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend @@ -0,0 +1,86 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization + +import com.google.common.collect.ImmutableList +import java.util.Collection +import org.eclipse.viatra.dse.base.ThreadContext +import org.eclipse.viatra.query.runtime.api.IPatternMatch +import org.eclipse.viatra.query.runtime.api.IQuerySpecification +import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher +import org.eclipse.xtend.lib.annotations.Data + +@Data +class ThreeValuedCostElement { + val IQuerySpecification> currentMatchQuery + val IQuerySpecification> mayMatchQuery + val IQuerySpecification> mustMatchQuery + val int weight +} + +class ThreeValuedCostObjective extends AbstractThreeValuedObjective { + val Collection costElements + Collection matchers + + new(String name, Collection costElements, ObjectiveKind kind, ObjectiveThreshold threshold, + int level) { + super(name, kind, threshold, level) + this.costElements = costElements + } + + override createNew() { + new ThreeValuedCostObjective(name, costElements, kind, threshold, level) + } + + override init(ThreadContext context) { + val queryEngine = context.queryEngine + matchers = ImmutableList.copyOf(costElements.map [ element | + new CostElementMatchers( + queryEngine.getMatcher(element.currentMatchQuery), + queryEngine.getMatcher(element.mayMatchQuery), + queryEngine.getMatcher(element.mustMatchQuery), + element.weight + ) + ]) + } + + override getFitness(ThreadContext context) { + var int cost = 0 + for (matcher : matchers) { + cost += matcher.weight * matcher.currentMatcher.countMatches + } + cost as double + } + + override getLowestPossibleFitness(ThreadContext threadContext) { + var int cost = 0 + for (matcher : matchers) { + if (matcher.weight >= 0) { + cost += matcher.weight * matcher.mustMatcher.countMatches + } else if (matcher.mayMatcher.countMatches > 0) { + // TODO Count may matches. + return Double.NEGATIVE_INFINITY + } + } + cost as double + } + + override getHighestPossibleFitness(ThreadContext threadContext) { + var int cost = 0 + for (matcher : matchers) { + if (matcher.weight <= 0) { + cost += matcher.weight * matcher.mustMatcher.countMatches + } else if (matcher.mayMatcher.countMatches > 0) { + // TODO Count may matches. + return Double.POSITIVE_INFINITY + } + } + cost as double + } + + @Data + private static class CostElementMatchers { + val ViatraQueryMatcher currentMatcher + val ViatraQueryMatcher mayMatcher + val ViatraQueryMatcher mustMatcher + val int weight + } +} -- cgit v1.2.3-54-g00ecf From d239ff5d82587220c7e157d18936351256bccffe Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Mon, 8 Apr 2019 23:19:31 +0200 Subject: Fix solution store for optimization --- .../application/execution/SolverLoader.xtend | 1 + .../viatrasolver/reasoner/ViatraReasoner.xtend | 13 +++++++--- .../SurelyViolatedObjectiveGlobalConstraint.xtend | 2 +- .../reasoner/dse/ViatraReasonerSolutionSaver.xtend | 30 ++++++++++++++++++---- .../optimization/ThreeValuedCostObjective.xtend | 1 - .../configs/generation.vsconfig | 4 +-- .../inputs/FamPatterns.vql | 4 +-- 7 files changed, 40 insertions(+), 15 deletions(-) (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend') diff --git a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend index f769d46f..1139080b 100644 --- a/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend +++ b/Application/hu.bme.mit.inf.dslreasoner.application/src/hu/bme/mit/inf/dslreasoner/application/execution/SolverLoader.xtend @@ -150,6 +150,7 @@ class SolverLoader { } else { packageName + "." + pattern.name } + element.weight = costEntry.weight costObjectiveConfig.elements += element } } else { diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend index 6898550d..c022beac 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend @@ -88,7 +88,7 @@ class ViatraReasoner extends LogicReasoner { wf2ObjectiveConverter.createCompletenessObjective(method.unfinishedWF) )) - val extermalObjectives = Lists.newArrayListWithExpectedSize(viatraConfig.costObjectives.size) + val extremalObjectives = Lists.newArrayListWithExpectedSize(viatraConfig.costObjectives.size) for (entry : viatraConfig.costObjectives.indexed) { val objectiveName = '''costObjective«entry.key»''' val objectiveConfig = entry.value @@ -111,13 +111,18 @@ class ViatraReasoner extends LogicReasoner { objectiveConfig.threshold, 3) dse.addObjective(costObjective) if (objectiveConfig.findExtremum) { - extermalObjectives += costObjective + extremalObjectives += costObjective } } - val solutionStore = new SolutionStore(configuration.solutionScope.numberOfRequiredSolutions) + val numberOfRequiredSolutions = configuration.solutionScope.numberOfRequiredSolutions + val solutionStore = if (extremalObjectives.empty) { + new SolutionStore(numberOfRequiredSolutions) + } else { + new SolutionStore() + } solutionStore.registerSolutionFoundHandler(new LoggerSolutionFoundHandler(viatraConfig)) - val solutionSaver = new ViatraReasonerSolutionSaver(newArrayList(extermalObjectives)) + val solutionSaver = new ViatraReasonerSolutionSaver(newArrayList(extremalObjectives), numberOfRequiredSolutions) val solutionCopier = solutionSaver.solutionCopier solutionStore.withSolutionSaver(solutionSaver) dse.solutionStore = solutionStore diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SurelyViolatedObjectiveGlobalConstraint.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SurelyViolatedObjectiveGlobalConstraint.xtend index 7fd494a0..f54a31ca 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SurelyViolatedObjectiveGlobalConstraint.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SurelyViolatedObjectiveGlobalConstraint.xtend @@ -24,6 +24,6 @@ class SurelyViolatedObjectiveGlobalConstraint implements IGlobalConstraint { override checkGlobalConstraint(ThreadContext context) { val bestFitness = DseUtils.caclulateBestPossibleFitness(context) - bestFitness.satisifiesHardObjectives && !solutionSaver.isFitnessDominated(bestFitness) + bestFitness.satisifiesHardObjectives && solutionSaver.fitnessMayBeSaved(bestFitness) } } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend index 5877778e..17df6c55 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend @@ -18,14 +18,16 @@ import org.eclipse.xtend.lib.annotations.Accessors class ViatraReasonerSolutionSaver implements ISolutionSaver { @Accessors val solutionCopier = new SolutionCopier val boolean hasExtremalObjectives + val int numberOfRequiredSolutions val ObjectiveComparatorHelper comparatorHelper val Map trajectories = new HashMap @Accessors(PUBLIC_SETTER) var Map solutionsCollection - new(IObjective[][] leveledExtremalObjectives) { + new(IObjective[][] leveledExtremalObjectives, int numberOfRequiredSolutions) { comparatorHelper = new ObjectiveComparatorHelper(leveledExtremalObjectives) hasExtremalObjectives = leveledExtremalObjectives.exists[!empty] + this.numberOfRequiredSolutions = numberOfRequiredSolutions } override saveSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory) { @@ -49,6 +51,9 @@ class ViatraReasonerSolutionSaver implements ISolutionSaver { dominatedTrajectories += entry.key } } + if (dominatedTrajectories.size == 0 && !needsMoreSolutionsWithSameFitness) { + return false + } // We must save the new trajectory before removing dominated trajectories // to avoid removing the current solution when it is reachable only via dominated trajectories. val solutionSaved = basicSaveSolution(context, id, solutionTrajectory) @@ -86,14 +91,29 @@ class ViatraReasonerSolutionSaver implements ISolutionSaver { } solutionSaved } - - def isFitnessDominated(Fitness fitness) { + + def fitnessMayBeSaved(Fitness fitness) { + if (!hasExtremalObjectives) { + return true + } + var boolean mayDominate for (existingFitness : trajectories.values) { val isNewFitnessBetter = comparatorHelper.compare(fitness, existingFitness) if (isNewFitnessBetter < 0) { - return true + return false } + if (isNewFitnessBetter > 0) { + mayDominate = true + } + } + mayDominate || needsMoreSolutionsWithSameFitness + } + + private def boolean needsMoreSolutionsWithSameFitness() { + if (solutionsCollection === null) { + // The solutions collection will only be initialized upon saving the first solution. + return true } - false + solutionsCollection.size < numberOfRequiredSolutions } } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend index 362ef4a3..e2585c83 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend @@ -69,7 +69,6 @@ class ThreeValuedCostObjective extends AbstractThreeValuedObjective { if (matcher.weight <= 0) { cost += matcher.weight * matcher.mustMatcher.countMatches } else if (matcher.mayMatcher.countMatches > 0) { - // TODO Count may matches. return Double.POSITIVE_INFINITY } } diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/configs/generation.vsconfig b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/configs/generation.vsconfig index c29d234a..72def8c5 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/configs/generation.vsconfig +++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/configs/generation.vsconfig @@ -7,11 +7,11 @@ generate { partial-model = { "inputs/FamInstance.xmi"} solver = ViatraSolver scope = { - #node = 5 + #node = 10 } objectives = { minimize cost { - hu.bme.mit.inf.dslreasoner.domains.fam::informationLink = 1 + hu.bme.mit.inf.dslreasoner.domains.fam::functionalOutput = 1 } } diff --git a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamPatterns.vql b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamPatterns.vql index 31b9286e..96bb5f3a 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamPatterns.vql +++ b/Tests/hu.bme.mit.inf.dslreasoner.application.FAMTest/inputs/FamPatterns.vql @@ -11,6 +11,6 @@ pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { FunctionalInput.terminator(In,T); } -pattern informationLink(I : InformationLink) { - InformationLink(I); +pattern functionalOutput(O : FunctionalOutput) { + FunctionalOutput(O); } -- cgit v1.2.3-54-g00ecf From c0c5a1644cc221352b8b9b370eea6a87677ba948 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Sat, 15 Jun 2019 20:56:47 -0400 Subject: Try fix statecode bug Modified graph width calculation to not depend on order of nodes --- .../configs/generation.vsconfig | 2 +- .../outputs/debug/errors.txt | 13 - .../outputs/debug/generated3valued.vql_deactivated | 3000 -------------------- .../outputs/debug/init.partialmodel | 147 - .../outputs/log.txt | 2 +- .../outputs/models/1.gml | 2453 ---------------- .../outputs/models/1.png | Bin 527932 -> 0 bytes .../outputs/models/1.xmi | 47 - .../outputs/models/2.gml | 2453 ---------------- .../outputs/models/2.png | Bin 541309 -> 0 bytes .../outputs/models/2.xmi | 47 - .../outputs/models/3.gml | 2452 ---------------- .../outputs/models/3.png | Bin 527179 -> 0 bytes .../outputs/models/3.xmi | 47 - .../outputs/models/4.gml | 2452 ---------------- .../outputs/models/4.png | Bin 546802 -> 0 bytes .../outputs/models/4.xmi | 47 - .../outputs/models/5.gml | 2452 ---------------- .../outputs/models/5.png | Bin 536645 -> 0 bytes .../outputs/models/5.xmi | 47 - .../outputs/models/run1/1_1.gml | 182 +- .../outputs/models/run1/1_1.png | Bin 677187 -> 552885 bytes .../outputs/models/run1/1_1.xmi | 40 +- .../outputs/models/run2/2_1.gml | 213 +- .../outputs/models/run2/2_1.png | Bin 548270 -> 546742 bytes .../outputs/models/run2/2_1.xmi | 36 +- .../outputs/models/run3/3_1.gml | 247 +- .../outputs/models/run3/3_1.png | Bin 652469 -> 570634 bytes .../outputs/models/run3/3_1.xmi | 36 +- .../outputs/models/run4/4_1.gml | 241 +- .../outputs/models/run4/4_1.png | Bin 606191 -> 662713 bytes .../outputs/models/run4/4_1.xmi | 32 +- .../outputs/models/run5/5_1.gml | 2452 ---------------- .../outputs/models/run5/5_1.png | Bin 592755 -> 0 bytes .../outputs/models/run5/5_1.xmi | 47 - .../outputs/statistics.csv | 7 - .../plugin.xml | 3 - .../satellite/queries/SatelliteQueries.java | 33 - .../queries/internal/SatelliteQueriesAll.java | 51 - .../queries/internal/SpacecraftOfKindCount.java | 189 -- .../domains/satellite/mdeo/CostObjective.xtend | 22 +- .../domains/satellite/queries/SatelliteQueries.vql | 282 +- .../domains/satellite/mdeo/.CostObjective.xtendbin | Bin 2595 -> 805 bytes .../mdeo/.LocalSearchEngineManager.xtendbin | Bin 4284 -> 4261 bytes .../mdeo/.PatternMatchConstraint.xtendbin | Bin 5113 -> 5091 bytes .../domains/satellite/mdeo/CostObjective.java | 16 - .../neighbourhood/Descriptor.xtend | 188 +- .../neighbourhood/NeighbourhoodOptions.xtend | 22 + ...nterpretation2NeighbourhoodRepresentation.xtend | 456 +-- ...ation2PairwiseNeighbourhoodRepresentation.xtend | 68 + ...bstractNeighborhoodBasedStateCoderFactory.xtend | 137 + .../IdentifierBasedStateCoderFactory.xtend | 4 +- .../NeighbourhoodBasedStateCoderFactory.xtend | 275 +- ...irwiseNeighbourhoodBasedStateCoderFactory.xtend | 75 + .../viatrasolver/reasoner/ViatraReasoner.xtend | 9 +- .../reasoner/ViatraReasonerConfiguration.xtend | 3 +- .../dse/BestFirstStrategyForModelGeneration.java | 8 +- .../AbstractThreeValuedObjective.xtend | 71 +- .../CompositeDirectionalThresholdObjective.xtend | 62 + .../DirectionalThresholdObjective.xtend | 164 ++ .../reasoner/optimization/MatchCostObjective.xtend | 52 + .../reasoner/optimization/ObjectiveKind.java | 24 + .../optimization/QueryBasedObjective.xtend | 48 + .../optimization/ThreeValuedCostObjective.xtend | 2 +- 64 files changed, 1764 insertions(+), 19694 deletions(-) delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/errors.txt delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generated3valued.vql_deactivated delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/init.partialmodel delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.gml delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.png delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.xmi delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.gml delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.png delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.xmi delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.gml delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.png delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.xmi delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.gml delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.png delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.xmi delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.gml delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.png delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.xmi delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.gml delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.png delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.xmi delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/statistics.csv delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKindCount.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.java create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodOptions.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2PairwiseNeighbourhoodRepresentation.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/AbstractNeighborhoodBasedStateCoderFactory.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/PairwiseNeighbourhoodBasedStateCoderFactory.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CompositeDirectionalThresholdObjective.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/DirectionalThresholdObjective.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/MatchCostObjective.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/QueryBasedObjective.xtend (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig index 4296e632..66c468d0 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/configs/generation.vsconfig @@ -3,7 +3,7 @@ import viatra "src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/Satellit generate { metamodel = { package satellite excluding { InterferometryMission.observationTime } } - constraints = { package hu.bme.mit.inf.dslreasoner.domains.satellite.queries } + constraints = { package hu.bme.mit.inf.dslreasoner.domains.satellite.queries } partial-model = { "inputs/SatelliteInstance.xmi"} solver = ViatraSolver scope = { diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/errors.txt b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/errors.txt deleted file mode 100644 index 5267304c..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/errors.txt +++ /dev/null @@ -1,13 +0,0 @@ -Error occured (DiagnosticWrappedException): org.eclipse.emf.ecore.xmi.FeatureNotFoundException: Feature 'band' not found. (file:///home/kris/bme/research/VIATRA-Generator/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/inputs/SatelliteInstance.xmi, 11, 24) - org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.handleDemandLoadException(ResourceSetImpl.java:319) - org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:278) - org.eclipse.xtext.resource.XtextResourceSet.getResource(XtextResourceSet.java:265) - org.eclipse.xtext.resource.SynchronizedXtextResourceSet.getResource(SynchronizedXtextResourceSet.java:25) - hu.bme.mit.inf.dslreasoner.application.execution.ModelLoader.loadModel(ModelLoader.java:41) - hu.bme.mit.inf.dslreasoner.application.execution.GenerationTaskExecutor.executeGenerationTask(GenerationTaskExecutor.java:177) - hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor._execute(ScriptExecutor.java:137) - hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.execute(ScriptExecutor.java:358) - hu.bme.mit.inf.dslreasoner.application.execution.ScriptExecutor.executeScript(ScriptExecutor.java:118) - hu.bme.mit.inf.dslreasoner.application.execution.StandaloneScriptExecutor.executeScript(StandaloneScriptExecutor.java:155) - hu.bme.mit.inf.dslreasoner.application.execution.StandaloneScriptExecutor.executeScript(StandaloneScriptExecutor.java:147) - hu.bme.mit.inf.dslreasoner.domains.satellite.runner.SatelliteGeneratorMain.main(SatelliteGeneratorMain.java:13) diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generated3valued.vql_deactivated b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generated3valued.vql_deactivated deleted file mode 100644 index 9bc66dee..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/generated3valued.vql_deactivated +++ /dev/null @@ -1,3000 +0,0 @@ -import epackage "http://www.bme.hu/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage" -import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/problem" -import epackage "http://www.bme.hu/mit/inf/dslreasoner/logic/model/language" - -////////// -// 0. Util -////////// -private pattern interpretation(problem:LogicProblem, interpretation:PartialInterpretation) { - PartialInterpretation.problem(interpretation,problem); -} - -///////////////////////// -// 0.1 Existence -///////////////////////// -private pattern mustExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - find interpretation(problem,interpretation); - LogicProblem.elements(problem,element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); -} - -private pattern mayExist(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - find mustExist(problem,interpretation,element); -} or { - find interpretation(problem,interpretation); - neg find elementCloseWorld(element); - PartialInterpretation.openWorldElements(interpretation,element); -} - -private pattern elementCloseWorld(element:DefinedElement) { - PartialInterpretation.openWorldElements(i,element); - PartialInterpretation.maxNewElements(i,0); -} or { - Scope.targetTypeInterpretation(scope,interpretation); - PartialTypeInterpratation.elements(interpretation,element); - Scope.maxNewElements(scope,0); -} - -//////////////////////// -// 0.2 Equivalence -//////////////////////// -pattern mayEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { - find mayExist(problem,interpretation,a); - find mayExist(problem,interpretation,b); - a == b; -} -pattern mustEquivalent(problem:LogicProblem, interpretation:PartialInterpretation, a: DefinedElement, b: DefinedElement) { - find mustExist(problem,interpretation,a); - find mustExist(problem,interpretation,b); - a == b; -} - -//////////////////////// -// 0.3 Required Patterns by TypeIndexer -//////////////////////// -private pattern typeInterpretation(problem:LogicProblem, interpretation:PartialInterpretation, type:TypeDeclaration, typeInterpretation:PartialComplexTypeInterpretation) { - find interpretation(problem,interpretation); - LogicProblem.types(problem,type); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); -} - -private pattern directInstanceOf(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement, type:Type) { - find interpretation(problem,interpretation); - LogicProblem.types(problem,type); - TypeDefinition.elements(type,element); -} or { - find interpretation(problem,interpretation); - find typeInterpretation(problem,interpretation,type,typeInterpretation); - PartialComplexTypeInterpretation.elements(typeInterpretation,element); -} - -private pattern isPrimitive(element: PrimitiveElement) { - PrimitiveElement(element); -} - -////////// -// 1. Problem-Specific Base Indexers -////////// -// 1.1 Type Indexers -////////// -// 1.1.1 primitive Type Indexers -////////// - -////////// -// 1.1.2 domain-specific Type Indexers -////////// -/** - * An element must be an instance of type "ConstellationMission class". - */ -private pattern mustInstanceOfConstellationMission_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"ConstellationMission class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewConstellationMission_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"ConstellationMission class"); -} - -/** - * An element may be an instance of type "ConstellationMission class". - */ -private pattern mayInstanceOfConstellationMission_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfInterferometryMission_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewConstellationMission_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfInterferometryMission_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewConstellationMission_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfConstellationMission_class(problem,interpretation,element); } -/** - * An element must be an instance of type "InterferometryMission class". - */ -private pattern mustInstanceOfInterferometryMission_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"InterferometryMission class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewInterferometryMission_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"InterferometryMission class"); -} - -/** - * An element may be an instance of type "InterferometryMission class". - */ -private pattern mayInstanceOfInterferometryMission_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewInterferometryMission_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewInterferometryMission_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfInterferometryMission_class(problem,interpretation,element); } -/** - * An element must be an instance of type "CommunicatingElement class". - */ -private pattern mustInstanceOfCommunicatingElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"CommunicatingElement class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewCommunicatingElement_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"CommunicatingElement class"); -} - -/** - * An element may be an instance of type "CommunicatingElement class". - */ -private pattern mayInstanceOfCommunicatingElement_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewCommunicatingElement_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewCommunicatingElement_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); } -/** - * An element must be an instance of type "GroundStationNetwork class". - */ -private pattern mustInstanceOfGroundStationNetwork_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"GroundStationNetwork class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewGroundStationNetwork_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"GroundStationNetwork class"); -} - -/** - * An element may be an instance of type "GroundStationNetwork class". - */ -private pattern mayInstanceOfGroundStationNetwork_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewGroundStationNetwork_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewGroundStationNetwork_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); } -/** - * An element must be an instance of type "Spacecraft class". - */ -private pattern mustInstanceOfSpacecraft_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"Spacecraft class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewSpacecraft_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"Spacecraft class"); -} - -/** - * An element may be an instance of type "Spacecraft class". - */ -private pattern mayInstanceOfSpacecraft_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewSpacecraft_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewSpacecraft_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfSpacecraft_class(problem,interpretation,element); } -/** - * An element must be an instance of type "CommSubsystem class". - */ -private pattern mustInstanceOfCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"CommSubsystem class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"CommSubsystem class"); -} - -/** - * An element may be an instance of type "CommSubsystem class". - */ -private pattern mayInstanceOfCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewCommSubsystem_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewCommSubsystem_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfCommSubsystem_class(problem,interpretation,element); } -/** - * An element must be an instance of type "Payload class". - */ -private pattern mustInstanceOfPayload_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"Payload class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewPayload_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"Payload class"); -} - -/** - * An element may be an instance of type "Payload class". - */ -private pattern mayInstanceOfPayload_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find mustInstanceOfInterferometryPayload_class(problem,interpretation,element); - neg find scopeDisallowsNewPayload_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find mustInstanceOfInterferometryPayload_class(problem,interpretation,element); - neg find scopeDisallowsNewPayload_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfPayload_class(problem,interpretation,element); } -/** - * An element must be an instance of type "InterferometryPayload class". - */ -private pattern mustInstanceOfInterferometryPayload_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"InterferometryPayload class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewInterferometryPayload_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"InterferometryPayload class"); -} - -/** - * An element may be an instance of type "InterferometryPayload class". - */ -private pattern mayInstanceOfInterferometryPayload_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewInterferometryPayload_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewInterferometryPayload_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfInterferometryPayload_class(problem,interpretation,element); } -/** - * An element must be an instance of type "CubeSat3U class". - */ -private pattern mustInstanceOfCubeSat3U_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"CubeSat3U class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewCubeSat3U_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"CubeSat3U class"); -} - -/** - * An element may be an instance of type "CubeSat3U class". - */ -private pattern mayInstanceOfCubeSat3U_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewCubeSat3U_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewCubeSat3U_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfCubeSat3U_class(problem,interpretation,element); } -/** - * An element must be an instance of type "CubeSat6U class". - */ -private pattern mustInstanceOfCubeSat6U_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"CubeSat6U class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewCubeSat6U_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"CubeSat6U class"); -} - -/** - * An element may be an instance of type "CubeSat6U class". - */ -private pattern mayInstanceOfCubeSat6U_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewCubeSat6U_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewCubeSat6U_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfCubeSat6U_class(problem,interpretation,element); } -/** - * An element must be an instance of type "SmallSat class". - */ -private pattern mustInstanceOfSmallSat_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"SmallSat class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewSmallSat_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"SmallSat class"); -} - -/** - * An element may be an instance of type "SmallSat class". - */ -private pattern mayInstanceOfSmallSat_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewSmallSat_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewSmallSat_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfSmallSat_class(problem,interpretation,element); } -/** - * An element must be an instance of type "CubeSat class". - */ -private pattern mustInstanceOfCubeSat_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"CubeSat class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewCubeSat_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"CubeSat class"); -} - -/** - * An element may be an instance of type "CubeSat class". - */ -private pattern mayInstanceOfCubeSat_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); - neg find scopeDisallowsNewCubeSat_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); - neg find scopeDisallowsNewCubeSat_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfCubeSat_class(problem,interpretation,element); } -/** - * An element must be an instance of type "UHFCommSubsystem class". - */ -private pattern mustInstanceOfUHFCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"UHFCommSubsystem class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewUHFCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"UHFCommSubsystem class"); -} - -/** - * An element may be an instance of type "UHFCommSubsystem class". - */ -private pattern mayInstanceOfUHFCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewUHFCommSubsystem_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewUHFCommSubsystem_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,element); } -/** - * An element must be an instance of type "XCommSubsystem class". - */ -private pattern mustInstanceOfXCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"XCommSubsystem class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewXCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"XCommSubsystem class"); -} - -/** - * An element may be an instance of type "XCommSubsystem class". - */ -private pattern mayInstanceOfXCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewXCommSubsystem_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewXCommSubsystem_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); } -/** - * An element must be an instance of type "KaCommSubsystem class". - */ -private pattern mustInstanceOfKaCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"KaCommSubsystem class"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewKaCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"KaCommSubsystem class"); -} - -/** - * An element may be an instance of type "KaCommSubsystem class". - */ -private pattern mayInstanceOfKaCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewKaCommSubsystem_class(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewKaCommSubsystem_class(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); } -/** - * An element must be an instance of type "ConstellationMission class DefinedPart". - */ -private pattern mustInstanceOfConstellationMission_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"ConstellationMission class DefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewConstellationMission_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"ConstellationMission class DefinedPart"); -} - -/** - * An element may be an instance of type "ConstellationMission class DefinedPart". - */ -private pattern mayInstanceOfConstellationMission_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ find mustInstanceOfConstellationMission_class_DefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "ConstellationMission class UndefinedPart". - */ -private pattern mustInstanceOfConstellationMission_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"ConstellationMission class UndefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewConstellationMission_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"ConstellationMission class UndefinedPart"); -} - -/** - * An element may be an instance of type "ConstellationMission class UndefinedPart". - */ -private pattern mayInstanceOfConstellationMission_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfInterferometryMission_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewConstellationMission_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfInterferometryMission_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewConstellationMission_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "InterferometryMission class DefinedPart". - */ -private pattern mustInstanceOfInterferometryMission_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"InterferometryMission class DefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewInterferometryMission_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"InterferometryMission class DefinedPart"); -} - -/** - * An element may be an instance of type "InterferometryMission class DefinedPart". - */ -private pattern mayInstanceOfInterferometryMission_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ find mustInstanceOfInterferometryMission_class_DefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "InterferometryMission class UndefinedPart". - */ -private pattern mustInstanceOfInterferometryMission_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"InterferometryMission class UndefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewInterferometryMission_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"InterferometryMission class UndefinedPart"); -} - -/** - * An element may be an instance of type "InterferometryMission class UndefinedPart". - */ -private pattern mayInstanceOfInterferometryMission_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewInterferometryMission_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewInterferometryMission_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfInterferometryMission_class_UndefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "CommunicatingElement class DefinedPart". - */ -private pattern mustInstanceOfCommunicatingElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"CommunicatingElement class DefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewCommunicatingElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"CommunicatingElement class DefinedPart"); -} - -/** - * An element may be an instance of type "CommunicatingElement class DefinedPart". - */ -private pattern mayInstanceOfCommunicatingElement_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ find mustInstanceOfCommunicatingElement_class_DefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "CommunicatingElement class UndefinedPart". - */ -private pattern mustInstanceOfCommunicatingElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"CommunicatingElement class UndefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewCommunicatingElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"CommunicatingElement class UndefinedPart"); -} - -/** - * An element may be an instance of type "CommunicatingElement class UndefinedPart". - */ -private pattern mayInstanceOfCommunicatingElement_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfSpacecraft_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewCommunicatingElement_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfSpacecraft_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewCommunicatingElement_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfCommunicatingElement_class_UndefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "GroundStationNetwork class DefinedPart". - */ -private pattern mustInstanceOfGroundStationNetwork_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"GroundStationNetwork class DefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewGroundStationNetwork_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"GroundStationNetwork class DefinedPart"); -} - -/** - * An element may be an instance of type "GroundStationNetwork class DefinedPart". - */ -private pattern mayInstanceOfGroundStationNetwork_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ find mustInstanceOfGroundStationNetwork_class_DefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "GroundStationNetwork class UndefinedPart". - */ -private pattern mustInstanceOfGroundStationNetwork_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"GroundStationNetwork class UndefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewGroundStationNetwork_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"GroundStationNetwork class UndefinedPart"); -} - -/** - * An element may be an instance of type "GroundStationNetwork class UndefinedPart". - */ -private pattern mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfSpacecraft_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewGroundStationNetwork_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfSpacecraft_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find scopeDisallowsNewGroundStationNetwork_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "CommSubsystem class DefinedPart". - */ -private pattern mustInstanceOfCommSubsystem_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"CommSubsystem class DefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewCommSubsystem_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"CommSubsystem class DefinedPart"); -} - -/** - * An element may be an instance of type "CommSubsystem class DefinedPart". - */ -private pattern mayInstanceOfCommSubsystem_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ find mustInstanceOfCommSubsystem_class_DefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "CommSubsystem class UndefinedPart". - */ -private pattern mustInstanceOfCommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"CommSubsystem class UndefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewCommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"CommSubsystem class UndefinedPart"); -} - -/** - * An element may be an instance of type "CommSubsystem class UndefinedPart". - */ -private pattern mayInstanceOfCommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewCommSubsystem_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewCommSubsystem_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "XCommSubsystem class DefinedPart". - */ -private pattern mustInstanceOfXCommSubsystem_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"XCommSubsystem class DefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewXCommSubsystem_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"XCommSubsystem class DefinedPart"); -} - -/** - * An element may be an instance of type "XCommSubsystem class DefinedPart". - */ -private pattern mayInstanceOfXCommSubsystem_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ find mustInstanceOfXCommSubsystem_class_DefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "XCommSubsystem class UndefinedPart". - */ -private pattern mustInstanceOfXCommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"XCommSubsystem class UndefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewXCommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"XCommSubsystem class UndefinedPart"); -} - -/** - * An element may be an instance of type "XCommSubsystem class UndefinedPart". - */ -private pattern mayInstanceOfXCommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewXCommSubsystem_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewXCommSubsystem_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfXCommSubsystem_class_UndefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "KaCommSubsystem class DefinedPart". - */ -private pattern mustInstanceOfKaCommSubsystem_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"KaCommSubsystem class DefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewKaCommSubsystem_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"KaCommSubsystem class DefinedPart"); -} - -/** - * An element may be an instance of type "KaCommSubsystem class DefinedPart". - */ -private pattern mayInstanceOfKaCommSubsystem_class_DefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ find mustInstanceOfKaCommSubsystem_class_DefinedPart(problem,interpretation,element); } -/** - * An element must be an instance of type "KaCommSubsystem class UndefinedPart". - */ -private pattern mustInstanceOfKaCommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) { - Type.name(type,"KaCommSubsystem class UndefinedPart"); - find directInstanceOf(problem,interpretation,element,type); -} -private pattern scopeDisallowsNewKaCommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation) { - find interpretation(problem,interpretation); - PartialInterpretation.scopes(interpretation,scope); - Scope.targetTypeInterpretation(scope,typeInterpretation); - Scope.maxNewElements(scope,0); - PartialComplexTypeInterpretation.interpretationOf(typeInterpretation,type); - Type.name(type,"KaCommSubsystem class UndefinedPart"); -} - -/** - * An element may be an instance of type "KaCommSubsystem class UndefinedPart". - */ -private pattern mayInstanceOfKaCommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewKaCommSubsystem_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or { - find interpretation(problem,interpretation); - PartialInterpretation.openWorldElements(interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find scopeDisallowsNewKaCommSubsystem_class_UndefinedPart(problem, interpretation); - neg find isPrimitive(element); -} or -{ find mustInstanceOfKaCommSubsystem_class_UndefinedPart(problem,interpretation,element); } - -////////// -// 1.2 Relation Declaration Indexers -////////// -/** - * Matcher for detecting tuples t where []groundStationNetwork reference ConstellationMission(source,target) - */ -private pattern mustInRelationgroundStationNetwork_reference_ConstellationMission( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"groundStationNetwork reference ConstellationMission"); - PartialRelationInterpretation.relationlinks(relationIterpretation,link); - BinaryElementRelationLink.param1(link,source); - BinaryElementRelationLink.param2(link,target); -} -/** - * Matcher for detecting tuples t where <>groundStationNetwork reference ConstellationMission(source,target) - */ -private pattern mayInRelationgroundStationNetwork_reference_ConstellationMission( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) -{ - find interpretation(problem,interpretation); - // The two endpoint of the link have to exist - find mayExist(problem, interpretation, source); - find mayExist(problem, interpretation, target); - // Type consistency - find mayInstanceOfConstellationMission_class(problem,interpretation,source); - find mayInstanceOfGroundStationNetwork_class(problem,interpretation,target); - // There are "numberOfExistingReferences" currently existing instances of the reference from the source, - // the upper bound of the multiplicity should be considered. - numberOfExistingReferences == count find mustInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,source,_); - check(numberOfExistingReferences < 1); - // The reference is containment, then a new reference cannot be create if: - // 1. Multiple parents - neg find mustContains4(problem,interpretation,_,target); - // 2. Circle in the containment hierarchy - neg find mustTransitiveContains(source,target); -} or { - find mustInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,source,target); -} -/** - * Matcher for detecting tuples t where []spacecraft reference ConstellationMission(source,target) - */ -private pattern mustInRelationspacecraft_reference_ConstellationMission( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"spacecraft reference ConstellationMission"); - PartialRelationInterpretation.relationlinks(relationIterpretation,link); - BinaryElementRelationLink.param1(link,source); - BinaryElementRelationLink.param2(link,target); -} -/** - * Matcher for detecting tuples t where <>spacecraft reference ConstellationMission(source,target) - */ -private pattern mayInRelationspacecraft_reference_ConstellationMission( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) -{ - find interpretation(problem,interpretation); - // The two endpoint of the link have to exist - find mayExist(problem, interpretation, source); - find mayExist(problem, interpretation, target); - // Type consistency - find mayInstanceOfConstellationMission_class(problem,interpretation,source); - find mayInstanceOfSpacecraft_class(problem,interpretation,target); - // There are "numberOfExistingReferences" currently existing instances of the reference from the source, - // the upper bound of the multiplicity should be considered. - numberOfExistingReferences == count find mustInRelationspacecraft_reference_ConstellationMission(problem,interpretation,source,_); - check(numberOfExistingReferences < 50); - // The reference is containment, then a new reference cannot be create if: - // 1. Multiple parents - neg find mustContains4(problem,interpretation,_,target); - // 2. Circle in the containment hierarchy - neg find mustTransitiveContains(source,target); -} or { - find mustInRelationspacecraft_reference_ConstellationMission(problem,interpretation,source,target); -} -/** - * Matcher for detecting tuples t where []commSubsystem reference CommunicatingElement(source,target) - */ -private pattern mustInRelationcommSubsystem_reference_CommunicatingElement( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"commSubsystem reference CommunicatingElement"); - PartialRelationInterpretation.relationlinks(relationIterpretation,link); - BinaryElementRelationLink.param1(link,source); - BinaryElementRelationLink.param2(link,target); -} -/** - * Matcher for detecting tuples t where <>commSubsystem reference CommunicatingElement(source,target) - */ -private pattern mayInRelationcommSubsystem_reference_CommunicatingElement( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) -{ - find interpretation(problem,interpretation); - // The two endpoint of the link have to exist - find mayExist(problem, interpretation, source); - find mayExist(problem, interpretation, target); - // Type consistency - find mayInstanceOfCommunicatingElement_class(problem,interpretation,source); - find mayInstanceOfCommSubsystem_class(problem,interpretation,target); - // There are "numberOfExistingReferences" currently existing instances of the reference from the source, - // the upper bound of the multiplicity should be considered. - numberOfExistingReferences == count find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,source,_); - check(numberOfExistingReferences < 2); - // The reference is containment, then a new reference cannot be create if: - // 1. Multiple parents - neg find mustContains4(problem,interpretation,_,target); - // 2. Circle in the containment hierarchy - neg find mustTransitiveContains(source,target); -} or { - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,source,target); -} -/** - * Matcher for detecting tuples t where []payload reference Spacecraft(source,target) - */ -private pattern mustInRelationpayload_reference_Spacecraft( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"payload reference Spacecraft"); - PartialRelationInterpretation.relationlinks(relationIterpretation,link); - BinaryElementRelationLink.param1(link,source); - BinaryElementRelationLink.param2(link,target); -} -/** - * Matcher for detecting tuples t where <>payload reference Spacecraft(source,target) - */ -private pattern mayInRelationpayload_reference_Spacecraft( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) -{ - find interpretation(problem,interpretation); - // The two endpoint of the link have to exist - find mayExist(problem, interpretation, source); - find mayExist(problem, interpretation, target); - // Type consistency - find mayInstanceOfSpacecraft_class(problem,interpretation,source); - find mayInstanceOfPayload_class(problem,interpretation,target); - // There are "numberOfExistingReferences" currently existing instances of the reference from the source, - // the upper bound of the multiplicity should be considered. - numberOfExistingReferences == count find mustInRelationpayload_reference_Spacecraft(problem,interpretation,source,_); - check(numberOfExistingReferences < 1); - // The reference is containment, then a new reference cannot be create if: - // 1. Multiple parents - neg find mustContains4(problem,interpretation,_,target); - // 2. Circle in the containment hierarchy - neg find mustTransitiveContains(source,target); -} or { - find mustInRelationpayload_reference_Spacecraft(problem,interpretation,source,target); -} -/** - * Matcher for detecting tuples t where []target reference CommSubsystem(source,target) - */ -private pattern mustInRelationtarget_reference_CommSubsystem( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference CommSubsystem"); - PartialRelationInterpretation.relationlinks(relationIterpretation,link); - BinaryElementRelationLink.param1(link,source); - BinaryElementRelationLink.param2(link,target); -} -/** - * Matcher for detecting tuples t where <>target reference CommSubsystem(source,target) - */ -private pattern mayInRelationtarget_reference_CommSubsystem( - problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target:DefinedElement) -{ - find interpretation(problem,interpretation); - // The two endpoint of the link have to exist - find mayExist(problem, interpretation, source); - find mayExist(problem, interpretation, target); - // Type consistency - find mayInstanceOfCommSubsystem_class(problem,interpretation,source); - find mayInstanceOfCommSubsystem_class(problem,interpretation,target); - // There are "numberOfExistingReferences" currently existing instances of the reference from the source, - // the upper bound of the multiplicity should be considered. - numberOfExistingReferences == count find mustInRelationtarget_reference_CommSubsystem(problem,interpretation,source,_); - check(numberOfExistingReferences < 1); -} or { - find mustInRelationtarget_reference_CommSubsystem(problem,interpretation,source,target); -} - -////////// -// 1.3 Relation Definition Indexers -////////// -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries communicationLinkDoesNotStartAtContainingElement -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - // Element is exported - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_transmittingCommSubsystem(problem,interpretation,var_Element,var_Comm1); - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_transmittingCommSubsystem(problem,interpretation,var_Element,var_Comm2); - neg find mayEquivalent(problem, interpretation, var_Comm1, var_Comm2); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find interpretation(problem,interpretation); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - // Element is exported - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_transmittingCommSubsystem(problem,interpretation,var_Element,var_Comm1); - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_transmittingCommSubsystem(problem,interpretation,var_Element,var_Comm2); - neg find mustEquivalent(problem, interpretation, var_Comm1, var_Comm2); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - // Element is exported - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_transmittingCommSubsystem(problem,interpretation,var_Element,var_Comm1); - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_transmittingCommSubsystem(problem,interpretation,var_Element,var_Comm2); - neg find mustEquivalent(problem, interpretation, var_Comm1, var_Comm2); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries transmittingCommSubsystem -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_transmittingCommSubsystem( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element, var_Comm) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_Comm); - // Element is exported - // Comm is exported - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_Comm); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_Comm); - find mustInRelationtarget_reference_CommSubsystem(problem,interpretation,var_Comm,var_virtual1); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, _var__0); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_transmittingCommSubsystem( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element, var_Comm) -{ - find interpretation(problem,interpretation); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_Comm); - // Element is exported - // Comm is exported - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mayEquivalent(problem, interpretation, var_virtual0, var_Comm); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_Comm); - find mayInRelationtarget_reference_CommSubsystem(problem,interpretation,var_Comm,var_virtual1); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mayEquivalent(problem, interpretation, var_virtual1, _var__0); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_transmittingCommSubsystem( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element, var_Comm) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_Comm); - // Element is exported - // Comm is exported - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Element,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_Comm); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_Comm); - find mustInRelationtarget_reference_CommSubsystem(problem,interpretation,var_Comm,var_virtual1); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, _var__0); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries notEnoughInterferometryPayloads -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_notEnoughInterferometryPayloads( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Mission) -{ - find interpretation(problem,interpretation); - find mustInstanceOfInterferometryMission_class(problem,interpretation,var_Mission); - // Mission is exported - find mustInstanceOfInterferometryMission_class(problem,interpretation,var_Mission); - neg find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_atLeastTwoInterferometryPayloads(problem,interpretation,var_Mission); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_notEnoughInterferometryPayloads( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Mission) -{ - find interpretation(problem,interpretation); - find mayInstanceOfInterferometryMission_class(problem,interpretation,var_Mission); - // Mission is exported - find mayInstanceOfInterferometryMission_class(problem,interpretation,var_Mission); - neg find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_atLeastTwoInterferometryPayloads(problem,interpretation,var_Mission); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_notEnoughInterferometryPayloads( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Mission) -{ - find interpretation(problem,interpretation); - find mustInstanceOfInterferometryMission_class(problem,interpretation,var_Mission); - // Mission is exported - find mustInstanceOfInterferometryMission_class(problem,interpretation,var_Mission); - neg find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_atLeastTwoInterferometryPayloads(problem,interpretation,var_Mission); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries atLeastTwoInterferometryPayloads -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_atLeastTwoInterferometryPayloads( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Mission) -{ - find interpretation(problem,interpretation); - find mustInstanceOfInterferometryMission_class(problem,interpretation,var_Mission); - // Mission is exported - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_spacecraftWithInterferometryPayload(problem,interpretation,var_Mission,var_Spacecraft1); - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_spacecraftWithInterferometryPayload(problem,interpretation,var_Mission,var_Spacecraft2); - neg find mayEquivalent(problem, interpretation, var_Spacecraft1, var_Spacecraft2); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_atLeastTwoInterferometryPayloads( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Mission) -{ - find interpretation(problem,interpretation); - find mayInstanceOfInterferometryMission_class(problem,interpretation,var_Mission); - // Mission is exported - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_spacecraftWithInterferometryPayload(problem,interpretation,var_Mission,var_Spacecraft1); - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_spacecraftWithInterferometryPayload(problem,interpretation,var_Mission,var_Spacecraft2); - neg find mustEquivalent(problem, interpretation, var_Spacecraft1, var_Spacecraft2); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_atLeastTwoInterferometryPayloads( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Mission) -{ - find interpretation(problem,interpretation); - find mustInstanceOfInterferometryMission_class(problem,interpretation,var_Mission); - // Mission is exported - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_spacecraftWithInterferometryPayload(problem,interpretation,var_Mission,var_Spacecraft1); - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_spacecraftWithInterferometryPayload(problem,interpretation,var_Mission,var_Spacecraft2); - neg find mustEquivalent(problem, interpretation, var_Spacecraft1, var_Spacecraft2); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries spacecraftWithInterferometryPayload -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_spacecraftWithInterferometryPayload( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Mission, var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Mission is exported - // Spacecraft is exported - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInRelationspacecraft_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual0); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_Spacecraft); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - find mustInRelationpayload_reference_Spacecraft(problem,interpretation,var_Spacecraft,var_virtual1); - find mustInstanceOfPayload_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_Payload); - find mustInstanceOfInterferometryPayload_class(problem,interpretation,var_Payload); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_spacecraftWithInterferometryPayload( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Mission, var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mayInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Mission is exported - // Spacecraft is exported - find mayInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mayInRelationspacecraft_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual0); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_virtual0); - find mayEquivalent(problem, interpretation, var_virtual0, var_Spacecraft); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - find mayInRelationpayload_reference_Spacecraft(problem,interpretation,var_Spacecraft,var_virtual1); - find mayInstanceOfPayload_class(problem,interpretation,var_virtual1); - find mayEquivalent(problem, interpretation, var_virtual1, var_Payload); - find mayInstanceOfInterferometryPayload_class(problem,interpretation,var_Payload); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_spacecraftWithInterferometryPayload( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Mission, var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Mission is exported - // Spacecraft is exported - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInRelationspacecraft_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual0); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_Spacecraft); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - find mustInRelationpayload_reference_Spacecraft(problem,interpretation,var_Spacecraft,var_virtual1); - find mustInstanceOfPayload_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_Payload); - find mustInstanceOfInterferometryPayload_class(problem,interpretation,var_Payload); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries noLinkToGroundStation -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noLinkToGroundStation( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Spacecraft is exported - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual0); - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_GroundStation); - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInRelationspacecraft_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual1); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_Spacecraft); - neg find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectCommunicationLink(problem,interpretation,var_Spacecraft,var_GroundStation); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noLinkToGroundStation( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Spacecraft is exported - find mayInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mayInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual0); - find mayInstanceOfGroundStationNetwork_class(problem,interpretation,var_virtual0); - find mayEquivalent(problem, interpretation, var_virtual0, var_GroundStation); - find mayInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mayInRelationspacecraft_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual1); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_virtual1); - find mayEquivalent(problem, interpretation, var_virtual1, var_Spacecraft); - neg find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectCommunicationLink(problem,interpretation,var_Spacecraft,var_GroundStation); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noLinkToGroundStation( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Spacecraft is exported - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual0); - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_GroundStation); - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInRelationspacecraft_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual1); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_Spacecraft); - neg find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectCommunicationLink(problem,interpretation,var_Spacecraft,var_GroundStation); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries noPotentialLinkToGroundStation -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noPotentialLinkToGroundStation( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Spacecraft is exported - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual0); - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_GroundStation); - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInRelationspacecraft_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual1); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_Spacecraft); - neg find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectLinkAllowed(problem,interpretation,var_Spacecraft,var_GroundStation); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noPotentialLinkToGroundStation( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Spacecraft is exported - find mayInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mayInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual0); - find mayInstanceOfGroundStationNetwork_class(problem,interpretation,var_virtual0); - find mayEquivalent(problem, interpretation, var_virtual0, var_GroundStation); - find mayInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mayInRelationspacecraft_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual1); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_virtual1); - find mayEquivalent(problem, interpretation, var_virtual1, var_Spacecraft); - neg find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectLinkAllowed(problem,interpretation,var_Spacecraft,var_GroundStation); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noPotentialLinkToGroundStation( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Spacecraft is exported - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual0); - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_GroundStation); - find mustInstanceOfConstellationMission_class(problem,interpretation,var_Mission); - find mustInRelationspacecraft_reference_ConstellationMission(problem,interpretation,var_Mission,var_virtual1); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_Spacecraft); - neg find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectLinkAllowed(problem,interpretation,var_Spacecraft,var_GroundStation); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries indirectLinkAllowed -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectLinkAllowed( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find twoParam_mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed+(var_From,var_To); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectLinkAllowed( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find twoParam_mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed+(var_From,var_To); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectLinkAllowed( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find twoParam_currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed+(var_From,var_To); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries linkAllowed -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna(problem,interpretation,var_From,var_To); - neg find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSat3U(problem,interpretation,var_From); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna(problem,interpretation,var_From,var_To); - find mustInstanceOfCubeSat3U_class(problem,interpretation,var_From); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna(problem,interpretation,var_From,var_To); - find mustInstanceOfCubeSat3U_class(problem,interpretation,var_From); - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,var_To); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna(problem,interpretation,var_From,var_To); - neg find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSat3U(problem,interpretation,var_From); -}or{ - find interpretation(problem,interpretation); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna(problem,interpretation,var_From,var_To); - find mayInstanceOfCubeSat3U_class(problem,interpretation,var_From); -}or{ - find interpretation(problem,interpretation); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna(problem,interpretation,var_From,var_To); - find mayInstanceOfCubeSat3U_class(problem,interpretation,var_From); - find mayInstanceOfGroundStationNetwork_class(problem,interpretation,var_To); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna(problem,interpretation,var_From,var_To); - neg find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSat3U(problem,interpretation,var_From); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna(problem,interpretation,var_From,var_To); - find mustInstanceOfCubeSat3U_class(problem,interpretation,var_From); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna(problem,interpretation,var_From,var_To); - find mustInstanceOfCubeSat3U_class(problem,interpretation,var_From); - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,var_To); -} -private pattern twoParam_mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed(var_From, var_To) { - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed(_,_,var_From, var_To); -} -private pattern twoParam_mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed(var_From, var_To) { - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed(_,_,var_From, var_To); -} -private pattern twoParam_currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed(var_From, var_To) { - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_linkAllowed(_,_,var_From, var_To); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries matchingAntenna -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_From); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_From,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_FromSys); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_To,var_virtual1); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_ToSys); - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingCommSubsystem(problem,interpretation,var_FromSys,var_ToSys); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_From); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_From,var_virtual0); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mayEquivalent(problem, interpretation, var_virtual0, var_FromSys); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_To,var_virtual1); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mayEquivalent(problem, interpretation, var_virtual1, var_ToSys); - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingCommSubsystem(problem,interpretation,var_FromSys,var_ToSys); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingAntenna( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_From); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_From); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_From,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_FromSys); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_To); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_To,var_virtual1); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_ToSys); - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingCommSubsystem(problem,interpretation,var_FromSys,var_ToSys); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries matchingCommSubsystem -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingCommSubsystem( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,var_To); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mustInstanceOfXCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfXCommSubsystem_class(problem,interpretation,var_To); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mustInstanceOfKaCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfKaCommSubsystem_class(problem,interpretation,var_To); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingCommSubsystem( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_From); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mayInstanceOfUHFCommSubsystem_class(problem,interpretation,var_From); - find mayInstanceOfUHFCommSubsystem_class(problem,interpretation,var_To); -}or{ - find interpretation(problem,interpretation); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_From); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mayInstanceOfXCommSubsystem_class(problem,interpretation,var_From); - find mayInstanceOfXCommSubsystem_class(problem,interpretation,var_To); -}or{ - find interpretation(problem,interpretation); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_From); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mayInstanceOfKaCommSubsystem_class(problem,interpretation,var_From); - find mayInstanceOfKaCommSubsystem_class(problem,interpretation,var_To); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingCommSubsystem( - problem:LogicProblem, interpretation:PartialInterpretation, - var_From, var_To) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,var_To); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mustInstanceOfXCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfXCommSubsystem_class(problem,interpretation,var_To); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_To); - // From is exported - // To is exported - find mustInstanceOfKaCommSubsystem_class(problem,interpretation,var_From); - find mustInstanceOfKaCommSubsystem_class(problem,interpretation,var_To); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries cubeSat3U -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSat3U( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCubeSat3U_class(problem,interpretation,var_Sat); - // Sat is exported - find mustInstanceOfCubeSat3U_class(problem,interpretation,var_Sat); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSat3U( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mayInstanceOfCubeSat3U_class(problem,interpretation,var_Sat); - // Sat is exported - find mayInstanceOfCubeSat3U_class(problem,interpretation,var_Sat); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSat3U( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCubeSat3U_class(problem,interpretation,var_Sat); - // Sat is exported - find mustInstanceOfCubeSat3U_class(problem,interpretation,var_Sat); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries cubeSat6U -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSat6U( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCubeSat6U_class(problem,interpretation,var_Sat); - // Sat is exported - find mustInstanceOfCubeSat6U_class(problem,interpretation,var_Sat); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSat6U( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mayInstanceOfCubeSat6U_class(problem,interpretation,var_Sat); - // Sat is exported - find mayInstanceOfCubeSat6U_class(problem,interpretation,var_Sat); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSat6U( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCubeSat6U_class(problem,interpretation,var_Sat); - // Sat is exported - find mustInstanceOfCubeSat6U_class(problem,interpretation,var_Sat); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries communicationLoop -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLoop( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - // Element is exported - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectCommunicationLink(problem,interpretation,var_Element,var_Element); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLoop( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find interpretation(problem,interpretation); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - // Element is exported - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectCommunicationLink(problem,interpretation,var_Element,var_Element); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLoop( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Element); - // Element is exported - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectCommunicationLink(problem,interpretation,var_Element,var_Element); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries indirectCommunicationLink -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectCommunicationLink( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Source, var_Target) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Source); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - // Source is exported - // Target is exported - find twoParam_mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink+(var_Source,var_Target); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectCommunicationLink( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Source, var_Target) -{ - find interpretation(problem,interpretation); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Source); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - // Source is exported - // Target is exported - find twoParam_mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink+(var_Source,var_Target); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_indirectCommunicationLink( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Source, var_Target) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Source); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - // Source is exported - // Target is exported - find twoParam_currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink+(var_Source,var_Target); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries directCommunicationLink -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Source, var_Target) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Source); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - // Source is exported - // Target is exported - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_SourceSubsystem); - find mustInRelationtarget_reference_CommSubsystem(problem,interpretation,var_SourceSubsystem,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_TargetSubsystem); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Source); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Source,var_virtual1); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_SourceSubsystem); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Target,var_virtual2); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); - find mustEquivalent(problem, interpretation, var_virtual2, var_TargetSubsystem); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Source, var_Target) -{ - find interpretation(problem,interpretation); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Source); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - // Source is exported - // Target is exported - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_SourceSubsystem); - find mayInRelationtarget_reference_CommSubsystem(problem,interpretation,var_SourceSubsystem,var_virtual0); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mayEquivalent(problem, interpretation, var_virtual0, var_TargetSubsystem); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Source); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Source,var_virtual1); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mayEquivalent(problem, interpretation, var_virtual1, var_SourceSubsystem); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Target,var_virtual2); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); - find mayEquivalent(problem, interpretation, var_virtual2, var_TargetSubsystem); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Source, var_Target) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Source); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - // Source is exported - // Target is exported - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_SourceSubsystem); - find mustInRelationtarget_reference_CommSubsystem(problem,interpretation,var_SourceSubsystem,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_TargetSubsystem); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Source); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Source,var_virtual1); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_SourceSubsystem); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Target,var_virtual2); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); - find mustEquivalent(problem, interpretation, var_virtual2, var_TargetSubsystem); -} -private pattern twoParam_mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink(var_Source, var_Target) { - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink(_,_,var_Source, var_Target); -} -private pattern twoParam_mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink(var_Source, var_Target) { - find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink(_,_,var_Source, var_Target); -} -private pattern twoParam_currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink(var_Source, var_Target) { - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_directCommunicationLink(_,_,var_Source, var_Target); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries incompatibleSourceAndTargetBand -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_incompatibleSourceAndTargetBand( - problem:LogicProblem, interpretation:PartialInterpretation, - var_SourceSubsystem) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_SourceSubsystem); - // SourceSubsystem is exported - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_SourceSubsystem); - find mustInRelationtarget_reference_CommSubsystem(problem,interpretation,var_SourceSubsystem,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_TargetSubsystem); - neg find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingCommSubsystem(problem,interpretation,var_SourceSubsystem,var_TargetSubsystem); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_incompatibleSourceAndTargetBand( - problem:LogicProblem, interpretation:PartialInterpretation, - var_SourceSubsystem) -{ - find interpretation(problem,interpretation); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_SourceSubsystem); - // SourceSubsystem is exported - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_SourceSubsystem); - find mayInRelationtarget_reference_CommSubsystem(problem,interpretation,var_SourceSubsystem,var_virtual0); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mayEquivalent(problem, interpretation, var_virtual0, var_TargetSubsystem); - neg find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingCommSubsystem(problem,interpretation,var_SourceSubsystem,var_TargetSubsystem); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_incompatibleSourceAndTargetBand( - problem:LogicProblem, interpretation:PartialInterpretation, - var_SourceSubsystem) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_SourceSubsystem); - // SourceSubsystem is exported - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_SourceSubsystem); - find mustInRelationtarget_reference_CommSubsystem(problem,interpretation,var_SourceSubsystem,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_TargetSubsystem); - neg find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_matchingCommSubsystem(problem,interpretation,var_SourceSubsystem,var_TargetSubsystem); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries threeUCubeSatWithNonUhfCrossLink -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_threeUCubeSatWithNonUhfCrossLink( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCubeSat3U_class(problem,interpretation,var_Sat); - // Sat is exported - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Sat); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Sat,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_SourceComm); - neg find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_commSubsystemBandUhf(problem,interpretation,var_SourceComm); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_SourceComm); - find mustInRelationtarget_reference_CommSubsystem(problem,interpretation,var_SourceComm,var_virtual1); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_TargetComm); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Target,var_virtual2); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); - find mustEquivalent(problem, interpretation, var_virtual2, var_TargetComm); - neg find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_groundStationNetwork(problem,interpretation,var_Target); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_threeUCubeSatWithNonUhfCrossLink( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mayInstanceOfCubeSat3U_class(problem,interpretation,var_Sat); - // Sat is exported - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Sat); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Sat,var_virtual0); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mayEquivalent(problem, interpretation, var_virtual0, var_SourceComm); - neg find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_commSubsystemBandUhf(problem,interpretation,var_SourceComm); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_SourceComm); - find mayInRelationtarget_reference_CommSubsystem(problem,interpretation,var_SourceComm,var_virtual1); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mayEquivalent(problem, interpretation, var_virtual1, var_TargetComm); - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Target,var_virtual2); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); - find mayEquivalent(problem, interpretation, var_virtual2, var_TargetComm); - neg find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_groundStationNetwork(problem,interpretation,var_Target); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_threeUCubeSatWithNonUhfCrossLink( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mustInstanceOfCubeSat3U_class(problem,interpretation,var_Sat); - // Sat is exported - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Sat); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Sat,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_SourceComm); - neg find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_commSubsystemBandUhf(problem,interpretation,var_SourceComm); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_SourceComm); - find mustInRelationtarget_reference_CommSubsystem(problem,interpretation,var_SourceComm,var_virtual1); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual1); - find mustEquivalent(problem, interpretation, var_virtual1, var_TargetComm); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Target); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Target,var_virtual2); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual2); - find mustEquivalent(problem, interpretation, var_virtual2, var_TargetComm); - neg find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_groundStationNetwork(problem,interpretation,var_Target); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries commSubsystemBandUhf -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_commSubsystemBandUhf( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Comm) -{ - find interpretation(problem,interpretation); - find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,var_Comm); - // Comm is exported - find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,var_Comm); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_commSubsystemBandUhf( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Comm) -{ - find interpretation(problem,interpretation); - find mayInstanceOfUHFCommSubsystem_class(problem,interpretation,var_Comm); - // Comm is exported - find mayInstanceOfUHFCommSubsystem_class(problem,interpretation,var_Comm); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_commSubsystemBandUhf( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Comm) -{ - find interpretation(problem,interpretation); - find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,var_Comm); - // Comm is exported - find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,var_Comm); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries groundStationNetwork -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_groundStationNetwork( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Network) -{ - find interpretation(problem,interpretation); - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,var_Network); - // Network is exported - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,var_Network); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_groundStationNetwork( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Network) -{ - find interpretation(problem,interpretation); - find mayInstanceOfGroundStationNetwork_class(problem,interpretation,var_Network); - // Network is exported - find mayInstanceOfGroundStationNetwork_class(problem,interpretation,var_Network); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_groundStationNetwork( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Network) -{ - find interpretation(problem,interpretation); - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,var_Network); - // Network is exported - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,var_Network); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries cubeSatWithKaAntenna -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSatWithKaAntenna( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Spacecraft is exported - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Spacecraft); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Spacecraft,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_Comm); - find mustInstanceOfKaCommSubsystem_class(problem,interpretation,var_Comm); - neg find mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_smallSat(problem,interpretation,var_Spacecraft); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSatWithKaAntenna( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mayInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Spacecraft is exported - find mayInstanceOfCommunicatingElement_class(problem,interpretation,var_Spacecraft); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Spacecraft,var_virtual0); - find mayInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mayEquivalent(problem, interpretation, var_virtual0, var_Comm); - find mayInstanceOfKaCommSubsystem_class(problem,interpretation,var_Comm); - neg find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_smallSat(problem,interpretation,var_Spacecraft); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSatWithKaAntenna( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,var_Spacecraft); - // Spacecraft is exported - find mustInstanceOfCommunicatingElement_class(problem,interpretation,var_Spacecraft); - find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,var_Spacecraft,var_virtual0); - find mustInstanceOfCommSubsystem_class(problem,interpretation,var_virtual0); - find mustEquivalent(problem, interpretation, var_virtual0, var_Comm); - find mustInstanceOfKaCommSubsystem_class(problem,interpretation,var_Comm); - neg find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_smallSat(problem,interpretation,var_Spacecraft); -} -// Must, May and Current queries for pattern hu bme mit inf dslreasoner domains satellite queries smallSat -private pattern mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_smallSat( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSmallSat_class(problem,interpretation,var_Sat); - // Sat is exported - find mustInstanceOfSmallSat_class(problem,interpretation,var_Sat); -} -private pattern mayInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_smallSat( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mayInstanceOfSmallSat_class(problem,interpretation,var_Sat); - // Sat is exported - find mayInstanceOfSmallSat_class(problem,interpretation,var_Sat); -} -private pattern currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_smallSat( - problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find interpretation(problem,interpretation); - find mustInstanceOfSmallSat_class(problem,interpretation,var_Sat); - // Sat is exported - find mustInstanceOfSmallSat_class(problem,interpretation,var_Sat); -} - -////////// -// 1.4 Containment Indexer -////////// -private pattern mustContains2(source: DefinedElement, target: DefinedElement) { - find mustContains4(_,_,source,target); -} - -private pattern mustContains4(problem:LogicProblem, interpretation:PartialInterpretation, - source: DefinedElement, target: DefinedElement) - { find mustInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,source,target); }or - - { find mustInRelationspacecraft_reference_ConstellationMission(problem,interpretation,source,target); }or - - { find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,source,target); }or - - { find mustInRelationpayload_reference_Spacecraft(problem,interpretation,source,target); } - -private pattern mustTransitiveContains(source,target) { - find mustContains2+(source,target); -} - -////////// -// 2. Invalidation Indexers -////////// -// 2.1 Invalidated by WF Queries -////////// -pattern invalidatedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement(problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement(problem,interpretation,var_Element); -} -pattern invalidatedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_notEnoughInterferometryPayloads(problem:LogicProblem, interpretation:PartialInterpretation, - var_Mission) -{ - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_notEnoughInterferometryPayloads(problem,interpretation,var_Mission); -} -pattern invalidatedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noLinkToGroundStation(problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noLinkToGroundStation(problem,interpretation,var_Spacecraft); -} -pattern invalidatedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noPotentialLinkToGroundStation(problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noPotentialLinkToGroundStation(problem,interpretation,var_Spacecraft); -} -pattern invalidatedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLoop(problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLoop(problem,interpretation,var_Element); -} -pattern invalidatedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_incompatibleSourceAndTargetBand(problem:LogicProblem, interpretation:PartialInterpretation, - var_SourceSubsystem) -{ - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_incompatibleSourceAndTargetBand(problem,interpretation,var_SourceSubsystem); -} -pattern invalidatedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_threeUCubeSatWithNonUhfCrossLink(problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_threeUCubeSatWithNonUhfCrossLink(problem,interpretation,var_Sat); -} -pattern invalidatedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSatWithKaAntenna(problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find mustInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSatWithKaAntenna(problem,interpretation,var_Spacecraft); -} - -////////// -// 3. Unfinishedness Indexers -////////// -// 3.1 Unfinishedness Measured by Multiplicity -////////// -pattern unfinishedLowerMultiplicity_groundStationNetwork_reference_ConstellationMission(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { - find interpretation(problem,interpretation); - PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"groundStationNetwork reference ConstellationMission"); - find mustInstanceOfConstellationMission_class(problem,interpretation,object); - numberOfExistingReferences == count find mustInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,object,_); - check(numberOfExistingReferences < 1); - missingMultiplicity == eval(1-numberOfExistingReferences); -} -pattern unfinishedLowerMultiplicity_spacecraft_reference_ConstellationMission(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { - find interpretation(problem,interpretation); - PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"spacecraft reference ConstellationMission"); - find mustInstanceOfConstellationMission_class(problem,interpretation,object); - numberOfExistingReferences == count find mustInRelationspacecraft_reference_ConstellationMission(problem,interpretation,object,_); - check(numberOfExistingReferences < 2); - missingMultiplicity == eval(2-numberOfExistingReferences); -} -pattern unfinishedLowerMultiplicity_commSubsystem_reference_CommunicatingElement(problem:LogicProblem, interpretation:PartialInterpretation, relationIterpretation:PartialRelationInterpretation, object:DefinedElement,missingMultiplicity) { - find interpretation(problem,interpretation); - PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"commSubsystem reference CommunicatingElement"); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,object); - numberOfExistingReferences == count find mustInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,object,_); - check(numberOfExistingReferences < 1); - missingMultiplicity == eval(1-numberOfExistingReferences); -} - -////////// -// 3.2 Unfinishedness Measured by WF Queries -////////// -pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement(problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLinkDoesNotStartAtContainingElement(problem,interpretation,var_Element); -} -pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_notEnoughInterferometryPayloads(problem:LogicProblem, interpretation:PartialInterpretation, - var_Mission) -{ - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_notEnoughInterferometryPayloads(problem,interpretation,var_Mission); -} -pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noLinkToGroundStation(problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noLinkToGroundStation(problem,interpretation,var_Spacecraft); -} -pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noPotentialLinkToGroundStation(problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noPotentialLinkToGroundStation(problem,interpretation,var_Spacecraft); -} -pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLoop(problem:LogicProblem, interpretation:PartialInterpretation, - var_Element) -{ - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_communicationLoop(problem,interpretation,var_Element); -} -pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_incompatibleSourceAndTargetBand(problem:LogicProblem, interpretation:PartialInterpretation, - var_SourceSubsystem) -{ - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_incompatibleSourceAndTargetBand(problem,interpretation,var_SourceSubsystem); -} -pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_threeUCubeSatWithNonUhfCrossLink(problem:LogicProblem, interpretation:PartialInterpretation, - var_Sat) -{ - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_threeUCubeSatWithNonUhfCrossLink(problem,interpretation,var_Sat); -} -pattern unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSatWithKaAntenna(problem:LogicProblem, interpretation:PartialInterpretation, - var_Spacecraft) -{ - find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_cubeSatWithKaAntenna(problem,interpretation,var_Spacecraft); -} - -////////// -// 4. Refinement Indexers -////////// -// 4.1 Object constructors -////////// -private pattern hasElementInContainment(problem:LogicProblem, interpretation:PartialInterpretation) -{ - find interpretation(problem,interpretation); - find mustInstanceOfInterferometryMission_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfPayload_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfKaCommSubsystem_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfSpacecraft_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfInterferometryPayload_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCubeSat6U_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfXCommSubsystem_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfGroundStationNetwork_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfConstellationMission_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCubeSat3U_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCubeSat_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfSmallSat_class(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfConstellationMission_class_DefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfConstellationMission_class_UndefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfInterferometryMission_class_DefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfInterferometryMission_class_UndefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class_DefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCommunicatingElement_class_UndefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfGroundStationNetwork_class_DefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class_DefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfCommSubsystem_class_UndefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfXCommSubsystem_class_DefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfXCommSubsystem_class_UndefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfKaCommSubsystem_class_DefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -}or{ - find interpretation(problem,interpretation); - find mustInstanceOfKaCommSubsystem_class_UndefinedPart(problem,interpretation,root); - find mustExist(problem, interpretation, root); -} -pattern createObject_KaCommSubsystem_class_UndefinedPart_by_commSubsystem_reference_CommunicatingElement( - problem:LogicProblem, interpretation:PartialInterpretation, - relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, - container:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"KaCommSubsystem class UndefinedPart"); - PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"commSubsystem reference CommunicatingElement"); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,container); - find mayInstanceOfKaCommSubsystem_class_UndefinedPart(problem,interpretation,newObject); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,container,newObject); - find mustExist(problem, interpretation, container); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_KaCommSubsystem_class_UndefinedPart( - problem:LogicProblem, interpretation:PartialInterpretation, - typeInterpretation:PartialComplexTypeInterpretation) -{ - find interpretation(problem,interpretation); - neg find hasElementInContainment(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"KaCommSubsystem class UndefinedPart"); - find mayInstanceOfKaCommSubsystem_class_UndefinedPart(problem,interpretation,newObject); - find mayExist(problem, interpretation, newObject); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_GroundStationNetwork_class_UndefinedPart_by_groundStationNetwork_reference_ConstellationMission( - problem:LogicProblem, interpretation:PartialInterpretation, - relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, - container:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"GroundStationNetwork class UndefinedPart"); - PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"groundStationNetwork reference ConstellationMission"); - find mustInstanceOfConstellationMission_class(problem,interpretation,container); - find mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,newObject); - find mayInRelationgroundStationNetwork_reference_ConstellationMission(problem,interpretation,container,newObject); - find mustExist(problem, interpretation, container); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_GroundStationNetwork_class_UndefinedPart( - problem:LogicProblem, interpretation:PartialInterpretation, - typeInterpretation:PartialComplexTypeInterpretation) -{ - find interpretation(problem,interpretation); - neg find hasElementInContainment(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"GroundStationNetwork class UndefinedPart"); - find mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,newObject); - find mayExist(problem, interpretation, newObject); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_SmallSat_class_by_spacecraft_reference_ConstellationMission( - problem:LogicProblem, interpretation:PartialInterpretation, - relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, - container:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"SmallSat class"); - PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"spacecraft reference ConstellationMission"); - find mustInstanceOfConstellationMission_class(problem,interpretation,container); - find mayInstanceOfSmallSat_class(problem,interpretation,newObject); - find mayInRelationspacecraft_reference_ConstellationMission(problem,interpretation,container,newObject); - find mustExist(problem, interpretation, container); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_SmallSat_class( - problem:LogicProblem, interpretation:PartialInterpretation, - typeInterpretation:PartialComplexTypeInterpretation) -{ - find interpretation(problem,interpretation); - neg find hasElementInContainment(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"SmallSat class"); - find mayInstanceOfSmallSat_class(problem,interpretation,newObject); - find mayExist(problem, interpretation, newObject); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_XCommSubsystem_class_UndefinedPart_by_commSubsystem_reference_CommunicatingElement( - problem:LogicProblem, interpretation:PartialInterpretation, - relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, - container:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"XCommSubsystem class UndefinedPart"); - PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"commSubsystem reference CommunicatingElement"); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,container); - find mayInstanceOfXCommSubsystem_class_UndefinedPart(problem,interpretation,newObject); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,container,newObject); - find mustExist(problem, interpretation, container); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_XCommSubsystem_class_UndefinedPart( - problem:LogicProblem, interpretation:PartialInterpretation, - typeInterpretation:PartialComplexTypeInterpretation) -{ - find interpretation(problem,interpretation); - neg find hasElementInContainment(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"XCommSubsystem class UndefinedPart"); - find mayInstanceOfXCommSubsystem_class_UndefinedPart(problem,interpretation,newObject); - find mayExist(problem, interpretation, newObject); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_UHFCommSubsystem_class_by_commSubsystem_reference_CommunicatingElement( - problem:LogicProblem, interpretation:PartialInterpretation, - relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, - container:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"UHFCommSubsystem class"); - PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"commSubsystem reference CommunicatingElement"); - find mustInstanceOfCommunicatingElement_class(problem,interpretation,container); - find mayInstanceOfUHFCommSubsystem_class(problem,interpretation,newObject); - find mayInRelationcommSubsystem_reference_CommunicatingElement(problem,interpretation,container,newObject); - find mustExist(problem, interpretation, container); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_UHFCommSubsystem_class( - problem:LogicProblem, interpretation:PartialInterpretation, - typeInterpretation:PartialComplexTypeInterpretation) -{ - find interpretation(problem,interpretation); - neg find hasElementInContainment(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"UHFCommSubsystem class"); - find mayInstanceOfUHFCommSubsystem_class(problem,interpretation,newObject); - find mayExist(problem, interpretation, newObject); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_CubeSat6U_class_by_spacecraft_reference_ConstellationMission( - problem:LogicProblem, interpretation:PartialInterpretation, - relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, - container:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"CubeSat6U class"); - PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"spacecraft reference ConstellationMission"); - find mustInstanceOfConstellationMission_class(problem,interpretation,container); - find mayInstanceOfCubeSat6U_class(problem,interpretation,newObject); - find mayInRelationspacecraft_reference_ConstellationMission(problem,interpretation,container,newObject); - find mustExist(problem, interpretation, container); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_CubeSat6U_class( - problem:LogicProblem, interpretation:PartialInterpretation, - typeInterpretation:PartialComplexTypeInterpretation) -{ - find interpretation(problem,interpretation); - neg find hasElementInContainment(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"CubeSat6U class"); - find mayInstanceOfCubeSat6U_class(problem,interpretation,newObject); - find mayExist(problem, interpretation, newObject); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_CubeSat3U_class_by_spacecraft_reference_ConstellationMission( - problem:LogicProblem, interpretation:PartialInterpretation, - relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, - container:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"CubeSat3U class"); - PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"spacecraft reference ConstellationMission"); - find mustInstanceOfConstellationMission_class(problem,interpretation,container); - find mayInstanceOfCubeSat3U_class(problem,interpretation,newObject); - find mayInRelationspacecraft_reference_ConstellationMission(problem,interpretation,container,newObject); - find mustExist(problem, interpretation, container); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_CubeSat3U_class( - problem:LogicProblem, interpretation:PartialInterpretation, - typeInterpretation:PartialComplexTypeInterpretation) -{ - find interpretation(problem,interpretation); - neg find hasElementInContainment(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"CubeSat3U class"); - find mayInstanceOfCubeSat3U_class(problem,interpretation,newObject); - find mayExist(problem, interpretation, newObject); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_InterferometryMission_class_UndefinedPart( - problem:LogicProblem, interpretation:PartialInterpretation, - typeInterpretation:PartialComplexTypeInterpretation) -{ - find interpretation(problem,interpretation); - neg find hasElementInContainment(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InterferometryMission class UndefinedPart"); - find mayInstanceOfInterferometryMission_class_UndefinedPart(problem,interpretation,newObject); - find mayExist(problem, interpretation, newObject); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_InterferometryPayload_class_by_payload_reference_Spacecraft( - problem:LogicProblem, interpretation:PartialInterpretation, - relationInterpretation:PartialRelationInterpretation, typeInterpretation:PartialComplexTypeInterpretation, - container:DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InterferometryPayload class"); - PartialInterpretation.partialrelationinterpretation(interpretation,relationInterpretation); - PartialRelationInterpretation.interpretationOf.name(relationInterpretation,"payload reference Spacecraft"); - find mustInstanceOfSpacecraft_class(problem,interpretation,container); - find mayInstanceOfInterferometryPayload_class(problem,interpretation,newObject); - find mayInRelationpayload_reference_Spacecraft(problem,interpretation,container,newObject); - find mustExist(problem, interpretation, container); - neg find mustExist(problem, interpretation, newObject); -} -pattern createObject_InterferometryPayload_class( - problem:LogicProblem, interpretation:PartialInterpretation, - typeInterpretation:PartialComplexTypeInterpretation) -{ - find interpretation(problem,interpretation); - neg find hasElementInContainment(problem,interpretation); - PartialInterpretation.partialtypeinterpratation(interpretation,typeInterpretation); - PartialComplexTypeInterpretation.interpretationOf.name(typeInterpretation,"InterferometryPayload class"); - find mayInstanceOfInterferometryPayload_class(problem,interpretation,newObject); - find mayExist(problem, interpretation, newObject); - neg find mustExist(problem, interpretation, newObject); -} - -////////// -// 4.2 Type refinement -////////// -pattern refineTypeTo_KaCommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfKaCommSubsystem_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); -} -pattern refineTypeTo_GroundStationNetwork_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfSpacecraft_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); -} -pattern refineTypeTo_SmallSat_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); -} -pattern refineTypeTo_XCommSubsystem_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfXCommSubsystem_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); -} -pattern refineTypeTo_UHFCommSubsystem_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfUHFCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfUHFCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfKaCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfXCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); -} -pattern refineTypeTo_CubeSat6U_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); -} -pattern refineTypeTo_CubeSat3U_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfCubeSat3U_class(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfSmallSat_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat6U_class(problem,interpretation,element); - neg find mustInstanceOfGroundStationNetwork_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCubeSat3U_class(problem,interpretation,element); -} -pattern refineTypeTo_InterferometryMission_class_UndefinedPart(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfInterferometryMission_class_UndefinedPart(problem,interpretation,element); - neg find mustInstanceOfPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find mustInstanceOfInterferometryMission_class_UndefinedPart(problem,interpretation,element); -} -pattern refineTypeTo_InterferometryPayload_class(problem:LogicProblem, interpretation:PartialInterpretation, element: DefinedElement) { - find interpretation(problem,interpretation); - PartialInterpretation.newElements(interpretation,element); - find mayInstanceOfInterferometryPayload_class(problem,interpretation,element); - neg find mustInstanceOfCommSubsystem_class(problem,interpretation,element); - neg find mustInstanceOfConstellationMission_class(problem,interpretation,element); - neg find mustInstanceOfCommunicatingElement_class(problem,interpretation,element); - neg find mustInstanceOfInterferometryPayload_class(problem,interpretation,element); -} - -////////// -// 4.3 Relation refinement -////////// -pattern refineRelation_target_reference_CommSubsystem( - problem:LogicProblem, interpretation:PartialInterpretation, - relationIterpretation:PartialRelationInterpretation, - from: DefinedElement, to: DefinedElement) -{ - find interpretation(problem,interpretation); - PartialInterpretation.partialrelationinterpretation(interpretation,relationIterpretation); - PartialRelationInterpretation.interpretationOf.name(relationIterpretation,"target reference CommSubsystem"); - find mustExist(problem, interpretation, from); - find mustExist(problem, interpretation, to); - find mustInstanceOfCommSubsystem_class(problem,interpretation,from); - find mustInstanceOfCommSubsystem_class(problem,interpretation,to); - find mayInRelationtarget_reference_CommSubsystem(problem,interpretation,from,to); - neg find mustInRelationtarget_reference_CommSubsystem(problem,interpretation,from,to); -} - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/init.partialmodel b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/init.partialmodel deleted file mode 100644 index 9f14379f..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/debug/init.partialmodel +++ /dev/null @@ -1,147 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/log.txt b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/log.txt index 67589bd9..1d3c9f62 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/log.txt +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/log.txt @@ -1 +1 @@ -Model generation finished +Model generation started diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.gml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.gml deleted file mode 100644 index 01e93808..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.gml +++ /dev/null @@ -1,2453 +0,0 @@ -graph -[ - node - [ - id 0 - graphics - [ - w 315.70000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 1" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - ConstellationMission class DefinedPart - InterferometryMission class DefinedPart - ConstellationMission class - InterferometryMission class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 1 - graphics - [ - w 308.0 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 2" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class DefinedPart - GroundStationNetwork class DefinedPart - CommunicatingElement class - GroundStationNetwork class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 2 - graphics - [ - w 261.8 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 3" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - XCommSubsystem class DefinedPart - CommSubsystem class - XCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 3 - graphics - [ - w 269.5 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 4" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - KaCommSubsystem class DefinedPart - CommSubsystem class - KaCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 4 - graphics - [ - w 41.800000000000004 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "true" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 5 - graphics - [ - w 50.6 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "false" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 6 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 7 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 8 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 9 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 10 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 11 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 12 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 13 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 14 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 15 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 16 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 17 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 18 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 19 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 20 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 21 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 22 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 23 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 24 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 25 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 26 - graphics - [ - w 323.40000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 27 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 28 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 29 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 30 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 31 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 32 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 33 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 34 - graphics - [ - w 323.40000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 35 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 36 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 37 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 38 - graphics - [ - w 112.2 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Integers" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 39 - graphics - [ - w 85.80000000000001 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Reals" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 40 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Strings" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 41 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Objects" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - edge - [ - source 0 - target 1 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "groundStationNetwork reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 6 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 10 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 14 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 18 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 22 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 26 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 30 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 34 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 2 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 3 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 7 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 8 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 11 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 12 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 15 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 16 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 19 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 20 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 23 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 24 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 27 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 29 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 32 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 33 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 35 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 36 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 9 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 13 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 17 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 21 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 25 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 28 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 31 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 37 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 7 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 11 - target 8 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 15 - target 12 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 19 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 23 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 29 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 32 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 35 - target 15 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] -] - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.png b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.png deleted file mode 100644 index 01a1bfc5..00000000 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.png and /dev/null differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.xmi deleted file mode 100644 index 768c1d80..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/1.xmi +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.gml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.gml deleted file mode 100644 index bac655eb..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.gml +++ /dev/null @@ -1,2453 +0,0 @@ -graph -[ - node - [ - id 0 - graphics - [ - w 315.70000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 1" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - ConstellationMission class DefinedPart - InterferometryMission class DefinedPart - ConstellationMission class - InterferometryMission class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 1 - graphics - [ - w 308.0 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 2" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class DefinedPart - GroundStationNetwork class DefinedPart - CommunicatingElement class - GroundStationNetwork class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 2 - graphics - [ - w 261.8 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 3" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - XCommSubsystem class DefinedPart - CommSubsystem class - XCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 3 - graphics - [ - w 269.5 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 4" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - KaCommSubsystem class DefinedPart - CommSubsystem class - KaCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 4 - graphics - [ - w 41.800000000000004 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "true" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 5 - graphics - [ - w 50.6 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "false" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 6 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 7 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 8 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 9 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 10 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 11 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 12 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 13 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 14 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 15 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 16 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 17 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 18 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 19 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 20 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 21 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 22 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 23 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 24 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 25 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 26 - graphics - [ - w 323.40000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 27 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 28 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 29 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 30 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 31 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 32 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 33 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 34 - graphics - [ - w 323.40000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 35 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 36 - graphics - [ - w 284.90000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - KaCommSubsystem class - CommSubsystem class UndefinedPart - KaCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 37 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 38 - graphics - [ - w 112.2 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Integers" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 39 - graphics - [ - w 85.80000000000001 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Reals" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 40 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Strings" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 41 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Objects" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - edge - [ - source 0 - target 1 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "groundStationNetwork reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 6 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 10 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 14 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 18 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 22 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 26 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 30 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 34 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 2 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 3 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 7 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 8 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 11 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 12 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 15 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 16 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 19 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 20 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 23 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 24 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 27 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 29 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 32 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 33 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 35 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 36 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 9 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 13 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 17 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 21 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 25 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 28 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 31 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 37 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 7 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 11 - target 8 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 15 - target 12 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 20 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 23 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 29 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 32 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 35 - target 15 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] -] - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.png b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.png deleted file mode 100644 index e00c6b69..00000000 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.png and /dev/null differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.xmi deleted file mode 100644 index d67908e4..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/2.xmi +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.gml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.gml deleted file mode 100644 index 0e6ee88f..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.gml +++ /dev/null @@ -1,2452 +0,0 @@ -graph -[ - node - [ - id 0 - graphics - [ - w 315.70000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 1" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - ConstellationMission class DefinedPart - InterferometryMission class DefinedPart - ConstellationMission class - InterferometryMission class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 1 - graphics - [ - w 308.0 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 2" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class DefinedPart - GroundStationNetwork class DefinedPart - CommunicatingElement class - GroundStationNetwork class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 2 - graphics - [ - w 261.8 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 3" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - XCommSubsystem class DefinedPart - CommSubsystem class - XCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 3 - graphics - [ - w 269.5 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 4" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - KaCommSubsystem class DefinedPart - CommSubsystem class - KaCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 4 - graphics - [ - w 41.800000000000004 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "true" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 5 - graphics - [ - w 50.6 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "false" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 6 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 7 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 8 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 9 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 10 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 11 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 12 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 13 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 14 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 15 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 16 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 17 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 18 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 19 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 20 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 21 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 22 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 23 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 24 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 25 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 26 - graphics - [ - w 323.40000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 27 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 28 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 29 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 30 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 31 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 32 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 33 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 34 - graphics - [ - w 323.40000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 35 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 36 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 37 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 38 - graphics - [ - w 112.2 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Integers" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 39 - graphics - [ - w 85.80000000000001 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Reals" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 40 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Strings" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 41 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Objects" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - edge - [ - source 0 - target 1 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "groundStationNetwork reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 6 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 10 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 14 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 18 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 22 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 26 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 30 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 34 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 2 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 3 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 7 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 8 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 11 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 12 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 15 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 16 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 19 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 20 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 23 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 24 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 27 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 29 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 32 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 33 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 35 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 37 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 9 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 13 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 17 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 21 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 25 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 28 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 31 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 36 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 7 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 11 - target 8 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 15 - target 12 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 20 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 23 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 29 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 32 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 35 - target 15 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] -] - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.png b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.png deleted file mode 100644 index be6b7b8c..00000000 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.png and /dev/null differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.xmi deleted file mode 100644 index 72ac5fe8..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/3.xmi +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.gml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.gml deleted file mode 100644 index ffc846cb..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.gml +++ /dev/null @@ -1,2452 +0,0 @@ -graph -[ - node - [ - id 0 - graphics - [ - w 315.70000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 1" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - ConstellationMission class DefinedPart - InterferometryMission class DefinedPart - ConstellationMission class - InterferometryMission class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 1 - graphics - [ - w 308.0 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 2" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class DefinedPart - GroundStationNetwork class DefinedPart - CommunicatingElement class - GroundStationNetwork class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 2 - graphics - [ - w 261.8 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 3" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - XCommSubsystem class DefinedPart - CommSubsystem class - XCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 3 - graphics - [ - w 269.5 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 4" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - KaCommSubsystem class DefinedPart - CommSubsystem class - KaCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 4 - graphics - [ - w 41.800000000000004 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "true" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 5 - graphics - [ - w 50.6 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "false" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 6 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 7 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 8 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 9 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 10 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 11 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 12 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 13 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 14 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 15 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 16 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 17 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 18 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 19 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 20 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 21 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 22 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 23 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 24 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 25 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 26 - graphics - [ - w 323.40000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 27 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 28 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 29 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 30 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 31 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 32 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 33 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 34 - graphics - [ - w 323.40000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 35 - graphics - [ - w 284.90000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - KaCommSubsystem class - CommSubsystem class UndefinedPart - KaCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 36 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 37 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 38 - graphics - [ - w 112.2 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Integers" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 39 - graphics - [ - w 85.80000000000001 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Reals" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 40 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Strings" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 41 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Objects" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - edge - [ - source 0 - target 1 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "groundStationNetwork reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 6 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 10 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 14 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 18 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 22 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 26 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 30 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 34 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 2 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 3 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 7 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 8 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 11 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 12 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 15 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 16 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 19 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 20 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 23 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 24 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 27 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 29 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 32 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 33 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 35 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 36 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 9 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 13 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 17 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 21 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 25 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 28 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 31 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 37 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 7 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 11 - target 8 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 15 - target 12 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 19 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 23 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 29 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 32 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 36 - target 11 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] -] - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.png b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.png deleted file mode 100644 index 36561a94..00000000 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.png and /dev/null differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.xmi deleted file mode 100644 index b3b122fa..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/4.xmi +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.gml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.gml deleted file mode 100644 index ad569d2a..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.gml +++ /dev/null @@ -1,2452 +0,0 @@ -graph -[ - node - [ - id 0 - graphics - [ - w 315.70000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 1" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - ConstellationMission class DefinedPart - InterferometryMission class DefinedPart - ConstellationMission class - InterferometryMission class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 1 - graphics - [ - w 308.0 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 2" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class DefinedPart - GroundStationNetwork class DefinedPart - CommunicatingElement class - GroundStationNetwork class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 2 - graphics - [ - w 261.8 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 3" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - XCommSubsystem class DefinedPart - CommSubsystem class - XCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 3 - graphics - [ - w 269.5 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 4" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - KaCommSubsystem class DefinedPart - CommSubsystem class - KaCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 4 - graphics - [ - w 41.800000000000004 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "true" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 5 - graphics - [ - w 50.6 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "false" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 6 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 7 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 8 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 9 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 10 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 11 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 12 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 13 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 14 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 15 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 16 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 17 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 18 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 19 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 20 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 21 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 22 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 23 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 24 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 25 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 26 - graphics - [ - w 323.40000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 27 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 28 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 29 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 30 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 31 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 32 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 33 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 34 - graphics - [ - w 323.40000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 35 - graphics - [ - w 284.90000000000003 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - KaCommSubsystem class - CommSubsystem class UndefinedPart - KaCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 36 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 37 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 38 - graphics - [ - w 112.2 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Integers" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 39 - graphics - [ - w 85.80000000000001 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Reals" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 40 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Strings" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 41 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Objects" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - edge - [ - source 0 - target 1 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "groundStationNetwork reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 6 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 10 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 14 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 18 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 22 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 26 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 30 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 34 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 2 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 3 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 7 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 8 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 11 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 12 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 15 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 16 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 19 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 20 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 23 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 24 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 27 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 29 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 32 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 33 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 35 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 36 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 9 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 13 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 17 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 21 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 25 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 28 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 31 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 37 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 7 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 11 - target 8 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 15 - target 12 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 19 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 23 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 29 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 32 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 36 - target 16 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] -] - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.png b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.png deleted file mode 100644 index 70dfad68..00000000 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.png and /dev/null differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.xmi deleted file mode 100644 index 9b2a9ea1..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/5.xmi +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.gml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.gml index de337fc2..68fc38e5 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.gml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.gml @@ -270,8 +270,8 @@ graph id 7 graphics [ - w 269.5 - h 68 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -291,9 +291,8 @@ graph LabelGraphics [ text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -308,8 +307,8 @@ graph id 8 graphics [ - w 223.3 - h 54 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -329,8 +328,9 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + UHFCommSubsystem class + CommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -407,7 +407,7 @@ graph text " CommunicatingElement class Spacecraft class - CubeSat6U class + CubeSat3U class CubeSat class CommunicatingElement class UndefinedPart " @@ -577,8 +577,8 @@ graph id 15 graphics [ - w 277.20000000000005 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -599,9 +599,8 @@ graph [ text " CommSubsystem class - XCommSubsystem class + UHFCommSubsystem class CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -616,8 +615,8 @@ graph id 16 graphics [ - w 223.3 - h 54 + w 284.90000000000003 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -637,8 +636,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + KaCommSubsystem class + CommSubsystem class UndefinedPart + KaCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -653,8 +654,8 @@ graph id 17 graphics [ - w 277.20000000000005 - h 82 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -674,10 +675,8 @@ graph LabelGraphics [ text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -715,7 +714,7 @@ graph text " CommunicatingElement class Spacecraft class - CubeSat3U class + CubeSat6U class CubeSat class CommunicatingElement class UndefinedPart " @@ -732,8 +731,8 @@ graph id 19 graphics [ - w 269.5 - h 68 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -754,8 +753,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -770,8 +770,8 @@ graph id 20 graphics [ - w 269.5 - h 68 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -792,8 +792,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -846,7 +847,7 @@ graph graphics [ w 323.40000000000003 - h 82 + h 96 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -868,7 +869,8 @@ graph text " CommunicatingElement class Spacecraft class - SmallSat class + CubeSat3U class + CubeSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -884,8 +886,8 @@ graph id 23 graphics [ - w 277.20000000000005 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -906,9 +908,8 @@ graph [ text " CommSubsystem class - XCommSubsystem class + UHFCommSubsystem class CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1000,7 +1001,7 @@ graph graphics [ w 323.40000000000003 - h 82 + h 96 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1022,7 +1023,8 @@ graph text " CommunicatingElement class Spacecraft class - SmallSat class + CubeSat3U class + CubeSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -1038,8 +1040,8 @@ graph id 27 graphics [ - w 277.20000000000005 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1060,9 +1062,8 @@ graph [ text " CommSubsystem class - XCommSubsystem class + UHFCommSubsystem class CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1077,8 +1078,8 @@ graph id 28 graphics [ - w 223.3 - h 54 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1098,8 +1099,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + XCommSubsystem class + CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1114,8 +1117,8 @@ graph id 29 graphics [ - w 284.90000000000003 - h 82 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1135,10 +1138,8 @@ graph LabelGraphics [ text " - CommSubsystem class - KaCommSubsystem class - CommSubsystem class UndefinedPart - KaCommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -1193,8 +1194,8 @@ graph id 31 graphics [ - w 269.5 - h 68 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1214,9 +1215,8 @@ graph LabelGraphics [ text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -1231,8 +1231,8 @@ graph id 32 graphics [ - w 223.3 - h 54 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1252,8 +1252,9 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + UHFCommSubsystem class + CommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1268,8 +1269,8 @@ graph id 33 graphics [ - w 269.5 - h 68 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1290,8 +1291,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1345,7 +1347,7 @@ graph id 35 graphics [ - w 277.20000000000005 + w 284.90000000000003 h 82 type "rectangle" fill "#FFFFFF" @@ -1367,9 +1369,9 @@ graph [ text " CommSubsystem class - XCommSubsystem class + KaCommSubsystem class CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart + KaCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1421,7 +1423,7 @@ graph id 37 graphics [ - w 284.90000000000003 + w 277.20000000000005 h 82 type "rectangle" fill "#FFFFFF" @@ -1443,9 +1445,9 @@ graph [ text " CommSubsystem class - KaCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart - KaCommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1817,7 +1819,7 @@ graph edge [ source 6 - target 7 + target 8 graphics [ fill "#000000" @@ -1917,7 +1919,7 @@ graph edge [ source 14 - target 17 + target 16 graphics [ fill "#000000" @@ -2037,7 +2039,7 @@ graph edge [ source 26 - target 29 + target 28 graphics [ fill "#000000" @@ -2057,7 +2059,7 @@ graph edge [ source 30 - target 31 + target 32 graphics [ fill "#000000" @@ -2137,7 +2139,7 @@ graph edge [ source 6 - target 8 + target 7 graphics [ fill "#000000" @@ -2177,7 +2179,7 @@ graph edge [ source 14 - target 16 + target 17 graphics [ fill "#000000" @@ -2237,7 +2239,7 @@ graph edge [ source 26 - target 28 + target 29 graphics [ fill "#000000" @@ -2257,7 +2259,7 @@ graph edge [ source 30 - target 32 + target 31 graphics [ fill "#000000" @@ -2315,8 +2317,8 @@ graph ] edge [ - source 11 - target 2 + source 12 + target 8 graphics [ fill "#000000" @@ -2334,8 +2336,8 @@ graph ] edge [ - source 15 - target 9 + source 16 + target 3 graphics [ fill "#000000" @@ -2353,8 +2355,8 @@ graph ] edge [ - source 20 - target 7 + source 19 + target 9 graphics [ fill "#000000" @@ -2373,7 +2375,7 @@ graph edge [ source 23 - target 15 + target 12 graphics [ fill "#000000" @@ -2392,7 +2394,7 @@ graph edge [ source 27 - target 24 + target 15 graphics [ fill "#000000" @@ -2410,8 +2412,8 @@ graph ] edge [ - source 31 - target 19 + source 32 + target 15 graphics [ fill "#000000" @@ -2430,7 +2432,7 @@ graph edge [ source 35 - target 2 + target 16 graphics [ fill "#000000" diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.png b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.png index 5585b413..7484e249 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.png and b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.png differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.xmi index 5f4f1251..ba3eec9b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.xmi +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run1/1_1.xmi @@ -4,44 +4,44 @@ - - - + + + - - - + + + - + - + - - + + - - + + - - + + - - - + + + - - - + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.gml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.gml index 8520105c..00045cb3 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.gml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.gml @@ -308,8 +308,8 @@ graph id 8 graphics [ - w 223.3 - h 54 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -329,8 +329,9 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + UHFCommSubsystem class + CommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -345,8 +346,8 @@ graph id 9 graphics [ - w 284.90000000000003 - h 82 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -366,10 +367,8 @@ graph LabelGraphics [ text " - CommSubsystem class - KaCommSubsystem class - CommSubsystem class UndefinedPart - KaCommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -385,7 +384,7 @@ graph graphics [ w 323.40000000000003 - h 96 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -407,8 +406,7 @@ graph text " CommunicatingElement class Spacecraft class - CubeSat3U class - CubeSat class + SmallSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -424,8 +422,8 @@ graph id 11 graphics [ - w 269.5 - h 68 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -446,8 +444,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -462,8 +461,8 @@ graph id 12 graphics [ - w 269.5 - h 68 + w 284.90000000000003 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -484,8 +483,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + KaCommSubsystem class CommSubsystem class UndefinedPart + KaCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -560,7 +560,7 @@ graph text " CommunicatingElement class Spacecraft class - CubeSat3U class + CubeSat6U class CubeSat class CommunicatingElement class UndefinedPart " @@ -577,8 +577,8 @@ graph id 15 graphics [ - w 223.3 - h 54 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -598,8 +598,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + XCommSubsystem class + CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -614,8 +616,8 @@ graph id 16 graphics [ - w 277.20000000000005 - h 82 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -635,10 +637,8 @@ graph LabelGraphics [ text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -731,8 +731,8 @@ graph id 19 graphics [ - w 277.20000000000005 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -753,9 +753,8 @@ graph [ text " CommSubsystem class - XCommSubsystem class + UHFCommSubsystem class CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -847,7 +846,7 @@ graph graphics [ w 323.40000000000003 - h 82 + h 96 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -869,7 +868,8 @@ graph text " CommunicatingElement class Spacecraft class - SmallSat class + CubeSat3U class + CubeSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -885,8 +885,8 @@ graph id 23 graphics [ - w 284.90000000000003 - h 82 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -906,10 +906,8 @@ graph LabelGraphics [ text " - CommSubsystem class - KaCommSubsystem class - CommSubsystem class UndefinedPart - KaCommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -924,8 +922,8 @@ graph id 24 graphics [ - w 277.20000000000005 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -946,9 +944,8 @@ graph [ text " CommSubsystem class - XCommSubsystem class + UHFCommSubsystem class CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -963,8 +960,8 @@ graph id 25 graphics [ - w 223.3 - h 54 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -984,8 +981,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + XCommSubsystem class + CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1040,8 +1039,8 @@ graph id 27 graphics [ - w 269.5 - h 68 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1061,9 +1060,8 @@ graph LabelGraphics [ text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -1078,8 +1076,8 @@ graph id 28 graphics [ - w 269.5 - h 68 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1100,8 +1098,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1116,8 +1115,8 @@ graph id 29 graphics [ - w 223.3 - h 54 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1137,8 +1136,9 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + UHFCommSubsystem class + CommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1154,7 +1154,7 @@ graph graphics [ w 323.40000000000003 - h 96 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1176,8 +1176,7 @@ graph text " CommunicatingElement class Spacecraft class - CubeSat6U class - CubeSat class + SmallSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -1193,8 +1192,8 @@ graph id 31 graphics [ - w 269.5 - h 68 + w 284.90000000000003 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1215,8 +1214,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + KaCommSubsystem class CommSubsystem class UndefinedPart + KaCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1231,8 +1231,8 @@ graph id 32 graphics [ - w 277.20000000000005 - h 82 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1252,10 +1252,8 @@ graph LabelGraphics [ text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -1270,8 +1268,8 @@ graph id 33 graphics [ - w 223.3 - h 54 + w 284.90000000000003 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1291,8 +1289,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + KaCommSubsystem class + CommSubsystem class UndefinedPart + KaCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1422,8 +1422,8 @@ graph id 37 graphics [ - w 269.5 - h 68 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1444,8 +1444,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1837,7 +1838,7 @@ graph edge [ source 6 - target 9 + target 8 graphics [ fill "#000000" @@ -1897,7 +1898,7 @@ graph edge [ source 14 - target 16 + target 15 graphics [ fill "#000000" @@ -1977,7 +1978,7 @@ graph edge [ source 22 - target 23 + target 24 graphics [ fill "#000000" @@ -1997,7 +1998,7 @@ graph edge [ source 22 - target 24 + target 25 graphics [ fill "#000000" @@ -2017,7 +2018,7 @@ graph edge [ source 26 - target 27 + target 28 graphics [ fill "#000000" @@ -2037,7 +2038,7 @@ graph edge [ source 26 - target 28 + target 29 graphics [ fill "#000000" @@ -2077,7 +2078,7 @@ graph edge [ source 30 - target 32 + target 33 graphics [ fill "#000000" @@ -2137,7 +2138,7 @@ graph edge [ source 6 - target 8 + target 9 graphics [ fill "#000000" @@ -2177,7 +2178,7 @@ graph edge [ source 14 - target 15 + target 16 graphics [ fill "#000000" @@ -2217,7 +2218,7 @@ graph edge [ source 22 - target 25 + target 23 graphics [ fill "#000000" @@ -2237,7 +2238,7 @@ graph edge [ source 26 - target 29 + target 27 graphics [ fill "#000000" @@ -2257,7 +2258,7 @@ graph edge [ source 30 - target 33 + target 32 graphics [ fill "#000000" @@ -2296,8 +2297,8 @@ graph ] edge [ - source 9 - target 3 + source 11 + target 2 graphics [ fill "#000000" @@ -2315,8 +2316,8 @@ graph ] edge [ - source 11 - target 7 + source 15 + target 2 graphics [ fill "#000000" @@ -2334,8 +2335,8 @@ graph ] edge [ - source 17 - target 11 + source 8 + target 17 graphics [ fill "#000000" @@ -2353,8 +2354,8 @@ graph ] edge [ - source 23 - target 9 + source 19 + target 8 graphics [ fill "#000000" @@ -2372,8 +2373,8 @@ graph ] edge [ - source 19 - target 2 + source 24 + target 8 graphics [ fill "#000000" @@ -2392,7 +2393,7 @@ graph edge [ source 28 - target 12 + target 2 graphics [ fill "#000000" @@ -2411,7 +2412,7 @@ graph edge [ source 31 - target 11 + target 12 graphics [ fill "#000000" @@ -2430,7 +2431,7 @@ graph edge [ source 35 - target 9 + target 3 graphics [ fill "#000000" diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.png b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.png index be69c5cc..5a090707 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.png and b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.png differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.xmi index bd5bb4e3..fe90db85 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.xmi +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run2/2_1.xmi @@ -4,44 +4,44 @@ - - - + + + - - + + - - + + - + - - + + - - + + - - - + + + - - - + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.gml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.gml index f9950e40..8e761fef 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.gml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.gml @@ -310,8 +310,8 @@ graph id 8 graphics [ - w 223.3 - h 54 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -331,8 +331,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + XCommSubsystem class + CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -347,8 +349,8 @@ graph id 9 graphics [ - w 269.5 - h 68 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -368,9 +370,8 @@ graph LabelGraphics [ text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -386,7 +387,7 @@ graph graphics [ w 323.40000000000003 - h 82 + h 96 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -408,7 +409,8 @@ graph text " CommunicatingElement class Spacecraft class - SmallSat class + CubeSat6U class + CubeSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -424,8 +426,8 @@ graph id 11 graphics [ - w 277.20000000000005 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -446,9 +448,8 @@ graph [ text " CommSubsystem class - XCommSubsystem class + UHFCommSubsystem class CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -463,8 +464,8 @@ graph id 12 graphics [ - w 277.20000000000005 - h 82 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -484,10 +485,8 @@ graph LabelGraphics [ text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -502,8 +501,8 @@ graph id 13 graphics [ - w 223.3 - h 54 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -523,8 +522,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + XCommSubsystem class + CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -562,7 +563,7 @@ graph text " CommunicatingElement class Spacecraft class - CubeSat6U class + CubeSat3U class CubeSat class CommunicatingElement class UndefinedPart " @@ -617,8 +618,8 @@ graph id 16 graphics [ - w 223.3 - h 54 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -638,8 +639,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + XCommSubsystem class + CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -654,8 +657,8 @@ graph id 17 graphics [ - w 277.20000000000005 - h 82 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -675,10 +678,8 @@ graph LabelGraphics [ text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -694,7 +695,7 @@ graph graphics [ w 323.40000000000003 - h 96 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -716,8 +717,7 @@ graph text " CommunicatingElement class Spacecraft class - CubeSat6U class - CubeSat class + SmallSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -733,8 +733,8 @@ graph id 19 graphics [ - w 269.5 - h 68 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -755,8 +755,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -808,8 +809,8 @@ graph id 21 graphics [ - w 323.40000000000003 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -829,10 +830,9 @@ graph LabelGraphics [ text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart + CommSubsystem class + UHFCommSubsystem class + CommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -847,8 +847,8 @@ graph id 22 graphics [ - w 277.20000000000005 - h 82 + w 323.40000000000003 + h 96 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -868,10 +868,11 @@ graph LabelGraphics [ text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart + CommunicatingElement class + Spacecraft class + CubeSat3U class + CubeSat class + CommunicatingElement class UndefinedPart " fontSize 14 fontName "Consolas" @@ -886,8 +887,8 @@ graph id 23 graphics [ - w 284.90000000000003 - h 82 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -907,10 +908,8 @@ graph LabelGraphics [ text " - CommSubsystem class - KaCommSubsystem class - CommSubsystem class UndefinedPart - KaCommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -925,8 +924,8 @@ graph id 24 graphics [ - w 269.5 - h 68 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -947,8 +946,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -963,8 +963,8 @@ graph id 25 graphics [ - w 223.3 - h 54 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -984,8 +984,9 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + UHFCommSubsystem class + CommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1001,7 +1002,7 @@ graph graphics [ w 323.40000000000003 - h 96 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1023,8 +1024,7 @@ graph text " CommunicatingElement class Spacecraft class - CubeSat6U class - CubeSat class + SmallSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -1040,8 +1040,8 @@ graph id 27 graphics [ - w 269.5 - h 68 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1061,9 +1061,8 @@ graph LabelGraphics [ text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -1078,8 +1077,8 @@ graph id 28 graphics [ - w 223.3 - h 54 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1099,8 +1098,9 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + UHFCommSubsystem class + CommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1232,8 +1232,8 @@ graph id 32 graphics [ - w 269.5 - h 68 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1253,9 +1253,8 @@ graph LabelGraphics [ text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -1270,8 +1269,8 @@ graph id 33 graphics [ - w 223.3 - h 54 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1291,8 +1290,9 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + UHFCommSubsystem class + CommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1330,7 +1330,7 @@ graph text " CommunicatingElement class Spacecraft class - CubeSat3U class + CubeSat6U class CubeSat class CommunicatingElement class UndefinedPart " @@ -1385,8 +1385,8 @@ graph id 36 graphics [ - w 269.5 - h 68 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1407,8 +1407,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1697,7 +1698,7 @@ graph edge [ source 0 - target 21 + target 22 graphics [ fill "#000000" @@ -1837,7 +1838,7 @@ graph edge [ source 6 - target 9 + target 8 graphics [ fill "#000000" @@ -1877,7 +1878,7 @@ graph edge [ source 10 - target 12 + target 13 graphics [ fill "#000000" @@ -1917,7 +1918,7 @@ graph edge [ source 14 - target 17 + target 16 graphics [ fill "#000000" @@ -1956,8 +1957,8 @@ graph ] edge [ - source 21 - target 22 + source 18 + target 21 graphics [ fill "#000000" @@ -1976,8 +1977,8 @@ graph ] edge [ - source 21 - target 23 + source 22 + target 24 graphics [ fill "#000000" @@ -1996,8 +1997,8 @@ graph ] edge [ - source 18 - target 24 + source 22 + target 25 graphics [ fill "#000000" @@ -2017,7 +2018,7 @@ graph edge [ source 26 - target 27 + target 28 graphics [ fill "#000000" @@ -2077,7 +2078,7 @@ graph edge [ source 30 - target 32 + target 33 graphics [ fill "#000000" @@ -2137,7 +2138,7 @@ graph edge [ source 6 - target 8 + target 9 graphics [ fill "#000000" @@ -2157,7 +2158,7 @@ graph edge [ source 10 - target 13 + target 12 graphics [ fill "#000000" @@ -2177,7 +2178,7 @@ graph edge [ source 14 - target 16 + target 17 graphics [ fill "#000000" @@ -2216,8 +2217,8 @@ graph ] edge [ - source 21 - target 25 + source 22 + target 23 graphics [ fill "#000000" @@ -2237,7 +2238,7 @@ graph edge [ source 26 - target 28 + target 27 graphics [ fill "#000000" @@ -2257,7 +2258,7 @@ graph edge [ source 30 - target 33 + target 32 graphics [ fill "#000000" @@ -2315,7 +2316,7 @@ graph ] edge [ - source 12 + source 13 target 2 graphics [ @@ -2334,8 +2335,8 @@ graph ] edge [ - source 17 - target 7 + source 15 + target 11 graphics [ fill "#000000" @@ -2353,8 +2354,8 @@ graph ] edge [ - source 22 - target 2 + source 21 + target 11 graphics [ fill "#000000" @@ -2372,8 +2373,8 @@ graph ] edge [ - source 19 - target 15 + source 24 + target 2 graphics [ fill "#000000" @@ -2391,8 +2392,8 @@ graph ] edge [ - source 27 - target 19 + source 29 + target 15 graphics [ fill "#000000" @@ -2410,8 +2411,8 @@ graph ] edge [ - source 32 - target 15 + source 31 + target 2 graphics [ fill "#000000" @@ -2430,7 +2431,7 @@ graph edge [ source 35 - target 27 + target 28 graphics [ fill "#000000" diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.png b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.png index e7aa5b5c..783b9fb9 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.png and b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.png differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.xmi index 081ea350..cccb6a10 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.xmi +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run3/3_1.xmi @@ -4,44 +4,44 @@ - - - - - - - + + + - - - - - - + - - - + + - + + - + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.gml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.gml index 06f2d5b6..1329cc70 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.gml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.gml @@ -271,8 +271,8 @@ graph id 7 graphics [ - w 277.20000000000005 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -293,9 +293,8 @@ graph [ text " CommSubsystem class - XCommSubsystem class + UHFCommSubsystem class CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -347,8 +346,8 @@ graph id 9 graphics [ - w 269.5 - h 68 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -369,8 +368,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -386,7 +386,7 @@ graph graphics [ w 323.40000000000003 - h 96 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -408,8 +408,7 @@ graph text " CommunicatingElement class Spacecraft class - CubeSat3U class - CubeSat class + SmallSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -425,8 +424,8 @@ graph id 11 graphics [ - w 223.3 - h 54 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -446,8 +445,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + XCommSubsystem class + CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -501,8 +502,8 @@ graph id 13 graphics [ - w 323.40000000000003 - h 96 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -522,11 +523,8 @@ graph LabelGraphics [ text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -541,8 +539,8 @@ graph id 14 graphics [ - w 277.20000000000005 - h 82 + w 323.40000000000003 + h 96 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -562,10 +560,11 @@ graph LabelGraphics [ text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart + CommunicatingElement class + Spacecraft class + CubeSat3U class + CubeSat class + CommunicatingElement class UndefinedPart " fontSize 14 fontName "Consolas" @@ -580,8 +579,8 @@ graph id 15 graphics [ - w 277.20000000000005 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -602,9 +601,8 @@ graph [ text " CommSubsystem class - XCommSubsystem class + UHFCommSubsystem class CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -619,8 +617,8 @@ graph id 16 graphics [ - w 277.20000000000005 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -641,9 +639,8 @@ graph [ text " CommSubsystem class - XCommSubsystem class + UHFCommSubsystem class CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -734,7 +731,7 @@ graph id 19 graphics [ - w 284.90000000000003 + w 277.20000000000005 h 82 type "rectangle" fill "#FFFFFF" @@ -756,9 +753,9 @@ graph [ text " CommSubsystem class - KaCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart - KaCommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -773,8 +770,8 @@ graph id 20 graphics [ - w 223.3 - h 54 + w 284.90000000000003 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -794,8 +791,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + KaCommSubsystem class + CommSubsystem class UndefinedPart + KaCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -810,8 +809,8 @@ graph id 21 graphics [ - w 323.40000000000003 - h 82 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -831,10 +830,8 @@ graph LabelGraphics [ text " - CommunicatingElement class - Spacecraft class - SmallSat class - CommunicatingElement class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -849,8 +846,8 @@ graph id 22 graphics [ - w 269.5 - h 68 + w 323.40000000000003 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -870,9 +867,10 @@ graph LabelGraphics [ text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart + CommunicatingElement class + Spacecraft class + SmallSat class + CommunicatingElement class UndefinedPart " fontSize 14 fontName "Consolas" @@ -926,8 +924,8 @@ graph id 24 graphics [ - w 277.20000000000005 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -948,9 +946,8 @@ graph [ text " CommSubsystem class - XCommSubsystem class + UHFCommSubsystem class CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1003,7 +1000,7 @@ graph graphics [ w 323.40000000000003 - h 82 + h 96 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1025,7 +1022,8 @@ graph text " CommunicatingElement class Spacecraft class - SmallSat class + CubeSat3U class + CubeSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -1041,8 +1039,8 @@ graph id 27 graphics [ - w 269.5 - h 68 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1063,8 +1061,9 @@ graph [ text " CommSubsystem class - UHFCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1079,8 +1078,8 @@ graph id 28 graphics [ - w 223.3 - h 54 + w 277.20000000000005 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1100,8 +1099,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + XCommSubsystem class + CommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1116,8 +1117,8 @@ graph id 29 graphics [ - w 277.20000000000005 - h 82 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1137,10 +1138,8 @@ graph LabelGraphics [ text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -1156,7 +1155,7 @@ graph graphics [ w 323.40000000000003 - h 82 + h 96 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1178,7 +1177,8 @@ graph text " CommunicatingElement class Spacecraft class - SmallSat class + CubeSat6U class + CubeSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -1194,8 +1194,8 @@ graph id 31 graphics [ - w 284.90000000000003 - h 82 + w 269.5 + h 68 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1216,9 +1216,8 @@ graph [ text " CommSubsystem class - KaCommSubsystem class + UHFCommSubsystem class CommSubsystem class UndefinedPart - KaCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1233,7 +1232,7 @@ graph id 32 graphics [ - w 284.90000000000003 + w 277.20000000000005 h 82 type "rectangle" fill "#FFFFFF" @@ -1255,9 +1254,9 @@ graph [ text " CommSubsystem class - KaCommSubsystem class + XCommSubsystem class CommSubsystem class UndefinedPart - KaCommSubsystem class UndefinedPart + XCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1310,7 +1309,7 @@ graph graphics [ w 323.40000000000003 - h 96 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1332,8 +1331,7 @@ graph text " CommunicatingElement class Spacecraft class - CubeSat3U class - CubeSat class + SmallSat class CommunicatingElement class UndefinedPart " fontSize 14 @@ -1388,8 +1386,8 @@ graph id 36 graphics [ - w 269.5 - h 68 + w 223.3 + h 54 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1409,9 +1407,8 @@ graph LabelGraphics [ text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart + Payload class + InterferometryPayload class " fontSize 14 fontName "Consolas" @@ -1426,8 +1423,8 @@ graph id 37 graphics [ - w 223.3 - h 54 + w 284.90000000000003 + h 82 type "rectangle" fill "#FFFFFF" fill2 "#FFFFFF" @@ -1447,8 +1444,10 @@ graph LabelGraphics [ text " - Payload class - InterferometryPayload class + CommSubsystem class + KaCommSubsystem class + CommSubsystem class UndefinedPart + KaCommSubsystem class UndefinedPart " fontSize 14 fontName "Consolas" @@ -1660,7 +1659,7 @@ graph edge [ source 0 - target 13 + target 14 graphics [ fill "#000000" @@ -1700,7 +1699,7 @@ graph edge [ source 0 - target 21 + target 22 graphics [ fill "#000000" @@ -1860,7 +1859,7 @@ graph edge [ source 10 - target 12 + target 11 graphics [ fill "#000000" @@ -1879,8 +1878,8 @@ graph ] edge [ - source 13 - target 14 + source 10 + target 12 graphics [ fill "#000000" @@ -1899,7 +1898,7 @@ graph ] edge [ - source 13 + source 14 target 15 graphics [ @@ -1919,7 +1918,7 @@ graph ] edge [ - source 10 + source 14 target 16 graphics [ @@ -1959,8 +1958,8 @@ graph ] edge [ - source 21 - target 22 + source 18 + target 20 graphics [ fill "#000000" @@ -1979,7 +1978,7 @@ graph ] edge [ - source 18 + source 22 target 23 graphics [ @@ -1999,7 +1998,7 @@ graph ] edge [ - source 21 + source 22 target 24 graphics [ @@ -2040,7 +2039,7 @@ graph edge [ source 26 - target 29 + target 28 graphics [ fill "#000000" @@ -2120,7 +2119,7 @@ graph edge [ source 34 - target 36 + target 37 graphics [ fill "#000000" @@ -2160,7 +2159,7 @@ graph edge [ source 10 - target 11 + target 13 graphics [ fill "#000000" @@ -2179,7 +2178,7 @@ graph ] edge [ - source 13 + source 14 target 17 graphics [ @@ -2200,7 +2199,7 @@ graph edge [ source 18 - target 20 + target 21 graphics [ fill "#000000" @@ -2219,7 +2218,7 @@ graph ] edge [ - source 21 + source 22 target 25 graphics [ @@ -2240,7 +2239,7 @@ graph edge [ source 26 - target 28 + target 29 graphics [ fill "#000000" @@ -2280,7 +2279,7 @@ graph edge [ source 34 - target 37 + target 36 graphics [ fill "#000000" @@ -2299,7 +2298,7 @@ graph ] edge [ - source 7 + source 9 target 2 graphics [ @@ -2319,7 +2318,7 @@ graph edge [ source 12 - target 2 + target 9 graphics [ fill "#000000" @@ -2338,7 +2337,7 @@ graph edge [ source 15 - target 12 + target 7 graphics [ fill "#000000" @@ -2357,7 +2356,7 @@ graph edge [ source 19 - target 3 + target 12 graphics [ fill "#000000" @@ -2375,8 +2374,8 @@ graph ] edge [ - source 24 - target 16 + source 23 + target 9 graphics [ fill "#000000" @@ -2395,7 +2394,7 @@ graph edge [ source 27 - target 22 + target 2 graphics [ fill "#000000" @@ -2414,7 +2413,7 @@ graph edge [ source 32 - target 3 + target 9 graphics [ fill "#000000" @@ -2433,7 +2432,7 @@ graph edge [ source 35 - target 2 + target 9 graphics [ fill "#000000" diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.png b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.png index 8cdb0656..f39da70e 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.png and b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.png differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.xmi index a49adea1..5f0af641 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.xmi +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run4/4_1.xmi @@ -5,43 +5,43 @@ + - - + - + - + + - - + + + + + + + - - - - + + + - - - - - + - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.gml b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.gml deleted file mode 100644 index b709f251..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.gml +++ /dev/null @@ -1,2452 +0,0 @@ -graph -[ - node - [ - id 0 - graphics - [ - w 315.70000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 1" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - ConstellationMission class DefinedPart - InterferometryMission class DefinedPart - ConstellationMission class - InterferometryMission class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 1 - graphics - [ - w 308.0 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 2" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class DefinedPart - GroundStationNetwork class DefinedPart - CommunicatingElement class - GroundStationNetwork class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 2 - graphics - [ - w 261.8 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 3" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - XCommSubsystem class DefinedPart - CommSubsystem class - XCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 3 - graphics - [ - w 269.5 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "o 4" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class DefinedPart - KaCommSubsystem class DefinedPart - CommSubsystem class - KaCommSubsystem class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 4 - graphics - [ - w 41.800000000000004 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "true" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 5 - graphics - [ - w 50.6 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "false" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 6 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 7 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 8 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 9 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 10 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 11 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 12 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 13 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 14 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 15 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 16 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 17 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 18 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 19 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 20 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 21 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 22 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 23 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 24 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 25 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 26 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat6U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 27 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 28 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 29 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 30 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 31 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 32 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 33 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 34 - graphics - [ - w 323.40000000000003 - h 96 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommunicatingElement class - Spacecraft class - CubeSat3U class - CubeSat class - CommunicatingElement class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 35 - graphics - [ - w 269.5 - h 68 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - UHFCommSubsystem class - CommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 36 - graphics - [ - w 223.3 - h 54 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - Payload class - InterferometryPayload class - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 37 - graphics - [ - w 277.20000000000005 - h 82 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "null" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - CommSubsystem class - XCommSubsystem class - CommSubsystem class UndefinedPart - XCommSubsystem class UndefinedPart - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 38 - graphics - [ - w 112.2 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Integers" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 39 - graphics - [ - w 85.80000000000001 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Reals" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 40 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Strings" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - - node - [ - id 41 - graphics - [ - w 103.4 - h 26 - type "rectangle" - fill "#FFFFFF" - fill2 "#FFFFFF" - outline "#000000" - ] - LabelGraphics - [ - text "New Objects" - outline "#000000" - fill "#FFFFFF" - fontSize 16 - fontName "Monospace" - autoSizePolicy "node_width" - anchor "t" - borderDistance 0.0 - ] - LabelGraphics - [ - text " - " - fontSize 14 - fontName "Consolas" - alignment "left" - anchor "tl" - borderDistance 6 - ] - ] - edge - [ - source 0 - target 1 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "groundStationNetwork reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 6 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 9 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 10 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 18 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 21 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 26 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 30 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 0 - target 34 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "spacecraft reference ConstellationMission" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 2 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 1 - target 3 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 7 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 8 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 13 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 9 - target 14 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 9 - target 15 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 16 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 19 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 20 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 21 - target 22 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 21 - target 23 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 28 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 29 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 32 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 33 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 35 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 37 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "commSubsystem reference CommunicatingElement" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 6 - target 11 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 9 - target 12 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 10 - target 17 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 21 - target 24 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 18 - target 25 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 26 - target 27 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 30 - target 31 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 34 - target 36 - graphics - [ - fill "#000000" - width 3 - targetArrow "standard" - ] - LabelGraphics - [ - text "payload reference Spacecraft" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 8 - target 2 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 14 - target 7 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 16 - target 8 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 19 - target 16 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 22 - target 15 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 28 - target 15 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 33 - target 7 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] - edge - [ - source 35 - target 28 - graphics - [ - fill "#000000" - targetArrow "standard" - ] - LabelGraphics - [ - text "target reference CommSubsystem" - fontSize 14 - fontName "Consolas" - configuration "AutoFlippingLabel" - model "six_pos" - position "thead" - ] - ] -] - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.png b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.png deleted file mode 100644 index fb893419..00000000 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.png and /dev/null differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.xmi deleted file mode 100644 index ae933942..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/models/run5/5_1.xmi +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/statistics.csv b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/statistics.csv deleted file mode 100644 index c883eb87..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/outputs/statistics.csv +++ /dev/null @@ -1,7 +0,0 @@ -Task;Run;Result;Domain to logic transformation time;Logic to solver transformation time;Solver time;Postprocessing time;_Solution0FoundAt;TransformationExecutionTime;TypeAnalysisTime;StateCoderTime;StateCoderFailCount;SolutionCopyTime -1;1;ModelResultImpl;413;4298;29022;6539817577;28925;4664;135;14914;0;8 -1;2;ModelResultImpl;413;1988;29354;3276980485;29280;4331;0;17181;26;2 -1;3;ModelResultImpl;413;2030;39848;3828155076;39782;7257;0;21099;162;1 -1;4;ModelResultImpl;413;2049;381471;3603648606;381407;45077;0;275224;709;1 -1;5;ModelResultImpl;413;1839;60648;3372644526;60584;10393;0;34860;239;1 - 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 a8146d37..8c9f4be1 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml @@ -15,9 +15,6 @@ - - - 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 d7326877..9025d93a 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,8 +5,6 @@ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CoverageMetric; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; @@ -14,7 +12,6 @@ import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoPotentialLinkToGro import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SmallSat; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.ThreeUCubeSatWithNonUhfCrossLink; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.TimeMetric; import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; @@ -35,9 +32,6 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; *
  • threeUCubeSatWithNonUhfCrossLink
  • *
  • cubeSatWithKaAntenna
  • *
  • smallSat
  • - *
  • coverageMetric
  • - *
  • timeMetric
  • - *
  • costMetric
  • * * * @see IQueryGroup @@ -71,9 +65,6 @@ public final class SatelliteQueries extends BaseGeneratedPatternGroup { querySpecifications.add(ThreeUCubeSatWithNonUhfCrossLink.instance()); querySpecifications.add(CubeSatWithKaAntenna.instance()); querySpecifications.add(SmallSat.instance()); - querySpecifications.add(CoverageMetric.instance()); - querySpecifications.add(TimeMetric.instance()); - querySpecifications.add(CostMetric.instance()); } public CommunicationLinkDoesNotStartAtContainingElement getCommunicationLinkDoesNotStartAtContainingElement() { @@ -147,28 +138,4 @@ public final class SatelliteQueries extends BaseGeneratedPatternGroup { public SmallSat.Matcher getSmallSat(final ViatraQueryEngine engine) { return SmallSat.Matcher.on(engine); } - - public CoverageMetric getCoverageMetric() { - return CoverageMetric.instance(); - } - - public CoverageMetric.Matcher getCoverageMetric(final ViatraQueryEngine engine) { - return CoverageMetric.Matcher.on(engine); - } - - public TimeMetric getTimeMetric() { - return TimeMetric.instance(); - } - - public TimeMetric.Matcher getTimeMetric(final ViatraQueryEngine engine) { - return TimeMetric.Matcher.on(engine); - } - - public CostMetric getCostMetric() { - return CostMetric.instance(); - } - - public CostMetric.Matcher getCostMetric(final ViatraQueryEngine engine) { - return CostMetric.Matcher.on(engine); - } } 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 0235dbec..4093e2b2 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,8 +5,6 @@ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLinkDoesNotStartAtContainingElement; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CommunicationLoop; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CoverageMetric; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CubeSatWithKaAntenna; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.IncompatibleSourceAndTargetBand; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoLinkToGroundStation; @@ -14,33 +12,18 @@ import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NoPotentialLinkToGro import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.NotEnoughInterferometryPayloads; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SmallSat; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.ThreeUCubeSatWithNonUhfCrossLink; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.TimeMetric; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AdditionalCommSubsystemCost; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.AtLeastTwoInterferometryPayloads; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.BasePrice; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CommSubsystemBandUhf; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CubeSat3U; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CubeSat6U; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.DirectCommunicationLink; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.GroundStationNetwork; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IncomingData; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectCommunicationLink; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.IndirectLinkAllowed; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.InterferometryPayloadCost; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.LinkAllowed; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MatchingAntenna; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MatchingCommSubsystem; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCost; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionCoverage; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.MissionTime; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.ScienceData; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftCost; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKindCount; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftUplink; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithInterferometryPayload; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftWithTwoCommSubsystems; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitRate; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmitTime; import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.TransmittingCommSubsystem; import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; @@ -72,23 +55,6 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; *
  • groundStationNetwork
  • *
  • cubeSatWithKaAntenna
  • *
  • smallSat
  • - *
  • coverageMetric
  • - *
  • missionCoverage
  • - *
  • timeMetric
  • - *
  • missionTime
  • - *
  • transmitTime
  • - *
  • incomingData
  • - *
  • scienceData
  • - *
  • transmitRate
  • - *
  • spacecraftUplink
  • - *
  • costMetric
  • - *
  • missionCost
  • - *
  • spacecraftCost
  • - *
  • spacecraftOfKindCount
  • - *
  • basePrice
  • - *
  • interferometryPayloadCost
  • - *
  • additionalCommSubsystemCost
  • - *
  • spacecraftWithTwoCommSubsystems
  • * * * @see IQueryGroup @@ -135,22 +101,5 @@ public final class SatelliteQueriesAll extends BaseGeneratedPatternGroup { querySpecifications.add(GroundStationNetwork.instance()); querySpecifications.add(CubeSatWithKaAntenna.instance()); querySpecifications.add(SmallSat.instance()); - querySpecifications.add(CoverageMetric.instance()); - querySpecifications.add(MissionCoverage.instance()); - querySpecifications.add(TimeMetric.instance()); - querySpecifications.add(MissionTime.instance()); - querySpecifications.add(TransmitTime.instance()); - querySpecifications.add(IncomingData.instance()); - querySpecifications.add(ScienceData.instance()); - querySpecifications.add(TransmitRate.instance()); - querySpecifications.add(SpacecraftUplink.instance()); - querySpecifications.add(CostMetric.instance()); - querySpecifications.add(MissionCost.instance()); - querySpecifications.add(SpacecraftCost.instance()); - querySpecifications.add(SpacecraftOfKindCount.instance()); - querySpecifications.add(BasePrice.instance()); - querySpecifications.add(InterferometryPayloadCost.instance()); - querySpecifications.add(AdditionalCommSubsystemCost.instance()); - querySpecifications.add(SpacecraftWithTwoCommSubsystems.instance()); } } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKindCount.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKindCount.java deleted file mode 100644 index 3c4f9244..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKindCount.java +++ /dev/null @@ -1,189 +0,0 @@ -/** - * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql - */ -package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal; - -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SmallSat; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CubeSat3U; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.CubeSat6U; -import java.util.Arrays; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.context.common.JavaTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.PatternMatchCounter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; - -/** - * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way. - * - *

    Original source: - *

    - *         private pattern spacecraftOfKindCount(Sat : Spacecraft, Count : java Integer) {
    - *         	CubeSat3U(Sat);
    - *         	Count == count find cubeSat3U(_);
    - *         } or {
    - *         	CubeSat6U(Sat);
    - *         	Count == count find cubeSat6U(_);
    - *         } or {
    - *         	SmallSat(Sat);
    - *         	Count == count find smallSat(_);
    - *         }
    - * 
    - * - * @see GenericPatternMatcher - * @see GenericPatternMatch - * - */ -@SuppressWarnings("all") -public final class SpacecraftOfKindCount extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { - private SpacecraftOfKindCount() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static SpacecraftOfKindCount instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKindCount (visibility: PUBLIC, simpleName: SpacecraftOfKindCount, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKindCount, deprecated: ) (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 - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKindCount (visibility: PUBLIC, simpleName: SpacecraftOfKindCount, identifier: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SpacecraftOfKindCount, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

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

    The static initializer is defined using a helper field to work around limitations of the code generator. - * - */ - private static final Object STATIC_INITIALIZER = ensureInitialized(); - - public static Object ensureInitialized() { - INSTANCE.ensureInitializedInternal(); - return null; - } - } - - private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { - private static final SpacecraftOfKindCount.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_Sat = new PParameter("Sat", "satellite.Spacecraft", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/satellite", "Spacecraft")), PParameterDirection.INOUT); - - private final PParameter parameter_Count = new PParameter("Count", "java.lang.Integer", new JavaTransitiveInstancesKey(java.lang.Integer.class), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_Sat, parameter_Count); - - private GeneratedPQuery() { - super(PVisibility.PRIVATE); - } - - @Override - public String getFullyQualifiedName() { - return "hu.bme.mit.inf.dslreasoner.domains.satellite.queries.spacecraftOfKindCount"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("Sat","Count"); - } - - @Override - public List getParameters() { - return parameters; - } - - @Override - public Set doGetContainedBodies() { - setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); - Set bodies = new LinkedHashSet<>(); - { - PBody body = new PBody(this); - PVariable var_Sat = body.getOrCreateVariableByName("Sat"); - PVariable var_Count = body.getOrCreateVariableByName("Count"); - PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); - new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Count), new JavaTransitiveInstancesKey(java.lang.Integer.class)); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Sat, parameter_Sat), - new ExportedParameter(body, var_Count, parameter_Count) - )); - // CubeSat3U(Sat) - new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CubeSat3U"))); - // Count == count find cubeSat3U(_) - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new PatternMatchCounter(body, Tuples.flatTupleOf(var___0_), CubeSat3U.instance().getInternalQueryRepresentation(), var__virtual_0_); - new Equality(body, var_Count, var__virtual_0_); - bodies.add(body); - } - { - PBody body = new PBody(this); - PVariable var_Sat = body.getOrCreateVariableByName("Sat"); - PVariable var_Count = body.getOrCreateVariableByName("Count"); - PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); - new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Count), new JavaTransitiveInstancesKey(java.lang.Integer.class)); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Sat, parameter_Sat), - new ExportedParameter(body, var_Count, parameter_Count) - )); - // CubeSat6U(Sat) - new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "CubeSat6U"))); - // Count == count find cubeSat6U(_) - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new PatternMatchCounter(body, Tuples.flatTupleOf(var___0_), CubeSat6U.instance().getInternalQueryRepresentation(), var__virtual_0_); - new Equality(body, var_Count, var__virtual_0_); - bodies.add(body); - } - { - PBody body = new PBody(this); - PVariable var_Sat = body.getOrCreateVariableByName("Sat"); - PVariable var_Count = body.getOrCreateVariableByName("Count"); - PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "Spacecraft"))); - new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Count), new JavaTransitiveInstancesKey(java.lang.Integer.class)); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Sat, parameter_Sat), - new ExportedParameter(body, var_Count, parameter_Count) - )); - // SmallSat(Sat) - new TypeConstraint(body, Tuples.flatTupleOf(var_Sat), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/satellite", "SmallSat"))); - // Count == count find smallSat(_) - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new PatternMatchCounter(body, Tuples.flatTupleOf(var___0_), SmallSat.instance().getInternalQueryRepresentation(), var__virtual_0_); - new Equality(body, var_Count, var__virtual_0_); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend index 3a8688e9..43b2902f 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend @@ -1,13 +1,13 @@ package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric - -class CostObjective extends MetricBasedGuidanceFunction { - new() { - super(CostMetric.instance) - } - - override getName() { - "Cost" - } -} +//import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric +// +//class CostObjective extends MetricBasedGuidanceFunction { +// new() { +// super(CostMetric.instance) +// } +// +// override getName() { +// "Cost" +// } +//} 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 711c7ce6..c7135562 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 @@ -158,146 +158,146 @@ pattern smallSat(Sat : SmallSat) { SmallSat(Sat); } +//// +//// Metrics +//// // -// Metrics +//// Coverage // - -// Coverage - -pattern coverageMetric(Coverage : java Double) { - Coverage == sum find missionCoverage(_, #_); -} - -private pattern missionCoverage(Mission : InterferometryMission, Coverage : java Double) { - InterferometryMission.observationTime(Mission, ObservationTime); - ObserverCount == count find spacecraftWithInterferometryPayload(Mission, _); - Coverage == eval(Math.pow(1 - 2.0 / ObserverCount, 1 + 9 * (1.0 / ObservationTime)) + 0.05 * ObservationTime / 3); -} - -// Time - -pattern timeMetric(Time : java Double) { - Time == sum find missionTime(_, #_); -} - -private pattern missionTime(Mission : InterferometryMission, Time : java Double) { - InterferometryMission.observationTime(Mission, ObservationTime); - TrasmitTime == sum find transmitTime(Mission, _, #_); - Time == eval(TrasmitTime + 60.0 * ObservationTime); -} - -private pattern transmitTime(Mission : InterferometryMission, Spacecraft : Spacecraft, TransmitTime : java Double) { - ConstellationMission.spacecraft(Mission, Spacecraft); - find scienceData(Spacecraft, ScienceData); - IncomingData == sum find incomingData(Spacecraft, _, #_); - find transmitRate(Spacecraft, TransmitRate); - TransmitTime == eval((ScienceData + IncomingData) / (7.5 * TransmitRate)); -} - -private pattern incomingData(Spacecraft : Spacecraft, Source : Spacecraft, Data : java Double) { - find indirectCommunicationLink(Source, Spacecraft); - find scienceData(Source, Data); -} - -private pattern scienceData(Spacecraft : Spacecraft, Data : java Double) { - ConstellationMission.spacecraft(Mission, Spacecraft); - InterferometryMission.observationTime(Mission, ObservationTime); - Data == eval(12.0 * ObservationTime); -} - -private pattern transmitRate(Spacecraft : Spacecraft, TransmitRate : java Double) { - find spacecraftUplink(Spacecraft, Comm, Target); - UHFCommSubsystem(Comm); - Spacecraft(Target); - TransmitRate == 5.0; -} or { - find spacecraftUplink(Spacecraft, Comm, Target); - XCommSubsystem(Comm); - Spacecraft(Target); - TransmitRate == 1.6; -} or { - find spacecraftUplink(Spacecraft, Comm, Target); - XCommSubsystem(Comm); - GroundStationNetwork(Target); - TransmitRate == 0.7; -} or { - find spacecraftUplink(Spacecraft, Comm, Target); - KaCommSubsystem(Comm); - Spacecraft(Target); - TransmitRate == 220.0; -} or { - find spacecraftUplink(Spacecraft, Comm, Target); - KaCommSubsystem(Comm); - GroundStationNetwork(Target); - TransmitRate == 80.0; -} - -private pattern spacecraftUplink(Spacecraft : Spacecraft, TargetSubsystem : CommSubsystem, Target : CommunicatingElement) { - CommunicatingElement.commSubsystem.target(Spacecraft, TargetSubsystem); - CommunicatingElement.commSubsystem(Target, TargetSubsystem); -} - -// Cost - -pattern costMetric(Cost : java Double) { - Cost == sum find missionCost(_, #_); -} - -private pattern missionCost(Mission : InterferometryMission, Cost : java Double) { - InterferometryMission.observationTime(Mission, ObservationTime); - SpacecraftCost == sum find spacecraftCost(Mission, _, #_); - Cost == eval(SpacecraftCost + 100000.0 * ObservationTime); -} - -private pattern spacecraftCost(Mission : InterferometryMission, Spacecraft : Spacecraft, Cost : java Double) { - ConstellationMission.spacecraft(Mission, Spacecraft); - find spacecraftOfKindCount(Spacecraft, KindCount); - find basePrice(Spacecraft, BasePrice); - find interferometryPayloadCost(Spacecraft, InterferometryPayloadCost); - find additionalCommSubsystemCost(Spacecraft, AdditionalCommSubsystemCost); - Cost == eval(BasePrice * Math.pow(KindCount, -0.25) + InterferometryPayloadCost + AdditionalCommSubsystemCost); -} - -private pattern spacecraftOfKindCount(Sat : Spacecraft, Count : java Integer) { - CubeSat3U(Sat); - Count == count find cubeSat3U(_); -} or { - CubeSat6U(Sat); - Count == count find cubeSat6U(_); -} or { - SmallSat(Sat); - Count == count find smallSat(_); -} - -private pattern basePrice(Spacecraft : Spacecraft, BasePrice : java Double) { - CubeSat3U(Spacecraft); - BasePrice == 250000.0; -} or { - CubeSat6U(Spacecraft); - BasePrice == 750000.0; -} or { - SmallSat(Spacecraft); - BasePrice == 3000000.0; -} - -private pattern interferometryPayloadCost(Spacecraft : Spacecraft, Cost : java Double) { - find spacecraftWithInterferometryPayload(_, Spacecraft); - Cost == 50000.0; -} or { - neg find spacecraftWithInterferometryPayload(_, Spacecraft); - Cost == 0.0; -} - -private pattern additionalCommSubsystemCost(Spacecraft : Spacecraft, Cost : java Double) { - find spacecraftWithTwoCommSubsystems(Spacecraft); - Cost == 100000.0; -} or { - neg find spacecraftWithTwoCommSubsystems(Spacecraft); - Cost == 0.0; -} - -private pattern spacecraftWithTwoCommSubsystems(Spacecraft : Spacecraft) { - Spacecraft.commSubsystem(Spacecraft, Subsystem1); - Spacecraft.commSubsystem(Spacecraft, Subsystem2); - Subsystem1 != Subsystem2; -} +//pattern coverageMetric(Coverage : java Double) { +// Coverage == sum find missionCoverage(_, #_); +//} +// +//private pattern missionCoverage(Mission : InterferometryMission, Coverage : java Double) { +// InterferometryMission.observationTime(Mission, ObservationTime); +// ObserverCount == count find spacecraftWithInterferometryPayload(Mission, _); +// Coverage == eval(Math.pow(1 - 2.0 / ObserverCount, 1 + 9 * (1.0 / ObservationTime)) + 0.05 * ObservationTime / 3); +//} +// +//// Time +// +//pattern timeMetric(Time : java Double) { +// Time == sum find missionTime(_, #_); +//} +// +//private pattern missionTime(Mission : InterferometryMission, Time : java Double) { +// InterferometryMission.observationTime(Mission, ObservationTime); +// TrasmitTime == sum find transmitTime(Mission, _, #_); +// Time == eval(TrasmitTime + 60.0 * ObservationTime); +//} +// +//private pattern transmitTime(Mission : InterferometryMission, Spacecraft : Spacecraft, TransmitTime : java Double) { +// ConstellationMission.spacecraft(Mission, Spacecraft); +// find scienceData(Spacecraft, ScienceData); +// IncomingData == sum find incomingData(Spacecraft, _, #_); +// find transmitRate(Spacecraft, TransmitRate); +// TransmitTime == eval((ScienceData + IncomingData) / (7.5 * TransmitRate)); +//} +// +//private pattern incomingData(Spacecraft : Spacecraft, Source : Spacecraft, Data : java Double) { +// find indirectCommunicationLink(Source, Spacecraft); +// find scienceData(Source, Data); +//} +// +//private pattern scienceData(Spacecraft : Spacecraft, Data : java Double) { +// ConstellationMission.spacecraft(Mission, Spacecraft); +// InterferometryMission.observationTime(Mission, ObservationTime); +// Data == eval(12.0 * ObservationTime); +//} +// +//private pattern transmitRate(Spacecraft : Spacecraft, TransmitRate : java Double) { +// find spacecraftUplink(Spacecraft, Comm, Target); +// UHFCommSubsystem(Comm); +// Spacecraft(Target); +// TransmitRate == 5.0; +//} or { +// find spacecraftUplink(Spacecraft, Comm, Target); +// XCommSubsystem(Comm); +// Spacecraft(Target); +// TransmitRate == 1.6; +//} or { +// find spacecraftUplink(Spacecraft, Comm, Target); +// XCommSubsystem(Comm); +// GroundStationNetwork(Target); +// TransmitRate == 0.7; +//} or { +// find spacecraftUplink(Spacecraft, Comm, Target); +// KaCommSubsystem(Comm); +// Spacecraft(Target); +// TransmitRate == 220.0; +//} or { +// find spacecraftUplink(Spacecraft, Comm, Target); +// KaCommSubsystem(Comm); +// GroundStationNetwork(Target); +// TransmitRate == 80.0; +//} +// +//private pattern spacecraftUplink(Spacecraft : Spacecraft, TargetSubsystem : CommSubsystem, Target : CommunicatingElement) { +// CommunicatingElement.commSubsystem.target(Spacecraft, TargetSubsystem); +// CommunicatingElement.commSubsystem(Target, TargetSubsystem); +//} +// +//// Cost +// +//pattern costMetric(Cost : java Double) { +// Cost == sum find missionCost(_, #_); +//} +// +//private pattern missionCost(Mission : InterferometryMission, Cost : java Double) { +// InterferometryMission.observationTime(Mission, ObservationTime); +// SpacecraftCost == sum find spacecraftCost(Mission, _, #_); +// Cost == eval(SpacecraftCost + 100000.0 * ObservationTime); +//} +// +//private pattern spacecraftCost(Mission : InterferometryMission, Spacecraft : Spacecraft, Cost : java Double) { +// ConstellationMission.spacecraft(Mission, Spacecraft); +// find spacecraftOfKindCount(Spacecraft, KindCount); +// find basePrice(Spacecraft, BasePrice); +// find interferometryPayloadCost(Spacecraft, InterferometryPayloadCost); +// find additionalCommSubsystemCost(Spacecraft, AdditionalCommSubsystemCost); +// Cost == eval(BasePrice * Math.pow(KindCount, -0.25) + InterferometryPayloadCost + AdditionalCommSubsystemCost); +//} +// +//private pattern spacecraftOfKindCount(Sat : Spacecraft, Count : java Integer) { +// CubeSat3U(Sat); +// Count == count find cubeSat3U(_); +//} or { +// CubeSat6U(Sat); +// Count == count find cubeSat6U(_); +//} or { +// SmallSat(Sat); +// Count == count find smallSat(_); +//} +// +//private pattern basePrice(Spacecraft : Spacecraft, BasePrice : java Double) { +// CubeSat3U(Spacecraft); +// BasePrice == 250000.0; +//} or { +// CubeSat6U(Spacecraft); +// BasePrice == 750000.0; +//} or { +// SmallSat(Spacecraft); +// BasePrice == 3000000.0; +//} +// +//private pattern interferometryPayloadCost(Spacecraft : Spacecraft, Cost : java Double) { +// find spacecraftWithInterferometryPayload(_, Spacecraft); +// Cost == 50000.0; +//} or { +// neg find spacecraftWithInterferometryPayload(_, Spacecraft); +// Cost == 0.0; +//} +// +//private pattern additionalCommSubsystemCost(Spacecraft : Spacecraft, Cost : java Double) { +// find spacecraftWithTwoCommSubsystems(Spacecraft); +// Cost == 100000.0; +//} or { +// neg find spacecraftWithTwoCommSubsystems(Spacecraft); +// Cost == 0.0; +//} +// +//private pattern spacecraftWithTwoCommSubsystems(Spacecraft : Spacecraft) { +// Spacecraft.commSubsystem(Spacecraft, Subsystem1); +// Spacecraft.commSubsystem(Spacecraft, Subsystem2); +// Subsystem1 != Subsystem2; +//} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.CostObjective.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.CostObjective.xtendbin index 9d4649e5..f8273db1 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.CostObjective.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.CostObjective.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.LocalSearchEngineManager.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.LocalSearchEngineManager.xtendbin index 9c013962..b92afd88 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.LocalSearchEngineManager.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.LocalSearchEngineManager.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.PatternMatchConstraint.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.PatternMatchConstraint.xtendbin index 4eaa04bd..3b6e5310 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.PatternMatchConstraint.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.PatternMatchConstraint.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.java deleted file mode 100644 index 8659913c..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.java +++ /dev/null @@ -1,16 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo; - -import hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo.MetricBasedGuidanceFunction; -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.CostMetric; - -@SuppressWarnings("all") -public class CostObjective extends MetricBasedGuidanceFunction { - public CostObjective() { - super(CostMetric.instance()); - } - - @Override - public String getName() { - return "Cost"; - } -} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend index 41482b28..c7c1ad77 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/Descriptor.xtend @@ -4,10 +4,21 @@ import java.util.HashMap import java.util.Map import java.util.Set import org.eclipse.xtend.lib.annotations.Data +import org.eclipse.xtend2.lib.StringConcatenationClient @Data abstract class AbstractNodeDescriptor { long dataHash - + + protected def StringConcatenationClient prettyPrint() { + '''(«dataHash»)[«class.simpleName»]''' + } + + override toString() { + ''' + «prettyPrint» + ''' + } + // @Pure // @Override // override public boolean equals(Object obj) { @@ -24,34 +35,41 @@ import org.eclipse.xtend.lib.annotations.Data // } } -@Data class LocalNodeDescriptor extends AbstractNodeDescriptor{ +@Data class LocalNodeDescriptor extends AbstractNodeDescriptor { Set types String id; + new(String id, Set types) { - super(calcualteDataHash(id,types)) + super(calcualteDataHash(id, types)) this.types = types this.id = id } - + def private static calcualteDataHash(String id, Set types) { val int prime = 31; var result = 0 - if(id !== null) - result = id.hashCode(); - if(types !== null) { - result = prime * result + types.hashCode - } - return result + if (id !== null) + result = id.hashCode(); + if (types !== null) { + result = prime * result + types.hashCode + } + return result } - + override hashCode() { return this.dataHash.hashCode } - + + override protected prettyPrint() { + '''(«dataHash»)[«IF id !== null»id = "«id»"«IF types === null || !types.empty», «ENDIF»«ENDIF»«IF types === null»TYPES = null«ELSE»«FOR type : types SEPARATOR ", "»«type»«ENDFOR»«ENDIF»]''' + } + override toString() { - return class.name + this.dataHash + ''' + «prettyPrint» + ''' } - + // @Pure // @Override // override public boolean equals(Object obj) { @@ -66,7 +84,6 @@ import org.eclipse.xtend.lib.annotations.Data // return false; // return true; // } - // @Pure // override public boolean equals(Object obj) { // if (this === obj) @@ -97,49 +114,70 @@ import org.eclipse.xtend.lib.annotations.Data String type } -@Data class FurtherNodeDescriptor extends AbstractNodeDescriptor{ - - NodeRep previousRepresentation - Map,Integer> incomingEdges - Map,Integer> outgoingEdges - - new( - NodeRep previousRepresentation, - Map,Integer> incomingEdges, - Map,Integer> outgoingEdges) - { - super(calculateDataHash(previousRepresentation,incomingEdges,outgoingEdges)) - this.previousRepresentation = previousRepresentation - this.incomingEdges = new HashMap(incomingEdges) - this.outgoingEdges = new HashMap(outgoingEdges) - } - - static def private int calculateDataHash( - NodeRep previousRepresentation, - Map,Integer> incomingEdges, - Map,Integer> outgoingEdges) - { - val int prime = 31; - var int result = previousRepresentation.hashCode; - if(incomingEdges !== null) - result = prime * result + incomingEdges.hashCode(); - if(outgoingEdges !== null) - result = prime * result + outgoingEdges.hashCode(); - return result; - } - - override hashCode() { - return this.dataHash.hashCode +@Data class FurtherNodeDescriptor extends AbstractNodeDescriptor { + + NodeRep previousRepresentation + Map, Integer> incomingEdges + Map, Integer> outgoingEdges + + new(NodeRep previousRepresentation, Map, Integer> incomingEdges, + Map, Integer> outgoingEdges) { + super(calculateDataHash(previousRepresentation, incomingEdges, outgoingEdges)) + this.previousRepresentation = previousRepresentation + this.incomingEdges = new HashMap(incomingEdges) + this.outgoingEdges = new HashMap(outgoingEdges) } - + + static def private int calculateDataHash(NodeRep previousRepresentation, + Map, Integer> incomingEdges, Map, Integer> outgoingEdges) { + val int prime = 31; + var int result = previousRepresentation.hashCode; + if (incomingEdges !== null) + result = prime * result + incomingEdges.hashCode(); + if (outgoingEdges !== null) + result = prime * result + outgoingEdges.hashCode(); + return result; + } + + override hashCode() { + return this.dataHash.hashCode + } + + override prettyPrint() { + ''' + («dataHash»)[ + PREV = «previousRepresentation?.prettyPrint» + «IF incomingEdges === null» + IN null + «ELSE» + «FOR edge : incomingEdges.entrySet» + IN «edge.value» «edge.key.type» = «edge.key.from.prettyPrint» + «ENDFOR» + «ENDIF» + «IF outgoingEdges === null» + OUT null + «ELSE» + «FOR edge : outgoingEdges.entrySet» + OUT «edge.value» «edge.key.type» = «edge.key.to.prettyPrint» + «ENDFOR» + «ENDIF» + ]''' + } + + private def StringConcatenationClient prettyPrint(NodeRep rep) { + if (rep instanceof AbstractNodeDescriptor) { + rep.prettyPrint + } else { + '''«rep»''' + } + } + override toString() { - return class.name + dataHash -// return '''[«previousRepresentation»,(«FOR -// in: incomingEdges.entrySet»(«in.key.type.name»=«in.key.from»,«in.value»)«ENDFOR»),(«FOR -// out: outgoingEdges.entrySet»(«out.key.type.name»=«out.key.to»,«out.value»)«ENDFOR»),«FOR -// att: attributeValues»(«att.type.name»=«att.value»)«ENDFOR»]''' + ''' + «prettyPrint» + ''' } - + // @Pure // @Override // override public boolean equals(Object obj) { @@ -154,7 +192,6 @@ import org.eclipse.xtend.lib.annotations.Data // return false; // return true; // } - // @Pure // override public boolean equals(Object obj) { // if (this === obj) @@ -191,24 +228,23 @@ import org.eclipse.xtend.lib.annotations.Data // return true; // } } - /* -@Data -class ModelDescriptor { - int dataHash - int unknownElements - Map knownElements - - public new(Map knownElements, int unknownElements) { - this.dataHash = calculateDataHash(knownElements,unknownElements) - this.unknownElements = unknownElements - this.knownElements = knownElements - } - - def private static calculateDataHash(Map knownElements, int unknownElements) - { - val int prime = 31; - return knownElements.hashCode * prime + unknownElements.hashCode - } -} -*/ \ No newline at end of file + * @Data + * class ModelDescriptor { + * int dataHash + * int unknownElements + * Map knownElements + * + * public new(Map knownElements, int unknownElements) { + * this.dataHash = calculateDataHash(knownElements,unknownElements) + * this.unknownElements = unknownElements + * this.knownElements = knownElements + * } + * + * def private static calculateDataHash(Map knownElements, int unknownElements) + * { + * val int prime = 31; + * return knownElements.hashCode * prime + unknownElements.hashCode + * } + * } + */ diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodOptions.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodOptions.xtend new file mode 100644 index 00000000..efc89803 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/NeighbourhoodOptions.xtend @@ -0,0 +1,22 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood + +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration +import java.util.Set +import org.eclipse.xtend.lib.annotations.Data + +@Data +class NeighbourhoodOptions { + public static val FixPointRage = -1 + public static val GraphWidthRange = -2 + public static val FullParallels = Integer.MAX_VALUE + public static val MaxNumbers = Integer.MAX_VALUE + + public static val DEFAULT = new NeighbourhoodOptions(GraphWidthRange, FullParallels, MaxNumbers, null, null) + + val int range + val int parallels + val int maxNumber + val Set relevantTypes + val Set relevantRelations +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend index 6dc40705..54b0f54a 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2NeighbourhoodRepresentation.xtend @@ -4,32 +4,34 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation +import java.util.ArrayList import java.util.HashMap import java.util.HashSet -import java.util.LinkedList import java.util.List import java.util.Map import java.util.Set import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation -abstract class PartialInterpretation2NeighbourhoodRepresentation { - private val boolean deepRepresentation - private val boolean mergeSimilarNeighbourhood +abstract class PartialInterpretation2NeighbourhoodRepresentation { + val boolean deepRepresentation + val boolean mergeSimilarNeighbourhood protected new(boolean deeprepresentation, boolean mergeSimilarNeighbourhood) { this.deepRepresentation = deeprepresentation this.mergeSimilarNeighbourhood = mergeSimilarNeighbourhood } - - public static val FixPointRage = -1 - public static val GraphWidthRange = -2 - public static val FullParallels = Integer.MAX_VALUE - public static val MaxNumbers = Integer.MAX_VALUE - + + public static val FixPointRage = NeighbourhoodOptions.FixPointRage + public static val GraphWidthRange = NeighbourhoodOptions.GraphWidthRange + public static val FullParallels = NeighbourhoodOptions.FullParallels + public static val MaxNumbers = NeighbourhoodOptions.MaxNumbers + + static val FOCUSED_ELEMENT_NAME = "<>" + /** * Creates a neighbourhood representation with traces * @param model The model to be represented. @@ -37,10 +39,15 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation relevantTypes, Set relevantRelations) - { + def createRepresentation(PartialInterpretation model, int range, int parallels, int maxNumber, + Set relevantTypes, Set relevantRelations) { + createRepresentationWithFocus(model, range, parallels, maxNumber, relevantTypes, relevantRelations, null) + } + + def createRepresentationWithFocus(PartialInterpretation model, NeighbourhoodOptions options, + DefinedElement focusedElement) { + createRepresentationWithFocus(model, options.range, options.parallels, options.maxNumber, options.relevantTypes, + options.relevantRelations, focusedElement) + } + + def createRepresentationWithFocus(PartialInterpretation model, int range, int parallels, int maxNumber, + Set relevantTypes, Set relevantRelations, DefinedElement focusedElement) { val Map> types = new HashMap - fillTypes(model,types,relevantTypes) + fillTypes(model, types, relevantTypes) val Map>> IncomingRelations = new HashMap; val Map>> OutgoingRelations = new HashMap; - fillReferences(model,IncomingRelations,OutgoingRelations,relevantRelations) - - val res = doRecursiveNeighbourCalculation(model,types,IncomingRelations,OutgoingRelations,range,parallels,maxNumber); - + fillReferences(model, IncomingRelations, OutgoingRelations, relevantRelations) + + val res = doRecursiveNeighbourCalculation(model, types, IncomingRelations, OutgoingRelations, range, parallels, + maxNumber, focusedElement); + return res; } - + def private isRelevant(TypeDeclaration t, Set relevantTypes) { - if(relevantTypes === null) { + if (relevantTypes === null) { return true } else { return relevantTypes.contains(t) } } + def private isRelevant(RelationDeclaration r, Set relevantRelations) { - if(relevantRelations === null) { + if (relevantRelations === null) { return true } else { return relevantRelations.contains(r) } } + /** - * Gets the largest + * Gets the minimal neighbourhood size such that every reachable node appears in the shape of every other at least once. */ def private getWidth(Map> types, Map>> IncomingRelations, - Map>> OutgoingRelations) - { - val elements = types.keySet - val Map> reachable = new HashMap - for(element : elements) { + Map>> OutgoingRelations) { + val elements = types.keySet + var Map> reachable = new HashMap + var Map> newReachable = new HashMap + for (element : elements) { val set = new HashSet set.add(element) - reachable.put(element,set) + reachable.put(element, new HashSet) + newReachable.put(element, set) } - + var int width = 0 var boolean newAdded do { + var tmp = reachable + reachable = newReachable + newReachable = tmp newAdded = false - for(element : elements) { + for (element : elements) { val elementNeigbours = element.lookup(reachable) - val size = elementNeigbours.size - for(incoming : element.lookup(IncomingRelations)) { - elementNeigbours.addAll(incoming.from.lookup(reachable)) + val newElementNeigbours = element.lookup(newReachable) + newElementNeigbours.addAll(elementNeigbours) + for (incoming : element.lookup(IncomingRelations)) { + newElementNeigbours.addAll(incoming.from.lookup(reachable)) } - for(outgoing : element.lookup(OutgoingRelations)) { - elementNeigbours.addAll(outgoing.to.lookup(reachable)) + for (outgoing : element.lookup(OutgoingRelations)) { + newElementNeigbours.addAll(outgoing.to.lookup(reachable)) } - newAdded = newAdded || (elementNeigbours.size > size) + newAdded = newAdded || (newElementNeigbours.size > elementNeigbours.size) } - - width +=1 - } while(newAdded) + + width += 1 + } while (newAdded) return width } - + /** * Creates a neighbourhood representation with traces * @param model The model to be represented. @@ -122,68 +145,71 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation doRecursiveNeighbourCalculation( - PartialInterpretation model, - Map> types, + def private NeighbourhoodWithTraces doRecursiveNeighbourCalculation( + PartialInterpretation model, Map> types, Map>> IncomingRelations, - Map>> OutgoingRelations, - int range, int parallels, int maxNumber) - { - if(range == 0){ - val r = calculateLocalNodeDescriptors(model,types,maxNumber) - val res = this.createLocalRepresentation(r.value,r.key) - if(res.modelRepresentation === null) { + Map>> OutgoingRelations, int range, int parallels, + int maxNumber, DefinedElement focusedElement) { + if (range == 0) { + val r = calculateLocalNodeDescriptors(model, types, maxNumber, focusedElement) + val res = this.createLocalRepresentation(r.value, r.key) + if (res.modelRepresentation === null) { throw new IllegalArgumentException('''Model representation is null''') - } else if(res.nodeRepresentations === null || res.nodeRepresentations.empty) { + } else if (res.nodeRepresentations === null || res.nodeRepresentations.empty) { throw new IllegalArgumentException('''No node representation''') - } else if(res.previousRepresentation !== null) { + } else if (res.previousRepresentation !== null) { throw new IllegalArgumentException('''The previous representation of the first neighbourhood have to be null''') - } else return res - } else if(range > 0) { - val previous = doRecursiveNeighbourCalculation(model,types,IncomingRelations,OutgoingRelations,range-1,parallels,maxNumber) - val r = calculateFurtherNodeDescriptors(model,previous,IncomingRelations,OutgoingRelations,parallels,maxNumber) - //println('''Level «range» finished.''') - val res = createFurtherRepresentation(r.key,r.value,previous,deepRepresentation) - if(res.modelRepresentation === null) { + } else + return res + } else if (range > 0) { + val previous = doRecursiveNeighbourCalculation(model, types, IncomingRelations, OutgoingRelations, + range - 1, parallels, maxNumber, focusedElement) + val r = calculateFurtherNodeDescriptors(model, previous, IncomingRelations, OutgoingRelations, parallels, + maxNumber) + // println('''Level «range» finished.''') + val res = createFurtherRepresentation(r.key, r.value, previous, deepRepresentation) + if (res.modelRepresentation === null) { throw new IllegalArgumentException('''Model representation is null''') - } else if(res.nodeRepresentations === null || res.nodeRepresentations.empty) { + } else if (res.nodeRepresentations === null || res.nodeRepresentations.empty) { throw new IllegalArgumentException('''No node representation''') - } else if(res.previousRepresentation === null && deepRepresentation) { + } else if (res.previousRepresentation === null && deepRepresentation) { throw new IllegalArgumentException('''Need previous representations''') - } else return res + } else + return res } else if (range == FixPointRage) { - return refineUntilFixpoint(model,types,IncomingRelations,OutgoingRelations,parallels,maxNumber) + return refineUntilFixpoint(model, types, IncomingRelations, OutgoingRelations, parallels, maxNumber, + focusedElement) } else if (range == GraphWidthRange) { - val width = this.getWidth(types,IncomingRelations,OutgoingRelations) - //println(width) - return doRecursiveNeighbourCalculation(model,types,IncomingRelations,OutgoingRelations,width,parallels,maxNumber) + val width = this.getWidth(types, IncomingRelations, OutgoingRelations) + // println(width) + return doRecursiveNeighbourCalculation(model, types, IncomingRelations, OutgoingRelations, width, parallels, + maxNumber, focusedElement) } } - - def private refineUntilFixpoint( - PartialInterpretation model, - Map> types, + + def private refineUntilFixpoint(PartialInterpretation model, Map> types, Map>> IncomingRelations, - Map>> OutgoingRelations, - int parallels, int maxNumbers) - { + Map>> OutgoingRelations, int parallels, int maxNumbers, + DefinedElement focusedElement) { var lastRange = 0 - val last = calculateLocalNodeDescriptors(model,types,maxNumbers) - var lastRepresentation = this.createLocalRepresentation(last.value,last.key) - //println('''Level 0 finished.''') + val last = calculateLocalNodeDescriptors(model, types, maxNumbers, focusedElement) + var lastRepresentation = this.createLocalRepresentation(last.value, last.key) + // println('''Level 0 finished.''') var boolean hasRefined do { - val nextRange = lastRange+1 - val next = calculateFurtherNodeDescriptors(model,lastRepresentation,IncomingRelations,OutgoingRelations,parallels,maxNumbers) - val nextRepresentation = createFurtherRepresentation(next.key,next.value,lastRepresentation,deepRepresentation) - - val previousNumberOfTypes =lastRepresentation.nodeRepresentations.values.toSet.size + val nextRange = lastRange + 1 + val next = calculateFurtherNodeDescriptors(model, lastRepresentation, IncomingRelations, OutgoingRelations, + parallels, maxNumbers) + val nextRepresentation = createFurtherRepresentation(next.key, next.value, lastRepresentation, + deepRepresentation) + + val previousNumberOfTypes = lastRepresentation.nodeRepresentations.values.toSet.size val nextNumberOfTypes = nextRepresentation.nodeRepresentations.values.toSet.size - hasRefined = nextNumberOfTypes > previousNumberOfTypes - + hasRefined = nextNumberOfTypes > previousNumberOfTypes + lastRange = nextRange lastRepresentation = nextRepresentation - + // if(hasRefined) { // println('''Level «nextRange» is calculated, number of types is refined: «previousNumberOfTypes» -> «nextNumberOfTypes»''') // } else { @@ -192,211 +218,219 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation> node2Type, Set relevantTypes) { - for(element : model.elements) { + + def private fillTypes(PartialInterpretation model, Map> node2Type, + Set relevantTypes) { + for (element : model.elements) { node2Type.put(element, new HashSet) } - + // for(typeDefinition : model.problem.types.filter(TypeDefinition)) { // // Dont need // } - for(typeInterpretation : model.partialtypeinterpratation) { - if(typeInterpretation instanceof PartialPrimitiveInterpretation) { - - } else if(typeInterpretation instanceof PartialComplexTypeInterpretation) { + for (typeInterpretation : model.partialtypeinterpratation) { + if (typeInterpretation instanceof PartialPrimitiveInterpretation) { + } else if (typeInterpretation instanceof PartialComplexTypeInterpretation) { val type = typeInterpretation.interpretationOf - if(type.isRelevant(relevantTypes)) { - for(element : typeInterpretation.elements) { + if (type.isRelevant(relevantTypes)) { + for (element : typeInterpretation.elements) { element.lookup(node2Type).add(type.name) } } } } } - + /** * Indexes the references */ def private fillReferences(PartialInterpretation model, Map>> IncomingRelations, Map>> OutgoingRelations, - Set relevantRelations) - { - for(object : model.elements) { - IncomingRelations.put(object,new LinkedList) - OutgoingRelations.put(object,new LinkedList) + Set relevantRelations) { + for (object : model.elements) { + IncomingRelations.put(object, new ArrayList) + OutgoingRelations.put(object, new ArrayList) } - for(relationInterpretation : model.partialrelationinterpretation) { + for (relationInterpretation : model.partialrelationinterpretation) { val type = relationInterpretation.interpretationOf - if(type.isRelevant(relevantRelations)) { - for(link : relationInterpretation.relationlinks) { - if(link instanceof BinaryElementRelationLink) { - OutgoingRelations.get(link.param1) += new OutgoingRelation(link.param2,type.name) - IncomingRelations.get(link.param2) += new IncomingRelation(link.param1,type.name) - } else throw new UnsupportedOperationException + if (type.isRelevant(relevantRelations)) { + for (link : relationInterpretation.relationlinks) { + if (link instanceof BinaryElementRelationLink) { + OutgoingRelations.get(link.param1) += new OutgoingRelation(link.param2, type.name) + IncomingRelations.get(link.param2) += new IncomingRelation(link.param1, type.name) + } else + throw new UnsupportedOperationException } } } } - + /** * Creates a local representation of the objects (aka zero range neighbourhood) */ - def abstract protected NeighbourhoodWithTraces createLocalRepresentation( + def abstract protected NeighbourhoodWithTraces createLocalRepresentation( Map node2Representation, Map representation2Amount ) - + /** * Creates a */ - def abstract protected NeighbourhoodWithTraces createFurtherRepresentation( + def abstract protected NeighbourhoodWithTraces createFurtherRepresentation( Map, Integer> nodeDescriptors, Map> node2Representation, - NeighbourhoodWithTraces previous, + NeighbourhoodWithTraces previous, boolean deepRepresentation ) - + def private addOne(int original, int max) { if(original == Integer.MAX_VALUE) return Integer.MAX_VALUE - if(original +1 > max) return Integer.MAX_VALUE - else return original+1 + if(original + 1 > max) return Integer.MAX_VALUE else return original + 1 } - + private def calculateIncomingEdges(Map>> IncomingRelations, - DefinedElement object, Map previousNodeRepresentations, int parallel) - { + DefinedElement object, Map previousNodeRepresentations, + int parallel) { val Map, Integer> res = new HashMap for (incomingConcreteEdge : IncomingRelations.get(object)) { val IncomingRelation e = new IncomingRelation( previousNodeRepresentations.get(incomingConcreteEdge.from), incomingConcreteEdge.type) if (res.containsKey(e)) { - res.put(e, addOne(res.get(e),parallel)) + res.put(e, addOne(res.get(e), parallel)) } else { res.put(e, 1) } } return res } - - private def calcuateOutgoingEdges(Map>> OutgoingRelations, - DefinedElement object, Map previousNodeRepresentations, int parallel) - { - val Map,Integer> res= new HashMap - for(outgoingConcreteEdge : OutgoingRelations.get(object)) { - val OutgoingRelation e = - new OutgoingRelation( - previousNodeRepresentations.get(outgoingConcreteEdge.to), - outgoingConcreteEdge.type) - if(res.containsKey(e)) { - res.put(e,addOne(res.get(e),parallel)) + + private def calcuateOutgoingEdges(Map>> OutgoingRelations, + DefinedElement object, Map previousNodeRepresentations, + int parallel) { + val Map, Integer> res = new HashMap + for (outgoingConcreteEdge : OutgoingRelations.get(object)) { + val OutgoingRelation e = new OutgoingRelation( + previousNodeRepresentations.get(outgoingConcreteEdge.to), outgoingConcreteEdge.type) + if (res.containsKey(e)) { + res.put(e, addOne(res.get(e), parallel)) } else { - res.put(e,1) + res.put(e, 1) } } return res; } - + /*def private void addOrCreate_Set(Map> map, KEY key, VALUE value) { - var Set s; - if(map.containsKey(key)) { - s = map.get(key); - } else { - s = new HashSet - map.put(key,s) - } - s.add(value) - }*/ - - - private def calculateFurtherNodeDescriptors( - PartialInterpretation model, + * var Set s; + * if(map.containsKey(key)) { + * s = map.get(key); + * } else { + * s = new HashSet + * map.put(key,s) + * } + * s.add(value) + }*/ + private def calculateFurtherNodeDescriptors(PartialInterpretation model, NeighbourhoodWithTraces previous, Map>> IncomingRelations, - Map>> OutgoingRelations, - int parallels, int maxNumber) - { + Map>> OutgoingRelations, int parallels, int maxNumber) { val previousNodeRepresentations = previous.nodeRepresentations - val node2Representation = new HashMap> - val Map,Integer> descriptor2Number = - if(this.mergeSimilarNeighbourhood){ new HashMap } else { null } - val Map,FurtherNodeDescriptor> uniqueDescription = - if(this.mergeSimilarNeighbourhood){ new HashMap } else { null } - - for(object: model.elements) { - val incomingEdges = this.calculateIncomingEdges(IncomingRelations, object, previousNodeRepresentations,parallels) - val outgoingEdges = this.calcuateOutgoingEdges(OutgoingRelations,object, previousNodeRepresentations,parallels) - + val node2Representation = new HashMap> + val Map, Integer> descriptor2Number = if (this. + mergeSimilarNeighbourhood) { + new HashMap + } else { + null + } + val Map, FurtherNodeDescriptor> uniqueDescription = if (this. + mergeSimilarNeighbourhood) { + new HashMap + } else { + null + } + + for (object : model.elements) { + val incomingEdges = this.calculateIncomingEdges(IncomingRelations, object, previousNodeRepresentations, + parallels) + val outgoingEdges = this.calcuateOutgoingEdges(OutgoingRelations, object, previousNodeRepresentations, + parallels) + val previousType = previousNodeRepresentations.get(object) - - if(previousType === null) { + + if (previousType === null) { println("Error in state coder") } - - val nodeDescriptor = new FurtherNodeDescriptor( - previousType, - incomingEdges, - outgoingEdges) - - if(this.mergeSimilarNeighbourhood) { - if(descriptor2Number.containsKey(nodeDescriptor)) { + + val nodeDescriptor = new FurtherNodeDescriptor(previousType, incomingEdges, outgoingEdges) + + if (this.mergeSimilarNeighbourhood) { + if (descriptor2Number.containsKey(nodeDescriptor)) { descriptor2Number.put( nodeDescriptor, - addOne(descriptor2Number.get(nodeDescriptor),maxNumber) + addOne(descriptor2Number.get(nodeDescriptor), maxNumber) ) - node2Representation.put(object,uniqueDescription.get(nodeDescriptor)) + node2Representation.put(object, uniqueDescription.get(nodeDescriptor)) } else { - descriptor2Number.put(nodeDescriptor,if(1>maxNumber){Integer.MAX_VALUE}else{1}) - uniqueDescription.put(nodeDescriptor,nodeDescriptor) - node2Representation.put(object,nodeDescriptor) + descriptor2Number.put(nodeDescriptor, if (1 > maxNumber) { + Integer.MAX_VALUE + } else { + 1 + }) + uniqueDescription.put(nodeDescriptor, nodeDescriptor) + node2Representation.put(object, nodeDescriptor) } } else { - node2Representation.put(object,nodeDescriptor) + node2Representation.put(object, nodeDescriptor) } } - + return descriptor2Number -> node2Representation } - - private def calculateLocalNodeDescriptors( - PartialInterpretation model, - Map> types, - int maxNumber) - { + + private def calculateLocalNodeDescriptors(PartialInterpretation model, Map> types, + int maxNumber, DefinedElement focusedElement) { val Map node2Representation = new HashMap - val Map representation2Amount = - if(mergeSimilarNeighbourhood){ new HashMap } else { null } - val Map uniqueRepresentation = - if(this.mergeSimilarNeighbourhood){ new HashMap } else { null } - - for(element : model.elements) { - var newDescriptor = new LocalNodeDescriptor(element.name,element.lookup(types)) - if(this.mergeSimilarNeighbourhood){ - if(uniqueRepresentation.containsKey(newDescriptor)) { + val Map representation2Amount = if (mergeSimilarNeighbourhood) { + new HashMap + } else { + null + } + val Map uniqueRepresentation = if (this.mergeSimilarNeighbourhood) { + new HashMap + } else { + null + } + + for (element : model.elements) { + val name = if(element == focusedElement) FOCUSED_ELEMENT_NAME else element.name + var newDescriptor = new LocalNodeDescriptor(name, element.lookup(types)) + if (this.mergeSimilarNeighbourhood) { + if (uniqueRepresentation.containsKey(newDescriptor)) { newDescriptor = newDescriptor.lookup(uniqueRepresentation) - node2Representation.put(element,newDescriptor) + node2Representation.put(element, newDescriptor) representation2Amount.put( newDescriptor, - addOne(newDescriptor.lookup(representation2Amount),maxNumber) + addOne(newDescriptor.lookup(representation2Amount), maxNumber) ) } else { - uniqueRepresentation.put(newDescriptor,newDescriptor) - node2Representation.put(element,newDescriptor) - representation2Amount.put(newDescriptor, if(1>maxNumber){Integer.MAX_VALUE}else{1}) + uniqueRepresentation.put(newDescriptor, newDescriptor) + node2Representation.put(element, newDescriptor) + representation2Amount.put(newDescriptor, if (1 > maxNumber) { + Integer.MAX_VALUE + } else { + 1 + }) } } else { - node2Representation.put(element,newDescriptor) + node2Representation.put(element, newDescriptor) } } - + return representation2Amount -> node2Representation } -} \ No newline at end of file +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2PairwiseNeighbourhoodRepresentation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2PairwiseNeighbourhoodRepresentation.xtend new file mode 100644 index 00000000..c10457b0 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2PairwiseNeighbourhoodRepresentation.xtend @@ -0,0 +1,68 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood + +import com.google.common.collect.Maps +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import java.util.HashMap +import java.util.Map +import org.eclipse.xtend.lib.annotations.Data +import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor + +@Data +class PairwiseNeighbourhoodRepresentation { + val Map modelRepresentation + val Map basicNodeRepresentations + val Map> pairwiseNodeRepresentations + + def getBasicRepresentation(DefinedElement a) { + basicNodeRepresentations.get(a) + } + + def getPairwiseRepresentation(DefinedElement a, DefinedElement b) { + pairwiseNodeRepresentations.get(a).get(b) + } +} + +@FinalFieldsConstructor +class PartialInterpretation2PairwiseNeighbourhoodRepresentation { + val PartialInterpretation2NeighbourhoodRepresentation, BasicNodeRepresentation> basicNeighbourhoodRepresenter + + def createRepresentation(PartialInterpretation model, NeighbourhoodOptions options) { + val basicRepresentation = basicNeighbourhoodRepresenter.createRepresentation(model, options) + val basicModelRepresentation = basicRepresentation.modelRepresentation + val basicNodeRepresentations = basicRepresentation.nodeRepresentations + val pairwiseNodeRepresentations = Maps.newHashMapWithExpectedSize(basicNodeRepresentations.size) + val modelRepresentation = new HashMap + for (nodeWithBasicRepresentation : basicNodeRepresentations.entrySet) { + val node = nodeWithBasicRepresentation.key + val basicNodeRepresentation = nodeWithBasicRepresentation.value + val count = basicModelRepresentation.get(basicNodeRepresentation) + if (count == 1) { + pairwiseNodeRepresentations.put(node, basicNodeRepresentations) + modelRepresentation.put(basicNodeRepresentation, count) + } else { + val neighbourhoodRepresentation = basicNeighbourhoodRepresenter. + createRepresentationWithFocus(model, options, node) + pairwiseNodeRepresentations.put(node, neighbourhoodRepresentation.nodeRepresentations) + modelRepresentation.compute(neighbourhoodRepresentation.modelRepresentation) [ key, value | + if (value === null) { + if (1 > options.maxNumber) { + Integer.MAX_VALUE + } else { + 1 + } + } else { + addOne(value, options.maxNumber) + } + ] + } + } + new PairwiseNeighbourhoodRepresentation(modelRepresentation, basicNodeRepresentations, + pairwiseNodeRepresentations) + } + + def private addOne(int original, int max) { + if(original == Integer.MAX_VALUE) return Integer.MAX_VALUE + if(original + 1 > max) return Integer.MAX_VALUE else return original + 1 + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/AbstractNeighborhoodBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/AbstractNeighborhoodBasedStateCoderFactory.xtend new file mode 100644 index 00000000..089880b1 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/AbstractNeighborhoodBasedStateCoderFactory.xtend @@ -0,0 +1,137 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder + +import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.NeighbourhoodOptions +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage +import java.util.LinkedList +import java.util.List +import org.eclipse.emf.common.notify.Notifier +import org.eclipse.emf.ecore.EClass +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.ecore.EStructuralFeature +import org.eclipse.viatra.dse.statecode.IStateCoder +import org.eclipse.viatra.dse.statecode.IStateCoderFactory +import org.eclipse.viatra.query.runtime.api.IPatternMatch +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine +import org.eclipse.viatra.query.runtime.base.api.FeatureListener +import org.eclipse.viatra.query.runtime.base.api.IndexingLevel +import org.eclipse.viatra.query.runtime.base.api.InstanceListener +import org.eclipse.viatra.query.runtime.emf.EMFBaseIndexWrapper +import org.eclipse.viatra.query.runtime.emf.EMFScope +import org.eclipse.xtend.lib.annotations.Accessors + +abstract class AbstractNeighbourhoodBasedStateCoderFactory implements IStateCoderFactory { + val List statecoders = new LinkedList + + val NeighbourhoodOptions options + + protected new() { + this(NeighbourhoodOptions.DEFAULT) + } + + protected new(NeighbourhoodOptions options) { + this.options = options + } + + synchronized override createStateCoder() { + val res = doCreateStateCoder(options) + statecoders += res + return res + } + + protected def AbstractNeighbourhoodBasedPartialInterpretationStateCoder doCreateStateCoder( + NeighbourhoodOptions options) + + def getSumStatecoderRuntime() { + statecoders.map[statecoderRuntime].reduce[p1, p2|p1 + p2] + } +} + +abstract class AbstractNeighbourhoodBasedPartialInterpretationStateCoder implements IStateCoder { + val NeighbourhoodOptions options + + var PartialInterpretation target + + protected new(NeighbourhoodOptions options) { + this.options = options + } + + @Accessors(PUBLIC_GETTER) var long statecoderRuntime = 0 + + synchronized private def refreshStateCodes() { + if (refreshNeeded) { + val startTime = System.nanoTime + doRefreshStateCodes(target, options) + statecoderRuntime += (System.nanoTime - startTime) + } + } + + protected def boolean isRefreshNeeded() + + protected def void doRefreshStateCodes(PartialInterpretation target, NeighbourhoodOptions options) + + synchronized override createActivationCode(IPatternMatch match) { + refreshStateCodes + val startTime = System.nanoTime + val code = doCreateActivationCode(match) + statecoderRuntime += (System.nanoTime - startTime) + code + } + + protected def Object doCreateActivationCode(IPatternMatch match) + + synchronized override createStateCode() { + refreshStateCodes + doCreateStateCode + } + + protected def Object doCreateStateCode() + + override init(Notifier notifier) { + this.target = notifier as PartialInterpretation + val queryEngine = ViatraQueryEngine.on(new EMFScope(notifier)) + val baseIndex = queryEngine.getBaseIndex() as EMFBaseIndexWrapper + val navigationHelper = baseIndex.getNavigationHelper(); + + val classes = PartialinterpretationPackage.eINSTANCE.EClassifiers.filter(EClass).toSet + val features = classes.map[it.EAllStructuralFeatures].flatten.toSet + navigationHelper.registerObservedTypes(classes, null, features, IndexingLevel.FULL); + + navigationHelper.addFeatureListener(features, new FeatureListener() { + override void featureInserted(EObject host, EStructuralFeature feature, Object value) { invalidate } + + override void featureDeleted(EObject host, EStructuralFeature feature, Object value) { invalidate } + }) + navigationHelper.addInstanceListener(classes, new InstanceListener() { + override void instanceInserted(EClass clazz, EObject instance) { invalidate } + + override void instanceDeleted(EClass clazz, EObject instance) { invalidate } + }) + } + + synchronized def invalidate() { + doInvalidate + } + + protected def void doInvalidate() + + def protected getFallbackCode(Object o) { + switch (o) { + PartialInterpretation, + LogicProblem: + null + PartialRelationInterpretation: + o.interpretationOf.name + PartialPrimitiveInterpretation: + o.class.simpleName.hashCode + PartialComplexTypeInterpretation: + o.interpretationOf.name.hashCode + default: + throw new UnsupportedOperationException('''Unsupported type: «o.class.simpleName»''') + } + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend index f55a501a..c7b8ee37 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/IdentifierBasedStateCoderFactory.xtend @@ -62,13 +62,13 @@ class IdentifierBasedStateCode { int numberOfNewElement SortedSet relationStatecoders - private static val comparator = new Comparator() { + static val comparator = new Comparator() { override compare(RelationStatecoder o1, RelationStatecoder o2) { o1.relationName.compareTo(o2.relationName) } } - public new(int numberOfNewElements) { + new(int numberOfNewElements) { this.numberOfNewElement = numberOfNewElements this.relationStatecoders = new TreeSet(comparator) } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend index a86bcd1f..4ff39999 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/NeighbourhoodBasedStateCoderFactory.xtend @@ -1,223 +1,86 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.AbstractNodeDescriptor +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.NeighbourhoodOptions import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage import java.util.ArrayList -import java.util.LinkedList -import java.util.List import java.util.Map -import org.eclipse.emf.common.notify.Notifier -import org.eclipse.emf.ecore.EClass -import org.eclipse.emf.ecore.EObject -import org.eclipse.emf.ecore.EStructuralFeature -import org.eclipse.viatra.dse.statecode.IStateCoder -import org.eclipse.viatra.dse.statecode.IStateCoderFactory import org.eclipse.viatra.query.runtime.api.IPatternMatch -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine -import org.eclipse.viatra.query.runtime.base.api.FeatureListener -import org.eclipse.viatra.query.runtime.base.api.IndexingLevel -import org.eclipse.viatra.query.runtime.base.api.InstanceListener -import org.eclipse.viatra.query.runtime.emf.EMFBaseIndexWrapper -import org.eclipse.viatra.query.runtime.emf.EMFScope -import org.eclipse.xtend.lib.annotations.Accessors -import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement -import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRelationInterpretation -import java.util.Set -import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration -import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2NeighbourhoodRepresentation -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation - -class NeighbourhoodBasedStateCoderFactory implements IStateCoderFactory { - val List statecoders = new LinkedList - - val int range - val int parallels - val int maxNumber - val Set relevantTypes - val Set relevantRelations - - public new() { - this.range = PartialInterpretation2NeighbourhoodRepresentation::GraphWidthRange - this.parallels = PartialInterpretation2NeighbourhoodRepresentation::FullParallels - this.maxNumber = PartialInterpretation2NeighbourhoodRepresentation::MaxNumbers - this.relevantTypes = null - this.relevantRelations = null + +class NeighbourhoodBasedStateCoderFactory extends AbstractNeighbourhoodBasedStateCoderFactory { + new() { } - - public new(int range, int parallels, int maxNumber, Set relevantTypes, Set relevantRelations) { - this.range = range - this.parallels = parallels - this.maxNumber = maxNumber - this.relevantTypes = relevantTypes - this.relevantRelations = relevantRelations + + new(NeighbourhoodOptions options) { + super(options) + } + + override protected doCreateStateCoder(NeighbourhoodOptions options) { + new NeighbourhoodBasedPartialInterpretationStateCoder(options) } - - synchronized override createStateCoder() { - val res = new NeighbourhoodBasedPartialInterpretationStateCoder(statecoders.size, - range,parallels,maxNumber,relevantTypes,relevantRelations) - statecoders += res - return res - } - def getSumStatecoderRuntime() { - statecoders.map[statecoderRuntime].reduce[p1, p2|p1+p2] - } + } -class NeighbourhoodBasedPartialInterpretationStateCoder implements IStateCoder{ - val int id; - val int range - val int parallels - val int maxNumber - val Set relevantTypes - val Set relevantRelations - - val calculator = - new PartialInterpretation2ImmutableTypeLattice - var PartialInterpretation target - - private var Map nodeRepresentations = null - private var Map modelRepresentation = null - - /*public new(int id) { - this.id = id - this.range = PartialInterpretation2NeighbourhoodRepresentation::FixPointRage - this.parallels = PartialInterpretation2NeighbourhoodRepresentation::FullParallels - this.maxNumber = maxNumber = PartialInterpretation2NeighbourhoodRepresentation::MaxNumbers - this.relevantTypes = relevantTypes - this.relevantRelations = relevantRelations - }*/ - - public new(int id, int range, int parallels, int maxNumber, Set relevantTypes, Set relevantRelations) { - this.id = id - this.range = range - this.parallels = parallels - this.maxNumber = maxNumber - this.relevantTypes = relevantTypes - this.relevantRelations = relevantRelations +class NeighbourhoodBasedPartialInterpretationStateCoder extends AbstractNeighbourhoodBasedPartialInterpretationStateCoder { + val calculator = new PartialInterpretation2ImmutableTypeLattice + + var Map nodeRepresentations = null + var Map modelRepresentation = null + + new(NeighbourhoodOptions options) { + super(options) } - - @Accessors(PUBLIC_GETTER) var long statecoderRuntime = 0 - -// val range = -1 -// val par = Integer.MAX_VALUE - //val deeprepresentation = false - - ///////// - // Caching version - ///////// - synchronized private def refreshStateCodes() { - if(this.nodeRepresentations === null || this.modelRepresentation === null) { - val startTime = System.nanoTime - //relevantObjects.forEach[println(it)] - val code = calculator.createRepresentation(target,range,parallels,maxNumber,relevantTypes,relevantRelations) - this.modelRepresentation = code.modelRepresentation - this.nodeRepresentations = code.nodeRepresentations - statecoderRuntime += (System.nanoTime - startTime) - } - } - synchronized override createActivationCode(IPatternMatch match) { - refreshStateCodes - - val startTime = System.nanoTime - val size = match.specification.parameters.size - val res = new ArrayList(size) - var int index = 0 - var int equivalenceHash = 0 - val prime = 31 - - while(index < size) { - res.add(getCode(match.get(index))) - index++ - for(var i = 0; i(res->equivalenceHash).hashCode - } - - - def private getCode(Object o) { - if(o instanceof DefinedElement) { - this.nodeRepresentations.get(o) - } else if(o instanceof PartialInterpretation || o instanceof LogicProblem) { - return null - } else if(o instanceof PartialRelationInterpretation) { - return o.interpretationOf.name - } else if(o instanceof PartialTypeInterpratation) { - if(o instanceof PartialPrimitiveInterpretation) { - o.class.simpleName.hashCode - } else if (o instanceof PartialComplexTypeInterpretation){ - return o.interpretationOf.name.hashCode - } else { - throw new UnsupportedOperationException('''Unsupported type: «o.class.simpleName»''') + + override protected isRefreshNeeded() { + nodeRepresentations === null || modelRepresentation === null + } + + override doRefreshStateCodes(PartialInterpretation target, NeighbourhoodOptions options) { + val code = calculator.createRepresentation(target, options) + modelRepresentation = code.modelRepresentation + nodeRepresentations = code.nodeRepresentations + } + + override doCreateActivationCode(IPatternMatch match) { + val size = match.specification.parameters.size + val res = new ArrayList(size) + var int index = 0 + var int equivalenceHash = 0 + val prime = 31 + + while (index < size) { + res.add(getCode(match.get(index))) + index++ + for (var i = 0; i < index; i++) { + val number = if (match.get(index) === match.get(i)) { + 1 + } else { + 0 + } + equivalenceHash = prime * equivalenceHash + number } - } else { - throw new UnsupportedOperationException('''Unsupported type: «o.class.simpleName»''') } - } - - synchronized override createStateCode() { - refreshStateCodes - return this.modelRepresentation.hashCode - } - ///////// - // Caching version - ///////// - - ///////// - // Recalculating version - ///////// -// synchronized override createActivationCode(IPatternMatch match) { -// val nodes = calculator.createRepresentation(getRelevantObjects().toList,range,par).nodeRepresentations -// val res = match.toArray.map[objectInMatch | -// nodes.get(objectInMatch) -// ] -// return res -// } -// -// override createStateCode() { -// return this.calculator.createRepresentation(getRelevantObjects().toList,range,par).modelRepresentation -// } - ///////// - // Recalculating version - ///////// - - override init(Notifier notifier) { - this.target = notifier as PartialInterpretation - val queryEngine = ViatraQueryEngine.on(new EMFScope(notifier)) - val baseIndex = queryEngine.getBaseIndex() as EMFBaseIndexWrapper - val navigationHelper = baseIndex.getNavigationHelper(); - - val classes = PartialinterpretationPackage.eINSTANCE.EClassifiers.filter(EClass).toSet - val features = classes.map[it.EAllStructuralFeatures].flatten.toSet - navigationHelper.registerObservedTypes( - classes, - null, - features, - IndexingLevel.FULL); - - - navigationHelper.addFeatureListener(features, new FeatureListener() { - override public void featureInserted(EObject host, EStructuralFeature feature, Object value) { invalidate } - override public void featureDeleted(EObject host, EStructuralFeature feature, Object value) { invalidate } - }); - navigationHelper.addInstanceListener(classes, new InstanceListener() { - override public void instanceInserted(EClass clazz, EObject instance) { invalidate } - override public void instanceDeleted(EClass clazz, EObject instance) { invalidate } - }); - } - - synchronized def public invalidate() { - this.nodeRepresentations = null - this.modelRepresentation = null + + match.specification.fullyQualifiedName -> (res -> equivalenceHash).hashCode + } + + def private getCode(Object o) { + switch (o) { + DefinedElement: + nodeRepresentations.get(o) + default: + getFallbackCode(o) + } + } + + override doCreateStateCode() { + modelRepresentation.hashCode + } + + override doInvalidate() { + nodeRepresentations = null + modelRepresentation = null } } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/PairwiseNeighbourhoodBasedStateCoderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/PairwiseNeighbourhoodBasedStateCoderFactory.xtend new file mode 100644 index 00000000..84e798f2 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/statecoder/PairwiseNeighbourhoodBasedStateCoderFactory.xtend @@ -0,0 +1,75 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder + +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.AbstractNodeDescriptor +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.NeighbourhoodOptions +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PairwiseNeighbourhoodRepresentation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2ImmutableTypeLattice +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.neighbourhood.PartialInterpretation2PairwiseNeighbourhoodRepresentation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import java.util.ArrayList +import org.eclipse.viatra.query.runtime.api.IPatternMatch + +class PairwiseNeighbourhoodBasedStateCoderFactory extends AbstractNeighbourhoodBasedStateCoderFactory { + new() { + } + + new(NeighbourhoodOptions options) { + super(options) + } + + override protected doCreateStateCoder(NeighbourhoodOptions options) { + new PairwiseNeighbourhoodBasedPartialInterpretationStateCoder(options) + } +} + +class PairwiseNeighbourhoodBasedPartialInterpretationStateCoder extends AbstractNeighbourhoodBasedPartialInterpretationStateCoder { + val calculator = new PartialInterpretation2PairwiseNeighbourhoodRepresentation( + new PartialInterpretation2ImmutableTypeLattice) + var PairwiseNeighbourhoodRepresentation representation + + new(NeighbourhoodOptions options) { + super(options) + } + + override protected isRefreshNeeded() { + representation === null + } + + override protected doRefreshStateCodes(PartialInterpretation target, NeighbourhoodOptions options) { + representation = calculator.createRepresentation(target, options) + } + + override protected doCreateActivationCode(IPatternMatch match) { + val size = match.specification.parameters.size + val res = new ArrayList(size * size) + for (var int i = 0; i < size; i++) { + val a = match.get(i) + for (var int j = 0; j < size; j++) { + val b = match.get(j) + res.add(getPairwiseRepresentation(a, b)) + } + } + match.specification.fullyQualifiedName -> res.hashCode + } + + private def getPairwiseRepresentation(Object a, Object b) { + if (b instanceof DefinedElement) { + if (a instanceof DefinedElement) { + representation.getPairwiseRepresentation(a, b) + } else { + representation.getBasicRepresentation(b) + } + } else { + getFallbackCode(b) + } + } + + override protected doCreateStateCode() { + representation.modelRepresentation.hashCode + } + + override protected doInvalidate() { + representation = null + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend index edcca676..701eb054 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend @@ -16,8 +16,9 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ScopePropagator import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.PartialInterpretationInitialiser import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.AbstractNeighbourhoodBasedStateCoderFactory import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.IdentifierBasedStateCoderFactory -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.NeighbourhoodBasedStateCoderFactory +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.PairwiseNeighbourhoodBasedStateCoderFactory import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.BestFirstStrategyForModelGeneration import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.DiversityChecker import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.LoggerSolutionFoundHandler @@ -49,7 +50,7 @@ class ViatraReasoner extends LogicReasoner { ReasonerWorkspace workspace) throws LogicReasonerException { val viatraConfig = configuration.asConfig - if (viatraConfig.debugConfiguration.logging) { + if (viatraConfig.documentationLevel == DocumentationLevel.FULL) { DesignSpaceExplorer.turnOnLogging(DseLoggingLevel.VERBOSE_FULL) } else { DesignSpaceExplorer.turnOnLogging(DseLoggingLevel.WARN) @@ -139,7 +140,7 @@ class ViatraReasoner extends LogicReasoner { dse.setInitialModel(emptySolution, false) val IStateCoderFactory statecoder = if (viatraConfig.stateCoderStrategy == StateCoderStrategy.Neighbourhood) { - new NeighbourhoodBasedStateCoderFactory + new PairwiseNeighbourhoodBasedStateCoderFactory } else { new IdentifierBasedStateCoderFactory } @@ -239,7 +240,7 @@ class ViatraReasoner extends LogicReasoner { } } - private def dispatch long runtime(NeighbourhoodBasedStateCoderFactory sc) { + private def dispatch long runtime(AbstractNeighbourhoodBasedStateCoderFactory sc) { sc.sumStatecoderRuntime } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend index e6aee20c..99decdd9 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend @@ -64,8 +64,7 @@ class DiversityDescriptor { } class DebugConfiguration { - public var logging = false - public var PartialInterpretationVisualiser partialInterpretatioVisualiser = null; + public var PartialInterpretationVisualiser partialInterpretatioVisualiser = null public var partalInterpretationVisualisationFrequency = 1 } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java index 077fea21..144e7484 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java @@ -20,8 +20,8 @@ import java.util.List; import java.util.PriorityQueue; import java.util.Random; -import org.apache.log4j.Level; import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.viatra.dse.api.strategy.interfaces.IStrategy; import org.eclipse.viatra.dse.base.ThreadContext; @@ -254,6 +254,7 @@ public class BestFirstStrategyForModelGeneration implements IStrategy { activationIds = new ArrayList(context.getUntraversedActivationIds()); Collections.shuffle(activationIds); } catch (NullPointerException e) { + logger.warn("Unexpected state code: " + context.getDesignSpaceManager().getCurrentState()); numberOfStatecoderFail++; activationIds = Collections.emptyList(); } @@ -295,7 +296,10 @@ public class BestFirstStrategyForModelGeneration implements IStrategy { int id = ++numberOfPrintedModel; if (id % configuration.debugConfiguration.partalInterpretationVisualisationFrequency == 0) { PartialInterpretationVisualisation visualisation = partialInterpretatioVisualiser.visualiseConcretization(p); - visualisation.writeToFile(workspace, String.format("state%09d.png", id)); + logger.debug("Visualizing state: " + id + " (" + context.getDesignSpaceManager().getCurrentState() + ")"); + String name = String.format("state%09d", id); + visualisation.writeToFile(workspace, name + ".png"); + workspace.writeModel((EObject) context.getModel(), name + ".xmi"); } } } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/AbstractThreeValuedObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/AbstractThreeValuedObjective.xtend index 241bef2a..cd911ab5 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/AbstractThreeValuedObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/AbstractThreeValuedObjective.xtend @@ -1,60 +1,10 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization -import java.util.Comparator import org.eclipse.viatra.dse.base.ThreadContext -import org.eclipse.xtend.lib.annotations.Accessors -import org.eclipse.xtend.lib.annotations.Data - -abstract class ObjectiveThreshold { - public static val NO_THRESHOLD = new hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveThreshold { - override isHard() { - false - } - - override satisfiesThreshold(double cost, Comparator comparator) { - true - } - } - - private new() { - } - - def boolean isHard() { - true - } - - def boolean satisfiesThreshold(double cost, Comparator comparator) - - @Data - static class Exclusive extends ObjectiveThreshold { - val double threshold - - override satisfiesThreshold(double cost, Comparator comparator) { - comparator.compare(threshold, cost) > 0 - } - } - - @Data - static class Inclusive extends ObjectiveThreshold { - val double threshold - - override satisfiesThreshold(double cost, Comparator comparator) { - comparator.compare(threshold, cost) >= 0 - } - } -} - -abstract class AbstractThreeValuedObjective implements IThreeValuedObjective { - @Accessors val String name - @Accessors ObjectiveKind kind - @Accessors ObjectiveThreshold threshold - @Accessors int level +abstract class AbstractThreeValuedObjective extends DirectionalThresholdObjective implements IThreeValuedObjective { protected new(String name, ObjectiveKind kind, ObjectiveThreshold threshold, int level) { - this.name = name - this.kind = kind - this.threshold = threshold - this.level = level + super(name, kind, threshold, level) } abstract def double getLowestPossibleFitness(ThreadContext threadContext) @@ -82,21 +32,4 @@ abstract class AbstractThreeValuedObjective implements IThreeValuedObjective { throw new IllegalStateException("Unknown three valued objective kind: " + kind) } } - - override isHardObjective() { - threshold.hard - } - - override satisifiesHardObjective(Double fitness) { - threshold.satisfiesThreshold(fitness, comparator) - } - - override getComparator() { - kind.comparator - } - - override setComparator(Comparator comparator) { - kind = ObjectiveKind.fromComparator(comparator) - } - } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CompositeDirectionalThresholdObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CompositeDirectionalThresholdObjective.xtend new file mode 100644 index 00000000..0aa442f5 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CompositeDirectionalThresholdObjective.xtend @@ -0,0 +1,62 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization + +import com.google.common.collect.ImmutableList +import java.util.Collection +import org.eclipse.viatra.dse.base.ThreadContext + +class CompositeDirectionalThresholdObjective extends DirectionalThresholdObjective { + val Collection objectives + + new(String name, Collection objectives) { + this(name, objectives, getKind(objectives), getThreshold(objectives), getLevel(objectives)) + } + + new(String name, DirectionalThresholdObjective... objectives) { + this(name, objectives as Collection) + } + + protected new(String name, Iterable objectives, ObjectiveKind kind, + ObjectiveThreshold threshold, int level) { + super(name, kind, threshold, level) + this.objectives = ImmutableList.copyOf(objectives) + } + + override createNew() { + new CompositeDirectionalThresholdObjective(name, objectives.map[createNew as DirectionalThresholdObjective], + kind, threshold, level) + } + + override init(ThreadContext context) { + for (objective : objectives) { + objective.init(context) + } + } + + override protected getRawFitness(ThreadContext context) { + var double fitness = 0 + for (objective : objectives) { + fitness += objective.getFitness(context) + } + fitness + } + + private static def getKind(Collection objectives) { + val kinds = objectives.map[kind].toSet + if (kinds.size != 1) { + throw new IllegalArgumentException("Passed objectives must have the same kind") + } + kinds.head + } + + private static def getThreshold(Collection objectives) { + objectives.map[threshold].reduce[a, b|a.merge(b)] + } + + private static def int getLevel(Collection objectives) { + val levels = objectives.map[level].toSet + if (levels.size != 1) { + throw new IllegalArgumentException("Passed objectives must have the same level") + } + levels.head + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/DirectionalThresholdObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/DirectionalThresholdObjective.xtend new file mode 100644 index 00000000..376e3d1a --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/DirectionalThresholdObjective.xtend @@ -0,0 +1,164 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization + +import java.util.Comparator +import org.eclipse.viatra.dse.base.ThreadContext +import org.eclipse.viatra.dse.objectives.IObjective +import org.eclipse.xtend.lib.annotations.Accessors +import org.eclipse.xtend.lib.annotations.Data +import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor + +abstract class ObjectiveThreshold { + public static val NO_THRESHOLD = new ObjectiveThreshold { + override isHard() { + false + } + + override satisfiesThreshold(double cost, Comparator comparator) { + true + } + + override protected postProcessSatisfactoryCost(double cost, ObjectiveKind kind) { + cost + } + + override ObjectiveThreshold merge(ObjectiveThreshold other) { + if (other == NO_THRESHOLD) { + NO_THRESHOLD + } else { + throw new IllegalArgumentException("Merged thresholds must have the same type") + } + } + } + + private new() { + } + + def boolean isHard() { + true + } + + def boolean satisfiesThreshold(double cost, ObjectiveKind kind) { + satisfiesThreshold(cost, kind.comparator) + } + + def boolean satisfiesThreshold(double cost, Comparator comparator) + + def double postProcessCost(double cost, ObjectiveKind kind) { + if (satisfiesThreshold(cost, kind)) { + postProcessSatisfactoryCost(cost, kind) + } else { + cost + } + } + + protected def double postProcessSatisfactoryCost(double cost, ObjectiveKind kind) + + def ObjectiveThreshold merge(ObjectiveThreshold other) + + @Data + static class Exclusive extends ObjectiveThreshold { + static val EPSILON = 0.1 + + val double threshold + val boolean clampToThreshold + + @FinalFieldsConstructor + new() { + } + + new(double threshold) { + this(threshold, true) + } + + override satisfiesThreshold(double cost, Comparator comparator) { + comparator.compare(threshold, cost) < 0 + } + + override protected postProcessSatisfactoryCost(double cost, ObjectiveKind kind) { + if (clampToThreshold) { + threshold + Math.signum(kind.satisfiedValue) * EPSILON + } else { + cost + } + } + + override ObjectiveThreshold merge(ObjectiveThreshold other) { + if (other instanceof Exclusive) { + new Exclusive(threshold + other.threshold) + } else { + throw new IllegalArgumentException("Merged thresholds must have the same type") + } + } + } + + @Data + static class Inclusive extends ObjectiveThreshold { + val double threshold + val boolean clampToThreshold + + @FinalFieldsConstructor + new() { + } + + new(double threshold) { + this(threshold, true) + } + + override satisfiesThreshold(double cost, Comparator comparator) { + comparator.compare(threshold, cost) <= 0 + } + + override protected postProcessSatisfactoryCost(double cost, ObjectiveKind kind) { + if (clampToThreshold) { + threshold + } else { + cost + } + } + + override ObjectiveThreshold merge(ObjectiveThreshold other) { + if (other instanceof Inclusive) { + new Inclusive(threshold + other.threshold) + } else { + throw new IllegalArgumentException("Merged thresholds must have the same type") + } + } + } +} + +abstract class DirectionalThresholdObjective implements IObjective { + @Accessors val String name + @Accessors ObjectiveKind kind + @Accessors ObjectiveThreshold threshold + @Accessors int level + + protected new(String name, ObjectiveKind kind, ObjectiveThreshold threshold, int level) { + this.name = name + this.kind = kind + this.threshold = threshold + this.level = level + } + + override isHardObjective() { + threshold.hard + } + + override satisifiesHardObjective(Double fitness) { + threshold.satisfiesThreshold(fitness, comparator) + } + + override getComparator() { + kind.comparator + } + + override setComparator(Comparator comparator) { + kind = ObjectiveKind.fromComparator(comparator) + } + + override getFitness(ThreadContext context) { + val fitness = getRawFitness(context) + threshold.postProcessCost(fitness, kind) + } + + protected def double getRawFitness(ThreadContext context) +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/MatchCostObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/MatchCostObjective.xtend new file mode 100644 index 00000000..a0c6a2c1 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/MatchCostObjective.xtend @@ -0,0 +1,52 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization + +import com.google.common.collect.ImmutableList +import java.util.Collection +import org.eclipse.viatra.dse.base.ThreadContext +import org.eclipse.viatra.query.runtime.api.IPatternMatch +import org.eclipse.viatra.query.runtime.api.IQuerySpecification +import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher +import org.eclipse.xtend.lib.annotations.Data + +@Data +class MatchCostElement { + val IQuerySpecification> querySpecification + val double weight +} + +class MatchCostObjective extends DirectionalThresholdObjective { + val Collection costElements + Collection matchers + + new(String name, Collection costElements, ObjectiveKind kind, ObjectiveThreshold threshold, + int level) { + super(name, kind, threshold, level) + this.costElements = costElements + } + + override createNew() { + new MatchCostObjective(name, costElements, kind, threshold, level) + } + + override init(ThreadContext context) { + val queryEngine = context.queryEngine + matchers = ImmutableList.copyOf(costElements.map [ + val matcher = querySpecification.getMatcher(queryEngine) + new CostElementMatcher(matcher, weight) + ]) + } + + override protected getRawFitness(ThreadContext context) { + var double cost = 0 + for (it : matchers) { + cost += weight * matcher.countMatches + } + cost + } + + @Data + private static class CostElementMatcher { + val ViatraQueryMatcher matcher + val double weight + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ObjectiveKind.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ObjectiveKind.java index f65428fe..cbbaaafd 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ObjectiveKind.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ObjectiveKind.java @@ -12,6 +12,16 @@ public enum ObjectiveKind { return Comparators.LOWER_IS_BETTER; } + @Override + public double getInvalidValue() { + return Double.POSITIVE_INFINITY; + } + + @Override + public double getSatisfiedValue() { + return Double.NEGATIVE_INFINITY; + } + }, HIGHER_IS_BETTER { @@ -20,10 +30,24 @@ public enum ObjectiveKind { return Comparators.HIGHER_IS_BETTER; } + @Override + public double getInvalidValue() { + return Double.NEGATIVE_INFINITY; + } + + @Override + public double getSatisfiedValue() { + return Double.POSITIVE_INFINITY; + } + }; public abstract Comparator getComparator(); + public abstract double getInvalidValue(); + + public abstract double getSatisfiedValue(); + public static ObjectiveKind fromComparator(Comparator comparator) { if (Comparators.LOWER_IS_BETTER.equals(comparator)) { return ObjectiveKind.LOWER_IS_BETTER; diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/QueryBasedObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/QueryBasedObjective.xtend new file mode 100644 index 00000000..d355f5be --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/QueryBasedObjective.xtend @@ -0,0 +1,48 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization + +import org.eclipse.viatra.dse.base.ThreadContext +import org.eclipse.viatra.query.runtime.api.IPatternMatch +import org.eclipse.viatra.query.runtime.api.IQuerySpecification +import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher + +class QueryBasedObjective extends DirectionalThresholdObjective { + val IQuerySpecification> querySpecification + ViatraQueryMatcher matcher + + new(IQuerySpecification> querySpecification, + ObjectiveKind kind, ObjectiveThreshold threshold, int level) { + super(querySpecification.simpleName + " objective", kind, threshold, level) + if (querySpecification.parameters.size != 1) { + throw new IllegalArgumentException("Objective query must have a single parameter") + } + this.querySpecification = querySpecification + } + + override createNew() { + new QueryBasedObjective(querySpecification, kind, threshold, level) + } + + override init(ThreadContext context) { + matcher = querySpecification.getMatcher(context.queryEngine) + } + + override protected getRawFitness(ThreadContext context) { + val iterator = matcher.allMatches.iterator + if (!iterator.hasNext) { + return invalidValue + } + val value = iterator.next.get(0) + if (iterator.hasNext) { + throw new IllegalStateException("Multiple matches for objective query") + } + if (value instanceof Number) { + value.doubleValue + } else { + throw new IllegalStateException("Objective value is not an instance of Number") + } + } + + private def getInvalidValue() { + kind.invalidValue + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend index e2585c83..0a6fd55b 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend @@ -42,7 +42,7 @@ class ThreeValuedCostObjective extends AbstractThreeValuedObjective { ]) } - override getFitness(ThreadContext context) { + override getRawFitness(ThreadContext context) { var int cost = 0 for (matcher : matchers) { cost += matcher.weight * matcher.currentMatcher.countMatches -- cgit v1.2.3-54-g00ecf From f06427cd7375551582461f91b3458339a8227f9b Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Mon, 2 Nov 2020 02:02:40 +0100 Subject: Optimizing generator with linear objective functions --- .../.ApplicationConfigurationIdeModule.xtendbin | Bin 1700 -> 1700 bytes .../ide/.ApplicationConfigurationIdeSetup.xtendbin | Bin 2525 -> 2525 bytes .../.SolverSemanticHighlightCalculator.xtendbin | Bin 5333 -> 5333 bytes .../.SolverSemanticTextAttributeProvider.xtendbin | Bin 4902 -> 4902 bytes .../solver/language/ui/syntaxcoloring/.gitignore | 4 + .../validation/.SolverLanguageValidator.xtendbin | Bin 1716 -> 1716 bytes .../viatra/solver/language/validation/.gitignore | 2 + ....SolverLanguageTokenDefInjectingParser.xtendbin | Bin 2741 -> 2741 bytes .../viatra/solver/language/parser/antlr/.gitignore | 2 + ...nguageSyntheticTokenSyntacticSequencer.xtendbin | Bin 2757 -> 2757 bytes .../viatra/solver/language/serializer/.gitignore | 2 + .../META-INF/MANIFEST.MF | 3 +- Domains/ca.mcgill.rtgmrt.example.modes3/plugin.xml | 18 + .../src/modes3/queries/Modes3Queries.vql | 197 ++++- .../src/modes3/run/CloseTrainsObjectiveHint.xtend | 201 +++++ .../src/modes3/run/EndOfSidingObjectiveHint.xtend | 139 ++++ .../run/MisalignedTurnoutObjectiveHint.xtend | 140 ++++ .../src/modes3/run/Modes3ModelGenerator.xtend | 189 ++++- .../modes3/run/TrainLocationsObjectiveHint.xtend | 85 +++ .../vql-gen/modes3/queries/.gitignore | 45 ++ .../vql-gen/modes3/queries/EndOfSiding_step_2.java | 564 ++++++++++++++ .../vql-gen/modes3/queries/EndOfSiding_step_3.java | 717 +++++++++++++++++ .../vql-gen/modes3/queries/EndOfSiding_step_4.java | 847 +++++++++++++++++++++ .../vql-gen/modes3/queries/EndOfSiding_step_5.java | 841 ++++++++++++++++++++ .../vql-gen/modes3/queries/Modes3Queries.java | 198 +++++ .../modes3/queries/MultipleConnectedTo.java | 565 ++++++++++++++ .../modes3/queries/TooManyInputsOfSegment.java | 12 - .../modes3/queries/TrainLocations_step_2.java | 564 ++++++++++++++ .../modes3/queries/TrainLocations_step_3.java | 713 +++++++++++++++++ .../modes3/run/.CloseTrainsObjectiveHint.xtendbin | Bin 0 -> 8218 bytes .../modes3/run/.EndOfSidingObjectiveHint.xtendbin | Bin 0 -> 7190 bytes .../run/.MisalignedTurnoutObjectiveHint.xtendbin | Bin 0 -> 7395 bytes .../modes3/run/.Modes3ModelGenerator.xtendbin | Bin 15038 -> 18637 bytes .../modes3/run/.Modes3TypeScopeHint.xtendbin | Bin 7179 -> 6927 bytes .../run/.Modes3UnitPropagationGenerator.xtendbin | Bin 11735 -> 11284 bytes .../run/.TrainLocationsObjectiveHint.xtendbin | Bin 0 -> 6269 bytes .../xtend-gen/modes3/run/.gitignore | 10 + .../modes3/run/CloseTrainsObjectiveHint.java | 279 +++++++ .../modes3/run/EndOfSidingObjectiveHint.java | 193 +++++ .../modes3/run/MisalignedTurnoutObjectiveHint.java | 195 +++++ .../xtend-gen/modes3/run/Modes3ModelGenerator.java | 305 ++++++-- .../modes3/run/TrainLocationsObjectiveHint.java | 117 +++ .../META-INF/MANIFEST.MF | 1 - .../META-INF/MANIFEST.MF | 3 +- .../ModelGenerationMethodProvider.xtend | 226 ------ .../logic2viatra/ModelGenerationStatistics.xtend | 47 ++ .../logic2viatra/TypeInferenceMethod.xtend | 44 ++ .../ExtendedLinearExpressionBuilderFactory.xtend | 140 ++++ ...ExtendedPolyhedronScopePropagatorStrategy.xtend | 63 ++ .../cardinality/PolyhedronScopePropagator.xtend | 54 +- .../PolyhedronScopePropagatorStrategy.xtend | 92 +++ .../cardinality/PolyhedronSolver.xtend | 13 +- .../META-INF/MANIFEST.MF | 1 + ...odelGenerationMethodBasedGlobalConstraint.xtend | 1 - .../reasoner/ModelGenerationMethodProvider.xtend | 201 +++++ .../viatrasolver/reasoner/ViatraReasoner.xtend | 102 +-- .../reasoner/ViatraReasonerConfiguration.xtend | 4 +- .../dse/BestFirstStrategyForModelGeneration.java | 7 +- .../viatrasolver/reasoner/dse/NumericSolver.xtend | 2 +- .../dse/PartialModelAsLogicInterpretation.xtend | 3 +- .../viatrasolver/reasoner/dse/SolutionCopier.xtend | 8 +- .../reasoner/dse/ViatraReasonerSolutionSaver.xtend | 112 ++- .../optimization/CostElementMatchers.xtend | 137 ++++ .../reasoner/optimization/CostObjectiveHint.xtend | 68 ++ .../optimization/IObjectiveBoundsProvider.xtend | 8 + .../optimization/ThreeValuedCostObjective.xtend | 99 ++- .../ThreeValuedCostObjectiveProvider.xtend | 205 +++++ .../case.study.familyTree.run/bin/.gitignore | 1 + .../bin/queries/.gitignore | 4 + .../src-gen/queries/.gitignore | 4 + .../xtend-gen/converter/.UML2TGF.xtendbin | Bin 6885 -> 6885 bytes .../run/FileSystemInconsistencyDetector.xtend | 4 +- .../mit/inf/dslreasoner/run/MetamodelLoader.xtend | 2 +- .../run/SGraphInconsistencyDetector.xtend | 2 +- 74 files changed, 8297 insertions(+), 508 deletions(-) create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/CloseTrainsObjectiveHint.xtend create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/EndOfSidingObjectiveHint.xtend create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/MisalignedTurnoutObjectiveHint.xtend create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/TrainLocationsObjectiveHint.xtend create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_2.java create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_3.java create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_4.java create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_5.java create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/MultipleConnectedTo.java create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TrainLocations_step_2.java create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TrainLocations_step_3.java create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.CloseTrainsObjectiveHint.xtendbin create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.EndOfSidingObjectiveHint.xtendbin create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.MisalignedTurnoutObjectiveHint.xtendbin create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.TrainLocationsObjectiveHint.xtendbin create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/CloseTrainsObjectiveHint.java create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/EndOfSidingObjectiveHint.java create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/MisalignedTurnoutObjectiveHint.java create mode 100644 Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/TrainLocationsObjectiveHint.java delete mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationStatistics.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/TypeInferenceMethod.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ExtendedLinearExpressionBuilderFactory.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ExtendedPolyhedronScopePropagatorStrategy.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagatorStrategy.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ModelGenerationMethodProvider.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CostElementMatchers.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CostObjectiveHint.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/IObjectiveBoundsProvider.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjectiveProvider.xtend create mode 100644 Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/.gitignore (limited to 'Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend') diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin index e697e27d..81ae9937 100644 Binary files a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin and b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeModule.xtendbin differ diff --git a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin index ddbe1979..10371590 100644 Binary files a/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin and b/Application/hu.bme.mit.inf.dslreasoner.application.ide/xtend-gen/hu/bme/mit/inf/dslreasoner/application/ide/.ApplicationConfigurationIdeSetup.xtendbin differ diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbin b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbin index e1e21292..49fafab3 100644 Binary files a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbin and b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticHighlightCalculator.xtendbin differ diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbin b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbin index b967ea7c..968ecef8 100644 Binary files a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbin and b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.SolverSemanticTextAttributeProvider.xtendbin differ diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.gitignore b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.gitignore index 1764b462..61ce5bef 100644 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.gitignore +++ b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/ui/syntaxcoloring/.gitignore @@ -1,2 +1,6 @@ /.SolverSemanticHighlightCalculator.java._trace /.SolverSemanticTextAttributeProvider.java._trace +/.SolverSemanticHighlightCalculator.xtendbin +/.SolverSemanticTextAttributeProvider.xtendbin +/SolverSemanticHighlightCalculator.java +/SolverSemanticTextAttributeProvider.java diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbin b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbin index 2c271c98..afb2c8de 100644 Binary files a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbin and b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.SolverLanguageValidator.xtendbin differ diff --git a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.gitignore b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.gitignore index f1cb387a..565d4b27 100644 --- a/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.gitignore +++ b/Application/org.eclipse.viatra.solver.language.ui/xtend-gen/org/eclipse/viatra/solver/language/validation/.gitignore @@ -1 +1,3 @@ /.SolverLanguageValidator.java._trace +/.SolverLanguageValidator.xtendbin +/SolverLanguageValidator.java diff --git a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.SolverLanguageTokenDefInjectingParser.xtendbin b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.SolverLanguageTokenDefInjectingParser.xtendbin index 40f87b4c..c1d5cb5e 100644 Binary files a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.SolverLanguageTokenDefInjectingParser.xtendbin and b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.SolverLanguageTokenDefInjectingParser.xtendbin differ diff --git a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.gitignore b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.gitignore index 9cf14147..5fbb81c3 100644 --- a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.gitignore +++ b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/parser/antlr/.gitignore @@ -5,3 +5,5 @@ /.SolverLanguageSyntheticTokenParser.java._trace /.SolverLanguageTokenSource.java._trace /.SolverLanguageTokenDefInjectingParser.java._trace +/.SolverLanguageTokenDefInjectingParser.xtendbin +/SolverLanguageTokenDefInjectingParser.java diff --git a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.SolverLanguageSyntheticTokenSyntacticSequencer.xtendbin b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.SolverLanguageSyntheticTokenSyntacticSequencer.xtendbin index d0715440..7fb5f085 100644 Binary files a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.SolverLanguageSyntheticTokenSyntacticSequencer.xtendbin and b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.SolverLanguageSyntheticTokenSyntacticSequencer.xtendbin differ diff --git a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.gitignore b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.gitignore index b8132d70..1f04090d 100644 --- a/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.gitignore +++ b/Application/org.eclipse.viatra.solver.language/xtend-gen/org/eclipse/viatra/solver/language/serializer/.gitignore @@ -1 +1,3 @@ /.SolverLanguageSyntheticTokenSyntacticSequencer.java._trace +/.SolverLanguageSyntheticTokenSyntacticSequencer.xtendbin +/SolverLanguageSyntheticTokenSyntacticSequencer.java diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/META-INF/MANIFEST.MF b/Domains/ca.mcgill.rtgmrt.example.modes3/META-INF/MANIFEST.MF index 96bd2113..8f900199 100644 --- a/Domains/ca.mcgill.rtgmrt.example.modes3/META-INF/MANIFEST.MF +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/META-INF/MANIFEST.MF @@ -28,7 +28,8 @@ Require-Bundle: org.eclipse.viatra.query.runtime, hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0", org.eclipse.emf.ecore.xmi;bundle-version="2.16.0", hu.bme.mit.inf.dslreasoner.visualisation;bundle-version="1.0.0", - org.eclipse.viatra.query.patternlanguage.emf;bundle-version="2.4.0" + org.eclipse.viatra.query.patternlanguage.emf;bundle-version="2.4.0", + org.eclipse.viatra.dse;bundle-version="0.24.0" Import-Package: org.apache.log4j Automatic-Module-Name: ca.mcgill.rtgmrt.example.modes3 Bundle-ActivationPolicy: lazy diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/plugin.xml b/Domains/ca.mcgill.rtgmrt.example.modes3/plugin.xml index a105a729..f7d32541 100644 --- a/Domains/ca.mcgill.rtgmrt.example.modes3/plugin.xml +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/plugin.xml @@ -21,6 +21,24 @@ + + + + + + + + + + + + + + + + + + diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql index b8841928..d22bdd8b 100644 --- a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql @@ -40,12 +40,6 @@ pattern output(S1 : Segment, S2 : Segment) { find turnoutOutput(S1, S2); } -//@Constraint(message = "noInputOfSegment", severity = "error", key = { S }) -//pattern noInputOfSegment(S : Segment) { -// neg find turnout(S); -// neg find output(_, S); -//} - @Constraint(message = "tooManyInputsOfSegment", severity = "error", key = { S }) pattern tooManyInputsOfSegment(S : SimpleSegment) { find output(I1, S); @@ -108,3 +102,194 @@ pattern reachable(S1 : Segment, S2 : Segment) { pattern unreachable(S1 : Segment, S2 : Segment) { neg find reachable(S1, S2); } + +// +// closeTrains +// + +pattern closeTrains_step_2(in train : Train) { +// frame->t1 = model->trains[i0]; +// frame->start = frame->t1->location; +// if(frame->start != 0){ +// ... +// } +// + OUTER FOR LOOP COUNTER INCREMENT + Train(train); +} + +pattern closeTrains_step_3(in train : Train, in start : Segment) { +// int loop_bound1 = frame->start->connected_to_count; +// for (int i1 = 0; i1 < loop_bound1; i1++) { LOOP COUNTER INCREMENT IS NOT INCLUDED HERE +// ... +// } + Train.location(train, start); +} + +pattern closeTrains_step_4(in train : Train, in start : Segment, in middle : Segment) { +// frame->middle = frame->start->connected_to[i1]; +// int loop_bound2 = frame->middle->connected_to_count; + +// for (int i2 = 0; i2 < loop_bound2; i2++) { LOOP COUNTER INCREMENT IS NOT INCLUDED HERE +// ... +// } +// + OUTER FOR LOOP COUNTER INCREMENT + Train.location(train, start); + Segment.connectedTo(start, middle); +} + +pattern closeTrains_step_5(in train : Train, in start : Segment, in middle : Segment, in end : Segment) { +// frame->end = frame->middle->connected_to[i2]; +// if (frame->start != frame->end) { +// ... +// } +// + OUTER FOR LOOP COUNTER INCREMENT + Train.location(train, start); + Segment.connectedTo(start, middle); + Segment.connectedTo(middle, end); +} + +pattern closeTrains_step_6(in train : Train, in start : Segment, in middle : Segment, in end : Segment) { +// frame->t2 = frame->end->train; +// if (frame->t2 != 0) { +// ... +// } + Train.location(train, start); + Segment.connectedTo(start, middle); + Segment.connectedTo(middle, end); + start != end; +} + +pattern closeTrains_step_7(in train : Train, in start : Segment, in middle : Segment, in end : Segment, in otherTrain : Train) { +// results->matches[match_cntr].start = frame->start; +// results->matches[match_cntr++].end = frame->end; + Train.location(train, start); + Segment.connectedTo(start, middle); + Segment.connectedTo(middle, end); + start != end; + Segment.occupiedBy(end, otherTrain); +} + +// +// trainLocations +// + +pattern trainLocations_step_2(in train : Train) { +// frame->train = model->trains[i0]; +// frame->location = frame->train->location; +// if (frame->location != NULL) { +// ... +// } + + Train(train); +} + +pattern trainLocations_step_3(in train : Train, in location : Segment) { +// results->matches[match_cntr].location = frame->location; +// results->matches[match_cntr++].train = frame->train; + Train(train); + Train.location(train, location); +} + +// +// misalignedTurnout +// + +pattern misalignedTurnout_step_2(in turnout : Turnout) { +// frame->turnout = model->turnouts[i0]; +// frame->location = frame->turnout->straight; +// if (frame->location != NULL) { +// ... +// } + Turnout(turnout); +} + +pattern misalignedTurnout_step_3(in turnout : Turnout, in location : Segment) { +// Segment *disconnected = ((Segment *)frame->turnout); +// if (disconnected->connected_to[0] != frame->location && +// disconnected->connected_to[1] != frame->location) { +// ... +// } + Turnout(turnout); + Turnout.straight(turnout, location); +} + +pattern misalignedTurnout_step_4(in turnout : Turnout, in location : Segment) { +// frame->train = frame->location->train; +// if (frame->train != NULL) { +// ... +// } + Turnout(turnout); + Turnout.straight(turnout, location); + neg find connectedSegmentsDirected(turnout, location); +} + +pattern misalignedTurnout_step_5(in turnout : Turnout, in location : Segment, in train : Train) { +// results->matches[match_cntr].start = frame->start; +// results->matches[match_cntr++].end = frame->end; + Turnout(turnout); + Turnout.straight(turnout, location); + neg find connectedSegmentsDirected(turnout, location); + Segment.occupiedBy(location, train); +} + +pattern connectedSegmentsDirected(s1 : Segment, s2 : Segment) { + Segment.connectedTo(s1, s2); +} + +// +// endOfSiding +// + +pattern endOfSiding_step_2(in train : Train) { +// frame->train = model->trains[i0]; +// frame->location = frame->train->location; +// if (frame->location != NULL) { +// ... +// } + + Train(train); +} + +pattern endOfSiding_step_3(in train : Train, in location : Segment) { +// int loop_bound1 = frame->location->connected_to_count; +// for (int i1 = 0; i1 < loop_bound1; i1++) { +// ... +// } + Train(train); + Train.location(train, location); +} + +pattern endOfSiding_step_4(in train : Train, in location : Segment, in end : Segment) { +// frame->end = frame->location->connected_to[i1]; +// if (frame->end != NULL && +// frame->end->connected_to[1] == frame->location && +// frame->end->connected_to[0] == NULL) { +// ... +// } +// if (frame->end != NULL && +// frame->end->connected_to[0] == frame->location && +// frame->end->connected_to[1] == NULL) { +// ... +// } + Train(train); + Train.location(train, location); + Segment.connectedTo(location, end); +} + +pattern endOfSiding_step_5(in train : Train, in location : Segment, in end : Segment) { +// results->matches[match_cntr].location = frame->location; +// results->matches[match_cntr++].train = frame->train; +// ...OR... +// results->matches[match_cntr].location = frame->location; +// results->matches[match_cntr++].train = frame->train; + Train(train); + Train.location(train, location); + Segment.connectedTo(location, end); + neg find multipleConnectedTo(end); +} + +pattern multipleConnectedTo(s : Segment) { + Segment.connectedTo(s, n1); + Segment.connectedTo(s, n2); + n1 != n2; +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/CloseTrainsObjectiveHint.xtend b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/CloseTrainsObjectiveHint.xtend new file mode 100644 index 00000000..519a228a --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/CloseTrainsObjectiveHint.xtend @@ -0,0 +1,201 @@ +package modes3.run + +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilderFactory +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatch +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatchers +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostObjectiveHint +import java.util.Collection +import java.util.Map +import modes3.Modes3Package +import modes3.queries.CloseTrains_step_2 +import modes3.queries.CloseTrains_step_3 +import modes3.queries.CloseTrains_step_4 +import modes3.queries.CloseTrains_step_5 +import modes3.queries.CloseTrains_step_6 +import modes3.queries.CloseTrains_step_7 + +class CloseTrainsObjectiveHint extends CostObjectiveHint { + val Type segmentType + val Type trainType + + new(extension Ecore2Logic ecore2Logic, Ecore2Logic_Trace ecore2LogicTrace) { + extension val Modes3Package = Modes3Package.eINSTANCE + segmentType = ecore2LogicTrace.TypeofEClass(segment) + trainType = ecore2LogicTrace.TypeofEClass(train) + } + + override isExact() { + true + } + + override createPolyhedronExtensionOperator(Map costElementMatchers) { + val step2 = costElementMatchers.get(CloseTrains_step_2.instance.fullyQualifiedName) + val step3 = costElementMatchers.get(CloseTrains_step_3.instance.fullyQualifiedName) + val step4 = costElementMatchers.get(CloseTrains_step_4.instance.fullyQualifiedName) + val step5 = costElementMatchers.get(CloseTrains_step_5.instance.fullyQualifiedName) + val step6 = costElementMatchers.get(CloseTrains_step_6.instance.fullyQualifiedName) + val step7 = costElementMatchers.get(CloseTrains_step_7.instance.fullyQualifiedName); + + [ + val objectiveBuilder = createBuilder + + for (m : step2.matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step2.weight, dimension) + dimension.tightenLowerBound(0) + if (m.multi) { + createBuilder.add(1, dimension).add(-1, trainType).build.assertEqualsTo(0) + } else { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + + val step3Matches = step3.matches + for (m : step3Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step3.weight, dimension) + dimension.tightenLowerBound(0) + if (!m.multi) { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + for (pair : step3Matches.groupBy[step2.projectMayMatch(match, 2)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + multiplicityBuilder.add(-1, pair.key) + multiplicityBuilder.build.assertEqualsTo(0) + } + boundLimit(step3Matches, 2, trainType, 1) + boundLimit(step3Matches, 3, segmentType, 1) + + val step4Matches = step4.matches + for (m : step4Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step4.weight, dimension) + dimension.tightenLowerBound(0) + if (!m.multi) { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + for (pair : step4Matches.groupBy[step3.projectMayMatch(match, 2, 3)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + multiplicityBuilder.add(-2, pair.key) + multiplicityBuilder.build.tightenUpperBound(0) + } + boundLimit(step4Matches, 2, trainType, 2) + boundLimit(step4Matches, 3, segmentType, 2) + boundLimit(step4Matches, 4, segmentType, 2) + + val step5Matches = step5.matches + for (m : step5Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step5.weight, dimension) + dimension.tightenLowerBound(0) + if (!m.multi) { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + for (pair : step5Matches.groupBy[step4.projectMayMatch(match, 2, 3, 4)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + multiplicityBuilder.add(-2, pair.key) + multiplicityBuilder.build.tightenUpperBound(0) + } + boundLimit(step5Matches, 2, trainType, 4) + boundLimit(step5Matches, 3, segmentType, 4) + boundLimit(step5Matches, 4, segmentType, 4) + boundLimit(step5Matches, 5, segmentType, 4) + + val step6Matches = step6.matches + for (m : step6Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step6.weight, dimension) + dimension.tightenLowerBound(0) + if (m.multi) { + if (m.match.get(3) == m.match.get(5)) { + createBuilder.add(2, m.match).add(-1, step5.projectMayMatch(m.match, 2, 3, 4, 5)).build. + assertEqualsTo(0) + } else { + createBuilder.add(1, m.match).add(-1, step5.projectMayMatch(m.match, 2, 3, 4, 5)).build. + assertEqualsTo(0) + } + } else { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + boundLimit(step6Matches, 2, trainType, 2) + boundLimit(step6Matches, 3, segmentType, 2) + boundLimit(step6Matches, 4, segmentType, 2) + boundLimit(step6Matches, 5, segmentType, 2) + + val step7Matches = step7.matches + for (m : step7Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step7.weight, dimension) + dimension.tightenLowerBound(0) + if (!m.multi) { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + for (pair : step7Matches.groupBy[step6.projectMayMatch(match, 2, 3, 4, 5)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + multiplicityBuilder.add(-1, pair.key) + multiplicityBuilder.build.tightenUpperBound(0) + } + boundLimit(step7Matches, 2, trainType, 2) + boundLimit(step7Matches, 3, segmentType, 2) + boundLimit(step7Matches, 4, segmentType, 2) + boundLimit(step7Matches, 5, segmentType, 2) + boundLimit(step7Matches, 6, trainType, 2) + + objectiveBuilder.buildWithBounds + ] + } + + private static def boundLimit(extension ExtendedLinearExpressionBuilderFactory factory, + Collection matches, int index, Type type, int count) { + for (pair : matches.groupBy[match.get(index)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + if (CostElementMatchers.isMulti(pair.key)) { + multiplicityBuilder.add(-count, type) + multiplicityBuilder.build.tightenUpperBound(0) + } else { + multiplicityBuilder.build.tightenUpperBound(count) + } + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/EndOfSidingObjectiveHint.xtend b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/EndOfSidingObjectiveHint.xtend new file mode 100644 index 00000000..f7e23a57 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/EndOfSidingObjectiveHint.xtend @@ -0,0 +1,139 @@ +package modes3.run + +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilderFactory +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatch +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatchers +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostObjectiveHint +import java.util.Collection +import java.util.Map +import modes3.Modes3Package +import modes3.queries.EndOfSiding_step_2 +import modes3.queries.EndOfSiding_step_3 +import modes3.queries.EndOfSiding_step_4 +import modes3.queries.EndOfSiding_step_5 + +class EndOfSidingObjectiveHint extends CostObjectiveHint { + val Type segmentType + val Type trainType + + new(extension Ecore2Logic ecore2Logic, Ecore2Logic_Trace ecore2LogicTrace) { + extension val Modes3Package = Modes3Package.eINSTANCE + segmentType = ecore2LogicTrace.TypeofEClass(segment) + trainType = ecore2LogicTrace.TypeofEClass(train) + } + + override isExact() { + true +// false + } + + override createPolyhedronExtensionOperator(Map costElementMatchers) { + val step2 = costElementMatchers.get(EndOfSiding_step_2.instance.fullyQualifiedName) + val step3 = costElementMatchers.get(EndOfSiding_step_3.instance.fullyQualifiedName) + val step4 = costElementMatchers.get(EndOfSiding_step_4.instance.fullyQualifiedName) + val step5 = costElementMatchers.get(EndOfSiding_step_5.instance.fullyQualifiedName); + + [ + val objectiveBuilder = createBuilder + + for (m : step2.matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step2.weight, dimension) + dimension.tightenLowerBound(0) + if (m.multi) { + createBuilder.add(1, dimension).add(-1, trainType).build.assertEqualsTo(0) + } else { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + + val step3Matches = step3.matches + for (m : step3Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step3.weight, dimension) + dimension.tightenLowerBound(0) + if (!m.multi) { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + for (pair : step3Matches.groupBy[step2.projectMayMatch(match, 2)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + multiplicityBuilder.add(-1, pair.key) + multiplicityBuilder.build.assertEqualsTo(0) + } + boundLimit(step3Matches, 2, trainType, 1) + boundLimit(step3Matches, 3, segmentType, 1) + + val step4Matches = step4.matches + for (m : step4Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step4.weight, dimension) + dimension.tightenLowerBound(0) + if (!m.multi) { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + for (pair : step4Matches.groupBy[step3.projectMayMatch(match, 2, 3)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + multiplicityBuilder.add(-2, pair.key) + multiplicityBuilder.build.tightenUpperBound(0) + } + boundLimit(step4Matches, 2, trainType, 2) + boundLimit(step4Matches, 3, segmentType, 2) + boundLimit(step4Matches, 4, segmentType, 2) + + val step5Matches = step5.matches + for (m : step5Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step5.weight, dimension) + dimension.tightenLowerBound(0) + if (!m.multi) { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + createBuilder.add(1, m.match).add(-1, step4.projectMayMatch(m.match, 2, 3, 4)).build.tightenUpperBound(0) + } + boundLimit(step5Matches, 2, trainType, 1) + boundLimit(step5Matches, 3, segmentType, 2) + boundLimit(step5Matches, 4, segmentType, 1) + + objectiveBuilder.buildWithBounds + ] + } + + private static def boundLimit(extension ExtendedLinearExpressionBuilderFactory factory, + Collection matches, int index, Type type, int count) { + for (pair : matches.groupBy[match.get(index)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + if (CostElementMatchers.isMulti(pair.key)) { + multiplicityBuilder.add(-count, type) + multiplicityBuilder.build.tightenUpperBound(0) + } else { + multiplicityBuilder.build.tightenUpperBound(count) + } + } + } +} \ No newline at end of file diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/MisalignedTurnoutObjectiveHint.xtend b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/MisalignedTurnoutObjectiveHint.xtend new file mode 100644 index 00000000..cb014dea --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/MisalignedTurnoutObjectiveHint.xtend @@ -0,0 +1,140 @@ +package modes3.run + +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilderFactory +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatch +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatchers +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostObjectiveHint +import java.util.Collection +import java.util.Map +import modes3.Modes3Package +import modes3.queries.MisalignedTurnout_step_2 +import modes3.queries.MisalignedTurnout_step_3 +import modes3.queries.MisalignedTurnout_step_4 +import modes3.queries.MisalignedTurnout_step_5 + +class MisalignedTurnoutObjectiveHint extends CostObjectiveHint { + val Type segmentType + val Type turnoutType + val Type trainType + + new(extension Ecore2Logic ecore2Logic, Ecore2Logic_Trace ecore2LogicTrace) { + extension val Modes3Package = Modes3Package.eINSTANCE + segmentType = ecore2LogicTrace.TypeofEClass(segment) + turnoutType = ecore2LogicTrace.TypeofEClass(turnout) + trainType = ecore2LogicTrace.TypeofEClass(train) + } + + override isExact() { + true +// false + } + + override createPolyhedronExtensionOperator(Map costElementMatchers) { + val step2 = costElementMatchers.get(MisalignedTurnout_step_2.instance.fullyQualifiedName) + val step3 = costElementMatchers.get(MisalignedTurnout_step_3.instance.fullyQualifiedName) + val step4 = costElementMatchers.get(MisalignedTurnout_step_4.instance.fullyQualifiedName) + val step5 = costElementMatchers.get(MisalignedTurnout_step_5.instance.fullyQualifiedName); + + [ + val objectiveBuilder = createBuilder + + for (m : step2.matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step2.weight, dimension) + dimension.tightenLowerBound(0) + if (m.multi) { + createBuilder.add(1, dimension).add(-1, turnoutType).build.assertEqualsTo(0) + } else { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + + val step3Matches = step3.matches + for (m : step3Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step3.weight, dimension) + dimension.tightenLowerBound(0) + if (!m.multi) { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + for (pair : step3Matches.groupBy[step2.projectMayMatch(match, 2)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + multiplicityBuilder.add(-1, pair.key) + multiplicityBuilder.build.tightenUpperBound(0) + } + boundLimit(step3Matches, 2, turnoutType, 1) + boundLimit(step3Matches, 3, segmentType, 2) + + val step4Matches = step4.matches + for (m : step4Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step4.weight, dimension) + dimension.tightenLowerBound(0) + if (!m.multi) { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + createBuilder.add(1, m.match).add(-1, step3.projectMayMatch(m.match, 2, 3)).build.tightenUpperBound(0) + } + boundLimit(step4Matches, 2, turnoutType, 1) + boundLimit(step4Matches, 3, segmentType, 2) + + val step5Matches = step5.matches + for (m : step5Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step5.weight, dimension) + dimension.tightenLowerBound(0) + if (!m.multi) { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + for (pair : step5Matches.groupBy[step4.projectMayMatch(match, 2, 3)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + multiplicityBuilder.add(-1, pair.key) + multiplicityBuilder.build.tightenUpperBound(0) + } + boundLimit(step5Matches, 2, turnoutType, 1) + boundLimit(step5Matches, 3, segmentType, 2) + boundLimit(step5Matches, 4, trainType, 2) + + objectiveBuilder.buildWithBounds + ] + } + + private static def boundLimit(extension ExtendedLinearExpressionBuilderFactory factory, + Collection matches, int index, Type type, int count) { + for (pair : matches.groupBy[match.get(index)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + if (CostElementMatchers.isMulti(pair.key)) { + multiplicityBuilder.add(-count, type) + multiplicityBuilder.build.tightenUpperBound(0) + } else { + multiplicityBuilder.build.tightenUpperBound(count) + } + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3ModelGenerator.xtend b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3ModelGenerator.xtend index fac7c496..613cb3e4 100644 --- a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3ModelGenerator.xtend +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/Modes3ModelGenerator.xtend @@ -5,6 +5,7 @@ import com.google.common.collect.ImmutableSet import hu.bme.mit.inf.dslreasoner.ecore2logic.EReferenceMapper_RelationsOverTypes_Trace import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2LogicConfiguration +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsFactory import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsPackage @@ -14,6 +15,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.LogiclanguagePackage import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult +import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicConfiguration import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor @@ -25,18 +27,38 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePro import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BinaryElementRelationLink import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.CostObjectiveConfiguration +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.CostObjectiveElementConfiguration import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.StateCoderStrategy import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.PartialModelAsLogicInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveKind +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveThreshold import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualiser import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace import java.util.List import modes3.Modes3Factory import modes3.Modes3Package +import modes3.queries.CloseTrains_step_2 +import modes3.queries.CloseTrains_step_3 +import modes3.queries.CloseTrains_step_4 +import modes3.queries.CloseTrains_step_5 +import modes3.queries.CloseTrains_step_6 +import modes3.queries.CloseTrains_step_7 +import modes3.queries.EndOfSiding_step_2 +import modes3.queries.EndOfSiding_step_3 +import modes3.queries.EndOfSiding_step_4 +import modes3.queries.EndOfSiding_step_5 +import modes3.queries.MisalignedTurnout_step_2 +import modes3.queries.MisalignedTurnout_step_3 +import modes3.queries.MisalignedTurnout_step_4 +import modes3.queries.MisalignedTurnout_step_5 import modes3.queries.Modes3Queries +import modes3.queries.TrainLocations_step_2 +import modes3.queries.TrainLocations_step_3 import org.eclipse.emf.ecore.EClass import org.eclipse.emf.ecore.EObject import org.eclipse.emf.ecore.resource.Resource @@ -92,17 +114,21 @@ class Modes3ModelGenerator { minNewElements = modelSize maxNewElements = modelSize minNewElementsByType => [ -// put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.turnout), 5) +// put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.train), modelSize / 5) +// put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.turnout), modelSize / 5) +// put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.simpleSegment), 3 * modelSize / 5) ] maxNewElementsByType => [ - put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.train), 5) - put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.turnout), 5) + put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.train), modelSize / 5) + put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.turnout), modelSize / 5) + put(ecore2Logic.TypeofEClass(metamodelLogic.trace, Modes3Package.eINSTANCE.simpleSegment), 3 * modelSize / 5) ] ] solutionScope => [ numberOfRequiredSolutions = 1 ] - scopeWeight = 5 + costObjectives += getObjective(ecore2Logic, metamodelLogic.trace) + scopeWeight = 6 nameNewElements = false typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis stateCoderStrategy = StateCoderStrategy.PairwiseNeighbourhood @@ -121,47 +147,60 @@ class Modes3ModelGenerator { val solution = solver.solve(logic.output, config, workspace) if (solution instanceof ModelResult) { println("Saving generated solutions") - val representations = solution.representation - for (representationIndex : 0 ..< representations.size) { - val representation = representations.get(representationIndex) + val logic2Ecore = new Logic2Ecore(ecore2Logic) + val interpretations = solver.getInterpretations(solution) + for (representationIndex : 0 ..< interpretations.size) { + val interpretation = interpretations.get(representationIndex) val representationNumber = representationIndex + 1 - if (representation instanceof PartialInterpretation) { + if (interpretation instanceof PartialModelAsLogicInterpretation) { + val representation = interpretation.partialInterpretation workspace.writeModel(representation, '''solution«representationNumber».partialinterpretation''') val partialInterpretation2GML = new PartialInterpretation2Gml val gml = partialInterpretation2GML.transform(representation) workspace.writeText('''solution«representationNumber».gml''', gml) + val model = logic2Ecore.transformInterpretation(interpretation, metamodelLogic.trace) + val iterator = model.eAllContents + var int id = 0 + while (iterator.hasNext) { + val obj = iterator.next + val idFeature = obj.eClass.EAllAttributes.findFirst[name == 'id'] + if (idFeature !== null) { + obj.eSet(idFeature, id) + id++ + } + } + workspace.writeModel(model, '''solution«representationNumber».modes3''') if (representation.newElements.size < 160) { - if (representation instanceof PartialInterpretation) { - val rootType = (representation.problem.types.findFirst [ - name == "Modes3ModelRoot class DefinedPart" - ] as TypeDefinition) - val rootIntepretation = representation.partialtypeinterpratation.filter( - PartialComplexTypeInterpretation).findFirst [ - interpretationOf.name == "Modes3ModelRoot class" + val rootType = (representation.problem.types.findFirst [ + name == "Modes3ModelRoot class DefinedPart" + ] as TypeDefinition) + val rootIntepretation = representation.partialtypeinterpratation.filter( + PartialComplexTypeInterpretation).findFirst [ + interpretationOf.name == "Modes3ModelRoot class" + ] + rootIntepretation.elements.removeAll(rootType.elements) + representation.problem.elements.removeAll(rootType.elements) + for (relationInterpretation : representation.partialrelationinterpretation) { + relationInterpretation.relationlinks.removeIf [ link | + if (link instanceof BinaryElementRelationLink) { + rootType.elements.contains(link.param1) || + rootType.elements.contains(link.param2) + } else { + false + } ] - rootIntepretation.elements.removeAll(rootType.elements) - representation.problem.elements.removeAll(rootType.elements) - for (relationInterpretation : representation.partialrelationinterpretation) { - relationInterpretation.relationlinks.removeIf [ link | - if (link instanceof BinaryElementRelationLink) { - rootType.elements.contains(link.param1) || rootType.elements.contains(link.param2) - } else { - false - } - ] - } - rootType.elements.clear } + rootType.elements.clear val visualiser = new GraphvizVisualiser val visualisation = visualiser.visualiseConcretization(representation) visualisation.writeToFile(workspace, '''solution«representationNumber».png''') } } else { - workspace.writeText('''solution«representationNumber».txt''', representation.toString) + workspace.writeText('''solution«representationNumber».txt''', interpretation.toString) } } } else { - println("Failed to solver problem") + println("Failed to solve problem") val partial = logic.output workspace.writeModel(partial, "solution.partialinterpretation") } @@ -198,6 +237,94 @@ class Modes3ModelGenerator { ) } + def getObjective(Ecore2Logic ecore2Logic, Ecore2Logic_Trace ecore2LogicTrace) { + new CostObjectiveConfiguration => [ + switch (monitoringQuery) { + case closeTrains: { + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = CloseTrains_step_2.instance.fullyQualifiedName + weight = 14 + 53 + 11 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = CloseTrains_step_3.instance.fullyQualifiedName + weight = 21 + 14 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = CloseTrains_step_4.instance.fullyQualifiedName + weight = 14 + 44 + 14 + 9 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = CloseTrains_step_5.instance.fullyQualifiedName + weight = 14 + 41 + 11 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = CloseTrains_step_6.instance.fullyQualifiedName + weight = 27 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = CloseTrains_step_7.instance.fullyQualifiedName + weight = 48 + ] + hint = new CloseTrainsObjectiveHint(ecore2Logic, ecore2LogicTrace) + } + case trainLocations: { + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = TrainLocations_step_2.instance.fullyQualifiedName + weight = 14 + 53 + 11 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = TrainLocations_step_3.instance.fullyQualifiedName + weight = 48 + ] + hint = new TrainLocationsObjectiveHint(ecore2Logic, ecore2LogicTrace) + } + case misalignedTurnout: { + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = MisalignedTurnout_step_2.instance.fullyQualifiedName + weight = 14 + 53 + 11 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = MisalignedTurnout_step_3.instance.fullyQualifiedName + weight = 108 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = MisalignedTurnout_step_4.instance.fullyQualifiedName + weight = 27 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = MisalignedTurnout_step_5.instance.fullyQualifiedName + weight = 48 + ] + hint = new MisalignedTurnoutObjectiveHint(ecore2Logic, ecore2LogicTrace) + } + case endOfSiding: { + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = EndOfSiding_step_2.instance.fullyQualifiedName + weight = 14 + 53 + 11 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = EndOfSiding_step_3.instance.fullyQualifiedName + weight = 21 + 14 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = EndOfSiding_step_4.instance.fullyQualifiedName + weight = 14 + 35 + 21 + 15 + 14 + 21 + 15 + 11 + ] + elements += new CostObjectiveElementConfiguration => [ + patternQualifiedName = EndOfSiding_step_5.instance.fullyQualifiedName + weight = 48 + ] + hint = new EndOfSidingObjectiveHint(ecore2Logic, ecore2LogicTrace) + } + default: + throw new IllegalArgumentException("Unknown monitoring query: " + monitoringQuery) + } + kind = ObjectiveKind.HIGHER_IS_BETTER + threshold = ObjectiveThreshold.NO_THRESHOLD + findExtremum = true + ] + } + def static init() { EMFPatternLanguageStandaloneSetup.doSetup ViatraQueryEngineOptions.setSystemDefaultBackends(ReteBackendFactory.INSTANCE, ReteBackendFactory.INSTANCE, @@ -223,6 +350,8 @@ class Modes3ModelGenerator { private static enum MonitoringQuery { closeTrains, + trainLocations, + endOfSiding, misalignedTurnout } } diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/TrainLocationsObjectiveHint.xtend b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/TrainLocationsObjectiveHint.xtend new file mode 100644 index 00000000..cc2d7925 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/src/modes3/run/TrainLocationsObjectiveHint.xtend @@ -0,0 +1,85 @@ +package modes3.run + +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilderFactory +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatch +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatchers +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostObjectiveHint +import java.util.Collection +import java.util.Map +import modes3.Modes3Package +import modes3.queries.TrainLocations_step_2 +import modes3.queries.TrainLocations_step_3 + +class TrainLocationsObjectiveHint extends CostObjectiveHint { + val Type segmentType + val Type trainType + + new(extension Ecore2Logic ecore2Logic, Ecore2Logic_Trace ecore2LogicTrace) { + extension val Modes3Package = Modes3Package.eINSTANCE + segmentType = ecore2LogicTrace.TypeofEClass(segment) + trainType = ecore2LogicTrace.TypeofEClass(train) + } + + override isExact() { + true + } + + override createPolyhedronExtensionOperator(Map costElementMatchers) { + val step2 = costElementMatchers.get(TrainLocations_step_2.instance.fullyQualifiedName) + val step3 = costElementMatchers.get(TrainLocations_step_3.instance.fullyQualifiedName); + + [ + val objectiveBuilder = createBuilder + + for (m : step2.matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step2.weight, dimension) + dimension.tightenLowerBound(0) + if (m.multi) { + createBuilder.add(1, dimension).add(-1, trainType).build.assertEqualsTo(0) + } else { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + + val step3Matches = step3.matches + for (m : step3Matches) { + val dimension = getDimension(m.match) + objectiveBuilder.add(step3.weight, dimension) + dimension.tightenLowerBound(0) + if (!m.multi) { + dimension.tightenUpperBound(1) + if (m.must) { + dimension.tightenLowerBound(1) + } + } + } + boundLimit(step3Matches, 2, trainType, 1) + boundLimit(step3Matches, 3, segmentType, 1) + + objectiveBuilder.buildWithBounds + ] + } + + private static def boundLimit(extension ExtendedLinearExpressionBuilderFactory factory, + Collection matches, int index, Type type, int count) { + for (pair : matches.groupBy[match.get(index)].entrySet) { + val multiplicityBuilder = createBuilder + for (m : pair.value) { + multiplicityBuilder.add(1, m.match) + } + if (CostElementMatchers.isMulti(pair.key)) { + multiplicityBuilder.add(-count, type) + multiplicityBuilder.build.tightenUpperBound(0) + } else { + multiplicityBuilder.build.tightenUpperBound(count) + } + } + } +} \ No newline at end of file diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/.gitignore b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/.gitignore index b3e38571..a84c2906 100644 --- a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/.gitignore +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/.gitignore @@ -31,3 +31,48 @@ /.TooManyNonStraightInputsOfTurnout.java._trace /.InputsOfTurnout.java._trace /.TooFewInputsOfTurnout.java._trace +/.CloseTrains_step_2.java._trace +/.CloseTrains_step_3.java._trace +/.CloseTrains_step_4.java._trace +/.CloseTrains_step_5.java._trace +/.CloseTrains_step_6.java._trace +/.CloseTrains_step_7.java._trace +/.MisalignedTurnout_step_2.java._trace +/.MisalignedTurnout_step_3.java._trace +/.MisalignedTurnout_step_4.java._trace +/.MisalignedTurnout_step_5.java._trace +/.ConnectedSegmentsDirected.java._trace +/Adjacent.java +/CloseTrains_step_2.java +/CloseTrains_step_3.java +/CloseTrains_step_4.java +/CloseTrains_step_5.java +/CloseTrains_step_6.java +/CloseTrains_step_7.java +/ConnectedSegmentsDirected.java +/ConnectedTo.java +/ConnectedToNotSymmetric.java +/ConnectedToReflexive.java +/InputsOfTurnout.java +/MisalignedTurnout_step_2.java +/MisalignedTurnout_step_3.java +/MisalignedTurnout_step_4.java +/MisalignedTurnout_step_5.java +/Modes3Queries.java +/Output.java +/OutputReflexive.java +/Reachable.java +/TooFewInputsOfTurnout.java +/TooManyInputsOfSegment.java +/TooManyInputsOfTurnout.java +/TurnoutConnectedToBothOutputs.java +/TurnoutOutput.java +/TurnoutOutputsAreSame.java +/Unreachable.java +/.TrainLocations_step_2.java._trace +/.TrainLocations_step_3.java._trace +/.EndOfSiding_step_2.java._trace +/.EndOfSiding_step_3.java._trace +/.EndOfSiding_step_4.java._trace +/.EndOfSiding_step_5.java._trace +/.MultipleConnectedTo.java._trace diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_2.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_2.java new file mode 100644 index 00000000..a8f68dca --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_2.java @@ -0,0 +1,564 @@ +/** + * Generated from platform:/resource/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql + */ +package modes3.queries; + +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import modes3.Train; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; +import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; + +/** + * A pattern-specific query specification that can instantiate Matcher in a type-safe way. + * + *

    Original source: + *

    + *         //
    + *         // endOfSiding
    + *         //
    + *         
    + *         pattern endOfSiding_step_2(in train : Train) {
    + *         //   frame-{@literal >}train = model-{@literal >}trains[i0];
    + *         //   frame-{@literal >}location = frame-{@literal >}train-{@literal >}location;
    + *         //   if (frame-{@literal >}location != NULL) {
    + *         //     ...
    + *         //   }
    + *         
    + *         	Train(train);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class EndOfSiding_step_2 extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the modes3.queries.endOfSiding_step_2 pattern, + * to be used in conjunction with {@link Matcher}. + * + *

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

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @return the (partial) match object. + * + */ + public static EndOfSiding_step_2.Match newMatch(final Train pTrain) { + return new Immutable(pTrain); + } + + private static final class Mutable extends EndOfSiding_step_2.Match { + Mutable(final Train pTrain) { + super(pTrain); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends EndOfSiding_step_2.Match { + Immutable(final Train pTrain) { + super(pTrain); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the modes3.queries.endOfSiding_step_2 pattern, + * providing pattern-specific query methods. + * + *

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

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

    Original source: + *

    +   * //
    +   * // endOfSiding
    +   * //
    +   * 
    +   * pattern endOfSiding_step_2(in train : Train) {
    +   * //   frame-{@literal >}train = model-{@literal >}trains[i0];
    +   * //   frame-{@literal >}location = frame-{@literal >}train-{@literal >}location;
    +   * //   if (frame-{@literal >}location != NULL) {
    +   * //     ...
    +   * //   }
    +   * 
    +   * 	Train(train);
    +   * }
    +   * 
    + * + * @see Match + * @see EndOfSiding_step_2 + * + */ + public static class Matcher extends BaseMatcher { + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + public static EndOfSiding_step_2.Matcher on(final ViatraQueryEngine engine) { + // check if matcher already exists + Matcher matcher = engine.getExistingMatcher(querySpecification()); + if (matcher == null) { + matcher = (Matcher)engine.getMatcher(querySpecification()); + } + return matcher; + } + + /** + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * @return an initialized matcher + * @noreference This method is for internal matcher initialization by the framework, do not call it manually. + * + */ + public static EndOfSiding_step_2.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_TRAIN = 0; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(EndOfSiding_step_2.Matcher.class); + + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + private Matcher() { + super(querySpecification()); + } + + /** + * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final Train pTrain) { + return rawStreamAllMatches(new Object[]{pTrain}).collect(Collectors.toSet()); + } + + /** + * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. + *

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

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @return the (partial) match object. + * + */ + public EndOfSiding_step_2.Match newMatch(final Train pTrain) { + return EndOfSiding_step_2.Match.newMatch(pTrain); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOftrain(final Object[] parameters) { + return rawStreamAllValues(POSITION_TRAIN, parameters).map(Train.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()); + } + + @Override + protected EndOfSiding_step_2.Match tupleToMatch(final Tuple t) { + try { + return EndOfSiding_step_2.Match.newMatch((Train) t.get(POSITION_TRAIN)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected EndOfSiding_step_2.Match arrayToMatch(final Object[] match) { + try { + return EndOfSiding_step_2.Match.newMatch((Train) match[POSITION_TRAIN]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected EndOfSiding_step_2.Match arrayToMatchMutable(final Object[] match) { + try { + return EndOfSiding_step_2.Match.newMutableMatch((Train) match[POSITION_TRAIN]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + /** + * @return the singleton instance of the query specification of this pattern + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static IQuerySpecification querySpecification() { + return EndOfSiding_step_2.instance(); + } + } + + private EndOfSiding_step_2() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static EndOfSiding_step_2 instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected EndOfSiding_step_2.Matcher instantiate(final ViatraQueryEngine engine) { + return EndOfSiding_step_2.Matcher.on(engine); + } + + @Override + public EndOfSiding_step_2.Matcher instantiate() { + return EndOfSiding_step_2.Matcher.create(); + } + + @Override + public EndOfSiding_step_2.Match newEmptyMatch() { + return EndOfSiding_step_2.Match.newEmptyMatch(); + } + + @Override + public EndOfSiding_step_2.Match newMatch(final Object... parameters) { + return EndOfSiding_step_2.Match.newMatch((modes3.Train) parameters[0]); + } + + /** + * Inner class allowing the singleton instance of {@link EndOfSiding_step_2} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link EndOfSiding_step_2#instance()}. + * + *

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

    The static initializer is defined using a helper field to work around limitations of the code generator. + * + */ + private static final Object STATIC_INITIALIZER = ensureInitialized(); + + public static Object ensureInitialized() { + INSTANCE.ensureInitializedInternal(); + return null; + } + } + + private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { + private static final EndOfSiding_step_2.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_train = new PParameter("train", "modes3.Train", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Train")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_train); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "modes3.queries.endOfSiding_step_2"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("train"); + } + + @Override + public List getParameters() { + return parameters; + } + + @Override + public Set doGetContainedBodies() { + setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); + Set bodies = new LinkedHashSet<>(); + { + PBody body = new PBody(this); + PVariable var_train = body.getOrCreateVariableByName("train"); + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_train, parameter_train) + )); + // // frame->train = model->trains[i0];// frame->location = frame->train->location;// if (frame->location != NULL) {// ...// } Train(train) + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_3.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_3.java new file mode 100644 index 00000000..16b28a9f --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_3.java @@ -0,0 +1,717 @@ +/** + * Generated from platform:/resource/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql + */ +package modes3.queries; + +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import modes3.Segment; +import modes3.Train; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; +import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; + +/** + * A pattern-specific query specification that can instantiate Matcher in a type-safe way. + * + *

    Original source: + *

    + *         pattern endOfSiding_step_3(in train : Train, in location : Segment) {
    + *         //     int loop_bound1 = frame-{@literal >}location-{@literal >}connected_to_count;
    + *         //     for (int i1 = 0; i1 {@literal <} loop_bound1; i1++) {
    + *         //       ...
    + *         //     }
    + *         	Train(train);
    + *             Train.location(train, location);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class EndOfSiding_step_3 extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the modes3.queries.endOfSiding_step_3 pattern, + * to be used in conjunction with {@link Matcher}. + * + *

    Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. + * Each instance is a (possibly partial) substitution of pattern parameters, + * usable to represent a match of the pattern in the result of a query, + * or to specify the bound (fixed) input parameters when issuing a query. + * + * @see Matcher + * + */ + public static abstract class Match extends BasePatternMatch { + private Train fTrain; + + private Segment fLocation; + + private static List parameterNames = makeImmutableList("train", "location"); + + private Match(final Train pTrain, final Segment pLocation) { + this.fTrain = pTrain; + this.fLocation = pLocation; + } + + @Override + public Object get(final String parameterName) { + switch(parameterName) { + case "train": return this.fTrain; + case "location": return this.fLocation; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fTrain; + case 1: return this.fLocation; + default: return null; + } + } + + public Train getTrain() { + return this.fTrain; + } + + public Segment getLocation() { + return this.fLocation; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("train".equals(parameterName) ) { + this.fTrain = (Train) newValue; + return true; + } + if ("location".equals(parameterName) ) { + this.fLocation = (Segment) newValue; + return true; + } + return false; + } + + public void setTrain(final Train pTrain) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fTrain = pTrain; + } + + public void setLocation(final Segment pLocation) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fLocation = pLocation; + } + + @Override + public String patternName() { + return "modes3.queries.endOfSiding_step_3"; + } + + @Override + public List parameterNames() { + return EndOfSiding_step_3.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fTrain, fLocation}; + } + + @Override + public EndOfSiding_step_3.Match toImmutable() { + return isMutable() ? newMatch(fTrain, fLocation) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"train\"=" + prettyPrintValue(fTrain) + ", "); + result.append("\"location\"=" + prettyPrintValue(fLocation)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fTrain, fLocation); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof EndOfSiding_step_3.Match)) { + EndOfSiding_step_3.Match other = (EndOfSiding_step_3.Match) obj; + return Objects.equals(fTrain, other.fTrain) && Objects.equals(fLocation, other.fLocation); + } else { + // this should be infrequent + if (!(obj instanceof IPatternMatch)) { + return false; + } + IPatternMatch otherSig = (IPatternMatch) obj; + return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); + } + } + + @Override + public EndOfSiding_step_3 specification() { + return EndOfSiding_step_3.instance(); + } + + /** + * Returns an empty, mutable match. + * Fields of the mutable match can be filled to create a partial match, usable as matcher input. + * + * @return the empty match. + * + */ + public static EndOfSiding_step_3.Match newEmptyMatch() { + return new Mutable(null, null); + } + + /** + * Returns a mutable (partial) match. + * Fields of the mutable match can be filled to create a partial match, usable as matcher input. + * + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static EndOfSiding_step_3.Match newMutableMatch(final Train pTrain, final Segment pLocation) { + return new Mutable(pTrain, pLocation); + } + + /** + * Returns a new (partial) match. + * This can be used e.g. to call the matcher with a partial match. + *

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @return the (partial) match object. + * + */ + public static EndOfSiding_step_3.Match newMatch(final Train pTrain, final Segment pLocation) { + return new Immutable(pTrain, pLocation); + } + + private static final class Mutable extends EndOfSiding_step_3.Match { + Mutable(final Train pTrain, final Segment pLocation) { + super(pTrain, pLocation); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends EndOfSiding_step_3.Match { + Immutable(final Train pTrain, final Segment pLocation) { + super(pTrain, pLocation); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the modes3.queries.endOfSiding_step_3 pattern, + * providing pattern-specific query methods. + * + *

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

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

    Original source: + *

    +   * pattern endOfSiding_step_3(in train : Train, in location : Segment) {
    +   * //     int loop_bound1 = frame-{@literal >}location-{@literal >}connected_to_count;
    +   * //     for (int i1 = 0; i1 {@literal <} loop_bound1; i1++) {
    +   * //       ...
    +   * //     }
    +   * 	Train(train);
    +   *     Train.location(train, location);
    +   * }
    +   * 
    + * + * @see Match + * @see EndOfSiding_step_3 + * + */ + public static class Matcher extends BaseMatcher { + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + public static EndOfSiding_step_3.Matcher on(final ViatraQueryEngine engine) { + // check if matcher already exists + Matcher matcher = engine.getExistingMatcher(querySpecification()); + if (matcher == null) { + matcher = (Matcher)engine.getMatcher(querySpecification()); + } + return matcher; + } + + /** + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * @return an initialized matcher + * @noreference This method is for internal matcher initialization by the framework, do not call it manually. + * + */ + public static EndOfSiding_step_3.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_TRAIN = 0; + + private static final int POSITION_LOCATION = 1; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(EndOfSiding_step_3.Matcher.class); + + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + private Matcher() { + super(querySpecification()); + } + + /** + * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final Train pTrain, final Segment pLocation) { + return rawStreamAllMatches(new Object[]{pTrain, pLocation}).collect(Collectors.toSet()); + } + + /** + * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. + *

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

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @return the (partial) match object. + * + */ + public EndOfSiding_step_3.Match newMatch(final Train pTrain, final Segment pLocation) { + return EndOfSiding_step_3.Match.newMatch(pTrain, pLocation); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOftrain(final Object[] parameters) { + return rawStreamAllValues(POSITION_TRAIN, parameters).map(Train.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for train. + *

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

    + * NOTE: It is important not to modify the source model while the stream is being processed. + * If the match set of the pattern changes during processing, the contents of the stream is undefined. + * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. + * + * @return the Stream of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOftrain(final Segment pLocation) { + return rawStreamAllValuesOftrain(new Object[]{null, pLocation}); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain(final EndOfSiding_step_3.Match partialMatch) { + return rawStreamAllValuesOftrain(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain(final Segment pLocation) { + return rawStreamAllValuesOftrain(new Object[]{null, pLocation}).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOflocation(final Object[] parameters) { + return rawStreamAllValues(POSITION_LOCATION, parameters).map(Segment.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation() { + return rawStreamAllValuesOflocation(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOflocation() { + return rawStreamAllValuesOflocation(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for location. + *

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

    + * NOTE: It is important not to modify the source model while the stream is being processed. + * If the match set of the pattern changes during processing, the contents of the stream is undefined. + * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. + * + * @return the Stream of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOflocation(final Train pTrain) { + return rawStreamAllValuesOflocation(new Object[]{pTrain, null}); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation(final EndOfSiding_step_3.Match partialMatch) { + return rawStreamAllValuesOflocation(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation(final Train pTrain) { + return rawStreamAllValuesOflocation(new Object[]{pTrain, null}).collect(Collectors.toSet()); + } + + @Override + protected EndOfSiding_step_3.Match tupleToMatch(final Tuple t) { + try { + return EndOfSiding_step_3.Match.newMatch((Train) t.get(POSITION_TRAIN), (Segment) t.get(POSITION_LOCATION)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected EndOfSiding_step_3.Match arrayToMatch(final Object[] match) { + try { + return EndOfSiding_step_3.Match.newMatch((Train) match[POSITION_TRAIN], (Segment) match[POSITION_LOCATION]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected EndOfSiding_step_3.Match arrayToMatchMutable(final Object[] match) { + try { + return EndOfSiding_step_3.Match.newMutableMatch((Train) match[POSITION_TRAIN], (Segment) match[POSITION_LOCATION]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + /** + * @return the singleton instance of the query specification of this pattern + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static IQuerySpecification querySpecification() { + return EndOfSiding_step_3.instance(); + } + } + + private EndOfSiding_step_3() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static EndOfSiding_step_3 instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected EndOfSiding_step_3.Matcher instantiate(final ViatraQueryEngine engine) { + return EndOfSiding_step_3.Matcher.on(engine); + } + + @Override + public EndOfSiding_step_3.Matcher instantiate() { + return EndOfSiding_step_3.Matcher.create(); + } + + @Override + public EndOfSiding_step_3.Match newEmptyMatch() { + return EndOfSiding_step_3.Match.newEmptyMatch(); + } + + @Override + public EndOfSiding_step_3.Match newMatch(final Object... parameters) { + return EndOfSiding_step_3.Match.newMatch((modes3.Train) parameters[0], (modes3.Segment) parameters[1]); + } + + /** + * Inner class allowing the singleton instance of {@link EndOfSiding_step_3} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link EndOfSiding_step_3#instance()}. + * + *

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

    The static initializer is defined using a helper field to work around limitations of the code generator. + * + */ + private static final Object STATIC_INITIALIZER = ensureInitialized(); + + public static Object ensureInitialized() { + INSTANCE.ensureInitializedInternal(); + return null; + } + } + + private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { + private static final EndOfSiding_step_3.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_train = new PParameter("train", "modes3.Train", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Train")), PParameterDirection.INOUT); + + private final PParameter parameter_location = new PParameter("location", "modes3.Segment", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Segment")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_train, parameter_location); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "modes3.queries.endOfSiding_step_3"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("train","location"); + } + + @Override + public List getParameters() { + return parameters; + } + + @Override + public Set doGetContainedBodies() { + setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); + Set bodies = new LinkedHashSet<>(); + { + PBody body = new PBody(this); + PVariable var_train = body.getOrCreateVariableByName("train"); + PVariable var_location = body.getOrCreateVariableByName("location"); + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_location), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_train, parameter_train), + new ExportedParameter(body, var_location, parameter_location) + )); + // // int loop_bound1 = frame->location->connected_to_count;// for (int i1 = 0; i1 < loop_bound1; i1++) {// ...// } Train(train) + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + // Train.location(train, location) + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_train, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train", "location"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + new Equality(body, var__virtual_0_, var_location); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_4.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_4.java new file mode 100644 index 00000000..73df8514 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_4.java @@ -0,0 +1,847 @@ +/** + * Generated from platform:/resource/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql + */ +package modes3.queries; + +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import modes3.Segment; +import modes3.Train; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; +import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; + +/** + * A pattern-specific query specification that can instantiate Matcher in a type-safe way. + * + *

    Original source: + *

    + *         pattern endOfSiding_step_4(in train : Train, in location : Segment, in end : Segment) {
    + *         //       frame-{@literal >}end = frame-{@literal >}location-{@literal >}connected_to[i1];
    + *         //       if (frame-{@literal >}end != NULL &&
    + *         //			 frame-{@literal >}end-{@literal >}connected_to[1] == frame-{@literal >}location &&
    + *         //           frame-{@literal >}end-{@literal >}connected_to[0] == NULL) {
    + *         //         ...
    + *         //       } 
    + *         //     	 if (frame-{@literal >}end != NULL &&
    + *         //			 frame-{@literal >}end-{@literal >}connected_to[0] == frame-{@literal >}location &&
    + *         //           frame-{@literal >}end-{@literal >}connected_to[1] == NULL) {
    + *         //         ...
    + *         //       }
    + *         	Train(train);
    + *             Train.location(train, location);
    + *             Segment.connectedTo(location, end);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class EndOfSiding_step_4 extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the modes3.queries.endOfSiding_step_4 pattern, + * to be used in conjunction with {@link Matcher}. + * + *

    Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. + * Each instance is a (possibly partial) substitution of pattern parameters, + * usable to represent a match of the pattern in the result of a query, + * or to specify the bound (fixed) input parameters when issuing a query. + * + * @see Matcher + * + */ + public static abstract class Match extends BasePatternMatch { + private Train fTrain; + + private Segment fLocation; + + private Segment fEnd; + + private static List parameterNames = makeImmutableList("train", "location", "end"); + + private Match(final Train pTrain, final Segment pLocation, final Segment pEnd) { + this.fTrain = pTrain; + this.fLocation = pLocation; + this.fEnd = pEnd; + } + + @Override + public Object get(final String parameterName) { + switch(parameterName) { + case "train": return this.fTrain; + case "location": return this.fLocation; + case "end": return this.fEnd; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fTrain; + case 1: return this.fLocation; + case 2: return this.fEnd; + default: return null; + } + } + + public Train getTrain() { + return this.fTrain; + } + + public Segment getLocation() { + return this.fLocation; + } + + public Segment getEnd() { + return this.fEnd; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("train".equals(parameterName) ) { + this.fTrain = (Train) newValue; + return true; + } + if ("location".equals(parameterName) ) { + this.fLocation = (Segment) newValue; + return true; + } + if ("end".equals(parameterName) ) { + this.fEnd = (Segment) newValue; + return true; + } + return false; + } + + public void setTrain(final Train pTrain) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fTrain = pTrain; + } + + public void setLocation(final Segment pLocation) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fLocation = pLocation; + } + + public void setEnd(final Segment pEnd) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fEnd = pEnd; + } + + @Override + public String patternName() { + return "modes3.queries.endOfSiding_step_4"; + } + + @Override + public List parameterNames() { + return EndOfSiding_step_4.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fTrain, fLocation, fEnd}; + } + + @Override + public EndOfSiding_step_4.Match toImmutable() { + return isMutable() ? newMatch(fTrain, fLocation, fEnd) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"train\"=" + prettyPrintValue(fTrain) + ", "); + result.append("\"location\"=" + prettyPrintValue(fLocation) + ", "); + result.append("\"end\"=" + prettyPrintValue(fEnd)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fTrain, fLocation, fEnd); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof EndOfSiding_step_4.Match)) { + EndOfSiding_step_4.Match other = (EndOfSiding_step_4.Match) obj; + return Objects.equals(fTrain, other.fTrain) && Objects.equals(fLocation, other.fLocation) && Objects.equals(fEnd, other.fEnd); + } else { + // this should be infrequent + if (!(obj instanceof IPatternMatch)) { + return false; + } + IPatternMatch otherSig = (IPatternMatch) obj; + return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); + } + } + + @Override + public EndOfSiding_step_4 specification() { + return EndOfSiding_step_4.instance(); + } + + /** + * Returns an empty, mutable match. + * Fields of the mutable match can be filled to create a partial match, usable as matcher input. + * + * @return the empty match. + * + */ + public static EndOfSiding_step_4.Match newEmptyMatch() { + return new Mutable(null, null, null); + } + + /** + * Returns a mutable (partial) match. + * Fields of the mutable match can be filled to create a partial match, usable as matcher input. + * + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @param pEnd the fixed value of pattern parameter end, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static EndOfSiding_step_4.Match newMutableMatch(final Train pTrain, final Segment pLocation, final Segment pEnd) { + return new Mutable(pTrain, pLocation, pEnd); + } + + /** + * Returns a new (partial) match. + * This can be used e.g. to call the matcher with a partial match. + *

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @param pEnd the fixed value of pattern parameter end, or null if not bound. + * @return the (partial) match object. + * + */ + public static EndOfSiding_step_4.Match newMatch(final Train pTrain, final Segment pLocation, final Segment pEnd) { + return new Immutable(pTrain, pLocation, pEnd); + } + + private static final class Mutable extends EndOfSiding_step_4.Match { + Mutable(final Train pTrain, final Segment pLocation, final Segment pEnd) { + super(pTrain, pLocation, pEnd); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends EndOfSiding_step_4.Match { + Immutable(final Train pTrain, final Segment pLocation, final Segment pEnd) { + super(pTrain, pLocation, pEnd); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the modes3.queries.endOfSiding_step_4 pattern, + * providing pattern-specific query methods. + * + *

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

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

    Original source: + *

    +   * pattern endOfSiding_step_4(in train : Train, in location : Segment, in end : Segment) {
    +   * //       frame-{@literal >}end = frame-{@literal >}location-{@literal >}connected_to[i1];
    +   * //       if (frame-{@literal >}end != NULL &&
    +   * //			 frame-{@literal >}end-{@literal >}connected_to[1] == frame-{@literal >}location &&
    +   * //           frame-{@literal >}end-{@literal >}connected_to[0] == NULL) {
    +   * //         ...
    +   * //       } 
    +   * //     	 if (frame-{@literal >}end != NULL &&
    +   * //			 frame-{@literal >}end-{@literal >}connected_to[0] == frame-{@literal >}location &&
    +   * //           frame-{@literal >}end-{@literal >}connected_to[1] == NULL) {
    +   * //         ...
    +   * //       }
    +   * 	Train(train);
    +   *     Train.location(train, location);
    +   *     Segment.connectedTo(location, end);
    +   * }
    +   * 
    + * + * @see Match + * @see EndOfSiding_step_4 + * + */ + public static class Matcher extends BaseMatcher { + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + public static EndOfSiding_step_4.Matcher on(final ViatraQueryEngine engine) { + // check if matcher already exists + Matcher matcher = engine.getExistingMatcher(querySpecification()); + if (matcher == null) { + matcher = (Matcher)engine.getMatcher(querySpecification()); + } + return matcher; + } + + /** + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * @return an initialized matcher + * @noreference This method is for internal matcher initialization by the framework, do not call it manually. + * + */ + public static EndOfSiding_step_4.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_TRAIN = 0; + + private static final int POSITION_LOCATION = 1; + + private static final int POSITION_END = 2; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(EndOfSiding_step_4.Matcher.class); + + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + private Matcher() { + super(querySpecification()); + } + + /** + * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @param pEnd the fixed value of pattern parameter end, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final Train pTrain, final Segment pLocation, final Segment pEnd) { + return rawStreamAllMatches(new Object[]{pTrain, pLocation, pEnd}).collect(Collectors.toSet()); + } + + /** + * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. + *

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

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @param pEnd the fixed value of pattern parameter end, or null if not bound. + * @return the (partial) match object. + * + */ + public EndOfSiding_step_4.Match newMatch(final Train pTrain, final Segment pLocation, final Segment pEnd) { + return EndOfSiding_step_4.Match.newMatch(pTrain, pLocation, pEnd); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOftrain(final Object[] parameters) { + return rawStreamAllValues(POSITION_TRAIN, parameters).map(Train.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for train. + *

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

    + * NOTE: It is important not to modify the source model while the stream is being processed. + * If the match set of the pattern changes during processing, the contents of the stream is undefined. + * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. + * + * @return the Stream of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOftrain(final Segment pLocation, final Segment pEnd) { + return rawStreamAllValuesOftrain(new Object[]{null, pLocation, pEnd}); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain(final EndOfSiding_step_4.Match partialMatch) { + return rawStreamAllValuesOftrain(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain(final Segment pLocation, final Segment pEnd) { + return rawStreamAllValuesOftrain(new Object[]{null, pLocation, pEnd}).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOflocation(final Object[] parameters) { + return rawStreamAllValues(POSITION_LOCATION, parameters).map(Segment.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation() { + return rawStreamAllValuesOflocation(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOflocation() { + return rawStreamAllValuesOflocation(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for location. + *

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

    + * NOTE: It is important not to modify the source model while the stream is being processed. + * If the match set of the pattern changes during processing, the contents of the stream is undefined. + * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. + * + * @return the Stream of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOflocation(final Train pTrain, final Segment pEnd) { + return rawStreamAllValuesOflocation(new Object[]{pTrain, null, pEnd}); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation(final EndOfSiding_step_4.Match partialMatch) { + return rawStreamAllValuesOflocation(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation(final Train pTrain, final Segment pEnd) { + return rawStreamAllValuesOflocation(new Object[]{pTrain, null, pEnd}).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for end. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfend(final Object[] parameters) { + return rawStreamAllValues(POSITION_END, parameters).map(Segment.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for end. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfend() { + return rawStreamAllValuesOfend(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for end. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfend() { + return rawStreamAllValuesOfend(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for end. + *

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

    + * NOTE: It is important not to modify the source model while the stream is being processed. + * If the match set of the pattern changes during processing, the contents of the stream is undefined. + * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. + * + * @return the Stream of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfend(final Train pTrain, final Segment pLocation) { + return rawStreamAllValuesOfend(new Object[]{pTrain, pLocation, null}); + } + + /** + * Retrieve the set of values that occur in matches for end. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfend(final EndOfSiding_step_4.Match partialMatch) { + return rawStreamAllValuesOfend(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for end. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfend(final Train pTrain, final Segment pLocation) { + return rawStreamAllValuesOfend(new Object[]{pTrain, pLocation, null}).collect(Collectors.toSet()); + } + + @Override + protected EndOfSiding_step_4.Match tupleToMatch(final Tuple t) { + try { + return EndOfSiding_step_4.Match.newMatch((Train) t.get(POSITION_TRAIN), (Segment) t.get(POSITION_LOCATION), (Segment) t.get(POSITION_END)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected EndOfSiding_step_4.Match arrayToMatch(final Object[] match) { + try { + return EndOfSiding_step_4.Match.newMatch((Train) match[POSITION_TRAIN], (Segment) match[POSITION_LOCATION], (Segment) match[POSITION_END]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected EndOfSiding_step_4.Match arrayToMatchMutable(final Object[] match) { + try { + return EndOfSiding_step_4.Match.newMutableMatch((Train) match[POSITION_TRAIN], (Segment) match[POSITION_LOCATION], (Segment) match[POSITION_END]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + /** + * @return the singleton instance of the query specification of this pattern + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static IQuerySpecification querySpecification() { + return EndOfSiding_step_4.instance(); + } + } + + private EndOfSiding_step_4() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static EndOfSiding_step_4 instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected EndOfSiding_step_4.Matcher instantiate(final ViatraQueryEngine engine) { + return EndOfSiding_step_4.Matcher.on(engine); + } + + @Override + public EndOfSiding_step_4.Matcher instantiate() { + return EndOfSiding_step_4.Matcher.create(); + } + + @Override + public EndOfSiding_step_4.Match newEmptyMatch() { + return EndOfSiding_step_4.Match.newEmptyMatch(); + } + + @Override + public EndOfSiding_step_4.Match newMatch(final Object... parameters) { + return EndOfSiding_step_4.Match.newMatch((modes3.Train) parameters[0], (modes3.Segment) parameters[1], (modes3.Segment) parameters[2]); + } + + /** + * Inner class allowing the singleton instance of {@link EndOfSiding_step_4} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link EndOfSiding_step_4#instance()}. + * + *

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

    The static initializer is defined using a helper field to work around limitations of the code generator. + * + */ + private static final Object STATIC_INITIALIZER = ensureInitialized(); + + public static Object ensureInitialized() { + INSTANCE.ensureInitializedInternal(); + return null; + } + } + + private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { + private static final EndOfSiding_step_4.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_train = new PParameter("train", "modes3.Train", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Train")), PParameterDirection.INOUT); + + private final PParameter parameter_location = new PParameter("location", "modes3.Segment", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Segment")), PParameterDirection.INOUT); + + private final PParameter parameter_end = new PParameter("end", "modes3.Segment", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Segment")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_train, parameter_location, parameter_end); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "modes3.queries.endOfSiding_step_4"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("train","location","end"); + } + + @Override + public List getParameters() { + return parameters; + } + + @Override + public Set doGetContainedBodies() { + setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); + Set bodies = new LinkedHashSet<>(); + { + PBody body = new PBody(this); + PVariable var_train = body.getOrCreateVariableByName("train"); + PVariable var_location = body.getOrCreateVariableByName("location"); + PVariable var_end = body.getOrCreateVariableByName("end"); + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_location), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_end), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_train, parameter_train), + new ExportedParameter(body, var_location, parameter_location), + new ExportedParameter(body, var_end, parameter_end) + )); + // // frame->end = frame->location->connected_to[i1];// if (frame->end != NULL &&// frame->end->connected_to[1] == frame->location &&// frame->end->connected_to[0] == NULL) {// ...// } // if (frame->end != NULL &&// frame->end->connected_to[0] == frame->location &&// frame->end->connected_to[1] == NULL) {// ...// } Train(train) + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + // Train.location(train, location) + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_train, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train", "location"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + new Equality(body, var__virtual_0_, var_location); + // Segment.connectedTo(location, end) + new TypeConstraint(body, Tuples.flatTupleOf(var_location), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_location, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment", "connectedTo"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + new Equality(body, var__virtual_1_, var_end); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_5.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_5.java new file mode 100644 index 00000000..48a2697d --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/EndOfSiding_step_5.java @@ -0,0 +1,841 @@ +/** + * Generated from platform:/resource/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql + */ +package modes3.queries; + +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import modes3.Segment; +import modes3.Train; +import modes3.queries.MultipleConnectedTo; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; +import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; + +/** + * A pattern-specific query specification that can instantiate Matcher in a type-safe way. + * + *

    Original source: + *

    + *         pattern endOfSiding_step_5(in train : Train, in location : Segment, in end : Segment) {
    + *         //         results-{@literal >}matches[match_cntr].location = frame-{@literal >}location;
    + *         //         results-{@literal >}matches[match_cntr++].train = frame-{@literal >}train;
    + *         //         ...OR...
    + *         //         results-{@literal >}matches[match_cntr].location = frame-{@literal >}location;
    + *         //         results-{@literal >}matches[match_cntr++].train = frame-{@literal >}train;
    + *         	Train(train);
    + *             Train.location(train, location);
    + *             Segment.connectedTo(location, end);
    + *         	neg find multipleConnectedTo(end);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class EndOfSiding_step_5 extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the modes3.queries.endOfSiding_step_5 pattern, + * to be used in conjunction with {@link Matcher}. + * + *

    Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. + * Each instance is a (possibly partial) substitution of pattern parameters, + * usable to represent a match of the pattern in the result of a query, + * or to specify the bound (fixed) input parameters when issuing a query. + * + * @see Matcher + * + */ + public static abstract class Match extends BasePatternMatch { + private Train fTrain; + + private Segment fLocation; + + private Segment fEnd; + + private static List parameterNames = makeImmutableList("train", "location", "end"); + + private Match(final Train pTrain, final Segment pLocation, final Segment pEnd) { + this.fTrain = pTrain; + this.fLocation = pLocation; + this.fEnd = pEnd; + } + + @Override + public Object get(final String parameterName) { + switch(parameterName) { + case "train": return this.fTrain; + case "location": return this.fLocation; + case "end": return this.fEnd; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fTrain; + case 1: return this.fLocation; + case 2: return this.fEnd; + default: return null; + } + } + + public Train getTrain() { + return this.fTrain; + } + + public Segment getLocation() { + return this.fLocation; + } + + public Segment getEnd() { + return this.fEnd; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("train".equals(parameterName) ) { + this.fTrain = (Train) newValue; + return true; + } + if ("location".equals(parameterName) ) { + this.fLocation = (Segment) newValue; + return true; + } + if ("end".equals(parameterName) ) { + this.fEnd = (Segment) newValue; + return true; + } + return false; + } + + public void setTrain(final Train pTrain) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fTrain = pTrain; + } + + public void setLocation(final Segment pLocation) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fLocation = pLocation; + } + + public void setEnd(final Segment pEnd) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fEnd = pEnd; + } + + @Override + public String patternName() { + return "modes3.queries.endOfSiding_step_5"; + } + + @Override + public List parameterNames() { + return EndOfSiding_step_5.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fTrain, fLocation, fEnd}; + } + + @Override + public EndOfSiding_step_5.Match toImmutable() { + return isMutable() ? newMatch(fTrain, fLocation, fEnd) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"train\"=" + prettyPrintValue(fTrain) + ", "); + result.append("\"location\"=" + prettyPrintValue(fLocation) + ", "); + result.append("\"end\"=" + prettyPrintValue(fEnd)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fTrain, fLocation, fEnd); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof EndOfSiding_step_5.Match)) { + EndOfSiding_step_5.Match other = (EndOfSiding_step_5.Match) obj; + return Objects.equals(fTrain, other.fTrain) && Objects.equals(fLocation, other.fLocation) && Objects.equals(fEnd, other.fEnd); + } else { + // this should be infrequent + if (!(obj instanceof IPatternMatch)) { + return false; + } + IPatternMatch otherSig = (IPatternMatch) obj; + return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); + } + } + + @Override + public EndOfSiding_step_5 specification() { + return EndOfSiding_step_5.instance(); + } + + /** + * Returns an empty, mutable match. + * Fields of the mutable match can be filled to create a partial match, usable as matcher input. + * + * @return the empty match. + * + */ + public static EndOfSiding_step_5.Match newEmptyMatch() { + return new Mutable(null, null, null); + } + + /** + * Returns a mutable (partial) match. + * Fields of the mutable match can be filled to create a partial match, usable as matcher input. + * + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @param pEnd the fixed value of pattern parameter end, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static EndOfSiding_step_5.Match newMutableMatch(final Train pTrain, final Segment pLocation, final Segment pEnd) { + return new Mutable(pTrain, pLocation, pEnd); + } + + /** + * Returns a new (partial) match. + * This can be used e.g. to call the matcher with a partial match. + *

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @param pEnd the fixed value of pattern parameter end, or null if not bound. + * @return the (partial) match object. + * + */ + public static EndOfSiding_step_5.Match newMatch(final Train pTrain, final Segment pLocation, final Segment pEnd) { + return new Immutable(pTrain, pLocation, pEnd); + } + + private static final class Mutable extends EndOfSiding_step_5.Match { + Mutable(final Train pTrain, final Segment pLocation, final Segment pEnd) { + super(pTrain, pLocation, pEnd); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends EndOfSiding_step_5.Match { + Immutable(final Train pTrain, final Segment pLocation, final Segment pEnd) { + super(pTrain, pLocation, pEnd); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the modes3.queries.endOfSiding_step_5 pattern, + * providing pattern-specific query methods. + * + *

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

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

    Original source: + *

    +   * pattern endOfSiding_step_5(in train : Train, in location : Segment, in end : Segment) {
    +   * //         results-{@literal >}matches[match_cntr].location = frame-{@literal >}location;
    +   * //         results-{@literal >}matches[match_cntr++].train = frame-{@literal >}train;
    +   * //         ...OR...
    +   * //         results-{@literal >}matches[match_cntr].location = frame-{@literal >}location;
    +   * //         results-{@literal >}matches[match_cntr++].train = frame-{@literal >}train;
    +   * 	Train(train);
    +   *     Train.location(train, location);
    +   *     Segment.connectedTo(location, end);
    +   * 	neg find multipleConnectedTo(end);
    +   * }
    +   * 
    + * + * @see Match + * @see EndOfSiding_step_5 + * + */ + public static class Matcher extends BaseMatcher { + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + public static EndOfSiding_step_5.Matcher on(final ViatraQueryEngine engine) { + // check if matcher already exists + Matcher matcher = engine.getExistingMatcher(querySpecification()); + if (matcher == null) { + matcher = (Matcher)engine.getMatcher(querySpecification()); + } + return matcher; + } + + /** + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * @return an initialized matcher + * @noreference This method is for internal matcher initialization by the framework, do not call it manually. + * + */ + public static EndOfSiding_step_5.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_TRAIN = 0; + + private static final int POSITION_LOCATION = 1; + + private static final int POSITION_END = 2; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(EndOfSiding_step_5.Matcher.class); + + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + private Matcher() { + super(querySpecification()); + } + + /** + * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @param pEnd the fixed value of pattern parameter end, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final Train pTrain, final Segment pLocation, final Segment pEnd) { + return rawStreamAllMatches(new Object[]{pTrain, pLocation, pEnd}).collect(Collectors.toSet()); + } + + /** + * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. + *

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

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @param pEnd the fixed value of pattern parameter end, or null if not bound. + * @return the (partial) match object. + * + */ + public EndOfSiding_step_5.Match newMatch(final Train pTrain, final Segment pLocation, final Segment pEnd) { + return EndOfSiding_step_5.Match.newMatch(pTrain, pLocation, pEnd); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOftrain(final Object[] parameters) { + return rawStreamAllValues(POSITION_TRAIN, parameters).map(Train.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for train. + *

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

    + * NOTE: It is important not to modify the source model while the stream is being processed. + * If the match set of the pattern changes during processing, the contents of the stream is undefined. + * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. + * + * @return the Stream of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOftrain(final Segment pLocation, final Segment pEnd) { + return rawStreamAllValuesOftrain(new Object[]{null, pLocation, pEnd}); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain(final EndOfSiding_step_5.Match partialMatch) { + return rawStreamAllValuesOftrain(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain(final Segment pLocation, final Segment pEnd) { + return rawStreamAllValuesOftrain(new Object[]{null, pLocation, pEnd}).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOflocation(final Object[] parameters) { + return rawStreamAllValues(POSITION_LOCATION, parameters).map(Segment.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation() { + return rawStreamAllValuesOflocation(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOflocation() { + return rawStreamAllValuesOflocation(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for location. + *

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

    + * NOTE: It is important not to modify the source model while the stream is being processed. + * If the match set of the pattern changes during processing, the contents of the stream is undefined. + * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. + * + * @return the Stream of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOflocation(final Train pTrain, final Segment pEnd) { + return rawStreamAllValuesOflocation(new Object[]{pTrain, null, pEnd}); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation(final EndOfSiding_step_5.Match partialMatch) { + return rawStreamAllValuesOflocation(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation(final Train pTrain, final Segment pEnd) { + return rawStreamAllValuesOflocation(new Object[]{pTrain, null, pEnd}).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for end. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfend(final Object[] parameters) { + return rawStreamAllValues(POSITION_END, parameters).map(Segment.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for end. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfend() { + return rawStreamAllValuesOfend(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for end. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfend() { + return rawStreamAllValuesOfend(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for end. + *

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

    + * NOTE: It is important not to modify the source model while the stream is being processed. + * If the match set of the pattern changes during processing, the contents of the stream is undefined. + * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. + * + * @return the Stream of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfend(final Train pTrain, final Segment pLocation) { + return rawStreamAllValuesOfend(new Object[]{pTrain, pLocation, null}); + } + + /** + * Retrieve the set of values that occur in matches for end. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfend(final EndOfSiding_step_5.Match partialMatch) { + return rawStreamAllValuesOfend(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for end. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfend(final Train pTrain, final Segment pLocation) { + return rawStreamAllValuesOfend(new Object[]{pTrain, pLocation, null}).collect(Collectors.toSet()); + } + + @Override + protected EndOfSiding_step_5.Match tupleToMatch(final Tuple t) { + try { + return EndOfSiding_step_5.Match.newMatch((Train) t.get(POSITION_TRAIN), (Segment) t.get(POSITION_LOCATION), (Segment) t.get(POSITION_END)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected EndOfSiding_step_5.Match arrayToMatch(final Object[] match) { + try { + return EndOfSiding_step_5.Match.newMatch((Train) match[POSITION_TRAIN], (Segment) match[POSITION_LOCATION], (Segment) match[POSITION_END]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected EndOfSiding_step_5.Match arrayToMatchMutable(final Object[] match) { + try { + return EndOfSiding_step_5.Match.newMutableMatch((Train) match[POSITION_TRAIN], (Segment) match[POSITION_LOCATION], (Segment) match[POSITION_END]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + /** + * @return the singleton instance of the query specification of this pattern + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static IQuerySpecification querySpecification() { + return EndOfSiding_step_5.instance(); + } + } + + private EndOfSiding_step_5() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static EndOfSiding_step_5 instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected EndOfSiding_step_5.Matcher instantiate(final ViatraQueryEngine engine) { + return EndOfSiding_step_5.Matcher.on(engine); + } + + @Override + public EndOfSiding_step_5.Matcher instantiate() { + return EndOfSiding_step_5.Matcher.create(); + } + + @Override + public EndOfSiding_step_5.Match newEmptyMatch() { + return EndOfSiding_step_5.Match.newEmptyMatch(); + } + + @Override + public EndOfSiding_step_5.Match newMatch(final Object... parameters) { + return EndOfSiding_step_5.Match.newMatch((modes3.Train) parameters[0], (modes3.Segment) parameters[1], (modes3.Segment) parameters[2]); + } + + /** + * Inner class allowing the singleton instance of {@link EndOfSiding_step_5} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link EndOfSiding_step_5#instance()}. + * + *

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

    The static initializer is defined using a helper field to work around limitations of the code generator. + * + */ + private static final Object STATIC_INITIALIZER = ensureInitialized(); + + public static Object ensureInitialized() { + INSTANCE.ensureInitializedInternal(); + return null; + } + } + + private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { + private static final EndOfSiding_step_5.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_train = new PParameter("train", "modes3.Train", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Train")), PParameterDirection.INOUT); + + private final PParameter parameter_location = new PParameter("location", "modes3.Segment", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Segment")), PParameterDirection.INOUT); + + private final PParameter parameter_end = new PParameter("end", "modes3.Segment", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Segment")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_train, parameter_location, parameter_end); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "modes3.queries.endOfSiding_step_5"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("train","location","end"); + } + + @Override + public List getParameters() { + return parameters; + } + + @Override + public Set doGetContainedBodies() { + setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); + Set bodies = new LinkedHashSet<>(); + { + PBody body = new PBody(this); + PVariable var_train = body.getOrCreateVariableByName("train"); + PVariable var_location = body.getOrCreateVariableByName("location"); + PVariable var_end = body.getOrCreateVariableByName("end"); + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_location), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_end), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_train, parameter_train), + new ExportedParameter(body, var_location, parameter_location), + new ExportedParameter(body, var_end, parameter_end) + )); + // // results->matches[match_cntr].location = frame->location;// results->matches[match_cntr++].train = frame->train;// ...OR...// results->matches[match_cntr].location = frame->location;// results->matches[match_cntr++].train = frame->train; Train(train) + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + // Train.location(train, location) + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_train, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train", "location"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + new Equality(body, var__virtual_0_, var_location); + // Segment.connectedTo(location, end) + new TypeConstraint(body, Tuples.flatTupleOf(var_location), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_location, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment", "connectedTo"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + new Equality(body, var__virtual_1_, var_end); + // neg find multipleConnectedTo(end) + new NegativePatternCall(body, Tuples.flatTupleOf(var_end), MultipleConnectedTo.instance().getInternalQueryRepresentation()); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Modes3Queries.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Modes3Queries.java index 6e244430..d1238d61 100644 --- a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Modes3Queries.java +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/Modes3Queries.java @@ -4,16 +4,34 @@ package modes3.queries; import modes3.queries.Adjacent; +import modes3.queries.CloseTrains_step_2; +import modes3.queries.CloseTrains_step_3; +import modes3.queries.CloseTrains_step_4; +import modes3.queries.CloseTrains_step_5; +import modes3.queries.CloseTrains_step_6; +import modes3.queries.CloseTrains_step_7; +import modes3.queries.ConnectedSegmentsDirected; import modes3.queries.ConnectedTo; import modes3.queries.ConnectedToNotSymmetric; import modes3.queries.ConnectedToReflexive; +import modes3.queries.EndOfSiding_step_2; +import modes3.queries.EndOfSiding_step_3; +import modes3.queries.EndOfSiding_step_4; +import modes3.queries.EndOfSiding_step_5; import modes3.queries.InputsOfTurnout; +import modes3.queries.MisalignedTurnout_step_2; +import modes3.queries.MisalignedTurnout_step_3; +import modes3.queries.MisalignedTurnout_step_4; +import modes3.queries.MisalignedTurnout_step_5; +import modes3.queries.MultipleConnectedTo; import modes3.queries.Output; import modes3.queries.OutputReflexive; import modes3.queries.Reachable; import modes3.queries.TooFewInputsOfTurnout; import modes3.queries.TooManyInputsOfSegment; import modes3.queries.TooManyInputsOfTurnout; +import modes3.queries.TrainLocations_step_2; +import modes3.queries.TrainLocations_step_3; import modes3.queries.TurnoutConnectedToBothOutputs; import modes3.queries.TurnoutOutput; import modes3.queries.TurnoutOutputsAreSame; @@ -44,6 +62,24 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; *

  • tooFewInputsOfTurnout
  • *
  • reachable
  • *
  • unreachable
  • + *
  • closeTrains_step_2
  • + *
  • closeTrains_step_3
  • + *
  • closeTrains_step_4
  • + *
  • closeTrains_step_5
  • + *
  • closeTrains_step_6
  • + *
  • closeTrains_step_7
  • + *
  • trainLocations_step_2
  • + *
  • trainLocations_step_3
  • + *
  • misalignedTurnout_step_2
  • + *
  • misalignedTurnout_step_3
  • + *
  • misalignedTurnout_step_4
  • + *
  • misalignedTurnout_step_5
  • + *
  • connectedSegmentsDirected
  • + *
  • endOfSiding_step_2
  • + *
  • endOfSiding_step_3
  • + *
  • endOfSiding_step_4
  • + *
  • endOfSiding_step_5
  • + *
  • multipleConnectedTo
  • * * * @see IQueryGroup @@ -83,6 +119,24 @@ public final class Modes3Queries extends BaseGeneratedPatternGroup { querySpecifications.add(TooFewInputsOfTurnout.instance()); querySpecifications.add(Reachable.instance()); querySpecifications.add(Unreachable.instance()); + querySpecifications.add(CloseTrains_step_2.instance()); + querySpecifications.add(CloseTrains_step_3.instance()); + querySpecifications.add(CloseTrains_step_4.instance()); + querySpecifications.add(CloseTrains_step_5.instance()); + querySpecifications.add(CloseTrains_step_6.instance()); + querySpecifications.add(CloseTrains_step_7.instance()); + querySpecifications.add(TrainLocations_step_2.instance()); + querySpecifications.add(TrainLocations_step_3.instance()); + querySpecifications.add(MisalignedTurnout_step_2.instance()); + querySpecifications.add(MisalignedTurnout_step_3.instance()); + querySpecifications.add(MisalignedTurnout_step_4.instance()); + querySpecifications.add(MisalignedTurnout_step_5.instance()); + querySpecifications.add(ConnectedSegmentsDirected.instance()); + querySpecifications.add(EndOfSiding_step_2.instance()); + querySpecifications.add(EndOfSiding_step_3.instance()); + querySpecifications.add(EndOfSiding_step_4.instance()); + querySpecifications.add(EndOfSiding_step_5.instance()); + querySpecifications.add(MultipleConnectedTo.instance()); } public ConnectedTo getConnectedTo() { @@ -204,4 +258,148 @@ public final class Modes3Queries extends BaseGeneratedPatternGroup { public Unreachable.Matcher getUnreachable(final ViatraQueryEngine engine) { return Unreachable.Matcher.on(engine); } + + public CloseTrains_step_2 getCloseTrains_step_2() { + return CloseTrains_step_2.instance(); + } + + public CloseTrains_step_2.Matcher getCloseTrains_step_2(final ViatraQueryEngine engine) { + return CloseTrains_step_2.Matcher.on(engine); + } + + public CloseTrains_step_3 getCloseTrains_step_3() { + return CloseTrains_step_3.instance(); + } + + public CloseTrains_step_3.Matcher getCloseTrains_step_3(final ViatraQueryEngine engine) { + return CloseTrains_step_3.Matcher.on(engine); + } + + public CloseTrains_step_4 getCloseTrains_step_4() { + return CloseTrains_step_4.instance(); + } + + public CloseTrains_step_4.Matcher getCloseTrains_step_4(final ViatraQueryEngine engine) { + return CloseTrains_step_4.Matcher.on(engine); + } + + public CloseTrains_step_5 getCloseTrains_step_5() { + return CloseTrains_step_5.instance(); + } + + public CloseTrains_step_5.Matcher getCloseTrains_step_5(final ViatraQueryEngine engine) { + return CloseTrains_step_5.Matcher.on(engine); + } + + public CloseTrains_step_6 getCloseTrains_step_6() { + return CloseTrains_step_6.instance(); + } + + public CloseTrains_step_6.Matcher getCloseTrains_step_6(final ViatraQueryEngine engine) { + return CloseTrains_step_6.Matcher.on(engine); + } + + public CloseTrains_step_7 getCloseTrains_step_7() { + return CloseTrains_step_7.instance(); + } + + public CloseTrains_step_7.Matcher getCloseTrains_step_7(final ViatraQueryEngine engine) { + return CloseTrains_step_7.Matcher.on(engine); + } + + public TrainLocations_step_2 getTrainLocations_step_2() { + return TrainLocations_step_2.instance(); + } + + public TrainLocations_step_2.Matcher getTrainLocations_step_2(final ViatraQueryEngine engine) { + return TrainLocations_step_2.Matcher.on(engine); + } + + public TrainLocations_step_3 getTrainLocations_step_3() { + return TrainLocations_step_3.instance(); + } + + public TrainLocations_step_3.Matcher getTrainLocations_step_3(final ViatraQueryEngine engine) { + return TrainLocations_step_3.Matcher.on(engine); + } + + public MisalignedTurnout_step_2 getMisalignedTurnout_step_2() { + return MisalignedTurnout_step_2.instance(); + } + + public MisalignedTurnout_step_2.Matcher getMisalignedTurnout_step_2(final ViatraQueryEngine engine) { + return MisalignedTurnout_step_2.Matcher.on(engine); + } + + public MisalignedTurnout_step_3 getMisalignedTurnout_step_3() { + return MisalignedTurnout_step_3.instance(); + } + + public MisalignedTurnout_step_3.Matcher getMisalignedTurnout_step_3(final ViatraQueryEngine engine) { + return MisalignedTurnout_step_3.Matcher.on(engine); + } + + public MisalignedTurnout_step_4 getMisalignedTurnout_step_4() { + return MisalignedTurnout_step_4.instance(); + } + + public MisalignedTurnout_step_4.Matcher getMisalignedTurnout_step_4(final ViatraQueryEngine engine) { + return MisalignedTurnout_step_4.Matcher.on(engine); + } + + public MisalignedTurnout_step_5 getMisalignedTurnout_step_5() { + return MisalignedTurnout_step_5.instance(); + } + + public MisalignedTurnout_step_5.Matcher getMisalignedTurnout_step_5(final ViatraQueryEngine engine) { + return MisalignedTurnout_step_5.Matcher.on(engine); + } + + public ConnectedSegmentsDirected getConnectedSegmentsDirected() { + return ConnectedSegmentsDirected.instance(); + } + + public ConnectedSegmentsDirected.Matcher getConnectedSegmentsDirected(final ViatraQueryEngine engine) { + return ConnectedSegmentsDirected.Matcher.on(engine); + } + + public EndOfSiding_step_2 getEndOfSiding_step_2() { + return EndOfSiding_step_2.instance(); + } + + public EndOfSiding_step_2.Matcher getEndOfSiding_step_2(final ViatraQueryEngine engine) { + return EndOfSiding_step_2.Matcher.on(engine); + } + + public EndOfSiding_step_3 getEndOfSiding_step_3() { + return EndOfSiding_step_3.instance(); + } + + public EndOfSiding_step_3.Matcher getEndOfSiding_step_3(final ViatraQueryEngine engine) { + return EndOfSiding_step_3.Matcher.on(engine); + } + + public EndOfSiding_step_4 getEndOfSiding_step_4() { + return EndOfSiding_step_4.instance(); + } + + public EndOfSiding_step_4.Matcher getEndOfSiding_step_4(final ViatraQueryEngine engine) { + return EndOfSiding_step_4.Matcher.on(engine); + } + + public EndOfSiding_step_5 getEndOfSiding_step_5() { + return EndOfSiding_step_5.instance(); + } + + public EndOfSiding_step_5.Matcher getEndOfSiding_step_5(final ViatraQueryEngine engine) { + return EndOfSiding_step_5.Matcher.on(engine); + } + + public MultipleConnectedTo getMultipleConnectedTo() { + return MultipleConnectedTo.instance(); + } + + public MultipleConnectedTo.Matcher getMultipleConnectedTo(final ViatraQueryEngine engine) { + return MultipleConnectedTo.Matcher.on(engine); + } } diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/MultipleConnectedTo.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/MultipleConnectedTo.java new file mode 100644 index 00000000..277006c9 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/MultipleConnectedTo.java @@ -0,0 +1,565 @@ +/** + * Generated from platform:/resource/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql + */ +package modes3.queries; + +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import modes3.Segment; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; +import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; + +/** + * A pattern-specific query specification that can instantiate Matcher in a type-safe way. + * + *

    Original source: + *

    + *         pattern multipleConnectedTo(s : Segment) {
    + *         	Segment.connectedTo(s, n1);
    + *         	Segment.connectedTo(s, n2);
    + *         	n1 != n2;
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class MultipleConnectedTo extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the modes3.queries.multipleConnectedTo pattern, + * to be used in conjunction with {@link Matcher}. + * + *

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

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pS the fixed value of pattern parameter s, or null if not bound. + * @return the (partial) match object. + * + */ + public static MultipleConnectedTo.Match newMatch(final Segment pS) { + return new Immutable(pS); + } + + private static final class Mutable extends MultipleConnectedTo.Match { + Mutable(final Segment pS) { + super(pS); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends MultipleConnectedTo.Match { + Immutable(final Segment pS) { + super(pS); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the modes3.queries.multipleConnectedTo pattern, + * providing pattern-specific query methods. + * + *

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

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

    Original source: + *

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

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

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pS the fixed value of pattern parameter s, or null if not bound. + * @return the (partial) match object. + * + */ + public MultipleConnectedTo.Match newMatch(final Segment pS) { + return MultipleConnectedTo.Match.newMatch(pS); + } + + /** + * Retrieve the set of values that occur in matches for s. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfs(final Object[] parameters) { + return rawStreamAllValues(POSITION_S, parameters).map(Segment.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for s. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfs() { + return rawStreamAllValuesOfs(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for s. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfs() { + return rawStreamAllValuesOfs(emptyArray()); + } + + @Override + protected MultipleConnectedTo.Match tupleToMatch(final Tuple t) { + try { + return MultipleConnectedTo.Match.newMatch((Segment) t.get(POSITION_S)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected MultipleConnectedTo.Match arrayToMatch(final Object[] match) { + try { + return MultipleConnectedTo.Match.newMatch((Segment) match[POSITION_S]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected MultipleConnectedTo.Match arrayToMatchMutable(final Object[] match) { + try { + return MultipleConnectedTo.Match.newMutableMatch((Segment) match[POSITION_S]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + /** + * @return the singleton instance of the query specification of this pattern + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static IQuerySpecification querySpecification() { + return MultipleConnectedTo.instance(); + } + } + + private MultipleConnectedTo() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static MultipleConnectedTo instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected MultipleConnectedTo.Matcher instantiate(final ViatraQueryEngine engine) { + return MultipleConnectedTo.Matcher.on(engine); + } + + @Override + public MultipleConnectedTo.Matcher instantiate() { + return MultipleConnectedTo.Matcher.create(); + } + + @Override + public MultipleConnectedTo.Match newEmptyMatch() { + return MultipleConnectedTo.Match.newEmptyMatch(); + } + + @Override + public MultipleConnectedTo.Match newMatch(final Object... parameters) { + return MultipleConnectedTo.Match.newMatch((modes3.Segment) parameters[0]); + } + + /** + * Inner class allowing the singleton instance of {@link MultipleConnectedTo} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link MultipleConnectedTo#instance()}. + * + *

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

    The static initializer is defined using a helper field to work around limitations of the code generator. + * + */ + private static final Object STATIC_INITIALIZER = ensureInitialized(); + + public static Object ensureInitialized() { + INSTANCE.ensureInitializedInternal(); + return null; + } + } + + private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { + private static final MultipleConnectedTo.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_s = new PParameter("s", "modes3.Segment", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Segment")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_s); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "modes3.queries.multipleConnectedTo"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("s"); + } + + @Override + public List getParameters() { + return parameters; + } + + @Override + public Set doGetContainedBodies() { + setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); + Set bodies = new LinkedHashSet<>(); + { + PBody body = new PBody(this); + PVariable var_s = body.getOrCreateVariableByName("s"); + PVariable var_n1 = body.getOrCreateVariableByName("n1"); + PVariable var_n2 = body.getOrCreateVariableByName("n2"); + new TypeConstraint(body, Tuples.flatTupleOf(var_s), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_s, parameter_s) + )); + // Segment.connectedTo(s, n1) + new TypeConstraint(body, Tuples.flatTupleOf(var_s), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_s, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment", "connectedTo"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + new Equality(body, var__virtual_0_, var_n1); + // Segment.connectedTo(s, n2) + new TypeConstraint(body, Tuples.flatTupleOf(var_s), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_s, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment", "connectedTo"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + new Equality(body, var__virtual_1_, var_n2); + // n1 != n2 + new Inequality(body, var_n1, var_n2); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfSegment.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfSegment.java index ff82dda1..d12ec23e 100644 --- a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfSegment.java +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TooManyInputsOfSegment.java @@ -46,12 +46,6 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; * *

    Original source: *

    - *         //{@literal @}Constraint(message = "noInputOfSegment", severity = "error", key = { S })
    - *         //pattern noInputOfSegment(S : Segment) {
    - *         //	neg find turnout(S);
    - *         //	neg find output(_, S);
    - *         //}
    - *         
      *         {@literal @}Constraint(message = "tooManyInputsOfSegment", severity = "error", key = { S })
      *         pattern tooManyInputsOfSegment(S : SimpleSegment) {
      *         	find output(I1, S);
    @@ -251,12 +245,6 @@ public final class TooManyInputsOfSegment extends BaseGeneratedEMFQuerySpecifica
        * 
        * 

    Original source: *

    -   * //{@literal @}Constraint(message = "noInputOfSegment", severity = "error", key = { S })
    -   * //pattern noInputOfSegment(S : Segment) {
    -   * //	neg find turnout(S);
    -   * //	neg find output(_, S);
    -   * //}
    -   * 
        * {@literal @}Constraint(message = "tooManyInputsOfSegment", severity = "error", key = { S })
        * pattern tooManyInputsOfSegment(S : SimpleSegment) {
        * 	find output(I1, S);
    diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TrainLocations_step_2.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TrainLocations_step_2.java
    new file mode 100644
    index 00000000..5bf153c3
    --- /dev/null
    +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TrainLocations_step_2.java
    @@ -0,0 +1,564 @@
    +/**
    + * Generated from platform:/resource/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql
    + */
    +package modes3.queries;
    +
    +import java.util.Arrays;
    +import java.util.Collection;
    +import java.util.LinkedHashSet;
    +import java.util.List;
    +import java.util.Objects;
    +import java.util.Optional;
    +import java.util.Set;
    +import java.util.function.Consumer;
    +import java.util.stream.Collectors;
    +import java.util.stream.Stream;
    +import modes3.Train;
    +import org.apache.log4j.Logger;
    +import org.eclipse.emf.ecore.EClass;
    +import org.eclipse.viatra.query.runtime.api.IPatternMatch;
    +import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
    +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
    +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
    +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
    +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
    +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
    +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
    +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
    +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
    +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
    +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
    +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
    +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
    +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
    +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
    +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
    +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
    +import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
    +
    +/**
    + * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
    + * 
    + * 

    Original source: + *

    + *         //
    + *         // trainLocations
    + *         //
    + *         
    + *         pattern trainLocations_step_2(in train : Train) {
    + *         //   frame-{@literal >}train = model-{@literal >}trains[i0];
    + *         //   frame-{@literal >}location = frame-{@literal >}train-{@literal >}location;
    + *         //   if (frame-{@literal >}location != NULL) {
    + *         //     ...
    + *         //   }
    + *         
    + *         	Train(train);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class TrainLocations_step_2 extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the modes3.queries.trainLocations_step_2 pattern, + * to be used in conjunction with {@link Matcher}. + * + *

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

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @return the (partial) match object. + * + */ + public static TrainLocations_step_2.Match newMatch(final Train pTrain) { + return new Immutable(pTrain); + } + + private static final class Mutable extends TrainLocations_step_2.Match { + Mutable(final Train pTrain) { + super(pTrain); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends TrainLocations_step_2.Match { + Immutable(final Train pTrain) { + super(pTrain); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the modes3.queries.trainLocations_step_2 pattern, + * providing pattern-specific query methods. + * + *

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

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

    Original source: + *

    +   * //
    +   * // trainLocations
    +   * //
    +   * 
    +   * pattern trainLocations_step_2(in train : Train) {
    +   * //   frame-{@literal >}train = model-{@literal >}trains[i0];
    +   * //   frame-{@literal >}location = frame-{@literal >}train-{@literal >}location;
    +   * //   if (frame-{@literal >}location != NULL) {
    +   * //     ...
    +   * //   }
    +   * 
    +   * 	Train(train);
    +   * }
    +   * 
    + * + * @see Match + * @see TrainLocations_step_2 + * + */ + public static class Matcher extends BaseMatcher { + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + public static TrainLocations_step_2.Matcher on(final ViatraQueryEngine engine) { + // check if matcher already exists + Matcher matcher = engine.getExistingMatcher(querySpecification()); + if (matcher == null) { + matcher = (Matcher)engine.getMatcher(querySpecification()); + } + return matcher; + } + + /** + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * @return an initialized matcher + * @noreference This method is for internal matcher initialization by the framework, do not call it manually. + * + */ + public static TrainLocations_step_2.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_TRAIN = 0; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(TrainLocations_step_2.Matcher.class); + + /** + * Initializes the pattern matcher within an existing VIATRA Query engine. + * If the pattern matcher is already constructed in the engine, only a light-weight reference is returned. + * + * @param engine the existing VIATRA Query engine in which this matcher will be created. + * @throws ViatraQueryRuntimeException if an error occurs during pattern matcher creation + * + */ + private Matcher() { + super(querySpecification()); + } + + /** + * Returns the set of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final Train pTrain) { + return rawStreamAllMatches(new Object[]{pTrain}).collect(Collectors.toSet()); + } + + /** + * Returns a stream of all matches of the pattern that conform to the given fixed values of some parameters. + *

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

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @return the (partial) match object. + * + */ + public TrainLocations_step_2.Match newMatch(final Train pTrain) { + return TrainLocations_step_2.Match.newMatch(pTrain); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOftrain(final Object[] parameters) { + return rawStreamAllValues(POSITION_TRAIN, parameters).map(Train.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()); + } + + @Override + protected TrainLocations_step_2.Match tupleToMatch(final Tuple t) { + try { + return TrainLocations_step_2.Match.newMatch((Train) t.get(POSITION_TRAIN)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected TrainLocations_step_2.Match arrayToMatch(final Object[] match) { + try { + return TrainLocations_step_2.Match.newMatch((Train) match[POSITION_TRAIN]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected TrainLocations_step_2.Match arrayToMatchMutable(final Object[] match) { + try { + return TrainLocations_step_2.Match.newMutableMatch((Train) match[POSITION_TRAIN]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + /** + * @return the singleton instance of the query specification of this pattern + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static IQuerySpecification querySpecification() { + return TrainLocations_step_2.instance(); + } + } + + private TrainLocations_step_2() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static TrainLocations_step_2 instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected TrainLocations_step_2.Matcher instantiate(final ViatraQueryEngine engine) { + return TrainLocations_step_2.Matcher.on(engine); + } + + @Override + public TrainLocations_step_2.Matcher instantiate() { + return TrainLocations_step_2.Matcher.create(); + } + + @Override + public TrainLocations_step_2.Match newEmptyMatch() { + return TrainLocations_step_2.Match.newEmptyMatch(); + } + + @Override + public TrainLocations_step_2.Match newMatch(final Object... parameters) { + return TrainLocations_step_2.Match.newMatch((modes3.Train) parameters[0]); + } + + /** + * Inner class allowing the singleton instance of {@link TrainLocations_step_2} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link TrainLocations_step_2#instance()}. + * + *

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

    The static initializer is defined using a helper field to work around limitations of the code generator. + * + */ + private static final Object STATIC_INITIALIZER = ensureInitialized(); + + public static Object ensureInitialized() { + INSTANCE.ensureInitializedInternal(); + return null; + } + } + + private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { + private static final TrainLocations_step_2.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_train = new PParameter("train", "modes3.Train", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Train")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_train); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "modes3.queries.trainLocations_step_2"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("train"); + } + + @Override + public List getParameters() { + return parameters; + } + + @Override + public Set doGetContainedBodies() { + setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); + Set bodies = new LinkedHashSet<>(); + { + PBody body = new PBody(this); + PVariable var_train = body.getOrCreateVariableByName("train"); + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_train, parameter_train) + )); + // // frame->train = model->trains[i0];// frame->location = frame->train->location;// if (frame->location != NULL) {// ...// } Train(train) + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TrainLocations_step_3.java b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TrainLocations_step_3.java new file mode 100644 index 00000000..edbd4af3 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/vql-gen/modes3/queries/TrainLocations_step_3.java @@ -0,0 +1,713 @@ +/** + * Generated from platform:/resource/ca.mcgill.rtgmrt.example.modes3/src/modes3/queries/Modes3Queries.vql + */ +package modes3.queries; + +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import modes3.Segment; +import modes3.Train; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; +import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; + +/** + * A pattern-specific query specification that can instantiate Matcher in a type-safe way. + * + *

    Original source: + *

    + *         pattern trainLocations_step_3(in train : Train, in location : Segment) {
    + *         //     results-{@literal >}matches[match_cntr].location = frame-{@literal >}location;
    + *         //     results-{@literal >}matches[match_cntr++].train = frame-{@literal >}train;
    + *         	Train(train);
    + *             Train.location(train, location);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class TrainLocations_step_3 extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the modes3.queries.trainLocations_step_3 pattern, + * to be used in conjunction with {@link Matcher}. + * + *

    Class fields correspond to parameters of the pattern. Fields with value null are considered unassigned. + * Each instance is a (possibly partial) substitution of pattern parameters, + * usable to represent a match of the pattern in the result of a query, + * or to specify the bound (fixed) input parameters when issuing a query. + * + * @see Matcher + * + */ + public static abstract class Match extends BasePatternMatch { + private Train fTrain; + + private Segment fLocation; + + private static List parameterNames = makeImmutableList("train", "location"); + + private Match(final Train pTrain, final Segment pLocation) { + this.fTrain = pTrain; + this.fLocation = pLocation; + } + + @Override + public Object get(final String parameterName) { + switch(parameterName) { + case "train": return this.fTrain; + case "location": return this.fLocation; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fTrain; + case 1: return this.fLocation; + default: return null; + } + } + + public Train getTrain() { + return this.fTrain; + } + + public Segment getLocation() { + return this.fLocation; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("train".equals(parameterName) ) { + this.fTrain = (Train) newValue; + return true; + } + if ("location".equals(parameterName) ) { + this.fLocation = (Segment) newValue; + return true; + } + return false; + } + + public void setTrain(final Train pTrain) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fTrain = pTrain; + } + + public void setLocation(final Segment pLocation) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fLocation = pLocation; + } + + @Override + public String patternName() { + return "modes3.queries.trainLocations_step_3"; + } + + @Override + public List parameterNames() { + return TrainLocations_step_3.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fTrain, fLocation}; + } + + @Override + public TrainLocations_step_3.Match toImmutable() { + return isMutable() ? newMatch(fTrain, fLocation) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"train\"=" + prettyPrintValue(fTrain) + ", "); + result.append("\"location\"=" + prettyPrintValue(fLocation)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fTrain, fLocation); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof TrainLocations_step_3.Match)) { + TrainLocations_step_3.Match other = (TrainLocations_step_3.Match) obj; + return Objects.equals(fTrain, other.fTrain) && Objects.equals(fLocation, other.fLocation); + } else { + // this should be infrequent + if (!(obj instanceof IPatternMatch)) { + return false; + } + IPatternMatch otherSig = (IPatternMatch) obj; + return Objects.equals(specification(), otherSig.specification()) && Arrays.deepEquals(toArray(), otherSig.toArray()); + } + } + + @Override + public TrainLocations_step_3 specification() { + return TrainLocations_step_3.instance(); + } + + /** + * Returns an empty, mutable match. + * Fields of the mutable match can be filled to create a partial match, usable as matcher input. + * + * @return the empty match. + * + */ + public static TrainLocations_step_3.Match newEmptyMatch() { + return new Mutable(null, null); + } + + /** + * Returns a mutable (partial) match. + * Fields of the mutable match can be filled to create a partial match, usable as matcher input. + * + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static TrainLocations_step_3.Match newMutableMatch(final Train pTrain, final Segment pLocation) { + return new Mutable(pTrain, pLocation); + } + + /** + * Returns a new (partial) match. + * This can be used e.g. to call the matcher with a partial match. + *

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @return the (partial) match object. + * + */ + public static TrainLocations_step_3.Match newMatch(final Train pTrain, final Segment pLocation) { + return new Immutable(pTrain, pLocation); + } + + private static final class Mutable extends TrainLocations_step_3.Match { + Mutable(final Train pTrain, final Segment pLocation) { + super(pTrain, pLocation); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends TrainLocations_step_3.Match { + Immutable(final Train pTrain, final Segment pLocation) { + super(pTrain, pLocation); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the modes3.queries.trainLocations_step_3 pattern, + * providing pattern-specific query methods. + * + *

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

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

    Original source: + *

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

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

    The returned match will be immutable. Use {@link #newEmptyMatch()} to obtain a mutable match object. + * @param pTrain the fixed value of pattern parameter train, or null if not bound. + * @param pLocation the fixed value of pattern parameter location, or null if not bound. + * @return the (partial) match object. + * + */ + public TrainLocations_step_3.Match newMatch(final Train pTrain, final Segment pLocation) { + return TrainLocations_step_3.Match.newMatch(pTrain, pLocation); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOftrain(final Object[] parameters) { + return rawStreamAllValues(POSITION_TRAIN, parameters).map(Train.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOftrain() { + return rawStreamAllValuesOftrain(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for train. + *

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

    + * NOTE: It is important not to modify the source model while the stream is being processed. + * If the match set of the pattern changes during processing, the contents of the stream is undefined. + * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. + * + * @return the Stream of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOftrain(final Segment pLocation) { + return rawStreamAllValuesOftrain(new Object[]{null, pLocation}); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain(final TrainLocations_step_3.Match partialMatch) { + return rawStreamAllValuesOftrain(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for train. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOftrain(final Segment pLocation) { + return rawStreamAllValuesOftrain(new Object[]{null, pLocation}).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOflocation(final Object[] parameters) { + return rawStreamAllValues(POSITION_LOCATION, parameters).map(Segment.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation() { + return rawStreamAllValuesOflocation(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOflocation() { + return rawStreamAllValuesOflocation(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for location. + *

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

    + * NOTE: It is important not to modify the source model while the stream is being processed. + * If the match set of the pattern changes during processing, the contents of the stream is undefined. + * In such cases, either rely on {@link #getAllMatches()} or collect the results of the stream in end-user code. + * + * @return the Stream of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOflocation(final Train pTrain) { + return rawStreamAllValuesOflocation(new Object[]{pTrain, null}); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation(final TrainLocations_step_3.Match partialMatch) { + return rawStreamAllValuesOflocation(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for location. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOflocation(final Train pTrain) { + return rawStreamAllValuesOflocation(new Object[]{pTrain, null}).collect(Collectors.toSet()); + } + + @Override + protected TrainLocations_step_3.Match tupleToMatch(final Tuple t) { + try { + return TrainLocations_step_3.Match.newMatch((Train) t.get(POSITION_TRAIN), (Segment) t.get(POSITION_LOCATION)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected TrainLocations_step_3.Match arrayToMatch(final Object[] match) { + try { + return TrainLocations_step_3.Match.newMatch((Train) match[POSITION_TRAIN], (Segment) match[POSITION_LOCATION]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected TrainLocations_step_3.Match arrayToMatchMutable(final Object[] match) { + try { + return TrainLocations_step_3.Match.newMutableMatch((Train) match[POSITION_TRAIN], (Segment) match[POSITION_LOCATION]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + /** + * @return the singleton instance of the query specification of this pattern + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static IQuerySpecification querySpecification() { + return TrainLocations_step_3.instance(); + } + } + + private TrainLocations_step_3() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static TrainLocations_step_3 instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected TrainLocations_step_3.Matcher instantiate(final ViatraQueryEngine engine) { + return TrainLocations_step_3.Matcher.on(engine); + } + + @Override + public TrainLocations_step_3.Matcher instantiate() { + return TrainLocations_step_3.Matcher.create(); + } + + @Override + public TrainLocations_step_3.Match newEmptyMatch() { + return TrainLocations_step_3.Match.newEmptyMatch(); + } + + @Override + public TrainLocations_step_3.Match newMatch(final Object... parameters) { + return TrainLocations_step_3.Match.newMatch((modes3.Train) parameters[0], (modes3.Segment) parameters[1]); + } + + /** + * Inner class allowing the singleton instance of {@link TrainLocations_step_3} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link TrainLocations_step_3#instance()}. + * + *

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

    The static initializer is defined using a helper field to work around limitations of the code generator. + * + */ + private static final Object STATIC_INITIALIZER = ensureInitialized(); + + public static Object ensureInitialized() { + INSTANCE.ensureInitializedInternal(); + return null; + } + } + + private static class GeneratedPQuery extends BaseGeneratedEMFPQuery { + private static final TrainLocations_step_3.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_train = new PParameter("train", "modes3.Train", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Train")), PParameterDirection.INOUT); + + private final PParameter parameter_location = new PParameter("location", "modes3.Segment", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.ece.mcgill.ca/wcet/modes3", "Segment")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_train, parameter_location); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "modes3.queries.trainLocations_step_3"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("train","location"); + } + + @Override + public List getParameters() { + return parameters; + } + + @Override + public Set doGetContainedBodies() { + setEvaluationHints(new QueryEvaluationHint(null, QueryEvaluationHint.BackendRequirement.UNSPECIFIED)); + Set bodies = new LinkedHashSet<>(); + { + PBody body = new PBody(this); + PVariable var_train = body.getOrCreateVariableByName("train"); + PVariable var_location = body.getOrCreateVariableByName("location"); + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_location), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_train, parameter_train), + new ExportedParameter(body, var_location, parameter_location) + )); + // // results->matches[match_cntr].location = frame->location;// results->matches[match_cntr++].train = frame->train; Train(train) + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + // Train.location(train, location) + new TypeConstraint(body, Tuples.flatTupleOf(var_train), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_train, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Train", "location"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.ece.mcgill.ca/wcet/modes3", "Segment"))); + new Equality(body, var__virtual_0_, var_location); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.CloseTrainsObjectiveHint.xtendbin b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.CloseTrainsObjectiveHint.xtendbin new file mode 100644 index 00000000..87975792 Binary files /dev/null and b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.CloseTrainsObjectiveHint.xtendbin differ diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.EndOfSidingObjectiveHint.xtendbin b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.EndOfSidingObjectiveHint.xtendbin new file mode 100644 index 00000000..f243e180 Binary files /dev/null and b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.EndOfSidingObjectiveHint.xtendbin differ diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.MisalignedTurnoutObjectiveHint.xtendbin b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.MisalignedTurnoutObjectiveHint.xtendbin new file mode 100644 index 00000000..cdef4dc7 Binary files /dev/null and b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.MisalignedTurnoutObjectiveHint.xtendbin differ diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3ModelGenerator.xtendbin b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3ModelGenerator.xtendbin index 77f1ea6e..759ac9e4 100644 Binary files a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3ModelGenerator.xtendbin and b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3ModelGenerator.xtendbin differ diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3TypeScopeHint.xtendbin b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3TypeScopeHint.xtendbin index 4fdbb71b..386baeda 100644 Binary files a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3TypeScopeHint.xtendbin and b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3TypeScopeHint.xtendbin differ diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3UnitPropagationGenerator.xtendbin b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3UnitPropagationGenerator.xtendbin index e5e1b63e..79059b7f 100644 Binary files a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3UnitPropagationGenerator.xtendbin and b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.Modes3UnitPropagationGenerator.xtendbin differ diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.TrainLocationsObjectiveHint.xtendbin b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.TrainLocationsObjectiveHint.xtendbin new file mode 100644 index 00000000..3c3a380e Binary files /dev/null and b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.TrainLocationsObjectiveHint.xtendbin differ diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.gitignore b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.gitignore index fb94df96..1a7df1d9 100644 --- a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.gitignore +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/.gitignore @@ -1,3 +1,13 @@ /.Modes3ModelGenerator.java._trace /.Modes3UnitPropagationGenerator.java._trace /.Modes3TypeScopeHint.java._trace +/.Modes3TypeScopeHint.xtendbin +/.Modes3UnitPropagationGenerator.xtendbin +/Modes3TypeScopeHint.java +/.Modes3ModelGenerator.xtendbin +/Modes3ModelGenerator.java +/Modes3UnitPropagationGenerator.java +/.CloseTrainsObjectiveHint.java._trace +/.TrainLocationsObjectiveHint.java._trace +/.MisalignedTurnoutObjectiveHint.java._trace +/.EndOfSidingObjectiveHint.java._trace diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/CloseTrainsObjectiveHint.java b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/CloseTrainsObjectiveHint.java new file mode 100644 index 00000000..babfa7e1 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/CloseTrainsObjectiveHint.java @@ -0,0 +1,279 @@ +package modes3.run; + +import com.google.common.base.Objects; +import com.google.common.collect.ImmutableList; +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic; +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace; +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.Dimension; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilder; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilderFactory; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronExtensionOperator; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatch; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatchers; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostObjectiveHint; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; +import modes3.Modes3Package; +import modes3.queries.CloseTrains_step_2; +import modes3.queries.CloseTrains_step_3; +import modes3.queries.CloseTrains_step_4; +import modes3.queries.CloseTrains_step_5; +import modes3.queries.CloseTrains_step_6; +import modes3.queries.CloseTrains_step_7; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.xtext.xbase.lib.Extension; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; + +@SuppressWarnings("all") +public class CloseTrainsObjectiveHint extends CostObjectiveHint { + private final Type segmentType; + + private final Type trainType; + + public CloseTrainsObjectiveHint(@Extension final Ecore2Logic ecore2Logic, final Ecore2Logic_Trace ecore2LogicTrace) { + @Extension + final Modes3Package Modes3Package = modes3.Modes3Package.eINSTANCE; + this.segmentType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getSegment()); + this.trainType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getTrain()); + } + + @Override + public boolean isExact() { + return true; + } + + @Override + public PolyhedronExtensionOperator createPolyhedronExtensionOperator(final Map costElementMatchers) { + PolyhedronExtensionOperator _xblockexpression = null; + { + final CostElementMatchers step2 = costElementMatchers.get(CloseTrains_step_2.instance().getFullyQualifiedName()); + final CostElementMatchers step3 = costElementMatchers.get(CloseTrains_step_3.instance().getFullyQualifiedName()); + final CostElementMatchers step4 = costElementMatchers.get(CloseTrains_step_4.instance().getFullyQualifiedName()); + final CostElementMatchers step5 = costElementMatchers.get(CloseTrains_step_5.instance().getFullyQualifiedName()); + final CostElementMatchers step6 = costElementMatchers.get(CloseTrains_step_6.instance().getFullyQualifiedName()); + final CostElementMatchers step7 = costElementMatchers.get(CloseTrains_step_7.instance().getFullyQualifiedName()); + final PolyhedronExtensionOperator _function = (ExtendedLinearExpressionBuilderFactory it) -> { + final ExtendedLinearExpressionBuilder objectiveBuilder = it.createBuilder(); + ImmutableList _matches = step2.getMatches(); + for (final CostElementMatch m : _matches) { + { + final Dimension dimension = it.getDimension(m.getMatch()); + objectiveBuilder.add(step2.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m.isMulti(); + if (_isMulti) { + it.createBuilder().add(1, dimension).add((-1), this.trainType).build().assertEqualsTo(0); + } else { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final ImmutableList step3Matches = step3.getMatches(); + for (final CostElementMatch m_1 : step3Matches) { + { + final Dimension dimension = it.getDimension(m_1.getMatch()); + objectiveBuilder.add(step3.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_1.isMulti(); + boolean _not = (!_isMulti); + if (_not) { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_1.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final Function1 _function_1 = (CostElementMatch it_1) -> { + return step2.projectMayMatch(it_1.getMatch(), 2); + }; + Set>> _entrySet = IterableExtensions.groupBy(step3Matches, _function_1).entrySet(); + for (final Map.Entry> pair : _entrySet) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = it.createBuilder(); + List _value = pair.getValue(); + for (final CostElementMatch m_2 : _value) { + multiplicityBuilder.add(1, m_2.getMatch()); + } + multiplicityBuilder.add((-1), pair.getKey()); + multiplicityBuilder.build().assertEqualsTo(0); + } + } + CloseTrainsObjectiveHint.boundLimit(it, step3Matches, 2, this.trainType, 1); + CloseTrainsObjectiveHint.boundLimit(it, step3Matches, 3, this.segmentType, 1); + final ImmutableList step4Matches = step4.getMatches(); + for (final CostElementMatch m_2 : step4Matches) { + { + final Dimension dimension = it.getDimension(m_2.getMatch()); + objectiveBuilder.add(step4.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_2.isMulti(); + boolean _not = (!_isMulti); + if (_not) { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_2.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final Function1 _function_2 = (CostElementMatch it_1) -> { + return step3.projectMayMatch(it_1.getMatch(), 2, 3); + }; + Set>> _entrySet_1 = IterableExtensions.groupBy(step4Matches, _function_2).entrySet(); + for (final Map.Entry> pair_1 : _entrySet_1) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = it.createBuilder(); + List _value = pair_1.getValue(); + for (final CostElementMatch m_3 : _value) { + multiplicityBuilder.add(1, m_3.getMatch()); + } + multiplicityBuilder.add((-2), pair_1.getKey()); + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(0)); + } + } + CloseTrainsObjectiveHint.boundLimit(it, step4Matches, 2, this.trainType, 2); + CloseTrainsObjectiveHint.boundLimit(it, step4Matches, 3, this.segmentType, 2); + CloseTrainsObjectiveHint.boundLimit(it, step4Matches, 4, this.segmentType, 2); + final ImmutableList step5Matches = step5.getMatches(); + for (final CostElementMatch m_3 : step5Matches) { + { + final Dimension dimension = it.getDimension(m_3.getMatch()); + objectiveBuilder.add(step5.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_3.isMulti(); + boolean _not = (!_isMulti); + if (_not) { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_3.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final Function1 _function_3 = (CostElementMatch it_1) -> { + return step4.projectMayMatch(it_1.getMatch(), 2, 3, 4); + }; + Set>> _entrySet_2 = IterableExtensions.groupBy(step5Matches, _function_3).entrySet(); + for (final Map.Entry> pair_2 : _entrySet_2) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = it.createBuilder(); + List _value = pair_2.getValue(); + for (final CostElementMatch m_4 : _value) { + multiplicityBuilder.add(1, m_4.getMatch()); + } + multiplicityBuilder.add((-2), pair_2.getKey()); + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(0)); + } + } + CloseTrainsObjectiveHint.boundLimit(it, step5Matches, 2, this.trainType, 4); + CloseTrainsObjectiveHint.boundLimit(it, step5Matches, 3, this.segmentType, 4); + CloseTrainsObjectiveHint.boundLimit(it, step5Matches, 4, this.segmentType, 4); + CloseTrainsObjectiveHint.boundLimit(it, step5Matches, 5, this.segmentType, 4); + final ImmutableList step6Matches = step6.getMatches(); + for (final CostElementMatch m_4 : step6Matches) { + { + final Dimension dimension = it.getDimension(m_4.getMatch()); + objectiveBuilder.add(step6.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_4.isMulti(); + if (_isMulti) { + Object _get = m_4.getMatch().get(3); + Object _get_1 = m_4.getMatch().get(5); + boolean _equals = Objects.equal(_get, _get_1); + if (_equals) { + it.createBuilder().add(2, m_4.getMatch()).add((-1), step5.projectMayMatch(m_4.getMatch(), 2, 3, 4, 5)).build().assertEqualsTo(0); + } else { + it.createBuilder().add(1, m_4.getMatch()).add((-1), step5.projectMayMatch(m_4.getMatch(), 2, 3, 4, 5)).build().assertEqualsTo(0); + } + } else { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_4.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + CloseTrainsObjectiveHint.boundLimit(it, step6Matches, 2, this.trainType, 2); + CloseTrainsObjectiveHint.boundLimit(it, step6Matches, 3, this.segmentType, 2); + CloseTrainsObjectiveHint.boundLimit(it, step6Matches, 4, this.segmentType, 2); + CloseTrainsObjectiveHint.boundLimit(it, step6Matches, 5, this.segmentType, 2); + final ImmutableList step7Matches = step7.getMatches(); + for (final CostElementMatch m_5 : step7Matches) { + { + final Dimension dimension = it.getDimension(m_5.getMatch()); + objectiveBuilder.add(step7.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_5.isMulti(); + boolean _not = (!_isMulti); + if (_not) { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_5.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final Function1 _function_4 = (CostElementMatch it_1) -> { + return step6.projectMayMatch(it_1.getMatch(), 2, 3, 4, 5); + }; + Set>> _entrySet_3 = IterableExtensions.groupBy(step7Matches, _function_4).entrySet(); + for (final Map.Entry> pair_3 : _entrySet_3) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = it.createBuilder(); + List _value = pair_3.getValue(); + for (final CostElementMatch m_6 : _value) { + multiplicityBuilder.add(1, m_6.getMatch()); + } + multiplicityBuilder.add((-1), pair_3.getKey()); + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(0)); + } + } + CloseTrainsObjectiveHint.boundLimit(it, step7Matches, 2, this.trainType, 2); + CloseTrainsObjectiveHint.boundLimit(it, step7Matches, 3, this.segmentType, 2); + CloseTrainsObjectiveHint.boundLimit(it, step7Matches, 4, this.segmentType, 2); + CloseTrainsObjectiveHint.boundLimit(it, step7Matches, 5, this.segmentType, 2); + CloseTrainsObjectiveHint.boundLimit(it, step7Matches, 6, this.trainType, 2); + this.buildWithBounds(objectiveBuilder); + }; + _xblockexpression = _function; + } + return _xblockexpression; + } + + private static void boundLimit(@Extension final ExtendedLinearExpressionBuilderFactory factory, final Collection matches, final int index, final Type type, final int count) { + final Function1 _function = (CostElementMatch it) -> { + return it.getMatch().get(index); + }; + Set>> _entrySet = IterableExtensions.groupBy(matches, _function).entrySet(); + for (final Map.Entry> pair : _entrySet) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = factory.createBuilder(); + List _value = pair.getValue(); + for (final CostElementMatch m : _value) { + multiplicityBuilder.add(1, m.getMatch()); + } + boolean _isMulti = CostElementMatchers.isMulti(pair.getKey()); + if (_isMulti) { + multiplicityBuilder.add((-count), type); + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(0)); + } else { + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(count)); + } + } + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/EndOfSidingObjectiveHint.java b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/EndOfSidingObjectiveHint.java new file mode 100644 index 00000000..77c513e1 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/EndOfSidingObjectiveHint.java @@ -0,0 +1,193 @@ +package modes3.run; + +import com.google.common.collect.ImmutableList; +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic; +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace; +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.Dimension; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilder; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilderFactory; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronExtensionOperator; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatch; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatchers; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostObjectiveHint; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; +import modes3.Modes3Package; +import modes3.queries.EndOfSiding_step_2; +import modes3.queries.EndOfSiding_step_3; +import modes3.queries.EndOfSiding_step_4; +import modes3.queries.EndOfSiding_step_5; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.xtext.xbase.lib.Extension; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; + +@SuppressWarnings("all") +public class EndOfSidingObjectiveHint extends CostObjectiveHint { + private final Type segmentType; + + private final Type trainType; + + public EndOfSidingObjectiveHint(@Extension final Ecore2Logic ecore2Logic, final Ecore2Logic_Trace ecore2LogicTrace) { + @Extension + final Modes3Package Modes3Package = modes3.Modes3Package.eINSTANCE; + this.segmentType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getSegment()); + this.trainType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getTrain()); + } + + @Override + public boolean isExact() { + return true; + } + + @Override + public PolyhedronExtensionOperator createPolyhedronExtensionOperator(final Map costElementMatchers) { + PolyhedronExtensionOperator _xblockexpression = null; + { + final CostElementMatchers step2 = costElementMatchers.get(EndOfSiding_step_2.instance().getFullyQualifiedName()); + final CostElementMatchers step3 = costElementMatchers.get(EndOfSiding_step_3.instance().getFullyQualifiedName()); + final CostElementMatchers step4 = costElementMatchers.get(EndOfSiding_step_4.instance().getFullyQualifiedName()); + final CostElementMatchers step5 = costElementMatchers.get(EndOfSiding_step_5.instance().getFullyQualifiedName()); + final PolyhedronExtensionOperator _function = (ExtendedLinearExpressionBuilderFactory it) -> { + final ExtendedLinearExpressionBuilder objectiveBuilder = it.createBuilder(); + ImmutableList _matches = step2.getMatches(); + for (final CostElementMatch m : _matches) { + { + final Dimension dimension = it.getDimension(m.getMatch()); + objectiveBuilder.add(step2.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m.isMulti(); + if (_isMulti) { + it.createBuilder().add(1, dimension).add((-1), this.trainType).build().assertEqualsTo(0); + } else { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final ImmutableList step3Matches = step3.getMatches(); + for (final CostElementMatch m_1 : step3Matches) { + { + final Dimension dimension = it.getDimension(m_1.getMatch()); + objectiveBuilder.add(step3.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_1.isMulti(); + boolean _not = (!_isMulti); + if (_not) { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_1.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final Function1 _function_1 = (CostElementMatch it_1) -> { + return step2.projectMayMatch(it_1.getMatch(), 2); + }; + Set>> _entrySet = IterableExtensions.groupBy(step3Matches, _function_1).entrySet(); + for (final Map.Entry> pair : _entrySet) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = it.createBuilder(); + List _value = pair.getValue(); + for (final CostElementMatch m_2 : _value) { + multiplicityBuilder.add(1, m_2.getMatch()); + } + multiplicityBuilder.add((-1), pair.getKey()); + multiplicityBuilder.build().assertEqualsTo(0); + } + } + EndOfSidingObjectiveHint.boundLimit(it, step3Matches, 2, this.trainType, 1); + EndOfSidingObjectiveHint.boundLimit(it, step3Matches, 3, this.segmentType, 1); + final ImmutableList step4Matches = step4.getMatches(); + for (final CostElementMatch m_2 : step4Matches) { + { + final Dimension dimension = it.getDimension(m_2.getMatch()); + objectiveBuilder.add(step4.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_2.isMulti(); + boolean _not = (!_isMulti); + if (_not) { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_2.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final Function1 _function_2 = (CostElementMatch it_1) -> { + return step3.projectMayMatch(it_1.getMatch(), 2, 3); + }; + Set>> _entrySet_1 = IterableExtensions.groupBy(step4Matches, _function_2).entrySet(); + for (final Map.Entry> pair_1 : _entrySet_1) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = it.createBuilder(); + List _value = pair_1.getValue(); + for (final CostElementMatch m_3 : _value) { + multiplicityBuilder.add(1, m_3.getMatch()); + } + multiplicityBuilder.add((-2), pair_1.getKey()); + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(0)); + } + } + EndOfSidingObjectiveHint.boundLimit(it, step4Matches, 2, this.trainType, 2); + EndOfSidingObjectiveHint.boundLimit(it, step4Matches, 3, this.segmentType, 2); + EndOfSidingObjectiveHint.boundLimit(it, step4Matches, 4, this.segmentType, 2); + final ImmutableList step5Matches = step5.getMatches(); + for (final CostElementMatch m_3 : step5Matches) { + { + final Dimension dimension = it.getDimension(m_3.getMatch()); + objectiveBuilder.add(step5.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_3.isMulti(); + boolean _not = (!_isMulti); + if (_not) { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_3.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + it.createBuilder().add(1, m_3.getMatch()).add((-1), step4.projectMayMatch(m_3.getMatch(), 2, 3, 4)).build().tightenUpperBound(Integer.valueOf(0)); + } + } + EndOfSidingObjectiveHint.boundLimit(it, step5Matches, 2, this.trainType, 1); + EndOfSidingObjectiveHint.boundLimit(it, step5Matches, 3, this.segmentType, 2); + EndOfSidingObjectiveHint.boundLimit(it, step5Matches, 4, this.segmentType, 1); + this.buildWithBounds(objectiveBuilder); + }; + _xblockexpression = _function; + } + return _xblockexpression; + } + + private static void boundLimit(@Extension final ExtendedLinearExpressionBuilderFactory factory, final Collection matches, final int index, final Type type, final int count) { + final Function1 _function = (CostElementMatch it) -> { + return it.getMatch().get(index); + }; + Set>> _entrySet = IterableExtensions.groupBy(matches, _function).entrySet(); + for (final Map.Entry> pair : _entrySet) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = factory.createBuilder(); + List _value = pair.getValue(); + for (final CostElementMatch m : _value) { + multiplicityBuilder.add(1, m.getMatch()); + } + boolean _isMulti = CostElementMatchers.isMulti(pair.getKey()); + if (_isMulti) { + multiplicityBuilder.add((-count), type); + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(0)); + } else { + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(count)); + } + } + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/MisalignedTurnoutObjectiveHint.java b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/MisalignedTurnoutObjectiveHint.java new file mode 100644 index 00000000..835a6559 --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/MisalignedTurnoutObjectiveHint.java @@ -0,0 +1,195 @@ +package modes3.run; + +import com.google.common.collect.ImmutableList; +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic; +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace; +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.Dimension; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilder; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilderFactory; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronExtensionOperator; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatch; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatchers; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostObjectiveHint; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; +import modes3.Modes3Package; +import modes3.queries.MisalignedTurnout_step_2; +import modes3.queries.MisalignedTurnout_step_3; +import modes3.queries.MisalignedTurnout_step_4; +import modes3.queries.MisalignedTurnout_step_5; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.xtext.xbase.lib.Extension; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; + +@SuppressWarnings("all") +public class MisalignedTurnoutObjectiveHint extends CostObjectiveHint { + private final Type segmentType; + + private final Type turnoutType; + + private final Type trainType; + + public MisalignedTurnoutObjectiveHint(@Extension final Ecore2Logic ecore2Logic, final Ecore2Logic_Trace ecore2LogicTrace) { + @Extension + final Modes3Package Modes3Package = modes3.Modes3Package.eINSTANCE; + this.segmentType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getSegment()); + this.turnoutType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getTurnout()); + this.trainType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getTrain()); + } + + @Override + public boolean isExact() { + return true; + } + + @Override + public PolyhedronExtensionOperator createPolyhedronExtensionOperator(final Map costElementMatchers) { + PolyhedronExtensionOperator _xblockexpression = null; + { + final CostElementMatchers step2 = costElementMatchers.get(MisalignedTurnout_step_2.instance().getFullyQualifiedName()); + final CostElementMatchers step3 = costElementMatchers.get(MisalignedTurnout_step_3.instance().getFullyQualifiedName()); + final CostElementMatchers step4 = costElementMatchers.get(MisalignedTurnout_step_4.instance().getFullyQualifiedName()); + final CostElementMatchers step5 = costElementMatchers.get(MisalignedTurnout_step_5.instance().getFullyQualifiedName()); + final PolyhedronExtensionOperator _function = (ExtendedLinearExpressionBuilderFactory it) -> { + final ExtendedLinearExpressionBuilder objectiveBuilder = it.createBuilder(); + ImmutableList _matches = step2.getMatches(); + for (final CostElementMatch m : _matches) { + { + final Dimension dimension = it.getDimension(m.getMatch()); + objectiveBuilder.add(step2.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m.isMulti(); + if (_isMulti) { + it.createBuilder().add(1, dimension).add((-1), this.turnoutType).build().assertEqualsTo(0); + } else { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final ImmutableList step3Matches = step3.getMatches(); + for (final CostElementMatch m_1 : step3Matches) { + { + final Dimension dimension = it.getDimension(m_1.getMatch()); + objectiveBuilder.add(step3.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_1.isMulti(); + boolean _not = (!_isMulti); + if (_not) { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_1.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final Function1 _function_1 = (CostElementMatch it_1) -> { + return step2.projectMayMatch(it_1.getMatch(), 2); + }; + Set>> _entrySet = IterableExtensions.groupBy(step3Matches, _function_1).entrySet(); + for (final Map.Entry> pair : _entrySet) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = it.createBuilder(); + List _value = pair.getValue(); + for (final CostElementMatch m_2 : _value) { + multiplicityBuilder.add(1, m_2.getMatch()); + } + multiplicityBuilder.add((-1), pair.getKey()); + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(0)); + } + } + MisalignedTurnoutObjectiveHint.boundLimit(it, step3Matches, 2, this.turnoutType, 1); + MisalignedTurnoutObjectiveHint.boundLimit(it, step3Matches, 3, this.segmentType, 2); + final ImmutableList step4Matches = step4.getMatches(); + for (final CostElementMatch m_2 : step4Matches) { + { + final Dimension dimension = it.getDimension(m_2.getMatch()); + objectiveBuilder.add(step4.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_2.isMulti(); + boolean _not = (!_isMulti); + if (_not) { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_2.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + it.createBuilder().add(1, m_2.getMatch()).add((-1), step3.projectMayMatch(m_2.getMatch(), 2, 3)).build().tightenUpperBound(Integer.valueOf(0)); + } + } + MisalignedTurnoutObjectiveHint.boundLimit(it, step4Matches, 2, this.turnoutType, 1); + MisalignedTurnoutObjectiveHint.boundLimit(it, step4Matches, 3, this.segmentType, 2); + final ImmutableList step5Matches = step5.getMatches(); + for (final CostElementMatch m_3 : step5Matches) { + { + final Dimension dimension = it.getDimension(m_3.getMatch()); + objectiveBuilder.add(step5.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_3.isMulti(); + boolean _not = (!_isMulti); + if (_not) { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_3.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final Function1 _function_2 = (CostElementMatch it_1) -> { + return step4.projectMayMatch(it_1.getMatch(), 2, 3); + }; + Set>> _entrySet_1 = IterableExtensions.groupBy(step5Matches, _function_2).entrySet(); + for (final Map.Entry> pair_1 : _entrySet_1) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = it.createBuilder(); + List _value = pair_1.getValue(); + for (final CostElementMatch m_4 : _value) { + multiplicityBuilder.add(1, m_4.getMatch()); + } + multiplicityBuilder.add((-1), pair_1.getKey()); + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(0)); + } + } + MisalignedTurnoutObjectiveHint.boundLimit(it, step5Matches, 2, this.turnoutType, 1); + MisalignedTurnoutObjectiveHint.boundLimit(it, step5Matches, 3, this.segmentType, 2); + MisalignedTurnoutObjectiveHint.boundLimit(it, step5Matches, 4, this.trainType, 2); + this.buildWithBounds(objectiveBuilder); + }; + _xblockexpression = _function; + } + return _xblockexpression; + } + + private static void boundLimit(@Extension final ExtendedLinearExpressionBuilderFactory factory, final Collection matches, final int index, final Type type, final int count) { + final Function1 _function = (CostElementMatch it) -> { + return it.getMatch().get(index); + }; + Set>> _entrySet = IterableExtensions.groupBy(matches, _function).entrySet(); + for (final Map.Entry> pair : _entrySet) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = factory.createBuilder(); + List _value = pair.getValue(); + for (final CostElementMatch m : _value) { + multiplicityBuilder.add(1, m.getMatch()); + } + boolean _isMulti = CostElementMatchers.isMulti(pair.getKey()); + if (_isMulti) { + multiplicityBuilder.add((-count), type); + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(0)); + } else { + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(count)); + } + } + } + } +} diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3ModelGenerator.java b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3ModelGenerator.java index f32a7172..16db7053 100644 --- a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3ModelGenerator.java +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/Modes3ModelGenerator.java @@ -13,6 +13,7 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logic import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.Ecore2logicannotationsPackage; import hu.bme.mit.inf.dslreasoner.ecore2logic.ecore2logicannotations.InverseRelationAssertion; import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel; +import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicModelInterpretation; import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicProblemBuilder; import hu.bme.mit.inf.dslreasoner.logic.model.builder.SolutionScope; import hu.bme.mit.inf.dslreasoner.logic.model.builder.TracedOutput; @@ -32,6 +33,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage; import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult; import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult; +import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore; import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic; import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicConfiguration; import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicTrace; @@ -50,10 +52,15 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RelationLink; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretation2Gml; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretationVisualisation; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.CostObjectiveConfiguration; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.CostObjectiveElementConfiguration; import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.DebugConfiguration; import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.StateCoderStrategy; import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner; import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.PartialModelAsLogicInterpretation; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveKind; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveThreshold; import hu.bme.mit.inf.dslreasoner.visualisation.pi2graphviz.GraphvizVisualiser; import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace; import java.util.Collections; @@ -64,10 +71,31 @@ import java.util.function.Predicate; import modes3.Modes3Factory; import modes3.Modes3ModelRoot; import modes3.Modes3Package; +import modes3.queries.CloseTrains_step_2; +import modes3.queries.CloseTrains_step_3; +import modes3.queries.CloseTrains_step_4; +import modes3.queries.CloseTrains_step_5; +import modes3.queries.CloseTrains_step_6; +import modes3.queries.CloseTrains_step_7; +import modes3.queries.EndOfSiding_step_2; +import modes3.queries.EndOfSiding_step_3; +import modes3.queries.EndOfSiding_step_4; +import modes3.queries.EndOfSiding_step_5; +import modes3.queries.MisalignedTurnout_step_2; +import modes3.queries.MisalignedTurnout_step_3; +import modes3.queries.MisalignedTurnout_step_4; +import modes3.queries.MisalignedTurnout_step_5; import modes3.queries.Modes3Queries; +import modes3.queries.TrainLocations_step_2; +import modes3.queries.TrainLocations_step_3; +import modes3.run.CloseTrainsObjectiveHint; +import modes3.run.EndOfSidingObjectiveHint; +import modes3.run.MisalignedTurnoutObjectiveHint; import modes3.run.Modes3TypeScopeHint; import modes3.run.Modes3UnitPropagationGenerator; +import modes3.run.TrainLocationsObjectiveHint; import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.TreeIterator; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; @@ -102,6 +130,10 @@ public class Modes3ModelGenerator { private enum MonitoringQuery { closeTrains, + trainLocations, + + endOfSiding, + misalignedTurnout; } @@ -183,8 +215,9 @@ public class Modes3ModelGenerator { ObjectExtensions.>operator_doubleArrow( it_1.minNewElementsByType, _function_4); final Procedure1> _function_5 = (Map it_2) -> { - it_2.put(this.ecore2Logic.TypeofEClass(metamodelLogic.getTrace(), Modes3Package.eINSTANCE.getTrain()), Integer.valueOf(5)); - it_2.put(this.ecore2Logic.TypeofEClass(metamodelLogic.getTrace(), Modes3Package.eINSTANCE.getTurnout()), Integer.valueOf(5)); + it_2.put(this.ecore2Logic.TypeofEClass(metamodelLogic.getTrace(), Modes3Package.eINSTANCE.getTrain()), Integer.valueOf((this.modelSize / 5))); + it_2.put(this.ecore2Logic.TypeofEClass(metamodelLogic.getTrace(), Modes3Package.eINSTANCE.getTurnout()), Integer.valueOf((this.modelSize / 5))); + it_2.put(this.ecore2Logic.TypeofEClass(metamodelLogic.getTrace(), Modes3Package.eINSTANCE.getSimpleSegment()), Integer.valueOf(((3 * this.modelSize) / 5))); }; ObjectExtensions.>operator_doubleArrow( it_1.maxNewElementsByType, _function_5); @@ -196,7 +229,9 @@ public class Modes3ModelGenerator { }; ObjectExtensions.operator_doubleArrow( it.solutionScope, _function_4); - it.scopeWeight = 5; + CostObjectiveConfiguration _objective = this.getObjective(this.ecore2Logic, metamodelLogic.getTrace()); + it.costObjectives.add(_objective); + it.scopeWeight = 6; it.nameNewElements = false; it.typeInferenceMethod = TypeInferenceMethod.PreliminaryAnalysis; it.stateCoderStrategy = StateCoderStrategy.PairwiseNeighbourhood; @@ -224,80 +259,103 @@ public class Modes3ModelGenerator { URI _xifexpression = null; if ((solution instanceof ModelResult)) { InputOutput.println("Saving generated solutions"); - final EList representations = ((ModelResult)solution).getRepresentation(); - int _size = representations.size(); + final Logic2Ecore logic2Ecore = new Logic2Ecore(this.ecore2Logic); + final List interpretations = this.solver.getInterpretations(((ModelResult)solution)); + int _size = interpretations.size(); ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _size, true); for (final Integer representationIndex : _doubleDotLessThan) { { - final Object representation = representations.get((representationIndex).intValue()); + final LogicModelInterpretation interpretation = interpretations.get((representationIndex).intValue()); final int representationNumber = ((representationIndex).intValue() + 1); - if ((representation instanceof PartialInterpretation)) { + if ((interpretation instanceof PartialModelAsLogicInterpretation)) { + final PartialInterpretation representation = ((PartialModelAsLogicInterpretation)interpretation).getPartialInterpretation(); StringConcatenation _builder_1 = new StringConcatenation(); _builder_1.append("solution"); _builder_1.append(representationNumber); _builder_1.append(".partialinterpretation"); - workspace.writeModel(((EObject)representation), _builder_1.toString()); + workspace.writeModel(representation, _builder_1.toString()); final PartialInterpretation2Gml partialInterpretation2GML = new PartialInterpretation2Gml(); - final String gml = partialInterpretation2GML.transform(((PartialInterpretation)representation)); + final String gml = partialInterpretation2GML.transform(representation); StringConcatenation _builder_2 = new StringConcatenation(); _builder_2.append("solution"); _builder_2.append(representationNumber); _builder_2.append(".gml"); workspace.writeText(_builder_2.toString(), gml); - int _size_1 = ((PartialInterpretation)representation).getNewElements().size(); - boolean _lessThan = (_size_1 < 160); - if (_lessThan) { - if ((representation instanceof PartialInterpretation)) { - final Function1 _function_3 = (Type it) -> { + final EObject model = logic2Ecore.transformInterpretation(interpretation, metamodelLogic.getTrace()); + final TreeIterator iterator = model.eAllContents(); + int id = 0; + while (iterator.hasNext()) { + { + final EObject obj = iterator.next(); + final Function1 _function_3 = (EAttribute it) -> { String _name_2 = it.getName(); - return Boolean.valueOf(Objects.equal(_name_2, "Modes3ModelRoot class DefinedPart")); + return Boolean.valueOf(Objects.equal(_name_2, "id")); }; - Type _findFirst = IterableExtensions.findFirst(((PartialInterpretation)representation).getProblem().getTypes(), _function_3); - final TypeDefinition rootType = ((TypeDefinition) _findFirst); - final Function1 _function_4 = (PartialComplexTypeInterpretation it) -> { - String _name_2 = it.getInterpretationOf().getName(); - return Boolean.valueOf(Objects.equal(_name_2, "Modes3ModelRoot class")); - }; - final PartialComplexTypeInterpretation rootIntepretation = IterableExtensions.findFirst(Iterables.filter(((PartialInterpretation)representation).getPartialtypeinterpratation(), - PartialComplexTypeInterpretation.class), _function_4); - rootIntepretation.getElements().removeAll(rootType.getElements()); - ((PartialInterpretation)representation).getProblem().getElements().removeAll(rootType.getElements()); - EList _partialrelationinterpretation = ((PartialInterpretation)representation).getPartialrelationinterpretation(); - for (final PartialRelationInterpretation relationInterpretation : _partialrelationinterpretation) { - final Predicate _function_5 = (RelationLink link) -> { - boolean _xifexpression_1 = false; - if ((link instanceof BinaryElementRelationLink)) { - _xifexpression_1 = (rootType.getElements().contains(((BinaryElementRelationLink)link).getParam1()) || rootType.getElements().contains(((BinaryElementRelationLink)link).getParam2())); - } else { - _xifexpression_1 = false; - } - return _xifexpression_1; - }; - relationInterpretation.getRelationlinks().removeIf(_function_5); + final EAttribute idFeature = IterableExtensions.findFirst(obj.eClass().getEAllAttributes(), _function_3); + if ((idFeature != null)) { + obj.eSet(idFeature, Integer.valueOf(id)); + id++; } - rootType.getElements().clear(); } + } + StringConcatenation _builder_3 = new StringConcatenation(); + _builder_3.append("solution"); + _builder_3.append(representationNumber); + _builder_3.append(".modes3"); + workspace.writeModel(model, _builder_3.toString()); + int _size_1 = representation.getNewElements().size(); + boolean _lessThan = (_size_1 < 160); + if (_lessThan) { + final Function1 _function_3 = (Type it) -> { + String _name_2 = it.getName(); + return Boolean.valueOf(Objects.equal(_name_2, "Modes3ModelRoot class DefinedPart")); + }; + Type _findFirst = IterableExtensions.findFirst(representation.getProblem().getTypes(), _function_3); + final TypeDefinition rootType = ((TypeDefinition) _findFirst); + final Function1 _function_4 = (PartialComplexTypeInterpretation it) -> { + String _name_2 = it.getInterpretationOf().getName(); + return Boolean.valueOf(Objects.equal(_name_2, "Modes3ModelRoot class")); + }; + final PartialComplexTypeInterpretation rootIntepretation = IterableExtensions.findFirst(Iterables.filter(representation.getPartialtypeinterpratation(), + PartialComplexTypeInterpretation.class), _function_4); + rootIntepretation.getElements().removeAll(rootType.getElements()); + representation.getProblem().getElements().removeAll(rootType.getElements()); + EList _partialrelationinterpretation = representation.getPartialrelationinterpretation(); + for (final PartialRelationInterpretation relationInterpretation : _partialrelationinterpretation) { + final Predicate _function_5 = (RelationLink link) -> { + boolean _xifexpression_1 = false; + if ((link instanceof BinaryElementRelationLink)) { + _xifexpression_1 = (rootType.getElements().contains(((BinaryElementRelationLink)link).getParam1()) || + rootType.getElements().contains(((BinaryElementRelationLink)link).getParam2())); + } else { + _xifexpression_1 = false; + } + return _xifexpression_1; + }; + relationInterpretation.getRelationlinks().removeIf(_function_5); + } + rootType.getElements().clear(); final GraphvizVisualiser visualiser = new GraphvizVisualiser(); - final PartialInterpretationVisualisation visualisation = visualiser.visualiseConcretization(((PartialInterpretation)representation)); - StringConcatenation _builder_3 = new StringConcatenation(); - _builder_3.append("solution"); - _builder_3.append(representationNumber); - _builder_3.append(".png"); - visualisation.writeToFile(workspace, _builder_3.toString()); + final PartialInterpretationVisualisation visualisation = visualiser.visualiseConcretization(representation); + StringConcatenation _builder_4 = new StringConcatenation(); + _builder_4.append("solution"); + _builder_4.append(representationNumber); + _builder_4.append(".png"); + visualisation.writeToFile(workspace, _builder_4.toString()); } } else { - StringConcatenation _builder_4 = new StringConcatenation(); - _builder_4.append("solution"); - _builder_4.append(representationNumber); - _builder_4.append(".txt"); - workspace.writeText(_builder_4.toString(), representation.toString()); + StringConcatenation _builder_5 = new StringConcatenation(); + _builder_5.append("solution"); + _builder_5.append(representationNumber); + _builder_5.append(".txt"); + workspace.writeText(_builder_5.toString(), interpretation.toString()); } } } } else { URI _xblockexpression_1 = null; { - InputOutput.println("Failed to solver problem"); + InputOutput.println("Failed to solve problem"); final LogicProblem partial = logic.getOutput(); _xblockexpression_1 = workspace.writeModel(partial, "solution.partialinterpretation"); } @@ -354,6 +412,153 @@ public class Modes3ModelGenerator { return _xblockexpression; } + public CostObjectiveConfiguration getObjective(final Ecore2Logic ecore2Logic, final Ecore2Logic_Trace ecore2LogicTrace) { + CostObjectiveConfiguration _costObjectiveConfiguration = new CostObjectiveConfiguration(); + final Procedure1 _function = (CostObjectiveConfiguration it) -> { + final Modes3ModelGenerator.MonitoringQuery monitoringQuery = this.monitoringQuery; + if (monitoringQuery != null) { + switch (monitoringQuery) { + case closeTrains: + CostObjectiveElementConfiguration _costObjectiveElementConfiguration = new CostObjectiveElementConfiguration(); + final Procedure1 _function_1 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = CloseTrains_step_2.instance().getFullyQualifiedName(); + it_1.weight = ((14 + 53) + 11); + }; + CostObjectiveElementConfiguration _doubleArrow = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration, _function_1); + it.elements.add(_doubleArrow); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_1 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_2 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = CloseTrains_step_3.instance().getFullyQualifiedName(); + it_1.weight = (21 + 14); + }; + CostObjectiveElementConfiguration _doubleArrow_1 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_1, _function_2); + it.elements.add(_doubleArrow_1); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_2 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_3 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = CloseTrains_step_4.instance().getFullyQualifiedName(); + it_1.weight = (((14 + 44) + 14) + 9); + }; + CostObjectiveElementConfiguration _doubleArrow_2 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_2, _function_3); + it.elements.add(_doubleArrow_2); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_3 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_4 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = CloseTrains_step_5.instance().getFullyQualifiedName(); + it_1.weight = ((14 + 41) + 11); + }; + CostObjectiveElementConfiguration _doubleArrow_3 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_3, _function_4); + it.elements.add(_doubleArrow_3); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_4 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_5 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = CloseTrains_step_6.instance().getFullyQualifiedName(); + it_1.weight = 27; + }; + CostObjectiveElementConfiguration _doubleArrow_4 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_4, _function_5); + it.elements.add(_doubleArrow_4); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_5 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_6 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = CloseTrains_step_7.instance().getFullyQualifiedName(); + it_1.weight = 48; + }; + CostObjectiveElementConfiguration _doubleArrow_5 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_5, _function_6); + it.elements.add(_doubleArrow_5); + CloseTrainsObjectiveHint _closeTrainsObjectiveHint = new CloseTrainsObjectiveHint(ecore2Logic, ecore2LogicTrace); + it.hint = _closeTrainsObjectiveHint; + break; + case trainLocations: + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_6 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_7 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = TrainLocations_step_2.instance().getFullyQualifiedName(); + it_1.weight = ((14 + 53) + 11); + }; + CostObjectiveElementConfiguration _doubleArrow_6 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_6, _function_7); + it.elements.add(_doubleArrow_6); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_7 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_8 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = TrainLocations_step_3.instance().getFullyQualifiedName(); + it_1.weight = 48; + }; + CostObjectiveElementConfiguration _doubleArrow_7 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_7, _function_8); + it.elements.add(_doubleArrow_7); + TrainLocationsObjectiveHint _trainLocationsObjectiveHint = new TrainLocationsObjectiveHint(ecore2Logic, ecore2LogicTrace); + it.hint = _trainLocationsObjectiveHint; + break; + case misalignedTurnout: + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_8 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_9 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = MisalignedTurnout_step_2.instance().getFullyQualifiedName(); + it_1.weight = ((14 + 53) + 11); + }; + CostObjectiveElementConfiguration _doubleArrow_8 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_8, _function_9); + it.elements.add(_doubleArrow_8); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_9 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_10 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = MisalignedTurnout_step_3.instance().getFullyQualifiedName(); + it_1.weight = 108; + }; + CostObjectiveElementConfiguration _doubleArrow_9 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_9, _function_10); + it.elements.add(_doubleArrow_9); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_10 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_11 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = MisalignedTurnout_step_4.instance().getFullyQualifiedName(); + it_1.weight = 27; + }; + CostObjectiveElementConfiguration _doubleArrow_10 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_10, _function_11); + it.elements.add(_doubleArrow_10); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_11 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_12 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = MisalignedTurnout_step_5.instance().getFullyQualifiedName(); + it_1.weight = 48; + }; + CostObjectiveElementConfiguration _doubleArrow_11 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_11, _function_12); + it.elements.add(_doubleArrow_11); + MisalignedTurnoutObjectiveHint _misalignedTurnoutObjectiveHint = new MisalignedTurnoutObjectiveHint(ecore2Logic, ecore2LogicTrace); + it.hint = _misalignedTurnoutObjectiveHint; + break; + case endOfSiding: + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_12 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_13 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = EndOfSiding_step_2.instance().getFullyQualifiedName(); + it_1.weight = ((14 + 53) + 11); + }; + CostObjectiveElementConfiguration _doubleArrow_12 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_12, _function_13); + it.elements.add(_doubleArrow_12); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_13 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_14 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = EndOfSiding_step_3.instance().getFullyQualifiedName(); + it_1.weight = (21 + 14); + }; + CostObjectiveElementConfiguration _doubleArrow_13 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_13, _function_14); + it.elements.add(_doubleArrow_13); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_14 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_15 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = EndOfSiding_step_4.instance().getFullyQualifiedName(); + it_1.weight = (((((((14 + 35) + 21) + 15) + 14) + 21) + 15) + 11); + }; + CostObjectiveElementConfiguration _doubleArrow_14 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_14, _function_15); + it.elements.add(_doubleArrow_14); + CostObjectiveElementConfiguration _costObjectiveElementConfiguration_15 = new CostObjectiveElementConfiguration(); + final Procedure1 _function_16 = (CostObjectiveElementConfiguration it_1) -> { + it_1.patternQualifiedName = EndOfSiding_step_5.instance().getFullyQualifiedName(); + it_1.weight = 48; + }; + CostObjectiveElementConfiguration _doubleArrow_15 = ObjectExtensions.operator_doubleArrow(_costObjectiveElementConfiguration_15, _function_16); + it.elements.add(_doubleArrow_15); + EndOfSidingObjectiveHint _endOfSidingObjectiveHint = new EndOfSidingObjectiveHint(ecore2Logic, ecore2LogicTrace); + it.hint = _endOfSidingObjectiveHint; + break; + default: + throw new IllegalArgumentException(("Unknown monitoring query: " + this.monitoringQuery)); + } + } else { + throw new IllegalArgumentException(("Unknown monitoring query: " + this.monitoringQuery)); + } + it.kind = ObjectiveKind.HIGHER_IS_BETTER; + it.threshold = ObjectiveThreshold.NO_THRESHOLD; + it.findExtremum = true; + }; + return ObjectExtensions.operator_doubleArrow(_costObjectiveConfiguration, _function); + } + public static Object init() { Object _xblockexpression = null; { diff --git a/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/TrainLocationsObjectiveHint.java b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/TrainLocationsObjectiveHint.java new file mode 100644 index 00000000..570f9deb --- /dev/null +++ b/Domains/ca.mcgill.rtgmrt.example.modes3/xtend-gen/modes3/run/TrainLocationsObjectiveHint.java @@ -0,0 +1,117 @@ +package modes3.run; + +import com.google.common.collect.ImmutableList; +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic; +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace; +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.Dimension; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilder; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilderFactory; +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronExtensionOperator; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatch; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostElementMatchers; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostObjectiveHint; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import java.util.Set; +import modes3.Modes3Package; +import modes3.queries.TrainLocations_step_2; +import modes3.queries.TrainLocations_step_3; +import org.eclipse.xtext.xbase.lib.Extension; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; + +@SuppressWarnings("all") +public class TrainLocationsObjectiveHint extends CostObjectiveHint { + private final Type segmentType; + + private final Type trainType; + + public TrainLocationsObjectiveHint(@Extension final Ecore2Logic ecore2Logic, final Ecore2Logic_Trace ecore2LogicTrace) { + @Extension + final Modes3Package Modes3Package = modes3.Modes3Package.eINSTANCE; + this.segmentType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getSegment()); + this.trainType = ecore2Logic.TypeofEClass(ecore2LogicTrace, Modes3Package.getTrain()); + } + + @Override + public boolean isExact() { + return true; + } + + @Override + public PolyhedronExtensionOperator createPolyhedronExtensionOperator(final Map costElementMatchers) { + PolyhedronExtensionOperator _xblockexpression = null; + { + final CostElementMatchers step2 = costElementMatchers.get(TrainLocations_step_2.instance().getFullyQualifiedName()); + final CostElementMatchers step3 = costElementMatchers.get(TrainLocations_step_3.instance().getFullyQualifiedName()); + final PolyhedronExtensionOperator _function = (ExtendedLinearExpressionBuilderFactory it) -> { + final ExtendedLinearExpressionBuilder objectiveBuilder = it.createBuilder(); + ImmutableList _matches = step2.getMatches(); + for (final CostElementMatch m : _matches) { + { + final Dimension dimension = it.getDimension(m.getMatch()); + objectiveBuilder.add(step2.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m.isMulti(); + if (_isMulti) { + it.createBuilder().add(1, dimension).add((-1), this.trainType).build().assertEqualsTo(0); + } else { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + final ImmutableList step3Matches = step3.getMatches(); + for (final CostElementMatch m_1 : step3Matches) { + { + final Dimension dimension = it.getDimension(m_1.getMatch()); + objectiveBuilder.add(step3.getWeight(), dimension); + dimension.tightenLowerBound(Integer.valueOf(0)); + boolean _isMulti = m_1.isMulti(); + boolean _not = (!_isMulti); + if (_not) { + dimension.tightenUpperBound(Integer.valueOf(1)); + boolean _isMust = m_1.isMust(); + if (_isMust) { + dimension.tightenLowerBound(Integer.valueOf(1)); + } + } + } + } + TrainLocationsObjectiveHint.boundLimit(it, step3Matches, 2, this.trainType, 1); + TrainLocationsObjectiveHint.boundLimit(it, step3Matches, 3, this.segmentType, 1); + this.buildWithBounds(objectiveBuilder); + }; + _xblockexpression = _function; + } + return _xblockexpression; + } + + private static void boundLimit(@Extension final ExtendedLinearExpressionBuilderFactory factory, final Collection matches, final int index, final Type type, final int count) { + final Function1 _function = (CostElementMatch it) -> { + return it.getMatch().get(index); + }; + Set>> _entrySet = IterableExtensions.groupBy(matches, _function).entrySet(); + for (final Map.Entry> pair : _entrySet) { + { + final ExtendedLinearExpressionBuilder multiplicityBuilder = factory.createBuilder(); + List _value = pair.getValue(); + for (final CostElementMatch m : _value) { + multiplicityBuilder.add(1, m.getMatch()); + } + boolean _isMulti = CostElementMatchers.isMulti(pair.getKey()); + if (_isMulti) { + multiplicityBuilder.add((-count), type); + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(0)); + } else { + multiplicityBuilder.build().tightenUpperBound(Integer.valueOf(count)); + } + } + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF index 5fb85170..cc71bd06 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.alloyexamples/META-INF/MANIFEST.MF @@ -15,7 +15,6 @@ Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime, org.eclipse.viatra.query.runtime, org.eclipse.core.runtime, org.eclipse.emf.ecore;visibility:=reexport, - org.eclipse.emf.emfstore.common, com.google.guava, org.eclipse.xtext.xbase.lib, org.eclipse.xtend.lib, diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/META-INF/MANIFEST.MF b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/META-INF/MANIFEST.MF index b9da0f0b..ec1557e8 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/META-INF/MANIFEST.MF +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/META-INF/MANIFEST.MF @@ -8,7 +8,8 @@ Export-Package: hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra, hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.interval, hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.interval.aggregators, hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns, - hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries + hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.queries, + hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules Require-Bundle: hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0", hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage;bundle-version="1.0.0", hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0", diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend deleted file mode 100644 index 3bcd9116..00000000 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationMethodProvider.xtend +++ /dev/null @@ -1,226 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra - -import com.google.common.collect.ImmutableMap -import com.google.common.collect.ImmutableSet -import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel -import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem -import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.CbcPolyhedronSolver -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.MultiplicityGoalConstraintCalculator -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronScopePropagator -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationConstraintCalculator -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagator -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.TypeHierarchyScopePropagator -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.Z3PolyhedronSolver -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.GeneratedPatterns -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.ModalPatternQueries -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternProvider -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.UnitPropagationPatternGenerator -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules.GoalConstraintProvider -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules.RefinementRuleProvider -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation -import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace -import java.util.Collection -import java.util.List -import java.util.Map -import java.util.Set -import org.eclipse.viatra.query.runtime.api.GenericQueryGroup -import org.eclipse.viatra.query.runtime.api.IPatternMatch -import org.eclipse.viatra.query.runtime.api.IQuerySpecification -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine -import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher -import org.eclipse.viatra.query.runtime.emf.EMFScope -import org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery -import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRule -import org.eclipse.xtend.lib.annotations.Data - -class ModelGenerationStatistics { - public var long transformationExecutionTime = 0 - - synchronized def addExecutionTime(long amount) { - transformationExecutionTime += amount - } - - public var long scopePropagationTime = 0 - - synchronized def addScopePropagationTime(long amount) { - scopePropagationTime += amount - } - - public var long mustRelationPropagationTime = 0 - - synchronized def addMustRelationPropagationTime(long amount) { - mustRelationPropagationTime += amount - } - - public var long preliminaryTypeAnalisisTime = 0 - - public var int decisionsTried = 0 - - synchronized def incrementDecisionCount() { - decisionsTried++ - } - - public var int transformationInvocations - - synchronized def incrementTransformationCount() { - transformationInvocations++ - } - - public var int scopePropagatorInvocations - - synchronized def incrementScopePropagationCount() { - scopePropagatorInvocations++ - } - - public var int scopePropagatorSolverInvocations - - synchronized def incrementScopePropagationSolverCount() { - scopePropagatorSolverInvocations++ - } -} - -@Data class ModelGenerationMethod { - ModelGenerationStatistics statistics - - Collection> objectRefinementRules - Collection> relationRefinementRules - - List unfinishedMultiplicities - - Collection>> unfinishedWF - - Collection>> invalidWF - - Map>> mustUnitPropagationPreconditions - Map>> currentUnitPropagationPreconditions - - Map modalRelationQueries - - Collection>> allPatterns -} - -enum TypeInferenceMethod { - Generic, - PreliminaryAnalysis -} - -class ModelGenerationMethodProvider { - val PatternProvider patternProvider = new PatternProvider - val RefinementRuleProvider refinementRuleProvider = new RefinementRuleProvider - val GoalConstraintProvider goalConstraintProvider = new GoalConstraintProvider - val relationConstraintCalculator = new RelationConstraintCalculator - - def ModelGenerationMethod createModelGenerationMethod( - LogicProblem logicProblem, - PartialInterpretation emptySolution, - ReasonerWorkspace workspace, - boolean nameNewElements, - TypeInferenceMethod typeInferenceMethod, - boolean calculateObjectCreationCosts, - ScopePropagatorStrategy scopePropagatorStrategy, - Collection hints, - Collection unitPropagationPatternGenerators, - DocumentationLevel debugLevel - ) { - val statistics = new ModelGenerationStatistics - val writeFiles = (debugLevel === DocumentationLevel.NORMAL || debugLevel === DocumentationLevel.FULL) - - val Set existingQueries = logicProblem.relations.map[annotations].flatten.filter(TransfomedViatraQuery). - map[it.patternPQuery as PQuery].toSet - - val relationConstraints = relationConstraintCalculator.calculateRelationConstraints(logicProblem) - val queries = patternProvider.generateQueries(logicProblem, emptySolution, statistics, existingQueries, - workspace, typeInferenceMethod, scopePropagatorStrategy, relationConstraints, hints, - unitPropagationPatternGenerators, writeFiles) - - val scopePropagator = createScopePropagator(scopePropagatorStrategy, emptySolution, hints, queries, statistics) - scopePropagator.propagateAllScopeConstraints - val unitRulePropagator = refinementRuleProvider.createUnitPrulePropagator(logicProblem, emptySolution, - queries, scopePropagator, statistics) - val objectRefinementRules = refinementRuleProvider.createObjectRefinementRules(logicProblem, emptySolution, - queries, unitRulePropagator, nameNewElements, statistics) - val relationRefinementRules = refinementRuleProvider.createRelationRefinementRules(queries, unitRulePropagator, - statistics) - - val unfinishedMultiplicities = goalConstraintProvider.getUnfinishedMultiplicityQueries(logicProblem, queries, - calculateObjectCreationCosts) - - val unfinishedWF = queries.getUnfinishedWFQueries.values - - val modalRelationQueriesBuilder = ImmutableMap.builder - for (entry : queries.modalRelationQueries.entrySet) { - val annotation = entry.key.annotations.filter(TransfomedViatraQuery).head - if (annotation !== null) { - modalRelationQueriesBuilder.put(annotation.patternFullyQualifiedName, entry.value) - } - } - val modalRelationQueries = modalRelationQueriesBuilder.build - - val invalidWF = queries.getInvalidWFQueries.values - - val mustUnitPropagationPreconditions = queries.getMustUnitPropagationPreconditionPatterns - val currentUnitPropagationPreconditions = queries.getCurrentUnitPropagationPreconditionPatterns - - val queriesToPrepare = ImmutableSet.builder.addAll(queries.refineObjectQueries.values).addAll( - queries.refineTypeQueries.values).addAll(queries.refineRelationQueries.values).addAll(queries. - multiplicityConstraintQueries.values.flatMap[allQueries]).addAll(queries.unfinishedWFQueries.values).addAll( - queries.invalidWFQueries.values).addAll(queries.mustUnitPropagationPreconditionPatterns.values).addAll( - queries.currentUnitPropagationPreconditionPatterns.values).add(queries.hasElementInContainmentQuery).build - val queryEngine = ViatraQueryEngine.on(new EMFScope(emptySolution)) - GenericQueryGroup.of(queriesToPrepare).prepare(queryEngine) - - return new ModelGenerationMethod( - statistics, - objectRefinementRules.values, - relationRefinementRules.values, - unfinishedMultiplicities, - unfinishedWF, - invalidWF, - mustUnitPropagationPreconditions, - currentUnitPropagationPreconditions, - modalRelationQueries, - queries.allQueries - ) - } - - private def createScopePropagator(ScopePropagatorStrategy scopePropagatorStrategy, - PartialInterpretation emptySolution, Collection hints, GeneratedPatterns queries, - ModelGenerationStatistics statistics) { - if (!hints.empty && !(scopePropagatorStrategy instanceof ScopePropagatorStrategy.Polyhedral)) { - throw new IllegalArgumentException("Only the Polyhedral scope propagator strategy can use hints.") - } - switch (scopePropagatorStrategy) { - case ScopePropagatorStrategy.None, - case ScopePropagatorStrategy.Basic: - new ScopePropagator(emptySolution, statistics) - case ScopePropagatorStrategy.BasicTypeHierarchy: - new TypeHierarchyScopePropagator(emptySolution, statistics) - ScopePropagatorStrategy.Polyhedral: { - val types = queries.refineObjectQueries.keySet.map[newType].toSet - val allPatternsByName = queries.allQueries.toMap[fullyQualifiedName] - val solver = switch (scopePropagatorStrategy.solver) { - case Z3Integer: - new Z3PolyhedronSolver(false, scopePropagatorStrategy.timeoutSeconds) - case Z3Real: - new Z3PolyhedronSolver(true, scopePropagatorStrategy.timeoutSeconds) - case Cbc: - new CbcPolyhedronSolver(false, scopePropagatorStrategy.timeoutSeconds, true) - case Clp: - new CbcPolyhedronSolver(true, scopePropagatorStrategy.timeoutSeconds, true) - default: - throw new IllegalArgumentException("Unknown polyhedron solver: " + - scopePropagatorStrategy.solver) - } - new PolyhedronScopePropagator(emptySolution, statistics, types, queries.multiplicityConstraintQueries, - queries.hasElementInContainmentQuery, allPatternsByName, hints, solver, - scopePropagatorStrategy.requiresUpperBoundIndexing, scopePropagatorStrategy.updateHeuristic) - } - default: - throw new IllegalArgumentException("Unknown scope propagator strategy: " + scopePropagatorStrategy) - } - } -} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationStatistics.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationStatistics.xtend new file mode 100644 index 00000000..bd5bf807 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/ModelGenerationStatistics.xtend @@ -0,0 +1,47 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra + +class ModelGenerationStatistics { + public var long transformationExecutionTime = 0 + + synchronized def addExecutionTime(long amount) { + transformationExecutionTime += amount + } + + public var long scopePropagationTime = 0 + + synchronized def addScopePropagationTime(long amount) { + scopePropagationTime += amount + } + + public var long mustRelationPropagationTime = 0 + + synchronized def addMustRelationPropagationTime(long amount) { + mustRelationPropagationTime += amount + } + + public var long preliminaryTypeAnalisisTime = 0 + + public var int decisionsTried = 0 + + synchronized def incrementDecisionCount() { + decisionsTried++ + } + + public var int transformationInvocations + + synchronized def incrementTransformationCount() { + transformationInvocations++ + } + + public var int scopePropagatorInvocations + + synchronized def incrementScopePropagationCount() { + scopePropagatorInvocations++ + } + + public var int scopePropagatorSolverInvocations + + synchronized def incrementScopePropagationSolverCount() { + scopePropagatorSolverInvocations++ + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/TypeInferenceMethod.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/TypeInferenceMethod.xtend new file mode 100644 index 00000000..9296a0be --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/TypeInferenceMethod.xtend @@ -0,0 +1,44 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra + +import com.google.common.collect.ImmutableMap +import com.google.common.collect.ImmutableSet +import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel +import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem +import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.CachingSimplePolyhedronScopePropagatorStrategy +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.CbcPolyhedronSolver +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.MultiplicityGoalConstraintCalculator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronScopePropagator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationConstraintCalculator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.TypeHierarchyScopePropagator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.Z3PolyhedronSolver +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.GeneratedPatterns +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.ModalPatternQueries +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternProvider +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.UnitPropagationPatternGenerator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules.GoalConstraintProvider +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules.RefinementRuleProvider +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace +import java.util.Collection +import java.util.List +import java.util.Map +import java.util.Set +import org.eclipse.viatra.query.runtime.api.GenericQueryGroup +import org.eclipse.viatra.query.runtime.api.IPatternMatch +import org.eclipse.viatra.query.runtime.api.IQuerySpecification +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine +import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher +import org.eclipse.viatra.query.runtime.emf.EMFScope +import org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery +import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRule +import org.eclipse.xtend.lib.annotations.Data + +enum TypeInferenceMethod { + Generic, + PreliminaryAnalysis +} \ No newline at end of file diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ExtendedLinearExpressionBuilderFactory.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ExtendedLinearExpressionBuilderFactory.xtend new file mode 100644 index 00000000..6054affe --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ExtendedLinearExpressionBuilderFactory.xtend @@ -0,0 +1,140 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality + +import com.google.common.collect.ImmutableList +import com.google.common.collect.ImmutableMap +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type +import java.util.ArrayList +import java.util.HashMap +import java.util.HashSet +import java.util.List +import java.util.Map +import java.util.Set +import org.eclipse.viatra.query.runtime.api.IPatternMatch +import org.eclipse.xtend.lib.annotations.Accessors +import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor + +interface BoundSaturationListener { + def void boundsSaturated(Integer lower, Integer upper) +} + +interface ExtendedLinearExpressionBuilderFactory { + def ExtendedLinearExpressionBuilder createBuilder() + + def Dimension getDimension(IPatternMatch patternMatch) +} + +interface ExtendedLinearExpressionBuilder extends LinearTypeExpressionBuilder { + override ExtendedLinearExpressionBuilder add(int scale, Type type) + + def ExtendedLinearExpressionBuilder add(int scale, IPatternMatch patternMatch) + + def ExtendedLinearExpressionBuilder add(int scale, Dimension dimension) + + def LinearBoundedExpression build(BoundSaturationListener listener) +} + +class ExtendedPolyhedronBuilder implements ExtendedLinearExpressionBuilderFactory { + val Map typeBounds + val Map, LinearBoundedExpression> expressionsCache + + val ImmutableList.Builder dimensions = ImmutableList.builder + val Set constraints = new HashSet + val Set expressionsToSaturate = new HashSet + val Map patternMatchCounts = new HashMap + @Accessors(PUBLIC_GETTER) val List> saturationListeners = new ArrayList + + new(Polyhedron polyhedron, Map typeBounds, + Map, LinearBoundedExpression> initialExpressionsCache) { + this.typeBounds = typeBounds + this.expressionsCache = new HashMap(initialExpressionsCache) + dimensions.addAll(polyhedron.dimensions) + constraints.addAll(polyhedron.constraints) + expressionsToSaturate.addAll(polyhedron.expressionsToSaturate) + } + + override createBuilder() { + new ExtendedLinearExpressionBuilderImpl(this) + } + + override getDimension(IPatternMatch patternMatch) { + patternMatchCounts.computeIfAbsent(patternMatch) [ key | + val dimension = new Dimension(key.toString, 0, null) + dimensions.add(dimension) + dimension + ] + } + + def buildPolyhedron() { + new Polyhedron( + dimensions.build, + ImmutableList.copyOf(constraints), + ImmutableList.copyOf(expressionsToSaturate) + ) + } + + @FinalFieldsConstructor + private static class ExtendedLinearExpressionBuilderImpl implements ExtendedLinearExpressionBuilder { + val ExtendedPolyhedronBuilder polyhedronBuilder + + val Map coefficients = new HashMap + + override add(int scale, Type type) { + val expression = polyhedronBuilder.typeBounds.get(type) + if (expression === null) { + throw new IllegalArgumentException("Unknown Type: " + type) + } + add(scale, expression) + } + + override add(int scale, IPatternMatch patternMatch) { + val dimension = polyhedronBuilder.getDimension(patternMatch) + add(scale, dimension) + } + + private def add(int scale, LinearBoundedExpression expression) { + switch (expression) { + Dimension: add(scale, expression) + LinearConstraint: add(scale, expression.coefficients) + default: throw new IllegalArgumentException("Unknown LinearBoundedExpression: " + expression) + } + } + + private def add(int scale, Map coefficients) { + for (pair : coefficients.entrySet) { + add(scale * pair.value, pair.key) + } + this + } + + override add(int scale, Dimension dimension) { + coefficients.merge(dimension, scale)[a, b|a + b] + this + } + + override build() { + val filteredCoefficients = ImmutableMap.copyOf(coefficients.filter [ _, coefficient | + coefficient != 0 + ]) + polyhedronBuilder.expressionsCache.computeIfAbsent(filteredCoefficients) [ map | + if (map.size == 1) { + val pair = map.entrySet.head + if (pair.value == 1) { + return pair.key + } + } + val constraint = new LinearConstraint(map) + polyhedronBuilder.constraints.add(constraint) + constraint + ] + } + + override build(BoundSaturationListener listener) { + val expression = build() + if (listener !== null) { + polyhedronBuilder.expressionsToSaturate.add(expression) + polyhedronBuilder.saturationListeners.add(expression -> listener) + } + expression + } + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ExtendedPolyhedronScopePropagatorStrategy.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ExtendedPolyhedronScopePropagatorStrategy.xtend new file mode 100644 index 00000000..32923396 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ExtendedPolyhedronScopePropagatorStrategy.xtend @@ -0,0 +1,63 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality + +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationStatistics +import java.util.Collection +import java.util.Map +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation + +interface PolyhedronExtensionOperator { + def void extendPolyhedron(ExtendedLinearExpressionBuilderFactory factory) +} + +class ExtendedPolyhedronScopePropagatorStrategy extends PolyhedronScopePropagatorStrategy { + val PolyhedronSolver solver + val Collection extensionOperators + + var Map typeBounds + var Map, LinearBoundedExpression> initialExpressionsCache + + new(PolyhedronSolver solver, Collection extensionOperators, + ModelGenerationStatistics statistics) { + super(statistics) + this.solver = solver + this.extensionOperators = extensionOperators + } + + override setPolyhedron(Polyhedron polyhedron, Map typeBounds, + Map, LinearBoundedExpression> initialExpressionsCache) { + super.setPolyhedron(polyhedron, typeBounds, initialExpressionsCache) + this.typeBounds = typeBounds + this.initialExpressionsCache = initialExpressionsCache + } + + override isRelevantRelation(Relation relation) { + true + } + + override protected doSaturate() { + val builder = new ExtendedPolyhedronBuilder(polyhedron, typeBounds, initialExpressionsCache) + for (extensionOperator : extensionOperators) { + extensionOperator.extendPolyhedron(builder) + } + val extendedPolyhedron = builder.buildPolyhedron() + val saturationOperator = solver.createSaturationOperator(extendedPolyhedron) + val result = try { + saturationOperator.saturate() + } finally { + saturationOperator.close() + } + if (result == PolyhedronSaturationResult.EMPTY) { + // The partial model cannot be refined any more, we can't provide objective bounds. + for (pair : builder.saturationListeners) { + pair.value.boundsSaturated(null, null) + } + return false + } + for (pair : builder.saturationListeners) { + val expression = pair.key + pair.value.boundsSaturated(expression.lowerBound, expression.upperBound) + } + true + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagator.xtend index c28d4caa..ad8f94ab 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagator.xtend @@ -1,7 +1,5 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality -import com.google.common.cache.Cache -import com.google.common.cache.CacheBuilder import com.google.common.collect.ImmutableList import com.google.common.collect.ImmutableMap import com.google.common.collect.ImmutableSet @@ -23,7 +21,6 @@ import java.util.HashSet import java.util.List import java.util.Map import java.util.Set -import javax.naming.OperationNotSupportedException import org.eclipse.viatra.query.runtime.api.IPatternMatch import org.eclipse.viatra.query.runtime.api.IQuerySpecification import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine @@ -32,31 +29,29 @@ import org.eclipse.viatra.query.runtime.emf.EMFScope import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { - static val CACHE_SIZE = 10000 - val boolean updateHeuristic val Map scopeBounds val LinearBoundedExpression topLevelBounds val Polyhedron polyhedron - val PolyhedronSaturationOperator operator + val PolyhedronScopePropagatorStrategy strategy val Set relevantRelations - val Cache cache = CacheBuilder.newBuilder.maximumSize(CACHE_SIZE).build List updaters = emptyList new(PartialInterpretation p, ModelGenerationStatistics statistics, Set possibleNewDynamicTypes, Map unfinishedMultiplicityQueries, IQuerySpecification> hasElementInContainmentQuery, Map>> allPatternsByName, - Collection hints, PolyhedronSolver solver, boolean propagateRelations, - boolean updateHeuristic) { + Collection hints, PolyhedronScopePropagatorStrategy strategy, + boolean propagateRelations, boolean updateHeuristic) { super(p, statistics) this.updateHeuristic = updateHeuristic + this.strategy = strategy val builder = new PolyhedronBuilder(p) builder.buildPolyhedron(possibleNewDynamicTypes) scopeBounds = builder.scopeBounds topLevelBounds = builder.topLevelBounds polyhedron = builder.polyhedron - operator = solver.createSaturationOperator(polyhedron) + strategy.setPolyhedron(polyhedron, builder.typeBounds, builder.expressionsCache) propagateAllScopeConstraints() if (propagateRelations) { val maximumNumberOfNewNodes = topLevelBounds.upperBound @@ -80,30 +75,10 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { resetBounds() populatePolyhedronFromScope() // println(polyhedron) - val signature = polyhedron.createSignature - val cachedSignature = cache.getIfPresent(signature) - switch (cachedSignature) { - case null: { - statistics.incrementScopePropagationSolverCount - val result = operator.saturate() - if (result == PolyhedronSaturationResult.EMPTY) { - cache.put(signature, PolyhedronSignature.EMPTY) -// println("INVALID") - setScopesInvalid() - } else { - val resultSignature = polyhedron.createSignature - cache.put(signature, resultSignature) - populateScopesFromPolyhedron() - } - } - case PolyhedronSignature.EMPTY: - setScopesInvalid() - PolyhedronSignature.Bounds: { - polyhedron.applySignature(signature) - populateScopesFromPolyhedron() - } - default: - throw new IllegalStateException("Unknown polyhedron signature: " + signature) + if (strategy.saturate) { + populateScopesFromPolyhedron() + } else { + setScopesInvalid() } // println(polyhedron) if (updateHeuristic) { @@ -112,9 +87,9 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { } override isPropagationNeededAfterAdditionToRelation(Relation r) { - relevantRelations.contains(r) || super.isPropagationNeededAfterAdditionToRelation(r) + relevantRelations.contains(r) || strategy.isRelevantRelation(r) || super.isPropagationNeededAfterAdditionToRelation(r) } - + override isQueryEngineFlushRequiredBeforePropagation() { true } @@ -253,7 +228,10 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { } buildRelevantRelations(constraints.keySet) for (hint : hints) { - updatersBuilder.add(hint.createConstraintUpdater(this)) + val updater = hint.createConstraintUpdater(this) + if (updater !== null) { + updatersBuilder.add(updater) + } } updaters = updatersBuilder.build addCachedConstraintsToPolyhedron() @@ -410,7 +388,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { for (scope : p.scopes) { switch (targetTypeInterpretation : scope.targetTypeInterpretation) { PartialPrimitiveInterpretation: - throw new OperationNotSupportedException("Primitive type scopes are not yet implemented") + throw new IllegalStateException("Primitive type scopes are not yet implemented") PartialComplexTypeInterpretation: { val complexType = targetTypeInterpretation.interpretationOf val typeBound = typeBounds.get(complexType) diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagatorStrategy.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagatorStrategy.xtend new file mode 100644 index 00000000..f93dcd18 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronScopePropagatorStrategy.xtend @@ -0,0 +1,92 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality + +import com.google.common.cache.Cache +import com.google.common.cache.CacheBuilder +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationStatistics +import java.util.Map +import org.eclipse.xtend.lib.annotations.Accessors +import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor + +@FinalFieldsConstructor +abstract class PolyhedronScopePropagatorStrategy { + val ModelGenerationStatistics statistics + + @Accessors(PUBLIC_GETTER) var Polyhedron polyhedron + + def void setPolyhedron(Polyhedron polyhedron, Map typeBounds, + Map, LinearBoundedExpression> initialExpressionsCache) { + if (this.polyhedron !== null) { + throw new IllegalStateException("polyhedron was already set") + } + this.polyhedron = polyhedron + initialize() + } + + def boolean saturate() { + if (polyhedron === null) { + throw new IllegalStateException("polyhedron was not set") + } + doSaturate() + } + + def boolean isRelevantRelation(Relation relation) { + false + } + + protected def incrementScopePropagationSolverCount() { + statistics.incrementScopePropagationSolverCount() + } + + protected def void initialize() { + } + + protected def boolean doSaturate() +} + +@FinalFieldsConstructor +class CachingSimplePolyhedronScopePropagatorStrategy extends PolyhedronScopePropagatorStrategy { + static val CACHE_SIZE = 10000 + + val PolyhedronSolver solver + + val Cache cache = CacheBuilder.newBuilder.maximumSize(CACHE_SIZE).build + var PolyhedronSaturationOperator operator + + new(PolyhedronSolver solver, ModelGenerationStatistics statistics) { + super(statistics) + this.solver = solver + } + + override protected initialize() { + operator = solver.createSaturationOperator(polyhedron) + } + + override protected doSaturate() { + val signature = polyhedron.createSignature + val cachedSignature = cache.getIfPresent(signature) + switch (cachedSignature) { + case null: { + incrementScopePropagationSolverCount() + val result = operator.saturate() + if (result == PolyhedronSaturationResult.EMPTY) { + cache.put(signature, PolyhedronSignature.EMPTY) + false + } else { + val resultSignature = polyhedron.createSignature + cache.put(signature, resultSignature) + true + } + } + case PolyhedronSignature.EMPTY: + false + PolyhedronSignature.Bounds: { + polyhedron.applySignature(signature) + true + } + default: + throw new IllegalStateException("Unknown polyhedron signature: " + signature) + } + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronSolver.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronSolver.xtend index 4e046190..21bd2d9e 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronSolver.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/PolyhedronSolver.xtend @@ -116,7 +116,7 @@ abstract class PolyhedronSignature { } @Accessors -abstract class LinearBoundedExpression { +class Bounds { var Integer lowerBound var Integer upperBound @@ -132,12 +132,19 @@ abstract class LinearBoundedExpression { } } + def void assertBetween(Integer tighterLowerBound, Integer tighterUpperBound) { + tightenLowerBound(tighterLowerBound) + tightenUpperBound(tighterUpperBound) + } + def void assertEqualsTo(int bound) { - tightenLowerBound(bound) - tightenUpperBound(bound) + assertBetween(bound, bound) } } +abstract class LinearBoundedExpression extends Bounds { +} + @Accessors class Dimension extends LinearBoundedExpression { val String name diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/META-INF/MANIFEST.MF b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/META-INF/MANIFEST.MF index 4ad61ccb..402a0b7d 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/META-INF/MANIFEST.MF +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/META-INF/MANIFEST.MF @@ -4,6 +4,7 @@ Bundle-Name: Reasoner Bundle-SymbolicName: hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner Bundle-Version: 1.0.0.qualifier Export-Package: hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner, + hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse, hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization Require-Bundle: hu.bme.mit.inf.dslreasoner.ecore2logic;bundle-version="1.0.0", hu.bme.mit.inf.dslreasoner.logic.model;bundle-version="1.0.0", diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ModelGenerationMethodBasedGlobalConstraint.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ModelGenerationMethodBasedGlobalConstraint.xtend index 9ef5e091..691e0645 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ModelGenerationMethodBasedGlobalConstraint.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ModelGenerationMethodBasedGlobalConstraint.xtend @@ -1,7 +1,6 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner import org.eclipse.viatra.dse.objectives.IGlobalConstraint -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod abstract class ModelGenerationMethodBasedGlobalConstraint implements IGlobalConstraint { val protected ModelGenerationMethod method diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ModelGenerationMethodProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ModelGenerationMethodProvider.xtend new file mode 100644 index 00000000..25137eba --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ModelGenerationMethodProvider.xtend @@ -0,0 +1,201 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner + +import com.google.common.collect.ImmutableMap +import com.google.common.collect.ImmutableSet +import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel +import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem +import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationStatistics +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.CachingSimplePolyhedronScopePropagatorStrategy +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.CbcPolyhedronSolver +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.MultiplicityGoalConstraintCalculator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronExtensionOperator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronScopePropagator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationConstraintCalculator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.TypeHierarchyScopePropagator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.Z3PolyhedronSolver +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.GeneratedPatterns +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.ModalPatternQueries +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternProvider +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules.GoalConstraintProvider +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.rules.RefinementRuleProvider +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.DiversityChecker +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.ViatraReasonerSolutionSaver +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ThreeValuedCostObjectiveProvider +import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace +import java.util.Collection +import java.util.List +import java.util.Map +import java.util.Set +import org.eclipse.viatra.dse.objectives.IObjective +import org.eclipse.viatra.query.runtime.api.GenericQueryGroup +import org.eclipse.viatra.query.runtime.api.IPatternMatch +import org.eclipse.viatra.query.runtime.api.IQuerySpecification +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine +import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher +import org.eclipse.viatra.query.runtime.emf.EMFScope +import org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery +import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRule +import org.eclipse.xtend.lib.annotations.Data +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedPolyhedronScopePropagatorStrategy + +@Data class ModelGenerationMethod { + ModelGenerationStatistics statistics + + Collection> objectRefinementRules + Collection> relationRefinementRules + + List unfinishedMultiplicities + + Collection>> unfinishedWF + + Collection>> invalidWF + + Map>> mustUnitPropagationPreconditions + Map>> currentUnitPropagationPreconditions + + Map modalRelationQueries + + Collection>> allPatterns + + Collection costObjectives + boolean optimizationProblem + ViatraReasonerSolutionSaver solutionSaver +} + +class ModelGenerationMethodProvider { + val PatternProvider patternProvider = new PatternProvider + val RefinementRuleProvider refinementRuleProvider = new RefinementRuleProvider + val GoalConstraintProvider goalConstraintProvider = new GoalConstraintProvider + val relationConstraintCalculator = new RelationConstraintCalculator + + def ModelGenerationMethod createModelGenerationMethod( + LogicProblem logicProblem, + PartialInterpretation emptySolution, + ReasonerWorkspace workspace, + ViatraReasonerConfiguration config + ) { + val statistics = new ModelGenerationStatistics + val debugLevel = config.documentationLevel + val writeFiles = (debugLevel === DocumentationLevel.NORMAL || debugLevel === DocumentationLevel.FULL) + + val Set existingQueries = logicProblem.relations.map[annotations].flatten.filter(TransfomedViatraQuery). + map[it.patternPQuery as PQuery].toSet + + val relationConstraints = relationConstraintCalculator.calculateRelationConstraints(logicProblem) + val queries = patternProvider.generateQueries(logicProblem, emptySolution, statistics, existingQueries, + workspace, config.typeInferenceMethod, config.scopePropagatorStrategy, relationConstraints, config.hints, + config.unitPropagationPatternGenerators, writeFiles) + + val unfinishedMultiplicities = goalConstraintProvider.getUnfinishedMultiplicityQueries(logicProblem, queries, + config.calculateObjectCreationCosts) + val unfinishedWF = queries.getUnfinishedWFQueries.values + val modalRelationQueriesBuilder = ImmutableMap.builder + for (entry : queries.modalRelationQueries.entrySet) { + val annotation = entry.key.annotations.filter(TransfomedViatraQuery).head + if (annotation !== null) { + modalRelationQueriesBuilder.put(annotation.patternFullyQualifiedName, entry.value) + } + } + val modalRelationQueries = modalRelationQueriesBuilder.build + val invalidWF = queries.getInvalidWFQueries.values + val mustUnitPropagationPreconditions = queries.getMustUnitPropagationPreconditionPatterns + val currentUnitPropagationPreconditions = queries.getCurrentUnitPropagationPreconditionPatterns + val queriesToPrepare = ImmutableSet.builder.addAll(queries.refineObjectQueries.values).addAll( + queries.refineTypeQueries.values).addAll(queries.refineRelationQueries.values).addAll( + queries.mustRelationPropagationQueries.values).addAll(queries.multiplicityConstraintQueries.values.flatMap [ + allQueries + ]).addAll(queries.unfinishedWFQueries.values).addAll(queries.invalidWFQueries.values).addAll( + queries.mustUnitPropagationPreconditionPatterns.values).addAll( + queries.currentUnitPropagationPreconditionPatterns.values).add(queries.hasElementInContainmentQuery).build + val queryEngine = ViatraQueryEngine.on(new EMFScope(emptySolution)) + GenericQueryGroup.of(queriesToPrepare).prepare(queryEngine) + + val objectiveProvider = new ThreeValuedCostObjectiveProvider(queryEngine, emptySolution, modalRelationQueries) + val transformedObjectives = objectiveProvider.getCostObjectives(config.costObjectives) + + val solutionSaver = new ViatraReasonerSolutionSaver(transformedObjectives.leveledExtremalObjectives, + config.solutionScope.numberOfRequiredSolutions, DiversityChecker.of(config.diversityRequirement)) + + val allHints = ImmutableSet.builder + allHints.addAll(config.hints) + for (hint : transformedObjectives.hints) { + hint.boundsProvider = solutionSaver + allHints.add(hint) + } + + val scopePropagator = createScopePropagator(config.scopePropagatorStrategy, emptySolution, allHints.build, + transformedObjectives.extensionOperators, queries, statistics) + scopePropagator.propagateAllScopeConstraints + val unitRulePropagator = refinementRuleProvider.createUnitPrulePropagator(logicProblem, emptySolution, queries, + scopePropagator, statistics) + val objectRefinementRules = refinementRuleProvider.createObjectRefinementRules(logicProblem, emptySolution, + queries, unitRulePropagator, config.nameNewElements, statistics) + val relationRefinementRules = refinementRuleProvider.createRelationRefinementRules(queries, unitRulePropagator, + statistics) + + return new ModelGenerationMethod( + statistics, + objectRefinementRules.values, + relationRefinementRules.values, + unfinishedMultiplicities, + unfinishedWF, + invalidWF, + mustUnitPropagationPreconditions, + currentUnitPropagationPreconditions, + modalRelationQueries, + queries.allQueries, + transformedObjectives.objectives, + transformedObjectives.optimizationProblem, + solutionSaver + ) + } + + private def createScopePropagator(ScopePropagatorStrategy scopePropagatorStrategy, + PartialInterpretation emptySolution, Collection hints, + Collection extensionOperators, GeneratedPatterns queries, + ModelGenerationStatistics statistics) { + if (!hints.empty && !(scopePropagatorStrategy instanceof ScopePropagatorStrategy.Polyhedral)) { + throw new IllegalArgumentException("Only the Polyhedral scope propagator strategy can use hints.") + } + switch (scopePropagatorStrategy) { + case ScopePropagatorStrategy.None, + case ScopePropagatorStrategy.Basic: + new ScopePropagator(emptySolution, statistics) + case ScopePropagatorStrategy.BasicTypeHierarchy: + new TypeHierarchyScopePropagator(emptySolution, statistics) + ScopePropagatorStrategy.Polyhedral: { + val types = queries.refineObjectQueries.keySet.map[newType].toSet + val allPatternsByName = queries.allQueries.toMap[fullyQualifiedName] + val solver = switch (scopePropagatorStrategy.solver) { + case Z3Integer: + new Z3PolyhedronSolver(false, scopePropagatorStrategy.timeoutSeconds) + case Z3Real: + new Z3PolyhedronSolver(true, scopePropagatorStrategy.timeoutSeconds) + case Cbc: + new CbcPolyhedronSolver(false, scopePropagatorStrategy.timeoutSeconds, true) + case Clp: + new CbcPolyhedronSolver(true, scopePropagatorStrategy.timeoutSeconds, true) + default: + throw new IllegalArgumentException("Unknown polyhedron solver: " + + scopePropagatorStrategy.solver) + } + val strategy = if (extensionOperators.empty) { + new CachingSimplePolyhedronScopePropagatorStrategy(solver, statistics) + } else { + new ExtendedPolyhedronScopePropagatorStrategy(solver, extensionOperators, statistics) + } + new PolyhedronScopePropagator(emptySolution, statistics, types, queries.multiplicityConstraintQueries, + queries.hasElementInContainmentQuery, allPatternsByName, hints, strategy, + scopePropagatorStrategy.requiresUpperBoundIndexing, scopePropagatorStrategy.updateHeuristic) + } + default: + throw new IllegalArgumentException("Unknown scope propagator strategy: " + scopePropagatorStrategy) + } + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend index 8e05665c..8e992741 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasoner.xtend @@ -1,7 +1,5 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner -import com.google.common.collect.ImmutableList -import com.google.common.collect.Lists import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasonerException @@ -11,7 +9,6 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicresultFactory import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethodProvider import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.PartialInterpretationInitialiser import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation @@ -22,7 +19,6 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.sta import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.PairwiseNeighbourhoodBasedStateCoderFactory import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.BasicScopeGlobalConstraint import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.BestFirstStrategyForModelGeneration -import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.DiversityChecker import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.InconsistentScopeGlobalConstraint import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.LoggerSolutionFoundHandler import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.ModelGenerationCompositeObjective @@ -32,11 +28,8 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.PunishSizeObjective import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.ScopeObjective import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.SurelyViolatedObjectiveGlobalConstraint import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.UnfinishedMultiplicityObjective -import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.ViatraReasonerSolutionSaver import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse.WF2ObjectiveConverter import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveKind -import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ThreeValuedCostElement -import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ThreeValuedCostObjective import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace import java.util.List import java.util.Map @@ -86,13 +79,7 @@ class ViatraReasoner extends LogicReasoner { problem, emptySolution, workspace, - viatraConfig.nameNewElements, - viatraConfig.typeInferenceMethod, - viatraConfig.calculateObjectCreationCosts, - viatraConfig.scopePropagatorStrategy, - viatraConfig.hints, - viatraConfig.unitPropagationPatternGenerators, - viatraConfig.documentationLevel + viatraConfig ) val compositeObjective = new ModelGenerationCompositeObjective( @@ -112,45 +99,21 @@ class ViatraReasoner extends LogicReasoner { dse.addObjective(punishObjective) } - val extremalObjectives = Lists.newArrayListWithExpectedSize(viatraConfig.costObjectives.size) - for (entry : viatraConfig.costObjectives.indexed) { - val objectiveName = '''costObjective«entry.key»''' - val objectiveConfig = entry.value - val elementsBuilder = ImmutableList.builder - for (elementConfig : objectiveConfig.elements) { - val relationName = elementConfig.patternQualifiedName - val modalQueries = method.modalRelationQueries.get(relationName) - if (modalQueries === null) { - throw new IllegalArgumentException("Unknown relation: " + relationName) - } - elementsBuilder.add(new ThreeValuedCostElement( - modalQueries.currentQuery, - modalQueries.mayQuery, - modalQueries.mustQuery, - elementConfig.weight - )) - } - val costElements = elementsBuilder.build - val costObjective = new ThreeValuedCostObjective(objectiveName, costElements, objectiveConfig.kind, - objectiveConfig.threshold, 3) + for (costObjective : method.costObjectives) { dse.addObjective(costObjective) - if (objectiveConfig.findExtremum) { - extremalObjectives += costObjective - } } - val numberOfRequiredSolutions = configuration.solutionScope.numberOfRequiredSolutions - val solutionStore = if (extremalObjectives.empty) { - new SolutionStore(numberOfRequiredSolutions) - } else { + val solutionStore = if (method.optimizationProblem) { new SolutionStore() + } else { + new SolutionStore(numberOfRequiredSolutions) } solutionStore.registerSolutionFoundHandler(new LoggerSolutionFoundHandler(viatraConfig)) - val diversityChecker = DiversityChecker.of(viatraConfig.diversityRequirement) val numericSolver = new NumericSolver(method, viatraConfig.runIntermediateNumericalConsistencyChecks, false) - val solutionSaver = new ViatraReasonerSolutionSaver(newArrayList(extremalObjectives), numberOfRequiredSolutions, - diversityChecker, numericSolver) + val solutionSaver = method.solutionSaver + solutionSaver.numericSolver = numericSolver val solutionCopier = solutionSaver.solutionCopier + val diversityChecker = solutionSaver.diversityChecker solutionStore.withSolutionSaver(solutionSaver) dse.solutionStore = solutionStore @@ -185,7 +148,8 @@ class ViatraReasoner extends LogicReasoner { dse.addTransformationRule(rule) } - val strategy = new BestFirstStrategyForModelGeneration(workspace, viatraConfig, method, solutionSaver, numericSolver) + val strategy = new BestFirstStrategyForModelGeneration(workspace, viatraConfig, method, solutionSaver, + numericSolver) viatraConfig.progressMonitor.workedForwardTransformation val transformationFinished = System.nanoTime val transformationTime = transformationFinished - transformationStartTime @@ -211,14 +175,15 @@ class ViatraReasoner extends LogicReasoner { it.value = (pair.value / 1000000) as int ] } - for(x: 0.. [ it.name = '''Solution«x+1»DetailedStatistics''' it.value = strategy.times.get(x) ] } it.entries += createIntStatisticEntry => [ - it.name = "ExplorationInitializationTime" it.value = ((strategy.explorationStarted-transformationFinished)/1000000) as int + it.name = "ExplorationInitializationTime" + it.value = ((strategy.explorationStarted - transformationFinished) / 1000000) as int ] it.entries += createIntStatisticEntry => [ it.name = "TransformationExecutionTime" @@ -253,22 +218,28 @@ class ViatraReasoner extends LogicReasoner { it.value = dse.numberOfStates as int ] it.entries += createIntStatisticEntry => [ - it.name = "ForwardTime" it.value = (strategy.forwardTime/1000000) as int + it.name = "ForwardTime" + it.value = (strategy.forwardTime / 1000000) as int ] it.entries += createIntStatisticEntry => [ - it.name = "BacktrackingTime" it.value = (strategy.backtrackingTime/1000000) as int + it.name = "BacktrackingTime" + it.value = (strategy.backtrackingTime / 1000000) as int ] it.entries += createIntStatisticEntry => [ - it.name = "GlobalConstraintEvaluationTime" it.value = (strategy.globalConstraintEvaluationTime/1000000) as int + it.name = "GlobalConstraintEvaluationTime" + it.value = (strategy.globalConstraintEvaluationTime / 1000000) as int ] it.entries += createIntStatisticEntry => [ - it.name = "FitnessCalculationTime" it.value = (strategy.fitnessCalculationTime/1000000) as int + it.name = "FitnessCalculationTime" + it.value = (strategy.fitnessCalculationTime / 1000000) as int ] it.entries += createIntStatisticEntry => [ - it.name = "SolutionCopyTime" it.value = (solutionSaver.totalCopierRuntime/1000000) as int + it.name = "SolutionCopyTime" + it.value = (solutionSaver.totalCopierRuntime / 1000000) as int ] it.entries += createIntStatisticEntry => [ - it.name = "ActivationSelectionTime" it.value = (strategy.activationSelector.runtime/1000000) as int + it.name = "ActivationSelectionTime" + it.value = (strategy.activationSelector.runtime / 1000000) as int ] it.entries += createIntStatisticEntry => [ it.name = "Decisions" @@ -287,27 +258,34 @@ class ViatraReasoner extends LogicReasoner { it.value = method.statistics.scopePropagatorSolverInvocations ] it.entries += createIntStatisticEntry => [ - it.name = "NumericalSolverSumTime" it.value = (strategy.numericSolver.runtime/1000000) as int + it.name = "NumericalSolverSumTime" + it.value = (strategy.numericSolver.runtime / 1000000) as int ] it.entries += createIntStatisticEntry => [ - it.name = "NumericalSolverProblemFormingTime" it.value = (strategy.numericSolver.solverFormingProblem/1000000) as int + it.name = "NumericalSolverProblemFormingTime" + it.value = (strategy.numericSolver.solverFormingProblem / 1000000) as int ] it.entries += createIntStatisticEntry => [ - it.name = "NumericalSolverSolvingTime" it.value = (strategy.numericSolver.solverSolvingProblem/1000000) as int + it.name = "NumericalSolverSolvingTime" + it.value = (strategy.numericSolver.solverSolvingProblem / 1000000) as int ] it.entries += createIntStatisticEntry => [ - it.name = "NumericalSolverInterpretingSolution" it.value = (strategy.numericSolver.solverSolution/1000000) as int + it.name = "NumericalSolverInterpretingSolution" + it.value = (strategy.numericSolver.solverSolution / 1000000) as int ] it.entries += createIntStatisticEntry => [ - it.name = "NumericalSolverCachingTime" it.value = (strategy.numericSolver.cachingTime/1000000) as int + it.name = "NumericalSolverCachingTime" + it.value = (strategy.numericSolver.cachingTime / 1000000) as int ] it.entries += createIntStatisticEntry => [ - it.name = "NumericalSolverCallNumber" it.value = strategy.numericSolver.numberOfSolverCalls + it.name = "NumericalSolverCallNumber" + it.value = strategy.numericSolver.numberOfSolverCalls ] it.entries += createIntStatisticEntry => [ - it.name = "NumericalSolverCachedAnswerNumber" it.value = strategy.numericSolver.numberOfCachedSolverCalls + it.name = "NumericalSolverCachedAnswerNumber" + it.value = strategy.numericSolver.numberOfCachedSolverCalls ] - if(diversityChecker.active) { + if (diversityChecker.active) { it.entries += createIntStatisticEntry => [ it.name = "SolutionDiversityCheckTime" it.value = (diversityChecker.totalRuntime / 1000000) as int diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend index a2ed6016..fbe6da9d 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/ViatraReasonerConfiguration.xtend @@ -4,7 +4,6 @@ import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicSolverConfiguration import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeInferenceMethod import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedralScopePropagatorConstraints @@ -12,6 +11,7 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.Polyhedr import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.UnitPropagationPatternGenerator import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretationVisualiser +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CostObjectiveHint import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveKind import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveThreshold import java.util.LinkedList @@ -114,9 +114,11 @@ class CostObjectiveConfiguration { public var ObjectiveKind kind public var ObjectiveThreshold threshold public var boolean findExtremum + public var CostObjectiveHint hint } class CostObjectiveElementConfiguration { public var String patternQualifiedName public var int weight } + diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java index 4800f71d..4b7cead1 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BestFirstStrategyForModelGeneration.java @@ -28,8 +28,6 @@ import org.eclipse.viatra.dse.objectives.Fitness; import org.eclipse.viatra.dse.objectives.ObjectiveComparatorHelper; import org.eclipse.viatra.dse.solutionstore.ISolutionFoundHandler; import org.eclipse.viatra.dse.solutionstore.SolutionStore; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher; import hu.bme.mit.inf.dslreasoner.logic.model.builder.DocumentationLevel; import hu.bme.mit.inf.dslreasoner.logic.model.builder.LogicReasoner; @@ -37,12 +35,11 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem; import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.InconsistencyResult; import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.LogicResult; import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.ModelResult; -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.PartialInterpretation2Logic; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation; -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.NeighbourhoodBasedPartialInterpretationStateCoder; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretationVisualisation; import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.visualisation.PartialInterpretationVisualiser; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethod; import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration; import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace; @@ -301,7 +298,7 @@ public class BestFirstStrategyForModelGeneration implements IStrategy { return activationIds; } - private void checkForSolution(final Fitness fittness) { + private void checkForSolution(final Fitness fitness) { solutionStore.newSolution(context); } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/NumericSolver.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/NumericSolver.xtend index 066040a0..70e8e9c2 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/NumericSolver.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/NumericSolver.xtend @@ -1,13 +1,13 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse import hu.bme.mit.inf.dslreasoner.viatra2logic.NumericTranslator -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.BooleanElement import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.IntegerElement import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PrimitiveElement import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.RealElement import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.StringElement +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethod import java.math.BigDecimal import java.util.HashMap import java.util.LinkedHashMap diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend index cfd11816..b48d0831 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/PartialModelAsLogicInterpretation.xtend @@ -22,12 +22,13 @@ import java.util.List import java.util.Map import java.util.TreeSet import org.eclipse.emf.ecore.EObject +import org.eclipse.xtend.lib.annotations.Accessors import org.eclipse.xtext.xbase.lib.Functions.Function1 import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* class PartialModelAsLogicInterpretation implements LogicModelInterpretation{ - val PartialInterpretation partialInterpretation + @Accessors val PartialInterpretation partialInterpretation val Map trace; val Map type2Interpretation val Map relation2Interpretation diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionCopier.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionCopier.xtend index 38c8f5a1..33b69436 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionCopier.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/SolutionCopier.xtend @@ -26,16 +26,12 @@ class CopiedSolution { * using the supplied {@link NumericSolver}. */ class SolutionCopier { - val NumericSolver numericSolver val copiedSolutions = new LinkedHashMap + @Accessors NumericSolver numericSolver long startTime = System.nanoTime @Accessors(PUBLIC_GETTER) long totalCopierRuntime = 0 - new(NumericSolver numericSolver) { - this.numericSolver = numericSolver - } - def void copySolution(ThreadContext context, Object solutionId) { val existingCopy = copiedSolutions.get(solutionId) if (existingCopy === null) { @@ -47,7 +43,7 @@ class SolutionCopier { totalCopierRuntime += System.nanoTime - copyStart val copierRuntime = System.nanoTime - startTime val copiedSolution = new CopiedSolution(copiedPartialInterpretation, copier, copierRuntime) - numericSolver.fillSolutionCopy(copiedSolution.trace) + numericSolver?.fillSolutionCopy(copiedSolution.trace) copiedSolutions.put(solutionId, copiedSolution) } else { existingCopy.current = true diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend index c0b5008c..e00f76ff 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ViatraReasonerSolutionSaver.xtend @@ -1,5 +1,9 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.Bounds +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.DirectionalThresholdObjective +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.IObjectiveBoundsProvider +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.ObjectiveThreshold import java.util.HashMap import java.util.Map import org.eclipse.viatra.dse.api.DSEException @@ -18,24 +22,32 @@ import org.eclipse.xtend.lib.annotations.Accessors * Will also automatically fill any missing numerical values in the saved solutions * using the supplied {@link NumericSolver}. */ -class ViatraReasonerSolutionSaver implements ISolutionSaver { +class ViatraReasonerSolutionSaver implements ISolutionSaver, IObjectiveBoundsProvider { + static val TOLERANCE = 1e-10 + @Accessors val SolutionCopier solutionCopier - val NumericSolver numericSolver @Accessors val DiversityChecker diversityChecker + val IObjective[][] leveledExtremalObjectives val boolean hasExtremalObjectives val int numberOfRequiredSolutions val ObjectiveComparatorHelper comparatorHelper val Map trajectories = new HashMap - @Accessors(PUBLIC_SETTER) var Map solutionsCollection + @Accessors var NumericSolver numericSolver + @Accessors var Map solutionsCollection - new(IObjective[][] leveledExtremalObjectives, int numberOfRequiredSolutions, DiversityChecker diversityChecker, NumericSolver numericSolver) { + new(IObjective[][] leveledExtremalObjectives, int numberOfRequiredSolutions, DiversityChecker diversityChecker) { this.diversityChecker = diversityChecker comparatorHelper = new ObjectiveComparatorHelper(leveledExtremalObjectives) + this.leveledExtremalObjectives = leveledExtremalObjectives hasExtremalObjectives = leveledExtremalObjectives.exists[!empty] this.numberOfRequiredSolutions = numberOfRequiredSolutions - this.solutionCopier = new SolutionCopier(numericSolver) + this.solutionCopier = new SolutionCopier + } + + def setNumericSolver(NumericSolver numericSolver) { this.numericSolver = numericSolver + solutionCopier.numericSolver = numericSolver } override saveSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory) { @@ -51,6 +63,7 @@ class ViatraReasonerSolutionSaver implements ISolutionSaver { if (!shouldSaveSolution(fitness, context)) { return false } + println("Found: " + fitness) val dominatedTrajectories = newArrayList for (entry : trajectories.entrySet) { val isLastFitnessBetter = comparatorHelper.compare(fitness, entry.value) @@ -99,7 +112,7 @@ class ViatraReasonerSolutionSaver implements ISolutionSaver { } private def shouldSaveSolution(Fitness fitness, ThreadContext context) { - return fitness.satisifiesHardObjectives && numericSolver.currentSatisfiable + fitness.satisifiesHardObjectives && (numericSolver === null || numericSolver.currentSatisfiable) } private def basicSaveSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory, @@ -145,8 +158,93 @@ class ViatraReasonerSolutionSaver implements ISolutionSaver { } solutionsCollection.size < numberOfRequiredSolutions } - + def getTotalCopierRuntime() { solutionCopier.totalCopierRuntime } + + override computeRequiredBounds(IObjective objective, Bounds bounds) { + if (!hasExtremalObjectives) { + return + } + if (objective instanceof DirectionalThresholdObjective) { + switch (threshold : objective.threshold) { + case ObjectiveThreshold.NO_THRESHOLD: { + // No threshold to set. + } + ObjectiveThreshold.Exclusive: { + switch (kind : objective.kind) { + case HIGHER_IS_BETTER: + bounds.tightenLowerBound(Math.floor(threshold.threshold + 1) as int) + case LOWER_IS_BETTER: + bounds.tightenUpperBound(Math.ceil(threshold.threshold - 1) as int) + default: + throw new IllegalArgumentException("Unknown objective kind" + kind) + } + if (threshold.clampToThreshold) { + return + } + } + ObjectiveThreshold.Inclusive: { + switch (kind : objective.kind) { + case HIGHER_IS_BETTER: + bounds.tightenLowerBound(Math.ceil(threshold.threshold) as int) + case LOWER_IS_BETTER: + bounds.tightenUpperBound(Math.floor(threshold.threshold) as int) + default: + throw new IllegalArgumentException("Unknown objective kind" + kind) + } + if (threshold.clampToThreshold) { + return + } + } + default: + throw new IllegalArgumentException("Unknown threshold: " + threshold) + } + for (level : leveledExtremalObjectives) { + switch (level.size) { + case 0: { + // Nothing to do, wait for the next level. + } + case 1: { + val primaryObjective = level.get(0) + if (primaryObjective != objective) { + // There are no worst-case bounds for secondary objectives. + return + } + } + default: + // There are no worst-case bounds for Pareto front calculation. + return + } + } + val fitnessIterator = trajectories.values.iterator + if (!fitnessIterator.hasNext) { + return + } + val fitness = fitnessIterator.next.get(objective.name) + while (fitnessIterator.hasNext) { + val otherFitness = fitnessIterator.next.get(objective.name) + if (Math.abs(fitness - otherFitness) > TOLERANCE) { + throw new IllegalStateException("Inconsistent fitness: " + objective.name) + } + } + switch (kind : objective.kind) { + case HIGHER_IS_BETTER: + if (needsMoreSolutionsWithSameFitness) { + bounds.tightenLowerBound(Math.floor(fitness) as int) + } else { + bounds.tightenLowerBound(Math.floor(fitness + 1) as int) + } + case LOWER_IS_BETTER: + if (needsMoreSolutionsWithSameFitness) { + bounds.tightenUpperBound(Math.ceil(fitness) as int) + } else { + bounds.tightenUpperBound(Math.ceil(fitness - 1) as int) + } + default: + throw new IllegalArgumentException("Unknown objective kind" + kind) + } + } + } } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CostElementMatchers.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CostElementMatchers.xtend new file mode 100644 index 00000000..885b14e8 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CostElementMatchers.xtend @@ -0,0 +1,137 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization + +import com.google.common.collect.ImmutableList +import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicproblemPackage +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage +import java.util.List +import org.eclipse.emf.ecore.EObject +import org.eclipse.viatra.query.runtime.api.IPatternMatch +import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher +import org.eclipse.xtend.lib.annotations.Data +import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation + +@FunctionalInterface +interface ParameterScopeBound { + def double getUpperBound() +} + +@Data +class CostElementMatch { + val IPatternMatch match + val boolean must + + def isMulti() { + CostElementMatchers.isMultiMatch(match) + } +} + +@Data +class CostElementMatchers { + val ViatraQueryMatcher currentMatcher + val ViatraQueryMatcher mayMatcher + val ViatraQueryMatcher mustMatcher + val List parameterScopeBounds + val int weight + + def getCurrentNumberOfMatches() { + currentMatcher.countMatches + } + + def getMinimumNumberOfMatches() { + mustMatcher.countMatches + } + + def getMaximumNumberOfMatches() { + var double sum = 0 + val iterator = mayMatcher.streamAllMatches.iterator + while (iterator.hasNext) { + val match = iterator.next + var double product = 1 + val numberOfParameters = parameterScopeBounds.size + for (var int i = 0; i < numberOfParameters; i++) { + if (isMulti(match.get(i + 2))) { + val scopeBound = parameterScopeBounds.get(i) + product *= scopeBound.upperBound + } + + } + sum += product + } + sum + } + + def getMatches() { + ImmutableList.copyOf(mayMatcher.streamAllMatches.iterator.map [ match | + new CostElementMatch(match, mustMatcher.isMatch(match)) + ]) + } + + def projectMayMatch(IPatternMatch match, int... indices) { + mayMatcher.projectMatch(match, indices) + } + + private static def projectMatch(ViatraQueryMatcher matcher, IPatternMatch match, int... indices) { + checkMatch(match) + val n = matcher.specification.parameters.length - 2 + if (indices.length != n) { + throw new IllegalArgumentException("Invalid number of projection indices") + } + val newMatch = matcher.newEmptyMatch + newMatch.set(0, match.get(0)) + newMatch.set(1, match.get(1)) + for (var int i = 0; i < n; i++) { + newMatch.set(i + 2, match.get(indices.get(i))) + } + if (!matcher.hasMatch(newMatch)) { + throw new IllegalArgumentException("Projected match does not exist") + } + return newMatch + } + + private static def isMatch(ViatraQueryMatcher matcher, IPatternMatch match) { + val n = matcher.specification.parameters.length + if (n != match.specification.parameters.length) { + throw new IllegalArgumentException("Invalid number of match arguments") + } + val newMatch = matcher.newEmptyMatch + for (var int i = 0; i < n; i++) { + newMatch.set(i, match.get(i)) + } + return matcher.hasMatch(newMatch) + } + + static def isMulti(Object o) { + if (o instanceof EObject) { + switch (feature : o.eContainmentFeature) { + case LogicproblemPackage.eINSTANCE.logicProblem_Elements, + case PartialinterpretationPackage.eINSTANCE.partialInterpretation_NewElements: + false + case PartialinterpretationPackage.eINSTANCE.partialInterpretation_OpenWorldElements: + true + default: + throw new IllegalStateException("Unknown containment feature for element: " + feature) + } + } else { + false + } + } + + static def isMultiMatch(IPatternMatch match) { + checkMatch(match) + val n = match.specification.parameters.length + for (var int i = 2; i < n; i++) { + if (isMulti(match.get(i))) { + return true + } + } + false + } + + private static def checkMatch(IPatternMatch match) { + val n = match.specification.parameters.length + if (n < 2 || !(match.get(0) instanceof LogicProblem) || !(match.get(1) instanceof PartialInterpretation)) { + throw new IllegalArgumentException("Match is not from the partial interpretation") + } + } +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CostObjectiveHint.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CostObjectiveHint.xtend new file mode 100644 index 00000000..2434073d --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/CostObjectiveHint.xtend @@ -0,0 +1,68 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization + +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.BoundSaturationListener +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ExtendedLinearExpressionBuilder +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronExtensionOperator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator +import java.util.Map +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery +import org.eclipse.xtend.lib.annotations.Accessors + +abstract class CostObjectiveHint implements LinearTypeConstraintHint, BoundSaturationListener { + @Accessors ThreeValuedCostObjective objective + @Accessors IObjectiveBoundsProvider boundsProvider + + Integer bestUpper = null + + override getAdditionalPatterns(PatternGenerator patternGenerator, Map fqnToPQuery) { + '''''' + } + + override createConstraintUpdater(LinearTypeExpressionBuilderFactory builderFactory) { + null + } + + def isExact() { + false + } + + def PolyhedronExtensionOperator createPolyhedronExtensionOperator( + Map costElementMatchers) { + null + } + + def setObjective(ThreeValuedCostObjective objective) { + if (this.objective !== null) { + throw new IllegalStateException("Objective was already set") + } + this.objective = objective + } + + def setBoundsProvider(IObjectiveBoundsProvider boundsProvider) { + if (this.boundsProvider !== null) { + throw new IllegalStateException("Objective bounds provider was already set") + } + this.boundsProvider = boundsProvider + } + + protected def buildWithBounds(ExtendedLinearExpressionBuilder builder) { + val bounds = builder.build(this) + if (objective !== null && boundsProvider !== null) { + boundsProvider.computeRequiredBounds(objective, bounds) + } + if (exact && bestUpper !== null) { + bounds.tightenLowerBound(bestUpper) + } + bounds + } + + override boundsSaturated(Integer lower, Integer upper) { + if (upper !== null && (bestUpper === null || bestUpper < upper)) { + bestUpper = upper + } + objective?.boundsSaturated(lower, upper) + } + +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/IObjectiveBoundsProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/IObjectiveBoundsProvider.xtend new file mode 100644 index 00000000..3c4d36a5 --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/IObjectiveBoundsProvider.xtend @@ -0,0 +1,8 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization + +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.Bounds +import org.eclipse.viatra.dse.objectives.IObjective + +interface IObjectiveBoundsProvider { + def void computeRequiredBounds(IObjective objective, Bounds bounds) +} diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend index 0a6fd55b..9b1a7e9f 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjective.xtend @@ -1,85 +1,80 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization -import com.google.common.collect.ImmutableList -import java.util.Collection +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.BoundSaturationListener +import java.util.Map import org.eclipse.viatra.dse.base.ThreadContext -import org.eclipse.viatra.query.runtime.api.IPatternMatch -import org.eclipse.viatra.query.runtime.api.IQuerySpecification -import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher -import org.eclipse.xtend.lib.annotations.Data +import org.eclipse.xtend.lib.annotations.Accessors -@Data -class ThreeValuedCostElement { - val IQuerySpecification> currentMatchQuery - val IQuerySpecification> mayMatchQuery - val IQuerySpecification> mustMatchQuery - val int weight -} - -class ThreeValuedCostObjective extends AbstractThreeValuedObjective { - val Collection costElements - Collection matchers +class ThreeValuedCostObjective extends AbstractThreeValuedObjective implements BoundSaturationListener { + @Accessors val Map matchers + double lowerBoundHint = Double.NEGATIVE_INFINITY + double upperBoundHint = Double.POSITIVE_INFINITY - new(String name, Collection costElements, ObjectiveKind kind, ObjectiveThreshold threshold, + new(String name, Map matchers, ObjectiveKind kind, ObjectiveThreshold threshold, int level) { super(name, kind, threshold, level) - this.costElements = costElements + this.matchers = matchers } override createNew() { - new ThreeValuedCostObjective(name, costElements, kind, threshold, level) + // new ThreeValuedCostObjective(name, matchers, kind, threshold, level) + throw new UnsupportedOperationException("ThreeValuedCostObjective can only be used from a single thread") } override init(ThreadContext context) { - val queryEngine = context.queryEngine - matchers = ImmutableList.copyOf(costElements.map [ element | - new CostElementMatchers( - queryEngine.getMatcher(element.currentMatchQuery), - queryEngine.getMatcher(element.mayMatchQuery), - queryEngine.getMatcher(element.mustMatchQuery), - element.weight - ) - ]) } override getRawFitness(ThreadContext context) { - var int cost = 0 - for (matcher : matchers) { - cost += matcher.weight * matcher.currentMatcher.countMatches + var double cost = 0 + for (matcher : matchers.values) { + cost += matcher.weight * matcher.currentNumberOfMatches } - cost as double + cost } override getLowestPossibleFitness(ThreadContext threadContext) { - var int cost = 0 - for (matcher : matchers) { + var double cost = 0 + for (matcher : matchers.values) { if (matcher.weight >= 0) { - cost += matcher.weight * matcher.mustMatcher.countMatches - } else if (matcher.mayMatcher.countMatches > 0) { - // TODO Count may matches. - return Double.NEGATIVE_INFINITY + cost += matcher.weight * matcher.minimumNumberOfMatches + } else { + cost += matcher.weight * matcher.maximumNumberOfMatches } } - cost as double + val boundWithHint = Math.max(lowerBoundHint, cost) + if (boundWithHint > upperBoundHint) { + throw new IllegalStateException("Inconsistent cost bounds") + } + boundWithHint } override getHighestPossibleFitness(ThreadContext threadContext) { - var int cost = 0 - for (matcher : matchers) { + var double cost = 0 + for (matcher : matchers.values) { if (matcher.weight <= 0) { - cost += matcher.weight * matcher.mustMatcher.countMatches - } else if (matcher.mayMatcher.countMatches > 0) { - return Double.POSITIVE_INFINITY + cost += matcher.weight * matcher.minimumNumberOfMatches + } else { + cost += matcher.weight * matcher.maximumNumberOfMatches } } - cost as double + val boundWithHint = Math.min(upperBoundHint, cost) + if (boundWithHint < lowerBoundHint) { + throw new IllegalStateException("Inconsistent cost bounds") + } + boundWithHint } - @Data - private static class CostElementMatchers { - val ViatraQueryMatcher currentMatcher - val ViatraQueryMatcher mayMatcher - val ViatraQueryMatcher mustMatcher - val int weight + override boundsSaturated(Integer lower, Integer upper) { + lowerBoundHint = if (lower === null) { + Double.NEGATIVE_INFINITY + } else { + lower + } + upperBoundHint = if (upper === null) { + Double.POSITIVE_INFINITY + } else { + upper + } + println('''Bounds saturated: «lower»..«upper»''') } } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjectiveProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjectiveProvider.xtend new file mode 100644 index 00000000..c2750acd --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/optimization/ThreeValuedCostObjectiveProvider.xtend @@ -0,0 +1,205 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization + +import com.google.common.collect.ImmutableList +import com.google.common.collect.ImmutableMap +import com.google.common.collect.Lists +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.BoolTypeReference +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.ComplexTypeReference +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntTypeReference +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealTypeReference +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Relation +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringTypeReference +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDeclaration +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeReference +import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.TransfomedViatraQuery +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedronExtensionOperator +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.ModalPatternQueries +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialBooleanInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialComplexTypeInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialIntegerInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialRealInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialStringInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.CostObjectiveConfiguration +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.CostObjectiveElementConfiguration +import java.util.Collection +import java.util.Map +import org.eclipse.viatra.dse.objectives.IObjective +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine +import org.eclipse.xtend.lib.annotations.Data + +@Data +class ThreeValuedCostObjectiveProviderResult { + val Collection objectives + val Collection hints + val Collection extensionOperators + val IObjective[][] leveledExtremalObjectives + val boolean optimizationProblem +} + +class ThreeValuedCostObjectiveProvider { + static val COST_OBJECTIVE_LEVEL = 3 + + val ViatraQueryEngine queryEngine + val Map modalRelationQueries + val Map qualifiedNameToRelationMap + val ParameterScopeBound defaultBounds + val ParameterScopeBound booleanBounds + val ParameterScopeBound integerBounds + val ParameterScopeBound realBounds + val ParameterScopeBound stringBounds + val Map typeDeclarationToBoundsMap + + new(ViatraQueryEngine queryEngine, PartialInterpretation interpretation, + Map modalRelationQueries) { + this.queryEngine = queryEngine + this.modalRelationQueries = modalRelationQueries + qualifiedNameToRelationMap = ImmutableMap.copyOf( + interpretation.problem.annotations.filter(TransfomedViatraQuery). + toMap([patternFullyQualifiedName], [target])) + defaultBounds = new PartialInterpretationBasedParameterScopeBound(interpretation) + var ParameterScopeBound booleanBounds = null + var ParameterScopeBound integerBounds = null + var ParameterScopeBound realBounds = null + var ParameterScopeBound stringBounds = null + val typeDeclarationToBoundsMapBuilder = ImmutableMap.builder + for (scope : interpretation.scopes) { + val bounds = new ScopeBasedParameterScopeBound(scope) + switch (typeInterpretation : scope.targetTypeInterpretation) { + PartialBooleanInterpretation: + if (booleanBounds === null) { + booleanBounds = bounds + } else { + throw new IllegalStateException("Duplicate partial boolean interpretation") + } + PartialIntegerInterpretation: + if (integerBounds === null) { + integerBounds = bounds + } else { + throw new IllegalStateException("Duplicate partial integer interpretation") + } + PartialRealInterpretation: + if (realBounds === null) { + realBounds = bounds + } else { + throw new IllegalStateException("Duplicate partial real interpretation") + } + PartialStringInterpretation: + if (stringBounds === null) { + stringBounds = bounds + } else { + throw new IllegalStateException("Duplicate partial string interpretation") + } + PartialComplexTypeInterpretation: + typeDeclarationToBoundsMapBuilder.put(typeInterpretation.interpretationOf, bounds) + } + } + this.booleanBounds = booleanBounds ?: defaultBounds + this.integerBounds = integerBounds ?: defaultBounds + this.realBounds = realBounds ?: defaultBounds + this.stringBounds = stringBounds ?: defaultBounds + typeDeclarationToBoundsMap = typeDeclarationToBoundsMapBuilder.build + } + + def getCostObjectives(Collection costObjectives) { + val objectives = ImmutableList.builder + val hints = ImmutableList.builder + val extensionOperators = ImmutableList.builder + val extremalObjectives = Lists.newArrayListWithExpectedSize(costObjectives.size) + for (entry : costObjectives.indexed) { + val objectiveName = '''costObjective«entry.key»''' + val objectiveConfig = entry.value + val costObjective = transformCostObjective(objectiveConfig, objectiveName) + objectives.add(costObjective) + if (objectiveConfig.findExtremum) { + extremalObjectives += costObjective + } + val hint = objectiveConfig.hint + if (hint !== null) { + hints.add(hint) + hint.objective = costObjective + val extensionOperator = hint.createPolyhedronExtensionOperator(costObjective.matchers) + if (extensionOperator !== null) { + extensionOperators.add(extensionOperator) + } + } + } + new ThreeValuedCostObjectiveProviderResult( + objectives.build, + hints.build, + extensionOperators.build, + newArrayList(extremalObjectives), + !extremalObjectives.empty + ) + } + + private def transformCostObjective(CostObjectiveConfiguration configuration, String name) { + val costElements = ImmutableMap.copyOf(configuration.elements.toMap([patternQualifiedName], [ + transformCostElement + ])) + new ThreeValuedCostObjective(name, costElements, configuration.kind, configuration.threshold, + COST_OBJECTIVE_LEVEL) + } + + private def transformCostElement(CostObjectiveElementConfiguration elementConfig) { + val relationName = elementConfig.patternQualifiedName + val modalQueries = modalRelationQueries.get(relationName) + if (modalQueries === null) { + throw new IllegalArgumentException("Unknown relation queries: " + relationName) + } + val relation = qualifiedNameToRelationMap.get(relationName) + if (relation === null) { + throw new IllegalArgumentException("Unknown transformed relation: " + relationName) + } + val parameterBounds = ImmutableList.copyOf(relation.parameters.map[parameterBound]) + new CostElementMatchers( + queryEngine.getMatcher(modalQueries.currentQuery), + queryEngine.getMatcher(modalQueries.mayQuery), + queryEngine.getMatcher(modalQueries.mustQuery), + parameterBounds, + elementConfig.weight + ) + } + + private def getParameterBound(TypeReference typeReference) { + switch (typeReference) { + BoolTypeReference: booleanBounds + IntTypeReference: integerBounds + RealTypeReference: realBounds + StringTypeReference: stringBounds + ComplexTypeReference: typeDeclarationToBoundsMap.getOrDefault(typeReference.referred, defaultBounds) + } + } + + private static abstract class AbstractParameterScopeBound implements ParameterScopeBound { + override getUpperBound() { + val rawValue = rawUpperBound + if (rawValue < 0) { + Double.POSITIVE_INFINITY + } else { + rawValue + } + } + + protected def int getRawUpperBound() + } + + @Data + private static class ScopeBasedParameterScopeBound extends AbstractParameterScopeBound { + val Scope scope + + override protected getRawUpperBound() { + scope.maxNewElements + } + } + + @Data + private static class PartialInterpretationBasedParameterScopeBound extends AbstractParameterScopeBound { + val PartialInterpretation interpretation + + override protected getRawUpperBound() { + interpretation.maxNewElements + } + } +} diff --git a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/.gitignore b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/.gitignore new file mode 100644 index 00000000..7050a7e3 --- /dev/null +++ b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/.gitignore @@ -0,0 +1 @@ +/queries/ diff --git a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.gitignore b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.gitignore index 3b9ccef7..19bc3cc8 100644 --- a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.gitignore +++ b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/bin/queries/.gitignore @@ -7,3 +7,7 @@ /.MemberHasParent.java._trace /.TwoMembersHaveNoParent.java._trace /.NegativeAge.java._trace +/MemberHasParent.java +/NegativeAge.java +/ParentTooYoung.java +/TwoMembersHaveNoParent.java diff --git a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src-gen/queries/.gitignore b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src-gen/queries/.gitignore index 3b9ccef7..19bc3cc8 100644 --- a/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src-gen/queries/.gitignore +++ b/Tests/MODELS2020-CaseStudies/case.study.familyTree.run/src-gen/queries/.gitignore @@ -7,3 +7,7 @@ /.MemberHasParent.java._trace /.TwoMembersHaveNoParent.java._trace /.NegativeAge.java._trace +/MemberHasParent.java +/NegativeAge.java +/ParentTooYoung.java +/TwoMembersHaveNoParent.java diff --git a/Tests/MODELS2020-CaseStudies/case.study.pledge.originalFiles/xtend-gen/converter/.UML2TGF.xtendbin b/Tests/MODELS2020-CaseStudies/case.study.pledge.originalFiles/xtend-gen/converter/.UML2TGF.xtendbin index 5c5071cc..23513b51 100644 Binary files a/Tests/MODELS2020-CaseStudies/case.study.pledge.originalFiles/xtend-gen/converter/.UML2TGF.xtendbin and b/Tests/MODELS2020-CaseStudies/case.study.pledge.originalFiles/xtend-gen/converter/.UML2TGF.xtendbin differ diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemInconsistencyDetector.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemInconsistencyDetector.xtend index f4f36951..9cc6e415 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemInconsistencyDetector.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/FileSystemInconsistencyDetector.xtend @@ -1,10 +1,10 @@ package hu.bme.mit.inf.dslreasoner.run -import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethod import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethodBasedGlobalConstraint -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod import org.eclipse.viatra.dse.base.ThreadContext +import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher class FileSystemInconsistencyDetector extends ModelGenerationMethodBasedGlobalConstraint { var PartialInterpretation partialInterpretation diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend index bf9ca274..cbc692b3 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/MetamodelLoader.xtend @@ -12,8 +12,8 @@ import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace import hu.bme.mit.inf.dslreasoner.ecore2logic.EcoreMetamodelDescriptor import hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.Patterns import hu.bme.mit.inf.dslreasoner.viatra2logic.ViatraQuerySetDescriptor -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethod import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethodBasedGlobalConstraint import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace import java.util.Collection diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphInconsistencyDetector.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphInconsistencyDetector.xtend index 22addd3d..b8167566 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphInconsistencyDetector.xtend +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphInconsistencyDetector.xtend @@ -1,7 +1,7 @@ package hu.bme.mit.inf.dslreasoner.run -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.ModelGenerationMethod import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethod import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ModelGenerationMethodBasedGlobalConstraint import org.eclipse.viatra.dse.base.ThreadContext import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher -- cgit v1.2.3-54-g00ecf