From e904f9d4b1d2d15ab4ec6d72ee881f4c7de34eef Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Wed, 15 May 2019 13:46:38 -0400 Subject: Formalize CPS case study for optimization --- .../dslreasoner/domains/cps/queries/CpsQueries.vql | 132 +++++++++++++++++++++ 1 file changed, 132 insertions(+) create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql new file mode 100644 index 00000000..7f7cc5a4 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql @@ -0,0 +1,132 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries + +import "http://www.eclipse.org/emf/2002/Ecore" +import "http://www.example.org/cps" + +@QueryBasedFeature(feature = "applications") +pattern cpsApplications(Cps : CyberPhysicalSystem, AppInstance : ApplicationInstance) { + CyberPhysicalSystem.applicationTypes.instances(Cps, AppInstance); +} + +@QueryBasedFeature(feature = "hosts") +pattern cpsHosts(Cps : CyberPhysicalSystem, HostInstance : HostInstance) { + CyberPhysicalSystem.hostTypes.instances(Cps, HostInstance); +} + +@QueryBasedFeature(feature = "totalMemory") +pattern totalMemory(Host : HostInstance, Memory : EInt) { + HostInstance.type.defaultMemory(Host, Memory); +} + +@QueryBasedFeature(feature = "totalHdd") +pattern totalHdd(Host : HostInstance, Hdd : EInt) { + HostInstance.type.defaultHdd(Host, Hdd); +} + +@QueryBasedFeature(feature = "availableMemory") +pattern availableMemory(Host : HostInstance, Memory : java Integer) { + find totalMemory(Host, TotalMemory); + RequiredMemory == sum find memoryRequirement(Host, _, #_); + Memory == eval(TotalMemory - RequiredMemory); +} + +private pattern memoryRequirement(Host : HostInstance, App : ApplicationInstance, Memory : EInt) { + find resourceRequirement(Host, App, Req); + ResourceRequirement.requiredMemory(Req, Memory); +} + +@QueryBasedFeature(feature = "availableHdd") +pattern availableHdd(Host : HostInstance, Hdd : java Integer) { + find totalHdd(Host, TotalHdd); + RequiredHdd == sum find hddRequirement(Host, _, #_); + Hdd == eval(TotalHdd - RequiredHdd); +} + +private pattern hddRequirement(Host : HostInstance, App : ApplicationInstance, Hdd : EInt) { + find resourceRequirement(Host, App, Req); + ResourceRequirement.requiredHdd(Req, Hdd); +} + +private pattern resourceRequirement(Host : HostInstance, App : ApplicationInstance, Req : ResourceRequirement) { + ApplicationInstance.allocatedTo(App, Host); + ApplicationInstance.type.requirements(App, Req); + HostInstance.type(Host, HostType); + ResourceRequirement.hostType(Req, HostType); +} + +@Constraint(severity = "error", key = {Host, App}, + message = "Application instance must be allocated to a supported host type.") +pattern allocationWithoutResourceRequirement(Host : HostInstance, App : ApplicationInstance) { + ApplicationInstance.allocatedTo(App, Host); + neg find resourceRequirement(Host, App, _); +} + +@Constraint(severity = "error", key = {Host}, + message = "Insufficient memory available on host.") +pattern notEnoughAvailableMemory(Host : HostInstance) { + find availableMemory(Host, Memory); + check(Memory < 0); +} + +@Constraint(severity = "error", key = {Host}, + message = "Insufficient HDD available on host.") +pattern notEnoughAvailableHdd(Host : HostInstance) { + find availableHdd(Host, Hdd); + check(Hdd < 0); +} + +@Constraint(severity = "error", key = {Req, App}, + message = "Requirement must be satisfied by the required application type.") +pattern instanceDoesNotSatisfyRequirement(Req : Requirement, App : ApplicationInstance) { + Requirement.instances(Req, App); + neg find satisfyingInstance(Req, App); +} + +private pattern satisfyingInstance(Req : Requirement, App : ApplicationInstance) { + Requirement.instances(Req, App); + Requirement.type(Req, Type); + ApplicationInstance.type(App, Type); +} + +@Constraint(severity = "error", key = {Req}, + message = "Requirement is not satisfied by enough application instances.") +pattern requirementNotSatisfied(Req : Requirement) { + Instances == count find satisfyingInstance(Req, _); + Requirement.count(Req, RequiredCount); + check(Instances < RequiredCount); +} + +pattern averageFreeMemoryMetric(Average : java Double) { + Average == avg find freeMemoryPercentage(_, #_); +} + +private pattern freeMemoryPercentage(Host : HostInstance, Free : java Double) { + find totalMemory(Host, Total); + find availableMemory(Host, Available); + Free == eval((Available as double) / Total); +} + +pattern averageFreeHddMetric(Average : java Double) { + Average == avg find freeHddPercentage(_, #_); +} + +private pattern freeHddPercentage(Host : HostInstance, Free : java Double) { + find totalHdd(Host, Total); + find availableHdd(Host, Available); + Free == eval((Available as double) / Total); +} + +pattern costMetric(Cost : java Integer) { + Cost == sum find cpsCost(_, #_); +} + +pattern cpsCost(Cps : CyberPhysicalSystem, Cost : java Integer) { + AppCount == count find cpsApplications(Cps, _); + HostCost == sum find hostInstanceCost(Cps, _, #_); + Cost == eval(5 * AppCount + HostCost); +} + +private pattern hostInstanceCost(Cps : CyberPhysicalSystem, Host : HostInstance, Cost : EInt) { + find cpsHosts(Cps, Host); + HostInstance.type.cost(Host, Cost); +} -- cgit v1.2.3-54-g00ecf From 256de89b45a055533650481593e026359d50c203 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Fri, 17 May 2019 20:37:45 -0400 Subject: Model generator for CPS case study Added extra constraint for redundancy in CPS deployments --- .../.classpath | 1 + .../META-INF/MANIFEST.MF | 4 +- .../plugin.xml | 1 + .../inf/dslreasoner/domains/cps/queries/.gitignore | 1 + .../domains/cps/queries/CpsQueries.java | 11 + .../cps/queries/RedundantInstancesOnSameHost.java | 587 +++++++++++++++++++++ .../cps/queries/internal/CpsQueriesAll.java | 3 + .../domains/cps/generator/CpsGenerator.xtend | 96 ++++ .../dslreasoner/domains/cps/queries/CpsQueries.vql | 10 + .../dslreasoner/domains/cps/generator/.gitignore | 1 + 10 files changed, 714 insertions(+), 1 deletion(-) create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RedundantInstancesOnSameHost.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.gitignore (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.classpath b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.classpath index 00cbac94..8129e44b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.classpath +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.classpath @@ -2,6 +2,7 @@ + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF index 7fd7252c..76e1eefb 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF @@ -16,7 +16,9 @@ Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime, org.eclipse.viatra.query.runtime.localsearch, org.eclipse.xtext.xbase.lib, org.eclipse.emf.ecore;visibility:=reexport, - org.eclipse.core.runtime + org.eclipse.core.runtime, + org.eclipse.xtend.lib;bundle-version="2.16.0", + org.eclipse.xtend.lib.macro;bundle-version="2.16.0" Import-Package: org.apache.log4j Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.domains.cps Bundle-ActivationPolicy: lazy diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/plugin.xml b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/plugin.xml index 256b967d..a7e8c387 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/plugin.xml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/plugin.xml @@ -35,6 +35,7 @@ + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore index bd8f7d9f..b634f74b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore @@ -14,3 +14,4 @@ /.AverageFreeHddMetric.java._trace /.CostMetric.java._trace /.CpsCost.java._trace +/.RedundantInstancesOnSameHost.java._trace diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.java index 4442718b..916f35f7 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.java @@ -15,6 +15,7 @@ import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsHosts; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.InstanceDoesNotSatisfyRequirement; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableHdd; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableMemory; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RedundantInstancesOnSameHost; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RequirementNotSatisfied; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalHdd; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalMemory; @@ -40,6 +41,7 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; *
  • notEnoughAvailableHdd
  • *
  • instanceDoesNotSatisfyRequirement
  • *
  • requirementNotSatisfied
  • + *
  • redundantInstancesOnSameHost
  • *
  • averageFreeMemoryMetric
  • *
  • averageFreeHddMetric
  • *
  • costMetric
  • @@ -79,6 +81,7 @@ public final class CpsQueries extends BaseGeneratedPatternGroup { querySpecifications.add(NotEnoughAvailableHdd.instance()); querySpecifications.add(InstanceDoesNotSatisfyRequirement.instance()); querySpecifications.add(RequirementNotSatisfied.instance()); + querySpecifications.add(RedundantInstancesOnSameHost.instance()); querySpecifications.add(AverageFreeMemoryMetric.instance()); querySpecifications.add(AverageFreeHddMetric.instance()); querySpecifications.add(CostMetric.instance()); @@ -173,6 +176,14 @@ public final class CpsQueries extends BaseGeneratedPatternGroup { return RequirementNotSatisfied.Matcher.on(engine); } + public RedundantInstancesOnSameHost getRedundantInstancesOnSameHost() { + return RedundantInstancesOnSameHost.instance(); + } + + public RedundantInstancesOnSameHost.Matcher getRedundantInstancesOnSameHost(final ViatraQueryEngine engine) { + return RedundantInstancesOnSameHost.Matcher.on(engine); + } + public AverageFreeMemoryMetric getAverageFreeMemoryMetric() { return AverageFreeMemoryMetric.instance(); } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RedundantInstancesOnSameHost.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RedundantInstancesOnSameHost.java new file mode 100644 index 00000000..bbb55158 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RedundantInstancesOnSameHost.java @@ -0,0 +1,587 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries; + +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; +import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.ParameterReference; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Inequality; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; +import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; +import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; +import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; + +/** + * A pattern-specific query specification that can instantiate Matcher in a type-safe way. + * + *

    Original source: + *

    + *         {@literal @}Constraint(severity = "error", key = {Req},
    + *         	message = "Redundant instances must not be allocated to the same host.")
    + *         pattern redundantInstancesOnSameHost(Req : Requirement) {
    + *         	Requirement.instances(Req, App1);
    + *         	Requirement.instances(Req, App2);
    + *         	App1 != App2;
    + *         	ApplicationInstance.allocatedTo(App1, Host);
    + *         	ApplicationInstance.allocatedTo(App2, Host);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class RedundantInstancesOnSameHost extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.redundantInstancesOnSameHost 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 Requirement fReq; + + private static List parameterNames = makeImmutableList("Req"); + + private Match(final Requirement pReq) { + this.fReq = pReq; + } + + @Override + public Object get(final String parameterName) { + if ("Req".equals(parameterName)) return this.fReq; + return null; + } + + public Requirement getReq() { + return this.fReq; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("Req".equals(parameterName) ) { + this.fReq = (Requirement) newValue; + return true; + } + return false; + } + + public void setReq(final Requirement pReq) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fReq = pReq; + } + + @Override + public String patternName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.redundantInstancesOnSameHost"; + } + + @Override + public List parameterNames() { + return RedundantInstancesOnSameHost.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fReq}; + } + + @Override + public RedundantInstancesOnSameHost.Match toImmutable() { + return isMutable() ? newMatch(fReq) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"Req\"=" + prettyPrintValue(fReq)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fReq); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof RedundantInstancesOnSameHost.Match)) { + RedundantInstancesOnSameHost.Match other = (RedundantInstancesOnSameHost.Match) obj; + return Objects.equals(fReq, other.fReq); + } 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 RedundantInstancesOnSameHost specification() { + return RedundantInstancesOnSameHost.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 RedundantInstancesOnSameHost.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 pReq the fixed value of pattern parameter Req, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static RedundantInstancesOnSameHost.Match newMutableMatch(final Requirement pReq) { + return new Mutable(pReq); + } + + /** + * 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 pReq the fixed value of pattern parameter Req, or null if not bound. + * @return the (partial) match object. + * + */ + public static RedundantInstancesOnSameHost.Match newMatch(final Requirement pReq) { + return new Immutable(pReq); + } + + private static final class Mutable extends RedundantInstancesOnSameHost.Match { + Mutable(final Requirement pReq) { + super(pReq); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends RedundantInstancesOnSameHost.Match { + Immutable(final Requirement pReq) { + super(pReq); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.redundantInstancesOnSameHost pattern, + * providing pattern-specific query methods. + * + *

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

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

    Original source: + *

    +   * {@literal @}Constraint(severity = "error", key = {Req},
    +   * 	message = "Redundant instances must not be allocated to the same host.")
    +   * pattern redundantInstancesOnSameHost(Req : Requirement) {
    +   * 	Requirement.instances(Req, App1);
    +   * 	Requirement.instances(Req, App2);
    +   * 	App1 != App2;
    +   * 	ApplicationInstance.allocatedTo(App1, Host);
    +   * 	ApplicationInstance.allocatedTo(App2, Host);
    +   * }
    +   * 
    + * + * @see Match + * @see RedundantInstancesOnSameHost + * + */ + 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 RedundantInstancesOnSameHost.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 RedundantInstancesOnSameHost.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_REQ = 0; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(RedundantInstancesOnSameHost.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 pReq the fixed value of pattern parameter Req, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final Requirement pReq) { + return rawStreamAllMatches(new Object[]{pReq}).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 pReq the fixed value of pattern parameter Req, or null if not bound. + * @return a stream of matches represented as a Match object. + * + */ + public Stream streamAllMatches(final Requirement pReq) { + return rawStreamAllMatches(new Object[]{pReq}); + } + + /** + * 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 pReq the fixed value of pattern parameter Req, or null if not bound. + * @return a match represented as a Match object, or null if no match is found. + * + */ + public Optional getOneArbitraryMatch(final Requirement pReq) { + return rawGetOneArbitraryMatch(new Object[]{pReq}); + } + + /** + * 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 pReq the fixed value of pattern parameter Req, or null if not bound. + * @return true if the input is a valid (partial) match of the pattern. + * + */ + public boolean hasMatch(final Requirement pReq) { + return rawHasMatch(new Object[]{pReq}); + } + + /** + * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pReq the fixed value of pattern parameter Req, or null if not bound. + * @return the number of pattern matches found. + * + */ + public int countMatches(final Requirement pReq) { + return rawCountMatches(new Object[]{pReq}); + } + + /** + * 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 pReq the fixed value of pattern parameter Req, 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 Requirement pReq, final Consumer processor) { + return rawForOneArbitraryMatch(new Object[]{pReq}, 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 pReq the fixed value of pattern parameter Req, or null if not bound. + * @return the (partial) match object. + * + */ + public RedundantInstancesOnSameHost.Match newMatch(final Requirement pReq) { + return RedundantInstancesOnSameHost.Match.newMatch(pReq); + } + + /** + * Retrieve the set of values that occur in matches for Req. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfReq(final Object[] parameters) { + return rawStreamAllValues(POSITION_REQ, parameters).map(Requirement.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for Req. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfReq() { + return rawStreamAllValuesOfReq(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for Req. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfReq() { + return rawStreamAllValuesOfReq(emptyArray()); + } + + @Override + protected RedundantInstancesOnSameHost.Match tupleToMatch(final Tuple t) { + try { + return RedundantInstancesOnSameHost.Match.newMatch((Requirement) t.get(POSITION_REQ)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected RedundantInstancesOnSameHost.Match arrayToMatch(final Object[] match) { + try { + return RedundantInstancesOnSameHost.Match.newMatch((Requirement) match[POSITION_REQ]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected RedundantInstancesOnSameHost.Match arrayToMatchMutable(final Object[] match) { + try { + return RedundantInstancesOnSameHost.Match.newMutableMatch((Requirement) match[POSITION_REQ]); + } 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 RedundantInstancesOnSameHost.instance(); + } + } + + private RedundantInstancesOnSameHost() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static RedundantInstancesOnSameHost instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected RedundantInstancesOnSameHost.Matcher instantiate(final ViatraQueryEngine engine) { + return RedundantInstancesOnSameHost.Matcher.on(engine); + } + + @Override + public RedundantInstancesOnSameHost.Matcher instantiate() { + return RedundantInstancesOnSameHost.Matcher.create(); + } + + @Override + public RedundantInstancesOnSameHost.Match newEmptyMatch() { + return RedundantInstancesOnSameHost.Match.newEmptyMatch(); + } + + @Override + public RedundantInstancesOnSameHost.Match newMatch(final Object... parameters) { + return RedundantInstancesOnSameHost.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.Requirement) parameters[0]); + } + + /** + * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RedundantInstancesOnSameHost (visibility: PUBLIC, simpleName: RedundantInstancesOnSameHost, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RedundantInstancesOnSameHost, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RedundantInstancesOnSameHost (visibility: PUBLIC, simpleName: RedundantInstancesOnSameHost, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RedundantInstancesOnSameHost, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * + *

    This workaround is required e.g. to support recursion. + * + */ + private static class LazyHolder { + private static final RedundantInstancesOnSameHost INSTANCE = new RedundantInstancesOnSameHost(); + + /** + * 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 RedundantInstancesOnSameHost.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_Req = new PParameter("Req", "hu.bme.mit.inf.dslreasoner.domains.cps.Requirement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "Requirement")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_Req); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.redundantInstancesOnSameHost"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("Req"); + } + + @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_Req = body.getOrCreateVariableByName("Req"); + PVariable var_App1 = body.getOrCreateVariableByName("App1"); + PVariable var_App2 = body.getOrCreateVariableByName("App2"); + PVariable var_Host = body.getOrCreateVariableByName("Host"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "Requirement"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_Req, parameter_Req) + )); + // Requirement.instances(Req, App1) + new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "Requirement"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Req, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "Requirement", "instances"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + new Equality(body, var__virtual_0_, var_App1); + // Requirement.instances(Req, App2) + new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "Requirement"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Req, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "Requirement", "instances"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + new Equality(body, var__virtual_1_, var_App2); + // App1 != App2 + new Inequality(body, var_App1, var_App2); + // ApplicationInstance.allocatedTo(App1, Host) + new TypeConstraint(body, Tuples.flatTupleOf(var_App1), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_App1, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "allocatedTo"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new Equality(body, var__virtual_2_, var_Host); + // ApplicationInstance.allocatedTo(App2, Host) + new TypeConstraint(body, Tuples.flatTupleOf(var_App2), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_App2, var__virtual_3_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "allocatedTo"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_3_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new Equality(body, var__virtual_3_, var_Host); + bodies.add(body); + } + { + PAnnotation annotation = new PAnnotation("Constraint"); + annotation.addAttribute("severity", "error"); + annotation.addAttribute("key", Arrays.asList(new Object[] { + new ParameterReference("Req") + })); + annotation.addAttribute("message", "Redundant instances must not be allocated to the same host."); + addAnnotation(annotation); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsQueriesAll.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsQueriesAll.java index 5f6d161d..58b113eb 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsQueriesAll.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsQueriesAll.java @@ -15,6 +15,7 @@ import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsHosts; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.InstanceDoesNotSatisfyRequirement; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableHdd; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableMemory; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RedundantInstancesOnSameHost; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RequirementNotSatisfied; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalHdd; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalMemory; @@ -48,6 +49,7 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; *

  • instanceDoesNotSatisfyRequirement
  • *
  • satisfyingInstance
  • *
  • requirementNotSatisfied
  • + *
  • redundantInstancesOnSameHost
  • *
  • averageFreeMemoryMetric
  • *
  • freeMemoryPercentage
  • *
  • averageFreeHddMetric
  • @@ -94,6 +96,7 @@ public final class CpsQueriesAll extends BaseGeneratedPatternGroup { querySpecifications.add(InstanceDoesNotSatisfyRequirement.instance()); querySpecifications.add(SatisfyingInstance.instance()); querySpecifications.add(RequirementNotSatisfied.instance()); + querySpecifications.add(RedundantInstancesOnSameHost.instance()); querySpecifications.add(AverageFreeMemoryMetric.instance()); querySpecifications.add(FreeMemoryPercentage.instance()); querySpecifications.add(AverageFreeHddMetric.instance()); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend new file mode 100644 index 00000000..0a510f0f --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend @@ -0,0 +1,96 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.generator + +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsFactory +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType +import java.util.Collection +import java.util.Random + +class CpsGenerator { + extension val CpsFactory = CpsFactory.eINSTANCE + + static val MIN_MEMORY = 1 + static val MAX_MEMORY = 6 + static val MIN_HDD = 1 + static val MAX_HDD = 30 + static val HIGH_CPU_FRACTION = 4 + static val MIN_REPLICAS = 1 + static val MAX_REPLICAS = 4 + + val Random random + val int applicationTypeCount + val int demandFactor + + new(long randomSeed, int applicationTypeCount, int demandFactor) { + this.random = new Random(randomSeed) + this.applicationTypeCount = applicationTypeCount + this.demandFactor = demandFactor + } + + def generateCpsProblem() { + createCyberPhysicalSystem => [ + val cps = it + createLowCpuHostTypes + val highCpuHostTypes = createHighCpuHostTypes + for (var int i = 0; i < applicationTypeCount; i++) { + if (i % HIGH_CPU_FRACTION == 0) { + createRandomApplicationType(highCpuHostTypes) + } else { + createRandomApplicationType(hostTypes) + } + } + for (var int i = 0; i < demandFactor; i++) { + requests += createRequest => [ + for (appType : cps.applicationTypes) { + requirements += createRequirement => [ + count = nextInt(CpsGenerator.MIN_REPLICAS, CpsGenerator.MAX_REPLICAS) + type = appType + ] + } + ] + } + ] + } + + private def void createRandomApplicationType(CyberPhysicalSystem it, Collection allowedHostTypes) { + val appType = createApplicationType + val memory = nextInt(MIN_MEMORY, MAX_MEMORY) + val hdd = nextInt(MIN_HDD, MAX_HDD) + for (hostType : allowedHostTypes) { + appType.requirements += createResourceRequirement => [ + requiredMemory = memory + requiredHdd = hdd + ] + } + applicationTypes += appType + } + + private def createLowCpuHostTypes(CyberPhysicalSystem it) { + #[ + createHostType(2, 8, 75), // m5d.large + createHostType(4, 16, 150), // m5d.xlarge + createHostType(3, 16, 75), // r5d.large + createHostType(6, 32, 150) // r5d.xlarge + ] + } + + private def createHighCpuHostTypes(CyberPhysicalSystem it) { + #[ + createHostType(2, 4, 50), // c5d.large + createHostType(4, 8, 100) // c5d.xlarge + ] + } + + private def createHostType(CyberPhysicalSystem it, int cost, int memory, int hdd) { + val hostType = createHostType => [ + defaultMemory = memory + defaultHdd = hdd + ] + hostTypes += hostType + hostType + } + + private def nextInt(int lower, int upper) { + lower + random.nextInt(upper - lower + 1) + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql index 7f7cc5a4..40337443 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql @@ -96,6 +96,16 @@ pattern requirementNotSatisfied(Req : Requirement) { check(Instances < RequiredCount); } +@Constraint(severity = "error", key = {Req}, + message = "Redundant instances must not be allocated to the same host.") +pattern redundantInstancesOnSameHost(Req : Requirement) { + Requirement.instances(Req, App1); + Requirement.instances(Req, App2); + App1 != App2; + ApplicationInstance.allocatedTo(App1, Host); + ApplicationInstance.allocatedTo(App2, Host); +} + pattern averageFreeMemoryMetric(Average : java Double) { Average == avg find freeMemoryPercentage(_, #_); } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.gitignore new file mode 100644 index 00000000..d5d16f2e --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.gitignore @@ -0,0 +1 @@ +/.CpsGenerator.java._trace -- cgit v1.2.3-54-g00ecf From fd3684b5440dacca0c4bf4be15930555a79e2100 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 21 May 2019 17:00:01 -0400 Subject: VIATRA DSE and COIN-OR CBC implementations of CPS case study --- .../.project | 1 - .../META-INF/MANIFEST.MF | 7 +- .../inf/dslreasoner/domains/cps/CpsPackage.java | 175 +- .../domains/cps/CyberPhysicalSystem.java | 36 - .../inf/dslreasoner/domains/cps/HostInstance.java | 68 - .../domains/cps/impl/CpsPackageImpl.java | 124 +- .../domains/cps/impl/CyberPhysicalSystemImpl.java | 57 - .../domains/cps/impl/HostInstanceImpl.java | 105 -- .../model/cps.aird | 1705 -------------------- .../model/cps.ecore | 41 - .../model/cps.genmodel | 6 - .../plugin.xml | 30 +- .../representations.aird | 600 +++++++ .../inf/dslreasoner/domains/cps/queries/.gitignore | 10 + .../dslreasoner/domains/cps/queries/Allocate.java | 862 ++++++++++ .../AllocationWithoutResourceRequirement.java | 2 +- .../domains/cps/queries/AvailableHdd.java | 743 --------- .../domains/cps/queries/AvailableMemory.java | 743 --------- .../domains/cps/queries/AverageFreeHddMetric.java | 4 + .../cps/queries/AverageFreeMemoryMetric.java | 12 + .../domains/cps/queries/CostMetric.java | 4 + .../domains/cps/queries/CpsApplications.java | 705 -------- .../dslreasoner/domains/cps/queries/CpsCost.java | 2 +- .../dslreasoner/domains/cps/queries/CpsHosts.java | 705 -------- .../domains/cps/queries/CpsQueries.java | 124 +- .../domains/cps/queries/CreateHostInstance.java | 553 +++++++ .../domains/cps/queries/GuidanceObjective.java | 591 +++++++ .../domains/cps/queries/NotEnoughAvailableHdd.java | 2 +- .../cps/queries/NotEnoughAvailableMemory.java | 2 +- .../domains/cps/queries/RemoveHostInstance.java | 579 +++++++ .../domains/cps/queries/ResourceRequirement.java | 829 ++++++++++ .../dslreasoner/domains/cps/queries/TotalHdd.java | 706 -------- .../domains/cps/queries/TotalMemory.java | 706 -------- .../domains/cps/queries/UnallocateAppInstance.java | 541 +++++++ .../domains/cps/queries/internal/.gitignore | 9 + .../domains/cps/queries/internal/AvailableHdd.java | 178 ++ .../cps/queries/internal/AvailableMemory.java | 178 ++ .../cps/queries/internal/CpsApplications.java | 141 ++ .../domains/cps/queries/internal/CpsHosts.java | 141 ++ .../cps/queries/internal/CpsQueriesAll.java | 38 +- .../cps/queries/internal/FreeHddPercentage.java | 4 +- .../cps/queries/internal/FreeMemoryPercentage.java | 4 +- .../cps/queries/internal/HddRequirement.java | 2 +- .../cps/queries/internal/HostInstanceCost.java | 2 +- .../cps/queries/internal/MemoryRequirement.java | 2 +- .../cps/queries/internal/NoHostToAllocateTo.java | 135 ++ .../cps/queries/internal/RequiredAppInstances.java | 181 +++ .../cps/queries/internal/ResourceRequirement.java | 168 -- .../domains/cps/queries/internal/TotalHdd.java | 143 ++ .../domains/cps/queries/internal/TotalMemory.java | 143 ++ .../queries/internal/UnallocatedAppInstance.java | 172 ++ .../dslreasoner/domains/cps/cplex/CbcCpsMain.xtend | 53 + .../domains/cps/cplex/CpsToLpTranslator.xtend | 171 ++ .../domains/cps/dse/CpsStateCoder.xtend | 134 ++ .../domains/cps/dse/RuleBasedCpsMain.xtend | 39 + .../domains/cps/dse/RuleBasedCpsSolver.xtend | 74 + .../domains/cps/generator/CpsGenerator.xtend | 7 + .../dslreasoner/domains/cps/queries/CpsQueries.vql | 82 +- .../domains/cps/cplex/.CbcCpsMain.xtendbin | Bin 0 -> 5693 bytes .../domains/cps/cplex/.CpsToLpTranslator.xtendbin | Bin 0 -> 11104 bytes .../inf/dslreasoner/domains/cps/cplex/.gitignore | 2 + .../dslreasoner/domains/cps/cplex/CbcCpsMain.java | 77 + .../domains/cps/cplex/CpsToLpTranslator.java | 505 ++++++ .../domains/cps/dse/.CpsStateCoder.xtendbin | Bin 0 -> 7626 bytes .../domains/cps/dse/.RuleBasedCpsMain.xtendbin | Bin 0 -> 5189 bytes .../domains/cps/dse/.RuleBasedCpsSolver.xtendbin | Bin 0 -> 7336 bytes .../mit/inf/dslreasoner/domains/cps/dse/.gitignore | 3 + .../dslreasoner/domains/cps/dse/CpsStateCoder.java | 316 ++++ .../domains/cps/dse/RuleBasedCpsMain.java | 46 + .../domains/cps/dse/RuleBasedCpsSolver.java | 93 ++ .../domains/cps/generator/.CpsGenerator.xtendbin | Bin 0 -> 8807 bytes .../domains/cps/generator/CpsGenerator.java | 154 ++ 72 files changed, 7869 insertions(+), 6908 deletions(-) delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.aird create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/representations.aird create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/Allocate.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AvailableHdd.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AvailableMemory.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsApplications.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsHosts.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/GuidanceObjective.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RemoveHostInstance.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/ResourceRequirement.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/TotalHdd.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/TotalMemory.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/UnallocateAppInstance.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableHdd.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableMemory.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsApplications.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsHosts.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/NoHostToAllocateTo.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/RequiredAppInstances.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/ResourceRequirement.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalHdd.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalMemory.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/UnallocatedAppInstance.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CpsToLpTranslator.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/CpsStateCoder.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.gitignore create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CpsToLpTranslator.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsSolver.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.gitignore create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/CpsStateCoder.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.java (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.project b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.project index 69c44278..41867b27 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.project +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.project @@ -32,7 +32,6 @@ - org.eclipse.sirius.nature.modelingproject org.eclipse.jdt.core.javanature org.eclipse.pde.PluginNature org.eclipse.viatra.query.projectnature diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF index 76e1eefb..c06b7112 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF @@ -18,7 +18,12 @@ Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime, org.eclipse.emf.ecore;visibility:=reexport, org.eclipse.core.runtime, org.eclipse.xtend.lib;bundle-version="2.16.0", - org.eclipse.xtend.lib.macro;bundle-version="2.16.0" + org.eclipse.xtend.lib.macro;bundle-version="2.16.0", + hu.bme.mit.inf.dslreasoner.application;bundle-version="1.0.0", + org.eclipse.viatra.dse;bundle-version="0.22.0", + org.eclipse.viatra.dse.genetic;bundle-version="0.22.0", + hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner;bundle-version="1.0.0", + org.eclipse.emf.ecore.xmi;bundle-version="2.15.0" Import-Package: org.apache.log4j Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.domains.cps Bundle-ActivationPolicy: lazy diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsPackage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsPackage.java index 2d7e0660..b0c69786 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsPackage.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CpsPackage.java @@ -21,7 +21,6 @@ import org.eclipse.emf.ecore.EReference; * * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsFactory * @model kind="package" - * annotation="http://www.eclipse.org/emf/2002/Ecore settingDelegates='org.eclipse.viatra.query.querybasedfeature'" * @generated */ public interface CpsPackage extends EPackage { @@ -94,24 +93,6 @@ public interface CpsPackage extends EPackage { */ int CYBER_PHYSICAL_SYSTEM__HOST_TYPES = 2; - /** - * The feature id for the 'Hosts' reference list. - * - * - * @generated - * @ordered - */ - int CYBER_PHYSICAL_SYSTEM__HOSTS = 3; - - /** - * The feature id for the 'Applications' reference list. - * - * - * @generated - * @ordered - */ - int CYBER_PHYSICAL_SYSTEM__APPLICATIONS = 4; - /** * The number of structural features of the 'Cyber Physical System' class. * @@ -119,7 +100,7 @@ public interface CpsPackage extends EPackage { * @generated * @ordered */ - int CYBER_PHYSICAL_SYSTEM_FEATURE_COUNT = 5; + int CYBER_PHYSICAL_SYSTEM_FEATURE_COUNT = 3; /** * The number of operations of the 'Cyber Physical System' class. @@ -470,42 +451,6 @@ public interface CpsPackage extends EPackage { */ int HOST_INSTANCE__TYPE = 0; - /** - * The feature id for the 'Available Memory' attribute. - * - * - * @generated - * @ordered - */ - int HOST_INSTANCE__AVAILABLE_MEMORY = 1; - - /** - * The feature id for the 'Available Hdd' attribute. - * - * - * @generated - * @ordered - */ - int HOST_INSTANCE__AVAILABLE_HDD = 2; - - /** - * The feature id for the 'Total Memory' attribute. - * - * - * @generated - * @ordered - */ - int HOST_INSTANCE__TOTAL_MEMORY = 3; - - /** - * The feature id for the 'Total Hdd' attribute. - * - * - * @generated - * @ordered - */ - int HOST_INSTANCE__TOTAL_HDD = 4; - /** * The feature id for the 'Applications' reference list. * @@ -513,7 +458,7 @@ public interface CpsPackage extends EPackage { * @generated * @ordered */ - int HOST_INSTANCE__APPLICATIONS = 5; + int HOST_INSTANCE__APPLICATIONS = 1; /** * The number of structural features of the 'Host Instance' class. @@ -522,7 +467,7 @@ public interface CpsPackage extends EPackage { * @generated * @ordered */ - int HOST_INSTANCE_FEATURE_COUNT = 6; + int HOST_INSTANCE_FEATURE_COUNT = 2; /** * The number of operations of the 'Host Instance' class. @@ -576,28 +521,6 @@ public interface CpsPackage extends EPackage { */ EReference getCyberPhysicalSystem_HostTypes(); - /** - * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getHosts Hosts}'. - * - * - * @return the meta object for the reference list 'Hosts'. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getHosts() - * @see #getCyberPhysicalSystem() - * @generated - */ - EReference getCyberPhysicalSystem_Hosts(); - - /** - * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getApplications Applications}'. - * - * - * @return the meta object for the reference list 'Applications'. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getApplications() - * @see #getCyberPhysicalSystem() - * @generated - */ - EReference getCyberPhysicalSystem_Applications(); - /** * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType Application Type}'. * @@ -866,50 +789,6 @@ public interface CpsPackage extends EPackage { */ EReference getHostInstance_Type(); - /** - * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableMemory Available Memory}'. - * - * - * @return the meta object for the attribute 'Available Memory'. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableMemory() - * @see #getHostInstance() - * @generated - */ - EAttribute getHostInstance_AvailableMemory(); - - /** - * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableHdd Available Hdd}'. - * - * - * @return the meta object for the attribute 'Available Hdd'. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableHdd() - * @see #getHostInstance() - * @generated - */ - EAttribute getHostInstance_AvailableHdd(); - - /** - * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalMemory Total Memory}'. - * - * - * @return the meta object for the attribute 'Total Memory'. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalMemory() - * @see #getHostInstance() - * @generated - */ - EAttribute getHostInstance_TotalMemory(); - - /** - * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalHdd Total Hdd}'. - * - * - * @return the meta object for the attribute 'Total Hdd'. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalHdd() - * @see #getHostInstance() - * @generated - */ - EAttribute getHostInstance_TotalHdd(); - /** * Returns the meta object for the reference list '{@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getApplications Applications}'. * @@ -978,22 +857,6 @@ public interface CpsPackage extends EPackage { */ EReference CYBER_PHYSICAL_SYSTEM__HOST_TYPES = eINSTANCE.getCyberPhysicalSystem_HostTypes(); - /** - * The meta object literal for the 'Hosts' reference list feature. - * - * - * @generated - */ - EReference CYBER_PHYSICAL_SYSTEM__HOSTS = eINSTANCE.getCyberPhysicalSystem_Hosts(); - - /** - * The meta object literal for the 'Applications' reference list feature. - * - * - * @generated - */ - EReference CYBER_PHYSICAL_SYSTEM__APPLICATIONS = eINSTANCE.getCyberPhysicalSystem_Applications(); - /** * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.ApplicationTypeImpl Application Type}' class. * @@ -1208,38 +1071,6 @@ public interface CpsPackage extends EPackage { */ EReference HOST_INSTANCE__TYPE = eINSTANCE.getHostInstance_Type(); - /** - * The meta object literal for the 'Available Memory' attribute feature. - * - * - * @generated - */ - EAttribute HOST_INSTANCE__AVAILABLE_MEMORY = eINSTANCE.getHostInstance_AvailableMemory(); - - /** - * The meta object literal for the 'Available Hdd' attribute feature. - * - * - * @generated - */ - EAttribute HOST_INSTANCE__AVAILABLE_HDD = eINSTANCE.getHostInstance_AvailableHdd(); - - /** - * The meta object literal for the 'Total Memory' attribute feature. - * - * - * @generated - */ - EAttribute HOST_INSTANCE__TOTAL_MEMORY = eINSTANCE.getHostInstance_TotalMemory(); - - /** - * The meta object literal for the 'Total Hdd' attribute feature. - * - * - * @generated - */ - EAttribute HOST_INSTANCE__TOTAL_HDD = eINSTANCE.getHostInstance_TotalHdd(); - /** * The meta object literal for the 'Applications' reference list feature. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CyberPhysicalSystem.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CyberPhysicalSystem.java index 541916ba..fbf4ce0d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CyberPhysicalSystem.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/CyberPhysicalSystem.java @@ -18,8 +18,6 @@ import org.eclipse.emf.ecore.EObject; *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getRequests Requests}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getApplicationTypes Application Types}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getHostTypes Host Types}
  • - *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getHosts Hosts}
  • - *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem#getApplications Applications}
  • * * * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getCyberPhysicalSystem() @@ -75,38 +73,4 @@ public interface CyberPhysicalSystem extends EObject { */ EList getHostTypes(); - /** - * Returns the value of the 'Hosts' reference list. - * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance}. - * - *

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

    - * - * @return the value of the 'Hosts' reference list. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getCyberPhysicalSystem_Hosts() - * @model transient="true" changeable="false" volatile="true" derived="true" - * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsHosts'" - * @generated - */ - EList getHosts(); - - /** - * Returns the value of the 'Applications' reference list. - * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance}. - * - *

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

    - * - * @return the value of the 'Applications' reference list. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getCyberPhysicalSystem_Applications() - * @model transient="true" changeable="false" volatile="true" derived="true" - * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsApplications'" - * @generated - */ - EList getApplications(); - } // CyberPhysicalSystem diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostInstance.java index 43379e0f..b4721842 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostInstance.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/HostInstance.java @@ -16,10 +16,6 @@ import org.eclipse.emf.ecore.EObject; *

    *
      *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getType Type}
    • - *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableMemory Available Memory}
    • - *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getAvailableHdd Available Hdd}
    • - *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalMemory Total Memory}
    • - *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getTotalHdd Total Hdd}
    • *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance#getApplications Applications}
    • *
    * @@ -56,70 +52,6 @@ public interface HostInstance extends EObject { */ void setType(HostType value); - /** - * Returns the value of the 'Available Memory' attribute. - * - *

    - * If the meaning of the 'Available Memory' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Available Memory' attribute. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostInstance_AvailableMemory() - * @model transient="true" changeable="false" volatile="true" derived="true" - * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableMemory'" - * @generated - */ - int getAvailableMemory(); - - /** - * Returns the value of the 'Available Hdd' attribute. - * - *

    - * If the meaning of the 'Available Hdd' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Available Hdd' attribute. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostInstance_AvailableHdd() - * @model transient="true" changeable="false" volatile="true" derived="true" - * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableHdd'" - * @generated - */ - int getAvailableHdd(); - - /** - * Returns the value of the 'Total Memory' attribute. - * - *

    - * If the meaning of the 'Total Memory' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Total Memory' attribute. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostInstance_TotalMemory() - * @model transient="true" changeable="false" volatile="true" derived="true" - * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalMemory'" - * @generated - */ - int getTotalMemory(); - - /** - * Returns the value of the 'Total Hdd' attribute. - * - *

    - * If the meaning of the 'Total Hdd' attribute isn't clear, - * there really should be more of a description here... - *

    - * - * @return the value of the 'Total Hdd' attribute. - * @see hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage#getHostInstance_TotalHdd() - * @model transient="true" changeable="false" volatile="true" derived="true" - * annotation="org.eclipse.viatra.query.querybasedfeature patternFQN='hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalHdd'" - * @generated - */ - int getTotalHdd(); - /** * Returns the value of the 'Applications' reference list. * The list contents are of type {@link hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance}. diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsPackageImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsPackageImpl.java index 1f143a64..e29ccccd 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsPackageImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CpsPackageImpl.java @@ -187,26 +187,6 @@ public class CpsPackageImpl extends EPackageImpl implements CpsPackage { return (EReference) cyberPhysicalSystemEClass.getEStructuralFeatures().get(2); } - /** - * - * - * @generated - */ - @Override - public EReference getCyberPhysicalSystem_Hosts() { - return (EReference) cyberPhysicalSystemEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - @Override - public EReference getCyberPhysicalSystem_Applications() { - return (EReference) cyberPhysicalSystemEClass.getEStructuralFeatures().get(4); - } - /** * * @@ -457,46 +437,6 @@ public class CpsPackageImpl extends EPackageImpl implements CpsPackage { return (EReference) hostInstanceEClass.getEStructuralFeatures().get(0); } - /** - * - * - * @generated - */ - @Override - public EAttribute getHostInstance_AvailableMemory() { - return (EAttribute) hostInstanceEClass.getEStructuralFeatures().get(1); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getHostInstance_AvailableHdd() { - return (EAttribute) hostInstanceEClass.getEStructuralFeatures().get(2); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getHostInstance_TotalMemory() { - return (EAttribute) hostInstanceEClass.getEStructuralFeatures().get(3); - } - - /** - * - * - * @generated - */ - @Override - public EAttribute getHostInstance_TotalHdd() { - return (EAttribute) hostInstanceEClass.getEStructuralFeatures().get(4); - } - /** * * @@ -504,7 +444,7 @@ public class CpsPackageImpl extends EPackageImpl implements CpsPackage { */ @Override public EReference getHostInstance_Applications() { - return (EReference) hostInstanceEClass.getEStructuralFeatures().get(5); + return (EReference) hostInstanceEClass.getEStructuralFeatures().get(1); } /** @@ -541,8 +481,6 @@ public class CpsPackageImpl extends EPackageImpl implements CpsPackage { createEReference(cyberPhysicalSystemEClass, CYBER_PHYSICAL_SYSTEM__REQUESTS); createEReference(cyberPhysicalSystemEClass, CYBER_PHYSICAL_SYSTEM__APPLICATION_TYPES); createEReference(cyberPhysicalSystemEClass, CYBER_PHYSICAL_SYSTEM__HOST_TYPES); - createEReference(cyberPhysicalSystemEClass, CYBER_PHYSICAL_SYSTEM__HOSTS); - createEReference(cyberPhysicalSystemEClass, CYBER_PHYSICAL_SYSTEM__APPLICATIONS); applicationTypeEClass = createEClass(APPLICATION_TYPE); createEReference(applicationTypeEClass, APPLICATION_TYPE__INSTANCES); @@ -575,10 +513,6 @@ public class CpsPackageImpl extends EPackageImpl implements CpsPackage { hostInstanceEClass = createEClass(HOST_INSTANCE); createEReference(hostInstanceEClass, HOST_INSTANCE__TYPE); - createEAttribute(hostInstanceEClass, HOST_INSTANCE__AVAILABLE_MEMORY); - createEAttribute(hostInstanceEClass, HOST_INSTANCE__AVAILABLE_HDD); - createEAttribute(hostInstanceEClass, HOST_INSTANCE__TOTAL_MEMORY); - createEAttribute(hostInstanceEClass, HOST_INSTANCE__TOTAL_HDD); createEReference(hostInstanceEClass, HOST_INSTANCE__APPLICATIONS); } @@ -624,12 +558,6 @@ public class CpsPackageImpl extends EPackageImpl implements CpsPackage { initEReference(getCyberPhysicalSystem_HostTypes(), this.getHostType(), null, "hostTypes", null, 0, -1, CyberPhysicalSystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getCyberPhysicalSystem_Hosts(), this.getHostInstance(), null, "hosts", null, 0, -1, - CyberPhysicalSystem.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, - !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); - initEReference(getCyberPhysicalSystem_Applications(), this.getApplicationInstance(), null, "applications", null, - 0, -1, CyberPhysicalSystem.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED); initEClass(applicationTypeEClass, ApplicationType.class, "ApplicationType", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -703,17 +631,6 @@ public class CpsPackageImpl extends EPackageImpl implements CpsPackage { initEReference(getHostInstance_Type(), this.getHostType(), this.getHostType_Instances(), "type", null, 1, 1, HostInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEAttribute(getHostInstance_AvailableMemory(), ecorePackage.getEInt(), "availableMemory", null, 0, 1, - HostInstance.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - IS_DERIVED, IS_ORDERED); - initEAttribute(getHostInstance_AvailableHdd(), ecorePackage.getEInt(), "availableHdd", null, 0, 1, - HostInstance.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - IS_DERIVED, IS_ORDERED); - initEAttribute(getHostInstance_TotalMemory(), ecorePackage.getEInt(), "totalMemory", null, 0, 1, - HostInstance.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, - IS_DERIVED, IS_ORDERED); - initEAttribute(getHostInstance_TotalHdd(), ecorePackage.getEInt(), "totalHdd", null, 0, 1, HostInstance.class, - IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, IS_DERIVED, IS_ORDERED); initEReference(getHostInstance_Applications(), this.getApplicationInstance(), this.getApplicationInstance_AllocatedTo(), "applications", null, 0, -1, HostInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, @@ -721,45 +638,6 @@ public class CpsPackageImpl extends EPackageImpl implements CpsPackage { // Create resource createResource(eNS_URI); - - // Create annotations - // http://www.eclipse.org/emf/2002/Ecore - createEcoreAnnotations(); - // org.eclipse.viatra.query.querybasedfeature - createOrgAnnotations(); - } - - /** - * Initializes the annotations for http://www.eclipse.org/emf/2002/Ecore. - * - * - * @generated - */ - protected void createEcoreAnnotations() { - String source = "http://www.eclipse.org/emf/2002/Ecore"; - addAnnotation(this, source, new String[] { "settingDelegates", "org.eclipse.viatra.query.querybasedfeature" }); - } - - /** - * Initializes the annotations for org.eclipse.viatra.query.querybasedfeature. - * - * - * @generated - */ - protected void createOrgAnnotations() { - String source = "org.eclipse.viatra.query.querybasedfeature"; - addAnnotation(getCyberPhysicalSystem_Hosts(), source, - new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsHosts" }); - addAnnotation(getCyberPhysicalSystem_Applications(), source, - new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsApplications" }); - addAnnotation(getHostInstance_AvailableMemory(), source, - new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableMemory" }); - addAnnotation(getHostInstance_AvailableHdd(), source, - new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableHdd" }); - addAnnotation(getHostInstance_TotalMemory(), source, - new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalMemory" }); - addAnnotation(getHostInstance_TotalHdd(), source, - new String[] { "patternFQN", "hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalHdd" }); } } //CpsPackageImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CyberPhysicalSystemImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CyberPhysicalSystemImpl.java index 4d254f25..3ba111af 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CyberPhysicalSystemImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/CyberPhysicalSystemImpl.java @@ -2,11 +2,9 @@ */ package hu.bme.mit.inf.dslreasoner.domains.cps.impl; -import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; -import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; import hu.bme.mit.inf.dslreasoner.domains.cps.Request; @@ -17,7 +15,6 @@ import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; @@ -36,8 +33,6 @@ import org.eclipse.emf.ecore.util.InternalEList; *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl#getRequests Requests}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl#getApplicationTypes Application Types}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl#getHostTypes Host Types}
  • - *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl#getHosts Hosts}
  • - *
  • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.CyberPhysicalSystemImpl#getApplications Applications}
  • * * * @generated @@ -73,28 +68,6 @@ public class CyberPhysicalSystemImpl extends MinimalEObjectImpl.Container implem */ protected EList hostTypes; - /** - * The cached setting delegate for the '{@link #getHosts() Hosts}' reference list. - * - * - * @see #getHosts() - * @generated - * @ordered - */ - protected EStructuralFeature.Internal.SettingDelegate HOSTS__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.CYBER_PHYSICAL_SYSTEM__HOSTS) - .getSettingDelegate(); - - /** - * The cached setting delegate for the '{@link #getApplications() Applications}' reference list. - * - * - * @see #getApplications() - * @generated - * @ordered - */ - protected EStructuralFeature.Internal.SettingDelegate APPLICATIONS__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.CYBER_PHYSICAL_SYSTEM__APPLICATIONS) - .getSettingDelegate(); - /** * * @@ -156,28 +129,6 @@ public class CyberPhysicalSystemImpl extends MinimalEObjectImpl.Container implem return hostTypes; } - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public EList getHosts() { - return (EList) HOSTS__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public EList getApplications() { - return (EList) APPLICATIONS__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); - } - /** * * @@ -210,10 +161,6 @@ public class CyberPhysicalSystemImpl extends MinimalEObjectImpl.Container implem return getApplicationTypes(); case CpsPackage.CYBER_PHYSICAL_SYSTEM__HOST_TYPES: return getHostTypes(); - case CpsPackage.CYBER_PHYSICAL_SYSTEM__HOSTS: - return getHosts(); - case CpsPackage.CYBER_PHYSICAL_SYSTEM__APPLICATIONS: - return getApplications(); } return super.eGet(featureID, resolve, coreType); } @@ -278,10 +225,6 @@ public class CyberPhysicalSystemImpl extends MinimalEObjectImpl.Container implem return applicationTypes != null && !applicationTypes.isEmpty(); case CpsPackage.CYBER_PHYSICAL_SYSTEM__HOST_TYPES: return hostTypes != null && !hostTypes.isEmpty(); - case CpsPackage.CYBER_PHYSICAL_SYSTEM__HOSTS: - return HOSTS__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); - case CpsPackage.CYBER_PHYSICAL_SYSTEM__APPLICATIONS: - return APPLICATIONS__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); } return super.eIsSet(featureID); } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostInstanceImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostInstanceImpl.java index bbaca59c..551f2ed6 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostInstanceImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl/HostInstanceImpl.java @@ -15,7 +15,6 @@ import org.eclipse.emf.common.notify.NotificationChain; import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; @@ -34,60 +33,12 @@ import org.eclipse.emf.ecore.util.InternalEList; *

    *
      *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getType Type}
    • - *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getAvailableMemory Available Memory}
    • - *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getAvailableHdd Available Hdd}
    • - *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getTotalMemory Total Memory}
    • - *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getTotalHdd Total Hdd}
    • *
    • {@link hu.bme.mit.inf.dslreasoner.domains.cps.impl.HostInstanceImpl#getApplications Applications}
    • *
    * * @generated */ public class HostInstanceImpl extends MinimalEObjectImpl.Container implements HostInstance { - /** - * The cached setting delegate for the '{@link #getAvailableMemory() Available Memory}' attribute. - * - * - * @see #getAvailableMemory() - * @generated - * @ordered - */ - protected EStructuralFeature.Internal.SettingDelegate AVAILABLE_MEMORY__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.HOST_INSTANCE__AVAILABLE_MEMORY) - .getSettingDelegate(); - - /** - * The cached setting delegate for the '{@link #getAvailableHdd() Available Hdd}' attribute. - * - * - * @see #getAvailableHdd() - * @generated - * @ordered - */ - protected EStructuralFeature.Internal.SettingDelegate AVAILABLE_HDD__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.HOST_INSTANCE__AVAILABLE_HDD) - .getSettingDelegate(); - - /** - * The cached setting delegate for the '{@link #getTotalMemory() Total Memory}' attribute. - * - * - * @see #getTotalMemory() - * @generated - * @ordered - */ - protected EStructuralFeature.Internal.SettingDelegate TOTAL_MEMORY__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.HOST_INSTANCE__TOTAL_MEMORY) - .getSettingDelegate(); - - /** - * The cached setting delegate for the '{@link #getTotalHdd() Total Hdd}' attribute. - * - * - * @see #getTotalHdd() - * @generated - * @ordered - */ - protected EStructuralFeature.Internal.SettingDelegate TOTAL_HDD__ESETTING_DELEGATE = ((EStructuralFeature.Internal) CpsPackage.Literals.HOST_INSTANCE__TOTAL_HDD) - .getSettingDelegate(); - /** * The cached value of the '{@link #getApplications() Applications}' reference list. * @@ -163,46 +114,6 @@ public class HostInstanceImpl extends MinimalEObjectImpl.Container implements Ho eNotify(new ENotificationImpl(this, Notification.SET, CpsPackage.HOST_INSTANCE__TYPE, newType, newType)); } - /** - * - * - * @generated - */ - @Override - public int getAvailableMemory() { - return (Integer) AVAILABLE_MEMORY__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); - } - - /** - * - * - * @generated - */ - @Override - public int getAvailableHdd() { - return (Integer) AVAILABLE_HDD__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); - } - - /** - * - * - * @generated - */ - @Override - public int getTotalMemory() { - return (Integer) TOTAL_MEMORY__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); - } - - /** - * - * - * @generated - */ - @Override - public int getTotalHdd() { - return (Integer) TOTAL_HDD__ESETTING_DELEGATE.dynamicGet(this, null, 0, true, false); - } - /** * * @@ -276,14 +187,6 @@ public class HostInstanceImpl extends MinimalEObjectImpl.Container implements Ho switch (featureID) { case CpsPackage.HOST_INSTANCE__TYPE: return getType(); - case CpsPackage.HOST_INSTANCE__AVAILABLE_MEMORY: - return getAvailableMemory(); - case CpsPackage.HOST_INSTANCE__AVAILABLE_HDD: - return getAvailableHdd(); - case CpsPackage.HOST_INSTANCE__TOTAL_MEMORY: - return getTotalMemory(); - case CpsPackage.HOST_INSTANCE__TOTAL_HDD: - return getTotalHdd(); case CpsPackage.HOST_INSTANCE__APPLICATIONS: return getApplications(); } @@ -338,14 +241,6 @@ public class HostInstanceImpl extends MinimalEObjectImpl.Container implements Ho switch (featureID) { case CpsPackage.HOST_INSTANCE__TYPE: return getType() != null; - case CpsPackage.HOST_INSTANCE__AVAILABLE_MEMORY: - return AVAILABLE_MEMORY__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); - case CpsPackage.HOST_INSTANCE__AVAILABLE_HDD: - return AVAILABLE_HDD__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); - case CpsPackage.HOST_INSTANCE__TOTAL_MEMORY: - return TOTAL_MEMORY__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); - case CpsPackage.HOST_INSTANCE__TOTAL_HDD: - return TOTAL_HDD__ESETTING_DELEGATE.dynamicIsSet(this, null, 0); case CpsPackage.HOST_INSTANCE__APPLICATIONS: return applications != null && !applications.isEmpty(); } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.aird b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.aird deleted file mode 100644 index 3f1b0301..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.aird +++ /dev/null @@ -1,1705 +0,0 @@ - - - - cps.ecore - cps.genmodel - ../src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql - http://www.eclipse.org/emf/2002/Ecore - java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch - java:/Objects/java.lang.Object - java:/Objects/org.eclipse.viatra.query.runtime.api.IPatternMatch - java:/Primitives - java:/Objects/java.lang.SafeVarargs - java:/Objects/java.util.List - java:/Objects/java.lang.String - java:/Objects/java.lang.CloneNotSupportedException - java:/Objects/java.lang.Throwable - java:/Objects/java.lang.Class - java:/Objects/java.lang.InterruptedException - java:/Objects/java.lang.Exception - java:/Objects/java.io.Serializable - java:/Objects/java.io.PrintWriter - java:/Objects/java.io.PrintStream - java:/Objects/java.lang.StackTraceElement - java:/Objects/java.util.Set - java:/Objects/java.io.ObjectInputStream - java:/Objects/java.io.IOException - java:/Objects/java.lang.ClassNotFoundException - java:/Objects/java.io.ObjectOutputStream - java:/Objects/java.io.Writer - java:/Objects/java.io.OutputStream - java:/Objects/java.io.FileNotFoundException - java:/Objects/java.io.File - java:/Objects/java.nio.charset.Charset - java:/Objects/java.io.UnsupportedEncodingException - java:/Objects/java.lang.CharSequence - java:/Objects/java.util.Locale - java:/Objects/java.util.Formatter - java:/Objects/java.lang.Appendable - java:/Objects/java.io.Closeable - java:/Objects/java.io.Flushable - java:/Objects/java.lang.AutoCloseable - java:/Objects/java.lang.Comparable - java:/Objects/java.security.SecureRandom - java:/Objects/java.lang.Enum - java:/Objects/java.net.URI - java:/Objects/java.io.FilenameFilter - java:/Objects/java.io.FileFilter - java:/Objects/java.nio.file.Path - java:/Objects/java.lang.Deprecated - java:/Objects/java.net.MalformedURLException - java:/Objects/java.net.URL - java:/Objects/sun.misc.Unsafe - java:/Objects/java.io.FileSystem - java:/Objects/java.util.Random - java:/Objects/java.util.regex.Pattern - java:/Objects/java.security.SecureRandomSpi - java:/Objects/java.security.Provider - java:/Objects/java.security.NoSuchAlgorithmException - java:/Objects/java.security.NoSuchProviderException - java:/Objects/java.security.MessageDigest - java:/Objects/sun.security.util.Debug - java:/Objects/java.util.Spliterator - java:/Objects/java.util.function.DoubleConsumer - java:/Objects/java.util.function.LongConsumer - java:/Objects/java.util.function.IntConsumer - java:/Objects/java.util.stream.DoubleStream - java:/Objects/java.util.stream.IntStream - java:/Objects/java.util.stream.LongStream - java:/Objects/java.util.concurrent.atomic.AtomicLong - java:/Objects/java.io.ObjectStreamField - java:/Objects/java.lang.Double - java:/Objects/java.util.function.Consumer - java:/Objects/java.lang.Long - java:/Objects/java.lang.Integer - java:/Objects/java.util.Comparator - java:/Objects/java.lang.Number - java:/Objects/java.lang.NumberFormatException - java:/Objects/java.lang.IllegalArgumentException - java:/Objects/java.lang.RuntimeException - java:/Objects/java.lang.FunctionalInterface - java:/Objects/java.lang.annotation.Target - java:/Objects/java.lang.annotation.ElementType - java:/Objects/java.lang.annotation.Retention - java:/Objects/java.lang.annotation.RetentionPolicy - java:/Objects/java.lang.annotation.Documented - java:/Objects/java.lang.annotation.Annotation - java:/Objects/java.math.BigInteger - java:/Objects/java.lang.StringBuilder - java:/Objects/java.lang.AbstractStringBuilder - java:/Objects/java.lang.StringBuffer - java:/Objects/java.util.function.Function - java:/Objects/java.util.function.ToDoubleFunction - java:/Objects/java.util.function.ToIntFunction - java:/Objects/java.util.function.ToLongFunction - java:/Objects/java.util.stream.BaseStream - java:/Objects/java.util.function.DoublePredicate - java:/Objects/java.util.OptionalDouble - java:/Objects/java.util.stream.Stream - java:/Objects/java.util.function.Supplier - java:/Objects/java.util.function.ObjDoubleConsumer - java:/Objects/java.util.function.BiConsumer - java:/Objects/java.util.function.DoubleFunction - java:/Objects/java.util.function.DoubleSupplier - java:/Objects/java.util.function.DoubleUnaryOperator - java:/Objects/java.util.PrimitiveIterator - java:/Objects/java.util.function.DoubleToIntFunction - java:/Objects/java.util.function.DoubleToLongFunction - java:/Objects/java.util.function.DoubleBinaryOperator - java:/Objects/java.util.DoubleSummaryStatistics - java:/Objects/java.util.Iterator - java:/Objects/java.lang.Runnable - java:/Objects/java.util.function.Predicate - java:/Objects/java.util.stream.Collector - java:/Objects/java.util.Optional - java:/Objects/java.util.function.UnaryOperator - java:/Objects/java.util.function.BinaryOperator - java:/Objects/java.util.function.BiFunction - java:/Objects/java.util.function.IntFunction - java:/Objects/java.util.function.IntPredicate - java:/Objects/java.util.function.ObjIntConsumer - java:/Objects/java.util.OptionalInt - java:/Objects/java.util.function.IntSupplier - java:/Objects/java.util.function.IntUnaryOperator - java:/Objects/java.util.function.IntToDoubleFunction - java:/Objects/java.util.function.IntToLongFunction - java:/Objects/java.util.function.IntBinaryOperator - java:/Objects/java.util.IntSummaryStatistics - java:/Objects/java.util.function.LongPredicate - java:/Objects/java.util.function.ObjLongConsumer - java:/Objects/java.util.OptionalLong - java:/Objects/java.util.function.LongFunction - java:/Objects/java.util.function.LongSupplier - java:/Objects/java.util.function.LongUnaryOperator - java:/Objects/java.util.function.LongToDoubleFunction - java:/Objects/java.util.function.LongToIntFunction - java:/Objects/java.util.function.LongBinaryOperator - java:/Objects/java.util.LongSummaryStatistics - java:/Objects/java.lang.reflect.Field - java:/Objects/sun.reflect.CallerSensitive - java:/Objects/java.lang.reflect.AccessibleObject - java:/Objects/java.lang.reflect.Member - java:/Objects/sun.reflect.FieldAccessor - java:/Objects/java.util.Map - java:/Objects/java.lang.IllegalAccessException - java:/Objects/java.lang.reflect.AnnotatedType - java:/Objects/sun.reflect.generics.factory.GenericsFactory - java:/Objects/sun.reflect.generics.repository.FieldRepository - java:/Objects/java.lang.reflect.Type - java:/Objects/java.lang.reflect.AnnotatedElement - java:/Objects/java.lang.SecurityException - java:/Objects/java.security.Permission - java:/Objects/sun.reflect.ReflectionFactory - java:/Objects/java.security.Guard - java:/Objects/java.security.PermissionCollection - java:/Objects/java.util.Enumeration - java:/Objects/java.security.PrivilegedAction - java:/Objects/java.lang.reflect.Constructor - java:/Objects/java.lang.reflect.Method - java:/Objects/java.lang.invoke.MethodHandle - java:/Objects/sun.reflect.ConstructorAccessor - java:/Objects/java.lang.reflect.Executable - java:/Objects/sun.reflect.MethodAccessor - java:/Objects/sun.reflect.LangReflectAccess - java:/Objects/java.io.OptionalDataException - java:/Objects/sun.reflect.generics.repository.ConstructorRepository - java:/Objects/java.lang.reflect.TypeVariable - java:/Objects/java.lang.InstantiationException - java:/Objects/java.lang.reflect.InvocationTargetException - java:/Objects/sun.reflect.generics.repository.GenericDeclRepository - java:/Objects/sun.reflect.generics.tree.MethodTypeSignature - java:/Objects/sun.reflect.generics.repository.AbstractRepository - java:/Objects/sun.reflect.generics.tree.Signature - java:/Objects/sun.reflect.generics.visitor.Reifier - java:/Objects/sun.reflect.generics.tree.Tree - java:/Objects/sun.reflect.generics.visitor.TypeTreeVisitor - java:/Objects/sun.reflect.generics.tree.TypeArgument - java:/Objects/sun.reflect.generics.tree.ArrayTypeSignature - java:/Objects/sun.reflect.generics.tree.BooleanSignature - java:/Objects/sun.reflect.generics.tree.BottomSignature - java:/Objects/sun.reflect.generics.tree.ByteSignature - java:/Objects/sun.reflect.generics.tree.CharSignature - java:/Objects/sun.reflect.generics.tree.ClassTypeSignature - java:/Objects/sun.reflect.generics.tree.DoubleSignature - java:/Objects/sun.reflect.generics.tree.FloatSignature - java:/Objects/sun.reflect.generics.tree.FormalTypeParameter - java:/Objects/sun.reflect.generics.tree.IntSignature - java:/Objects/sun.reflect.generics.tree.LongSignature - java:/Objects/sun.reflect.generics.tree.ShortSignature - java:/Objects/sun.reflect.generics.tree.SimpleClassTypeSignature - java:/Objects/sun.reflect.generics.tree.TypeVariableSignature - java:/Objects/sun.reflect.generics.tree.VoidDescriptor - java:/Objects/sun.reflect.generics.tree.Wildcard - java:/Objects/sun.reflect.generics.tree.TypeTree - java:/Objects/sun.reflect.generics.tree.FieldTypeSignature - java:/Objects/sun.reflect.generics.tree.TypeSignature - java:/Objects/sun.reflect.generics.tree.BaseType - java:/Objects/sun.reflect.generics.tree.ReturnType - java:/Objects/sun.reflect.generics.visitor.Visitor - java:/Objects/sun.reflect.generics.tree.ClassSignature - java:/Objects/java.lang.reflect.GenericDeclaration - java:/Objects/java.lang.ReflectiveOperationException - java:/Objects/sun.reflect.generics.repository.MethodRepository - java:/Objects/java.lang.invoke.MethodType - java:/Objects/java.lang.invoke.LambdaForm - java:/Objects/java.lang.invoke.BoundMethodHandle - java:/Objects/java.lang.invoke.MemberName - java:/Objects/java.lang.invoke.MethodHandleImpl - java:/Objects/java.lang.ref.WeakReference - java:/Objects/java.lang.ref.ReferenceQueue - java:/Objects/java.util.concurrent.ConcurrentMap - java:/Objects/java.lang.invoke.MethodTypeForm - java:/Objects/java.lang.ClassLoader - java:/Objects/java.lang.TypeNotPresentException - java:/Objects/java.lang.invoke.Invokers - java:/Objects/java.lang.IndexOutOfBoundsException - java:/Objects/java.lang.invoke.Stable - java:/Objects/java.lang.ref.Reference - java:/Objects/java.lang.Thread - java:/Objects/java.lang.ThreadGroup - java:/Objects/java.lang.Boolean - java:/Objects/java.security.AccessControlContext - java:/Objects/sun.nio.ch.Interruptible - java:/Objects/java.lang.RuntimePermission - java:/Objects/java.lang.ThreadLocal - java:/Objects/sun.misc.Contended - java:/Objects/java.security.ProtectionDomain - java:/Objects/java.security.DomainCombiner - java:/Objects/java.security.AccessControlException - java:/Objects/sun.misc.JavaSecurityAccess - java:/Objects/java.security.CodeSource - java:/Objects/java.security.Principal - java:/Objects/java.security.cert.Certificate - java:/Objects/java.security.CodeSigner - java:/Objects/java.security.cert.CertificateFactory - java:/Objects/java.net.SocketPermission - java:/Objects/java.io.ObjectStreamException - java:/Objects/java.security.cert.CertificateEncodingException - java:/Objects/java.security.PublicKey - java:/Objects/java.security.cert.CertificateException - java:/Objects/java.security.InvalidKeyException - java:/Objects/java.security.SignatureException - java:/Objects/java.security.Key - java:/Objects/java.security.GeneralSecurityException - java:/Objects/java.security.KeyException - java:/Objects/java.security.cert.CertPath - java:/Objects/java.security.Timestamp - java:/Objects/java.util.Date - java:/Objects/java.lang.Cloneable - java:/Objects/java.time.Instant - java:/Objects/sun.util.calendar.BaseCalendar - java:/Objects/java.time.temporal.Temporal - java:/Objects/java.time.temporal.TemporalAdjuster - java:/Objects/java.time.ZoneOffset - java:/Objects/java.time.OffsetDateTime - java:/Objects/java.time.ZoneId - java:/Objects/java.time.ZonedDateTime - java:/Objects/java.time.temporal.TemporalAccessor - java:/Objects/java.time.temporal.TemporalField - java:/Objects/java.time.temporal.TemporalUnit - java:/Objects/java.time.temporal.TemporalAmount - java:/Objects/java.time.Clock - java:/Objects/java.time.temporal.TemporalQuery - java:/Objects/java.time.temporal.ValueRange - java:/Objects/java.io.DataInput - java:/Objects/java.io.InvalidObjectException - java:/Objects/java.io.DataOutput - java:/Objects/java.time.zone.ZoneRules - java:/Objects/java.time.zone.ZoneOffsetTransition - java:/Objects/java.time.zone.ZoneOffsetTransitionRule - java:/Objects/java.time.LocalDateTime - java:/Objects/java.time.Duration - java:/Objects/java.time.Month - java:/Objects/java.time.DayOfWeek - java:/Objects/java.time.LocalTime - java:/Objects/java.time.format.TextStyle - java:/Objects/java.time.LocalDate - java:/Objects/java.time.OffsetTime - java:/Objects/java.time.format.DateTimeFormatter - java:/Objects/java.time.chrono.ChronoLocalDate - java:/Objects/java.time.chrono.IsoChronology - java:/Objects/java.time.chrono.Era - java:/Objects/java.time.Period - java:/Objects/java.time.chrono.ChronoLocalDateTime - java:/Objects/java.time.chrono.Chronology - java:/Objects/java.time.chrono.ChronoPeriod - java:/Objects/java.time.chrono.ChronoZonedDateTime - java:/Objects/java.time.temporal.ChronoField - java:/Objects/java.time.format.ResolverStyle - java:/Objects/java.time.chrono.AbstractChronology - java:/Objects/java.time.chrono.IsoEra - java:/Objects/java.util.concurrent.ConcurrentHashMap - java:/Objects/java.util.AbstractMap - java:/Objects/java.util.function.ToIntBiFunction - java:/Objects/java.util.function.ToLongBiFunction - java:/Objects/java.util.function.ToDoubleBiFunction - java:/Objects/java.util.concurrent.atomic.AtomicReference - java:/Objects/java.lang.Void - java:/Objects/java.util.concurrent.CountedCompleter - java:/Objects/java.util.Collection - java:/Objects/java.util.concurrent.locks.ReentrantLock - java:/Objects/java.util.concurrent.ForkJoinTask - java:/Objects/java.util.concurrent.Future - java:/Objects/java.util.concurrent.RunnableFuture - java:/Objects/java.util.concurrent.Callable - java:/Objects/java.util.concurrent.ExecutionException - java:/Objects/java.util.concurrent.TimeUnit - java:/Objects/java.util.concurrent.TimeoutException - java:/Objects/java.util.concurrent.ForkJoinPool - java:/Objects/java.util.concurrent.AbstractExecutorService - java:/Objects/java.util.concurrent.ForkJoinWorkerThread - java:/Objects/java.util.concurrent.ExecutorService - java:/Objects/java.util.concurrent.Executor - java:/Objects/java.lang.Iterable - java:/Objects/java.util.concurrent.locks.Lock - java:/Objects/java.util.concurrent.locks.AbstractQueuedSynchronizer - java:/Objects/java.util.concurrent.locks.Condition - java:/Objects/java.util.concurrent.locks.AbstractOwnableSynchronizer - java:/Objects/java.lang.NullPointerException - java:/Objects/java.io.ObjectInput - java:/Objects/java.io.ObjectOutput - java:/Objects/java.text.Format - java:/Objects/java.text.FieldPosition - java:/Objects/java.text.ParseException - java:/Objects/java.text.ParsePosition - java:/Objects/java.time.format.DateTimeFormatterBuilder - java:/Objects/java.time.format.DecimalStyle - java:/Objects/java.time.format.DateTimeParseException - java:/Objects/java.time.format.FormatStyle - java:/Objects/java.time.format.DateTimeParseContext - java:/Objects/java.text.AttributedCharacterIterator - java:/Objects/java.text.CharacterIterator - java:/Objects/java.time.format.DateTimePrintContext - java:/Objects/java.lang.ref.SoftReference - java:/Objects/java.time.format.DateTimeTextProvider - java:/Objects/java.math.BigDecimal - java:/Objects/java.time.format.SignStyle - java:/Objects/java.lang.Character - java:/Objects/java.math.MathContext - java:/Objects/java.math.RoundingMode - java:/Objects/java.math.MutableBigInteger - java:/Objects/java.util.HashMap - java:/Objects/java.util.LinkedHashMap - java:/Objects/java.util.AbstractSet - java:/Objects/java.util.AbstractCollection - java:/Objects/java.time.DateTimeException - java:/Objects/java.time.format.Parsed - java:/Objects/java.util.ArrayList - java:/Objects/java.util.AbstractList - java:/Objects/java.util.RandomAccess - java:/Objects/java.util.ListIterator - java:/Objects/sun.util.calendar.AbstractCalendar - java:/Objects/sun.util.calendar.CalendarDate - java:/Objects/java.util.TimeZone - java:/Objects/sun.util.calendar.CalendarSystem - java:/Objects/sun.util.calendar.Era - java:/Objects/java.util.Properties - java:/Objects/sun.util.calendar.Gregorian - java:/Objects/java.util.Hashtable - java:/Objects/java.io.InputStream - java:/Objects/java.util.InvalidPropertiesFormatException - java:/Objects/sun.util.spi.XmlPropertiesProvider - java:/Objects/java.io.Reader - java:/Objects/java.io.BufferedWriter - java:/Objects/java.util.Dictionary - java:/Objects/java.io.StreamCorruptedException - java:/Objects/java.io.NotSerializableException - java:/Objects/java.lang.Readable - java:/Objects/java.nio.CharBuffer - java:/Objects/java.nio.Buffer - java:/Objects/java.nio.ByteOrder - java:/Objects/java.security.cert.CertificateFactorySpi - java:/Objects/java.security.cert.CRLException - java:/Objects/java.security.cert.CRL - java:/Objects/java.net.UnknownHostException - java:/Objects/java.net.InetAddress - java:/Objects/sun.net.spi.nameservice.NameService - java:/Objects/java.net.NetworkInterface - java:/Objects/java.net.InetAddressImpl - java:/Objects/java.net.SocketException - java:/Objects/java.net.InterfaceAddress - java:/Objects/java.net.Inet4Address - java:/Objects/javax.security.auth.Subject - java:/Objects/javax.security.auth.AuthPermission - java:/Objects/java.util.LinkedList - java:/Objects/java.security.PrivilegedExceptionAction - java:/Objects/java.security.PrivilegedActionException - java:/Objects/java.security.BasicPermission - java:/Objects/java.util.AbstractSequentialList - java:/Objects/java.util.Deque - java:/Objects/java.util.Queue - java:/Objects/java.util.concurrent.atomic.AtomicInteger - java:/Objects/java.lang.ClassFormatError - java:/Objects/java.nio.ByteBuffer - java:/Objects/java.lang.Package - java:/Objects/sun.misc.URLClassPath - java:/Objects/java.lang.AssertionStatusDirectives - java:/Objects/java.util.Vector - java:/Objects/java.util.Stack - java:/Objects/java.lang.LinkageError - java:/Objects/java.lang.Error - java:/Objects/java.nio.DoubleBuffer - java:/Objects/java.nio.FloatBuffer - java:/Objects/java.nio.IntBuffer - java:/Objects/java.nio.LongBuffer - java:/Objects/java.nio.ShortBuffer - java:/Objects/java.util.jar.Manifest - java:/Objects/java.io.FilterInputStream - java:/Objects/java.util.jar.JarVerifier - java:/Objects/java.util.jar.Attributes - java:/Objects/java.util.jar.JarEntry - java:/Objects/sun.security.util.ManifestEntryVerifier - java:/Objects/java.util.jar.JarFile - java:/Objects/java.util.zip.ZipEntry - java:/Objects/java.io.ByteArrayOutputStream - java:/Objects/sun.security.util.ManifestDigester - java:/Objects/sun.security.util.SignatureFileVerifier - java:/Objects/java.util.jar.JarException - java:/Objects/java.util.zip.ZipException - java:/Objects/java.util.zip.ZipFile - java:/Objects/java.util.zip.ZipConstants - java:/Objects/java.util.zip.InflaterInputStream - java:/Objects/java.util.zip.Inflater - java:/Objects/java.util.zip.ZipCoder - java:/Objects/java.util.zip.DataFormatException - java:/Objects/java.util.zip.ZStreamRef - java:/Objects/java.nio.charset.CharsetDecoder - java:/Objects/java.nio.charset.CharsetEncoder - java:/Objects/java.nio.charset.CharacterCodingException - java:/Objects/java.nio.charset.CoderResult - java:/Objects/java.nio.charset.CodingErrorAction - java:/Objects/java.nio.file.attribute.FileTime - java:/Objects/sun.security.pkcs.SignerInfo - java:/Objects/sun.security.pkcs.PKCS7 - java:/Objects/sun.security.util.DisabledAlgorithmConstraints - java:/Objects/sun.security.util.DerEncoder - java:/Objects/sun.security.util.DerInputStream - java:/Objects/sun.security.pkcs.ParsingException - java:/Objects/sun.security.x509.X500Name - java:/Objects/sun.security.x509.AlgorithmId - java:/Objects/sun.security.pkcs.PKCS9Attributes - java:/Objects/sun.security.util.DerOutputStream - java:/Objects/java.security.cert.X509Certificate - java:/Objects/sun.security.timestamp.TimestampToken - java:/Objects/java.security.CryptoPrimitive - java:/Objects/sun.security.util.DerInputBuffer - java:/Objects/sun.security.util.DerValue - java:/Objects/sun.security.util.ObjectIdentifier - java:/Objects/sun.security.util.BitArray - java:/Objects/java.io.ByteArrayInputStream - java:/Objects/java.lang.ArrayIndexOutOfBoundsException - java:/Objects/sun.security.x509.GeneralNameInterface - java:/Objects/sun.security.x509.RDN - java:/Objects/sun.security.x509.AVA - java:/Objects/javax.security.auth.x500.X500Principal - java:/Objects/java.lang.UnsupportedOperationException - java:/Objects/java.lang.Byte - java:/Objects/java.io.NotActiveException - java:/Objects/java.security.AlgorithmParameters - java:/Objects/java.security.AlgorithmParametersSpi - java:/Objects/java.security.spec.AlgorithmParameterSpec - java:/Objects/java.security.spec.InvalidParameterSpecException - java:/Objects/sun.security.pkcs.PKCS9Attribute - java:/Objects/sun.security.util.ByteArrayLexOrder - java:/Objects/sun.security.util.ByteArrayTagOrder - java:/Objects/java.security.cert.X509Extension - java:/Objects/java.security.cert.CertificateExpiredException - java:/Objects/java.security.cert.CertificateNotYetValidException - java:/Objects/java.security.cert.CertificateParsingException - java:/Objects/sun.security.pkcs.ContentInfo - java:/Objects/java.security.cert.X509CRL - java:/Objects/sun.security.timestamp.Timestamper - java:/Objects/java.security.cert.X509CRLEntry - java:/Objects/java.security.cert.CRLReason - java:/Objects/sun.security.timestamp.TSRequest - java:/Objects/sun.security.timestamp.TSResponse - java:/Objects/sun.security.util.AbstractAlgorithmConstraints - java:/Objects/sun.security.util.ConstraintsParameters - java:/Objects/java.security.cert.CertPathValidatorException - java:/Objects/java.text.SimpleDateFormat - java:/Objects/sun.security.util.AlgorithmDecomposer - java:/Objects/java.security.AlgorithmConstraints - java:/Objects/java.text.DateFormat - java:/Objects/java.text.DateFormatSymbols - java:/Objects/java.text.CalendarBuilder - java:/Objects/java.text.NumberFormat - java:/Objects/sun.util.locale.provider.LocaleProviderAdapter - java:/Objects/java.util.Calendar - java:/Objects/java.util.spi.LocaleServiceProvider - java:/Objects/java.text.spi.BreakIteratorProvider - java:/Objects/java.util.spi.CalendarDataProvider - java:/Objects/java.util.spi.CalendarNameProvider - java:/Objects/sun.util.spi.CalendarProvider - java:/Objects/java.text.spi.CollatorProvider - java:/Objects/java.util.spi.CurrencyNameProvider - java:/Objects/java.text.spi.DateFormatProvider - java:/Objects/java.text.spi.DateFormatSymbolsProvider - java:/Objects/java.text.spi.DecimalFormatSymbolsProvider - java:/Objects/java.util.spi.LocaleNameProvider - java:/Objects/sun.util.locale.provider.LocaleResources - java:/Objects/java.text.spi.NumberFormatProvider - java:/Objects/java.util.spi.TimeZoneNameProvider - java:/Objects/java.text.BreakIterator - java:/Objects/java.text.Collator - java:/Objects/java.text.CollationKey - java:/Objects/java.text.DecimalFormatSymbols - java:/Objects/java.util.Currency - java:/Objects/sun.util.locale.provider.LocaleServiceProviderPool - java:/Objects/java.io.DataInputStream - java:/Objects/java.util.HashSet - java:/Objects/sun.util.locale.provider.ResourceBundleBasedAdapter - java:/Objects/java.util.ResourceBundle - java:/Objects/sun.util.resources.LocaleData - java:/Objects/sun.util.locale.LocaleObjectCache - java:/Objects/sun.util.locale.BaseLocale - java:/Objects/java.util.spi.ResourceBundleControlProvider - java:/Objects/sun.util.resources.OpenListResourceBundle - java:/Objects/sun.util.resources.TimeZoneNamesBundle - java:/Objects/sun.util.resources.ParallelListResourceBundle - java:/Objects/java.util.concurrent.atomic.AtomicMarkableReference - java:/Objects/java.io.DataOutputStream - java:/Objects/java.io.FilterOutputStream - java:/Objects/sun.misc.Resource - java:/Objects/java.net.URLStreamHandler - java:/Objects/sun.misc.JarIndex - java:/Objects/sun.misc.MetaIndex - java:/Objects/sun.misc.JavaUtilZipFileAccess - java:/Objects/java.net.URLStreamHandlerFactory - java:/Objects/java.net.URLConnection - java:/Objects/java.net.Proxy - java:/Objects/java.net.UnknownServiceException - java:/Objects/java.net.ContentHandler - java:/Objects/java.net.FileNameMap - java:/Objects/java.net.ContentHandlerFactory - java:/Objects/sun.net.www.MessageHeader - java:/Objects/java.net.SocketAddress - java:/Objects/java.lang.invoke.ForceInline - java:/Objects/java.lang.invoke.DontInline - java:/Objects/java.lang.invoke.WrongMethodTypeException - java:/Objects/sun.invoke.util.Wrapper - java:/Objects/java.lang.invoke.LambdaFormEditor - java:/Objects/java.lang.ClassCastException - java:/Objects/java.lang.invoke.LambdaFormBuffer - java:/Objects/jdk.internal.org.objectweb.asm.MethodVisitor - java:/Objects/java.lang.invoke.MethodHandles - java:/Objects/jdk.internal.org.objectweb.asm.AnnotationVisitor - java:/Objects/jdk.internal.org.objectweb.asm.Attribute - java:/Objects/jdk.internal.org.objectweb.asm.TypePath - java:/Objects/jdk.internal.org.objectweb.asm.Handle - java:/Objects/jdk.internal.org.objectweb.asm.Label - java:/Objects/jdk.internal.org.objectweb.asm.ClassWriter - java:/Objects/jdk.internal.org.objectweb.asm.ByteVector - java:/Objects/jdk.internal.org.objectweb.asm.ClassReader - java:/Objects/jdk.internal.org.objectweb.asm.ClassVisitor - java:/Objects/jdk.internal.org.objectweb.asm.Item - java:/Objects/jdk.internal.org.objectweb.asm.FieldVisitor - java:/Objects/jdk.internal.org.objectweb.asm.AnnotationWriter - java:/Objects/jdk.internal.org.objectweb.asm.FieldWriter - java:/Objects/jdk.internal.org.objectweb.asm.MethodWriter - java:/Objects/jdk.internal.org.objectweb.asm.Frame - java:/Objects/jdk.internal.org.objectweb.asm.Handler - java:/Objects/jdk.internal.org.objectweb.asm.Type - java:/Objects/jdk.internal.org.objectweb.asm.Context - java:/Objects/jdk.internal.org.objectweb.asm.Edge - java:/Objects/java.lang.NoSuchMethodException - java:/Objects/java.lang.NoSuchFieldException - java:/Objects/java.lang.invoke.DirectMethodHandle - java:/Objects/java.lang.invoke.MethodHandleInfo - java:/Objects/java.lang.ClassValue - java:/Objects/java.util.WeakHashMap - java:/Objects/java.lang.invoke.DelegatingMethodHandle - java:/Objects/sun.invoke.empty.Empty - java:/Objects/java.lang.reflect.Parameter - java:/Objects/java.lang.reflect.ParameterizedType - java:/Objects/java.lang.reflect.WildcardType - java:/Objects/java.util.regex.Matcher - java:/Objects/java.util.regex.UnicodeProp - java:/Objects/java.util.regex.PatternSyntaxException - java:/Objects/java.util.regex.MatchResult - java:/Objects/java.security.MessageDigestSpi - java:/Objects/java.security.DigestException - java:/Objects/java.net.URISyntaxException - java:/Objects/java.nio.file.Watchable - java:/Objects/java.nio.file.FileSystem - java:/Objects/java.nio.file.WatchService - java:/Objects/java.nio.file.WatchEvent - java:/Objects/java.nio.file.WatchKey - java:/Objects/java.nio.file.LinkOption - java:/Objects/java.nio.file.FileStore - java:/Objects/java.nio.file.PathMatcher - java:/Objects/java.nio.file.attribute.UserPrincipalLookupService - java:/Objects/java.nio.file.spi.FileSystemProvider - java:/Objects/java.nio.file.attribute.FileStoreAttributeView - java:/Objects/java.nio.file.attribute.FileAttributeView - java:/Objects/java.nio.file.attribute.AttributeView - java:/Objects/java.nio.file.attribute.GroupPrincipal - java:/Objects/java.nio.file.attribute.UserPrincipal - java:/Objects/java.nio.file.AccessMode - java:/Objects/java.nio.file.CopyOption - java:/Objects/java.nio.file.attribute.FileAttribute - java:/Objects/java.nio.file.OpenOption - java:/Objects/java.nio.channels.AsynchronousFileChannel - java:/Objects/java.nio.channels.SeekableByteChannel - java:/Objects/java.nio.file.DirectoryStream - java:/Objects/java.nio.channels.FileChannel - java:/Objects/java.nio.file.attribute.BasicFileAttributes - java:/Objects/java.nio.channels.AsynchronousChannel - java:/Objects/java.nio.channels.FileLock - java:/Objects/java.nio.channels.CompletionHandler - java:/Objects/java.nio.channels.Channel - java:/Objects/java.nio.channels.ByteChannel - java:/Objects/java.nio.channels.ReadableByteChannel - java:/Objects/java.nio.channels.WritableByteChannel - java:/Objects/java.nio.channels.spi.AbstractInterruptibleChannel - java:/Objects/java.nio.channels.GatheringByteChannel - java:/Objects/java.nio.channels.ScatteringByteChannel - java:/Objects/java.nio.MappedByteBuffer - java:/Objects/java.nio.channels.InterruptibleChannel - java:/Objects/java.nio.channels.AsynchronousCloseException - java:/Objects/java.nio.channels.ClosedChannelException - java:/Objects/java.io.FileDescriptor - java:/Objects/java.io.SyncFailedException - java:/Objects/java.lang.SecurityManager - java:/Objects/java.net.UrlDeserializedState - java:/Objects/java.nio.charset.spi.CharsetProvider - java:/Objects/java.util.SortedMap - java:/Objects/sun.util.locale.InternalLocaleBuilder - java:/Objects/sun.util.locale.LocaleExtensions - java:/Objects/java.text.MessageFormat - java:/Objects/java.util.MissingResourceException - java:/Objects/sun.util.locale.LocaleSyntaxException - java:/Objects/sun.util.locale.LanguageTag - java:/Objects/sun.util.locale.ParseStatus - java:/Objects/sun.util.locale.StringTokenIterator - java:/Objects/sun.util.locale.Extension - java:/Objects/java.io.OutputStreamWriter - java:/Objects/sun.nio.cs.StreamEncoder - java:/Objects/java.io.ObjectStreamConstants - java:/Objects/sun.misc.ObjectInputFilter - java:/Objects/java.io.ObjectInputValidation - java:/Objects/java.io.ObjectStreamClass - java:/Objects/sun.util.logging.PlatformLogger - java:/Objects/java.io.InvalidClassException - java:/Objects/java.io.Externalizable - java:/Objects/sun.misc.ObjectStreamClassValidator - java:/Objects/java.io.SerialCallbackContext - java:/Objects/java.io.SerializablePermission - java:/Objects/sun.reflect.annotation.AnnotationType - java:/Objects/sun.reflect.ConstantPool - java:/Objects/sun.reflect.generics.repository.ClassRepository - java:/Objects/org.eclipse.viatra.query.runtime.api.IQuerySpecification - java:/Objects/org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQueryHeader - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery - java:/Objects/org.eclipse.viatra.query.runtime.api.ViatraQueryEngine - java:/Objects/org.eclipse.viatra.query.runtime.api.scope.QueryScope - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility - java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IInputKey - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.PTraceable - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PDisjunction - java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.PProblem - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.TypeJudgement - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.PBody - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.PVariable - java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryMetaContext - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.PConstraint - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter - java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.InputKeyImplication - java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IPosetComparator - java:/Objects/org.eclipse.viatra.query.runtime.matchers.tuple.Tuple - java:/Objects/org.eclipse.viatra.query.runtime.matchers.tuple.AbstractTuple - java:/Objects/org.eclipse.viatra.query.runtime.matchers.tuple.ITuple - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.VariableDeferredPConstraint - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.DeferredPConstraint - java:/Objects/org.eclipse.viatra.query.runtime.matchers.planning.SubPlan - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.BasePConstraint - java:/Objects/org.eclipse.viatra.query.runtime.matchers.planning.operations.POperation - java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.QueryHintOption - java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendFactory - java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IMatcherCapability - java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryBackendContext - java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackend - java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IQueryBackendHintProvider - java:/Objects/org.apache.log4j.Logger - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.analysis.QueryAnalyzer - java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryCacheContext - java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryResultProviderAccess - java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContext - java:/Objects/org.apache.log4j.Category - java:/Objects/org.apache.log4j.spi.LoggerFactory - java:/Objects/org.apache.log4j.spi.AppenderAttachable - java:/Objects/org.apache.log4j.Appender - java:/Objects/org.apache.log4j.spi.LoggingEvent - java:/Objects/org.apache.log4j.Priority - java:/Objects/org.apache.log4j.spi.LoggerRepository - java:/Objects/org.apache.log4j.Level - java:/Objects/org.apache.log4j.helpers.AppenderAttachableImpl - java:/Objects/org.apache.log4j.spi.Filter - java:/Objects/org.apache.log4j.spi.ErrorHandler - java:/Objects/org.apache.log4j.Layout - java:/Objects/org.apache.log4j.spi.OptionHandler - java:/Objects/org.apache.log4j.spi.ThrowableInformation - java:/Objects/org.apache.log4j.spi.LocationInfo - java:/Objects/java.io.StringWriter - java:/Objects/org.apache.log4j.spi.HierarchyEventListener - java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IQueryResultProvider - java:/Objects/org.eclipse.viatra.query.runtime.matchers.backend.IUpdateable - java:/Objects/org.eclipse.viatra.query.runtime.matchers.tuple.TupleMask - java:/Objects/org.eclipse.viatra.query.runtime.matchers.util.Accuracy - java:/Objects/org.eclipse.viatra.query.runtime.matchers.tuple.IModifiableTuple - java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IQueryRuntimeContextListener - java:/Objects/org.eclipse.viatra.query.runtime.matchers.context.IndexingService - java:/Objects/org.eclipse.viatra.query.runtime.matchers.planning.QueryProcessingException - java:/Objects/org.eclipse.viatra.query.runtime.matchers.ViatraQueryRuntimeException - java:/Objects/org.eclipse.viatra.query.runtime.api.scope.IBaseIndex - java:/Objects/org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions - java:/Objects/org.eclipse.viatra.query.runtime.api.scope.ViatraBaseIndexChangeListener - java:/Objects/org.eclipse.viatra.query.runtime.api.scope.IIndexingErrorListener - java:/Objects/org.eclipse.viatra.query.runtime.api.scope.IInstanceObserver - java:/Objects/org.eclipse.viatra.query.runtime.internal.apiimpl.EngineContextFactory - java:/Objects/org.eclipse.viatra.query.runtime.api.scope.IEngineContext - java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseMatcher - java:/Objects/org.eclipse.viatra.query.runtime.internal.apiimpl.QueryResultWrapper - java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification - java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseQuerySpecification - java:/Objects/java.lang.ExceptionInInitializerError - java:/Objects/org.eclipse.viatra.query.runtime.exception.ViatraQueryException - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.QueryInitializationException - java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup - java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseQueryGroup - java:/Objects/org.eclipse.viatra.query.runtime.api.IQueryGroup - java:/Objects/org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine - java:/Objects/org.eclipse.viatra.query.runtime.api.ViatraQueryEngineLifecycleListener - java:/Objects/org.eclipse.viatra.query.runtime.api.IMatchUpdateListener - java:/Objects/org.eclipse.viatra.query.runtime.api.ViatraQueryModelUpdateListener - java:/Objects/java.lang.Override - java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.queries.BasePQuery - java:/Objects/org.eclipse.emf.ecore.EClassifier - java:/Objects/org.eclipse.emf.ecore.EEnumLiteral - java:/Objects/org.eclipse.emf.ecore.EStructuralFeature - java:/Objects/org.eclipse.emf.ecore.ENamedElement - java:/Objects/org.eclipse.emf.ecore.EPackage - java:/Objects/org.eclipse.emf.common.util.EList - java:/Objects/org.eclipse.emf.ecore.ETypeParameter - java:/Objects/org.eclipse.emf.ecore.EModelElement - java:/Objects/org.eclipse.emf.ecore.EObject - java:/Objects/org.eclipse.emf.ecore.EAnnotation - java:/Objects/org.eclipse.emf.common.notify.Notifier - java:/Objects/org.eclipse.emf.common.util.TreeIterator - java:/Objects/org.eclipse.emf.ecore.EClass - java:/Objects/org.eclipse.emf.ecore.EReference - java:/Objects/org.eclipse.emf.ecore.EOperation - java:/Objects/org.eclipse.emf.ecore.resource.Resource - java:/Objects/org.eclipse.emf.common.notify.Adapter - java:/Objects/org.eclipse.emf.common.notify.Notification - java:/Objects/org.eclipse.emf.ecore.EAttribute - java:/Objects/org.eclipse.emf.ecore.EGenericType - java:/Objects/org.eclipse.emf.ecore.EDataType - java:/Objects/org.eclipse.emf.ecore.InternalEObject - java:/Objects/org.eclipse.emf.common.CommonPlugin - java:/Objects/org.eclipse.emf.common.notify.NotificationChain - java:/Objects/org.eclipse.emf.common.util.URI - java:/Objects/org.eclipse.emf.common.util.Pool - java:/Objects/org.eclipse.emf.common.util.SegmentSequence - java:/Objects/org.eclipse.emf.common.util.CommonUtil - java:/Objects/org.eclipse.emf.common.util.WeakInterningHashSet - java:/Objects/java.util.concurrent.locks.ReentrantReadWriteLock - java:/Objects/org.eclipse.emf.common.util.InterningSet - java:/Objects/java.util.concurrent.locks.ReadWriteLock - java:/Objects/java.lang.IllegalMonitorStateException - java:/Objects/org.eclipse.emf.common.EMFPlugin - java:/Objects/org.osgi.framework.BundleActivator - java:/Objects/org.eclipse.emf.common.util.ResourceLocator - java:/Objects/org.eclipse.emf.common.util.DelegatingResourceLocator - java:/Objects/org.eclipse.emf.common.util.Logger - java:/Objects/org.eclipse.core.runtime.Plugin - java:/Objects/org.eclipse.core.runtime.IPluginDescriptor - java:/Objects/org.osgi.framework.Bundle - java:/Objects/org.eclipse.core.runtime.ILog - java:/Objects/org.osgi.framework.BundleContext - java:/Objects/org.eclipse.core.runtime.IPath - java:/Objects/org.eclipse.osgi.service.debug.DebugOptions - java:/Objects/org.eclipse.core.runtime.Preferences - java:/Objects/java.lang.IllegalStateException - java:/Objects/org.eclipse.core.runtime.CoreException - java:/Objects/org.osgi.util.tracker.ServiceTracker - java:/Objects/org.eclipse.osgi.service.debug.DebugTrace - java:/Objects/java.util.EventListener - java:/Objects/java.util.EventObject - java:/Objects/org.eclipse.core.runtime.IStatus - java:/Objects/org.eclipse.core.runtime.ListenerList - java:/Objects/org.osgi.util.tracker.ServiceTrackerCustomizer - java:/Objects/org.osgi.framework.AllServiceListener - java:/Objects/org.osgi.util.tracker.AbstractTracked - java:/Objects/org.osgi.framework.ServiceReference - java:/Objects/org.osgi.framework.ServiceEvent - java:/Objects/org.osgi.framework.ServiceListener - java:/Objects/org.osgi.framework.Filter - java:/Objects/org.osgi.framework.InvalidSyntaxException - java:/Objects/org.eclipse.core.runtime.IExtension - java:/Objects/org.eclipse.core.runtime.IExtensionPoint - java:/Objects/org.eclipse.core.runtime.IPluginPrerequisite - java:/Objects/org.eclipse.core.runtime.ILibrary - java:/Objects/org.eclipse.core.runtime.PluginVersionIdentifier - java:/Objects/org.eclipse.core.runtime.InvalidRegistryObjectException - java:/Objects/org.eclipse.core.runtime.IConfigurationElement - java:/Objects/org.eclipse.core.runtime.IContributor - java:/Objects/org.osgi.framework.Version - java:/Objects/org.osgi.framework.BundleException - java:/Objects/org.eclipse.core.runtime.ILogListener - java:/Objects/org.osgi.framework.BundleReference - java:/Objects/org.osgi.framework.BundleListener - java:/Objects/org.osgi.framework.FrameworkListener - java:/Objects/org.osgi.framework.ServiceObjects - java:/Objects/org.osgi.framework.ServiceRegistration - java:/Objects/org.osgi.framework.ServiceFactory - java:/Objects/org.osgi.framework.BundleEvent - java:/Objects/org.osgi.framework.FrameworkEvent - java:/Objects/org.eclipse.emf.ecore.ETypedElement - java:/Objects/org.eclipse.emf.ecore.EParameter - java:/Objects/org.eclipse.emf.ecore.resource.ResourceSet - java:/Objects/org.eclipse.emf.common.notify.AdapterFactory - java:/Objects/org.eclipse.emf.ecore.resource.URIConverter - java:/Objects/java.io.InputStreamReader - java:/Objects/org.eclipse.emf.ecore.resource.ContentHandler - java:/Objects/org.eclipse.emf.ecore.resource.URIHandler - java:/Objects/sun.nio.cs.StreamDecoder - java:/Objects/java.io.FileInputStream - java:/Objects/org.eclipse.emf.common.util.EMap - java:/Objects/org.eclipse.emf.ecore.EFactory - java:/Objects/org.eclipse.emf.common.util.Enumerator - java:/Objects/org.eclipse.emf.ecore.EEnum - java:/Objects/org.eclipse.emf.ecore.util.FeatureMap - java:/Objects/org.eclipse.emf.ecore.util.InternalEList - java:/Objects/org.eclipse.emf.ecore.util.EContentsEList - java:/Objects/org.eclipse.emf.ecore.util.AbstractSequentialInternalEList - java:/Objects/hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem - java:/Objects/hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType - java:/Objects/hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance - java:/Objects/hu.bme.mit.inf.dslreasoner.domains.cps.HostType - java:/Objects/hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance - java:/Objects/hu.bme.mit.inf.dslreasoner.domains.cps.Request - java:/Objects/hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement - java:/Objects/hu.bme.mit.inf.dslreasoner.domains.cps.Requirement - java:/Objects/java.lang.SuppressWarnings - java:/Objects/javax.annotation.Generated - java:/Objects/org.eclipse.viatra.query.runtime.api.GenericPatternMatcher - java:/Objects/org.eclipse.viatra.query.runtime.api.GenericPatternMatch - java:/Objects/org.eclipse.viatra.query.runtime.api.GenericQuerySpecification - java:/Objects/org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecificationWithGenericMatcher - java:/Objects/org.eclipse.viatra.query.runtime.matchers.aggregators.sum - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.AggregatorType - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.IAggregatorFactory - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.BoundAggregator - java:/Objects/java.lang.annotation.Inherited - java:/Objects/org.eclipse.viatra.query.runtime.matchers.psystem.aggregations.IMultisetAggregationOperator - java:/Objects/org.eclipse.xtext.xbase.lib.ArrayLiterals - java:/Objects/com.google.common.annotations.GwtCompatible - java:/Objects/org.eclipse.xtext.xbase.lib.Pure - java:/Objects/org.eclipse.xtext.xbase.lib.Inline - java:/Objects/com.google.common.annotations.Beta - java:/Objects/org.eclipse.xtext.xbase.lib.CollectionLiterals - java:/Objects/org.eclipse.xtext.xbase.lib.Pair - java:/Objects/java.util.LinkedHashSet - java:/Objects/java.util.TreeMap - java:/Objects/java.util.TreeSet - java:/Objects/java.util.NavigableMap - java:/Objects/java.util.NavigableSet - java:/Objects/java.util.SortedSet - java:/Objects/org.eclipse.xtext.xbase.lib.InputOutput - java:/Objects/org.eclipse.xtext.xbase.lib.ArrayExtensions - java:/Objects/com.google.common.annotations.GwtIncompatible - java:/Objects/org.eclipse.xtext.xbase.lib.BigDecimalExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.BigIntegerExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.BooleanExtensions - java:/Objects/com.google.common.primitives.Booleans - java:/Objects/org.eclipse.xtext.xbase.lib.ByteExtensions - java:/Objects/java.lang.Math - java:/Objects/org.eclipse.xtext.xbase.lib.CharacterExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.CollectionExtensions - java:/Objects/com.google.common.collect.Iterables - java:/Objects/com.google.common.collect.ImmutableList - java:/Objects/com.google.common.collect.ImmutableSet - java:/Objects/com.google.common.collect.ImmutableSortedSet - java:/Objects/com.google.common.collect.ImmutableMap - java:/Objects/com.google.common.collect.ImmutableSortedMap - java:/Objects/java.util.Collections - java:/Objects/com.google.common.collect.FluentIterable - java:/Objects/com.google.common.base.Predicate - java:/Objects/com.google.common.base.Function - java:/Objects/com.google.common.base.Optional - java:/Objects/com.google.common.collect.ImmutableCollection - java:/Objects/com.google.common.collect.ImmutableListMultimap - java:/Objects/com.google.common.base.Joiner - java:/Objects/com.google.common.collect.ImmutableMultiset - java:/Objects/com.google.common.collect.ImmutableMultimap - java:/Objects/com.google.common.collect.ListMultimap - java:/Objects/com.google.common.collect.Multimap - java:/Objects/com.google.common.collect.AbstractMultimap - java:/Objects/com.google.common.collect.UnmodifiableIterator - java:/Objects/com.google.common.collect.Serialization - java:/Objects/com.google.common.collect.ImmutableSetMultimap - java:/Objects/com.google.common.collect.Multiset - java:/Objects/com.google.common.collect.Multimaps - java:/Objects/com.google.common.collect.Maps - java:/Objects/com.google.common.collect.AbstractListMultimap - java:/Objects/com.google.common.base.Supplier - java:/Objects/com.google.common.collect.AbstractMapBasedMultimap - java:/Objects/com.google.common.collect.AbstractSetMultimap - java:/Objects/com.google.common.collect.AbstractSortedSetMultimap - java:/Objects/com.google.common.collect.AbstractMultiset - java:/Objects/com.google.common.collect.Multisets - java:/Objects/com.google.common.collect.SetMultimap - java:/Objects/com.google.common.collect.ForwardingMultimap - java:/Objects/com.google.common.collect.SortedSetMultimap - java:/Objects/com.google.common.collect.FilteredMultimap - java:/Objects/com.google.common.collect.FilteredSetMultimap - java:/Objects/java.util.EnumMap - java:/Objects/com.google.common.base.Converter - java:/Objects/com.google.common.collect.BiMap - java:/Objects/com.google.common.collect.ForwardingMap - java:/Objects/com.google.common.collect.Ordering - java:/Objects/com.google.common.collect.Sets - java:/Objects/com.google.common.collect.ForwardingSet - java:/Objects/com.google.common.collect.AbstractNavigableMap - java:/Objects/com.google.common.collect.MapDifference - java:/Objects/com.google.common.collect.SortedMapDifference - java:/Objects/com.google.common.collect.ForwardingCollection - java:/Objects/com.google.common.collect.ForwardingSortedMap - java:/Objects/com.google.common.base.Equivalence - java:/Objects/java.util.IdentityHashMap - java:/Objects/com.google.common.collect.Range - java:/Objects/com.google.common.collect.ForwardingObject - java:/Objects/com.google.common.annotations.VisibleForTesting - java:/Objects/java.util.EnumSet - java:/Objects/com.google.common.collect.CartesianList - java:/Objects/com.google.common.collect.ForwardingNavigableSet - java:/Objects/com.google.common.collect.Collections2 - java:/Objects/com.google.common.collect.ForwardingSortedSet - java:/Objects/java.util.concurrent.CopyOnWriteArraySet - java:/Objects/com.google.common.collect.AbstractIterator - java:/Objects/java.util.concurrent.CopyOnWriteArrayList - java:/Objects/java.util.function.BiPredicate - java:/Objects/com.google.common.collect.Cut - java:/Objects/com.google.common.collect.DiscreteDomain - java:/Objects/com.google.common.collect.BoundType - java:/Objects/com.google.common.collect.ForwardingMultiset - java:/Objects/com.google.common.collect.SortedMultiset - java:/Objects/com.google.common.collect.SortedMultisetBridge - java:/Objects/com.google.common.collect.SortedIterable - java:/Objects/com.google.common.collect.UnmodifiableListIterator - java:/Objects/com.google.common.collect.ImmutableSortedSetFauxverideShim - java:/Objects/com.google.common.collect.RegularImmutableSortedSet - java:/Objects/com.google.common.collect.ImmutableMapEntry - java:/Objects/com.google.common.collect.ImmutableEntry - java:/Objects/com.google.common.collect.AbstractMapEntry - java:/Objects/com.google.common.collect.ImmutableSortedMapFauxverideShim - java:/Objects/java.util.AbstractQueue - java:/Objects/org.eclipse.xtext.xbase.lib.ComparableExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.DoubleExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.FloatExtensions - java:/Objects/java.lang.Float - java:/Objects/org.eclipse.xtext.xbase.lib.FunctionExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.Functions - java:/Objects/org.eclipse.xtext.xbase.lib.Procedures - java:/Objects/org.eclipse.xtext.xbase.lib.IntegerExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.ExclusiveRange - java:/Objects/org.eclipse.xtext.xbase.lib.IntegerRange - java:/Objects/org.eclipse.xtext.xbase.lib.IterableExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.IteratorExtensions - java:/Objects/com.google.common.collect.Iterators - java:/Objects/com.google.common.collect.MultitransformedIterator - java:/Objects/com.google.common.collect.PeekingIterator - java:/Objects/org.eclipse.xtext.xbase.lib.ListExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.LongExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.MapExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.internal.UnmodifiableMergingMapView - java:/Objects/org.eclipse.xtext.xbase.lib.ObjectExtensions - java:/Objects/com.google.common.base.Objects - java:/Objects/com.google.common.base.ExtraObjectsMethodsForWeb - java:/Objects/org.eclipse.xtext.xbase.lib.ProcedureExtensions - java:/Objects/org.eclipse.xtext.xbase.lib.ShortExtensions - java:/Objects/java.lang.Short - java:/Objects/org.eclipse.xtext.xbase.lib.StringExtensions - java:/Objects/org.eclipse.viatra.query.runtime.matchers.aggregators.count - java:/Objects/org.eclipse.viatra.query.runtime.matchers.aggregators.avg - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - bold - - - - bold - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - bold - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - bold - - - - - - - - bold - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - bold - - - - - - - - - KEEP_LOCATION - KEEP_SIZE - KEEP_RATIO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - bold - - - bold - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - labelSize - - - labelSize - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.ecore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.ecore index 36db23be..0f52d8ee 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.ecore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.ecore @@ -1,9 +1,6 @@ - -
    - @@ -11,20 +8,6 @@ eType="#//ApplicationType" containment="true"/> - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - - - -
    - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.genmodel b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.genmodel index a0ccec7f..09ed2e0c 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.genmodel +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.genmodel @@ -15,8 +15,6 @@ - - @@ -49,10 +47,6 @@ - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/plugin.xml b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/plugin.xml index a7e8c387..5a0fee8d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/plugin.xml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/plugin.xml @@ -4,32 +4,9 @@ - - - - - - - - - - - - - - - - - - - - - - - - + @@ -40,6 +17,11 @@ + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/representations.aird b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/representations.aird new file mode 100644 index 00000000..dbaf9f8c --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/representations.aird @@ -0,0 +1,600 @@ + + + + model/cps.ecore + http://www.eclipse.org/emf/2002/Ecore + model/cps.genmodel + src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.xtend + src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend + src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend + src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/CpsStateCoder.xtend + + + + + + + + + + + + + + bold + + + + + + + + + + + + + + + + bold + + + + + + + + + + bold + + + + bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bold + + + + + + + + bold + + + + + + + + bold + + + + + + + + + + + + + + + + + + + + + + + + bold + + + + + + + + + + + + + + + + + + + + + + + + bold + + + + + + + + bold + + + + + + + + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + labelSize + + + labelSize + + + + + + + + + + + bold + + + bold + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore index b634f74b..4e059848 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore @@ -15,3 +15,13 @@ /.CostMetric.java._trace /.CpsCost.java._trace /.RedundantInstancesOnSameHost.java._trace +/.Allocate.java._trace +/.CpsTransformationRules.java._trace +/.ResourceRequirement.java._trace +/.CreateInstance.java._trace +/.CreateHostInstance.java._trace +/.UnallocatedAppInstance.java._trace +/.RequiredAppInstances.java._trace +/.GuidanceObjective.java._trace +/.RemoveHostInstance.java._trace +/.UnallocateAppInstance.java._trace diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/Allocate.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/Allocate.java new file mode 100644 index 00000000..830dc8a0 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/Allocate.java @@ -0,0 +1,862 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableHdd; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableMemory; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.UnallocatedAppInstance; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +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.EDataTypeInSlotsKey; +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.IExpressionEvaluator; +import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider; +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.ExpressionEvaluation; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.NegativePatternCall; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; +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: + *

    + *         //
    + *         // Transformation rule preconditions for rule-based DSE
    + *         //
    + *         
    + *         pattern allocate(App : ApplicationInstance, Host : HostInstance) {
    + *         	ApplicationInstance.type.requirements(App, Req);
    + *         	ResourceRequirement.hostType.instances(Req, Host);
    + *         	find unallocatedAppInstance(App);
    + *         	find availableMemory(Host, AvailableMem);
    + *         	find availableHdd(Host, AvailableHdd);
    + *         	ResourceRequirement.requiredMemory(Req, RequiredMem);
    + *         	ResourceRequirement.requiredHdd(Req, RequiredHdd);
    + *         	check(AvailableMem {@literal >}= RequiredMem);
    + *         	check(AvailableHdd {@literal >}= RequiredHdd);
    + *         	neg ApplicationInstance.requirement.instances.allocatedTo(App, Host);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class Allocate extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.allocate 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 ApplicationInstance fApp; + + private HostInstance fHost; + + private static List parameterNames = makeImmutableList("App", "Host"); + + private Match(final ApplicationInstance pApp, final HostInstance pHost) { + this.fApp = pApp; + this.fHost = pHost; + } + + @Override + public Object get(final String parameterName) { + if ("App".equals(parameterName)) return this.fApp; + if ("Host".equals(parameterName)) return this.fHost; + return null; + } + + public ApplicationInstance getApp() { + return this.fApp; + } + + public HostInstance getHost() { + return this.fHost; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("App".equals(parameterName) ) { + this.fApp = (ApplicationInstance) newValue; + return true; + } + if ("Host".equals(parameterName) ) { + this.fHost = (HostInstance) newValue; + return true; + } + return false; + } + + public void setApp(final ApplicationInstance pApp) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fApp = pApp; + } + + public void setHost(final HostInstance pHost) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fHost = pHost; + } + + @Override + public String patternName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.allocate"; + } + + @Override + public List parameterNames() { + return Allocate.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fApp, fHost}; + } + + @Override + public Allocate.Match toImmutable() { + return isMutable() ? newMatch(fApp, fHost) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"App\"=" + prettyPrintValue(fApp) + ", "); + result.append("\"Host\"=" + prettyPrintValue(fHost)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fApp, fHost); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof Allocate.Match)) { + Allocate.Match other = (Allocate.Match) obj; + return Objects.equals(fApp, other.fApp) && Objects.equals(fHost, other.fHost); + } 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 Allocate specification() { + return Allocate.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 Allocate.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 pApp the fixed value of pattern parameter App, or null if not bound. + * @param pHost the fixed value of pattern parameter Host, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static Allocate.Match newMutableMatch(final ApplicationInstance pApp, final HostInstance pHost) { + return new Mutable(pApp, pHost); + } + + /** + * 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 pApp the fixed value of pattern parameter App, or null if not bound. + * @param pHost the fixed value of pattern parameter Host, or null if not bound. + * @return the (partial) match object. + * + */ + public static Allocate.Match newMatch(final ApplicationInstance pApp, final HostInstance pHost) { + return new Immutable(pApp, pHost); + } + + private static final class Mutable extends Allocate.Match { + Mutable(final ApplicationInstance pApp, final HostInstance pHost) { + super(pApp, pHost); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends Allocate.Match { + Immutable(final ApplicationInstance pApp, final HostInstance pHost) { + super(pApp, pHost); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.allocate 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: + *

    +   * //
    +   * // Transformation rule preconditions for rule-based DSE
    +   * //
    +   * 
    +   * pattern allocate(App : ApplicationInstance, Host : HostInstance) {
    +   * 	ApplicationInstance.type.requirements(App, Req);
    +   * 	ResourceRequirement.hostType.instances(Req, Host);
    +   * 	find unallocatedAppInstance(App);
    +   * 	find availableMemory(Host, AvailableMem);
    +   * 	find availableHdd(Host, AvailableHdd);
    +   * 	ResourceRequirement.requiredMemory(Req, RequiredMem);
    +   * 	ResourceRequirement.requiredHdd(Req, RequiredHdd);
    +   * 	check(AvailableMem {@literal >}= RequiredMem);
    +   * 	check(AvailableHdd {@literal >}= RequiredHdd);
    +   * 	neg ApplicationInstance.requirement.instances.allocatedTo(App, Host);
    +   * }
    +   * 
    + * + * @see Match + * @see Allocate + * + */ + 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 Allocate.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 Allocate.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_APP = 0; + + private static final int POSITION_HOST = 1; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(Allocate.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 pApp the fixed value of pattern parameter App, or null if not bound. + * @param pHost the fixed value of pattern parameter Host, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final ApplicationInstance pApp, final HostInstance pHost) { + return rawStreamAllMatches(new Object[]{pApp, pHost}).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 pApp the fixed value of pattern parameter App, or null if not bound. + * @param pHost the fixed value of pattern parameter Host, or null if not bound. + * @return a stream of matches represented as a Match object. + * + */ + public Stream streamAllMatches(final ApplicationInstance pApp, final HostInstance pHost) { + return rawStreamAllMatches(new Object[]{pApp, pHost}); + } + + /** + * 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 pApp the fixed value of pattern parameter App, or null if not bound. + * @param pHost the fixed value of pattern parameter Host, or null if not bound. + * @return a match represented as a Match object, or null if no match is found. + * + */ + public Optional getOneArbitraryMatch(final ApplicationInstance pApp, final HostInstance pHost) { + return rawGetOneArbitraryMatch(new Object[]{pApp, pHost}); + } + + /** + * 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 pApp the fixed value of pattern parameter App, or null if not bound. + * @param pHost the fixed value of pattern parameter Host, or null if not bound. + * @return true if the input is a valid (partial) match of the pattern. + * + */ + public boolean hasMatch(final ApplicationInstance pApp, final HostInstance pHost) { + return rawHasMatch(new Object[]{pApp, pHost}); + } + + /** + * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pApp the fixed value of pattern parameter App, or null if not bound. + * @param pHost the fixed value of pattern parameter Host, or null if not bound. + * @return the number of pattern matches found. + * + */ + public int countMatches(final ApplicationInstance pApp, final HostInstance pHost) { + return rawCountMatches(new Object[]{pApp, pHost}); + } + + /** + * 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 pApp the fixed value of pattern parameter App, or null if not bound. + * @param pHost the fixed value of pattern parameter Host, 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 ApplicationInstance pApp, final HostInstance pHost, final Consumer processor) { + return rawForOneArbitraryMatch(new Object[]{pApp, pHost}, 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 pApp the fixed value of pattern parameter App, or null if not bound. + * @param pHost the fixed value of pattern parameter Host, or null if not bound. + * @return the (partial) match object. + * + */ + public Allocate.Match newMatch(final ApplicationInstance pApp, final HostInstance pHost) { + return Allocate.Match.newMatch(pApp, pHost); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfApp(final Object[] parameters) { + return rawStreamAllValues(POSITION_APP, parameters).map(ApplicationInstance.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfApp() { + return rawStreamAllValuesOfApp(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfApp() { + return rawStreamAllValuesOfApp(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for App. + *

    + * 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 streamAllValuesOfApp(final Allocate.Match partialMatch) { + return rawStreamAllValuesOfApp(partialMatch.toArray()); + } + + /** + * Retrieve the set of values that occur in matches for App. + *

    + * 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 streamAllValuesOfApp(final HostInstance pHost) { + return rawStreamAllValuesOfApp(new Object[]{null, pHost}); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfApp(final Allocate.Match partialMatch) { + return rawStreamAllValuesOfApp(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfApp(final HostInstance pHost) { + return rawStreamAllValuesOfApp(new Object[]{null, pHost}).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for Host. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfHost(final Object[] parameters) { + return rawStreamAllValues(POSITION_HOST, parameters).map(HostInstance.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for Host. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfHost() { + return rawStreamAllValuesOfHost(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for Host. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfHost() { + return rawStreamAllValuesOfHost(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for Host. + *

    + * 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 streamAllValuesOfHost(final Allocate.Match partialMatch) { + return rawStreamAllValuesOfHost(partialMatch.toArray()); + } + + /** + * Retrieve the set of values that occur in matches for Host. + *

    + * 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 streamAllValuesOfHost(final ApplicationInstance pApp) { + return rawStreamAllValuesOfHost(new Object[]{pApp, null}); + } + + /** + * Retrieve the set of values that occur in matches for Host. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfHost(final Allocate.Match partialMatch) { + return rawStreamAllValuesOfHost(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for Host. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfHost(final ApplicationInstance pApp) { + return rawStreamAllValuesOfHost(new Object[]{pApp, null}).collect(Collectors.toSet()); + } + + @Override + protected Allocate.Match tupleToMatch(final Tuple t) { + try { + return Allocate.Match.newMatch((ApplicationInstance) t.get(POSITION_APP), (HostInstance) t.get(POSITION_HOST)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected Allocate.Match arrayToMatch(final Object[] match) { + try { + return Allocate.Match.newMatch((ApplicationInstance) match[POSITION_APP], (HostInstance) match[POSITION_HOST]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected Allocate.Match arrayToMatchMutable(final Object[] match) { + try { + return Allocate.Match.newMutableMatch((ApplicationInstance) match[POSITION_APP], (HostInstance) match[POSITION_HOST]); + } 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 Allocate.instance(); + } + } + + private Allocate() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static Allocate instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected Allocate.Matcher instantiate(final ViatraQueryEngine engine) { + return Allocate.Matcher.on(engine); + } + + @Override + public Allocate.Matcher instantiate() { + return Allocate.Matcher.create(); + } + + @Override + public Allocate.Match newEmptyMatch() { + return Allocate.Match.newEmptyMatch(); + } + + @Override + public Allocate.Match newMatch(final Object... parameters) { + return Allocate.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance) parameters[0], (hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance) parameters[1]); + } + + /** + * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.Allocate (visibility: PUBLIC, simpleName: Allocate, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.Allocate, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.Allocate (visibility: PUBLIC, simpleName: Allocate, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.Allocate, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * + *

    This workaround is required e.g. to support recursion. + * + */ + private static class LazyHolder { + private static final Allocate INSTANCE = new Allocate(); + + /** + * 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 Allocate.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_App = new PParameter("App", "hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ApplicationInstance")), PParameterDirection.INOUT); + + private final PParameter parameter_Host = new PParameter("Host", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_App, parameter_Host); + + private class Embedded_1_ApplicationInstance_requirement_instances_allocatedTo extends BaseGeneratedEMFPQuery { + private final PParameter parameter_p0 = new PParameter("p0", "hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ApplicationInstance")), PParameterDirection.INOUT); + + private final PParameter parameter_p1 = new PParameter("p1", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); + + private final List embeddedParameters = Arrays.asList(parameter_p0, parameter_p1); + + public Embedded_1_ApplicationInstance_requirement_instances_allocatedTo() { + super(PVisibility.EMBEDDED); + } + + @Override + public String getFullyQualifiedName() { + return GeneratedPQuery.this.getFullyQualifiedName() + "$Embedded_1_ApplicationInstance_requirement_instances_allocatedTo"; + } + + @Override + public List getParameters() { + return embeddedParameters; + } + + @Override + public Set doGetContainedBodies() { + PBody body = new PBody(this); + PVariable var_p0 = body.getOrCreateVariableByName("p0"); + PVariable var_p1 = body.getOrCreateVariableByName("p1"); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_p0, parameter_p0), + new ExportedParameter(body, var_p1, parameter_p1) + )); + // ApplicationInstance.requirement.instances.allocatedTo(App, Host) + new TypeConstraint(body, Tuples.flatTupleOf(var_p0), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_p0, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "requirement"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "Requirement"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "Requirement", "instances"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "allocatedTo"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new Equality(body, var__virtual_2_, var_p1); + return Collections.singleton(body); + } + } + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.allocate"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("App","Host"); + } + + @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_App = body.getOrCreateVariableByName("App"); + PVariable var_Host = body.getOrCreateVariableByName("Host"); + PVariable var_Req = body.getOrCreateVariableByName("Req"); + PVariable var_AvailableMem = body.getOrCreateVariableByName("AvailableMem"); + PVariable var_AvailableHdd = body.getOrCreateVariableByName("AvailableHdd"); + PVariable var_RequiredMem = body.getOrCreateVariableByName("RequiredMem"); + PVariable var_RequiredHdd = body.getOrCreateVariableByName("RequiredHdd"); + new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_App, parameter_App), + new ExportedParameter(body, var_Host, parameter_Host) + )); + // ApplicationInstance.type.requirements(App, Req) + new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_App, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "type"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationType"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationType", "requirements"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement"))); + new Equality(body, var__virtual_1_, var_Req); + // ResourceRequirement.hostType.instances(Req, Host) + new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement"))); + PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Req, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ResourceRequirement", "hostType"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); + PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}"); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_, var__virtual_3_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostType", "instances"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_3_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new Equality(body, var__virtual_3_, var_Host); + // find unallocatedAppInstance(App) + new PositivePatternCall(body, Tuples.flatTupleOf(var_App), UnallocatedAppInstance.instance().getInternalQueryRepresentation()); + // find availableMemory(Host, AvailableMem) + new PositivePatternCall(body, Tuples.flatTupleOf(var_Host, var_AvailableMem), AvailableMemory.instance().getInternalQueryRepresentation()); + // find availableHdd(Host, AvailableHdd) + new PositivePatternCall(body, Tuples.flatTupleOf(var_Host, var_AvailableHdd), AvailableHdd.instance().getInternalQueryRepresentation()); + // ResourceRequirement.requiredMemory(Req, RequiredMem) + new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement"))); + PVariable var__virtual_4_ = body.getOrCreateVariableByName(".virtual{4}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Req, var__virtual_4_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ResourceRequirement", "requiredMemory"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_4_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EInt"))); + new Equality(body, var__virtual_4_, var_RequiredMem); + // ResourceRequirement.requiredHdd(Req, RequiredHdd) + new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement"))); + PVariable var__virtual_5_ = body.getOrCreateVariableByName(".virtual{5}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Req, var__virtual_5_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ResourceRequirement", "requiredHdd"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_5_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EInt"))); + new Equality(body, var__virtual_5_, var_RequiredHdd); + // check(AvailableMem >= RequiredMem) + new ExpressionEvaluation(body, new IExpressionEvaluator() { + + @Override + public String getShortDescription() { + return "Expression evaluation from pattern allocate"; + } + + @Override + public Iterable getInputParameterNames() { + return Arrays.asList("AvailableMem", "RequiredMem");} + + @Override + public Object evaluateExpression(IValueProvider provider) throws Exception { + Integer AvailableMem = (Integer) provider.getValue("AvailableMem"); + Integer RequiredMem = (Integer) provider.getValue("RequiredMem"); + return evaluateExpression_1_1(AvailableMem, RequiredMem); + } + }, null); + // check(AvailableHdd >= RequiredHdd) + new ExpressionEvaluation(body, new IExpressionEvaluator() { + + @Override + public String getShortDescription() { + return "Expression evaluation from pattern allocate"; + } + + @Override + public Iterable getInputParameterNames() { + return Arrays.asList("AvailableHdd", "RequiredHdd");} + + @Override + public Object evaluateExpression(IValueProvider provider) throws Exception { + Integer AvailableHdd = (Integer) provider.getValue("AvailableHdd"); + Integer RequiredHdd = (Integer) provider.getValue("RequiredHdd"); + return evaluateExpression_1_2(AvailableHdd, RequiredHdd); + } + }, null); + // neg ApplicationInstance.requirement.instances.allocatedTo(App, Host) + new NegativePatternCall(body, Tuples.flatTupleOf(var_App, var_Host), new Allocate.GeneratedPQuery.Embedded_1_ApplicationInstance_requirement_instances_allocatedTo()); + bodies.add(body); + } + return bodies; + } + } + + private static boolean evaluateExpression_1_1(final Integer AvailableMem, final Integer RequiredMem) { + boolean _greaterEqualsThan = (AvailableMem.compareTo(RequiredMem) >= 0); + return _greaterEqualsThan; + } + + private static boolean evaluateExpression_1_2(final Integer AvailableHdd, final Integer RequiredHdd) { + boolean _greaterEqualsThan = (AvailableHdd.compareTo(RequiredHdd) >= 0); + return _greaterEqualsThan; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AllocationWithoutResourceRequirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AllocationWithoutResourceRequirement.java index be7488b6..6da5f76d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AllocationWithoutResourceRequirement.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AllocationWithoutResourceRequirement.java @@ -5,7 +5,7 @@ package hu.bme.mit.inf.dslreasoner.domains.cps.queries; import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.ResourceRequirement; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement; import java.util.Arrays; import java.util.Collection; import java.util.LinkedHashSet; diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AvailableHdd.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AvailableHdd.java deleted file mode 100644 index 22821c4a..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AvailableHdd.java +++ /dev/null @@ -1,743 +0,0 @@ -/** - * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql - */ -package hu.bme.mit.inf.dslreasoner.domains.cps.queries; - -import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalHdd; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.HddRequirement; -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.aggregators.sum; -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.IExpressionEvaluator; -import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.AggregatorConstraint; -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.ExpressionEvaluation; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

    Original source: - *

    - *         {@literal @}QueryBasedFeature(feature = "availableHdd")
    - *         pattern availableHdd(Host : HostInstance, Hdd : java Integer) {
    - *         	find totalHdd(Host, TotalHdd);
    - *         	RequiredHdd == sum find hddRequirement(Host, _, #_);
    - *         	Hdd == eval(TotalHdd - RequiredHdd);
    - *         }
    - * 
    - * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class AvailableHdd extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableHdd 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 HostInstance fHost; - - private Integer fHdd; - - private static List parameterNames = makeImmutableList("Host", "Hdd"); - - private Match(final HostInstance pHost, final Integer pHdd) { - this.fHost = pHost; - this.fHdd = pHdd; - } - - @Override - public Object get(final String parameterName) { - if ("Host".equals(parameterName)) return this.fHost; - if ("Hdd".equals(parameterName)) return this.fHdd; - return null; - } - - public HostInstance getHost() { - return this.fHost; - } - - public Integer getHdd() { - return this.fHdd; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("Host".equals(parameterName) ) { - this.fHost = (HostInstance) newValue; - return true; - } - if ("Hdd".equals(parameterName) ) { - this.fHdd = (Integer) newValue; - return true; - } - return false; - } - - public void setHost(final HostInstance pHost) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fHost = pHost; - } - - public void setHdd(final Integer pHdd) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fHdd = pHdd; - } - - @Override - public String patternName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableHdd"; - } - - @Override - public List parameterNames() { - return AvailableHdd.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fHost, fHdd}; - } - - @Override - public AvailableHdd.Match toImmutable() { - return isMutable() ? newMatch(fHost, fHdd) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"Host\"=" + prettyPrintValue(fHost) + ", "); - result.append("\"Hdd\"=" + prettyPrintValue(fHdd)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fHost, fHdd); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof AvailableHdd.Match)) { - AvailableHdd.Match other = (AvailableHdd.Match) obj; - return Objects.equals(fHost, other.fHost) && Objects.equals(fHdd, other.fHdd); - } 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 AvailableHdd specification() { - return AvailableHdd.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 AvailableHdd.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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static AvailableHdd.Match newMutableMatch(final HostInstance pHost, final Integer pHdd) { - return new Mutable(pHost, pHdd); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return the (partial) match object. - * - */ - public static AvailableHdd.Match newMatch(final HostInstance pHost, final Integer pHdd) { - return new Immutable(pHost, pHdd); - } - - private static final class Mutable extends AvailableHdd.Match { - Mutable(final HostInstance pHost, final Integer pHdd) { - super(pHost, pHdd); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends AvailableHdd.Match { - Immutable(final HostInstance pHost, final Integer pHdd) { - super(pHost, pHdd); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableHdd pattern, - * providing pattern-specific query methods. - * - *

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

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

    Original source: - *

    -   * {@literal @}QueryBasedFeature(feature = "availableHdd")
    -   * pattern availableHdd(Host : HostInstance, Hdd : java Integer) {
    -   * 	find totalHdd(Host, TotalHdd);
    -   * 	RequiredHdd == sum find hddRequirement(Host, _, #_);
    -   * 	Hdd == eval(TotalHdd - RequiredHdd);
    -   * }
    -   * 
    - * - * @see Match - * @see AvailableHdd - * - */ - 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 AvailableHdd.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 AvailableHdd.Matcher create() { - return new Matcher(); - } - - private static final int POSITION_HOST = 0; - - private static final int POSITION_HDD = 1; - - private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(AvailableHdd.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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final HostInstance pHost, final Integer pHdd) { - return rawStreamAllMatches(new Object[]{pHost, pHdd}).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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final HostInstance pHost, final Integer pHdd) { - return rawStreamAllMatches(new Object[]{pHost, pHdd}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final HostInstance pHost, final Integer pHdd) { - return rawGetOneArbitraryMatch(new Object[]{pHost, pHdd}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final HostInstance pHost, final Integer pHdd) { - return rawHasMatch(new Object[]{pHost, pHdd}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final HostInstance pHost, final Integer pHdd) { - return rawCountMatches(new Object[]{pHost, pHdd}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, 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 HostInstance pHost, final Integer pHdd, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pHost, pHdd}, 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return the (partial) match object. - * - */ - public AvailableHdd.Match newMatch(final HostInstance pHost, final Integer pHdd) { - return AvailableHdd.Match.newMatch(pHost, pHdd); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfHost(final Object[] parameters) { - return rawStreamAllValues(POSITION_HOST, parameters).map(HostInstance.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost() { - return rawStreamAllValuesOfHost(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfHost() { - return rawStreamAllValuesOfHost(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - *

    - * 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 streamAllValuesOfHost(final AvailableHdd.Match partialMatch) { - return rawStreamAllValuesOfHost(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - *

    - * 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 streamAllValuesOfHost(final Integer pHdd) { - return rawStreamAllValuesOfHost(new Object[]{null, pHdd}); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost(final AvailableHdd.Match partialMatch) { - return rawStreamAllValuesOfHost(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost(final Integer pHdd) { - return rawStreamAllValuesOfHost(new Object[]{null, pHdd}).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfHdd(final Object[] parameters) { - return rawStreamAllValues(POSITION_HDD, parameters).map(Integer.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHdd() { - return rawStreamAllValuesOfHdd(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfHdd() { - return rawStreamAllValuesOfHdd(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - *

    - * 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 streamAllValuesOfHdd(final AvailableHdd.Match partialMatch) { - return rawStreamAllValuesOfHdd(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - *

    - * 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 streamAllValuesOfHdd(final HostInstance pHost) { - return rawStreamAllValuesOfHdd(new Object[]{pHost, null}); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHdd(final AvailableHdd.Match partialMatch) { - return rawStreamAllValuesOfHdd(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHdd(final HostInstance pHost) { - return rawStreamAllValuesOfHdd(new Object[]{pHost, null}).collect(Collectors.toSet()); - } - - @Override - protected AvailableHdd.Match tupleToMatch(final Tuple t) { - try { - return AvailableHdd.Match.newMatch((HostInstance) t.get(POSITION_HOST), (Integer) t.get(POSITION_HDD)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected AvailableHdd.Match arrayToMatch(final Object[] match) { - try { - return AvailableHdd.Match.newMatch((HostInstance) match[POSITION_HOST], (Integer) match[POSITION_HDD]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected AvailableHdd.Match arrayToMatchMutable(final Object[] match) { - try { - return AvailableHdd.Match.newMutableMatch((HostInstance) match[POSITION_HOST], (Integer) match[POSITION_HDD]); - } 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 AvailableHdd.instance(); - } - } - - private AvailableHdd() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static AvailableHdd instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected AvailableHdd.Matcher instantiate(final ViatraQueryEngine engine) { - return AvailableHdd.Matcher.on(engine); - } - - @Override - public AvailableHdd.Matcher instantiate() { - return AvailableHdd.Matcher.create(); - } - - @Override - public AvailableHdd.Match newEmptyMatch() { - return AvailableHdd.Match.newEmptyMatch(); - } - - @Override - public AvailableHdd.Match newMatch(final Object... parameters) { - return AvailableHdd.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance) parameters[0], (java.lang.Integer) parameters[1]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableHdd (visibility: PUBLIC, simpleName: AvailableHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableHdd (visibility: PUBLIC, simpleName: AvailableHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

    This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private static final AvailableHdd INSTANCE = new AvailableHdd(); - - /** - * 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 AvailableHdd.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_Host = new PParameter("Host", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); - - private final PParameter parameter_Hdd = new PParameter("Hdd", "java.lang.Integer", new JavaTransitiveInstancesKey(java.lang.Integer.class), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_Host, parameter_Hdd); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableHdd"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("Host","Hdd"); - } - - @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_Host = body.getOrCreateVariableByName("Host"); - PVariable var_Hdd = body.getOrCreateVariableByName("Hdd"); - PVariable var_TotalHdd = body.getOrCreateVariableByName("TotalHdd"); - PVariable var_RequiredHdd = body.getOrCreateVariableByName("RequiredHdd"); - PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); - PVariable var___1_ = body.getOrCreateVariableByName("_<1>"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); - new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Hdd), new JavaTransitiveInstancesKey(java.lang.Integer.class)); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Host, parameter_Host), - new ExportedParameter(body, var_Hdd, parameter_Hdd) - )); - // find totalHdd(Host, TotalHdd) - new PositivePatternCall(body, Tuples.flatTupleOf(var_Host, var_TotalHdd), TotalHdd.instance().getInternalQueryRepresentation()); - // RequiredHdd == sum find hddRequirement(Host, _, #_) - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new AggregatorConstraint(new sum().getAggregatorLogic(Integer.class), body, Tuples.flatTupleOf(var_Host, var___0_, var___1_), HddRequirement.instance().getInternalQueryRepresentation(), var__virtual_0_, 2); - new Equality(body, var_RequiredHdd, var__virtual_0_); - // Hdd == eval(TotalHdd - RequiredHdd) - PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); - new ExpressionEvaluation(body, new IExpressionEvaluator() { - - @Override - public String getShortDescription() { - return "Expression evaluation from pattern availableHdd"; - } - - @Override - public Iterable getInputParameterNames() { - return Arrays.asList("RequiredHdd", "TotalHdd");} - - @Override - public Object evaluateExpression(IValueProvider provider) throws Exception { - Integer RequiredHdd = (Integer) provider.getValue("RequiredHdd"); - Integer TotalHdd = (Integer) provider.getValue("TotalHdd"); - return evaluateExpression_1_1(RequiredHdd, TotalHdd); - } - }, var__virtual_1_ ); - new Equality(body, var_Hdd, var__virtual_1_); - bodies.add(body); - } - { - PAnnotation annotation = new PAnnotation("QueryBasedFeature"); - annotation.addAttribute("feature", "availableHdd"); - addAnnotation(annotation); - } - return bodies; - } - } - - private static int evaluateExpression_1_1(final Integer RequiredHdd, final Integer TotalHdd) { - return ((TotalHdd).intValue() - (RequiredHdd).intValue()); - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AvailableMemory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AvailableMemory.java deleted file mode 100644 index 930a24ba..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AvailableMemory.java +++ /dev/null @@ -1,743 +0,0 @@ -/** - * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql - */ -package hu.bme.mit.inf.dslreasoner.domains.cps.queries; - -import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalMemory; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.MemoryRequirement; -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.aggregators.sum; -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.IExpressionEvaluator; -import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.AggregatorConstraint; -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.ExpressionEvaluation; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

    Original source: - *

    - *         {@literal @}QueryBasedFeature(feature = "availableMemory")
    - *         pattern availableMemory(Host : HostInstance, Memory : java Integer) {
    - *         	find totalMemory(Host, TotalMemory);
    - *         	RequiredMemory == sum find memoryRequirement(Host, _, #_);
    - *         	Memory == eval(TotalMemory - RequiredMemory);
    - *         }
    - * 
    - * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class AvailableMemory extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableMemory 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 HostInstance fHost; - - private Integer fMemory; - - private static List parameterNames = makeImmutableList("Host", "Memory"); - - private Match(final HostInstance pHost, final Integer pMemory) { - this.fHost = pHost; - this.fMemory = pMemory; - } - - @Override - public Object get(final String parameterName) { - if ("Host".equals(parameterName)) return this.fHost; - if ("Memory".equals(parameterName)) return this.fMemory; - return null; - } - - public HostInstance getHost() { - return this.fHost; - } - - public Integer getMemory() { - return this.fMemory; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("Host".equals(parameterName) ) { - this.fHost = (HostInstance) newValue; - return true; - } - if ("Memory".equals(parameterName) ) { - this.fMemory = (Integer) newValue; - return true; - } - return false; - } - - public void setHost(final HostInstance pHost) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fHost = pHost; - } - - public void setMemory(final Integer pMemory) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fMemory = pMemory; - } - - @Override - public String patternName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableMemory"; - } - - @Override - public List parameterNames() { - return AvailableMemory.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fHost, fMemory}; - } - - @Override - public AvailableMemory.Match toImmutable() { - return isMutable() ? newMatch(fHost, fMemory) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"Host\"=" + prettyPrintValue(fHost) + ", "); - result.append("\"Memory\"=" + prettyPrintValue(fMemory)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fHost, fMemory); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof AvailableMemory.Match)) { - AvailableMemory.Match other = (AvailableMemory.Match) obj; - return Objects.equals(fHost, other.fHost) && Objects.equals(fMemory, other.fMemory); - } 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 AvailableMemory specification() { - return AvailableMemory.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 AvailableMemory.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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static AvailableMemory.Match newMutableMatch(final HostInstance pHost, final Integer pMemory) { - return new Mutable(pHost, pMemory); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return the (partial) match object. - * - */ - public static AvailableMemory.Match newMatch(final HostInstance pHost, final Integer pMemory) { - return new Immutable(pHost, pMemory); - } - - private static final class Mutable extends AvailableMemory.Match { - Mutable(final HostInstance pHost, final Integer pMemory) { - super(pHost, pMemory); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends AvailableMemory.Match { - Immutable(final HostInstance pHost, final Integer pMemory) { - super(pHost, pMemory); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableMemory pattern, - * providing pattern-specific query methods. - * - *

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

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

    Original source: - *

    -   * {@literal @}QueryBasedFeature(feature = "availableMemory")
    -   * pattern availableMemory(Host : HostInstance, Memory : java Integer) {
    -   * 	find totalMemory(Host, TotalMemory);
    -   * 	RequiredMemory == sum find memoryRequirement(Host, _, #_);
    -   * 	Memory == eval(TotalMemory - RequiredMemory);
    -   * }
    -   * 
    - * - * @see Match - * @see AvailableMemory - * - */ - 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 AvailableMemory.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 AvailableMemory.Matcher create() { - return new Matcher(); - } - - private static final int POSITION_HOST = 0; - - private static final int POSITION_MEMORY = 1; - - private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(AvailableMemory.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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final HostInstance pHost, final Integer pMemory) { - return rawStreamAllMatches(new Object[]{pHost, pMemory}).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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final HostInstance pHost, final Integer pMemory) { - return rawStreamAllMatches(new Object[]{pHost, pMemory}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final HostInstance pHost, final Integer pMemory) { - return rawGetOneArbitraryMatch(new Object[]{pHost, pMemory}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final HostInstance pHost, final Integer pMemory) { - return rawHasMatch(new Object[]{pHost, pMemory}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final HostInstance pHost, final Integer pMemory) { - return rawCountMatches(new Object[]{pHost, pMemory}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, 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 HostInstance pHost, final Integer pMemory, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pHost, pMemory}, 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return the (partial) match object. - * - */ - public AvailableMemory.Match newMatch(final HostInstance pHost, final Integer pMemory) { - return AvailableMemory.Match.newMatch(pHost, pMemory); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfHost(final Object[] parameters) { - return rawStreamAllValues(POSITION_HOST, parameters).map(HostInstance.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost() { - return rawStreamAllValuesOfHost(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfHost() { - return rawStreamAllValuesOfHost(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - *

    - * 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 streamAllValuesOfHost(final AvailableMemory.Match partialMatch) { - return rawStreamAllValuesOfHost(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - *

    - * 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 streamAllValuesOfHost(final Integer pMemory) { - return rawStreamAllValuesOfHost(new Object[]{null, pMemory}); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost(final AvailableMemory.Match partialMatch) { - return rawStreamAllValuesOfHost(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost(final Integer pMemory) { - return rawStreamAllValuesOfHost(new Object[]{null, pMemory}).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfMemory(final Object[] parameters) { - return rawStreamAllValues(POSITION_MEMORY, parameters).map(Integer.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfMemory() { - return rawStreamAllValuesOfMemory(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfMemory() { - return rawStreamAllValuesOfMemory(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - *

    - * 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 streamAllValuesOfMemory(final AvailableMemory.Match partialMatch) { - return rawStreamAllValuesOfMemory(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - *

    - * 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 streamAllValuesOfMemory(final HostInstance pHost) { - return rawStreamAllValuesOfMemory(new Object[]{pHost, null}); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfMemory(final AvailableMemory.Match partialMatch) { - return rawStreamAllValuesOfMemory(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfMemory(final HostInstance pHost) { - return rawStreamAllValuesOfMemory(new Object[]{pHost, null}).collect(Collectors.toSet()); - } - - @Override - protected AvailableMemory.Match tupleToMatch(final Tuple t) { - try { - return AvailableMemory.Match.newMatch((HostInstance) t.get(POSITION_HOST), (Integer) t.get(POSITION_MEMORY)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected AvailableMemory.Match arrayToMatch(final Object[] match) { - try { - return AvailableMemory.Match.newMatch((HostInstance) match[POSITION_HOST], (Integer) match[POSITION_MEMORY]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected AvailableMemory.Match arrayToMatchMutable(final Object[] match) { - try { - return AvailableMemory.Match.newMutableMatch((HostInstance) match[POSITION_HOST], (Integer) match[POSITION_MEMORY]); - } 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 AvailableMemory.instance(); - } - } - - private AvailableMemory() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static AvailableMemory instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected AvailableMemory.Matcher instantiate(final ViatraQueryEngine engine) { - return AvailableMemory.Matcher.on(engine); - } - - @Override - public AvailableMemory.Matcher instantiate() { - return AvailableMemory.Matcher.create(); - } - - @Override - public AvailableMemory.Match newEmptyMatch() { - return AvailableMemory.Match.newEmptyMatch(); - } - - @Override - public AvailableMemory.Match newMatch(final Object... parameters) { - return AvailableMemory.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance) parameters[0], (java.lang.Integer) parameters[1]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableMemory (visibility: PUBLIC, simpleName: AvailableMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableMemory (visibility: PUBLIC, simpleName: AvailableMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

    This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private static final AvailableMemory INSTANCE = new AvailableMemory(); - - /** - * 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 AvailableMemory.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_Host = new PParameter("Host", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); - - private final PParameter parameter_Memory = new PParameter("Memory", "java.lang.Integer", new JavaTransitiveInstancesKey(java.lang.Integer.class), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_Host, parameter_Memory); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableMemory"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("Host","Memory"); - } - - @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_Host = body.getOrCreateVariableByName("Host"); - PVariable var_Memory = body.getOrCreateVariableByName("Memory"); - PVariable var_TotalMemory = body.getOrCreateVariableByName("TotalMemory"); - PVariable var_RequiredMemory = body.getOrCreateVariableByName("RequiredMemory"); - PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); - PVariable var___1_ = body.getOrCreateVariableByName("_<1>"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); - new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Memory), new JavaTransitiveInstancesKey(java.lang.Integer.class)); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Host, parameter_Host), - new ExportedParameter(body, var_Memory, parameter_Memory) - )); - // find totalMemory(Host, TotalMemory) - new PositivePatternCall(body, Tuples.flatTupleOf(var_Host, var_TotalMemory), TotalMemory.instance().getInternalQueryRepresentation()); - // RequiredMemory == sum find memoryRequirement(Host, _, #_) - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new AggregatorConstraint(new sum().getAggregatorLogic(Integer.class), body, Tuples.flatTupleOf(var_Host, var___0_, var___1_), MemoryRequirement.instance().getInternalQueryRepresentation(), var__virtual_0_, 2); - new Equality(body, var_RequiredMemory, var__virtual_0_); - // Memory == eval(TotalMemory - RequiredMemory) - PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); - new ExpressionEvaluation(body, new IExpressionEvaluator() { - - @Override - public String getShortDescription() { - return "Expression evaluation from pattern availableMemory"; - } - - @Override - public Iterable getInputParameterNames() { - return Arrays.asList("RequiredMemory", "TotalMemory");} - - @Override - public Object evaluateExpression(IValueProvider provider) throws Exception { - Integer RequiredMemory = (Integer) provider.getValue("RequiredMemory"); - Integer TotalMemory = (Integer) provider.getValue("TotalMemory"); - return evaluateExpression_1_1(RequiredMemory, TotalMemory); - } - }, var__virtual_1_ ); - new Equality(body, var_Memory, var__virtual_1_); - bodies.add(body); - } - { - PAnnotation annotation = new PAnnotation("QueryBasedFeature"); - annotation.addAttribute("feature", "availableMemory"); - addAnnotation(annotation); - } - return bodies; - } - } - - private static int evaluateExpression_1_1(final Integer RequiredMemory, final Integer TotalMemory) { - return ((TotalMemory).intValue() - (RequiredMemory).intValue()); - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeHddMetric.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeHddMetric.java index 59d4ad27..bc38b60b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeHddMetric.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeHddMetric.java @@ -43,6 +43,8 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; * *

    Original source: *

    + *         // Free HDD
    + *         
      *         pattern averageFreeHddMetric(Average : java Double) {
      *         	Average == avg find freeHddPercentage(_, #_);
      *         }
    @@ -226,6 +228,8 @@ public final class AverageFreeHddMetric extends BaseGeneratedEMFQuerySpecificati
        * 
        * 

    Original source: *

    +   * // Free HDD
    +   * 
        * pattern averageFreeHddMetric(Average : java Double) {
        * 	Average == avg find freeHddPercentage(_, #_);
        * }
    diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeMemoryMetric.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeMemoryMetric.java
    index a0d087f4..98974ea5 100644
    --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeMemoryMetric.java
    +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeMemoryMetric.java
    @@ -43,6 +43,12 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
      * 
      * 

    Original source: *

    + *         //
    + *         // Metrics
    + *         //
    + *         
    + *         // Free memory
    + *         
      *         pattern averageFreeMemoryMetric(Average : java Double) {
      *         	Average == avg find freeMemoryPercentage(_, #_);
      *         }
    @@ -226,6 +232,12 @@ public final class AverageFreeMemoryMetric extends BaseGeneratedEMFQuerySpecific
        * 
        * 

    Original source: *

    +   * //
    +   * // Metrics
    +   * //
    +   * 
    +   * // Free memory
    +   * 
        * pattern averageFreeMemoryMetric(Average : java Double) {
        * 	Average == avg find freeMemoryPercentage(_, #_);
        * }
    diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CostMetric.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CostMetric.java
    index 4d8ca4cc..bf886ec0 100644
    --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CostMetric.java
    +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CostMetric.java
    @@ -43,6 +43,8 @@ import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
      * 
      * 

    Original source: *

    + *         // Total cost
    + *         
      *         pattern costMetric(Cost : java Integer) {
      *         	Cost == sum find cpsCost(_, #_);
      *         }
    @@ -226,6 +228,8 @@ public final class CostMetric extends BaseGeneratedEMFQuerySpecificationOriginal source:
        * 
    +   * // Total cost
    +   * 
        * pattern costMetric(Cost : java Integer) {
        * 	Cost == sum find cpsCost(_, #_);
        * }
    diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsApplications.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsApplications.java
    deleted file mode 100644
    index 2c20b38e..00000000
    --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsApplications.java
    +++ /dev/null
    @@ -1,705 +0,0 @@
    -/**
    - * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql
    - */
    -package hu.bme.mit.inf.dslreasoner.domains.cps.queries;
    -
    -import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance;
    -import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem;
    -import java.util.Arrays;
    -import java.util.Collection;
    -import java.util.LinkedHashSet;
    -import java.util.List;
    -import java.util.Objects;
    -import java.util.Optional;
    -import java.util.Set;
    -import java.util.function.Consumer;
    -import java.util.stream.Collectors;
    -import java.util.stream.Stream;
    -import org.apache.log4j.Logger;
    -import org.eclipse.emf.ecore.EClass;
    -import org.eclipse.viatra.query.runtime.api.IPatternMatch;
    -import org.eclipse.viatra.query.runtime.api.IQuerySpecification;
    -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine;
    -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery;
    -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification;
    -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher;
    -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch;
    -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey;
    -import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey;
    -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint;
    -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody;
    -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable;
    -import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation;
    -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality;
    -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter;
    -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint;
    -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter;
    -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection;
    -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility;
    -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple;
    -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples;
    -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil;
    -
    -/**
    - * A pattern-specific query specification that can instantiate Matcher in a type-safe way.
    - * 
    - * 

    Original source: - *

    - *         {@literal @}QueryBasedFeature(feature = "applications")
    - *         pattern cpsApplications(Cps : CyberPhysicalSystem, AppInstance : ApplicationInstance) {
    - *         	CyberPhysicalSystem.applicationTypes.instances(Cps, AppInstance);
    - *         }
    - * 
    - * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class CpsApplications extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsApplications 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 CyberPhysicalSystem fCps; - - private ApplicationInstance fAppInstance; - - private static List parameterNames = makeImmutableList("Cps", "AppInstance"); - - private Match(final CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance) { - this.fCps = pCps; - this.fAppInstance = pAppInstance; - } - - @Override - public Object get(final String parameterName) { - if ("Cps".equals(parameterName)) return this.fCps; - if ("AppInstance".equals(parameterName)) return this.fAppInstance; - return null; - } - - public CyberPhysicalSystem getCps() { - return this.fCps; - } - - public ApplicationInstance getAppInstance() { - return this.fAppInstance; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("Cps".equals(parameterName) ) { - this.fCps = (CyberPhysicalSystem) newValue; - return true; - } - if ("AppInstance".equals(parameterName) ) { - this.fAppInstance = (ApplicationInstance) newValue; - return true; - } - return false; - } - - public void setCps(final CyberPhysicalSystem pCps) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fCps = pCps; - } - - public void setAppInstance(final ApplicationInstance pAppInstance) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fAppInstance = pAppInstance; - } - - @Override - public String patternName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsApplications"; - } - - @Override - public List parameterNames() { - return CpsApplications.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fCps, fAppInstance}; - } - - @Override - public CpsApplications.Match toImmutable() { - return isMutable() ? newMatch(fCps, fAppInstance) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"Cps\"=" + prettyPrintValue(fCps) + ", "); - result.append("\"AppInstance\"=" + prettyPrintValue(fAppInstance)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fCps, fAppInstance); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof CpsApplications.Match)) { - CpsApplications.Match other = (CpsApplications.Match) obj; - return Objects.equals(fCps, other.fCps) && Objects.equals(fAppInstance, other.fAppInstance); - } 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 CpsApplications specification() { - return CpsApplications.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 CpsApplications.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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pAppInstance the fixed value of pattern parameter AppInstance, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static CpsApplications.Match newMutableMatch(final CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance) { - return new Mutable(pCps, pAppInstance); - } - - /** - * 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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pAppInstance the fixed value of pattern parameter AppInstance, or null if not bound. - * @return the (partial) match object. - * - */ - public static CpsApplications.Match newMatch(final CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance) { - return new Immutable(pCps, pAppInstance); - } - - private static final class Mutable extends CpsApplications.Match { - Mutable(final CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance) { - super(pCps, pAppInstance); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends CpsApplications.Match { - Immutable(final CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance) { - super(pCps, pAppInstance); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsApplications pattern, - * providing pattern-specific query methods. - * - *

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

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

    Original source: - *

    -   * {@literal @}QueryBasedFeature(feature = "applications")
    -   * pattern cpsApplications(Cps : CyberPhysicalSystem, AppInstance : ApplicationInstance) {
    -   * 	CyberPhysicalSystem.applicationTypes.instances(Cps, AppInstance);
    -   * }
    -   * 
    - * - * @see Match - * @see CpsApplications - * - */ - 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 CpsApplications.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 CpsApplications.Matcher create() { - return new Matcher(); - } - - private static final int POSITION_CPS = 0; - - private static final int POSITION_APPINSTANCE = 1; - - private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(CpsApplications.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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pAppInstance the fixed value of pattern parameter AppInstance, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance) { - return rawStreamAllMatches(new Object[]{pCps, pAppInstance}).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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pAppInstance the fixed value of pattern parameter AppInstance, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance) { - return rawStreamAllMatches(new Object[]{pCps, pAppInstance}); - } - - /** - * 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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pAppInstance the fixed value of pattern parameter AppInstance, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance) { - return rawGetOneArbitraryMatch(new Object[]{pCps, pAppInstance}); - } - - /** - * 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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pAppInstance the fixed value of pattern parameter AppInstance, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance) { - return rawHasMatch(new Object[]{pCps, pAppInstance}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pAppInstance the fixed value of pattern parameter AppInstance, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance) { - return rawCountMatches(new Object[]{pCps, pAppInstance}); - } - - /** - * 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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pAppInstance the fixed value of pattern parameter AppInstance, 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 CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pCps, pAppInstance}, 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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pAppInstance the fixed value of pattern parameter AppInstance, or null if not bound. - * @return the (partial) match object. - * - */ - public CpsApplications.Match newMatch(final CyberPhysicalSystem pCps, final ApplicationInstance pAppInstance) { - return CpsApplications.Match.newMatch(pCps, pAppInstance); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfCps(final Object[] parameters) { - return rawStreamAllValues(POSITION_CPS, parameters).map(CyberPhysicalSystem.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfCps() { - return rawStreamAllValuesOfCps(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfCps() { - return rawStreamAllValuesOfCps(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - *

    - * 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 streamAllValuesOfCps(final CpsApplications.Match partialMatch) { - return rawStreamAllValuesOfCps(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - *

    - * 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 streamAllValuesOfCps(final ApplicationInstance pAppInstance) { - return rawStreamAllValuesOfCps(new Object[]{null, pAppInstance}); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfCps(final CpsApplications.Match partialMatch) { - return rawStreamAllValuesOfCps(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfCps(final ApplicationInstance pAppInstance) { - return rawStreamAllValuesOfCps(new Object[]{null, pAppInstance}).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for AppInstance. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfAppInstance(final Object[] parameters) { - return rawStreamAllValues(POSITION_APPINSTANCE, parameters).map(ApplicationInstance.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for AppInstance. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfAppInstance() { - return rawStreamAllValuesOfAppInstance(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for AppInstance. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfAppInstance() { - return rawStreamAllValuesOfAppInstance(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for AppInstance. - *

    - * 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 streamAllValuesOfAppInstance(final CpsApplications.Match partialMatch) { - return rawStreamAllValuesOfAppInstance(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for AppInstance. - *

    - * 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 streamAllValuesOfAppInstance(final CyberPhysicalSystem pCps) { - return rawStreamAllValuesOfAppInstance(new Object[]{pCps, null}); - } - - /** - * Retrieve the set of values that occur in matches for AppInstance. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfAppInstance(final CpsApplications.Match partialMatch) { - return rawStreamAllValuesOfAppInstance(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for AppInstance. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfAppInstance(final CyberPhysicalSystem pCps) { - return rawStreamAllValuesOfAppInstance(new Object[]{pCps, null}).collect(Collectors.toSet()); - } - - @Override - protected CpsApplications.Match tupleToMatch(final Tuple t) { - try { - return CpsApplications.Match.newMatch((CyberPhysicalSystem) t.get(POSITION_CPS), (ApplicationInstance) t.get(POSITION_APPINSTANCE)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected CpsApplications.Match arrayToMatch(final Object[] match) { - try { - return CpsApplications.Match.newMatch((CyberPhysicalSystem) match[POSITION_CPS], (ApplicationInstance) match[POSITION_APPINSTANCE]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected CpsApplications.Match arrayToMatchMutable(final Object[] match) { - try { - return CpsApplications.Match.newMutableMatch((CyberPhysicalSystem) match[POSITION_CPS], (ApplicationInstance) match[POSITION_APPINSTANCE]); - } 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 CpsApplications.instance(); - } - } - - private CpsApplications() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static CpsApplications instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected CpsApplications.Matcher instantiate(final ViatraQueryEngine engine) { - return CpsApplications.Matcher.on(engine); - } - - @Override - public CpsApplications.Matcher instantiate() { - return CpsApplications.Matcher.create(); - } - - @Override - public CpsApplications.Match newEmptyMatch() { - return CpsApplications.Match.newEmptyMatch(); - } - - @Override - public CpsApplications.Match newMatch(final Object... parameters) { - return CpsApplications.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem) parameters[0], (hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance) parameters[1]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsApplications (visibility: PUBLIC, simpleName: CpsApplications, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsApplications, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsApplications (visibility: PUBLIC, simpleName: CpsApplications, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsApplications, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

    This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private static final CpsApplications INSTANCE = new CpsApplications(); - - /** - * 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 CpsApplications.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_Cps = new PParameter("Cps", "hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "CyberPhysicalSystem")), PParameterDirection.INOUT); - - private final PParameter parameter_AppInstance = new PParameter("AppInstance", "hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ApplicationInstance")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_Cps, parameter_AppInstance); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsApplications"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("Cps","AppInstance"); - } - - @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_Cps = body.getOrCreateVariableByName("Cps"); - PVariable var_AppInstance = body.getOrCreateVariableByName("AppInstance"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Cps), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "CyberPhysicalSystem"))); - new TypeConstraint(body, Tuples.flatTupleOf(var_AppInstance), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Cps, parameter_Cps), - new ExportedParameter(body, var_AppInstance, parameter_AppInstance) - )); - // CyberPhysicalSystem.applicationTypes.instances(Cps, AppInstance) - new TypeConstraint(body, Tuples.flatTupleOf(var_Cps), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "CyberPhysicalSystem"))); - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Cps, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "CyberPhysicalSystem", "applicationTypes"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationType"))); - PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationType", "instances"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); - new Equality(body, var__virtual_1_, var_AppInstance); - bodies.add(body); - } - { - PAnnotation annotation = new PAnnotation("QueryBasedFeature"); - annotation.addAttribute("feature", "applications"); - addAnnotation(annotation); - } - return bodies; - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsCost.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsCost.java index 169a30e5..fc90ef12 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsCost.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsCost.java @@ -4,7 +4,7 @@ package hu.bme.mit.inf.dslreasoner.domains.cps.queries; import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsApplications; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsApplications; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.HostInstanceCost; import java.util.Arrays; import java.util.Collection; diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsHosts.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsHosts.java deleted file mode 100644 index e1abf758..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsHosts.java +++ /dev/null @@ -1,705 +0,0 @@ -/** - * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql - */ -package hu.bme.mit.inf.dslreasoner.domains.cps.queries; - -import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; -import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.viatra.query.runtime.api.IPatternMatch; -import org.eclipse.viatra.query.runtime.api.IQuerySpecification; -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; -import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; -import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; -import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; -import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; -import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

    Original source: - *

    - *         {@literal @}QueryBasedFeature(feature = "hosts")
    - *         pattern cpsHosts(Cps : CyberPhysicalSystem, HostInstance : HostInstance) {
    - *         	CyberPhysicalSystem.hostTypes.instances(Cps, HostInstance);
    - *         }
    - * 
    - * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class CpsHosts extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsHosts 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 CyberPhysicalSystem fCps; - - private HostInstance fHostInstance; - - private static List parameterNames = makeImmutableList("Cps", "HostInstance"); - - private Match(final CyberPhysicalSystem pCps, final HostInstance pHostInstance) { - this.fCps = pCps; - this.fHostInstance = pHostInstance; - } - - @Override - public Object get(final String parameterName) { - if ("Cps".equals(parameterName)) return this.fCps; - if ("HostInstance".equals(parameterName)) return this.fHostInstance; - return null; - } - - public CyberPhysicalSystem getCps() { - return this.fCps; - } - - public HostInstance getHostInstance() { - return this.fHostInstance; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("Cps".equals(parameterName) ) { - this.fCps = (CyberPhysicalSystem) newValue; - return true; - } - if ("HostInstance".equals(parameterName) ) { - this.fHostInstance = (HostInstance) newValue; - return true; - } - return false; - } - - public void setCps(final CyberPhysicalSystem pCps) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fCps = pCps; - } - - public void setHostInstance(final HostInstance pHostInstance) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fHostInstance = pHostInstance; - } - - @Override - public String patternName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsHosts"; - } - - @Override - public List parameterNames() { - return CpsHosts.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fCps, fHostInstance}; - } - - @Override - public CpsHosts.Match toImmutable() { - return isMutable() ? newMatch(fCps, fHostInstance) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"Cps\"=" + prettyPrintValue(fCps) + ", "); - result.append("\"HostInstance\"=" + prettyPrintValue(fHostInstance)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fCps, fHostInstance); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof CpsHosts.Match)) { - CpsHosts.Match other = (CpsHosts.Match) obj; - return Objects.equals(fCps, other.fCps) && Objects.equals(fHostInstance, other.fHostInstance); - } 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 CpsHosts specification() { - return CpsHosts.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 CpsHosts.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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static CpsHosts.Match newMutableMatch(final CyberPhysicalSystem pCps, final HostInstance pHostInstance) { - return new Mutable(pCps, pHostInstance); - } - - /** - * 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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. - * @return the (partial) match object. - * - */ - public static CpsHosts.Match newMatch(final CyberPhysicalSystem pCps, final HostInstance pHostInstance) { - return new Immutable(pCps, pHostInstance); - } - - private static final class Mutable extends CpsHosts.Match { - Mutable(final CyberPhysicalSystem pCps, final HostInstance pHostInstance) { - super(pCps, pHostInstance); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends CpsHosts.Match { - Immutable(final CyberPhysicalSystem pCps, final HostInstance pHostInstance) { - super(pCps, pHostInstance); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsHosts pattern, - * providing pattern-specific query methods. - * - *

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

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

    Original source: - *

    -   * {@literal @}QueryBasedFeature(feature = "hosts")
    -   * pattern cpsHosts(Cps : CyberPhysicalSystem, HostInstance : HostInstance) {
    -   * 	CyberPhysicalSystem.hostTypes.instances(Cps, HostInstance);
    -   * }
    -   * 
    - * - * @see Match - * @see CpsHosts - * - */ - 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 CpsHosts.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 CpsHosts.Matcher create() { - return new Matcher(); - } - - private static final int POSITION_CPS = 0; - - private static final int POSITION_HOSTINSTANCE = 1; - - private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(CpsHosts.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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final CyberPhysicalSystem pCps, final HostInstance pHostInstance) { - return rawStreamAllMatches(new Object[]{pCps, pHostInstance}).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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final CyberPhysicalSystem pCps, final HostInstance pHostInstance) { - return rawStreamAllMatches(new Object[]{pCps, pHostInstance}); - } - - /** - * 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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final CyberPhysicalSystem pCps, final HostInstance pHostInstance) { - return rawGetOneArbitraryMatch(new Object[]{pCps, pHostInstance}); - } - - /** - * 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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final CyberPhysicalSystem pCps, final HostInstance pHostInstance) { - return rawHasMatch(new Object[]{pCps, pHostInstance}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final CyberPhysicalSystem pCps, final HostInstance pHostInstance) { - return rawCountMatches(new Object[]{pCps, pHostInstance}); - } - - /** - * 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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pHostInstance the fixed value of pattern parameter HostInstance, 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 CyberPhysicalSystem pCps, final HostInstance pHostInstance, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pCps, pHostInstance}, 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 pCps the fixed value of pattern parameter Cps, or null if not bound. - * @param pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. - * @return the (partial) match object. - * - */ - public CpsHosts.Match newMatch(final CyberPhysicalSystem pCps, final HostInstance pHostInstance) { - return CpsHosts.Match.newMatch(pCps, pHostInstance); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfCps(final Object[] parameters) { - return rawStreamAllValues(POSITION_CPS, parameters).map(CyberPhysicalSystem.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfCps() { - return rawStreamAllValuesOfCps(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfCps() { - return rawStreamAllValuesOfCps(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - *

    - * 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 streamAllValuesOfCps(final CpsHosts.Match partialMatch) { - return rawStreamAllValuesOfCps(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - *

    - * 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 streamAllValuesOfCps(final HostInstance pHostInstance) { - return rawStreamAllValuesOfCps(new Object[]{null, pHostInstance}); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfCps(final CpsHosts.Match partialMatch) { - return rawStreamAllValuesOfCps(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Cps. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfCps(final HostInstance pHostInstance) { - return rawStreamAllValuesOfCps(new Object[]{null, pHostInstance}).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for HostInstance. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfHostInstance(final Object[] parameters) { - return rawStreamAllValues(POSITION_HOSTINSTANCE, parameters).map(HostInstance.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for HostInstance. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHostInstance() { - return rawStreamAllValuesOfHostInstance(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for HostInstance. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfHostInstance() { - return rawStreamAllValuesOfHostInstance(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for HostInstance. - *

    - * 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 streamAllValuesOfHostInstance(final CpsHosts.Match partialMatch) { - return rawStreamAllValuesOfHostInstance(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for HostInstance. - *

    - * 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 streamAllValuesOfHostInstance(final CyberPhysicalSystem pCps) { - return rawStreamAllValuesOfHostInstance(new Object[]{pCps, null}); - } - - /** - * Retrieve the set of values that occur in matches for HostInstance. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHostInstance(final CpsHosts.Match partialMatch) { - return rawStreamAllValuesOfHostInstance(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for HostInstance. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHostInstance(final CyberPhysicalSystem pCps) { - return rawStreamAllValuesOfHostInstance(new Object[]{pCps, null}).collect(Collectors.toSet()); - } - - @Override - protected CpsHosts.Match tupleToMatch(final Tuple t) { - try { - return CpsHosts.Match.newMatch((CyberPhysicalSystem) t.get(POSITION_CPS), (HostInstance) t.get(POSITION_HOSTINSTANCE)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected CpsHosts.Match arrayToMatch(final Object[] match) { - try { - return CpsHosts.Match.newMatch((CyberPhysicalSystem) match[POSITION_CPS], (HostInstance) match[POSITION_HOSTINSTANCE]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected CpsHosts.Match arrayToMatchMutable(final Object[] match) { - try { - return CpsHosts.Match.newMutableMatch((CyberPhysicalSystem) match[POSITION_CPS], (HostInstance) match[POSITION_HOSTINSTANCE]); - } 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 CpsHosts.instance(); - } - } - - private CpsHosts() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static CpsHosts instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected CpsHosts.Matcher instantiate(final ViatraQueryEngine engine) { - return CpsHosts.Matcher.on(engine); - } - - @Override - public CpsHosts.Matcher instantiate() { - return CpsHosts.Matcher.create(); - } - - @Override - public CpsHosts.Match newEmptyMatch() { - return CpsHosts.Match.newEmptyMatch(); - } - - @Override - public CpsHosts.Match newMatch(final Object... parameters) { - return CpsHosts.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem) parameters[0], (hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance) parameters[1]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsHosts (visibility: PUBLIC, simpleName: CpsHosts, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsHosts, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsHosts (visibility: PUBLIC, simpleName: CpsHosts, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsHosts, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

    This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private static final CpsHosts INSTANCE = new CpsHosts(); - - /** - * 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 CpsHosts.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_Cps = new PParameter("Cps", "hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "CyberPhysicalSystem")), PParameterDirection.INOUT); - - private final PParameter parameter_HostInstance = new PParameter("HostInstance", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_Cps, parameter_HostInstance); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsHosts"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("Cps","HostInstance"); - } - - @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_Cps = body.getOrCreateVariableByName("Cps"); - PVariable var_HostInstance = body.getOrCreateVariableByName("HostInstance"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Cps), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "CyberPhysicalSystem"))); - new TypeConstraint(body, Tuples.flatTupleOf(var_HostInstance), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Cps, parameter_Cps), - new ExportedParameter(body, var_HostInstance, parameter_HostInstance) - )); - // CyberPhysicalSystem.hostTypes.instances(Cps, HostInstance) - new TypeConstraint(body, Tuples.flatTupleOf(var_Cps), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "CyberPhysicalSystem"))); - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Cps, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "CyberPhysicalSystem", "hostTypes"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); - PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostType", "instances"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); - new Equality(body, var__virtual_1_, var_HostInstance); - bodies.add(body); - } - { - PAnnotation annotation = new PAnnotation("QueryBasedFeature"); - annotation.addAttribute("feature", "hosts"); - addAnnotation(annotation); - } - return bodies; - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.java index 916f35f7..c889fbe0 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.java @@ -3,22 +3,22 @@ */ package hu.bme.mit.inf.dslreasoner.domains.cps.queries; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.Allocate; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AllocationWithoutResourceRequirement; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableHdd; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableMemory; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeHddMetric; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeMemoryMetric; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CostMetric; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsApplications; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsCost; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsHosts; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.GuidanceObjective; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.InstanceDoesNotSatisfyRequirement; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableHdd; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableMemory; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RedundantInstancesOnSameHost; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RemoveHostInstance; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RequirementNotSatisfied; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalHdd; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalMemory; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.UnallocateAppInstance; import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; @@ -30,12 +30,7 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; * in order to achieve better performance than one-by-one on-demand matcher initialization. * *

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

      - *
    • cpsApplications
    • - *
    • cpsHosts
    • - *
    • totalMemory
    • - *
    • totalHdd
    • - *
    • availableMemory
    • - *
    • availableHdd
    • + *
    • resourceRequirement
    • *
    • allocationWithoutResourceRequirement
    • *
    • notEnoughAvailableMemory
    • *
    • notEnoughAvailableHdd
    • @@ -46,6 +41,11 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; *
    • averageFreeHddMetric
    • *
    • costMetric
    • *
    • cpsCost
    • + *
    • allocate
    • + *
    • unallocateAppInstance
    • + *
    • createHostInstance
    • + *
    • removeHostInstance
    • + *
    • guidanceObjective
    • *
    * * @see IQueryGroup @@ -70,12 +70,7 @@ public final class CpsQueries extends BaseGeneratedPatternGroup { private static CpsQueries INSTANCE; private CpsQueries() { - querySpecifications.add(CpsApplications.instance()); - querySpecifications.add(CpsHosts.instance()); - querySpecifications.add(TotalMemory.instance()); - querySpecifications.add(TotalHdd.instance()); - querySpecifications.add(AvailableMemory.instance()); - querySpecifications.add(AvailableHdd.instance()); + querySpecifications.add(ResourceRequirement.instance()); querySpecifications.add(AllocationWithoutResourceRequirement.instance()); querySpecifications.add(NotEnoughAvailableMemory.instance()); querySpecifications.add(NotEnoughAvailableHdd.instance()); @@ -86,54 +81,19 @@ public final class CpsQueries extends BaseGeneratedPatternGroup { querySpecifications.add(AverageFreeHddMetric.instance()); querySpecifications.add(CostMetric.instance()); querySpecifications.add(CpsCost.instance()); + querySpecifications.add(Allocate.instance()); + querySpecifications.add(UnallocateAppInstance.instance()); + querySpecifications.add(CreateHostInstance.instance()); + querySpecifications.add(RemoveHostInstance.instance()); + querySpecifications.add(GuidanceObjective.instance()); } - public CpsApplications getCpsApplications() { - return CpsApplications.instance(); + public ResourceRequirement getResourceRequirement() { + return ResourceRequirement.instance(); } - public CpsApplications.Matcher getCpsApplications(final ViatraQueryEngine engine) { - return CpsApplications.Matcher.on(engine); - } - - public CpsHosts getCpsHosts() { - return CpsHosts.instance(); - } - - public CpsHosts.Matcher getCpsHosts(final ViatraQueryEngine engine) { - return CpsHosts.Matcher.on(engine); - } - - public TotalMemory getTotalMemory() { - return TotalMemory.instance(); - } - - public TotalMemory.Matcher getTotalMemory(final ViatraQueryEngine engine) { - return TotalMemory.Matcher.on(engine); - } - - public TotalHdd getTotalHdd() { - return TotalHdd.instance(); - } - - public TotalHdd.Matcher getTotalHdd(final ViatraQueryEngine engine) { - return TotalHdd.Matcher.on(engine); - } - - public AvailableMemory getAvailableMemory() { - return AvailableMemory.instance(); - } - - public AvailableMemory.Matcher getAvailableMemory(final ViatraQueryEngine engine) { - return AvailableMemory.Matcher.on(engine); - } - - public AvailableHdd getAvailableHdd() { - return AvailableHdd.instance(); - } - - public AvailableHdd.Matcher getAvailableHdd(final ViatraQueryEngine engine) { - return AvailableHdd.Matcher.on(engine); + public ResourceRequirement.Matcher getResourceRequirement(final ViatraQueryEngine engine) { + return ResourceRequirement.Matcher.on(engine); } public AllocationWithoutResourceRequirement getAllocationWithoutResourceRequirement() { @@ -215,4 +175,44 @@ public final class CpsQueries extends BaseGeneratedPatternGroup { public CpsCost.Matcher getCpsCost(final ViatraQueryEngine engine) { return CpsCost.Matcher.on(engine); } + + public Allocate getAllocate() { + return Allocate.instance(); + } + + public Allocate.Matcher getAllocate(final ViatraQueryEngine engine) { + return Allocate.Matcher.on(engine); + } + + public UnallocateAppInstance getUnallocateAppInstance() { + return UnallocateAppInstance.instance(); + } + + public UnallocateAppInstance.Matcher getUnallocateAppInstance(final ViatraQueryEngine engine) { + return UnallocateAppInstance.Matcher.on(engine); + } + + public CreateHostInstance getCreateHostInstance() { + return CreateHostInstance.instance(); + } + + public CreateHostInstance.Matcher getCreateHostInstance(final ViatraQueryEngine engine) { + return CreateHostInstance.Matcher.on(engine); + } + + public RemoveHostInstance getRemoveHostInstance() { + return RemoveHostInstance.instance(); + } + + public RemoveHostInstance.Matcher getRemoveHostInstance(final ViatraQueryEngine engine) { + return RemoveHostInstance.Matcher.on(engine); + } + + public GuidanceObjective getGuidanceObjective() { + return GuidanceObjective.instance(); + } + + public GuidanceObjective.Matcher getGuidanceObjective(final ViatraQueryEngine engine) { + return GuidanceObjective.Matcher.on(engine); + } } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java new file mode 100644 index 00000000..f475c9e9 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java @@ -0,0 +1,553 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries; + +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.UnallocatedAppInstance; +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; +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 createHostInstance(HostType : HostType) {
    + *         	find unallocatedAppInstance(App);
    + *         	ApplicationInstance.type.requirements.hostType(App, HostType);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class CreateHostInstance extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.createHostInstance 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 HostType fHostType; + + private static List parameterNames = makeImmutableList("HostType"); + + private Match(final HostType pHostType) { + this.fHostType = pHostType; + } + + @Override + public Object get(final String parameterName) { + if ("HostType".equals(parameterName)) return this.fHostType; + return null; + } + + public HostType getHostType() { + return this.fHostType; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("HostType".equals(parameterName) ) { + this.fHostType = (HostType) newValue; + return true; + } + return false; + } + + public void setHostType(final HostType pHostType) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fHostType = pHostType; + } + + @Override + public String patternName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.createHostInstance"; + } + + @Override + public List parameterNames() { + return CreateHostInstance.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fHostType}; + } + + @Override + public CreateHostInstance.Match toImmutable() { + return isMutable() ? newMatch(fHostType) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"HostType\"=" + prettyPrintValue(fHostType)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fHostType); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof CreateHostInstance.Match)) { + CreateHostInstance.Match other = (CreateHostInstance.Match) obj; + return Objects.equals(fHostType, other.fHostType); + } 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 CreateHostInstance specification() { + return CreateHostInstance.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 CreateHostInstance.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 pHostType the fixed value of pattern parameter HostType, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static CreateHostInstance.Match newMutableMatch(final HostType pHostType) { + return new Mutable(pHostType); + } + + /** + * 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 pHostType the fixed value of pattern parameter HostType, or null if not bound. + * @return the (partial) match object. + * + */ + public static CreateHostInstance.Match newMatch(final HostType pHostType) { + return new Immutable(pHostType); + } + + private static final class Mutable extends CreateHostInstance.Match { + Mutable(final HostType pHostType) { + super(pHostType); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends CreateHostInstance.Match { + Immutable(final HostType pHostType) { + super(pHostType); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.createHostInstance 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 createHostInstance(HostType : HostType) {
    +   * 	find unallocatedAppInstance(App);
    +   * 	ApplicationInstance.type.requirements.hostType(App, HostType);
    +   * }
    +   * 
    + * + * @see Match + * @see CreateHostInstance + * + */ + 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 CreateHostInstance.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 CreateHostInstance.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_HOSTTYPE = 0; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(CreateHostInstance.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 pHostType the fixed value of pattern parameter HostType, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final HostType pHostType) { + return rawStreamAllMatches(new Object[]{pHostType}).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 pHostType the fixed value of pattern parameter HostType, or null if not bound. + * @return a stream of matches represented as a Match object. + * + */ + public Stream streamAllMatches(final HostType pHostType) { + return rawStreamAllMatches(new Object[]{pHostType}); + } + + /** + * 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 pHostType the fixed value of pattern parameter HostType, or null if not bound. + * @return a match represented as a Match object, or null if no match is found. + * + */ + public Optional getOneArbitraryMatch(final HostType pHostType) { + return rawGetOneArbitraryMatch(new Object[]{pHostType}); + } + + /** + * 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 pHostType the fixed value of pattern parameter HostType, or null if not bound. + * @return true if the input is a valid (partial) match of the pattern. + * + */ + public boolean hasMatch(final HostType pHostType) { + return rawHasMatch(new Object[]{pHostType}); + } + + /** + * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pHostType the fixed value of pattern parameter HostType, or null if not bound. + * @return the number of pattern matches found. + * + */ + public int countMatches(final HostType pHostType) { + return rawCountMatches(new Object[]{pHostType}); + } + + /** + * 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 pHostType the fixed value of pattern parameter HostType, 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 HostType pHostType, final Consumer processor) { + return rawForOneArbitraryMatch(new Object[]{pHostType}, 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 pHostType the fixed value of pattern parameter HostType, or null if not bound. + * @return the (partial) match object. + * + */ + public CreateHostInstance.Match newMatch(final HostType pHostType) { + return CreateHostInstance.Match.newMatch(pHostType); + } + + /** + * Retrieve the set of values that occur in matches for HostType. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfHostType(final Object[] parameters) { + return rawStreamAllValues(POSITION_HOSTTYPE, parameters).map(HostType.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for HostType. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfHostType() { + return rawStreamAllValuesOfHostType(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for HostType. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfHostType() { + return rawStreamAllValuesOfHostType(emptyArray()); + } + + @Override + protected CreateHostInstance.Match tupleToMatch(final Tuple t) { + try { + return CreateHostInstance.Match.newMatch((HostType) t.get(POSITION_HOSTTYPE)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected CreateHostInstance.Match arrayToMatch(final Object[] match) { + try { + return CreateHostInstance.Match.newMatch((HostType) match[POSITION_HOSTTYPE]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected CreateHostInstance.Match arrayToMatchMutable(final Object[] match) { + try { + return CreateHostInstance.Match.newMutableMatch((HostType) match[POSITION_HOSTTYPE]); + } 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 CreateHostInstance.instance(); + } + } + + private CreateHostInstance() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static CreateHostInstance instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected CreateHostInstance.Matcher instantiate(final ViatraQueryEngine engine) { + return CreateHostInstance.Matcher.on(engine); + } + + @Override + public CreateHostInstance.Matcher instantiate() { + return CreateHostInstance.Matcher.create(); + } + + @Override + public CreateHostInstance.Match newEmptyMatch() { + return CreateHostInstance.Match.newEmptyMatch(); + } + + @Override + public CreateHostInstance.Match newMatch(final Object... parameters) { + return CreateHostInstance.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.HostType) parameters[0]); + } + + /** + * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance (visibility: PUBLIC, simpleName: CreateHostInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance (visibility: PUBLIC, simpleName: CreateHostInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * + *

    This workaround is required e.g. to support recursion. + * + */ + private static class LazyHolder { + private static final CreateHostInstance INSTANCE = new CreateHostInstance(); + + /** + * 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 CreateHostInstance.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_HostType = new PParameter("HostType", "hu.bme.mit.inf.dslreasoner.domains.cps.HostType", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostType")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_HostType); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.createHostInstance"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("HostType"); + } + + @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_HostType = body.getOrCreateVariableByName("HostType"); + PVariable var_App = body.getOrCreateVariableByName("App"); + new TypeConstraint(body, Tuples.flatTupleOf(var_HostType), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_HostType, parameter_HostType) + )); + // find unallocatedAppInstance(App) + new PositivePatternCall(body, Tuples.flatTupleOf(var_App), UnallocatedAppInstance.instance().getInternalQueryRepresentation()); + // ApplicationInstance.type.requirements.hostType(App, HostType) + new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_App, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "type"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationType"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationType", "requirements"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement"))); + PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ResourceRequirement", "hostType"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); + new Equality(body, var__virtual_2_, var_HostType); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/GuidanceObjective.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/GuidanceObjective.java new file mode 100644 index 00000000..cfed0c4b --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/GuidanceObjective.java @@ -0,0 +1,591 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries; + +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.NoHostToAllocateTo; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.RequiredAppInstances; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.UnallocatedAppInstance; +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.apache.log4j.Logger; +import org.eclipse.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.matchers.aggregators.sum; +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.IExpressionEvaluator; +import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider; +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.AggregatorConstraint; +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.ExpressionEvaluation; +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.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 guidanceObjective(Value : java Integer) {
    + *         	UnallocatedInstances == count find unallocatedAppInstance(_);
    + *         	RequiredInstances == sum find requiredAppInstances(_, #_);
    + *         	NoHostToAllocate == count find noHostToAllocateTo(_);
    + *         	Value == eval(2  UnallocatedInstances + 4  RequiredInstances + NoHostToAllocate);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class GuidanceObjective extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.guidanceObjective 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 Integer fValue; + + private static List parameterNames = makeImmutableList("Value"); + + private Match(final Integer pValue) { + this.fValue = pValue; + } + + @Override + public Object get(final String parameterName) { + if ("Value".equals(parameterName)) return this.fValue; + return null; + } + + public Integer getValue() { + return this.fValue; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("Value".equals(parameterName) ) { + this.fValue = (Integer) newValue; + return true; + } + return false; + } + + public void setValue(final Integer pValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fValue = pValue; + } + + @Override + public String patternName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.guidanceObjective"; + } + + @Override + public List parameterNames() { + return GuidanceObjective.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fValue}; + } + + @Override + public GuidanceObjective.Match toImmutable() { + return isMutable() ? newMatch(fValue) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"Value\"=" + prettyPrintValue(fValue)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fValue); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof GuidanceObjective.Match)) { + GuidanceObjective.Match other = (GuidanceObjective.Match) obj; + return Objects.equals(fValue, other.fValue); + } 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 GuidanceObjective specification() { + return GuidanceObjective.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 GuidanceObjective.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 pValue the fixed value of pattern parameter Value, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static GuidanceObjective.Match newMutableMatch(final Integer pValue) { + return new Mutable(pValue); + } + + /** + * 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 pValue the fixed value of pattern parameter Value, or null if not bound. + * @return the (partial) match object. + * + */ + public static GuidanceObjective.Match newMatch(final Integer pValue) { + return new Immutable(pValue); + } + + private static final class Mutable extends GuidanceObjective.Match { + Mutable(final Integer pValue) { + super(pValue); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends GuidanceObjective.Match { + Immutable(final Integer pValue) { + super(pValue); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.guidanceObjective 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 guidanceObjective(Value : java Integer) {
    +   * 	UnallocatedInstances == count find unallocatedAppInstance(_);
    +   * 	RequiredInstances == sum find requiredAppInstances(_, #_);
    +   * 	NoHostToAllocate == count find noHostToAllocateTo(_);
    +   * 	Value == eval(2  UnallocatedInstances + 4  RequiredInstances + NoHostToAllocate);
    +   * }
    +   * 
    + * + * @see Match + * @see GuidanceObjective + * + */ + 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 GuidanceObjective.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 GuidanceObjective.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_VALUE = 0; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(GuidanceObjective.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 pValue the fixed value of pattern parameter Value, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final Integer pValue) { + return rawStreamAllMatches(new Object[]{pValue}).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 pValue the fixed value of pattern parameter Value, or null if not bound. + * @return a stream of matches represented as a Match object. + * + */ + public Stream streamAllMatches(final Integer pValue) { + return rawStreamAllMatches(new Object[]{pValue}); + } + + /** + * 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 pValue the fixed value of pattern parameter Value, or null if not bound. + * @return a match represented as a Match object, or null if no match is found. + * + */ + public Optional getOneArbitraryMatch(final Integer pValue) { + return rawGetOneArbitraryMatch(new Object[]{pValue}); + } + + /** + * 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 pValue the fixed value of pattern parameter Value, or null if not bound. + * @return true if the input is a valid (partial) match of the pattern. + * + */ + public boolean hasMatch(final Integer pValue) { + return rawHasMatch(new Object[]{pValue}); + } + + /** + * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pValue the fixed value of pattern parameter Value, or null if not bound. + * @return the number of pattern matches found. + * + */ + public int countMatches(final Integer pValue) { + return rawCountMatches(new Object[]{pValue}); + } + + /** + * 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 pValue the fixed value of pattern parameter Value, 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 Integer pValue, final Consumer processor) { + return rawForOneArbitraryMatch(new Object[]{pValue}, 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 pValue the fixed value of pattern parameter Value, or null if not bound. + * @return the (partial) match object. + * + */ + public GuidanceObjective.Match newMatch(final Integer pValue) { + return GuidanceObjective.Match.newMatch(pValue); + } + + /** + * Retrieve the set of values that occur in matches for Value. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfValue(final Object[] parameters) { + return rawStreamAllValues(POSITION_VALUE, parameters).map(Integer.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for Value. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfValue() { + return rawStreamAllValuesOfValue(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for Value. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfValue() { + return rawStreamAllValuesOfValue(emptyArray()); + } + + @Override + protected GuidanceObjective.Match tupleToMatch(final Tuple t) { + try { + return GuidanceObjective.Match.newMatch((Integer) t.get(POSITION_VALUE)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected GuidanceObjective.Match arrayToMatch(final Object[] match) { + try { + return GuidanceObjective.Match.newMatch((Integer) match[POSITION_VALUE]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected GuidanceObjective.Match arrayToMatchMutable(final Object[] match) { + try { + return GuidanceObjective.Match.newMutableMatch((Integer) match[POSITION_VALUE]); + } 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 GuidanceObjective.instance(); + } + } + + private GuidanceObjective() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static GuidanceObjective instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected GuidanceObjective.Matcher instantiate(final ViatraQueryEngine engine) { + return GuidanceObjective.Matcher.on(engine); + } + + @Override + public GuidanceObjective.Matcher instantiate() { + return GuidanceObjective.Matcher.create(); + } + + @Override + public GuidanceObjective.Match newEmptyMatch() { + return GuidanceObjective.Match.newEmptyMatch(); + } + + @Override + public GuidanceObjective.Match newMatch(final Object... parameters) { + return GuidanceObjective.Match.newMatch((java.lang.Integer) parameters[0]); + } + + /** + * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.GuidanceObjective (visibility: PUBLIC, simpleName: GuidanceObjective, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.GuidanceObjective, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.GuidanceObjective (visibility: PUBLIC, simpleName: GuidanceObjective, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.GuidanceObjective, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * + *

    This workaround is required e.g. to support recursion. + * + */ + private static class LazyHolder { + private static final GuidanceObjective INSTANCE = new GuidanceObjective(); + + /** + * 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 GuidanceObjective.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_Value = new PParameter("Value", "java.lang.Integer", new JavaTransitiveInstancesKey(java.lang.Integer.class), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_Value); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.guidanceObjective"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("Value"); + } + + @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_Value = body.getOrCreateVariableByName("Value"); + PVariable var_UnallocatedInstances = body.getOrCreateVariableByName("UnallocatedInstances"); + PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); + PVariable var_RequiredInstances = body.getOrCreateVariableByName("RequiredInstances"); + PVariable var___1_ = body.getOrCreateVariableByName("_<1>"); + PVariable var___2_ = body.getOrCreateVariableByName("_<2>"); + PVariable var_NoHostToAllocate = body.getOrCreateVariableByName("NoHostToAllocate"); + PVariable var___3_ = body.getOrCreateVariableByName("_<3>"); + new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Value), new JavaTransitiveInstancesKey(java.lang.Integer.class)); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_Value, parameter_Value) + )); + // UnallocatedInstances == count find unallocatedAppInstance(_) + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new PatternMatchCounter(body, Tuples.flatTupleOf(var___0_), UnallocatedAppInstance.instance().getInternalQueryRepresentation(), var__virtual_0_); + new Equality(body, var_UnallocatedInstances, var__virtual_0_); + // RequiredInstances == sum find requiredAppInstances(_, #_) + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new AggregatorConstraint(new sum().getAggregatorLogic(Integer.class), body, Tuples.flatTupleOf(var___1_, var___2_), RequiredAppInstances.instance().getInternalQueryRepresentation(), var__virtual_1_, 1); + new Equality(body, var_RequiredInstances, var__virtual_1_); + // NoHostToAllocate == count find noHostToAllocateTo(_) + PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); + new PatternMatchCounter(body, Tuples.flatTupleOf(var___3_), NoHostToAllocateTo.instance().getInternalQueryRepresentation(), var__virtual_2_); + new Equality(body, var_NoHostToAllocate, var__virtual_2_); + // Value == eval(2 * UnallocatedInstances + 4 * RequiredInstances + NoHostToAllocate) + PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}"); + new ExpressionEvaluation(body, new IExpressionEvaluator() { + + @Override + public String getShortDescription() { + return "Expression evaluation from pattern guidanceObjective"; + } + + @Override + public Iterable getInputParameterNames() { + return Arrays.asList("NoHostToAllocate", "RequiredInstances", "UnallocatedInstances");} + + @Override + public Object evaluateExpression(IValueProvider provider) throws Exception { + Integer NoHostToAllocate = (Integer) provider.getValue("NoHostToAllocate"); + Integer RequiredInstances = (Integer) provider.getValue("RequiredInstances"); + Integer UnallocatedInstances = (Integer) provider.getValue("UnallocatedInstances"); + return evaluateExpression_1_1(NoHostToAllocate, RequiredInstances, UnallocatedInstances); + } + }, var__virtual_3_ ); + new Equality(body, var_Value, var__virtual_3_); + bodies.add(body); + } + return bodies; + } + } + + private static int evaluateExpression_1_1(final Integer NoHostToAllocate, final Integer RequiredInstances, final Integer UnallocatedInstances) { + return (((2 * (UnallocatedInstances).intValue()) + (4 * (RequiredInstances).intValue())) + (NoHostToAllocate).intValue()); + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableHdd.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableHdd.java index 41615598..0c0d57a6 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableHdd.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableHdd.java @@ -4,7 +4,7 @@ package hu.bme.mit.inf.dslreasoner.domains.cps.queries; import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableHdd; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableHdd; import java.util.Arrays; import java.util.Collection; import java.util.LinkedHashSet; diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableMemory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableMemory.java index 4803ec3a..9f091a95 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableMemory.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableMemory.java @@ -4,7 +4,7 @@ package hu.bme.mit.inf.dslreasoner.domains.cps.queries; import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableMemory; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableMemory; import java.util.Arrays; import java.util.Collection; import java.util.LinkedHashSet; diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RemoveHostInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RemoveHostInstance.java new file mode 100644 index 00000000..1141e898 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RemoveHostInstance.java @@ -0,0 +1,579 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries; + +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.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 removeHostInstance(HostInstance : HostInstance) {
    + *         	neg HostInstance.applications(HostInstance, _);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class RemoveHostInstance extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.removeHostInstance 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 HostInstance fHostInstance; + + private static List parameterNames = makeImmutableList("HostInstance"); + + private Match(final HostInstance pHostInstance) { + this.fHostInstance = pHostInstance; + } + + @Override + public Object get(final String parameterName) { + if ("HostInstance".equals(parameterName)) return this.fHostInstance; + return null; + } + + public HostInstance getHostInstance() { + return this.fHostInstance; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("HostInstance".equals(parameterName) ) { + this.fHostInstance = (HostInstance) newValue; + return true; + } + return false; + } + + public void setHostInstance(final HostInstance pHostInstance) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fHostInstance = pHostInstance; + } + + @Override + public String patternName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.removeHostInstance"; + } + + @Override + public List parameterNames() { + return RemoveHostInstance.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fHostInstance}; + } + + @Override + public RemoveHostInstance.Match toImmutable() { + return isMutable() ? newMatch(fHostInstance) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"HostInstance\"=" + prettyPrintValue(fHostInstance)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fHostInstance); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof RemoveHostInstance.Match)) { + RemoveHostInstance.Match other = (RemoveHostInstance.Match) obj; + return Objects.equals(fHostInstance, other.fHostInstance); + } 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 RemoveHostInstance specification() { + return RemoveHostInstance.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 RemoveHostInstance.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 pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static RemoveHostInstance.Match newMutableMatch(final HostInstance pHostInstance) { + return new Mutable(pHostInstance); + } + + /** + * 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 pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. + * @return the (partial) match object. + * + */ + public static RemoveHostInstance.Match newMatch(final HostInstance pHostInstance) { + return new Immutable(pHostInstance); + } + + private static final class Mutable extends RemoveHostInstance.Match { + Mutable(final HostInstance pHostInstance) { + super(pHostInstance); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends RemoveHostInstance.Match { + Immutable(final HostInstance pHostInstance) { + super(pHostInstance); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.removeHostInstance 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 removeHostInstance(HostInstance : HostInstance) {
    +   * 	neg HostInstance.applications(HostInstance, _);
    +   * }
    +   * 
    + * + * @see Match + * @see RemoveHostInstance + * + */ + 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 RemoveHostInstance.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 RemoveHostInstance.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_HOSTINSTANCE = 0; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(RemoveHostInstance.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 pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final HostInstance pHostInstance) { + return rawStreamAllMatches(new Object[]{pHostInstance}).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 pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. + * @return a stream of matches represented as a Match object. + * + */ + public Stream streamAllMatches(final HostInstance pHostInstance) { + return rawStreamAllMatches(new Object[]{pHostInstance}); + } + + /** + * 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 pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. + * @return a match represented as a Match object, or null if no match is found. + * + */ + public Optional getOneArbitraryMatch(final HostInstance pHostInstance) { + return rawGetOneArbitraryMatch(new Object[]{pHostInstance}); + } + + /** + * 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 pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. + * @return true if the input is a valid (partial) match of the pattern. + * + */ + public boolean hasMatch(final HostInstance pHostInstance) { + return rawHasMatch(new Object[]{pHostInstance}); + } + + /** + * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. + * @return the number of pattern matches found. + * + */ + public int countMatches(final HostInstance pHostInstance) { + return rawCountMatches(new Object[]{pHostInstance}); + } + + /** + * 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 pHostInstance the fixed value of pattern parameter HostInstance, 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 HostInstance pHostInstance, final Consumer processor) { + return rawForOneArbitraryMatch(new Object[]{pHostInstance}, 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 pHostInstance the fixed value of pattern parameter HostInstance, or null if not bound. + * @return the (partial) match object. + * + */ + public RemoveHostInstance.Match newMatch(final HostInstance pHostInstance) { + return RemoveHostInstance.Match.newMatch(pHostInstance); + } + + /** + * Retrieve the set of values that occur in matches for HostInstance. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfHostInstance(final Object[] parameters) { + return rawStreamAllValues(POSITION_HOSTINSTANCE, parameters).map(HostInstance.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for HostInstance. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfHostInstance() { + return rawStreamAllValuesOfHostInstance(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for HostInstance. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfHostInstance() { + return rawStreamAllValuesOfHostInstance(emptyArray()); + } + + @Override + protected RemoveHostInstance.Match tupleToMatch(final Tuple t) { + try { + return RemoveHostInstance.Match.newMatch((HostInstance) t.get(POSITION_HOSTINSTANCE)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected RemoveHostInstance.Match arrayToMatch(final Object[] match) { + try { + return RemoveHostInstance.Match.newMatch((HostInstance) match[POSITION_HOSTINSTANCE]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected RemoveHostInstance.Match arrayToMatchMutable(final Object[] match) { + try { + return RemoveHostInstance.Match.newMutableMatch((HostInstance) match[POSITION_HOSTINSTANCE]); + } 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 RemoveHostInstance.instance(); + } + } + + private RemoveHostInstance() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static RemoveHostInstance instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected RemoveHostInstance.Matcher instantiate(final ViatraQueryEngine engine) { + return RemoveHostInstance.Matcher.on(engine); + } + + @Override + public RemoveHostInstance.Matcher instantiate() { + return RemoveHostInstance.Matcher.create(); + } + + @Override + public RemoveHostInstance.Match newEmptyMatch() { + return RemoveHostInstance.Match.newEmptyMatch(); + } + + @Override + public RemoveHostInstance.Match newMatch(final Object... parameters) { + return RemoveHostInstance.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance) parameters[0]); + } + + /** + * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RemoveHostInstance (visibility: PUBLIC, simpleName: RemoveHostInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RemoveHostInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RemoveHostInstance (visibility: PUBLIC, simpleName: RemoveHostInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RemoveHostInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * + *

    This workaround is required e.g. to support recursion. + * + */ + private static class LazyHolder { + private static final RemoveHostInstance INSTANCE = new RemoveHostInstance(); + + /** + * 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 RemoveHostInstance.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_HostInstance = new PParameter("HostInstance", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_HostInstance); + + private class Embedded_1_HostInstance_applications extends BaseGeneratedEMFPQuery { + private final PParameter parameter_p0 = new PParameter("p0", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); + + private final PParameter parameter_p1 = new PParameter("p1", "hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ApplicationInstance")), PParameterDirection.INOUT); + + private final List embeddedParameters = Arrays.asList(parameter_p0, parameter_p1); + + public Embedded_1_HostInstance_applications() { + super(PVisibility.EMBEDDED); + } + + @Override + public String getFullyQualifiedName() { + return GeneratedPQuery.this.getFullyQualifiedName() + "$Embedded_1_HostInstance_applications"; + } + + @Override + public List getParameters() { + return embeddedParameters; + } + + @Override + public Set doGetContainedBodies() { + PBody body = new PBody(this); + PVariable var_p0 = body.getOrCreateVariableByName("p0"); + PVariable var_p1 = body.getOrCreateVariableByName("p1"); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_p0, parameter_p0), + new ExportedParameter(body, var_p1, parameter_p1) + )); + // HostInstance.applications(HostInstance, _) + new TypeConstraint(body, Tuples.flatTupleOf(var_p0), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_p0, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostInstance", "applications"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + new Equality(body, var__virtual_0_, var_p1); + return Collections.singleton(body); + } + } + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.removeHostInstance"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("HostInstance"); + } + + @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_HostInstance = body.getOrCreateVariableByName("HostInstance"); + PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); + new TypeConstraint(body, Tuples.flatTupleOf(var_HostInstance), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_HostInstance, parameter_HostInstance) + )); + // neg HostInstance.applications(HostInstance, _) + new NegativePatternCall(body, Tuples.flatTupleOf(var_HostInstance, var___0_), new RemoveHostInstance.GeneratedPQuery.Embedded_1_HostInstance_applications()); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/ResourceRequirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/ResourceRequirement.java new file mode 100644 index 00000000..db7710f5 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/ResourceRequirement.java @@ -0,0 +1,829 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.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 resourceRequirement(Host : HostInstance, App : ApplicationInstance, Req : ResourceRequirement) {
    + *         	ApplicationInstance.allocatedTo(App, Host);
    + *         	ApplicationInstance.type.requirements(App, Req);
    + *         	HostInstance.type(Host, HostType);
    + *         	ResourceRequirement.hostType(Req, HostType);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class ResourceRequirement extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.resourceRequirement 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 HostInstance fHost; + + private ApplicationInstance fApp; + + private hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement fReq; + + private static List parameterNames = makeImmutableList("Host", "App", "Req"); + + private Match(final HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + this.fHost = pHost; + this.fApp = pApp; + this.fReq = pReq; + } + + @Override + public Object get(final String parameterName) { + if ("Host".equals(parameterName)) return this.fHost; + if ("App".equals(parameterName)) return this.fApp; + if ("Req".equals(parameterName)) return this.fReq; + return null; + } + + public HostInstance getHost() { + return this.fHost; + } + + public ApplicationInstance getApp() { + return this.fApp; + } + + public hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement getReq() { + return this.fReq; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("Host".equals(parameterName) ) { + this.fHost = (HostInstance) newValue; + return true; + } + if ("App".equals(parameterName) ) { + this.fApp = (ApplicationInstance) newValue; + return true; + } + if ("Req".equals(parameterName) ) { + this.fReq = (hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement) newValue; + return true; + } + return false; + } + + public void setHost(final HostInstance pHost) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fHost = pHost; + } + + public void setApp(final ApplicationInstance pApp) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fApp = pApp; + } + + public void setReq(final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fReq = pReq; + } + + @Override + public String patternName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.resourceRequirement"; + } + + @Override + public List parameterNames() { + return ResourceRequirement.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fHost, fApp, fReq}; + } + + @Override + public ResourceRequirement.Match toImmutable() { + return isMutable() ? newMatch(fHost, fApp, fReq) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"Host\"=" + prettyPrintValue(fHost) + ", "); + result.append("\"App\"=" + prettyPrintValue(fApp) + ", "); + result.append("\"Req\"=" + prettyPrintValue(fReq)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fHost, fApp, fReq); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof ResourceRequirement.Match)) { + ResourceRequirement.Match other = (ResourceRequirement.Match) obj; + return Objects.equals(fHost, other.fHost) && Objects.equals(fApp, other.fApp) && Objects.equals(fReq, other.fReq); + } 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 ResourceRequirement specification() { + return ResourceRequirement.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 ResourceRequirement.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 pHost the fixed value of pattern parameter Host, or null if not bound. + * @param pApp the fixed value of pattern parameter App, or null if not bound. + * @param pReq the fixed value of pattern parameter Req, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static ResourceRequirement.Match newMutableMatch(final HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return new Mutable(pHost, pApp, pReq); + } + + /** + * 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 pHost the fixed value of pattern parameter Host, or null if not bound. + * @param pApp the fixed value of pattern parameter App, or null if not bound. + * @param pReq the fixed value of pattern parameter Req, or null if not bound. + * @return the (partial) match object. + * + */ + public static ResourceRequirement.Match newMatch(final HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return new Immutable(pHost, pApp, pReq); + } + + private static final class Mutable extends ResourceRequirement.Match { + Mutable(final HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + super(pHost, pApp, pReq); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends ResourceRequirement.Match { + Immutable(final HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + super(pHost, pApp, pReq); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.resourceRequirement 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 resourceRequirement(Host : HostInstance, App : ApplicationInstance, Req : ResourceRequirement) {
    +   * 	ApplicationInstance.allocatedTo(App, Host);
    +   * 	ApplicationInstance.type.requirements(App, Req);
    +   * 	HostInstance.type(Host, HostType);
    +   * 	ResourceRequirement.hostType(Req, HostType);
    +   * }
    +   * 
    + * + * @see Match + * @see ResourceRequirement + * + */ + 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 ResourceRequirement.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 ResourceRequirement.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_HOST = 0; + + private static final int POSITION_APP = 1; + + private static final int POSITION_REQ = 2; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(ResourceRequirement.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 pHost the fixed value of pattern parameter Host, or null if not bound. + * @param pApp the fixed value of pattern parameter App, or null if not bound. + * @param pReq the fixed value of pattern parameter Req, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return rawStreamAllMatches(new Object[]{pHost, pApp, pReq}).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 pHost the fixed value of pattern parameter Host, or null if not bound. + * @param pApp the fixed value of pattern parameter App, or null if not bound. + * @param pReq the fixed value of pattern parameter Req, or null if not bound. + * @return a stream of matches represented as a Match object. + * + */ + public Stream streamAllMatches(final HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return rawStreamAllMatches(new Object[]{pHost, pApp, pReq}); + } + + /** + * 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 pHost the fixed value of pattern parameter Host, or null if not bound. + * @param pApp the fixed value of pattern parameter App, or null if not bound. + * @param pReq the fixed value of pattern parameter Req, or null if not bound. + * @return a match represented as a Match object, or null if no match is found. + * + */ + public Optional getOneArbitraryMatch(final HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return rawGetOneArbitraryMatch(new Object[]{pHost, pApp, pReq}); + } + + /** + * 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 pHost the fixed value of pattern parameter Host, or null if not bound. + * @param pApp the fixed value of pattern parameter App, or null if not bound. + * @param pReq the fixed value of pattern parameter Req, or null if not bound. + * @return true if the input is a valid (partial) match of the pattern. + * + */ + public boolean hasMatch(final HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return rawHasMatch(new Object[]{pHost, pApp, pReq}); + } + + /** + * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pHost the fixed value of pattern parameter Host, or null if not bound. + * @param pApp the fixed value of pattern parameter App, or null if not bound. + * @param pReq the fixed value of pattern parameter Req, or null if not bound. + * @return the number of pattern matches found. + * + */ + public int countMatches(final HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return rawCountMatches(new Object[]{pHost, pApp, pReq}); + } + + /** + * 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 pHost the fixed value of pattern parameter Host, or null if not bound. + * @param pApp the fixed value of pattern parameter App, or null if not bound. + * @param pReq the fixed value of pattern parameter Req, 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 HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq, final Consumer processor) { + return rawForOneArbitraryMatch(new Object[]{pHost, pApp, pReq}, 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 pHost the fixed value of pattern parameter Host, or null if not bound. + * @param pApp the fixed value of pattern parameter App, or null if not bound. + * @param pReq the fixed value of pattern parameter Req, or null if not bound. + * @return the (partial) match object. + * + */ + public ResourceRequirement.Match newMatch(final HostInstance pHost, final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return ResourceRequirement.Match.newMatch(pHost, pApp, pReq); + } + + /** + * Retrieve the set of values that occur in matches for Host. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfHost(final Object[] parameters) { + return rawStreamAllValues(POSITION_HOST, parameters).map(HostInstance.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for Host. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfHost() { + return rawStreamAllValuesOfHost(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for Host. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfHost() { + return rawStreamAllValuesOfHost(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for Host. + *

    + * 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 streamAllValuesOfHost(final ResourceRequirement.Match partialMatch) { + return rawStreamAllValuesOfHost(partialMatch.toArray()); + } + + /** + * Retrieve the set of values that occur in matches for Host. + *

    + * 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 streamAllValuesOfHost(final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return rawStreamAllValuesOfHost(new Object[]{null, pApp, pReq}); + } + + /** + * Retrieve the set of values that occur in matches for Host. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfHost(final ResourceRequirement.Match partialMatch) { + return rawStreamAllValuesOfHost(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for Host. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfHost(final ApplicationInstance pApp, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return rawStreamAllValuesOfHost(new Object[]{null, pApp, pReq}).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfApp(final Object[] parameters) { + return rawStreamAllValues(POSITION_APP, parameters).map(ApplicationInstance.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfApp() { + return rawStreamAllValuesOfApp(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfApp() { + return rawStreamAllValuesOfApp(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for App. + *

    + * 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 streamAllValuesOfApp(final ResourceRequirement.Match partialMatch) { + return rawStreamAllValuesOfApp(partialMatch.toArray()); + } + + /** + * Retrieve the set of values that occur in matches for App. + *

    + * 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 streamAllValuesOfApp(final HostInstance pHost, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return rawStreamAllValuesOfApp(new Object[]{pHost, null, pReq}); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfApp(final ResourceRequirement.Match partialMatch) { + return rawStreamAllValuesOfApp(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfApp(final HostInstance pHost, final hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement pReq) { + return rawStreamAllValuesOfApp(new Object[]{pHost, null, pReq}).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for Req. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfReq(final Object[] parameters) { + return rawStreamAllValues(POSITION_REQ, parameters).map(hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for Req. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfReq() { + return rawStreamAllValuesOfReq(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for Req. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfReq() { + return rawStreamAllValuesOfReq(emptyArray()); + } + + /** + * Retrieve the set of values that occur in matches for Req. + *

    + * 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 streamAllValuesOfReq(final ResourceRequirement.Match partialMatch) { + return rawStreamAllValuesOfReq(partialMatch.toArray()); + } + + /** + * Retrieve the set of values that occur in matches for Req. + *

    + * 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 streamAllValuesOfReq(final HostInstance pHost, final ApplicationInstance pApp) { + return rawStreamAllValuesOfReq(new Object[]{pHost, pApp, null}); + } + + /** + * Retrieve the set of values that occur in matches for Req. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfReq(final ResourceRequirement.Match partialMatch) { + return rawStreamAllValuesOfReq(partialMatch.toArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for Req. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfReq(final HostInstance pHost, final ApplicationInstance pApp) { + return rawStreamAllValuesOfReq(new Object[]{pHost, pApp, null}).collect(Collectors.toSet()); + } + + @Override + protected ResourceRequirement.Match tupleToMatch(final Tuple t) { + try { + return ResourceRequirement.Match.newMatch((HostInstance) t.get(POSITION_HOST), (ApplicationInstance) t.get(POSITION_APP), (hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement) t.get(POSITION_REQ)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected ResourceRequirement.Match arrayToMatch(final Object[] match) { + try { + return ResourceRequirement.Match.newMatch((HostInstance) match[POSITION_HOST], (ApplicationInstance) match[POSITION_APP], (hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement) match[POSITION_REQ]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected ResourceRequirement.Match arrayToMatchMutable(final Object[] match) { + try { + return ResourceRequirement.Match.newMutableMatch((HostInstance) match[POSITION_HOST], (ApplicationInstance) match[POSITION_APP], (hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement) match[POSITION_REQ]); + } 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 ResourceRequirement.instance(); + } + } + + private ResourceRequirement() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static ResourceRequirement instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected ResourceRequirement.Matcher instantiate(final ViatraQueryEngine engine) { + return ResourceRequirement.Matcher.on(engine); + } + + @Override + public ResourceRequirement.Matcher instantiate() { + return ResourceRequirement.Matcher.create(); + } + + @Override + public ResourceRequirement.Match newEmptyMatch() { + return ResourceRequirement.Match.newEmptyMatch(); + } + + @Override + public ResourceRequirement.Match newMatch(final Object... parameters) { + return ResourceRequirement.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance) parameters[0], (hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance) parameters[1], (hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement) parameters[2]); + } + + /** + * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement (visibility: PUBLIC, simpleName: ResourceRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement (visibility: PUBLIC, simpleName: ResourceRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * + *

    This workaround is required e.g. to support recursion. + * + */ + private static class LazyHolder { + private static final ResourceRequirement INSTANCE = new ResourceRequirement(); + + /** + * 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 ResourceRequirement.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_Host = new PParameter("Host", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); + + private final PParameter parameter_App = new PParameter("App", "hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ApplicationInstance")), PParameterDirection.INOUT); + + private final PParameter parameter_Req = new PParameter("Req", "hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ResourceRequirement")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_Host, parameter_App, parameter_Req); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.resourceRequirement"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("Host","App","Req"); + } + + @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_Host = body.getOrCreateVariableByName("Host"); + PVariable var_App = body.getOrCreateVariableByName("App"); + PVariable var_Req = body.getOrCreateVariableByName("Req"); + PVariable var_HostType = body.getOrCreateVariableByName("HostType"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_Host, parameter_Host), + new ExportedParameter(body, var_App, parameter_App), + new ExportedParameter(body, var_Req, parameter_Req) + )); + // ApplicationInstance.allocatedTo(App, Host) + new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_App, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "allocatedTo"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new Equality(body, var__virtual_0_, var_Host); + // ApplicationInstance.type.requirements(App, Req) + new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_App, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "type"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationType"))); + PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationType", "requirements"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement"))); + new Equality(body, var__virtual_2_, var_Req); + // HostInstance.type(Host, HostType) + new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Host, var__virtual_3_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostInstance", "type"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_3_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); + new Equality(body, var__virtual_3_, var_HostType); + // ResourceRequirement.hostType(Req, HostType) + new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement"))); + PVariable var__virtual_4_ = body.getOrCreateVariableByName(".virtual{4}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Req, var__virtual_4_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ResourceRequirement", "hostType"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_4_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); + new Equality(body, var__virtual_4_, var_HostType); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/TotalHdd.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/TotalHdd.java deleted file mode 100644 index f91853de..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/TotalHdd.java +++ /dev/null @@ -1,706 +0,0 @@ -/** - * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql - */ -package hu.bme.mit.inf.dslreasoner.domains.cps.queries; - -import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -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.EDataTypeInSlotsKey; -import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

    Original source: - *

    - *         {@literal @}QueryBasedFeature(feature = "totalHdd")
    - *         pattern totalHdd(Host : HostInstance, Hdd : EInt) {
    - *         	HostInstance.type.defaultHdd(Host, Hdd);
    - *         }
    - * 
    - * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class TotalHdd extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalHdd 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 HostInstance fHost; - - private Integer fHdd; - - private static List parameterNames = makeImmutableList("Host", "Hdd"); - - private Match(final HostInstance pHost, final Integer pHdd) { - this.fHost = pHost; - this.fHdd = pHdd; - } - - @Override - public Object get(final String parameterName) { - if ("Host".equals(parameterName)) return this.fHost; - if ("Hdd".equals(parameterName)) return this.fHdd; - return null; - } - - public HostInstance getHost() { - return this.fHost; - } - - public Integer getHdd() { - return this.fHdd; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("Host".equals(parameterName) ) { - this.fHost = (HostInstance) newValue; - return true; - } - if ("Hdd".equals(parameterName) ) { - this.fHdd = (Integer) newValue; - return true; - } - return false; - } - - public void setHost(final HostInstance pHost) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fHost = pHost; - } - - public void setHdd(final Integer pHdd) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fHdd = pHdd; - } - - @Override - public String patternName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalHdd"; - } - - @Override - public List parameterNames() { - return TotalHdd.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fHost, fHdd}; - } - - @Override - public TotalHdd.Match toImmutable() { - return isMutable() ? newMatch(fHost, fHdd) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"Host\"=" + prettyPrintValue(fHost) + ", "); - result.append("\"Hdd\"=" + prettyPrintValue(fHdd)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fHost, fHdd); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof TotalHdd.Match)) { - TotalHdd.Match other = (TotalHdd.Match) obj; - return Objects.equals(fHost, other.fHost) && Objects.equals(fHdd, other.fHdd); - } 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 TotalHdd specification() { - return TotalHdd.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 TotalHdd.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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static TotalHdd.Match newMutableMatch(final HostInstance pHost, final Integer pHdd) { - return new Mutable(pHost, pHdd); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return the (partial) match object. - * - */ - public static TotalHdd.Match newMatch(final HostInstance pHost, final Integer pHdd) { - return new Immutable(pHost, pHdd); - } - - private static final class Mutable extends TotalHdd.Match { - Mutable(final HostInstance pHost, final Integer pHdd) { - super(pHost, pHdd); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends TotalHdd.Match { - Immutable(final HostInstance pHost, final Integer pHdd) { - super(pHost, pHdd); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalHdd pattern, - * providing pattern-specific query methods. - * - *

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

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

    Original source: - *

    -   * {@literal @}QueryBasedFeature(feature = "totalHdd")
    -   * pattern totalHdd(Host : HostInstance, Hdd : EInt) {
    -   * 	HostInstance.type.defaultHdd(Host, Hdd);
    -   * }
    -   * 
    - * - * @see Match - * @see TotalHdd - * - */ - 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 TotalHdd.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 TotalHdd.Matcher create() { - return new Matcher(); - } - - private static final int POSITION_HOST = 0; - - private static final int POSITION_HDD = 1; - - private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(TotalHdd.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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final HostInstance pHost, final Integer pHdd) { - return rawStreamAllMatches(new Object[]{pHost, pHdd}).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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final HostInstance pHost, final Integer pHdd) { - return rawStreamAllMatches(new Object[]{pHost, pHdd}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final HostInstance pHost, final Integer pHdd) { - return rawGetOneArbitraryMatch(new Object[]{pHost, pHdd}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final HostInstance pHost, final Integer pHdd) { - return rawHasMatch(new Object[]{pHost, pHdd}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final HostInstance pHost, final Integer pHdd) { - return rawCountMatches(new Object[]{pHost, pHdd}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, 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 HostInstance pHost, final Integer pHdd, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pHost, pHdd}, 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pHdd the fixed value of pattern parameter Hdd, or null if not bound. - * @return the (partial) match object. - * - */ - public TotalHdd.Match newMatch(final HostInstance pHost, final Integer pHdd) { - return TotalHdd.Match.newMatch(pHost, pHdd); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfHost(final Object[] parameters) { - return rawStreamAllValues(POSITION_HOST, parameters).map(HostInstance.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost() { - return rawStreamAllValuesOfHost(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfHost() { - return rawStreamAllValuesOfHost(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - *

    - * 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 streamAllValuesOfHost(final TotalHdd.Match partialMatch) { - return rawStreamAllValuesOfHost(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - *

    - * 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 streamAllValuesOfHost(final Integer pHdd) { - return rawStreamAllValuesOfHost(new Object[]{null, pHdd}); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost(final TotalHdd.Match partialMatch) { - return rawStreamAllValuesOfHost(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost(final Integer pHdd) { - return rawStreamAllValuesOfHost(new Object[]{null, pHdd}).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfHdd(final Object[] parameters) { - return rawStreamAllValues(POSITION_HDD, parameters).map(Integer.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHdd() { - return rawStreamAllValuesOfHdd(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfHdd() { - return rawStreamAllValuesOfHdd(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - *

    - * 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 streamAllValuesOfHdd(final TotalHdd.Match partialMatch) { - return rawStreamAllValuesOfHdd(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - *

    - * 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 streamAllValuesOfHdd(final HostInstance pHost) { - return rawStreamAllValuesOfHdd(new Object[]{pHost, null}); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHdd(final TotalHdd.Match partialMatch) { - return rawStreamAllValuesOfHdd(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Hdd. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHdd(final HostInstance pHost) { - return rawStreamAllValuesOfHdd(new Object[]{pHost, null}).collect(Collectors.toSet()); - } - - @Override - protected TotalHdd.Match tupleToMatch(final Tuple t) { - try { - return TotalHdd.Match.newMatch((HostInstance) t.get(POSITION_HOST), (Integer) t.get(POSITION_HDD)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected TotalHdd.Match arrayToMatch(final Object[] match) { - try { - return TotalHdd.Match.newMatch((HostInstance) match[POSITION_HOST], (Integer) match[POSITION_HDD]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected TotalHdd.Match arrayToMatchMutable(final Object[] match) { - try { - return TotalHdd.Match.newMutableMatch((HostInstance) match[POSITION_HOST], (Integer) match[POSITION_HDD]); - } 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 TotalHdd.instance(); - } - } - - private TotalHdd() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static TotalHdd instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected TotalHdd.Matcher instantiate(final ViatraQueryEngine engine) { - return TotalHdd.Matcher.on(engine); - } - - @Override - public TotalHdd.Matcher instantiate() { - return TotalHdd.Matcher.create(); - } - - @Override - public TotalHdd.Match newEmptyMatch() { - return TotalHdd.Match.newEmptyMatch(); - } - - @Override - public TotalHdd.Match newMatch(final Object... parameters) { - return TotalHdd.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance) parameters[0], (java.lang.Integer) parameters[1]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalHdd (visibility: PUBLIC, simpleName: TotalHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalHdd (visibility: PUBLIC, simpleName: TotalHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

    This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private static final TotalHdd INSTANCE = new TotalHdd(); - - /** - * 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 TotalHdd.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_Host = new PParameter("Host", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); - - private final PParameter parameter_Hdd = new PParameter("Hdd", "java.lang.Integer", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EInt")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_Host, parameter_Hdd); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalHdd"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("Host","Hdd"); - } - - @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_Host = body.getOrCreateVariableByName("Host"); - PVariable var_Hdd = body.getOrCreateVariableByName("Hdd"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); - new TypeConstraint(body, Tuples.flatTupleOf(var_Hdd), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EInt"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Host, parameter_Host), - new ExportedParameter(body, var_Hdd, parameter_Hdd) - )); - // HostInstance.type.defaultHdd(Host, Hdd) - new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Host, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostInstance", "type"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); - PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostType", "defaultHdd"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EInt"))); - new Equality(body, var__virtual_1_, var_Hdd); - bodies.add(body); - } - { - PAnnotation annotation = new PAnnotation("QueryBasedFeature"); - annotation.addAttribute("feature", "totalHdd"); - addAnnotation(annotation); - } - return bodies; - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/TotalMemory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/TotalMemory.java deleted file mode 100644 index e8a11e36..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/TotalMemory.java +++ /dev/null @@ -1,706 +0,0 @@ -/** - * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql - */ -package hu.bme.mit.inf.dslreasoner.domains.cps.queries; - -import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; -import java.util.Arrays; -import java.util.Collection; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Objects; -import java.util.Optional; -import java.util.Set; -import java.util.function.Consumer; -import java.util.stream.Collectors; -import java.util.stream.Stream; -import org.apache.log4j.Logger; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -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.EDataTypeInSlotsKey; -import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; -import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; -import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; -import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; -import org.eclipse.viatra.query.runtime.matchers.psystem.annotations.PAnnotation; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.Equality; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.ExportedParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.TypeConstraint; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameter; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PParameterDirection; -import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PVisibility; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuple; -import org.eclipse.viatra.query.runtime.matchers.tuple.Tuples; -import org.eclipse.viatra.query.runtime.util.ViatraQueryLoggingUtil; - -/** - * A pattern-specific query specification that can instantiate Matcher in a type-safe way. - * - *

    Original source: - *

    - *         {@literal @}QueryBasedFeature(feature = "totalMemory")
    - *         pattern totalMemory(Host : HostInstance, Memory : EInt) {
    - *         	HostInstance.type.defaultMemory(Host, Memory);
    - *         }
    - * 
    - * - * @see Matcher - * @see Match - * - */ -@SuppressWarnings("all") -public final class TotalMemory extends BaseGeneratedEMFQuerySpecification { - /** - * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalMemory 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 HostInstance fHost; - - private Integer fMemory; - - private static List parameterNames = makeImmutableList("Host", "Memory"); - - private Match(final HostInstance pHost, final Integer pMemory) { - this.fHost = pHost; - this.fMemory = pMemory; - } - - @Override - public Object get(final String parameterName) { - if ("Host".equals(parameterName)) return this.fHost; - if ("Memory".equals(parameterName)) return this.fMemory; - return null; - } - - public HostInstance getHost() { - return this.fHost; - } - - public Integer getMemory() { - return this.fMemory; - } - - @Override - public boolean set(final String parameterName, final Object newValue) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - if ("Host".equals(parameterName) ) { - this.fHost = (HostInstance) newValue; - return true; - } - if ("Memory".equals(parameterName) ) { - this.fMemory = (Integer) newValue; - return true; - } - return false; - } - - public void setHost(final HostInstance pHost) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fHost = pHost; - } - - public void setMemory(final Integer pMemory) { - if (!isMutable()) throw new java.lang.UnsupportedOperationException(); - this.fMemory = pMemory; - } - - @Override - public String patternName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalMemory"; - } - - @Override - public List parameterNames() { - return TotalMemory.Match.parameterNames; - } - - @Override - public Object[] toArray() { - return new Object[]{fHost, fMemory}; - } - - @Override - public TotalMemory.Match toImmutable() { - return isMutable() ? newMatch(fHost, fMemory) : this; - } - - @Override - public String prettyPrint() { - StringBuilder result = new StringBuilder(); - result.append("\"Host\"=" + prettyPrintValue(fHost) + ", "); - result.append("\"Memory\"=" + prettyPrintValue(fMemory)); - return result.toString(); - } - - @Override - public int hashCode() { - return Objects.hash(fHost, fMemory); - } - - @Override - public boolean equals(final Object obj) { - if (this == obj) - return true; - if (obj == null) { - return false; - } - if ((obj instanceof TotalMemory.Match)) { - TotalMemory.Match other = (TotalMemory.Match) obj; - return Objects.equals(fHost, other.fHost) && Objects.equals(fMemory, other.fMemory); - } 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 TotalMemory specification() { - return TotalMemory.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 TotalMemory.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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return the new, mutable (partial) match object. - * - */ - public static TotalMemory.Match newMutableMatch(final HostInstance pHost, final Integer pMemory) { - return new Mutable(pHost, pMemory); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return the (partial) match object. - * - */ - public static TotalMemory.Match newMatch(final HostInstance pHost, final Integer pMemory) { - return new Immutable(pHost, pMemory); - } - - private static final class Mutable extends TotalMemory.Match { - Mutable(final HostInstance pHost, final Integer pMemory) { - super(pHost, pMemory); - } - - @Override - public boolean isMutable() { - return true; - } - } - - private static final class Immutable extends TotalMemory.Match { - Immutable(final HostInstance pHost, final Integer pMemory) { - super(pHost, pMemory); - } - - @Override - public boolean isMutable() { - return false; - } - } - } - - /** - * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalMemory pattern, - * providing pattern-specific query methods. - * - *

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

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

    Original source: - *

    -   * {@literal @}QueryBasedFeature(feature = "totalMemory")
    -   * pattern totalMemory(Host : HostInstance, Memory : EInt) {
    -   * 	HostInstance.type.defaultMemory(Host, Memory);
    -   * }
    -   * 
    - * - * @see Match - * @see TotalMemory - * - */ - 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 TotalMemory.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 TotalMemory.Matcher create() { - return new Matcher(); - } - - private static final int POSITION_HOST = 0; - - private static final int POSITION_MEMORY = 1; - - private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(TotalMemory.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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return matches represented as a Match object. - * - */ - public Collection getAllMatches(final HostInstance pHost, final Integer pMemory) { - return rawStreamAllMatches(new Object[]{pHost, pMemory}).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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return a stream of matches represented as a Match object. - * - */ - public Stream streamAllMatches(final HostInstance pHost, final Integer pMemory) { - return rawStreamAllMatches(new Object[]{pHost, pMemory}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return a match represented as a Match object, or null if no match is found. - * - */ - public Optional getOneArbitraryMatch(final HostInstance pHost, final Integer pMemory) { - return rawGetOneArbitraryMatch(new Object[]{pHost, pMemory}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return true if the input is a valid (partial) match of the pattern. - * - */ - public boolean hasMatch(final HostInstance pHost, final Integer pMemory) { - return rawHasMatch(new Object[]{pHost, pMemory}); - } - - /** - * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. - * @param pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return the number of pattern matches found. - * - */ - public int countMatches(final HostInstance pHost, final Integer pMemory) { - return rawCountMatches(new Object[]{pHost, pMemory}); - } - - /** - * 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, 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 HostInstance pHost, final Integer pMemory, final Consumer processor) { - return rawForOneArbitraryMatch(new Object[]{pHost, pMemory}, 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 pHost the fixed value of pattern parameter Host, or null if not bound. - * @param pMemory the fixed value of pattern parameter Memory, or null if not bound. - * @return the (partial) match object. - * - */ - public TotalMemory.Match newMatch(final HostInstance pHost, final Integer pMemory) { - return TotalMemory.Match.newMatch(pHost, pMemory); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfHost(final Object[] parameters) { - return rawStreamAllValues(POSITION_HOST, parameters).map(HostInstance.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost() { - return rawStreamAllValuesOfHost(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfHost() { - return rawStreamAllValuesOfHost(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - *

    - * 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 streamAllValuesOfHost(final TotalMemory.Match partialMatch) { - return rawStreamAllValuesOfHost(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - *

    - * 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 streamAllValuesOfHost(final Integer pMemory) { - return rawStreamAllValuesOfHost(new Object[]{null, pMemory}); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost(final TotalMemory.Match partialMatch) { - return rawStreamAllValuesOfHost(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Host. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfHost(final Integer pMemory) { - return rawStreamAllValuesOfHost(new Object[]{null, pMemory}).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - * @return the Set of all values or empty set if there are no matches - * - */ - protected Stream rawStreamAllValuesOfMemory(final Object[] parameters) { - return rawStreamAllValues(POSITION_MEMORY, parameters).map(Integer.class::cast); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfMemory() { - return rawStreamAllValuesOfMemory(emptyArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - * @return the Set of all values or empty set if there are no matches - * - */ - public Stream streamAllValuesOfMemory() { - return rawStreamAllValuesOfMemory(emptyArray()); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - *

    - * 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 streamAllValuesOfMemory(final TotalMemory.Match partialMatch) { - return rawStreamAllValuesOfMemory(partialMatch.toArray()); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - *

    - * 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 streamAllValuesOfMemory(final HostInstance pHost) { - return rawStreamAllValuesOfMemory(new Object[]{pHost, null}); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfMemory(final TotalMemory.Match partialMatch) { - return rawStreamAllValuesOfMemory(partialMatch.toArray()).collect(Collectors.toSet()); - } - - /** - * Retrieve the set of values that occur in matches for Memory. - * @return the Set of all values or empty set if there are no matches - * - */ - public Set getAllValuesOfMemory(final HostInstance pHost) { - return rawStreamAllValuesOfMemory(new Object[]{pHost, null}).collect(Collectors.toSet()); - } - - @Override - protected TotalMemory.Match tupleToMatch(final Tuple t) { - try { - return TotalMemory.Match.newMatch((HostInstance) t.get(POSITION_HOST), (Integer) t.get(POSITION_MEMORY)); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in tuple not properly typed!",e); - return null; - } - } - - @Override - protected TotalMemory.Match arrayToMatch(final Object[] match) { - try { - return TotalMemory.Match.newMatch((HostInstance) match[POSITION_HOST], (Integer) match[POSITION_MEMORY]); - } catch(ClassCastException e) { - LOGGER.error("Element(s) in array not properly typed!",e); - return null; - } - } - - @Override - protected TotalMemory.Match arrayToMatchMutable(final Object[] match) { - try { - return TotalMemory.Match.newMutableMatch((HostInstance) match[POSITION_HOST], (Integer) match[POSITION_MEMORY]); - } 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 TotalMemory.instance(); - } - } - - private TotalMemory() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static TotalMemory instance() { - try{ - return LazyHolder.INSTANCE; - } catch (ExceptionInInitializerError err) { - throw processInitializerError(err); - } - } - - @Override - protected TotalMemory.Matcher instantiate(final ViatraQueryEngine engine) { - return TotalMemory.Matcher.on(engine); - } - - @Override - public TotalMemory.Matcher instantiate() { - return TotalMemory.Matcher.create(); - } - - @Override - public TotalMemory.Match newEmptyMatch() { - return TotalMemory.Match.newEmptyMatch(); - } - - @Override - public TotalMemory.Match newMatch(final Object... parameters) { - return TotalMemory.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance) parameters[0], (java.lang.Integer) parameters[1]); - } - - /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalMemory (visibility: PUBLIC, simpleName: TotalMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created - * not at the class load time of the outer class, - * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalMemory (visibility: PUBLIC, simpleName: TotalMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. - * - *

    This workaround is required e.g. to support recursion. - * - */ - private static class LazyHolder { - private static final TotalMemory INSTANCE = new TotalMemory(); - - /** - * 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 TotalMemory.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_Host = new PParameter("Host", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); - - private final PParameter parameter_Memory = new PParameter("Memory", "java.lang.Integer", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EInt")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_Host, parameter_Memory); - - private GeneratedPQuery() { - super(PVisibility.PUBLIC); - } - - @Override - public String getFullyQualifiedName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalMemory"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("Host","Memory"); - } - - @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_Host = body.getOrCreateVariableByName("Host"); - PVariable var_Memory = body.getOrCreateVariableByName("Memory"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); - new TypeConstraint(body, Tuples.flatTupleOf(var_Memory), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EInt"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Host, parameter_Host), - new ExportedParameter(body, var_Memory, parameter_Memory) - )); - // HostInstance.type.defaultMemory(Host, Memory) - new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Host, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostInstance", "type"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); - PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostType", "defaultMemory"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EInt"))); - new Equality(body, var__virtual_1_, var_Memory); - bodies.add(body); - } - { - PAnnotation annotation = new PAnnotation("QueryBasedFeature"); - annotation.addAttribute("feature", "totalMemory"); - addAnnotation(annotation); - } - return bodies; - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/UnallocateAppInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/UnallocateAppInstance.java new file mode 100644 index 00000000..ccc0ba22 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/UnallocateAppInstance.java @@ -0,0 +1,541 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import java.util.Arrays; +import java.util.Collection; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.apache.log4j.Logger; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.viatra.query.runtime.api.IPatternMatch; +import org.eclipse.viatra.query.runtime.api.IQuerySpecification; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFPQuery; +import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedEMFQuerySpecification; +import org.eclipse.viatra.query.runtime.api.impl.BaseMatcher; +import org.eclipse.viatra.query.runtime.api.impl.BasePatternMatch; +import org.eclipse.viatra.query.runtime.emf.types.EClassTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.emf.types.EStructuralFeatureInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; +import org.eclipse.viatra.query.runtime.matchers.psystem.PBody; +import org.eclipse.viatra.query.runtime.matchers.psystem.PVariable; +import org.eclipse.viatra.query.runtime.matchers.psystem.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 unallocateAppInstance(App : ApplicationInstance) {
    + *         	ApplicationInstance.allocatedTo(App, _);
    + *         }
    + * 
    + * + * @see Matcher + * @see Match + * + */ +@SuppressWarnings("all") +public final class UnallocateAppInstance extends BaseGeneratedEMFQuerySpecification { + /** + * Pattern-specific match representation of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.unallocateAppInstance 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 ApplicationInstance fApp; + + private static List parameterNames = makeImmutableList("App"); + + private Match(final ApplicationInstance pApp) { + this.fApp = pApp; + } + + @Override + public Object get(final String parameterName) { + if ("App".equals(parameterName)) return this.fApp; + return null; + } + + public ApplicationInstance getApp() { + return this.fApp; + } + + @Override + public boolean set(final String parameterName, final Object newValue) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + if ("App".equals(parameterName) ) { + this.fApp = (ApplicationInstance) newValue; + return true; + } + return false; + } + + public void setApp(final ApplicationInstance pApp) { + if (!isMutable()) throw new java.lang.UnsupportedOperationException(); + this.fApp = pApp; + } + + @Override + public String patternName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.unallocateAppInstance"; + } + + @Override + public List parameterNames() { + return UnallocateAppInstance.Match.parameterNames; + } + + @Override + public Object[] toArray() { + return new Object[]{fApp}; + } + + @Override + public UnallocateAppInstance.Match toImmutable() { + return isMutable() ? newMatch(fApp) : this; + } + + @Override + public String prettyPrint() { + StringBuilder result = new StringBuilder(); + result.append("\"App\"=" + prettyPrintValue(fApp)); + return result.toString(); + } + + @Override + public int hashCode() { + return Objects.hash(fApp); + } + + @Override + public boolean equals(final Object obj) { + if (this == obj) + return true; + if (obj == null) { + return false; + } + if ((obj instanceof UnallocateAppInstance.Match)) { + UnallocateAppInstance.Match other = (UnallocateAppInstance.Match) obj; + return Objects.equals(fApp, other.fApp); + } 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 UnallocateAppInstance specification() { + return UnallocateAppInstance.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 UnallocateAppInstance.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 pApp the fixed value of pattern parameter App, or null if not bound. + * @return the new, mutable (partial) match object. + * + */ + public static UnallocateAppInstance.Match newMutableMatch(final ApplicationInstance pApp) { + return new Mutable(pApp); + } + + /** + * 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 pApp the fixed value of pattern parameter App, or null if not bound. + * @return the (partial) match object. + * + */ + public static UnallocateAppInstance.Match newMatch(final ApplicationInstance pApp) { + return new Immutable(pApp); + } + + private static final class Mutable extends UnallocateAppInstance.Match { + Mutable(final ApplicationInstance pApp) { + super(pApp); + } + + @Override + public boolean isMutable() { + return true; + } + } + + private static final class Immutable extends UnallocateAppInstance.Match { + Immutable(final ApplicationInstance pApp) { + super(pApp); + } + + @Override + public boolean isMutable() { + return false; + } + } + } + + /** + * Generated pattern matcher API of the hu.bme.mit.inf.dslreasoner.domains.cps.queries.unallocateAppInstance 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 unallocateAppInstance(App : ApplicationInstance) {
    +   * 	ApplicationInstance.allocatedTo(App, _);
    +   * }
    +   * 
    + * + * @see Match + * @see UnallocateAppInstance + * + */ + 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 UnallocateAppInstance.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 UnallocateAppInstance.Matcher create() { + return new Matcher(); + } + + private static final int POSITION_APP = 0; + + private static final Logger LOGGER = ViatraQueryLoggingUtil.getLogger(UnallocateAppInstance.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 pApp the fixed value of pattern parameter App, or null if not bound. + * @return matches represented as a Match object. + * + */ + public Collection getAllMatches(final ApplicationInstance pApp) { + return rawStreamAllMatches(new Object[]{pApp}).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 pApp the fixed value of pattern parameter App, or null if not bound. + * @return a stream of matches represented as a Match object. + * + */ + public Stream streamAllMatches(final ApplicationInstance pApp) { + return rawStreamAllMatches(new Object[]{pApp}); + } + + /** + * 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 pApp the fixed value of pattern parameter App, or null if not bound. + * @return a match represented as a Match object, or null if no match is found. + * + */ + public Optional getOneArbitraryMatch(final ApplicationInstance pApp) { + return rawGetOneArbitraryMatch(new Object[]{pApp}); + } + + /** + * 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 pApp the fixed value of pattern parameter App, or null if not bound. + * @return true if the input is a valid (partial) match of the pattern. + * + */ + public boolean hasMatch(final ApplicationInstance pApp) { + return rawHasMatch(new Object[]{pApp}); + } + + /** + * Returns the number of all matches of the pattern that conform to the given fixed values of some parameters. + * @param pApp the fixed value of pattern parameter App, or null if not bound. + * @return the number of pattern matches found. + * + */ + public int countMatches(final ApplicationInstance pApp) { + return rawCountMatches(new Object[]{pApp}); + } + + /** + * 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 pApp the fixed value of pattern parameter App, 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 ApplicationInstance pApp, final Consumer processor) { + return rawForOneArbitraryMatch(new Object[]{pApp}, 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 pApp the fixed value of pattern parameter App, or null if not bound. + * @return the (partial) match object. + * + */ + public UnallocateAppInstance.Match newMatch(final ApplicationInstance pApp) { + return UnallocateAppInstance.Match.newMatch(pApp); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + protected Stream rawStreamAllValuesOfApp(final Object[] parameters) { + return rawStreamAllValues(POSITION_APP, parameters).map(ApplicationInstance.class::cast); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + public Set getAllValuesOfApp() { + return rawStreamAllValuesOfApp(emptyArray()).collect(Collectors.toSet()); + } + + /** + * Retrieve the set of values that occur in matches for App. + * @return the Set of all values or empty set if there are no matches + * + */ + public Stream streamAllValuesOfApp() { + return rawStreamAllValuesOfApp(emptyArray()); + } + + @Override + protected UnallocateAppInstance.Match tupleToMatch(final Tuple t) { + try { + return UnallocateAppInstance.Match.newMatch((ApplicationInstance) t.get(POSITION_APP)); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in tuple not properly typed!",e); + return null; + } + } + + @Override + protected UnallocateAppInstance.Match arrayToMatch(final Object[] match) { + try { + return UnallocateAppInstance.Match.newMatch((ApplicationInstance) match[POSITION_APP]); + } catch(ClassCastException e) { + LOGGER.error("Element(s) in array not properly typed!",e); + return null; + } + } + + @Override + protected UnallocateAppInstance.Match arrayToMatchMutable(final Object[] match) { + try { + return UnallocateAppInstance.Match.newMutableMatch((ApplicationInstance) match[POSITION_APP]); + } 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 UnallocateAppInstance.instance(); + } + } + + private UnallocateAppInstance() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static UnallocateAppInstance instance() { + try{ + return LazyHolder.INSTANCE; + } catch (ExceptionInInitializerError err) { + throw processInitializerError(err); + } + } + + @Override + protected UnallocateAppInstance.Matcher instantiate(final ViatraQueryEngine engine) { + return UnallocateAppInstance.Matcher.on(engine); + } + + @Override + public UnallocateAppInstance.Matcher instantiate() { + return UnallocateAppInstance.Matcher.create(); + } + + @Override + public UnallocateAppInstance.Match newEmptyMatch() { + return UnallocateAppInstance.Match.newEmptyMatch(); + } + + @Override + public UnallocateAppInstance.Match newMatch(final Object... parameters) { + return UnallocateAppInstance.Match.newMatch((hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance) parameters[0]); + } + + /** + * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.UnallocateAppInstance (visibility: PUBLIC, simpleName: UnallocateAppInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.UnallocateAppInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * not at the class load time of the outer class, + * but rather at the first call to {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.UnallocateAppInstance (visibility: PUBLIC, simpleName: UnallocateAppInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.UnallocateAppInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * + *

    This workaround is required e.g. to support recursion. + * + */ + private static class LazyHolder { + private static final UnallocateAppInstance INSTANCE = new UnallocateAppInstance(); + + /** + * 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 UnallocateAppInstance.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_App = new PParameter("App", "hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ApplicationInstance")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_App); + + private GeneratedPQuery() { + super(PVisibility.PUBLIC); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.unallocateAppInstance"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("App"); + } + + @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_App = body.getOrCreateVariableByName("App"); + PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); + new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_App, parameter_App) + )); + // ApplicationInstance.allocatedTo(App, _) + new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_App, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "allocatedTo"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new Equality(body, var__virtual_0_, var___0_); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/.gitignore index 2f593811..c903a5e9 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/.gitignore @@ -9,3 +9,12 @@ /.FreeHddPercentage.java._trace /.ApplicationInstance.java._trace /.HostInstanceCost.java._trace +/.AvailableHdd.java._trace +/.AvailableMemory.java._trace +/.CpsApplications.java._trace +/.CpsHosts.java._trace +/.TotalHdd.java._trace +/.TotalMemory.java._trace +/.RequiredAppInstances.java._trace +/.UnallocatedAppInstance.java._trace +/.NoHostToAllocateTo.java._trace diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableHdd.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableHdd.java new file mode 100644 index 00000000..7d07b83a --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableHdd.java @@ -0,0 +1,178 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; + +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.HddRequirement; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalHdd; +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.aggregators.sum; +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.IExpressionEvaluator; +import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider; +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.AggregatorConstraint; +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.ExpressionEvaluation; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; +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 availableHdd(Host : HostInstance, Hdd : java Integer) {
    + *         	find totalHdd(Host, TotalHdd);
    + *         	RequiredHdd == sum find hddRequirement(Host, _, #_);
    + *         	Hdd == eval(TotalHdd - RequiredHdd);
    + *         }
    + * 
    + * + * @see GenericPatternMatcher + * @see GenericPatternMatch + * + */ +@SuppressWarnings("all") +public final class AvailableHdd extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { + private AvailableHdd() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static AvailableHdd 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.cps.queries.internal.AvailableHdd (visibility: PUBLIC, simpleName: AvailableHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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.cps.queries.internal.AvailableHdd (visibility: PUBLIC, simpleName: AvailableHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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 AvailableHdd INSTANCE = new AvailableHdd(); + + /** + * 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 AvailableHdd.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_Host = new PParameter("Host", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); + + private final PParameter parameter_Hdd = new PParameter("Hdd", "java.lang.Integer", new JavaTransitiveInstancesKey(java.lang.Integer.class), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_Host, parameter_Hdd); + + private GeneratedPQuery() { + super(PVisibility.PRIVATE); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableHdd"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("Host","Hdd"); + } + + @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_Host = body.getOrCreateVariableByName("Host"); + PVariable var_Hdd = body.getOrCreateVariableByName("Hdd"); + PVariable var_TotalHdd = body.getOrCreateVariableByName("TotalHdd"); + PVariable var_RequiredHdd = body.getOrCreateVariableByName("RequiredHdd"); + PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); + PVariable var___1_ = body.getOrCreateVariableByName("_<1>"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Hdd), new JavaTransitiveInstancesKey(java.lang.Integer.class)); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_Host, parameter_Host), + new ExportedParameter(body, var_Hdd, parameter_Hdd) + )); + // find totalHdd(Host, TotalHdd) + new PositivePatternCall(body, Tuples.flatTupleOf(var_Host, var_TotalHdd), TotalHdd.instance().getInternalQueryRepresentation()); + // RequiredHdd == sum find hddRequirement(Host, _, #_) + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new AggregatorConstraint(new sum().getAggregatorLogic(Integer.class), body, Tuples.flatTupleOf(var_Host, var___0_, var___1_), HddRequirement.instance().getInternalQueryRepresentation(), var__virtual_0_, 2); + new Equality(body, var_RequiredHdd, var__virtual_0_); + // Hdd == eval(TotalHdd - RequiredHdd) + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new ExpressionEvaluation(body, new IExpressionEvaluator() { + + @Override + public String getShortDescription() { + return "Expression evaluation from pattern availableHdd"; + } + + @Override + public Iterable getInputParameterNames() { + return Arrays.asList("RequiredHdd", "TotalHdd");} + + @Override + public Object evaluateExpression(IValueProvider provider) throws Exception { + Integer RequiredHdd = (Integer) provider.getValue("RequiredHdd"); + Integer TotalHdd = (Integer) provider.getValue("TotalHdd"); + return evaluateExpression_1_1(RequiredHdd, TotalHdd); + } + }, var__virtual_1_ ); + new Equality(body, var_Hdd, var__virtual_1_); + bodies.add(body); + } + return bodies; + } + } + + private static int evaluateExpression_1_1(final Integer RequiredHdd, final Integer TotalHdd) { + return ((TotalHdd).intValue() - (RequiredHdd).intValue()); + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableMemory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableMemory.java new file mode 100644 index 00000000..b06544d5 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableMemory.java @@ -0,0 +1,178 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; + +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.MemoryRequirement; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalMemory; +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.aggregators.sum; +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.IExpressionEvaluator; +import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider; +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.AggregatorConstraint; +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.ExpressionEvaluation; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicdeferred.TypeFilterConstraint; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; +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 availableMemory(Host : HostInstance, Memory : java Integer) {
    + *         	find totalMemory(Host, TotalMemory);
    + *         	RequiredMemory == sum find memoryRequirement(Host, _, #_);
    + *         	Memory == eval(TotalMemory - RequiredMemory);
    + *         }
    + * 
    + * + * @see GenericPatternMatcher + * @see GenericPatternMatch + * + */ +@SuppressWarnings("all") +public final class AvailableMemory extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { + private AvailableMemory() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static AvailableMemory 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.cps.queries.internal.AvailableMemory (visibility: PUBLIC, simpleName: AvailableMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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.cps.queries.internal.AvailableMemory (visibility: PUBLIC, simpleName: AvailableMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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 AvailableMemory INSTANCE = new AvailableMemory(); + + /** + * 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 AvailableMemory.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_Host = new PParameter("Host", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); + + private final PParameter parameter_Memory = new PParameter("Memory", "java.lang.Integer", new JavaTransitiveInstancesKey(java.lang.Integer.class), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_Host, parameter_Memory); + + private GeneratedPQuery() { + super(PVisibility.PRIVATE); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.availableMemory"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("Host","Memory"); + } + + @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_Host = body.getOrCreateVariableByName("Host"); + PVariable var_Memory = body.getOrCreateVariableByName("Memory"); + PVariable var_TotalMemory = body.getOrCreateVariableByName("TotalMemory"); + PVariable var_RequiredMemory = body.getOrCreateVariableByName("RequiredMemory"); + PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); + PVariable var___1_ = body.getOrCreateVariableByName("_<1>"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Memory), new JavaTransitiveInstancesKey(java.lang.Integer.class)); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_Host, parameter_Host), + new ExportedParameter(body, var_Memory, parameter_Memory) + )); + // find totalMemory(Host, TotalMemory) + new PositivePatternCall(body, Tuples.flatTupleOf(var_Host, var_TotalMemory), TotalMemory.instance().getInternalQueryRepresentation()); + // RequiredMemory == sum find memoryRequirement(Host, _, #_) + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new AggregatorConstraint(new sum().getAggregatorLogic(Integer.class), body, Tuples.flatTupleOf(var_Host, var___0_, var___1_), MemoryRequirement.instance().getInternalQueryRepresentation(), var__virtual_0_, 2); + new Equality(body, var_RequiredMemory, var__virtual_0_); + // Memory == eval(TotalMemory - RequiredMemory) + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new ExpressionEvaluation(body, new IExpressionEvaluator() { + + @Override + public String getShortDescription() { + return "Expression evaluation from pattern availableMemory"; + } + + @Override + public Iterable getInputParameterNames() { + return Arrays.asList("RequiredMemory", "TotalMemory");} + + @Override + public Object evaluateExpression(IValueProvider provider) throws Exception { + Integer RequiredMemory = (Integer) provider.getValue("RequiredMemory"); + Integer TotalMemory = (Integer) provider.getValue("TotalMemory"); + return evaluateExpression_1_1(RequiredMemory, TotalMemory); + } + }, var__virtual_1_ ); + new Equality(body, var_Memory, var__virtual_1_); + bodies.add(body); + } + return bodies; + } + } + + private static int evaluateExpression_1_1(final Integer RequiredMemory, final Integer TotalMemory) { + return ((TotalMemory).intValue() - (RequiredMemory).intValue()); + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsApplications.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsApplications.java new file mode 100644 index 00000000..23867558 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsApplications.java @@ -0,0 +1,141 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; + +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.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.Tuples; + +/** + * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way. + * + *

    Original source: + *

    + *         private pattern cpsApplications(Cps : CyberPhysicalSystem, AppInstance : ApplicationInstance) {
    + *         	CyberPhysicalSystem.applicationTypes.instances(Cps, AppInstance);
    + *         }
    + * 
    + * + * @see GenericPatternMatcher + * @see GenericPatternMatch + * + */ +@SuppressWarnings("all") +public final class CpsApplications extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { + private CpsApplications() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static CpsApplications 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.cps.queries.internal.CpsApplications (visibility: PUBLIC, simpleName: CpsApplications, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsApplications, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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.cps.queries.internal.CpsApplications (visibility: PUBLIC, simpleName: CpsApplications, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsApplications, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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 CpsApplications INSTANCE = new CpsApplications(); + + /** + * 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 CpsApplications.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_Cps = new PParameter("Cps", "hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "CyberPhysicalSystem")), PParameterDirection.INOUT); + + private final PParameter parameter_AppInstance = new PParameter("AppInstance", "hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ApplicationInstance")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_Cps, parameter_AppInstance); + + private GeneratedPQuery() { + super(PVisibility.PRIVATE); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsApplications"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("Cps","AppInstance"); + } + + @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_Cps = body.getOrCreateVariableByName("Cps"); + PVariable var_AppInstance = body.getOrCreateVariableByName("AppInstance"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Cps), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "CyberPhysicalSystem"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_AppInstance), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_Cps, parameter_Cps), + new ExportedParameter(body, var_AppInstance, parameter_AppInstance) + )); + // CyberPhysicalSystem.applicationTypes.instances(Cps, AppInstance) + new TypeConstraint(body, Tuples.flatTupleOf(var_Cps), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "CyberPhysicalSystem"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Cps, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "CyberPhysicalSystem", "applicationTypes"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationType"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationType", "instances"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + new Equality(body, var__virtual_1_, var_AppInstance); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsHosts.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsHosts.java new file mode 100644 index 00000000..e55bddff --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsHosts.java @@ -0,0 +1,141 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; + +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.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.Tuples; + +/** + * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way. + * + *

    Original source: + *

    + *         private pattern cpsHosts(Cps : CyberPhysicalSystem, HostInstance : HostInstance) {
    + *         	CyberPhysicalSystem.hostTypes.instances(Cps, HostInstance);
    + *         }
    + * 
    + * + * @see GenericPatternMatcher + * @see GenericPatternMatch + * + */ +@SuppressWarnings("all") +public final class CpsHosts extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { + private CpsHosts() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static CpsHosts 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.cps.queries.internal.CpsHosts (visibility: PUBLIC, simpleName: CpsHosts, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsHosts, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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.cps.queries.internal.CpsHosts (visibility: PUBLIC, simpleName: CpsHosts, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsHosts, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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 CpsHosts INSTANCE = new CpsHosts(); + + /** + * 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 CpsHosts.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_Cps = new PParameter("Cps", "hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "CyberPhysicalSystem")), PParameterDirection.INOUT); + + private final PParameter parameter_HostInstance = new PParameter("HostInstance", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_Cps, parameter_HostInstance); + + private GeneratedPQuery() { + super(PVisibility.PRIVATE); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.cpsHosts"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("Cps","HostInstance"); + } + + @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_Cps = body.getOrCreateVariableByName("Cps"); + PVariable var_HostInstance = body.getOrCreateVariableByName("HostInstance"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Cps), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "CyberPhysicalSystem"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_HostInstance), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_Cps, parameter_Cps), + new ExportedParameter(body, var_HostInstance, parameter_HostInstance) + )); + // CyberPhysicalSystem.hostTypes.instances(Cps, HostInstance) + new TypeConstraint(body, Tuples.flatTupleOf(var_Cps), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "CyberPhysicalSystem"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Cps, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "CyberPhysicalSystem", "hostTypes"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostType", "instances"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new Equality(body, var__virtual_1_, var_HostInstance); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsQueriesAll.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsQueriesAll.java index 58b113eb..67f75e1d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsQueriesAll.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsQueriesAll.java @@ -3,29 +3,37 @@ */ package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.Allocate; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AllocationWithoutResourceRequirement; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableHdd; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableMemory; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeHddMetric; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeMemoryMetric; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CostMetric; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsApplications; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsCost; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsHosts; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.GuidanceObjective; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.InstanceDoesNotSatisfyRequirement; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableHdd; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableMemory; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RedundantInstancesOnSameHost; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RemoveHostInstance; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RequirementNotSatisfied; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalHdd; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalMemory; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.UnallocateAppInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableHdd; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableMemory; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsApplications; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsHosts; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.FreeHddPercentage; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.FreeMemoryPercentage; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.HddRequirement; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.HostInstanceCost; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.MemoryRequirement; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.ResourceRequirement; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.NoHostToAllocateTo; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.RequiredAppInstances; import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.SatisfyingInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalHdd; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalMemory; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.UnallocatedAppInstance; import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; /** @@ -57,6 +65,14 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; *

  • costMetric
  • *
  • cpsCost
  • *
  • hostInstanceCost
  • + *
  • allocate
  • + *
  • unallocateAppInstance
  • + *
  • createHostInstance
  • + *
  • removeHostInstance
  • + *
  • unallocatedAppInstance
  • + *
  • requiredAppInstances
  • + *
  • noHostToAllocateTo
  • + *
  • guidanceObjective
  • * * * @see IQueryGroup @@ -104,5 +120,13 @@ public final class CpsQueriesAll extends BaseGeneratedPatternGroup { querySpecifications.add(CostMetric.instance()); querySpecifications.add(CpsCost.instance()); querySpecifications.add(HostInstanceCost.instance()); + querySpecifications.add(Allocate.instance()); + querySpecifications.add(UnallocateAppInstance.instance()); + querySpecifications.add(CreateHostInstance.instance()); + querySpecifications.add(RemoveHostInstance.instance()); + querySpecifications.add(UnallocatedAppInstance.instance()); + querySpecifications.add(RequiredAppInstances.instance()); + querySpecifications.add(NoHostToAllocateTo.instance()); + querySpecifications.add(GuidanceObjective.instance()); } } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeHddPercentage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeHddPercentage.java index 366677b5..c24f46a1 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeHddPercentage.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeHddPercentage.java @@ -3,8 +3,8 @@ */ package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableHdd; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalHdd; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableHdd; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalHdd; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeMemoryPercentage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeMemoryPercentage.java index bd151ea6..c2bb2bb3 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeMemoryPercentage.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeMemoryPercentage.java @@ -3,8 +3,8 @@ */ package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AvailableMemory; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.TotalMemory; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableMemory; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalMemory; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HddRequirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HddRequirement.java index fbe7a46b..68448930 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HddRequirement.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HddRequirement.java @@ -3,7 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.ResourceRequirement; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HostInstanceCost.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HostInstanceCost.java index 767ca342..db7f7021 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HostInstanceCost.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HostInstanceCost.java @@ -3,7 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsHosts; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsHosts; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/MemoryRequirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/MemoryRequirement.java index 0a24d105..d15f9bfa 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/MemoryRequirement.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/MemoryRequirement.java @@ -3,7 +3,7 @@ */ package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; -import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.ResourceRequirement; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement; import java.util.Arrays; import java.util.LinkedHashSet; import java.util.List; diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/NoHostToAllocateTo.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/NoHostToAllocateTo.java new file mode 100644 index 00000000..50597805 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/NoHostToAllocateTo.java @@ -0,0 +1,135 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; + +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.Allocate; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.UnallocatedAppInstance; +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.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.basicdeferred.NegativePatternCall; +import org.eclipse.viatra.query.runtime.matchers.psystem.basicenumerables.PositivePatternCall; +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 noHostToAllocateTo(App : ApplicationInstance) {
    + *         	find unallocatedAppInstance(App);
    + *         	neg find allocate(App, _);
    + *         }
    + * 
    + * + * @see GenericPatternMatcher + * @see GenericPatternMatch + * + */ +@SuppressWarnings("all") +public final class NoHostToAllocateTo extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { + private NoHostToAllocateTo() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static NoHostToAllocateTo 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.cps.queries.internal.NoHostToAllocateTo (visibility: PUBLIC, simpleName: NoHostToAllocateTo, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.NoHostToAllocateTo, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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.cps.queries.internal.NoHostToAllocateTo (visibility: PUBLIC, simpleName: NoHostToAllocateTo, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.NoHostToAllocateTo, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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 NoHostToAllocateTo INSTANCE = new NoHostToAllocateTo(); + + /** + * 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 NoHostToAllocateTo.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_App = new PParameter("App", "hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ApplicationInstance")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_App); + + private GeneratedPQuery() { + super(PVisibility.PRIVATE); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.noHostToAllocateTo"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("App"); + } + + @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_App = body.getOrCreateVariableByName("App"); + PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); + new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_App, parameter_App) + )); + // find unallocatedAppInstance(App) + new PositivePatternCall(body, Tuples.flatTupleOf(var_App), UnallocatedAppInstance.instance().getInternalQueryRepresentation()); + // neg find allocate(App, _) + new NegativePatternCall(body, Tuples.flatTupleOf(var_App, var___0_), Allocate.instance().getInternalQueryRepresentation()); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/RequiredAppInstances.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/RequiredAppInstances.java new file mode 100644 index 00000000..dc76cbde --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/RequiredAppInstances.java @@ -0,0 +1,181 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; + +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.SatisfyingInstance; +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.emf.ecore.EDataType; +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.emf.types.EDataTypeInSlotsKey; +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.context.common.JavaTransitiveInstancesKey; +import org.eclipse.viatra.query.runtime.matchers.psystem.IExpressionEvaluator; +import org.eclipse.viatra.query.runtime.matchers.psystem.IValueProvider; +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.ExpressionEvaluation; +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 requiredAppInstances(Req : Requirement, Remaining : java Integer) {
    + *         	Instances == count find satisfyingInstance(Req, _);
    + *         	Requirement.count(Req, RequiredCount);
    + *         	Remaining == eval(RequiredCount - Instances);
    + *         }
    + * 
    + * + * @see GenericPatternMatcher + * @see GenericPatternMatch + * + */ +@SuppressWarnings("all") +public final class RequiredAppInstances extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { + private RequiredAppInstances() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static RequiredAppInstances 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.cps.queries.internal.RequiredAppInstances (visibility: PUBLIC, simpleName: RequiredAppInstances, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.RequiredAppInstances, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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.cps.queries.internal.RequiredAppInstances (visibility: PUBLIC, simpleName: RequiredAppInstances, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.RequiredAppInstances, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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 RequiredAppInstances INSTANCE = new RequiredAppInstances(); + + /** + * 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 RequiredAppInstances.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_Req = new PParameter("Req", "hu.bme.mit.inf.dslreasoner.domains.cps.Requirement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "Requirement")), PParameterDirection.INOUT); + + private final PParameter parameter_Remaining = new PParameter("Remaining", "java.lang.Integer", new JavaTransitiveInstancesKey(java.lang.Integer.class), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_Req, parameter_Remaining); + + private GeneratedPQuery() { + super(PVisibility.PRIVATE); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.requiredAppInstances"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("Req","Remaining"); + } + + @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_Req = body.getOrCreateVariableByName("Req"); + PVariable var_Remaining = body.getOrCreateVariableByName("Remaining"); + PVariable var_Instances = body.getOrCreateVariableByName("Instances"); + PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); + PVariable var_RequiredCount = body.getOrCreateVariableByName("RequiredCount"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "Requirement"))); + new TypeFilterConstraint(body, Tuples.flatTupleOf(var_Remaining), new JavaTransitiveInstancesKey(java.lang.Integer.class)); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_Req, parameter_Req), + new ExportedParameter(body, var_Remaining, parameter_Remaining) + )); + // Instances == count find satisfyingInstance(Req, _) + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new PatternMatchCounter(body, Tuples.flatTupleOf(var_Req, var___0_), SatisfyingInstance.instance().getInternalQueryRepresentation(), var__virtual_0_); + new Equality(body, var_Instances, var__virtual_0_); + // Requirement.count(Req, RequiredCount) + new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "Requirement"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Req, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "Requirement", "count"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EInt"))); + new Equality(body, var__virtual_1_, var_RequiredCount); + // Remaining == eval(RequiredCount - Instances) + PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); + new ExpressionEvaluation(body, new IExpressionEvaluator() { + + @Override + public String getShortDescription() { + return "Expression evaluation from pattern requiredAppInstances"; + } + + @Override + public Iterable getInputParameterNames() { + return Arrays.asList("Instances", "RequiredCount");} + + @Override + public Object evaluateExpression(IValueProvider provider) throws Exception { + Integer Instances = (Integer) provider.getValue("Instances"); + Integer RequiredCount = (Integer) provider.getValue("RequiredCount"); + return evaluateExpression_1_1(Instances, RequiredCount); + } + }, var__virtual_2_ ); + new Equality(body, var_Remaining, var__virtual_2_); + bodies.add(body); + } + return bodies; + } + } + + private static int evaluateExpression_1_1(final Integer Instances, final Integer RequiredCount) { + return ((RequiredCount).intValue() - (Instances).intValue()); + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/ResourceRequirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/ResourceRequirement.java deleted file mode 100644 index 8c5bdefe..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/ResourceRequirement.java +++ /dev/null @@ -1,168 +0,0 @@ -/** - * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql - */ -package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; - -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.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.Tuples; - -/** - * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way. - * - *

    Original source: - *

    - *         private pattern resourceRequirement(Host : HostInstance, App : ApplicationInstance, Req : ResourceRequirement) {
    - *         	ApplicationInstance.allocatedTo(App, Host);
    - *         	ApplicationInstance.type.requirements(App, Req);
    - *         	HostInstance.type(Host, HostType);
    - *         	ResourceRequirement.hostType(Req, HostType);
    - *         }
    - * 
    - * - * @see GenericPatternMatcher - * @see GenericPatternMatch - * - */ -@SuppressWarnings("all") -public final class ResourceRequirement extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { - private ResourceRequirement() { - super(GeneratedPQuery.INSTANCE); - } - - /** - * @return the singleton instance of the query specification - * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded - * - */ - public static ResourceRequirement 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.cps.queries.internal.ResourceRequirement (visibility: PUBLIC, simpleName: ResourceRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.ResourceRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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.cps.queries.internal.ResourceRequirement (visibility: PUBLIC, simpleName: ResourceRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.ResourceRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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 ResourceRequirement INSTANCE = new ResourceRequirement(); - - /** - * 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 ResourceRequirement.GeneratedPQuery INSTANCE = new GeneratedPQuery(); - - private final PParameter parameter_Host = new PParameter("Host", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); - - private final PParameter parameter_App = new PParameter("App", "hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ApplicationInstance")), PParameterDirection.INOUT); - - private final PParameter parameter_Req = new PParameter("Req", "hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ResourceRequirement")), PParameterDirection.INOUT); - - private final List parameters = Arrays.asList(parameter_Host, parameter_App, parameter_Req); - - private GeneratedPQuery() { - super(PVisibility.PRIVATE); - } - - @Override - public String getFullyQualifiedName() { - return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.resourceRequirement"; - } - - @Override - public List getParameterNames() { - return Arrays.asList("Host","App","Req"); - } - - @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_Host = body.getOrCreateVariableByName("Host"); - PVariable var_App = body.getOrCreateVariableByName("App"); - PVariable var_Req = body.getOrCreateVariableByName("Req"); - PVariable var_HostType = body.getOrCreateVariableByName("HostType"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); - new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); - new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement"))); - body.setSymbolicParameters(Arrays.asList( - new ExportedParameter(body, var_Host, parameter_Host), - new ExportedParameter(body, var_App, parameter_App), - new ExportedParameter(body, var_Req, parameter_Req) - )); - // ApplicationInstance.allocatedTo(App, Host) - new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); - PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); - new TypeConstraint(body, Tuples.flatTupleOf(var_App, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "allocatedTo"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); - new Equality(body, var__virtual_0_, var_Host); - // ApplicationInstance.type.requirements(App, Req) - new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); - PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); - new TypeConstraint(body, Tuples.flatTupleOf(var_App, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "type"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationType"))); - PVariable var__virtual_2_ = body.getOrCreateVariableByName(".virtual{2}"); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_, var__virtual_2_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationType", "requirements"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_2_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement"))); - new Equality(body, var__virtual_2_, var_Req); - // HostInstance.type(Host, HostType) - new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); - PVariable var__virtual_3_ = body.getOrCreateVariableByName(".virtual{3}"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Host, var__virtual_3_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostInstance", "type"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_3_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); - new Equality(body, var__virtual_3_, var_HostType); - // ResourceRequirement.hostType(Req, HostType) - new TypeConstraint(body, Tuples.flatTupleOf(var_Req), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ResourceRequirement"))); - PVariable var__virtual_4_ = body.getOrCreateVariableByName(".virtual{4}"); - new TypeConstraint(body, Tuples.flatTupleOf(var_Req, var__virtual_4_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ResourceRequirement", "hostType"))); - new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_4_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); - new Equality(body, var__virtual_4_, var_HostType); - bodies.add(body); - } - return bodies; - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalHdd.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalHdd.java new file mode 100644 index 00000000..f250f76d --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalHdd.java @@ -0,0 +1,143 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; + +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.emf.ecore.EDataType; +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.emf.types.EDataTypeInSlotsKey; +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.Tuples; + +/** + * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way. + * + *

    Original source: + *

    + *         private pattern totalHdd(Host : HostInstance, Hdd : EInt) {
    + *         	HostInstance.type.defaultHdd(Host, Hdd);
    + *         }
    + * 
    + * + * @see GenericPatternMatcher + * @see GenericPatternMatch + * + */ +@SuppressWarnings("all") +public final class TotalHdd extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { + private TotalHdd() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static TotalHdd 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.cps.queries.internal.TotalHdd (visibility: PUBLIC, simpleName: TotalHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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.cps.queries.internal.TotalHdd (visibility: PUBLIC, simpleName: TotalHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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 TotalHdd INSTANCE = new TotalHdd(); + + /** + * 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 TotalHdd.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_Host = new PParameter("Host", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); + + private final PParameter parameter_Hdd = new PParameter("Hdd", "java.lang.Integer", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EInt")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_Host, parameter_Hdd); + + private GeneratedPQuery() { + super(PVisibility.PRIVATE); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalHdd"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("Host","Hdd"); + } + + @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_Host = body.getOrCreateVariableByName("Host"); + PVariable var_Hdd = body.getOrCreateVariableByName("Hdd"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_Hdd), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EInt"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_Host, parameter_Host), + new ExportedParameter(body, var_Hdd, parameter_Hdd) + )); + // HostInstance.type.defaultHdd(Host, Hdd) + new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Host, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostInstance", "type"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostType", "defaultHdd"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EInt"))); + new Equality(body, var__virtual_1_, var_Hdd); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalMemory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalMemory.java new file mode 100644 index 00000000..aecd97e2 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalMemory.java @@ -0,0 +1,143 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; + +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.emf.ecore.EDataType; +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.emf.types.EDataTypeInSlotsKey; +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.Tuples; + +/** + * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way. + * + *

    Original source: + *

    + *         private pattern totalMemory(Host : HostInstance, Memory : EInt) {
    + *         	HostInstance.type.defaultMemory(Host, Memory);
    + *         }
    + * 
    + * + * @see GenericPatternMatcher + * @see GenericPatternMatch + * + */ +@SuppressWarnings("all") +public final class TotalMemory extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { + private TotalMemory() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static TotalMemory 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.cps.queries.internal.TotalMemory (visibility: PUBLIC, simpleName: TotalMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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.cps.queries.internal.TotalMemory (visibility: PUBLIC, simpleName: TotalMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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 TotalMemory INSTANCE = new TotalMemory(); + + /** + * 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 TotalMemory.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_Host = new PParameter("Host", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); + + private final PParameter parameter_Memory = new PParameter("Memory", "java.lang.Integer", new EDataTypeInSlotsKey((EDataType)getClassifierLiteralSafe("http://www.eclipse.org/emf/2002/Ecore", "EInt")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_Host, parameter_Memory); + + private GeneratedPQuery() { + super(PVisibility.PRIVATE); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.totalMemory"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("Host","Memory"); + } + + @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_Host = body.getOrCreateVariableByName("Host"); + PVariable var_Memory = body.getOrCreateVariableByName("Memory"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new TypeConstraint(body, Tuples.flatTupleOf(var_Memory), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EInt"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_Host, parameter_Host), + new ExportedParameter(body, var_Memory, parameter_Memory) + )); + // HostInstance.type.defaultMemory(Host, Memory) + new TypeConstraint(body, Tuples.flatTupleOf(var_Host), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_Host, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostInstance", "type"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostType"))); + PVariable var__virtual_1_ = body.getOrCreateVariableByName(".virtual{1}"); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_, var__virtual_1_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "HostType", "defaultMemory"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_1_), new EDataTypeInSlotsKey((EDataType)getClassifierLiteral("http://www.eclipse.org/emf/2002/Ecore", "EInt"))); + new Equality(body, var__virtual_1_, var_Memory); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/UnallocatedAppInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/UnallocatedAppInstance.java new file mode 100644 index 00000000..a20b534c --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/UnallocatedAppInstance.java @@ -0,0 +1,172 @@ +/** + * Generated from platform:/resource/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql + */ +package hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal; + +import java.util.Arrays; +import java.util.Collections; +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.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.Tuples; + +/** + * A pattern-specific query specification that can instantiate GenericPatternMatcher in a type-safe way. + * + *

    Original source: + *

    + *         private pattern unallocatedAppInstance(App : ApplicationInstance) {
    + *         	neg ApplicationInstance.allocatedTo(App, _);
    + *         }
    + * 
    + * + * @see GenericPatternMatcher + * @see GenericPatternMatch + * + */ +@SuppressWarnings("all") +public final class UnallocatedAppInstance extends BaseGeneratedEMFQuerySpecificationWithGenericMatcher { + private UnallocatedAppInstance() { + super(GeneratedPQuery.INSTANCE); + } + + /** + * @return the singleton instance of the query specification + * @throws ViatraQueryRuntimeException if the pattern definition could not be loaded + * + */ + public static UnallocatedAppInstance 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.cps.queries.internal.UnallocatedAppInstance (visibility: PUBLIC, simpleName: UnallocatedAppInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.UnallocatedAppInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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.cps.queries.internal.UnallocatedAppInstance (visibility: PUBLIC, simpleName: UnallocatedAppInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.UnallocatedAppInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.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 UnallocatedAppInstance INSTANCE = new UnallocatedAppInstance(); + + /** + * 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 UnallocatedAppInstance.GeneratedPQuery INSTANCE = new GeneratedPQuery(); + + private final PParameter parameter_App = new PParameter("App", "hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ApplicationInstance")), PParameterDirection.INOUT); + + private final List parameters = Arrays.asList(parameter_App); + + private class Embedded_1_ApplicationInstance_allocatedTo extends BaseGeneratedEMFPQuery { + private final PParameter parameter_p0 = new PParameter("p0", "hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "ApplicationInstance")), PParameterDirection.INOUT); + + private final PParameter parameter_p1 = new PParameter("p1", "hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance", new EClassTransitiveInstancesKey((EClass)getClassifierLiteralSafe("http://www.example.org/cps", "HostInstance")), PParameterDirection.INOUT); + + private final List embeddedParameters = Arrays.asList(parameter_p0, parameter_p1); + + public Embedded_1_ApplicationInstance_allocatedTo() { + super(PVisibility.EMBEDDED); + } + + @Override + public String getFullyQualifiedName() { + return GeneratedPQuery.this.getFullyQualifiedName() + "$Embedded_1_ApplicationInstance_allocatedTo"; + } + + @Override + public List getParameters() { + return embeddedParameters; + } + + @Override + public Set doGetContainedBodies() { + PBody body = new PBody(this); + PVariable var_p0 = body.getOrCreateVariableByName("p0"); + PVariable var_p1 = body.getOrCreateVariableByName("p1"); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_p0, parameter_p0), + new ExportedParameter(body, var_p1, parameter_p1) + )); + // ApplicationInstance.allocatedTo(App, _) + new TypeConstraint(body, Tuples.flatTupleOf(var_p0), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + PVariable var__virtual_0_ = body.getOrCreateVariableByName(".virtual{0}"); + new TypeConstraint(body, Tuples.flatTupleOf(var_p0, var__virtual_0_), new EStructuralFeatureInstancesKey(getFeatureLiteral("http://www.example.org/cps", "ApplicationInstance", "allocatedTo"))); + new TypeConstraint(body, Tuples.flatTupleOf(var__virtual_0_), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "HostInstance"))); + new Equality(body, var__virtual_0_, var_p1); + return Collections.singleton(body); + } + } + + private GeneratedPQuery() { + super(PVisibility.PRIVATE); + } + + @Override + public String getFullyQualifiedName() { + return "hu.bme.mit.inf.dslreasoner.domains.cps.queries.unallocatedAppInstance"; + } + + @Override + public List getParameterNames() { + return Arrays.asList("App"); + } + + @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_App = body.getOrCreateVariableByName("App"); + PVariable var___0_ = body.getOrCreateVariableByName("_<0>"); + new TypeConstraint(body, Tuples.flatTupleOf(var_App), new EClassTransitiveInstancesKey((EClass)getClassifierLiteral("http://www.example.org/cps", "ApplicationInstance"))); + body.setSymbolicParameters(Arrays.asList( + new ExportedParameter(body, var_App, parameter_App) + )); + // neg ApplicationInstance.allocatedTo(App, _) + new NegativePatternCall(body, Tuples.flatTupleOf(var_App, var___0_), new UnallocatedAppInstance.GeneratedPQuery.Embedded_1_ApplicationInstance_allocatedTo()); + bodies.add(body); + } + return bodies; + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend new file mode 100644 index 00000000..7ec0f84d --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend @@ -0,0 +1,53 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.cplex + +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage +import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator +import java.io.BufferedReader +import java.io.BufferedWriter +import java.io.FileReader +import java.io.FileWriter +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl +import java.util.concurrent.TimeUnit + +class CbcCpsMain { + static val PROBLEM_FILE = "problem.lp" + static val SOLUTION_FILE = "solution.txt" + + private new() { + new IllegalStateException("This is a static utility class and should not be instantiated directly.") + } + + static def void main(String[] args) { + Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, + new XMIResourceFactoryImpl) + EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE) + val generator = new CpsGenerator(1, 4, 1) + val problem = generator.generateCpsProblem + val toLp = new CpsToLpTranslator(problem, 10, true) + val lp = toLp.lpProblem + val writer = new BufferedWriter(new FileWriter(PROBLEM_FILE)) + try { + writer.append(lp) + } finally { + writer.close + } + val process = new ProcessBuilder().inheritIO.command("cbc", PROBLEM_FILE, "solve", "solu", SOLUTION_FILE).start + if (!process.waitFor(120, TimeUnit.SECONDS)) { + System.err.println("Timeout reached") + process.destroyForcibly + System.exit(-1) + } + if (process.exitValue != 0) { + System.err.println("Unexpected exit value " + process.exitValue) + System.exit(-1) + } + val reader = new BufferedReader(new FileReader(SOLUTION_FILE)) + try { + reader.lines.forEach[println(it)] + } finally { + reader.close + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CpsToLpTranslator.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CpsToLpTranslator.xtend new file mode 100644 index 00000000..c38af3a0 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CpsToLpTranslator.xtend @@ -0,0 +1,171 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.cplex + +import com.google.common.collect.ImmutableList +import com.google.common.collect.ImmutableMap +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement +import java.util.List +import java.util.Map + +class CpsToLpTranslator { + static val MINIMUM_MEMORY_USAGE = 0.25 + static val MINIMUM_HDD_USAGE = 0.25 + + val CyberPhysicalSystem cps + val Map> appInstances + val Map> hostInstances + val boolean breakSymmetry + + new(CyberPhysicalSystem cps, int hostInstanceCount, boolean breakSymmetry) { + this.cps = cps + appInstances = createAppInstances + hostInstances = createHostInstances(hostInstanceCount) + this.breakSymmetry = breakSymmetry + } + + private def createAppInstances() { + val builder = ImmutableMap.builder + var int i = 0 + for (req : requirements) { + val listBuilder = ImmutableList.builder + for (var int j = 0; j < req.count; j++) { + listBuilder.add('''r«i»a«j»''') + } + builder.put(req, listBuilder.build) + i++ + } + builder.build + } + + private def createHostInstances(int hostInstanceCount) { + val builder = ImmutableMap.builder + var int i = 0 + for (hostType : cps.hostTypes) { + val listBuilder = ImmutableList.builder + for (var int j = 0; j < hostInstanceCount; j++) { + listBuilder.add('''h«i»i«j»''') + } + builder.put(hostType, listBuilder.build) + i++ + } + builder.build + } + + def getLpProblem() { + ''' + Minimize + total_cost: «objective» + Subject To + «constraints» + Bounds + «bounds» + Binary + «binaryVariables» + End + ''' + } + + private def getObjective() { + '''«FOR pair : hostInstancesWithType SEPARATOR " + "»«pair.key.cost» «pair.value.existsVariable»«ENDFOR»''' + } + + private def getConstraints() { + ''' + «FOR appPair : appInstancesWithType» + «appPair.value»_allocated: «FOR host : appPair.key.possibleHostInstances SEPARATOR " + "»«getAllocatedToVariable(appPair.value, host)»«ENDFOR» = 1 + «FOR host : appPair.key.possibleHostInstances» + «appPair.value»_to_«host»_exists: «host.existsVariable» - «getAllocatedToVariable(appPair.value, host)» >= 0 + «ENDFOR» + «ENDFOR» + «FOR hostPair : hostInstancesWithType» + «hostPair.value»_mem_use: «FOR appPair : hostPair.key.possibleAppInstancesWithRequirements SEPARATOR " + "»«appPair.key.requiredMemory» «getAllocatedToVariable(appPair.value, hostPair.value)»«ENDFOR» - «hostPair.key.defaultMemory» «hostPair.value.memoryUsageVariable» = 0 + «hostPair.value»_hdd_use: «FOR appPair : hostPair.key.possibleAppInstancesWithRequirements SEPARATOR " + "»«appPair.key.requiredHdd» «getAllocatedToVariable(appPair.value, hostPair.value)»«ENDFOR» - «hostPair.key.defaultHdd» «hostPair.value.hddUsageVariable» = 0 + «ENDFOR» + average_mem: «FOR host : allHostInstances SEPARATOR " + "»«host.memoryUsageVariable» - «MINIMUM_MEMORY_USAGE» «host.existsVariable»«ENDFOR» >= 0 + average_hdd: «FOR host : allHostInstances SEPARATOR " + "»«host.memoryUsageVariable» - «MINIMUM_HDD_USAGE» «host.existsVariable»«ENDFOR» >= 0 + «FOR reqPair : requirements.filter[count > 1].indexed» + «FOR host : reqPair.value.type.requirements.flatMap[hostInstances.get(hostType)]» + r«reqPair.key»_«host»_redundant: «FOR app : appInstances.get(reqPair.value) SEPARATOR " + "»«getAllocatedToVariable(app, host)»«ENDFOR» <= 1 + «ENDFOR» + «ENDFOR» + «IF breakSymmetry» + «FOR hosts : hostInstances.values» + «FOR i : 0 ..< (hosts.size - 1)» + «hosts.get(i + 1)»_after_«hosts.get(i)»: «hosts.get(i).existsVariable» - «hosts.get(i + 1).existsVariable» >= 0 + «ENDFOR» + «ENDFOR» + «ENDIF» + ''' + } + + private def getBounds() { + ''' + «FOR host : allHostInstances» + 0 <= «host.memoryUsageVariable» <= 1 + 0 <= «host.hddUsageVariable» <= 1 + «ENDFOR» + ''' + } + + private def getBinaryVariables() { + ''' + «FOR host : allHostInstances» + «host.existsVariable» + «ENDFOR» + «FOR appPair : appInstancesWithType» + «FOR host : appPair.key.possibleHostInstances» + «getAllocatedToVariable(appPair.value, host)» + «ENDFOR» + «ENDFOR» + ''' + } + + private def getRequirements() { + cps.requests.flatMap[requirements] + } + + private def getAllHostInstances() { + hostInstances.values.flatMap[it] + } + + private def getHostInstancesWithType() { + hostInstances.entrySet.flatMap[pair|pair.value.map[pair.key -> it]] + } + + private def getAppInstancesWithType() { + appInstances.entrySet.flatMap[pair|pair.value.map[pair.key.type -> it]] + } + + private def getPossibleHostInstances(ApplicationType appType) { + appType.requirements.flatMap[req|hostInstances.get(req.hostType)] + } + + private def getPossibleAppInstancesWithRequirements(HostType hostType) { + appInstances.entrySet.flatMap [ pair | + val resourceReq = pair.key.type.requirements.findFirst[it.hostType == hostType] + if (resourceReq === null) { + emptyList + } else { + pair.value.map[resourceReq -> it] + } + ] + } + + private def getExistsVariable(String hostInstance) { + '''«hostInstance»_exists''' + } + + private def getMemoryUsageVariable(String hostInstance) { + '''«hostInstance»_mem''' + } + + private def getHddUsageVariable(String hostInstance) { + '''«hostInstance»_hdd''' + } + + private def getAllocatedToVariable(String appInstance, String hostInstance) { + '''«appInstance»_to_«hostInstance»''' + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/CpsStateCoder.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/CpsStateCoder.xtend new file mode 100644 index 00000000..223cee03 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/CpsStateCoder.xtend @@ -0,0 +1,134 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.dse + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType +import hu.bme.mit.inf.dslreasoner.domains.cps.Request +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement +import org.eclipse.emf.common.notify.Notifier +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.resource.ResourceSet +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.xtend2.lib.StringConcatenationClient + +class CpsStateCoder implements IStateCoder { + CyberPhysicalSystem cps + + protected new() { + } + + override init(Notifier notifier) { + cps = switch (notifier) { + ResourceSet: getCpsFromResourceSet(notifier) + Resource: getCpsFromResource(notifier) + CyberPhysicalSystem: notifier + default: throw new IllegalArgumentException("notifier is not a CyberPhysicalSystem") + } + } + + private def getCpsFromResourceSet(ResourceSet resourceSet) { + if (resourceSet.resources.empty) { + throw new IllegalArgumentException("No Resource in ResourceSet") + } + val resource = resourceSet.resources.head + getCpsFromResource(resource) + } + + private def getCpsFromResource(Resource resource) { + if (resource.contents.empty) { + throw new IllegalArgumentException("No EObject in Resource") + } + val cps = resource.contents.head + if (cps instanceof CyberPhysicalSystem) { + cps + } else { + throw new IllegalArgumentException("EObject in Resource is not a CyberPhysicalSystem") + } + } + + override String createStateCode() { + '''«createRequestsCode»«createHostTypesCode»''' + } + + private def StringConcatenationClient createRequestsCode() { + '''«FOR request : cps.requests»«createRequestCode(request)»«ENDFOR»''' + } + + private def StringConcatenationClient createRequestCode(Request request) { + '''[«FOR requirement : request.requirements»«createRequirementCode(requirement)»«ENDFOR»]''' + } + + private def StringConcatenationClient createRequirementCode(Requirement requirement) { + '''[«FOR app : requirement.instances SEPARATOR ","»«createAppCode(app)»«ENDFOR»]''' + } + + private def createAppCode(ApplicationInstance app) { + if (app.allocatedTo === null) { + "-" + } else { + createMatchArgumentCode(app.allocatedTo) + } + } + + private def createHostTypesCode() { + '''(«FOR hostType : cps.hostTypes SEPARATOR ","»«hostType.instances.size»«ENDFOR»)''' + } + + override String createActivationCode(IPatternMatch match) { + '''«match.specification.simpleName»(«FOR arg : match.toArray SEPARATOR ","»«createMatchArgumentCode(arg)»«ENDFOR»)''' + } + + protected dispatch def String createMatchArgumentCode(Requirement requirement) { + val request = requirement.eContainer + if (request instanceof Request) { + if (request.eContainer != cps) { + throw new IllegalArgumentException("Request is not contained in the CPS") + } + val requestIndex = cps.requests.indexOf(request) + val requirementIndex = request.requirements.indexOf(requirement) + requestIndex + "." + requirementIndex + } else { + throw new IllegalArgumentException("Requirement is not contained in a request") + } + } + + protected dispatch def String createMatchArgumentCode(ApplicationInstance app) { + val requirement = app.requirement + if (requirement === null) { + throw new IllegalArgumentException("Application instance is not associated with a requirement") + } + val instanceIndex = requirement.instances.indexOf(app) + createMatchArgumentCode(requirement) + "." + instanceIndex + } + + protected dispatch def String createMatchArgumentCode(HostInstance host) { + val hostType = host.eContainer + if (hostType instanceof HostType) { + val hostIndex = hostType.instances.indexOf(host) + createMatchArgumentCode(hostType) + "." + hostIndex + } else { + throw new IllegalArgumentException("Host is not contained in a host type") + } + } + + protected dispatch def String createMatchArgumentCode(HostType hostType) { + if (hostType.eContainer != cps) { + throw new IllegalArgumentException("Host type is not contained in the CPS") + } + val hostTypeIndex = cps.hostTypes.indexOf(hostType) + hostTypeIndex.toString + } + + protected dispatch def createMatchArgumentCode(Object object) { + throw new IllegalArgumentException("Unknown match argument: ") + } + + static class Factory implements IStateCoderFactory { + override createStateCoder() { + new CpsStateCoder + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.xtend new file mode 100644 index 00000000..b2cc0063 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.xtend @@ -0,0 +1,39 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.dse + +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage +import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsQueries +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EStructuralFeature +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl +import org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory +import org.eclipse.viatra.addon.querybasedfeatures.runtime.handler.QueryBasedFeatures +import org.eclipse.viatra.dse.api.DesignSpaceExplorer +import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel +import org.eclipse.viatra.query.runtime.extensibility.SingletonQueryGroupProvider +import org.eclipse.viatra.query.runtime.registry.QuerySpecificationRegistry +import org.eclipse.viatra.query.runtime.registry.connector.QueryGroupProviderSourceConnector + +class RuleBasedCpsMain { + private new() { + new IllegalStateException("This is a static utility class and should not be instantiated directly.") + } + + static def void main(String[] args) { + DesignSpaceExplorer.turnOnLogging(DseLoggingLevel.VERBOSE_FULL) + Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, + new XMIResourceFactoryImpl) + EStructuralFeature.Internal.SettingDelegate.Factory.Registry.INSTANCE.put(QueryBasedFeatures.ANNOTATION_SOURCE, + new QueryBasedFeatureSettingDelegateFactory) + EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE) + QuerySpecificationRegistry.instance.addSource( + new QueryGroupProviderSourceConnector("CpsQueries", new SingletonQueryGroupProvider(CpsQueries.instance), + true)) + val generator = new CpsGenerator(1, 4, 1) + val problem = generator.generateCpsProblem +// problem.eResource.save(emptyMap) + val solver = new RuleBasedCpsSolver + solver.solve(problem) + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend new file mode 100644 index 00000000..e4c758f0 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend @@ -0,0 +1,74 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.dse + +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsFactory +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.Allocate +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeHddMetric +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeMemoryMetric +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CostMetric +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.GuidanceObjective +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RequirementNotSatisfied +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CompositeDirectionalThresholdObjective +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.viatrasolver.reasoner.optimization.QueryBasedObjective +import org.eclipse.viatra.dse.api.DesignSpaceExplorer +import org.eclipse.viatra.dse.evolutionary.EvolutionaryStrategyBuilder +import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRuleFactory + +class RuleBasedCpsSolver { + extension val BatchTransformationRuleFactory = new BatchTransformationRuleFactory + extension val CpsFactory = CpsFactory.eINSTANCE + + def solve(CyberPhysicalSystem problem) { +// for (request : problem.requests) { +// for (req : request.requirements) { +// for (i : 0 ..< req.count) { +// val app = createApplicationInstance +// req.type.instances += app +// req.instances += app +// } +// } +// } + val dse = new DesignSpaceExplorer + dse.addMetaModelPackage(CpsPackage.eINSTANCE) + dse.initialModel = problem.eResource.resourceSet + dse.addTransformationRule(createRule(RequirementNotSatisfied.instance).action [ + val app = createApplicationInstance + req.type.instances += app + req.instances += app + ].build) + dse.addTransformationRule(createRule(Allocate.instance).action [ + app.allocatedTo = host + ].build) +// dse.addTransformationRule(createRule(UnallocateAppInstance.instance).action [ +// app.allocatedTo = null +// ].build) + dse.addTransformationRule(createRule(CreateHostInstance.instance).action [ + hostType.instances += createHostInstance + ].build) +// dse.addTransformationRule(createRule(RemoveHostInstance.instance).action [ +// hostInstance.type.instances -= hostInstance +// ].build) + dse.addObjective( + new CompositeDirectionalThresholdObjective("Composite", + new QueryBasedObjective(GuidanceObjective.instance, ObjectiveKind.LOWER_IS_BETTER, + new ObjectiveThreshold.Inclusive(0), 0), + new QueryBasedObjective(AverageFreeMemoryMetric.instance, ObjectiveKind.LOWER_IS_BETTER, + new ObjectiveThreshold.Inclusive(0.75), 0), + new QueryBasedObjective(AverageFreeHddMetric.instance, ObjectiveKind.LOWER_IS_BETTER, + new ObjectiveThreshold.Inclusive(0.75), 0))) + dse.addObjective( + new QueryBasedObjective(CostMetric.instance, ObjectiveKind.LOWER_IS_BETTER, + ObjectiveThreshold.NO_THRESHOLD, 0)) + dse.maxNumberOfThreads = 1 + dse.stateCoderFactory = new CpsStateCoder.Factory + val strategy = EvolutionaryStrategyBuilder.createNsga2Strategy(25) + dse.startExplorationWithTimeout(strategy, 2 * 60 * 1000) + for (solution : dse.solutions) { + println("Found solution: " + solution.stateCode + " " + solution.arbitraryTrajectory.fitness) + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend index 0a510f0f..390d13d3 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend @@ -5,6 +5,8 @@ import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem import hu.bme.mit.inf.dslreasoner.domains.cps.HostType import java.util.Collection import java.util.Random +import org.eclipse.emf.common.util.URI +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl class CpsGenerator { extension val CpsFactory = CpsFactory.eINSTANCE @@ -28,8 +30,11 @@ class CpsGenerator { } def generateCpsProblem() { + val resourceSet = new ResourceSetImpl + val resource = resourceSet.createResource(URI.createFileURI("dummy.dummyext")) createCyberPhysicalSystem => [ val cps = it + resource.contents += cps createLowCpuHostTypes val highCpuHostTypes = createHighCpuHostTypes for (var int i = 0; i < applicationTypeCount; i++) { @@ -58,6 +63,7 @@ class CpsGenerator { val hdd = nextInt(MIN_HDD, MAX_HDD) for (hostType : allowedHostTypes) { appType.requirements += createResourceRequirement => [ + it.hostType = hostType requiredMemory = memory requiredHdd = hdd ] @@ -83,6 +89,7 @@ class CpsGenerator { private def createHostType(CyberPhysicalSystem it, int cost, int memory, int hdd) { val hostType = createHostType => [ + it.cost = cost defaultMemory = memory defaultHdd = hdd ] diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql index 40337443..aa78dc38 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsQueries.vql @@ -3,28 +3,23 @@ package hu.bme.mit.inf.dslreasoner.domains.cps.queries import "http://www.eclipse.org/emf/2002/Ecore" import "http://www.example.org/cps" -@QueryBasedFeature(feature = "applications") -pattern cpsApplications(Cps : CyberPhysicalSystem, AppInstance : ApplicationInstance) { +private pattern cpsApplications(Cps : CyberPhysicalSystem, AppInstance : ApplicationInstance) { CyberPhysicalSystem.applicationTypes.instances(Cps, AppInstance); } -@QueryBasedFeature(feature = "hosts") -pattern cpsHosts(Cps : CyberPhysicalSystem, HostInstance : HostInstance) { +private pattern cpsHosts(Cps : CyberPhysicalSystem, HostInstance : HostInstance) { CyberPhysicalSystem.hostTypes.instances(Cps, HostInstance); } -@QueryBasedFeature(feature = "totalMemory") -pattern totalMemory(Host : HostInstance, Memory : EInt) { +private pattern totalMemory(Host : HostInstance, Memory : EInt) { HostInstance.type.defaultMemory(Host, Memory); } -@QueryBasedFeature(feature = "totalHdd") -pattern totalHdd(Host : HostInstance, Hdd : EInt) { +private pattern totalHdd(Host : HostInstance, Hdd : EInt) { HostInstance.type.defaultHdd(Host, Hdd); } -@QueryBasedFeature(feature = "availableMemory") -pattern availableMemory(Host : HostInstance, Memory : java Integer) { +private pattern availableMemory(Host : HostInstance, Memory : java Integer) { find totalMemory(Host, TotalMemory); RequiredMemory == sum find memoryRequirement(Host, _, #_); Memory == eval(TotalMemory - RequiredMemory); @@ -35,8 +30,7 @@ private pattern memoryRequirement(Host : HostInstance, App : ApplicationInstance ResourceRequirement.requiredMemory(Req, Memory); } -@QueryBasedFeature(feature = "availableHdd") -pattern availableHdd(Host : HostInstance, Hdd : java Integer) { +private pattern availableHdd(Host : HostInstance, Hdd : java Integer) { find totalHdd(Host, TotalHdd); RequiredHdd == sum find hddRequirement(Host, _, #_); Hdd == eval(TotalHdd - RequiredHdd); @@ -47,7 +41,7 @@ private pattern hddRequirement(Host : HostInstance, App : ApplicationInstance, H ResourceRequirement.requiredHdd(Req, Hdd); } -private pattern resourceRequirement(Host : HostInstance, App : ApplicationInstance, Req : ResourceRequirement) { +pattern resourceRequirement(Host : HostInstance, App : ApplicationInstance, Req : ResourceRequirement) { ApplicationInstance.allocatedTo(App, Host); ApplicationInstance.type.requirements(App, Req); HostInstance.type(Host, HostType); @@ -106,6 +100,12 @@ pattern redundantInstancesOnSameHost(Req : Requirement) { ApplicationInstance.allocatedTo(App2, Host); } +// +// Metrics +// + +// Free memory + pattern averageFreeMemoryMetric(Average : java Double) { Average == avg find freeMemoryPercentage(_, #_); } @@ -116,6 +116,8 @@ private pattern freeMemoryPercentage(Host : HostInstance, Free : java Double) { Free == eval((Available as double) / Total); } +// Free HDD + pattern averageFreeHddMetric(Average : java Double) { Average == avg find freeHddPercentage(_, #_); } @@ -126,6 +128,8 @@ private pattern freeHddPercentage(Host : HostInstance, Free : java Double) { Free == eval((Available as double) / Total); } +// Total cost + pattern costMetric(Cost : java Integer) { Cost == sum find cpsCost(_, #_); } @@ -140,3 +144,55 @@ private pattern hostInstanceCost(Cps : CyberPhysicalSystem, Host : HostInstance, find cpsHosts(Cps, Host); HostInstance.type.cost(Host, Cost); } + +// +// Transformation rule preconditions for rule-based DSE +// + +pattern allocate(App : ApplicationInstance, Host : HostInstance) { + ApplicationInstance.type.requirements(App, Req); + ResourceRequirement.hostType.instances(Req, Host); + find unallocatedAppInstance(App); + find availableMemory(Host, AvailableMem); + find availableHdd(Host, AvailableHdd); + ResourceRequirement.requiredMemory(Req, RequiredMem); + ResourceRequirement.requiredHdd(Req, RequiredHdd); + check(AvailableMem >= RequiredMem); + check(AvailableHdd >= RequiredHdd); + neg ApplicationInstance.requirement.instances.allocatedTo(App, Host); +} + +pattern unallocateAppInstance(App : ApplicationInstance) { + ApplicationInstance.allocatedTo(App, _); +} + +pattern createHostInstance(HostType : HostType) { + find unallocatedAppInstance(App); + ApplicationInstance.type.requirements.hostType(App, HostType); +} + +pattern removeHostInstance(HostInstance : HostInstance) { + neg HostInstance.applications(HostInstance, _); +} + +private pattern unallocatedAppInstance(App : ApplicationInstance) { + neg ApplicationInstance.allocatedTo(App, _); +} + +private pattern requiredAppInstances(Req : Requirement, Remaining : java Integer) { + Instances == count find satisfyingInstance(Req, _); + Requirement.count(Req, RequiredCount); + Remaining == eval(RequiredCount - Instances); +} + +private pattern noHostToAllocateTo(App : ApplicationInstance) { + find unallocatedAppInstance(App); + neg find allocate(App, _); +} + +pattern guidanceObjective(Value : java Integer) { + UnallocatedInstances == count find unallocatedAppInstance(_); + RequiredInstances == sum find requiredAppInstances(_, #_); + NoHostToAllocate == count find noHostToAllocateTo(_); + Value == eval(2 * UnallocatedInstances + 4 * RequiredInstances + NoHostToAllocate); +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin new file mode 100644 index 00000000..3f9e895d Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin new file mode 100644 index 00000000..d8814a3b Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.gitignore new file mode 100644 index 00000000..9f908c7a --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.gitignore @@ -0,0 +1,2 @@ +/.CpsToLpTranslator.java._trace +/.CbcCpsMain.java._trace diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java new file mode 100644 index 00000000..d36cdccd --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java @@ -0,0 +1,77 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.cplex; + +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.cplex.CpsToLpTranslator; +import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.FileReader; +import java.io.FileWriter; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import java.util.function.Consumer; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.xtext.xbase.lib.Exceptions; +import org.eclipse.xtext.xbase.lib.InputOutput; + +@SuppressWarnings("all") +public class CbcCpsMain { + private static final String PROBLEM_FILE = "problem.lp"; + + private static final String SOLUTION_FILE = "solution.txt"; + + private CbcCpsMain() { + new IllegalStateException("This is a static utility class and should not be instantiated directly."); + } + + public static void main(final String[] args) { + try { + Map _extensionToFactoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(); + XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); + _extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, _xMIResourceFactoryImpl); + EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE); + final CpsGenerator generator = new CpsGenerator(1, 4, 1); + final CyberPhysicalSystem problem = generator.generateCpsProblem(); + final CpsToLpTranslator toLp = new CpsToLpTranslator(problem, 10, true); + final CharSequence lp = toLp.getLpProblem(); + FileWriter _fileWriter = new FileWriter(CbcCpsMain.PROBLEM_FILE); + final BufferedWriter writer = new BufferedWriter(_fileWriter); + try { + writer.append(lp); + } finally { + writer.close(); + } + final Process process = new ProcessBuilder().inheritIO().command("cbc", CbcCpsMain.PROBLEM_FILE, "solve", "solu", CbcCpsMain.SOLUTION_FILE).start(); + boolean _waitFor = process.waitFor(120, TimeUnit.SECONDS); + boolean _not = (!_waitFor); + if (_not) { + System.err.println("Timeout reached"); + process.destroyForcibly(); + System.exit((-1)); + } + int _exitValue = process.exitValue(); + boolean _notEquals = (_exitValue != 0); + if (_notEquals) { + int _exitValue_1 = process.exitValue(); + String _plus = ("Unexpected exit value " + Integer.valueOf(_exitValue_1)); + System.err.println(_plus); + System.exit((-1)); + } + FileReader _fileReader = new FileReader(CbcCpsMain.SOLUTION_FILE); + final BufferedReader reader = new BufferedReader(_fileReader); + try { + final Consumer _function = (String it) -> { + InputOutput.println(it); + }; + reader.lines().forEach(_function); + } finally { + reader.close(); + } + } catch (Throwable _e) { + throw Exceptions.sneakyThrow(_e); + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CpsToLpTranslator.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CpsToLpTranslator.java new file mode 100644 index 00000000..20afeee6 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CpsToLpTranslator.java @@ -0,0 +1,505 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.cplex; + +import com.google.common.base.Objects; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.Request; +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; +import hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement; +import java.util.Collection; +import java.util.List; +import java.util.Map; +import org.eclipse.emf.common.util.EList; +import org.eclipse.xtend2.lib.StringConcatenation; +import org.eclipse.xtext.xbase.lib.CollectionLiterals; +import org.eclipse.xtext.xbase.lib.ExclusiveRange; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; +import org.eclipse.xtext.xbase.lib.ListExtensions; +import org.eclipse.xtext.xbase.lib.Pair; + +@SuppressWarnings("all") +public class CpsToLpTranslator { + private static final double MINIMUM_MEMORY_USAGE = 0.25; + + private static final double MINIMUM_HDD_USAGE = 0.25; + + private final CyberPhysicalSystem cps; + + private final Map> appInstances; + + private final Map> hostInstances; + + private final boolean breakSymmetry; + + public CpsToLpTranslator(final CyberPhysicalSystem cps, final int hostInstanceCount, final boolean breakSymmetry) { + this.cps = cps; + this.appInstances = this.createAppInstances(); + this.hostInstances = this.createHostInstances(hostInstanceCount); + this.breakSymmetry = breakSymmetry; + } + + private ImmutableMap> createAppInstances() { + ImmutableMap> _xblockexpression = null; + { + final ImmutableMap.Builder> builder = ImmutableMap.>builder(); + int i = 0; + Iterable _requirements = this.getRequirements(); + for (final Requirement req : _requirements) { + { + final ImmutableList.Builder listBuilder = ImmutableList.builder(); + for (int j = 0; (j < req.getCount()); j++) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("r"); + _builder.append(i); + _builder.append("a"); + _builder.append(j); + listBuilder.add(_builder.toString()); + } + builder.put(req, listBuilder.build()); + i++; + } + } + _xblockexpression = builder.build(); + } + return _xblockexpression; + } + + private ImmutableMap> createHostInstances(final int hostInstanceCount) { + ImmutableMap> _xblockexpression = null; + { + final ImmutableMap.Builder> builder = ImmutableMap.>builder(); + int i = 0; + EList _hostTypes = this.cps.getHostTypes(); + for (final HostType hostType : _hostTypes) { + { + final ImmutableList.Builder listBuilder = ImmutableList.builder(); + for (int j = 0; (j < hostInstanceCount); j++) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("h"); + _builder.append(i); + _builder.append("i"); + _builder.append(j); + listBuilder.add(_builder.toString()); + } + builder.put(hostType, listBuilder.build()); + i++; + } + } + _xblockexpression = builder.build(); + } + return _xblockexpression; + } + + public CharSequence getLpProblem() { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("Minimize"); + _builder.newLine(); + _builder.append("\t"); + _builder.append("total_cost: "); + CharSequence _objective = this.getObjective(); + _builder.append(_objective, "\t"); + _builder.newLineIfNotEmpty(); + _builder.append("Subject To"); + _builder.newLine(); + _builder.append("\t"); + CharSequence _constraints = this.getConstraints(); + _builder.append(_constraints, "\t"); + _builder.newLineIfNotEmpty(); + _builder.append("Bounds"); + _builder.newLine(); + _builder.append("\t"); + CharSequence _bounds = this.getBounds(); + _builder.append(_bounds, "\t"); + _builder.newLineIfNotEmpty(); + _builder.append("Binary"); + _builder.newLine(); + _builder.append("\t"); + CharSequence _binaryVariables = this.getBinaryVariables(); + _builder.append(_binaryVariables, "\t"); + _builder.newLineIfNotEmpty(); + _builder.append("End"); + _builder.newLine(); + return _builder; + } + + private CharSequence getObjective() { + StringConcatenation _builder = new StringConcatenation(); + { + Iterable> _hostInstancesWithType = this.getHostInstancesWithType(); + boolean _hasElements = false; + for(final Pair pair : _hostInstancesWithType) { + if (!_hasElements) { + _hasElements = true; + } else { + _builder.appendImmediate(" + ", ""); + } + int _cost = pair.getKey().getCost(); + _builder.append(_cost); + _builder.append(" "); + CharSequence _existsVariable = this.getExistsVariable(pair.getValue()); + _builder.append(_existsVariable); + } + } + return _builder; + } + + private CharSequence getConstraints() { + StringConcatenation _builder = new StringConcatenation(); + { + Iterable> _appInstancesWithType = this.getAppInstancesWithType(); + for(final Pair appPair : _appInstancesWithType) { + String _value = appPair.getValue(); + _builder.append(_value); + _builder.append("_allocated: "); + { + Iterable _possibleHostInstances = this.getPossibleHostInstances(appPair.getKey()); + boolean _hasElements = false; + for(final String host : _possibleHostInstances) { + if (!_hasElements) { + _hasElements = true; + } else { + _builder.appendImmediate(" + ", ""); + } + CharSequence _allocatedToVariable = this.getAllocatedToVariable(appPair.getValue(), host); + _builder.append(_allocatedToVariable); + } + } + _builder.append(" = 1"); + _builder.newLineIfNotEmpty(); + { + Iterable _possibleHostInstances_1 = this.getPossibleHostInstances(appPair.getKey()); + for(final String host_1 : _possibleHostInstances_1) { + String _value_1 = appPair.getValue(); + _builder.append(_value_1); + _builder.append("_to_"); + _builder.append(host_1); + _builder.append("_exists: "); + CharSequence _existsVariable = this.getExistsVariable(host_1); + _builder.append(_existsVariable); + _builder.append(" - "); + CharSequence _allocatedToVariable_1 = this.getAllocatedToVariable(appPair.getValue(), host_1); + _builder.append(_allocatedToVariable_1); + _builder.append(" >= 0"); + _builder.newLineIfNotEmpty(); + } + } + } + } + { + Iterable> _hostInstancesWithType = this.getHostInstancesWithType(); + for(final Pair hostPair : _hostInstancesWithType) { + String _value_2 = hostPair.getValue(); + _builder.append(_value_2); + _builder.append("_mem_use: "); + { + Iterable> _possibleAppInstancesWithRequirements = this.getPossibleAppInstancesWithRequirements(hostPair.getKey()); + boolean _hasElements_1 = false; + for(final Pair appPair_1 : _possibleAppInstancesWithRequirements) { + if (!_hasElements_1) { + _hasElements_1 = true; + } else { + _builder.appendImmediate(" + ", ""); + } + int _requiredMemory = appPair_1.getKey().getRequiredMemory(); + _builder.append(_requiredMemory); + _builder.append(" "); + CharSequence _allocatedToVariable_2 = this.getAllocatedToVariable(appPair_1.getValue(), hostPair.getValue()); + _builder.append(_allocatedToVariable_2); + } + } + _builder.append(" - "); + int _defaultMemory = hostPair.getKey().getDefaultMemory(); + _builder.append(_defaultMemory); + _builder.append(" "); + CharSequence _memoryUsageVariable = this.getMemoryUsageVariable(hostPair.getValue()); + _builder.append(_memoryUsageVariable); + _builder.append(" = 0"); + _builder.newLineIfNotEmpty(); + String _value_3 = hostPair.getValue(); + _builder.append(_value_3); + _builder.append("_hdd_use: "); + { + Iterable> _possibleAppInstancesWithRequirements_1 = this.getPossibleAppInstancesWithRequirements(hostPair.getKey()); + boolean _hasElements_2 = false; + for(final Pair appPair_2 : _possibleAppInstancesWithRequirements_1) { + if (!_hasElements_2) { + _hasElements_2 = true; + } else { + _builder.appendImmediate(" + ", ""); + } + int _requiredHdd = appPair_2.getKey().getRequiredHdd(); + _builder.append(_requiredHdd); + _builder.append(" "); + CharSequence _allocatedToVariable_3 = this.getAllocatedToVariable(appPair_2.getValue(), hostPair.getValue()); + _builder.append(_allocatedToVariable_3); + } + } + _builder.append(" - "); + int _defaultHdd = hostPair.getKey().getDefaultHdd(); + _builder.append(_defaultHdd); + _builder.append(" "); + CharSequence _hddUsageVariable = this.getHddUsageVariable(hostPair.getValue()); + _builder.append(_hddUsageVariable); + _builder.append(" = 0"); + _builder.newLineIfNotEmpty(); + } + } + _builder.append("average_mem: "); + { + Iterable _allHostInstances = this.getAllHostInstances(); + boolean _hasElements_3 = false; + for(final String host_2 : _allHostInstances) { + if (!_hasElements_3) { + _hasElements_3 = true; + } else { + _builder.appendImmediate(" + ", ""); + } + CharSequence _memoryUsageVariable_1 = this.getMemoryUsageVariable(host_2); + _builder.append(_memoryUsageVariable_1); + _builder.append(" - "); + _builder.append(CpsToLpTranslator.MINIMUM_MEMORY_USAGE); + _builder.append(" "); + CharSequence _existsVariable_1 = this.getExistsVariable(host_2); + _builder.append(_existsVariable_1); + } + } + _builder.append(" >= 0"); + _builder.newLineIfNotEmpty(); + _builder.append("average_hdd: "); + { + Iterable _allHostInstances_1 = this.getAllHostInstances(); + boolean _hasElements_4 = false; + for(final String host_3 : _allHostInstances_1) { + if (!_hasElements_4) { + _hasElements_4 = true; + } else { + _builder.appendImmediate(" + ", ""); + } + CharSequence _memoryUsageVariable_2 = this.getMemoryUsageVariable(host_3); + _builder.append(_memoryUsageVariable_2); + _builder.append(" - "); + _builder.append(CpsToLpTranslator.MINIMUM_HDD_USAGE); + _builder.append(" "); + CharSequence _existsVariable_2 = this.getExistsVariable(host_3); + _builder.append(_existsVariable_2); + } + } + _builder.append(" >= 0"); + _builder.newLineIfNotEmpty(); + { + final Function1 _function = (Requirement it) -> { + int _count = it.getCount(); + return Boolean.valueOf((_count > 1)); + }; + Iterable> _indexed = IterableExtensions.indexed(IterableExtensions.filter(this.getRequirements(), _function)); + for(final Pair reqPair : _indexed) { + { + final Function1> _function_1 = (ResourceRequirement it) -> { + return this.hostInstances.get(it.getHostType()); + }; + Iterable _flatMap = IterableExtensions.flatMap(reqPair.getValue().getType().getRequirements(), _function_1); + for(final String host_4 : _flatMap) { + _builder.append("r"); + Integer _key = reqPair.getKey(); + _builder.append(_key); + _builder.append("_"); + _builder.append(host_4); + _builder.append("_redundant: "); + { + List _get = this.appInstances.get(reqPair.getValue()); + boolean _hasElements_5 = false; + for(final String app : _get) { + if (!_hasElements_5) { + _hasElements_5 = true; + } else { + _builder.appendImmediate(" + ", ""); + } + CharSequence _allocatedToVariable_4 = this.getAllocatedToVariable(app, host_4); + _builder.append(_allocatedToVariable_4); + } + } + _builder.append(" <= 1"); + _builder.newLineIfNotEmpty(); + } + } + } + } + { + if (this.breakSymmetry) { + { + Collection> _values = this.hostInstances.values(); + for(final List hosts : _values) { + { + int _size = hosts.size(); + int _minus = (_size - 1); + ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _minus, true); + for(final Integer i : _doubleDotLessThan) { + String _get_1 = hosts.get(((i).intValue() + 1)); + _builder.append(_get_1); + _builder.append("_after_"); + String _get_2 = hosts.get((i).intValue()); + _builder.append(_get_2); + _builder.append(": "); + CharSequence _existsVariable_3 = this.getExistsVariable(hosts.get((i).intValue())); + _builder.append(_existsVariable_3); + _builder.append(" - "); + CharSequence _existsVariable_4 = this.getExistsVariable(hosts.get(((i).intValue() + 1))); + _builder.append(_existsVariable_4); + _builder.append(" >= 0"); + _builder.newLineIfNotEmpty(); + } + } + } + } + } + } + return _builder; + } + + private CharSequence getBounds() { + StringConcatenation _builder = new StringConcatenation(); + { + Iterable _allHostInstances = this.getAllHostInstances(); + for(final String host : _allHostInstances) { + _builder.append("0 <= "); + CharSequence _memoryUsageVariable = this.getMemoryUsageVariable(host); + _builder.append(_memoryUsageVariable); + _builder.append(" <= 1"); + _builder.newLineIfNotEmpty(); + _builder.append("0 <= "); + CharSequence _hddUsageVariable = this.getHddUsageVariable(host); + _builder.append(_hddUsageVariable); + _builder.append(" <= 1"); + _builder.newLineIfNotEmpty(); + } + } + return _builder; + } + + private CharSequence getBinaryVariables() { + StringConcatenation _builder = new StringConcatenation(); + { + Iterable _allHostInstances = this.getAllHostInstances(); + for(final String host : _allHostInstances) { + CharSequence _existsVariable = this.getExistsVariable(host); + _builder.append(_existsVariable); + _builder.newLineIfNotEmpty(); + } + } + { + Iterable> _appInstancesWithType = this.getAppInstancesWithType(); + for(final Pair appPair : _appInstancesWithType) { + { + Iterable _possibleHostInstances = this.getPossibleHostInstances(appPair.getKey()); + for(final String host_1 : _possibleHostInstances) { + CharSequence _allocatedToVariable = this.getAllocatedToVariable(appPair.getValue(), host_1); + _builder.append(_allocatedToVariable); + _builder.newLineIfNotEmpty(); + } + } + } + } + return _builder; + } + + private Iterable getRequirements() { + final Function1> _function = (Request it) -> { + return it.getRequirements(); + }; + return IterableExtensions.flatMap(this.cps.getRequests(), _function); + } + + private Iterable getAllHostInstances() { + final Function1, List> _function = (List it) -> { + return it; + }; + return IterableExtensions.flatMap(this.hostInstances.values(), _function); + } + + private Iterable> getHostInstancesWithType() { + final Function1>, List>> _function = (Map.Entry> pair) -> { + final Function1> _function_1 = (String it) -> { + HostType _key = pair.getKey(); + return Pair.of(_key, it); + }; + return ListExtensions.>map(pair.getValue(), _function_1); + }; + return IterableExtensions.flatMap(this.hostInstances.entrySet(), _function); + } + + private Iterable> getAppInstancesWithType() { + final Function1>, List>> _function = (Map.Entry> pair) -> { + final Function1> _function_1 = (String it) -> { + ApplicationType _type = pair.getKey().getType(); + return Pair.of(_type, it); + }; + return ListExtensions.>map(pair.getValue(), _function_1); + }; + return IterableExtensions.flatMap(this.appInstances.entrySet(), _function); + } + + private Iterable getPossibleHostInstances(final ApplicationType appType) { + final Function1> _function = (ResourceRequirement req) -> { + return this.hostInstances.get(req.getHostType()); + }; + return IterableExtensions.flatMap(appType.getRequirements(), _function); + } + + private Iterable> getPossibleAppInstancesWithRequirements(final HostType hostType) { + final Function1>, List>> _function = (Map.Entry> pair) -> { + List> _xblockexpression = null; + { + final Function1 _function_1 = (ResourceRequirement it) -> { + HostType _hostType = it.getHostType(); + return Boolean.valueOf(Objects.equal(_hostType, hostType)); + }; + final ResourceRequirement resourceReq = IterableExtensions.findFirst(pair.getKey().getType().getRequirements(), _function_1); + List> _xifexpression = null; + if ((resourceReq == null)) { + _xifexpression = CollectionLiterals.>emptyList(); + } else { + final Function1> _function_2 = (String it) -> { + return Pair.of(resourceReq, it); + }; + _xifexpression = ListExtensions.>map(pair.getValue(), _function_2); + } + _xblockexpression = _xifexpression; + } + return _xblockexpression; + }; + return IterableExtensions.flatMap(this.appInstances.entrySet(), _function); + } + + private CharSequence getExistsVariable(final String hostInstance) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append(hostInstance); + _builder.append("_exists"); + return _builder; + } + + private CharSequence getMemoryUsageVariable(final String hostInstance) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append(hostInstance); + _builder.append("_mem"); + return _builder; + } + + private CharSequence getHddUsageVariable(final String hostInstance) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append(hostInstance); + _builder.append("_hdd"); + return _builder; + } + + private CharSequence getAllocatedToVariable(final String appInstance, final String hostInstance) { + StringConcatenation _builder = new StringConcatenation(); + _builder.append(appInstance); + _builder.append("_to_"); + _builder.append(hostInstance); + return _builder; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin new file mode 100644 index 00000000..cdfe3921 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin new file mode 100644 index 00000000..9be64b30 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsSolver.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsSolver.xtendbin new file mode 100644 index 00000000..02fb74ef Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsSolver.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.gitignore new file mode 100644 index 00000000..e24f10f4 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.gitignore @@ -0,0 +1,3 @@ +/.RuleBasedCpsSolver.java._trace +/.RuleBasedCpsMain.java._trace +/.CpsStateCoder.java._trace diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/CpsStateCoder.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/CpsStateCoder.java new file mode 100644 index 00000000..3ae8e828 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/CpsStateCoder.java @@ -0,0 +1,316 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.dse; + +import com.google.common.base.Objects; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.Request; +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; +import java.util.Arrays; +import org.eclipse.emf.common.notify.Notifier; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.ResourceSet; +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.xtend2.lib.StringConcatenation; +import org.eclipse.xtend2.lib.StringConcatenationClient; +import org.eclipse.xtext.xbase.lib.IterableExtensions; + +@SuppressWarnings("all") +public class CpsStateCoder implements IStateCoder { + public static class Factory implements IStateCoderFactory { + @Override + public IStateCoder createStateCoder() { + return new CpsStateCoder(); + } + } + + private CyberPhysicalSystem cps; + + protected CpsStateCoder() { + } + + @Override + public void init(final Notifier notifier) { + CyberPhysicalSystem _switchResult = null; + boolean _matched = false; + if (notifier instanceof ResourceSet) { + _matched=true; + _switchResult = this.getCpsFromResourceSet(((ResourceSet)notifier)); + } + if (!_matched) { + if (notifier instanceof Resource) { + _matched=true; + _switchResult = this.getCpsFromResource(((Resource)notifier)); + } + } + if (!_matched) { + if (notifier instanceof CyberPhysicalSystem) { + _matched=true; + _switchResult = ((CyberPhysicalSystem)notifier); + } + } + if (!_matched) { + throw new IllegalArgumentException("notifier is not a CyberPhysicalSystem"); + } + this.cps = _switchResult; + } + + private CyberPhysicalSystem getCpsFromResourceSet(final ResourceSet resourceSet) { + CyberPhysicalSystem _xblockexpression = null; + { + boolean _isEmpty = resourceSet.getResources().isEmpty(); + if (_isEmpty) { + throw new IllegalArgumentException("No Resource in ResourceSet"); + } + final Resource resource = IterableExtensions.head(resourceSet.getResources()); + _xblockexpression = this.getCpsFromResource(resource); + } + return _xblockexpression; + } + + private CyberPhysicalSystem getCpsFromResource(final Resource resource) { + CyberPhysicalSystem _xblockexpression = null; + { + boolean _isEmpty = resource.getContents().isEmpty(); + if (_isEmpty) { + throw new IllegalArgumentException("No EObject in Resource"); + } + final EObject cps = IterableExtensions.head(resource.getContents()); + CyberPhysicalSystem _xifexpression = null; + if ((cps instanceof CyberPhysicalSystem)) { + _xifexpression = ((CyberPhysicalSystem)cps); + } else { + throw new IllegalArgumentException("EObject in Resource is not a CyberPhysicalSystem"); + } + _xblockexpression = _xifexpression; + } + return _xblockexpression; + } + + @Override + public String createStateCode() { + StringConcatenation _builder = new StringConcatenation(); + StringConcatenationClient _createRequestsCode = this.createRequestsCode(); + _builder.append(_createRequestsCode); + CharSequence _createHostTypesCode = this.createHostTypesCode(); + _builder.append(_createHostTypesCode); + return _builder.toString(); + } + + private StringConcatenationClient createRequestsCode() { + StringConcatenationClient _client = new StringConcatenationClient() { + @Override + protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { + { + EList _requests = CpsStateCoder.this.cps.getRequests(); + for(final Request request : _requests) { + StringConcatenationClient _createRequestCode = CpsStateCoder.this.createRequestCode(request); + _builder.append(_createRequestCode); + } + } + } + }; + return _client; + } + + private StringConcatenationClient createRequestCode(final Request request) { + StringConcatenationClient _client = new StringConcatenationClient() { + @Override + protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { + _builder.append("["); + { + EList _requirements = request.getRequirements(); + for(final Requirement requirement : _requirements) { + StringConcatenationClient _createRequirementCode = CpsStateCoder.this.createRequirementCode(requirement); + _builder.append(_createRequirementCode); + } + } + _builder.append("]"); + } + }; + return _client; + } + + private StringConcatenationClient createRequirementCode(final Requirement requirement) { + StringConcatenationClient _client = new StringConcatenationClient() { + @Override + protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { + _builder.append("["); + { + EList _instances = requirement.getInstances(); + boolean _hasElements = false; + for(final ApplicationInstance app : _instances) { + if (!_hasElements) { + _hasElements = true; + } else { + _builder.appendImmediate(",", ""); + } + String _createAppCode = CpsStateCoder.this.createAppCode(app); + _builder.append(_createAppCode); + } + } + _builder.append("]"); + } + }; + return _client; + } + + private String createAppCode(final ApplicationInstance app) { + String _xifexpression = null; + HostInstance _allocatedTo = app.getAllocatedTo(); + boolean _tripleEquals = (_allocatedTo == null); + if (_tripleEquals) { + _xifexpression = "-"; + } else { + _xifexpression = this.createMatchArgumentCode(app.getAllocatedTo()); + } + return _xifexpression; + } + + private CharSequence createHostTypesCode() { + StringConcatenation _builder = new StringConcatenation(); + _builder.append("("); + { + EList _hostTypes = this.cps.getHostTypes(); + boolean _hasElements = false; + for(final HostType hostType : _hostTypes) { + if (!_hasElements) { + _hasElements = true; + } else { + _builder.appendImmediate(",", ""); + } + int _size = hostType.getInstances().size(); + _builder.append(_size); + } + } + _builder.append(")"); + return _builder; + } + + @Override + public String createActivationCode(final IPatternMatch match) { + StringConcatenation _builder = new StringConcatenation(); + String _simpleName = match.specification().getSimpleName(); + _builder.append(_simpleName); + _builder.append("("); + { + Object[] _array = match.toArray(); + boolean _hasElements = false; + for(final Object arg : _array) { + if (!_hasElements) { + _hasElements = true; + } else { + _builder.appendImmediate(",", ""); + } + String _createMatchArgumentCode = this.createMatchArgumentCode(arg); + _builder.append(_createMatchArgumentCode); + } + } + _builder.append(")"); + return _builder.toString(); + } + + protected String _createMatchArgumentCode(final Requirement requirement) { + String _xblockexpression = null; + { + final EObject request = requirement.eContainer(); + String _xifexpression = null; + if ((request instanceof Request)) { + String _xblockexpression_1 = null; + { + EObject _eContainer = ((Request)request).eContainer(); + boolean _notEquals = (!Objects.equal(_eContainer, this.cps)); + if (_notEquals) { + throw new IllegalArgumentException("Request is not contained in the CPS"); + } + final int requestIndex = this.cps.getRequests().indexOf(request); + final int requirementIndex = ((Request)request).getRequirements().indexOf(requirement); + String _plus = (Integer.valueOf(requestIndex) + "."); + _xblockexpression_1 = (_plus + Integer.valueOf(requirementIndex)); + } + _xifexpression = _xblockexpression_1; + } else { + throw new IllegalArgumentException("Requirement is not contained in a request"); + } + _xblockexpression = _xifexpression; + } + return _xblockexpression; + } + + protected String _createMatchArgumentCode(final ApplicationInstance app) { + String _xblockexpression = null; + { + final Requirement requirement = app.getRequirement(); + if ((requirement == null)) { + throw new IllegalArgumentException("Application instance is not associated with a requirement"); + } + final int instanceIndex = requirement.getInstances().indexOf(app); + String _createMatchArgumentCode = this.createMatchArgumentCode(requirement); + String _plus = (_createMatchArgumentCode + "."); + _xblockexpression = (_plus + Integer.valueOf(instanceIndex)); + } + return _xblockexpression; + } + + protected String _createMatchArgumentCode(final HostInstance host) { + String _xblockexpression = null; + { + final EObject hostType = host.eContainer(); + String _xifexpression = null; + if ((hostType instanceof HostType)) { + String _xblockexpression_1 = null; + { + final int hostIndex = ((HostType)hostType).getInstances().indexOf(host); + String _createMatchArgumentCode = this.createMatchArgumentCode(hostType); + String _plus = (_createMatchArgumentCode + "."); + _xblockexpression_1 = (_plus + Integer.valueOf(hostIndex)); + } + _xifexpression = _xblockexpression_1; + } else { + throw new IllegalArgumentException("Host is not contained in a host type"); + } + _xblockexpression = _xifexpression; + } + return _xblockexpression; + } + + protected String _createMatchArgumentCode(final HostType hostType) { + String _xblockexpression = null; + { + EObject _eContainer = hostType.eContainer(); + boolean _notEquals = (!Objects.equal(_eContainer, this.cps)); + if (_notEquals) { + throw new IllegalArgumentException("Host type is not contained in the CPS"); + } + final int hostTypeIndex = this.cps.getHostTypes().indexOf(hostType); + _xblockexpression = Integer.valueOf(hostTypeIndex).toString(); + } + return _xblockexpression; + } + + protected String _createMatchArgumentCode(final Object object) { + throw new IllegalArgumentException("Unknown match argument: "); + } + + protected String createMatchArgumentCode(final Object app) { + if (app instanceof ApplicationInstance) { + return _createMatchArgumentCode((ApplicationInstance)app); + } else if (app instanceof HostInstance) { + return _createMatchArgumentCode((HostInstance)app); + } else if (app instanceof HostType) { + return _createMatchArgumentCode((HostType)app); + } else if (app instanceof Requirement) { + return _createMatchArgumentCode((Requirement)app); + } else if (app != null) { + return _createMatchArgumentCode(app); + } else { + throw new IllegalArgumentException("Unhandled parameter types: " + + Arrays.asList(app).toString()); + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.java new file mode 100644 index 00000000..7d81f84b --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.java @@ -0,0 +1,46 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.dse; + +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.dse.RuleBasedCpsSolver; +import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsQueries; +import java.util.Map; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EStructuralFeature; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.viatra.addon.querybasedfeatures.runtime.QueryBasedFeatureSettingDelegateFactory; +import org.eclipse.viatra.addon.querybasedfeatures.runtime.handler.QueryBasedFeatures; +import org.eclipse.viatra.dse.api.DesignSpaceExplorer; +import org.eclipse.viatra.query.runtime.extensibility.SingletonQueryGroupProvider; +import org.eclipse.viatra.query.runtime.registry.IQuerySpecificationRegistry; +import org.eclipse.viatra.query.runtime.registry.QuerySpecificationRegistry; +import org.eclipse.viatra.query.runtime.registry.connector.QueryGroupProviderSourceConnector; + +@SuppressWarnings("all") +public class RuleBasedCpsMain { + private RuleBasedCpsMain() { + new IllegalStateException("This is a static utility class and should not be instantiated directly."); + } + + public static void main(final String[] args) { + DesignSpaceExplorer.turnOnLogging(DesignSpaceExplorer.DseLoggingLevel.VERBOSE_FULL); + Map _extensionToFactoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(); + XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); + _extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, _xMIResourceFactoryImpl); + QueryBasedFeatureSettingDelegateFactory _queryBasedFeatureSettingDelegateFactory = new QueryBasedFeatureSettingDelegateFactory(); + EStructuralFeature.Internal.SettingDelegate.Factory.Registry.INSTANCE.put(QueryBasedFeatures.ANNOTATION_SOURCE, _queryBasedFeatureSettingDelegateFactory); + EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE); + IQuerySpecificationRegistry _instance = QuerySpecificationRegistry.getInstance(); + CpsQueries _instance_1 = CpsQueries.instance(); + SingletonQueryGroupProvider _singletonQueryGroupProvider = new SingletonQueryGroupProvider(_instance_1); + QueryGroupProviderSourceConnector _queryGroupProviderSourceConnector = new QueryGroupProviderSourceConnector("CpsQueries", _singletonQueryGroupProvider, + true); + _instance.addSource(_queryGroupProviderSourceConnector); + final CpsGenerator generator = new CpsGenerator(1, 4, 1); + final CyberPhysicalSystem problem = generator.generateCpsProblem(); + final RuleBasedCpsSolver solver = new RuleBasedCpsSolver(); + solver.solve(problem); + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.java new file mode 100644 index 00000000..fd348752 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.java @@ -0,0 +1,93 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.dse; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsFactory; +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.dse.CpsStateCoder; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.Allocate; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeHddMetric; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeMemoryMetric; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CostMetric; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.GuidanceObjective; +import hu.bme.mit.inf.dslreasoner.domains.cps.queries.RequirementNotSatisfied; +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.optimization.CompositeDirectionalThresholdObjective; +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.viatrasolver.reasoner.optimization.QueryBasedObjective; +import java.util.Collection; +import java.util.function.Consumer; +import org.eclipse.emf.common.util.EList; +import org.eclipse.viatra.dse.api.DesignSpaceExplorer; +import org.eclipse.viatra.dse.api.Solution; +import org.eclipse.viatra.dse.evolutionary.EvolutionaryStrategy; +import org.eclipse.viatra.dse.evolutionary.EvolutionaryStrategyBuilder; +import org.eclipse.viatra.dse.objectives.Fitness; +import org.eclipse.viatra.transformation.runtime.emf.rules.batch.BatchTransformationRuleFactory; +import org.eclipse.xtext.xbase.lib.Extension; +import org.eclipse.xtext.xbase.lib.InputOutput; + +@SuppressWarnings("all") +public class RuleBasedCpsSolver { + @Extension + private final BatchTransformationRuleFactory _batchTransformationRuleFactory = new BatchTransformationRuleFactory(); + + @Extension + private final CpsFactory _cpsFactory = CpsFactory.eINSTANCE; + + public void solve(final CyberPhysicalSystem problem) { + final DesignSpaceExplorer dse = new DesignSpaceExplorer(); + dse.addMetaModelPackage(CpsPackage.eINSTANCE); + dse.setInitialModel(problem.eResource().getResourceSet()); + final Consumer _function = (RequirementNotSatisfied.Match it) -> { + final ApplicationInstance app = this._cpsFactory.createApplicationInstance(); + EList _instances = it.getReq().getType().getInstances(); + _instances.add(app); + EList _instances_1 = it.getReq().getInstances(); + _instances_1.add(app); + }; + dse.addTransformationRule(this._batchTransformationRuleFactory.createRule(RequirementNotSatisfied.instance()).action(_function).build()); + final Consumer _function_1 = (Allocate.Match it) -> { + ApplicationInstance _app = it.getApp(); + _app.setAllocatedTo(it.getHost()); + }; + dse.addTransformationRule(this._batchTransformationRuleFactory.createRule(Allocate.instance()).action(_function_1).build()); + final Consumer _function_2 = (CreateHostInstance.Match it) -> { + EList _instances = it.getHostType().getInstances(); + HostInstance _createHostInstance = this._cpsFactory.createHostInstance(); + _instances.add(_createHostInstance); + }; + dse.addTransformationRule(this._batchTransformationRuleFactory.createRule(CreateHostInstance.instance()).action(_function_2).build()); + GuidanceObjective _instance = GuidanceObjective.instance(); + ObjectiveThreshold.Inclusive _inclusive = new ObjectiveThreshold.Inclusive(0); + QueryBasedObjective _queryBasedObjective = new QueryBasedObjective(_instance, ObjectiveKind.LOWER_IS_BETTER, _inclusive, 0); + AverageFreeMemoryMetric _instance_1 = AverageFreeMemoryMetric.instance(); + ObjectiveThreshold.Inclusive _inclusive_1 = new ObjectiveThreshold.Inclusive(0.75); + QueryBasedObjective _queryBasedObjective_1 = new QueryBasedObjective(_instance_1, ObjectiveKind.LOWER_IS_BETTER, _inclusive_1, 0); + AverageFreeHddMetric _instance_2 = AverageFreeHddMetric.instance(); + ObjectiveThreshold.Inclusive _inclusive_2 = new ObjectiveThreshold.Inclusive(0.75); + QueryBasedObjective _queryBasedObjective_2 = new QueryBasedObjective(_instance_2, ObjectiveKind.LOWER_IS_BETTER, _inclusive_2, 0); + CompositeDirectionalThresholdObjective _compositeDirectionalThresholdObjective = new CompositeDirectionalThresholdObjective("Composite", _queryBasedObjective, _queryBasedObjective_1, _queryBasedObjective_2); + dse.addObjective(_compositeDirectionalThresholdObjective); + CostMetric _instance_3 = CostMetric.instance(); + QueryBasedObjective _queryBasedObjective_3 = new QueryBasedObjective(_instance_3, ObjectiveKind.LOWER_IS_BETTER, + ObjectiveThreshold.NO_THRESHOLD, 0); + dse.addObjective(_queryBasedObjective_3); + dse.setMaxNumberOfThreads(1); + CpsStateCoder.Factory _factory = new CpsStateCoder.Factory(); + dse.setStateCoderFactory(_factory); + final EvolutionaryStrategy strategy = EvolutionaryStrategyBuilder.createNsga2Strategy(25); + dse.startExplorationWithTimeout(strategy, ((2 * 60) * 1000)); + Collection _solutions = dse.getSolutions(); + for (final Solution solution : _solutions) { + Object _stateCode = solution.getStateCode(); + String _plus = ("Found solution: " + _stateCode); + String _plus_1 = (_plus + " "); + Fitness _fitness = solution.getArbitraryTrajectory().getFitness(); + String _plus_2 = (_plus_1 + _fitness); + InputOutput.println(_plus_2); + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin new file mode 100644 index 00000000..d975ffab Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.java new file mode 100644 index 00000000..e59ef004 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.java @@ -0,0 +1,154 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.generator; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsFactory; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.Request; +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; +import hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement; +import java.util.Collection; +import java.util.Collections; +import java.util.List; +import java.util.Random; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; +import org.eclipse.xtext.xbase.lib.CollectionLiterals; +import org.eclipse.xtext.xbase.lib.Extension; +import org.eclipse.xtext.xbase.lib.ObjectExtensions; +import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; + +@SuppressWarnings("all") +public class CpsGenerator { + @Extension + private final CpsFactory _cpsFactory = CpsFactory.eINSTANCE; + + private static final int MIN_MEMORY = 1; + + private static final int MAX_MEMORY = 6; + + private static final int MIN_HDD = 1; + + private static final int MAX_HDD = 30; + + private static final int HIGH_CPU_FRACTION = 4; + + private static final int MIN_REPLICAS = 1; + + private static final int MAX_REPLICAS = 4; + + private final Random random; + + private final int applicationTypeCount; + + private final int demandFactor; + + public CpsGenerator(final long randomSeed, final int applicationTypeCount, final int demandFactor) { + Random _random = new Random(randomSeed); + this.random = _random; + this.applicationTypeCount = applicationTypeCount; + this.demandFactor = demandFactor; + } + + public CyberPhysicalSystem generateCpsProblem() { + CyberPhysicalSystem _xblockexpression = null; + { + final ResourceSetImpl resourceSet = new ResourceSetImpl(); + final Resource resource = resourceSet.createResource(URI.createFileURI("dummy.dummyext")); + CyberPhysicalSystem _createCyberPhysicalSystem = this._cpsFactory.createCyberPhysicalSystem(); + final Procedure1 _function = (CyberPhysicalSystem it) -> { + final CyberPhysicalSystem cps = it; + EList _contents = resource.getContents(); + _contents.add(cps); + this.createLowCpuHostTypes(it); + final List highCpuHostTypes = this.createHighCpuHostTypes(it); + for (int i = 0; (i < this.applicationTypeCount); i++) { + if (((i % CpsGenerator.HIGH_CPU_FRACTION) == 0)) { + this.createRandomApplicationType(it, highCpuHostTypes); + } else { + this.createRandomApplicationType(it, it.getHostTypes()); + } + } + for (int i = 0; (i < this.demandFactor); i++) { + EList _requests = it.getRequests(); + Request _createRequest = this._cpsFactory.createRequest(); + final Procedure1 _function_1 = (Request it_1) -> { + EList _applicationTypes = cps.getApplicationTypes(); + for (final ApplicationType appType : _applicationTypes) { + EList _requirements = it_1.getRequirements(); + Requirement _createRequirement = this._cpsFactory.createRequirement(); + final Procedure1 _function_2 = (Requirement it_2) -> { + it_2.setCount(this.nextInt(CpsGenerator.MIN_REPLICAS, CpsGenerator.MAX_REPLICAS)); + it_2.setType(appType); + }; + Requirement _doubleArrow = ObjectExtensions.operator_doubleArrow(_createRequirement, _function_2); + _requirements.add(_doubleArrow); + } + }; + Request _doubleArrow = ObjectExtensions.operator_doubleArrow(_createRequest, _function_1); + _requests.add(_doubleArrow); + } + }; + _xblockexpression = ObjectExtensions.operator_doubleArrow(_createCyberPhysicalSystem, _function); + } + return _xblockexpression; + } + + private void createRandomApplicationType(final CyberPhysicalSystem it, final Collection allowedHostTypes) { + final ApplicationType appType = this._cpsFactory.createApplicationType(); + final int memory = this.nextInt(CpsGenerator.MIN_MEMORY, CpsGenerator.MAX_MEMORY); + final int hdd = this.nextInt(CpsGenerator.MIN_HDD, CpsGenerator.MAX_HDD); + for (final HostType hostType : allowedHostTypes) { + EList _requirements = appType.getRequirements(); + ResourceRequirement _createResourceRequirement = this._cpsFactory.createResourceRequirement(); + final Procedure1 _function = (ResourceRequirement it_1) -> { + it_1.setHostType(hostType); + it_1.setRequiredMemory(memory); + it_1.setRequiredHdd(hdd); + }; + ResourceRequirement _doubleArrow = ObjectExtensions.operator_doubleArrow(_createResourceRequirement, _function); + _requirements.add(_doubleArrow); + } + EList _applicationTypes = it.getApplicationTypes(); + _applicationTypes.add(appType); + } + + private List createLowCpuHostTypes(final CyberPhysicalSystem it) { + HostType _createHostType = this.createHostType(it, 2, 8, 75); + HostType _createHostType_1 = this.createHostType(it, 4, 16, 150); + HostType _createHostType_2 = this.createHostType(it, 3, 16, 75); + HostType _createHostType_3 = this.createHostType(it, 6, 32, 150); + return Collections.unmodifiableList(CollectionLiterals.newArrayList(_createHostType, _createHostType_1, _createHostType_2, _createHostType_3)); + } + + private List createHighCpuHostTypes(final CyberPhysicalSystem it) { + HostType _createHostType = this.createHostType(it, 2, 4, 50); + HostType _createHostType_1 = this.createHostType(it, 4, 8, 100); + return Collections.unmodifiableList(CollectionLiterals.newArrayList(_createHostType, _createHostType_1)); + } + + private HostType createHostType(final CyberPhysicalSystem it, final int cost, final int memory, final int hdd) { + HostType _xblockexpression = null; + { + HostType _createHostType = this._cpsFactory.createHostType(); + final Procedure1 _function = (HostType it_1) -> { + it_1.setCost(cost); + it_1.setDefaultMemory(memory); + it_1.setDefaultHdd(hdd); + }; + final HostType hostType = ObjectExtensions.operator_doubleArrow(_createHostType, _function); + EList _hostTypes = it.getHostTypes(); + _hostTypes.add(hostType); + _xblockexpression = hostType; + } + return _xblockexpression; + } + + private int nextInt(final int lower, final int upper) { + int _nextInt = this.random.nextInt(((upper - lower) + 1)); + return (lower + _nextInt); + } +} -- cgit v1.2.3-54-g00ecf From b7ed3353ba34dd837bfc15f7e48c30a2cdc7ce75 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Wed, 22 May 2019 20:38:53 -0400 Subject: MDEOptimiser implementation of CPS benchmark --- .../.classpath | 9 +- .../.settings/org.eclipse.core.resources.prefs | 3 + .../META-INF/MANIFEST.MF | 15 +- .../model/cps.henshin | 258 ++ .../model/cps.henshin_diagram | 406 ++++ .../problem.lp | 2483 ++++++++++++++++++++ .../problem.xmi | 49 + .../solution.txt | 55 + .../inf/dslreasoner/domains/cps/queries/.gitignore | 17 + .../domains/cps/queries/internal/.gitignore | 16 + .../dslreasoner/domains/cps/cplex/CbcCpsMain.xtend | 5 +- .../domains/cps/mdeo/CpsMdeOptimiserMain.xtend | 31 + .../cps/mdeo/ExcludedOptimisationInterpreter.xtend | 85 + .../mdeo/NonRedundantAllocationsConstraint.xtend | 29 + .../mdeo/NotAllocatedAppInstancesConstraint.xtend | 24 + .../mdeo/NotSatisfiedRequirementsConstraint.xtend | 27 + .../domains/cps/mdeo/ResourceUtilizationUtil.xtend | 31 + .../cps/mdeo/TooLowAverageHddConstraint.xtend | 33 + .../cps/mdeo/TooLowAverageMemoryConstraint.xtend | 33 + .../cps/mdeo/TotalCostFitnessFunction.xtend | 23 + .../cps/mdeo/UnavailableHddConstraint.xtend | 27 + .../cps/mdeo/UnavailableMemoryConstraint.xtend | 27 + .../mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt | 41 + .../domains/cps/cplex/.CbcCpsMain.xtendbin | Bin 5693 -> 6363 bytes .../domains/cps/cplex/.CpsToLpTranslator.xtendbin | Bin 11104 -> 11104 bytes .../inf/dslreasoner/domains/cps/cplex/.gitignore | 4 + .../dslreasoner/domains/cps/cplex/CbcCpsMain.java | 22 +- .../domains/cps/dse/.CpsStateCoder.xtendbin | Bin 7626 -> 7626 bytes .../domains/cps/dse/.RuleBasedCpsMain.xtendbin | Bin 5189 -> 5189 bytes .../domains/cps/dse/.RuleBasedCpsSolver.xtendbin | Bin 7336 -> 7336 bytes .../mit/inf/dslreasoner/domains/cps/dse/.gitignore | 6 + .../domains/cps/generator/.CpsGenerator.xtendbin | Bin 8807 -> 8807 bytes .../dslreasoner/domains/cps/generator/.gitignore | 2 + .../domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin | Bin 0 -> 4969 bytes .../mdeo/.ExcludedOptimisationInterpreter.xtendbin | Bin 0 -> 7559 bytes .../.NonRedundantAllocationsConstraint.xtendbin | Bin 0 -> 3332 bytes .../.NotAllocatedAppInstancesConstraint.xtendbin | Bin 0 -> 3440 bytes .../.NotSatisfiedRequirementsConstraint.xtendbin | Bin 0 -> 3412 bytes .../cps/mdeo/.ResourceUtilizationUtil.xtendbin | Bin 0 -> 3546 bytes .../cps/mdeo/.TooLowAverageHddConstraint.xtendbin | Bin 0 -> 3790 bytes .../mdeo/.TooLowAverageMemoryConstraint.xtendbin | Bin 0 -> 3797 bytes .../cps/mdeo/.TotalCostFitnessFunction.xtendbin | Bin 0 -> 2975 bytes .../cps/mdeo/.UnavailableHddConstraint.xtendbin | Bin 0 -> 3131 bytes .../cps/mdeo/.UnavailableMemoryConstraint.xtendbin | Bin 0 -> 3130 bytes .../inf/dslreasoner/domains/cps/mdeo/.gitignore | 15 + .../domains/cps/mdeo/CpsMdeOptimiserMain.java | 46 + .../domains/cps/mdeo/ExcludedMoeaOptimisation.java | 54 + .../cps/mdeo/ExcludedOptimisationInterpreter.java | 31 + .../dslreasoner/domains/cps/mdeo/ExcludedRun.java | 24 + .../mdeo/NonRedundantAllocationsConstraint.java | 54 + .../mdeo/NotAllocatedAppInstancesConstraint.java | 47 + .../mdeo/NotSatisfiedRequirementsConstraint.java | 55 + .../domains/cps/mdeo/ResourceUtilizationUtil.java | 67 + .../cps/mdeo/TooLowAverageHddConstraint.java | 59 + .../cps/mdeo/TooLowAverageMemoryConstraint.java | 59 + .../domains/cps/mdeo/TotalCostFitnessFunction.java | 44 + .../domains/cps/mdeo/UnavailableHddConstraint.java | 45 + .../cps/mdeo/UnavailableMemoryConstraint.java | 45 + 58 files changed, 4400 insertions(+), 6 deletions(-) create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.settings/org.eclipse.core.resources.prefs create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin_diagram create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.lp create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.xmi create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/solution.txt create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NonRedundantAllocationsConstraint.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NotAllocatedAppInstancesConstraint.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NotSatisfiedRequirementsConstraint.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ResourceUtilizationUtil.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TooLowAverageHddConstraint.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TooLowAverageMemoryConstraint.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TotalCostFitnessFunction.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.UnavailableHddConstraint.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.UnavailableMemoryConstraint.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.gitignore create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedRun.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.java (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.classpath b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.classpath index 8129e44b..faa51b1d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.classpath +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.classpath @@ -1,10 +1,15 @@ - - + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.settings/org.eclipse.core.resources.prefs b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.settings/org.eclipse.core.resources.prefs new file mode 100644 index 00000000..6d3062d3 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.settings/org.eclipse.core.resources.prefs @@ -0,0 +1,3 @@ +eclipse.preferences.version=1 +encoding//model/cps.henshin=UTF-8 +encoding//model/cps.henshin_diagram=UTF-8 diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF index c06b7112..b94a3518 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF @@ -23,7 +23,20 @@ Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime, org.eclipse.viatra.dse;bundle-version="0.22.0", org.eclipse.viatra.dse.genetic;bundle-version="0.22.0", hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner;bundle-version="1.0.0", - org.eclipse.emf.ecore.xmi;bundle-version="2.15.0" + org.eclipse.emf.ecore.xmi;bundle-version="2.15.0", + uk.ac.kcl.inf.mdeoptimiser.libraries.core;bundle-version="1.0.0", + uk.ac.kcl.inf.mdeoptimiser.interfaces.cli;bundle-version="1.0.0", + org.eclipse.emf.henshin.interpreter;bundle-version="1.5.0", + uk.ac.kcl.inf.mdeoptimiser.libraries.rulegen;bundle-version="1.0.0", + org.sidiff.common;bundle-version="1.0.0", + org.sidiff.common.emf;bundle-version="1.0.0", + org.sidiff.common.emf.extensions;bundle-version="1.0.0", + org.moeaframework;bundle-version="2.13.0", + org.apache.commons.math3;bundle-version="3.6.1", + org.apache.commons.lang3;bundle-version="3.8.1", + com.google.inject;bundle-version="3.0.0", + org.sidiff.common.henshin;bundle-version="1.0.0", + org.sidiff.serge;bundle-version="1.0.0" Import-Package: org.apache.log4j Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.domains.cps Bundle-ActivationPolicy: lazy diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin new file mode 100644 index 00000000..21e35a56 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin @@ -0,0 +1,258 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin_diagram b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin_diagram new file mode 100644 index 00000000..54bc3a6d --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin_diagram @@ -0,0 +1,406 @@ + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.lp b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.lp new file mode 100644 index 00000000..a380d816 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.lp @@ -0,0 +1,2483 @@ +Minimize + total_cost: 2 h0i0_exists + 2 h0i1_exists + 2 h0i2_exists + 2 h0i3_exists + 2 h0i4_exists + 2 h0i5_exists + 2 h0i6_exists + 2 h0i7_exists + 2 h0i8_exists + 2 h0i9_exists + 4 h1i0_exists + 4 h1i1_exists + 4 h1i2_exists + 4 h1i3_exists + 4 h1i4_exists + 4 h1i5_exists + 4 h1i6_exists + 4 h1i7_exists + 4 h1i8_exists + 4 h1i9_exists + 3 h2i0_exists + 3 h2i1_exists + 3 h2i2_exists + 3 h2i3_exists + 3 h2i4_exists + 3 h2i5_exists + 3 h2i6_exists + 3 h2i7_exists + 3 h2i8_exists + 3 h2i9_exists + 6 h3i0_exists + 6 h3i1_exists + 6 h3i2_exists + 6 h3i3_exists + 6 h3i4_exists + 6 h3i5_exists + 6 h3i6_exists + 6 h3i7_exists + 6 h3i8_exists + 6 h3i9_exists + 2 h4i0_exists + 2 h4i1_exists + 2 h4i2_exists + 2 h4i3_exists + 2 h4i4_exists + 2 h4i5_exists + 2 h4i6_exists + 2 h4i7_exists + 2 h4i8_exists + 2 h4i9_exists + 4 h5i0_exists + 4 h5i1_exists + 4 h5i2_exists + 4 h5i3_exists + 4 h5i4_exists + 4 h5i5_exists + 4 h5i6_exists + 4 h5i7_exists + 4 h5i8_exists + 4 h5i9_exists +Subject To + r0a0_allocated: r0a0_to_h4i0 + r0a0_to_h4i1 + r0a0_to_h4i2 + r0a0_to_h4i3 + r0a0_to_h4i4 + r0a0_to_h4i5 + r0a0_to_h4i6 + r0a0_to_h4i7 + r0a0_to_h4i8 + r0a0_to_h4i9 + r0a0_to_h5i0 + r0a0_to_h5i1 + r0a0_to_h5i2 + r0a0_to_h5i3 + r0a0_to_h5i4 + r0a0_to_h5i5 + r0a0_to_h5i6 + r0a0_to_h5i7 + r0a0_to_h5i8 + r0a0_to_h5i9 = 1 + r0a0_to_h4i0_exists: h4i0_exists - r0a0_to_h4i0 >= 0 + r0a0_to_h4i1_exists: h4i1_exists - r0a0_to_h4i1 >= 0 + r0a0_to_h4i2_exists: h4i2_exists - r0a0_to_h4i2 >= 0 + r0a0_to_h4i3_exists: h4i3_exists - r0a0_to_h4i3 >= 0 + r0a0_to_h4i4_exists: h4i4_exists - r0a0_to_h4i4 >= 0 + r0a0_to_h4i5_exists: h4i5_exists - r0a0_to_h4i5 >= 0 + r0a0_to_h4i6_exists: h4i6_exists - r0a0_to_h4i6 >= 0 + r0a0_to_h4i7_exists: h4i7_exists - r0a0_to_h4i7 >= 0 + r0a0_to_h4i8_exists: h4i8_exists - r0a0_to_h4i8 >= 0 + r0a0_to_h4i9_exists: h4i9_exists - r0a0_to_h4i9 >= 0 + r0a0_to_h5i0_exists: h5i0_exists - r0a0_to_h5i0 >= 0 + r0a0_to_h5i1_exists: h5i1_exists - r0a0_to_h5i1 >= 0 + r0a0_to_h5i2_exists: h5i2_exists - r0a0_to_h5i2 >= 0 + r0a0_to_h5i3_exists: h5i3_exists - r0a0_to_h5i3 >= 0 + r0a0_to_h5i4_exists: h5i4_exists - r0a0_to_h5i4 >= 0 + r0a0_to_h5i5_exists: h5i5_exists - r0a0_to_h5i5 >= 0 + r0a0_to_h5i6_exists: h5i6_exists - r0a0_to_h5i6 >= 0 + r0a0_to_h5i7_exists: h5i7_exists - r0a0_to_h5i7 >= 0 + r0a0_to_h5i8_exists: h5i8_exists - r0a0_to_h5i8 >= 0 + r0a0_to_h5i9_exists: h5i9_exists - r0a0_to_h5i9 >= 0 + r0a1_allocated: r0a1_to_h4i0 + r0a1_to_h4i1 + r0a1_to_h4i2 + r0a1_to_h4i3 + r0a1_to_h4i4 + r0a1_to_h4i5 + r0a1_to_h4i6 + r0a1_to_h4i7 + r0a1_to_h4i8 + r0a1_to_h4i9 + r0a1_to_h5i0 + r0a1_to_h5i1 + r0a1_to_h5i2 + r0a1_to_h5i3 + r0a1_to_h5i4 + r0a1_to_h5i5 + r0a1_to_h5i6 + r0a1_to_h5i7 + r0a1_to_h5i8 + r0a1_to_h5i9 = 1 + r0a1_to_h4i0_exists: h4i0_exists - r0a1_to_h4i0 >= 0 + r0a1_to_h4i1_exists: h4i1_exists - r0a1_to_h4i1 >= 0 + r0a1_to_h4i2_exists: h4i2_exists - r0a1_to_h4i2 >= 0 + r0a1_to_h4i3_exists: h4i3_exists - r0a1_to_h4i3 >= 0 + r0a1_to_h4i4_exists: h4i4_exists - r0a1_to_h4i4 >= 0 + r0a1_to_h4i5_exists: h4i5_exists - r0a1_to_h4i5 >= 0 + r0a1_to_h4i6_exists: h4i6_exists - r0a1_to_h4i6 >= 0 + r0a1_to_h4i7_exists: h4i7_exists - r0a1_to_h4i7 >= 0 + r0a1_to_h4i8_exists: h4i8_exists - r0a1_to_h4i8 >= 0 + r0a1_to_h4i9_exists: h4i9_exists - r0a1_to_h4i9 >= 0 + r0a1_to_h5i0_exists: h5i0_exists - r0a1_to_h5i0 >= 0 + r0a1_to_h5i1_exists: h5i1_exists - r0a1_to_h5i1 >= 0 + r0a1_to_h5i2_exists: h5i2_exists - r0a1_to_h5i2 >= 0 + r0a1_to_h5i3_exists: h5i3_exists - r0a1_to_h5i3 >= 0 + r0a1_to_h5i4_exists: h5i4_exists - r0a1_to_h5i4 >= 0 + r0a1_to_h5i5_exists: h5i5_exists - r0a1_to_h5i5 >= 0 + r0a1_to_h5i6_exists: h5i6_exists - r0a1_to_h5i6 >= 0 + r0a1_to_h5i7_exists: h5i7_exists - r0a1_to_h5i7 >= 0 + r0a1_to_h5i8_exists: h5i8_exists - r0a1_to_h5i8 >= 0 + r0a1_to_h5i9_exists: h5i9_exists - r0a1_to_h5i9 >= 0 + r0a2_allocated: r0a2_to_h4i0 + r0a2_to_h4i1 + r0a2_to_h4i2 + r0a2_to_h4i3 + r0a2_to_h4i4 + r0a2_to_h4i5 + r0a2_to_h4i6 + r0a2_to_h4i7 + r0a2_to_h4i8 + r0a2_to_h4i9 + r0a2_to_h5i0 + r0a2_to_h5i1 + r0a2_to_h5i2 + r0a2_to_h5i3 + r0a2_to_h5i4 + r0a2_to_h5i5 + r0a2_to_h5i6 + r0a2_to_h5i7 + r0a2_to_h5i8 + r0a2_to_h5i9 = 1 + r0a2_to_h4i0_exists: h4i0_exists - r0a2_to_h4i0 >= 0 + r0a2_to_h4i1_exists: h4i1_exists - r0a2_to_h4i1 >= 0 + r0a2_to_h4i2_exists: h4i2_exists - r0a2_to_h4i2 >= 0 + r0a2_to_h4i3_exists: h4i3_exists - r0a2_to_h4i3 >= 0 + r0a2_to_h4i4_exists: h4i4_exists - r0a2_to_h4i4 >= 0 + r0a2_to_h4i5_exists: h4i5_exists - r0a2_to_h4i5 >= 0 + r0a2_to_h4i6_exists: h4i6_exists - r0a2_to_h4i6 >= 0 + r0a2_to_h4i7_exists: h4i7_exists - r0a2_to_h4i7 >= 0 + r0a2_to_h4i8_exists: h4i8_exists - r0a2_to_h4i8 >= 0 + r0a2_to_h4i9_exists: h4i9_exists - r0a2_to_h4i9 >= 0 + r0a2_to_h5i0_exists: h5i0_exists - r0a2_to_h5i0 >= 0 + r0a2_to_h5i1_exists: h5i1_exists - r0a2_to_h5i1 >= 0 + r0a2_to_h5i2_exists: h5i2_exists - r0a2_to_h5i2 >= 0 + r0a2_to_h5i3_exists: h5i3_exists - r0a2_to_h5i3 >= 0 + r0a2_to_h5i4_exists: h5i4_exists - r0a2_to_h5i4 >= 0 + r0a2_to_h5i5_exists: h5i5_exists - r0a2_to_h5i5 >= 0 + r0a2_to_h5i6_exists: h5i6_exists - r0a2_to_h5i6 >= 0 + r0a2_to_h5i7_exists: h5i7_exists - r0a2_to_h5i7 >= 0 + r0a2_to_h5i8_exists: h5i8_exists - r0a2_to_h5i8 >= 0 + r0a2_to_h5i9_exists: h5i9_exists - r0a2_to_h5i9 >= 0 + r0a3_allocated: r0a3_to_h4i0 + r0a3_to_h4i1 + r0a3_to_h4i2 + r0a3_to_h4i3 + r0a3_to_h4i4 + r0a3_to_h4i5 + r0a3_to_h4i6 + r0a3_to_h4i7 + r0a3_to_h4i8 + r0a3_to_h4i9 + r0a3_to_h5i0 + r0a3_to_h5i1 + r0a3_to_h5i2 + r0a3_to_h5i3 + r0a3_to_h5i4 + r0a3_to_h5i5 + r0a3_to_h5i6 + r0a3_to_h5i7 + r0a3_to_h5i8 + r0a3_to_h5i9 = 1 + r0a3_to_h4i0_exists: h4i0_exists - r0a3_to_h4i0 >= 0 + r0a3_to_h4i1_exists: h4i1_exists - r0a3_to_h4i1 >= 0 + r0a3_to_h4i2_exists: h4i2_exists - r0a3_to_h4i2 >= 0 + r0a3_to_h4i3_exists: h4i3_exists - r0a3_to_h4i3 >= 0 + r0a3_to_h4i4_exists: h4i4_exists - r0a3_to_h4i4 >= 0 + r0a3_to_h4i5_exists: h4i5_exists - r0a3_to_h4i5 >= 0 + r0a3_to_h4i6_exists: h4i6_exists - r0a3_to_h4i6 >= 0 + r0a3_to_h4i7_exists: h4i7_exists - r0a3_to_h4i7 >= 0 + r0a3_to_h4i8_exists: h4i8_exists - r0a3_to_h4i8 >= 0 + r0a3_to_h4i9_exists: h4i9_exists - r0a3_to_h4i9 >= 0 + r0a3_to_h5i0_exists: h5i0_exists - r0a3_to_h5i0 >= 0 + r0a3_to_h5i1_exists: h5i1_exists - r0a3_to_h5i1 >= 0 + r0a3_to_h5i2_exists: h5i2_exists - r0a3_to_h5i2 >= 0 + r0a3_to_h5i3_exists: h5i3_exists - r0a3_to_h5i3 >= 0 + r0a3_to_h5i4_exists: h5i4_exists - r0a3_to_h5i4 >= 0 + r0a3_to_h5i5_exists: h5i5_exists - r0a3_to_h5i5 >= 0 + r0a3_to_h5i6_exists: h5i6_exists - r0a3_to_h5i6 >= 0 + r0a3_to_h5i7_exists: h5i7_exists - r0a3_to_h5i7 >= 0 + r0a3_to_h5i8_exists: h5i8_exists - r0a3_to_h5i8 >= 0 + r0a3_to_h5i9_exists: h5i9_exists - r0a3_to_h5i9 >= 0 + r1a0_allocated: r1a0_to_h0i0 + r1a0_to_h0i1 + r1a0_to_h0i2 + r1a0_to_h0i3 + r1a0_to_h0i4 + r1a0_to_h0i5 + r1a0_to_h0i6 + r1a0_to_h0i7 + r1a0_to_h0i8 + r1a0_to_h0i9 + r1a0_to_h1i0 + r1a0_to_h1i1 + r1a0_to_h1i2 + r1a0_to_h1i3 + r1a0_to_h1i4 + r1a0_to_h1i5 + r1a0_to_h1i6 + r1a0_to_h1i7 + r1a0_to_h1i8 + r1a0_to_h1i9 + r1a0_to_h2i0 + r1a0_to_h2i1 + r1a0_to_h2i2 + r1a0_to_h2i3 + r1a0_to_h2i4 + r1a0_to_h2i5 + r1a0_to_h2i6 + r1a0_to_h2i7 + r1a0_to_h2i8 + r1a0_to_h2i9 + r1a0_to_h3i0 + r1a0_to_h3i1 + r1a0_to_h3i2 + r1a0_to_h3i3 + r1a0_to_h3i4 + r1a0_to_h3i5 + r1a0_to_h3i6 + r1a0_to_h3i7 + r1a0_to_h3i8 + r1a0_to_h3i9 + r1a0_to_h4i0 + r1a0_to_h4i1 + r1a0_to_h4i2 + r1a0_to_h4i3 + r1a0_to_h4i4 + r1a0_to_h4i5 + r1a0_to_h4i6 + r1a0_to_h4i7 + r1a0_to_h4i8 + r1a0_to_h4i9 + r1a0_to_h5i0 + r1a0_to_h5i1 + r1a0_to_h5i2 + r1a0_to_h5i3 + r1a0_to_h5i4 + r1a0_to_h5i5 + r1a0_to_h5i6 + r1a0_to_h5i7 + r1a0_to_h5i8 + r1a0_to_h5i9 = 1 + r1a0_to_h0i0_exists: h0i0_exists - r1a0_to_h0i0 >= 0 + r1a0_to_h0i1_exists: h0i1_exists - r1a0_to_h0i1 >= 0 + r1a0_to_h0i2_exists: h0i2_exists - r1a0_to_h0i2 >= 0 + r1a0_to_h0i3_exists: h0i3_exists - r1a0_to_h0i3 >= 0 + r1a0_to_h0i4_exists: h0i4_exists - r1a0_to_h0i4 >= 0 + r1a0_to_h0i5_exists: h0i5_exists - r1a0_to_h0i5 >= 0 + r1a0_to_h0i6_exists: h0i6_exists - r1a0_to_h0i6 >= 0 + r1a0_to_h0i7_exists: h0i7_exists - r1a0_to_h0i7 >= 0 + r1a0_to_h0i8_exists: h0i8_exists - r1a0_to_h0i8 >= 0 + r1a0_to_h0i9_exists: h0i9_exists - r1a0_to_h0i9 >= 0 + r1a0_to_h1i0_exists: h1i0_exists - r1a0_to_h1i0 >= 0 + r1a0_to_h1i1_exists: h1i1_exists - r1a0_to_h1i1 >= 0 + r1a0_to_h1i2_exists: h1i2_exists - r1a0_to_h1i2 >= 0 + r1a0_to_h1i3_exists: h1i3_exists - r1a0_to_h1i3 >= 0 + r1a0_to_h1i4_exists: h1i4_exists - r1a0_to_h1i4 >= 0 + r1a0_to_h1i5_exists: h1i5_exists - r1a0_to_h1i5 >= 0 + r1a0_to_h1i6_exists: h1i6_exists - r1a0_to_h1i6 >= 0 + r1a0_to_h1i7_exists: h1i7_exists - r1a0_to_h1i7 >= 0 + r1a0_to_h1i8_exists: h1i8_exists - r1a0_to_h1i8 >= 0 + r1a0_to_h1i9_exists: h1i9_exists - r1a0_to_h1i9 >= 0 + r1a0_to_h2i0_exists: h2i0_exists - r1a0_to_h2i0 >= 0 + r1a0_to_h2i1_exists: h2i1_exists - r1a0_to_h2i1 >= 0 + r1a0_to_h2i2_exists: h2i2_exists - r1a0_to_h2i2 >= 0 + r1a0_to_h2i3_exists: h2i3_exists - r1a0_to_h2i3 >= 0 + r1a0_to_h2i4_exists: h2i4_exists - r1a0_to_h2i4 >= 0 + r1a0_to_h2i5_exists: h2i5_exists - r1a0_to_h2i5 >= 0 + r1a0_to_h2i6_exists: h2i6_exists - r1a0_to_h2i6 >= 0 + r1a0_to_h2i7_exists: h2i7_exists - r1a0_to_h2i7 >= 0 + r1a0_to_h2i8_exists: h2i8_exists - r1a0_to_h2i8 >= 0 + r1a0_to_h2i9_exists: h2i9_exists - r1a0_to_h2i9 >= 0 + r1a0_to_h3i0_exists: h3i0_exists - r1a0_to_h3i0 >= 0 + r1a0_to_h3i1_exists: h3i1_exists - r1a0_to_h3i1 >= 0 + r1a0_to_h3i2_exists: h3i2_exists - r1a0_to_h3i2 >= 0 + r1a0_to_h3i3_exists: h3i3_exists - r1a0_to_h3i3 >= 0 + r1a0_to_h3i4_exists: h3i4_exists - r1a0_to_h3i4 >= 0 + r1a0_to_h3i5_exists: h3i5_exists - r1a0_to_h3i5 >= 0 + r1a0_to_h3i6_exists: h3i6_exists - r1a0_to_h3i6 >= 0 + r1a0_to_h3i7_exists: h3i7_exists - r1a0_to_h3i7 >= 0 + r1a0_to_h3i8_exists: h3i8_exists - r1a0_to_h3i8 >= 0 + r1a0_to_h3i9_exists: h3i9_exists - r1a0_to_h3i9 >= 0 + r1a0_to_h4i0_exists: h4i0_exists - r1a0_to_h4i0 >= 0 + r1a0_to_h4i1_exists: h4i1_exists - r1a0_to_h4i1 >= 0 + r1a0_to_h4i2_exists: h4i2_exists - r1a0_to_h4i2 >= 0 + r1a0_to_h4i3_exists: h4i3_exists - r1a0_to_h4i3 >= 0 + r1a0_to_h4i4_exists: h4i4_exists - r1a0_to_h4i4 >= 0 + r1a0_to_h4i5_exists: h4i5_exists - r1a0_to_h4i5 >= 0 + r1a0_to_h4i6_exists: h4i6_exists - r1a0_to_h4i6 >= 0 + r1a0_to_h4i7_exists: h4i7_exists - r1a0_to_h4i7 >= 0 + r1a0_to_h4i8_exists: h4i8_exists - r1a0_to_h4i8 >= 0 + r1a0_to_h4i9_exists: h4i9_exists - r1a0_to_h4i9 >= 0 + r1a0_to_h5i0_exists: h5i0_exists - r1a0_to_h5i0 >= 0 + r1a0_to_h5i1_exists: h5i1_exists - r1a0_to_h5i1 >= 0 + r1a0_to_h5i2_exists: h5i2_exists - r1a0_to_h5i2 >= 0 + r1a0_to_h5i3_exists: h5i3_exists - r1a0_to_h5i3 >= 0 + r1a0_to_h5i4_exists: h5i4_exists - r1a0_to_h5i4 >= 0 + r1a0_to_h5i5_exists: h5i5_exists - r1a0_to_h5i5 >= 0 + r1a0_to_h5i6_exists: h5i6_exists - r1a0_to_h5i6 >= 0 + r1a0_to_h5i7_exists: h5i7_exists - r1a0_to_h5i7 >= 0 + r1a0_to_h5i8_exists: h5i8_exists - r1a0_to_h5i8 >= 0 + r1a0_to_h5i9_exists: h5i9_exists - r1a0_to_h5i9 >= 0 + r1a1_allocated: r1a1_to_h0i0 + r1a1_to_h0i1 + r1a1_to_h0i2 + r1a1_to_h0i3 + r1a1_to_h0i4 + r1a1_to_h0i5 + r1a1_to_h0i6 + r1a1_to_h0i7 + r1a1_to_h0i8 + r1a1_to_h0i9 + r1a1_to_h1i0 + r1a1_to_h1i1 + r1a1_to_h1i2 + r1a1_to_h1i3 + r1a1_to_h1i4 + r1a1_to_h1i5 + r1a1_to_h1i6 + r1a1_to_h1i7 + r1a1_to_h1i8 + r1a1_to_h1i9 + r1a1_to_h2i0 + r1a1_to_h2i1 + r1a1_to_h2i2 + r1a1_to_h2i3 + r1a1_to_h2i4 + r1a1_to_h2i5 + r1a1_to_h2i6 + r1a1_to_h2i7 + r1a1_to_h2i8 + r1a1_to_h2i9 + r1a1_to_h3i0 + r1a1_to_h3i1 + r1a1_to_h3i2 + r1a1_to_h3i3 + r1a1_to_h3i4 + r1a1_to_h3i5 + r1a1_to_h3i6 + r1a1_to_h3i7 + r1a1_to_h3i8 + r1a1_to_h3i9 + r1a1_to_h4i0 + r1a1_to_h4i1 + r1a1_to_h4i2 + r1a1_to_h4i3 + r1a1_to_h4i4 + r1a1_to_h4i5 + r1a1_to_h4i6 + r1a1_to_h4i7 + r1a1_to_h4i8 + r1a1_to_h4i9 + r1a1_to_h5i0 + r1a1_to_h5i1 + r1a1_to_h5i2 + r1a1_to_h5i3 + r1a1_to_h5i4 + r1a1_to_h5i5 + r1a1_to_h5i6 + r1a1_to_h5i7 + r1a1_to_h5i8 + r1a1_to_h5i9 = 1 + r1a1_to_h0i0_exists: h0i0_exists - r1a1_to_h0i0 >= 0 + r1a1_to_h0i1_exists: h0i1_exists - r1a1_to_h0i1 >= 0 + r1a1_to_h0i2_exists: h0i2_exists - r1a1_to_h0i2 >= 0 + r1a1_to_h0i3_exists: h0i3_exists - r1a1_to_h0i3 >= 0 + r1a1_to_h0i4_exists: h0i4_exists - r1a1_to_h0i4 >= 0 + r1a1_to_h0i5_exists: h0i5_exists - r1a1_to_h0i5 >= 0 + r1a1_to_h0i6_exists: h0i6_exists - r1a1_to_h0i6 >= 0 + r1a1_to_h0i7_exists: h0i7_exists - r1a1_to_h0i7 >= 0 + r1a1_to_h0i8_exists: h0i8_exists - r1a1_to_h0i8 >= 0 + r1a1_to_h0i9_exists: h0i9_exists - r1a1_to_h0i9 >= 0 + r1a1_to_h1i0_exists: h1i0_exists - r1a1_to_h1i0 >= 0 + r1a1_to_h1i1_exists: h1i1_exists - r1a1_to_h1i1 >= 0 + r1a1_to_h1i2_exists: h1i2_exists - r1a1_to_h1i2 >= 0 + r1a1_to_h1i3_exists: h1i3_exists - r1a1_to_h1i3 >= 0 + r1a1_to_h1i4_exists: h1i4_exists - r1a1_to_h1i4 >= 0 + r1a1_to_h1i5_exists: h1i5_exists - r1a1_to_h1i5 >= 0 + r1a1_to_h1i6_exists: h1i6_exists - r1a1_to_h1i6 >= 0 + r1a1_to_h1i7_exists: h1i7_exists - r1a1_to_h1i7 >= 0 + r1a1_to_h1i8_exists: h1i8_exists - r1a1_to_h1i8 >= 0 + r1a1_to_h1i9_exists: h1i9_exists - r1a1_to_h1i9 >= 0 + r1a1_to_h2i0_exists: h2i0_exists - r1a1_to_h2i0 >= 0 + r1a1_to_h2i1_exists: h2i1_exists - r1a1_to_h2i1 >= 0 + r1a1_to_h2i2_exists: h2i2_exists - r1a1_to_h2i2 >= 0 + r1a1_to_h2i3_exists: h2i3_exists - r1a1_to_h2i3 >= 0 + r1a1_to_h2i4_exists: h2i4_exists - r1a1_to_h2i4 >= 0 + r1a1_to_h2i5_exists: h2i5_exists - r1a1_to_h2i5 >= 0 + r1a1_to_h2i6_exists: h2i6_exists - r1a1_to_h2i6 >= 0 + r1a1_to_h2i7_exists: h2i7_exists - r1a1_to_h2i7 >= 0 + r1a1_to_h2i8_exists: h2i8_exists - r1a1_to_h2i8 >= 0 + r1a1_to_h2i9_exists: h2i9_exists - r1a1_to_h2i9 >= 0 + r1a1_to_h3i0_exists: h3i0_exists - r1a1_to_h3i0 >= 0 + r1a1_to_h3i1_exists: h3i1_exists - r1a1_to_h3i1 >= 0 + r1a1_to_h3i2_exists: h3i2_exists - r1a1_to_h3i2 >= 0 + r1a1_to_h3i3_exists: h3i3_exists - r1a1_to_h3i3 >= 0 + r1a1_to_h3i4_exists: h3i4_exists - r1a1_to_h3i4 >= 0 + r1a1_to_h3i5_exists: h3i5_exists - r1a1_to_h3i5 >= 0 + r1a1_to_h3i6_exists: h3i6_exists - r1a1_to_h3i6 >= 0 + r1a1_to_h3i7_exists: h3i7_exists - r1a1_to_h3i7 >= 0 + r1a1_to_h3i8_exists: h3i8_exists - r1a1_to_h3i8 >= 0 + r1a1_to_h3i9_exists: h3i9_exists - r1a1_to_h3i9 >= 0 + r1a1_to_h4i0_exists: h4i0_exists - r1a1_to_h4i0 >= 0 + r1a1_to_h4i1_exists: h4i1_exists - r1a1_to_h4i1 >= 0 + r1a1_to_h4i2_exists: h4i2_exists - r1a1_to_h4i2 >= 0 + r1a1_to_h4i3_exists: h4i3_exists - r1a1_to_h4i3 >= 0 + r1a1_to_h4i4_exists: h4i4_exists - r1a1_to_h4i4 >= 0 + r1a1_to_h4i5_exists: h4i5_exists - r1a1_to_h4i5 >= 0 + r1a1_to_h4i6_exists: h4i6_exists - r1a1_to_h4i6 >= 0 + r1a1_to_h4i7_exists: h4i7_exists - r1a1_to_h4i7 >= 0 + r1a1_to_h4i8_exists: h4i8_exists - r1a1_to_h4i8 >= 0 + r1a1_to_h4i9_exists: h4i9_exists - r1a1_to_h4i9 >= 0 + r1a1_to_h5i0_exists: h5i0_exists - r1a1_to_h5i0 >= 0 + r1a1_to_h5i1_exists: h5i1_exists - r1a1_to_h5i1 >= 0 + r1a1_to_h5i2_exists: h5i2_exists - r1a1_to_h5i2 >= 0 + r1a1_to_h5i3_exists: h5i3_exists - r1a1_to_h5i3 >= 0 + r1a1_to_h5i4_exists: h5i4_exists - r1a1_to_h5i4 >= 0 + r1a1_to_h5i5_exists: h5i5_exists - r1a1_to_h5i5 >= 0 + r1a1_to_h5i6_exists: h5i6_exists - r1a1_to_h5i6 >= 0 + r1a1_to_h5i7_exists: h5i7_exists - r1a1_to_h5i7 >= 0 + r1a1_to_h5i8_exists: h5i8_exists - r1a1_to_h5i8 >= 0 + r1a1_to_h5i9_exists: h5i9_exists - r1a1_to_h5i9 >= 0 + r1a2_allocated: r1a2_to_h0i0 + r1a2_to_h0i1 + r1a2_to_h0i2 + r1a2_to_h0i3 + r1a2_to_h0i4 + r1a2_to_h0i5 + r1a2_to_h0i6 + r1a2_to_h0i7 + r1a2_to_h0i8 + r1a2_to_h0i9 + r1a2_to_h1i0 + r1a2_to_h1i1 + r1a2_to_h1i2 + r1a2_to_h1i3 + r1a2_to_h1i4 + r1a2_to_h1i5 + r1a2_to_h1i6 + r1a2_to_h1i7 + r1a2_to_h1i8 + r1a2_to_h1i9 + r1a2_to_h2i0 + r1a2_to_h2i1 + r1a2_to_h2i2 + r1a2_to_h2i3 + r1a2_to_h2i4 + r1a2_to_h2i5 + r1a2_to_h2i6 + r1a2_to_h2i7 + r1a2_to_h2i8 + r1a2_to_h2i9 + r1a2_to_h3i0 + r1a2_to_h3i1 + r1a2_to_h3i2 + r1a2_to_h3i3 + r1a2_to_h3i4 + r1a2_to_h3i5 + r1a2_to_h3i6 + r1a2_to_h3i7 + r1a2_to_h3i8 + r1a2_to_h3i9 + r1a2_to_h4i0 + r1a2_to_h4i1 + r1a2_to_h4i2 + r1a2_to_h4i3 + r1a2_to_h4i4 + r1a2_to_h4i5 + r1a2_to_h4i6 + r1a2_to_h4i7 + r1a2_to_h4i8 + r1a2_to_h4i9 + r1a2_to_h5i0 + r1a2_to_h5i1 + r1a2_to_h5i2 + r1a2_to_h5i3 + r1a2_to_h5i4 + r1a2_to_h5i5 + r1a2_to_h5i6 + r1a2_to_h5i7 + r1a2_to_h5i8 + r1a2_to_h5i9 = 1 + r1a2_to_h0i0_exists: h0i0_exists - r1a2_to_h0i0 >= 0 + r1a2_to_h0i1_exists: h0i1_exists - r1a2_to_h0i1 >= 0 + r1a2_to_h0i2_exists: h0i2_exists - r1a2_to_h0i2 >= 0 + r1a2_to_h0i3_exists: h0i3_exists - r1a2_to_h0i3 >= 0 + r1a2_to_h0i4_exists: h0i4_exists - r1a2_to_h0i4 >= 0 + r1a2_to_h0i5_exists: h0i5_exists - r1a2_to_h0i5 >= 0 + r1a2_to_h0i6_exists: h0i6_exists - r1a2_to_h0i6 >= 0 + r1a2_to_h0i7_exists: h0i7_exists - r1a2_to_h0i7 >= 0 + r1a2_to_h0i8_exists: h0i8_exists - r1a2_to_h0i8 >= 0 + r1a2_to_h0i9_exists: h0i9_exists - r1a2_to_h0i9 >= 0 + r1a2_to_h1i0_exists: h1i0_exists - r1a2_to_h1i0 >= 0 + r1a2_to_h1i1_exists: h1i1_exists - r1a2_to_h1i1 >= 0 + r1a2_to_h1i2_exists: h1i2_exists - r1a2_to_h1i2 >= 0 + r1a2_to_h1i3_exists: h1i3_exists - r1a2_to_h1i3 >= 0 + r1a2_to_h1i4_exists: h1i4_exists - r1a2_to_h1i4 >= 0 + r1a2_to_h1i5_exists: h1i5_exists - r1a2_to_h1i5 >= 0 + r1a2_to_h1i6_exists: h1i6_exists - r1a2_to_h1i6 >= 0 + r1a2_to_h1i7_exists: h1i7_exists - r1a2_to_h1i7 >= 0 + r1a2_to_h1i8_exists: h1i8_exists - r1a2_to_h1i8 >= 0 + r1a2_to_h1i9_exists: h1i9_exists - r1a2_to_h1i9 >= 0 + r1a2_to_h2i0_exists: h2i0_exists - r1a2_to_h2i0 >= 0 + r1a2_to_h2i1_exists: h2i1_exists - r1a2_to_h2i1 >= 0 + r1a2_to_h2i2_exists: h2i2_exists - r1a2_to_h2i2 >= 0 + r1a2_to_h2i3_exists: h2i3_exists - r1a2_to_h2i3 >= 0 + r1a2_to_h2i4_exists: h2i4_exists - r1a2_to_h2i4 >= 0 + r1a2_to_h2i5_exists: h2i5_exists - r1a2_to_h2i5 >= 0 + r1a2_to_h2i6_exists: h2i6_exists - r1a2_to_h2i6 >= 0 + r1a2_to_h2i7_exists: h2i7_exists - r1a2_to_h2i7 >= 0 + r1a2_to_h2i8_exists: h2i8_exists - r1a2_to_h2i8 >= 0 + r1a2_to_h2i9_exists: h2i9_exists - r1a2_to_h2i9 >= 0 + r1a2_to_h3i0_exists: h3i0_exists - r1a2_to_h3i0 >= 0 + r1a2_to_h3i1_exists: h3i1_exists - r1a2_to_h3i1 >= 0 + r1a2_to_h3i2_exists: h3i2_exists - r1a2_to_h3i2 >= 0 + r1a2_to_h3i3_exists: h3i3_exists - r1a2_to_h3i3 >= 0 + r1a2_to_h3i4_exists: h3i4_exists - r1a2_to_h3i4 >= 0 + r1a2_to_h3i5_exists: h3i5_exists - r1a2_to_h3i5 >= 0 + r1a2_to_h3i6_exists: h3i6_exists - r1a2_to_h3i6 >= 0 + r1a2_to_h3i7_exists: h3i7_exists - r1a2_to_h3i7 >= 0 + r1a2_to_h3i8_exists: h3i8_exists - r1a2_to_h3i8 >= 0 + r1a2_to_h3i9_exists: h3i9_exists - r1a2_to_h3i9 >= 0 + r1a2_to_h4i0_exists: h4i0_exists - r1a2_to_h4i0 >= 0 + r1a2_to_h4i1_exists: h4i1_exists - r1a2_to_h4i1 >= 0 + r1a2_to_h4i2_exists: h4i2_exists - r1a2_to_h4i2 >= 0 + r1a2_to_h4i3_exists: h4i3_exists - r1a2_to_h4i3 >= 0 + r1a2_to_h4i4_exists: h4i4_exists - r1a2_to_h4i4 >= 0 + r1a2_to_h4i5_exists: h4i5_exists - r1a2_to_h4i5 >= 0 + r1a2_to_h4i6_exists: h4i6_exists - r1a2_to_h4i6 >= 0 + r1a2_to_h4i7_exists: h4i7_exists - r1a2_to_h4i7 >= 0 + r1a2_to_h4i8_exists: h4i8_exists - r1a2_to_h4i8 >= 0 + r1a2_to_h4i9_exists: h4i9_exists - r1a2_to_h4i9 >= 0 + r1a2_to_h5i0_exists: h5i0_exists - r1a2_to_h5i0 >= 0 + r1a2_to_h5i1_exists: h5i1_exists - r1a2_to_h5i1 >= 0 + r1a2_to_h5i2_exists: h5i2_exists - r1a2_to_h5i2 >= 0 + r1a2_to_h5i3_exists: h5i3_exists - r1a2_to_h5i3 >= 0 + r1a2_to_h5i4_exists: h5i4_exists - r1a2_to_h5i4 >= 0 + r1a2_to_h5i5_exists: h5i5_exists - r1a2_to_h5i5 >= 0 + r1a2_to_h5i6_exists: h5i6_exists - r1a2_to_h5i6 >= 0 + r1a2_to_h5i7_exists: h5i7_exists - r1a2_to_h5i7 >= 0 + r1a2_to_h5i8_exists: h5i8_exists - r1a2_to_h5i8 >= 0 + r1a2_to_h5i9_exists: h5i9_exists - r1a2_to_h5i9 >= 0 + r2a0_allocated: r2a0_to_h0i0 + r2a0_to_h0i1 + r2a0_to_h0i2 + r2a0_to_h0i3 + r2a0_to_h0i4 + r2a0_to_h0i5 + r2a0_to_h0i6 + r2a0_to_h0i7 + r2a0_to_h0i8 + r2a0_to_h0i9 + r2a0_to_h1i0 + r2a0_to_h1i1 + r2a0_to_h1i2 + r2a0_to_h1i3 + r2a0_to_h1i4 + r2a0_to_h1i5 + r2a0_to_h1i6 + r2a0_to_h1i7 + r2a0_to_h1i8 + r2a0_to_h1i9 + r2a0_to_h2i0 + r2a0_to_h2i1 + r2a0_to_h2i2 + r2a0_to_h2i3 + r2a0_to_h2i4 + r2a0_to_h2i5 + r2a0_to_h2i6 + r2a0_to_h2i7 + r2a0_to_h2i8 + r2a0_to_h2i9 + r2a0_to_h3i0 + r2a0_to_h3i1 + r2a0_to_h3i2 + r2a0_to_h3i3 + r2a0_to_h3i4 + r2a0_to_h3i5 + r2a0_to_h3i6 + r2a0_to_h3i7 + r2a0_to_h3i8 + r2a0_to_h3i9 + r2a0_to_h4i0 + r2a0_to_h4i1 + r2a0_to_h4i2 + r2a0_to_h4i3 + r2a0_to_h4i4 + r2a0_to_h4i5 + r2a0_to_h4i6 + r2a0_to_h4i7 + r2a0_to_h4i8 + r2a0_to_h4i9 + r2a0_to_h5i0 + r2a0_to_h5i1 + r2a0_to_h5i2 + r2a0_to_h5i3 + r2a0_to_h5i4 + r2a0_to_h5i5 + r2a0_to_h5i6 + r2a0_to_h5i7 + r2a0_to_h5i8 + r2a0_to_h5i9 = 1 + r2a0_to_h0i0_exists: h0i0_exists - r2a0_to_h0i0 >= 0 + r2a0_to_h0i1_exists: h0i1_exists - r2a0_to_h0i1 >= 0 + r2a0_to_h0i2_exists: h0i2_exists - r2a0_to_h0i2 >= 0 + r2a0_to_h0i3_exists: h0i3_exists - r2a0_to_h0i3 >= 0 + r2a0_to_h0i4_exists: h0i4_exists - r2a0_to_h0i4 >= 0 + r2a0_to_h0i5_exists: h0i5_exists - r2a0_to_h0i5 >= 0 + r2a0_to_h0i6_exists: h0i6_exists - r2a0_to_h0i6 >= 0 + r2a0_to_h0i7_exists: h0i7_exists - r2a0_to_h0i7 >= 0 + r2a0_to_h0i8_exists: h0i8_exists - r2a0_to_h0i8 >= 0 + r2a0_to_h0i9_exists: h0i9_exists - r2a0_to_h0i9 >= 0 + r2a0_to_h1i0_exists: h1i0_exists - r2a0_to_h1i0 >= 0 + r2a0_to_h1i1_exists: h1i1_exists - r2a0_to_h1i1 >= 0 + r2a0_to_h1i2_exists: h1i2_exists - r2a0_to_h1i2 >= 0 + r2a0_to_h1i3_exists: h1i3_exists - r2a0_to_h1i3 >= 0 + r2a0_to_h1i4_exists: h1i4_exists - r2a0_to_h1i4 >= 0 + r2a0_to_h1i5_exists: h1i5_exists - r2a0_to_h1i5 >= 0 + r2a0_to_h1i6_exists: h1i6_exists - r2a0_to_h1i6 >= 0 + r2a0_to_h1i7_exists: h1i7_exists - r2a0_to_h1i7 >= 0 + r2a0_to_h1i8_exists: h1i8_exists - r2a0_to_h1i8 >= 0 + r2a0_to_h1i9_exists: h1i9_exists - r2a0_to_h1i9 >= 0 + r2a0_to_h2i0_exists: h2i0_exists - r2a0_to_h2i0 >= 0 + r2a0_to_h2i1_exists: h2i1_exists - r2a0_to_h2i1 >= 0 + r2a0_to_h2i2_exists: h2i2_exists - r2a0_to_h2i2 >= 0 + r2a0_to_h2i3_exists: h2i3_exists - r2a0_to_h2i3 >= 0 + r2a0_to_h2i4_exists: h2i4_exists - r2a0_to_h2i4 >= 0 + r2a0_to_h2i5_exists: h2i5_exists - r2a0_to_h2i5 >= 0 + r2a0_to_h2i6_exists: h2i6_exists - r2a0_to_h2i6 >= 0 + r2a0_to_h2i7_exists: h2i7_exists - r2a0_to_h2i7 >= 0 + r2a0_to_h2i8_exists: h2i8_exists - r2a0_to_h2i8 >= 0 + r2a0_to_h2i9_exists: h2i9_exists - r2a0_to_h2i9 >= 0 + r2a0_to_h3i0_exists: h3i0_exists - r2a0_to_h3i0 >= 0 + r2a0_to_h3i1_exists: h3i1_exists - r2a0_to_h3i1 >= 0 + r2a0_to_h3i2_exists: h3i2_exists - r2a0_to_h3i2 >= 0 + r2a0_to_h3i3_exists: h3i3_exists - r2a0_to_h3i3 >= 0 + r2a0_to_h3i4_exists: h3i4_exists - r2a0_to_h3i4 >= 0 + r2a0_to_h3i5_exists: h3i5_exists - r2a0_to_h3i5 >= 0 + r2a0_to_h3i6_exists: h3i6_exists - r2a0_to_h3i6 >= 0 + r2a0_to_h3i7_exists: h3i7_exists - r2a0_to_h3i7 >= 0 + r2a0_to_h3i8_exists: h3i8_exists - r2a0_to_h3i8 >= 0 + r2a0_to_h3i9_exists: h3i9_exists - r2a0_to_h3i9 >= 0 + r2a0_to_h4i0_exists: h4i0_exists - r2a0_to_h4i0 >= 0 + r2a0_to_h4i1_exists: h4i1_exists - r2a0_to_h4i1 >= 0 + r2a0_to_h4i2_exists: h4i2_exists - r2a0_to_h4i2 >= 0 + r2a0_to_h4i3_exists: h4i3_exists - r2a0_to_h4i3 >= 0 + r2a0_to_h4i4_exists: h4i4_exists - r2a0_to_h4i4 >= 0 + r2a0_to_h4i5_exists: h4i5_exists - r2a0_to_h4i5 >= 0 + r2a0_to_h4i6_exists: h4i6_exists - r2a0_to_h4i6 >= 0 + r2a0_to_h4i7_exists: h4i7_exists - r2a0_to_h4i7 >= 0 + r2a0_to_h4i8_exists: h4i8_exists - r2a0_to_h4i8 >= 0 + r2a0_to_h4i9_exists: h4i9_exists - r2a0_to_h4i9 >= 0 + r2a0_to_h5i0_exists: h5i0_exists - r2a0_to_h5i0 >= 0 + r2a0_to_h5i1_exists: h5i1_exists - r2a0_to_h5i1 >= 0 + r2a0_to_h5i2_exists: h5i2_exists - r2a0_to_h5i2 >= 0 + r2a0_to_h5i3_exists: h5i3_exists - r2a0_to_h5i3 >= 0 + r2a0_to_h5i4_exists: h5i4_exists - r2a0_to_h5i4 >= 0 + r2a0_to_h5i5_exists: h5i5_exists - r2a0_to_h5i5 >= 0 + r2a0_to_h5i6_exists: h5i6_exists - r2a0_to_h5i6 >= 0 + r2a0_to_h5i7_exists: h5i7_exists - r2a0_to_h5i7 >= 0 + r2a0_to_h5i8_exists: h5i8_exists - r2a0_to_h5i8 >= 0 + r2a0_to_h5i9_exists: h5i9_exists - r2a0_to_h5i9 >= 0 + r3a0_allocated: r3a0_to_h0i0 + r3a0_to_h0i1 + r3a0_to_h0i2 + r3a0_to_h0i3 + r3a0_to_h0i4 + r3a0_to_h0i5 + r3a0_to_h0i6 + r3a0_to_h0i7 + r3a0_to_h0i8 + r3a0_to_h0i9 + r3a0_to_h1i0 + r3a0_to_h1i1 + r3a0_to_h1i2 + r3a0_to_h1i3 + r3a0_to_h1i4 + r3a0_to_h1i5 + r3a0_to_h1i6 + r3a0_to_h1i7 + r3a0_to_h1i8 + r3a0_to_h1i9 + r3a0_to_h2i0 + r3a0_to_h2i1 + r3a0_to_h2i2 + r3a0_to_h2i3 + r3a0_to_h2i4 + r3a0_to_h2i5 + r3a0_to_h2i6 + r3a0_to_h2i7 + r3a0_to_h2i8 + r3a0_to_h2i9 + r3a0_to_h3i0 + r3a0_to_h3i1 + r3a0_to_h3i2 + r3a0_to_h3i3 + r3a0_to_h3i4 + r3a0_to_h3i5 + r3a0_to_h3i6 + r3a0_to_h3i7 + r3a0_to_h3i8 + r3a0_to_h3i9 + r3a0_to_h4i0 + r3a0_to_h4i1 + r3a0_to_h4i2 + r3a0_to_h4i3 + r3a0_to_h4i4 + r3a0_to_h4i5 + r3a0_to_h4i6 + r3a0_to_h4i7 + r3a0_to_h4i8 + r3a0_to_h4i9 + r3a0_to_h5i0 + r3a0_to_h5i1 + r3a0_to_h5i2 + r3a0_to_h5i3 + r3a0_to_h5i4 + r3a0_to_h5i5 + r3a0_to_h5i6 + r3a0_to_h5i7 + r3a0_to_h5i8 + r3a0_to_h5i9 = 1 + r3a0_to_h0i0_exists: h0i0_exists - r3a0_to_h0i0 >= 0 + r3a0_to_h0i1_exists: h0i1_exists - r3a0_to_h0i1 >= 0 + r3a0_to_h0i2_exists: h0i2_exists - r3a0_to_h0i2 >= 0 + r3a0_to_h0i3_exists: h0i3_exists - r3a0_to_h0i3 >= 0 + r3a0_to_h0i4_exists: h0i4_exists - r3a0_to_h0i4 >= 0 + r3a0_to_h0i5_exists: h0i5_exists - r3a0_to_h0i5 >= 0 + r3a0_to_h0i6_exists: h0i6_exists - r3a0_to_h0i6 >= 0 + r3a0_to_h0i7_exists: h0i7_exists - r3a0_to_h0i7 >= 0 + r3a0_to_h0i8_exists: h0i8_exists - r3a0_to_h0i8 >= 0 + r3a0_to_h0i9_exists: h0i9_exists - r3a0_to_h0i9 >= 0 + r3a0_to_h1i0_exists: h1i0_exists - r3a0_to_h1i0 >= 0 + r3a0_to_h1i1_exists: h1i1_exists - r3a0_to_h1i1 >= 0 + r3a0_to_h1i2_exists: h1i2_exists - r3a0_to_h1i2 >= 0 + r3a0_to_h1i3_exists: h1i3_exists - r3a0_to_h1i3 >= 0 + r3a0_to_h1i4_exists: h1i4_exists - r3a0_to_h1i4 >= 0 + r3a0_to_h1i5_exists: h1i5_exists - r3a0_to_h1i5 >= 0 + r3a0_to_h1i6_exists: h1i6_exists - r3a0_to_h1i6 >= 0 + r3a0_to_h1i7_exists: h1i7_exists - r3a0_to_h1i7 >= 0 + r3a0_to_h1i8_exists: h1i8_exists - r3a0_to_h1i8 >= 0 + r3a0_to_h1i9_exists: h1i9_exists - r3a0_to_h1i9 >= 0 + r3a0_to_h2i0_exists: h2i0_exists - r3a0_to_h2i0 >= 0 + r3a0_to_h2i1_exists: h2i1_exists - r3a0_to_h2i1 >= 0 + r3a0_to_h2i2_exists: h2i2_exists - r3a0_to_h2i2 >= 0 + r3a0_to_h2i3_exists: h2i3_exists - r3a0_to_h2i3 >= 0 + r3a0_to_h2i4_exists: h2i4_exists - r3a0_to_h2i4 >= 0 + r3a0_to_h2i5_exists: h2i5_exists - r3a0_to_h2i5 >= 0 + r3a0_to_h2i6_exists: h2i6_exists - r3a0_to_h2i6 >= 0 + r3a0_to_h2i7_exists: h2i7_exists - r3a0_to_h2i7 >= 0 + r3a0_to_h2i8_exists: h2i8_exists - r3a0_to_h2i8 >= 0 + r3a0_to_h2i9_exists: h2i9_exists - r3a0_to_h2i9 >= 0 + r3a0_to_h3i0_exists: h3i0_exists - r3a0_to_h3i0 >= 0 + r3a0_to_h3i1_exists: h3i1_exists - r3a0_to_h3i1 >= 0 + r3a0_to_h3i2_exists: h3i2_exists - r3a0_to_h3i2 >= 0 + r3a0_to_h3i3_exists: h3i3_exists - r3a0_to_h3i3 >= 0 + r3a0_to_h3i4_exists: h3i4_exists - r3a0_to_h3i4 >= 0 + r3a0_to_h3i5_exists: h3i5_exists - r3a0_to_h3i5 >= 0 + r3a0_to_h3i6_exists: h3i6_exists - r3a0_to_h3i6 >= 0 + r3a0_to_h3i7_exists: h3i7_exists - r3a0_to_h3i7 >= 0 + r3a0_to_h3i8_exists: h3i8_exists - r3a0_to_h3i8 >= 0 + r3a0_to_h3i9_exists: h3i9_exists - r3a0_to_h3i9 >= 0 + r3a0_to_h4i0_exists: h4i0_exists - r3a0_to_h4i0 >= 0 + r3a0_to_h4i1_exists: h4i1_exists - r3a0_to_h4i1 >= 0 + r3a0_to_h4i2_exists: h4i2_exists - r3a0_to_h4i2 >= 0 + r3a0_to_h4i3_exists: h4i3_exists - r3a0_to_h4i3 >= 0 + r3a0_to_h4i4_exists: h4i4_exists - r3a0_to_h4i4 >= 0 + r3a0_to_h4i5_exists: h4i5_exists - r3a0_to_h4i5 >= 0 + r3a0_to_h4i6_exists: h4i6_exists - r3a0_to_h4i6 >= 0 + r3a0_to_h4i7_exists: h4i7_exists - r3a0_to_h4i7 >= 0 + r3a0_to_h4i8_exists: h4i8_exists - r3a0_to_h4i8 >= 0 + r3a0_to_h4i9_exists: h4i9_exists - r3a0_to_h4i9 >= 0 + r3a0_to_h5i0_exists: h5i0_exists - r3a0_to_h5i0 >= 0 + r3a0_to_h5i1_exists: h5i1_exists - r3a0_to_h5i1 >= 0 + r3a0_to_h5i2_exists: h5i2_exists - r3a0_to_h5i2 >= 0 + r3a0_to_h5i3_exists: h5i3_exists - r3a0_to_h5i3 >= 0 + r3a0_to_h5i4_exists: h5i4_exists - r3a0_to_h5i4 >= 0 + r3a0_to_h5i5_exists: h5i5_exists - r3a0_to_h5i5 >= 0 + r3a0_to_h5i6_exists: h5i6_exists - r3a0_to_h5i6 >= 0 + r3a0_to_h5i7_exists: h5i7_exists - r3a0_to_h5i7 >= 0 + r3a0_to_h5i8_exists: h5i8_exists - r3a0_to_h5i8 >= 0 + r3a0_to_h5i9_exists: h5i9_exists - r3a0_to_h5i9 >= 0 + r4a0_allocated: r4a0_to_h4i0 + r4a0_to_h4i1 + r4a0_to_h4i2 + r4a0_to_h4i3 + r4a0_to_h4i4 + r4a0_to_h4i5 + r4a0_to_h4i6 + r4a0_to_h4i7 + r4a0_to_h4i8 + r4a0_to_h4i9 + r4a0_to_h5i0 + r4a0_to_h5i1 + r4a0_to_h5i2 + r4a0_to_h5i3 + r4a0_to_h5i4 + r4a0_to_h5i5 + r4a0_to_h5i6 + r4a0_to_h5i7 + r4a0_to_h5i8 + r4a0_to_h5i9 = 1 + r4a0_to_h4i0_exists: h4i0_exists - r4a0_to_h4i0 >= 0 + r4a0_to_h4i1_exists: h4i1_exists - r4a0_to_h4i1 >= 0 + r4a0_to_h4i2_exists: h4i2_exists - r4a0_to_h4i2 >= 0 + r4a0_to_h4i3_exists: h4i3_exists - r4a0_to_h4i3 >= 0 + r4a0_to_h4i4_exists: h4i4_exists - r4a0_to_h4i4 >= 0 + r4a0_to_h4i5_exists: h4i5_exists - r4a0_to_h4i5 >= 0 + r4a0_to_h4i6_exists: h4i6_exists - r4a0_to_h4i6 >= 0 + r4a0_to_h4i7_exists: h4i7_exists - r4a0_to_h4i7 >= 0 + r4a0_to_h4i8_exists: h4i8_exists - r4a0_to_h4i8 >= 0 + r4a0_to_h4i9_exists: h4i9_exists - r4a0_to_h4i9 >= 0 + r4a0_to_h5i0_exists: h5i0_exists - r4a0_to_h5i0 >= 0 + r4a0_to_h5i1_exists: h5i1_exists - r4a0_to_h5i1 >= 0 + r4a0_to_h5i2_exists: h5i2_exists - r4a0_to_h5i2 >= 0 + r4a0_to_h5i3_exists: h5i3_exists - r4a0_to_h5i3 >= 0 + r4a0_to_h5i4_exists: h5i4_exists - r4a0_to_h5i4 >= 0 + r4a0_to_h5i5_exists: h5i5_exists - r4a0_to_h5i5 >= 0 + r4a0_to_h5i6_exists: h5i6_exists - r4a0_to_h5i6 >= 0 + r4a0_to_h5i7_exists: h5i7_exists - r4a0_to_h5i7 >= 0 + r4a0_to_h5i8_exists: h5i8_exists - r4a0_to_h5i8 >= 0 + r4a0_to_h5i9_exists: h5i9_exists - r4a0_to_h5i9 >= 0 + r4a1_allocated: r4a1_to_h4i0 + r4a1_to_h4i1 + r4a1_to_h4i2 + r4a1_to_h4i3 + r4a1_to_h4i4 + r4a1_to_h4i5 + r4a1_to_h4i6 + r4a1_to_h4i7 + r4a1_to_h4i8 + r4a1_to_h4i9 + r4a1_to_h5i0 + r4a1_to_h5i1 + r4a1_to_h5i2 + r4a1_to_h5i3 + r4a1_to_h5i4 + r4a1_to_h5i5 + r4a1_to_h5i6 + r4a1_to_h5i7 + r4a1_to_h5i8 + r4a1_to_h5i9 = 1 + r4a1_to_h4i0_exists: h4i0_exists - r4a1_to_h4i0 >= 0 + r4a1_to_h4i1_exists: h4i1_exists - r4a1_to_h4i1 >= 0 + r4a1_to_h4i2_exists: h4i2_exists - r4a1_to_h4i2 >= 0 + r4a1_to_h4i3_exists: h4i3_exists - r4a1_to_h4i3 >= 0 + r4a1_to_h4i4_exists: h4i4_exists - r4a1_to_h4i4 >= 0 + r4a1_to_h4i5_exists: h4i5_exists - r4a1_to_h4i5 >= 0 + r4a1_to_h4i6_exists: h4i6_exists - r4a1_to_h4i6 >= 0 + r4a1_to_h4i7_exists: h4i7_exists - r4a1_to_h4i7 >= 0 + r4a1_to_h4i8_exists: h4i8_exists - r4a1_to_h4i8 >= 0 + r4a1_to_h4i9_exists: h4i9_exists - r4a1_to_h4i9 >= 0 + r4a1_to_h5i0_exists: h5i0_exists - r4a1_to_h5i0 >= 0 + r4a1_to_h5i1_exists: h5i1_exists - r4a1_to_h5i1 >= 0 + r4a1_to_h5i2_exists: h5i2_exists - r4a1_to_h5i2 >= 0 + r4a1_to_h5i3_exists: h5i3_exists - r4a1_to_h5i3 >= 0 + r4a1_to_h5i4_exists: h5i4_exists - r4a1_to_h5i4 >= 0 + r4a1_to_h5i5_exists: h5i5_exists - r4a1_to_h5i5 >= 0 + r4a1_to_h5i6_exists: h5i6_exists - r4a1_to_h5i6 >= 0 + r4a1_to_h5i7_exists: h5i7_exists - r4a1_to_h5i7 >= 0 + r4a1_to_h5i8_exists: h5i8_exists - r4a1_to_h5i8 >= 0 + r4a1_to_h5i9_exists: h5i9_exists - r4a1_to_h5i9 >= 0 + r4a2_allocated: r4a2_to_h4i0 + r4a2_to_h4i1 + r4a2_to_h4i2 + r4a2_to_h4i3 + r4a2_to_h4i4 + r4a2_to_h4i5 + r4a2_to_h4i6 + r4a2_to_h4i7 + r4a2_to_h4i8 + r4a2_to_h4i9 + r4a2_to_h5i0 + r4a2_to_h5i1 + r4a2_to_h5i2 + r4a2_to_h5i3 + r4a2_to_h5i4 + r4a2_to_h5i5 + r4a2_to_h5i6 + r4a2_to_h5i7 + r4a2_to_h5i8 + r4a2_to_h5i9 = 1 + r4a2_to_h4i0_exists: h4i0_exists - r4a2_to_h4i0 >= 0 + r4a2_to_h4i1_exists: h4i1_exists - r4a2_to_h4i1 >= 0 + r4a2_to_h4i2_exists: h4i2_exists - r4a2_to_h4i2 >= 0 + r4a2_to_h4i3_exists: h4i3_exists - r4a2_to_h4i3 >= 0 + r4a2_to_h4i4_exists: h4i4_exists - r4a2_to_h4i4 >= 0 + r4a2_to_h4i5_exists: h4i5_exists - r4a2_to_h4i5 >= 0 + r4a2_to_h4i6_exists: h4i6_exists - r4a2_to_h4i6 >= 0 + r4a2_to_h4i7_exists: h4i7_exists - r4a2_to_h4i7 >= 0 + r4a2_to_h4i8_exists: h4i8_exists - r4a2_to_h4i8 >= 0 + r4a2_to_h4i9_exists: h4i9_exists - r4a2_to_h4i9 >= 0 + r4a2_to_h5i0_exists: h5i0_exists - r4a2_to_h5i0 >= 0 + r4a2_to_h5i1_exists: h5i1_exists - r4a2_to_h5i1 >= 0 + r4a2_to_h5i2_exists: h5i2_exists - r4a2_to_h5i2 >= 0 + r4a2_to_h5i3_exists: h5i3_exists - r4a2_to_h5i3 >= 0 + r4a2_to_h5i4_exists: h5i4_exists - r4a2_to_h5i4 >= 0 + r4a2_to_h5i5_exists: h5i5_exists - r4a2_to_h5i5 >= 0 + r4a2_to_h5i6_exists: h5i6_exists - r4a2_to_h5i6 >= 0 + r4a2_to_h5i7_exists: h5i7_exists - r4a2_to_h5i7 >= 0 + r4a2_to_h5i8_exists: h5i8_exists - r4a2_to_h5i8 >= 0 + r4a2_to_h5i9_exists: h5i9_exists - r4a2_to_h5i9 >= 0 + r4a3_allocated: r4a3_to_h4i0 + r4a3_to_h4i1 + r4a3_to_h4i2 + r4a3_to_h4i3 + r4a3_to_h4i4 + r4a3_to_h4i5 + r4a3_to_h4i6 + r4a3_to_h4i7 + r4a3_to_h4i8 + r4a3_to_h4i9 + r4a3_to_h5i0 + r4a3_to_h5i1 + r4a3_to_h5i2 + r4a3_to_h5i3 + r4a3_to_h5i4 + r4a3_to_h5i5 + r4a3_to_h5i6 + r4a3_to_h5i7 + r4a3_to_h5i8 + r4a3_to_h5i9 = 1 + r4a3_to_h4i0_exists: h4i0_exists - r4a3_to_h4i0 >= 0 + r4a3_to_h4i1_exists: h4i1_exists - r4a3_to_h4i1 >= 0 + r4a3_to_h4i2_exists: h4i2_exists - r4a3_to_h4i2 >= 0 + r4a3_to_h4i3_exists: h4i3_exists - r4a3_to_h4i3 >= 0 + r4a3_to_h4i4_exists: h4i4_exists - r4a3_to_h4i4 >= 0 + r4a3_to_h4i5_exists: h4i5_exists - r4a3_to_h4i5 >= 0 + r4a3_to_h4i6_exists: h4i6_exists - r4a3_to_h4i6 >= 0 + r4a3_to_h4i7_exists: h4i7_exists - r4a3_to_h4i7 >= 0 + r4a3_to_h4i8_exists: h4i8_exists - r4a3_to_h4i8 >= 0 + r4a3_to_h4i9_exists: h4i9_exists - r4a3_to_h4i9 >= 0 + r4a3_to_h5i0_exists: h5i0_exists - r4a3_to_h5i0 >= 0 + r4a3_to_h5i1_exists: h5i1_exists - r4a3_to_h5i1 >= 0 + r4a3_to_h5i2_exists: h5i2_exists - r4a3_to_h5i2 >= 0 + r4a3_to_h5i3_exists: h5i3_exists - r4a3_to_h5i3 >= 0 + r4a3_to_h5i4_exists: h5i4_exists - r4a3_to_h5i4 >= 0 + r4a3_to_h5i5_exists: h5i5_exists - r4a3_to_h5i5 >= 0 + r4a3_to_h5i6_exists: h5i6_exists - r4a3_to_h5i6 >= 0 + r4a3_to_h5i7_exists: h5i7_exists - r4a3_to_h5i7 >= 0 + r4a3_to_h5i8_exists: h5i8_exists - r4a3_to_h5i8 >= 0 + r4a3_to_h5i9_exists: h5i9_exists - r4a3_to_h5i9 >= 0 + r5a0_allocated: r5a0_to_h0i0 + r5a0_to_h0i1 + r5a0_to_h0i2 + r5a0_to_h0i3 + r5a0_to_h0i4 + r5a0_to_h0i5 + r5a0_to_h0i6 + r5a0_to_h0i7 + r5a0_to_h0i8 + r5a0_to_h0i9 + r5a0_to_h1i0 + r5a0_to_h1i1 + r5a0_to_h1i2 + r5a0_to_h1i3 + r5a0_to_h1i4 + r5a0_to_h1i5 + r5a0_to_h1i6 + r5a0_to_h1i7 + r5a0_to_h1i8 + r5a0_to_h1i9 + r5a0_to_h2i0 + r5a0_to_h2i1 + r5a0_to_h2i2 + r5a0_to_h2i3 + r5a0_to_h2i4 + r5a0_to_h2i5 + r5a0_to_h2i6 + r5a0_to_h2i7 + r5a0_to_h2i8 + r5a0_to_h2i9 + r5a0_to_h3i0 + r5a0_to_h3i1 + r5a0_to_h3i2 + r5a0_to_h3i3 + r5a0_to_h3i4 + r5a0_to_h3i5 + r5a0_to_h3i6 + r5a0_to_h3i7 + r5a0_to_h3i8 + r5a0_to_h3i9 + r5a0_to_h4i0 + r5a0_to_h4i1 + r5a0_to_h4i2 + r5a0_to_h4i3 + r5a0_to_h4i4 + r5a0_to_h4i5 + r5a0_to_h4i6 + r5a0_to_h4i7 + r5a0_to_h4i8 + r5a0_to_h4i9 + r5a0_to_h5i0 + r5a0_to_h5i1 + r5a0_to_h5i2 + r5a0_to_h5i3 + r5a0_to_h5i4 + r5a0_to_h5i5 + r5a0_to_h5i6 + r5a0_to_h5i7 + r5a0_to_h5i8 + r5a0_to_h5i9 = 1 + r5a0_to_h0i0_exists: h0i0_exists - r5a0_to_h0i0 >= 0 + r5a0_to_h0i1_exists: h0i1_exists - r5a0_to_h0i1 >= 0 + r5a0_to_h0i2_exists: h0i2_exists - r5a0_to_h0i2 >= 0 + r5a0_to_h0i3_exists: h0i3_exists - r5a0_to_h0i3 >= 0 + r5a0_to_h0i4_exists: h0i4_exists - r5a0_to_h0i4 >= 0 + r5a0_to_h0i5_exists: h0i5_exists - r5a0_to_h0i5 >= 0 + r5a0_to_h0i6_exists: h0i6_exists - r5a0_to_h0i6 >= 0 + r5a0_to_h0i7_exists: h0i7_exists - r5a0_to_h0i7 >= 0 + r5a0_to_h0i8_exists: h0i8_exists - r5a0_to_h0i8 >= 0 + r5a0_to_h0i9_exists: h0i9_exists - r5a0_to_h0i9 >= 0 + r5a0_to_h1i0_exists: h1i0_exists - r5a0_to_h1i0 >= 0 + r5a0_to_h1i1_exists: h1i1_exists - r5a0_to_h1i1 >= 0 + r5a0_to_h1i2_exists: h1i2_exists - r5a0_to_h1i2 >= 0 + r5a0_to_h1i3_exists: h1i3_exists - r5a0_to_h1i3 >= 0 + r5a0_to_h1i4_exists: h1i4_exists - r5a0_to_h1i4 >= 0 + r5a0_to_h1i5_exists: h1i5_exists - r5a0_to_h1i5 >= 0 + r5a0_to_h1i6_exists: h1i6_exists - r5a0_to_h1i6 >= 0 + r5a0_to_h1i7_exists: h1i7_exists - r5a0_to_h1i7 >= 0 + r5a0_to_h1i8_exists: h1i8_exists - r5a0_to_h1i8 >= 0 + r5a0_to_h1i9_exists: h1i9_exists - r5a0_to_h1i9 >= 0 + r5a0_to_h2i0_exists: h2i0_exists - r5a0_to_h2i0 >= 0 + r5a0_to_h2i1_exists: h2i1_exists - r5a0_to_h2i1 >= 0 + r5a0_to_h2i2_exists: h2i2_exists - r5a0_to_h2i2 >= 0 + r5a0_to_h2i3_exists: h2i3_exists - r5a0_to_h2i3 >= 0 + r5a0_to_h2i4_exists: h2i4_exists - r5a0_to_h2i4 >= 0 + r5a0_to_h2i5_exists: h2i5_exists - r5a0_to_h2i5 >= 0 + r5a0_to_h2i6_exists: h2i6_exists - r5a0_to_h2i6 >= 0 + r5a0_to_h2i7_exists: h2i7_exists - r5a0_to_h2i7 >= 0 + r5a0_to_h2i8_exists: h2i8_exists - r5a0_to_h2i8 >= 0 + r5a0_to_h2i9_exists: h2i9_exists - r5a0_to_h2i9 >= 0 + r5a0_to_h3i0_exists: h3i0_exists - r5a0_to_h3i0 >= 0 + r5a0_to_h3i1_exists: h3i1_exists - r5a0_to_h3i1 >= 0 + r5a0_to_h3i2_exists: h3i2_exists - r5a0_to_h3i2 >= 0 + r5a0_to_h3i3_exists: h3i3_exists - r5a0_to_h3i3 >= 0 + r5a0_to_h3i4_exists: h3i4_exists - r5a0_to_h3i4 >= 0 + r5a0_to_h3i5_exists: h3i5_exists - r5a0_to_h3i5 >= 0 + r5a0_to_h3i6_exists: h3i6_exists - r5a0_to_h3i6 >= 0 + r5a0_to_h3i7_exists: h3i7_exists - r5a0_to_h3i7 >= 0 + r5a0_to_h3i8_exists: h3i8_exists - r5a0_to_h3i8 >= 0 + r5a0_to_h3i9_exists: h3i9_exists - r5a0_to_h3i9 >= 0 + r5a0_to_h4i0_exists: h4i0_exists - r5a0_to_h4i0 >= 0 + r5a0_to_h4i1_exists: h4i1_exists - r5a0_to_h4i1 >= 0 + r5a0_to_h4i2_exists: h4i2_exists - r5a0_to_h4i2 >= 0 + r5a0_to_h4i3_exists: h4i3_exists - r5a0_to_h4i3 >= 0 + r5a0_to_h4i4_exists: h4i4_exists - r5a0_to_h4i4 >= 0 + r5a0_to_h4i5_exists: h4i5_exists - r5a0_to_h4i5 >= 0 + r5a0_to_h4i6_exists: h4i6_exists - r5a0_to_h4i6 >= 0 + r5a0_to_h4i7_exists: h4i7_exists - r5a0_to_h4i7 >= 0 + r5a0_to_h4i8_exists: h4i8_exists - r5a0_to_h4i8 >= 0 + r5a0_to_h4i9_exists: h4i9_exists - r5a0_to_h4i9 >= 0 + r5a0_to_h5i0_exists: h5i0_exists - r5a0_to_h5i0 >= 0 + r5a0_to_h5i1_exists: h5i1_exists - r5a0_to_h5i1 >= 0 + r5a0_to_h5i2_exists: h5i2_exists - r5a0_to_h5i2 >= 0 + r5a0_to_h5i3_exists: h5i3_exists - r5a0_to_h5i3 >= 0 + r5a0_to_h5i4_exists: h5i4_exists - r5a0_to_h5i4 >= 0 + r5a0_to_h5i5_exists: h5i5_exists - r5a0_to_h5i5 >= 0 + r5a0_to_h5i6_exists: h5i6_exists - r5a0_to_h5i6 >= 0 + r5a0_to_h5i7_exists: h5i7_exists - r5a0_to_h5i7 >= 0 + r5a0_to_h5i8_exists: h5i8_exists - r5a0_to_h5i8 >= 0 + r5a0_to_h5i9_exists: h5i9_exists - r5a0_to_h5i9 >= 0 + r6a0_allocated: r6a0_to_h0i0 + r6a0_to_h0i1 + r6a0_to_h0i2 + r6a0_to_h0i3 + r6a0_to_h0i4 + r6a0_to_h0i5 + r6a0_to_h0i6 + r6a0_to_h0i7 + r6a0_to_h0i8 + r6a0_to_h0i9 + r6a0_to_h1i0 + r6a0_to_h1i1 + r6a0_to_h1i2 + r6a0_to_h1i3 + r6a0_to_h1i4 + r6a0_to_h1i5 + r6a0_to_h1i6 + r6a0_to_h1i7 + r6a0_to_h1i8 + r6a0_to_h1i9 + r6a0_to_h2i0 + r6a0_to_h2i1 + r6a0_to_h2i2 + r6a0_to_h2i3 + r6a0_to_h2i4 + r6a0_to_h2i5 + r6a0_to_h2i6 + r6a0_to_h2i7 + r6a0_to_h2i8 + r6a0_to_h2i9 + r6a0_to_h3i0 + r6a0_to_h3i1 + r6a0_to_h3i2 + r6a0_to_h3i3 + r6a0_to_h3i4 + r6a0_to_h3i5 + r6a0_to_h3i6 + r6a0_to_h3i7 + r6a0_to_h3i8 + r6a0_to_h3i9 + r6a0_to_h4i0 + r6a0_to_h4i1 + r6a0_to_h4i2 + r6a0_to_h4i3 + r6a0_to_h4i4 + r6a0_to_h4i5 + r6a0_to_h4i6 + r6a0_to_h4i7 + r6a0_to_h4i8 + r6a0_to_h4i9 + r6a0_to_h5i0 + r6a0_to_h5i1 + r6a0_to_h5i2 + r6a0_to_h5i3 + r6a0_to_h5i4 + r6a0_to_h5i5 + r6a0_to_h5i6 + r6a0_to_h5i7 + r6a0_to_h5i8 + r6a0_to_h5i9 = 1 + r6a0_to_h0i0_exists: h0i0_exists - r6a0_to_h0i0 >= 0 + r6a0_to_h0i1_exists: h0i1_exists - r6a0_to_h0i1 >= 0 + r6a0_to_h0i2_exists: h0i2_exists - r6a0_to_h0i2 >= 0 + r6a0_to_h0i3_exists: h0i3_exists - r6a0_to_h0i3 >= 0 + r6a0_to_h0i4_exists: h0i4_exists - r6a0_to_h0i4 >= 0 + r6a0_to_h0i5_exists: h0i5_exists - r6a0_to_h0i5 >= 0 + r6a0_to_h0i6_exists: h0i6_exists - r6a0_to_h0i6 >= 0 + r6a0_to_h0i7_exists: h0i7_exists - r6a0_to_h0i7 >= 0 + r6a0_to_h0i8_exists: h0i8_exists - r6a0_to_h0i8 >= 0 + r6a0_to_h0i9_exists: h0i9_exists - r6a0_to_h0i9 >= 0 + r6a0_to_h1i0_exists: h1i0_exists - r6a0_to_h1i0 >= 0 + r6a0_to_h1i1_exists: h1i1_exists - r6a0_to_h1i1 >= 0 + r6a0_to_h1i2_exists: h1i2_exists - r6a0_to_h1i2 >= 0 + r6a0_to_h1i3_exists: h1i3_exists - r6a0_to_h1i3 >= 0 + r6a0_to_h1i4_exists: h1i4_exists - r6a0_to_h1i4 >= 0 + r6a0_to_h1i5_exists: h1i5_exists - r6a0_to_h1i5 >= 0 + r6a0_to_h1i6_exists: h1i6_exists - r6a0_to_h1i6 >= 0 + r6a0_to_h1i7_exists: h1i7_exists - r6a0_to_h1i7 >= 0 + r6a0_to_h1i8_exists: h1i8_exists - r6a0_to_h1i8 >= 0 + r6a0_to_h1i9_exists: h1i9_exists - r6a0_to_h1i9 >= 0 + r6a0_to_h2i0_exists: h2i0_exists - r6a0_to_h2i0 >= 0 + r6a0_to_h2i1_exists: h2i1_exists - r6a0_to_h2i1 >= 0 + r6a0_to_h2i2_exists: h2i2_exists - r6a0_to_h2i2 >= 0 + r6a0_to_h2i3_exists: h2i3_exists - r6a0_to_h2i3 >= 0 + r6a0_to_h2i4_exists: h2i4_exists - r6a0_to_h2i4 >= 0 + r6a0_to_h2i5_exists: h2i5_exists - r6a0_to_h2i5 >= 0 + r6a0_to_h2i6_exists: h2i6_exists - r6a0_to_h2i6 >= 0 + r6a0_to_h2i7_exists: h2i7_exists - r6a0_to_h2i7 >= 0 + r6a0_to_h2i8_exists: h2i8_exists - r6a0_to_h2i8 >= 0 + r6a0_to_h2i9_exists: h2i9_exists - r6a0_to_h2i9 >= 0 + r6a0_to_h3i0_exists: h3i0_exists - r6a0_to_h3i0 >= 0 + r6a0_to_h3i1_exists: h3i1_exists - r6a0_to_h3i1 >= 0 + r6a0_to_h3i2_exists: h3i2_exists - r6a0_to_h3i2 >= 0 + r6a0_to_h3i3_exists: h3i3_exists - r6a0_to_h3i3 >= 0 + r6a0_to_h3i4_exists: h3i4_exists - r6a0_to_h3i4 >= 0 + r6a0_to_h3i5_exists: h3i5_exists - r6a0_to_h3i5 >= 0 + r6a0_to_h3i6_exists: h3i6_exists - r6a0_to_h3i6 >= 0 + r6a0_to_h3i7_exists: h3i7_exists - r6a0_to_h3i7 >= 0 + r6a0_to_h3i8_exists: h3i8_exists - r6a0_to_h3i8 >= 0 + r6a0_to_h3i9_exists: h3i9_exists - r6a0_to_h3i9 >= 0 + r6a0_to_h4i0_exists: h4i0_exists - r6a0_to_h4i0 >= 0 + r6a0_to_h4i1_exists: h4i1_exists - r6a0_to_h4i1 >= 0 + r6a0_to_h4i2_exists: h4i2_exists - r6a0_to_h4i2 >= 0 + r6a0_to_h4i3_exists: h4i3_exists - r6a0_to_h4i3 >= 0 + r6a0_to_h4i4_exists: h4i4_exists - r6a0_to_h4i4 >= 0 + r6a0_to_h4i5_exists: h4i5_exists - r6a0_to_h4i5 >= 0 + r6a0_to_h4i6_exists: h4i6_exists - r6a0_to_h4i6 >= 0 + r6a0_to_h4i7_exists: h4i7_exists - r6a0_to_h4i7 >= 0 + r6a0_to_h4i8_exists: h4i8_exists - r6a0_to_h4i8 >= 0 + r6a0_to_h4i9_exists: h4i9_exists - r6a0_to_h4i9 >= 0 + r6a0_to_h5i0_exists: h5i0_exists - r6a0_to_h5i0 >= 0 + r6a0_to_h5i1_exists: h5i1_exists - r6a0_to_h5i1 >= 0 + r6a0_to_h5i2_exists: h5i2_exists - r6a0_to_h5i2 >= 0 + r6a0_to_h5i3_exists: h5i3_exists - r6a0_to_h5i3 >= 0 + r6a0_to_h5i4_exists: h5i4_exists - r6a0_to_h5i4 >= 0 + r6a0_to_h5i5_exists: h5i5_exists - r6a0_to_h5i5 >= 0 + r6a0_to_h5i6_exists: h5i6_exists - r6a0_to_h5i6 >= 0 + r6a0_to_h5i7_exists: h5i7_exists - r6a0_to_h5i7 >= 0 + r6a0_to_h5i8_exists: h5i8_exists - r6a0_to_h5i8 >= 0 + r6a0_to_h5i9_exists: h5i9_exists - r6a0_to_h5i9 >= 0 + r6a1_allocated: r6a1_to_h0i0 + r6a1_to_h0i1 + r6a1_to_h0i2 + r6a1_to_h0i3 + r6a1_to_h0i4 + r6a1_to_h0i5 + r6a1_to_h0i6 + r6a1_to_h0i7 + r6a1_to_h0i8 + r6a1_to_h0i9 + r6a1_to_h1i0 + r6a1_to_h1i1 + r6a1_to_h1i2 + r6a1_to_h1i3 + r6a1_to_h1i4 + r6a1_to_h1i5 + r6a1_to_h1i6 + r6a1_to_h1i7 + r6a1_to_h1i8 + r6a1_to_h1i9 + r6a1_to_h2i0 + r6a1_to_h2i1 + r6a1_to_h2i2 + r6a1_to_h2i3 + r6a1_to_h2i4 + r6a1_to_h2i5 + r6a1_to_h2i6 + r6a1_to_h2i7 + r6a1_to_h2i8 + r6a1_to_h2i9 + r6a1_to_h3i0 + r6a1_to_h3i1 + r6a1_to_h3i2 + r6a1_to_h3i3 + r6a1_to_h3i4 + r6a1_to_h3i5 + r6a1_to_h3i6 + r6a1_to_h3i7 + r6a1_to_h3i8 + r6a1_to_h3i9 + r6a1_to_h4i0 + r6a1_to_h4i1 + r6a1_to_h4i2 + r6a1_to_h4i3 + r6a1_to_h4i4 + r6a1_to_h4i5 + r6a1_to_h4i6 + r6a1_to_h4i7 + r6a1_to_h4i8 + r6a1_to_h4i9 + r6a1_to_h5i0 + r6a1_to_h5i1 + r6a1_to_h5i2 + r6a1_to_h5i3 + r6a1_to_h5i4 + r6a1_to_h5i5 + r6a1_to_h5i6 + r6a1_to_h5i7 + r6a1_to_h5i8 + r6a1_to_h5i9 = 1 + r6a1_to_h0i0_exists: h0i0_exists - r6a1_to_h0i0 >= 0 + r6a1_to_h0i1_exists: h0i1_exists - r6a1_to_h0i1 >= 0 + r6a1_to_h0i2_exists: h0i2_exists - r6a1_to_h0i2 >= 0 + r6a1_to_h0i3_exists: h0i3_exists - r6a1_to_h0i3 >= 0 + r6a1_to_h0i4_exists: h0i4_exists - r6a1_to_h0i4 >= 0 + r6a1_to_h0i5_exists: h0i5_exists - r6a1_to_h0i5 >= 0 + r6a1_to_h0i6_exists: h0i6_exists - r6a1_to_h0i6 >= 0 + r6a1_to_h0i7_exists: h0i7_exists - r6a1_to_h0i7 >= 0 + r6a1_to_h0i8_exists: h0i8_exists - r6a1_to_h0i8 >= 0 + r6a1_to_h0i9_exists: h0i9_exists - r6a1_to_h0i9 >= 0 + r6a1_to_h1i0_exists: h1i0_exists - r6a1_to_h1i0 >= 0 + r6a1_to_h1i1_exists: h1i1_exists - r6a1_to_h1i1 >= 0 + r6a1_to_h1i2_exists: h1i2_exists - r6a1_to_h1i2 >= 0 + r6a1_to_h1i3_exists: h1i3_exists - r6a1_to_h1i3 >= 0 + r6a1_to_h1i4_exists: h1i4_exists - r6a1_to_h1i4 >= 0 + r6a1_to_h1i5_exists: h1i5_exists - r6a1_to_h1i5 >= 0 + r6a1_to_h1i6_exists: h1i6_exists - r6a1_to_h1i6 >= 0 + r6a1_to_h1i7_exists: h1i7_exists - r6a1_to_h1i7 >= 0 + r6a1_to_h1i8_exists: h1i8_exists - r6a1_to_h1i8 >= 0 + r6a1_to_h1i9_exists: h1i9_exists - r6a1_to_h1i9 >= 0 + r6a1_to_h2i0_exists: h2i0_exists - r6a1_to_h2i0 >= 0 + r6a1_to_h2i1_exists: h2i1_exists - r6a1_to_h2i1 >= 0 + r6a1_to_h2i2_exists: h2i2_exists - r6a1_to_h2i2 >= 0 + r6a1_to_h2i3_exists: h2i3_exists - r6a1_to_h2i3 >= 0 + r6a1_to_h2i4_exists: h2i4_exists - r6a1_to_h2i4 >= 0 + r6a1_to_h2i5_exists: h2i5_exists - r6a1_to_h2i5 >= 0 + r6a1_to_h2i6_exists: h2i6_exists - r6a1_to_h2i6 >= 0 + r6a1_to_h2i7_exists: h2i7_exists - r6a1_to_h2i7 >= 0 + r6a1_to_h2i8_exists: h2i8_exists - r6a1_to_h2i8 >= 0 + r6a1_to_h2i9_exists: h2i9_exists - r6a1_to_h2i9 >= 0 + r6a1_to_h3i0_exists: h3i0_exists - r6a1_to_h3i0 >= 0 + r6a1_to_h3i1_exists: h3i1_exists - r6a1_to_h3i1 >= 0 + r6a1_to_h3i2_exists: h3i2_exists - r6a1_to_h3i2 >= 0 + r6a1_to_h3i3_exists: h3i3_exists - r6a1_to_h3i3 >= 0 + r6a1_to_h3i4_exists: h3i4_exists - r6a1_to_h3i4 >= 0 + r6a1_to_h3i5_exists: h3i5_exists - r6a1_to_h3i5 >= 0 + r6a1_to_h3i6_exists: h3i6_exists - r6a1_to_h3i6 >= 0 + r6a1_to_h3i7_exists: h3i7_exists - r6a1_to_h3i7 >= 0 + r6a1_to_h3i8_exists: h3i8_exists - r6a1_to_h3i8 >= 0 + r6a1_to_h3i9_exists: h3i9_exists - r6a1_to_h3i9 >= 0 + r6a1_to_h4i0_exists: h4i0_exists - r6a1_to_h4i0 >= 0 + r6a1_to_h4i1_exists: h4i1_exists - r6a1_to_h4i1 >= 0 + r6a1_to_h4i2_exists: h4i2_exists - r6a1_to_h4i2 >= 0 + r6a1_to_h4i3_exists: h4i3_exists - r6a1_to_h4i3 >= 0 + r6a1_to_h4i4_exists: h4i4_exists - r6a1_to_h4i4 >= 0 + r6a1_to_h4i5_exists: h4i5_exists - r6a1_to_h4i5 >= 0 + r6a1_to_h4i6_exists: h4i6_exists - r6a1_to_h4i6 >= 0 + r6a1_to_h4i7_exists: h4i7_exists - r6a1_to_h4i7 >= 0 + r6a1_to_h4i8_exists: h4i8_exists - r6a1_to_h4i8 >= 0 + r6a1_to_h4i9_exists: h4i9_exists - r6a1_to_h4i9 >= 0 + r6a1_to_h5i0_exists: h5i0_exists - r6a1_to_h5i0 >= 0 + r6a1_to_h5i1_exists: h5i1_exists - r6a1_to_h5i1 >= 0 + r6a1_to_h5i2_exists: h5i2_exists - r6a1_to_h5i2 >= 0 + r6a1_to_h5i3_exists: h5i3_exists - r6a1_to_h5i3 >= 0 + r6a1_to_h5i4_exists: h5i4_exists - r6a1_to_h5i4 >= 0 + r6a1_to_h5i5_exists: h5i5_exists - r6a1_to_h5i5 >= 0 + r6a1_to_h5i6_exists: h5i6_exists - r6a1_to_h5i6 >= 0 + r6a1_to_h5i7_exists: h5i7_exists - r6a1_to_h5i7 >= 0 + r6a1_to_h5i8_exists: h5i8_exists - r6a1_to_h5i8 >= 0 + r6a1_to_h5i9_exists: h5i9_exists - r6a1_to_h5i9 >= 0 + r6a2_allocated: r6a2_to_h0i0 + r6a2_to_h0i1 + r6a2_to_h0i2 + r6a2_to_h0i3 + r6a2_to_h0i4 + r6a2_to_h0i5 + r6a2_to_h0i6 + r6a2_to_h0i7 + r6a2_to_h0i8 + r6a2_to_h0i9 + r6a2_to_h1i0 + r6a2_to_h1i1 + r6a2_to_h1i2 + r6a2_to_h1i3 + r6a2_to_h1i4 + r6a2_to_h1i5 + r6a2_to_h1i6 + r6a2_to_h1i7 + r6a2_to_h1i8 + r6a2_to_h1i9 + r6a2_to_h2i0 + r6a2_to_h2i1 + r6a2_to_h2i2 + r6a2_to_h2i3 + r6a2_to_h2i4 + r6a2_to_h2i5 + r6a2_to_h2i6 + r6a2_to_h2i7 + r6a2_to_h2i8 + r6a2_to_h2i9 + r6a2_to_h3i0 + r6a2_to_h3i1 + r6a2_to_h3i2 + r6a2_to_h3i3 + r6a2_to_h3i4 + r6a2_to_h3i5 + r6a2_to_h3i6 + r6a2_to_h3i7 + r6a2_to_h3i8 + r6a2_to_h3i9 + r6a2_to_h4i0 + r6a2_to_h4i1 + r6a2_to_h4i2 + r6a2_to_h4i3 + r6a2_to_h4i4 + r6a2_to_h4i5 + r6a2_to_h4i6 + r6a2_to_h4i7 + r6a2_to_h4i8 + r6a2_to_h4i9 + r6a2_to_h5i0 + r6a2_to_h5i1 + r6a2_to_h5i2 + r6a2_to_h5i3 + r6a2_to_h5i4 + r6a2_to_h5i5 + r6a2_to_h5i6 + r6a2_to_h5i7 + r6a2_to_h5i8 + r6a2_to_h5i9 = 1 + r6a2_to_h0i0_exists: h0i0_exists - r6a2_to_h0i0 >= 0 + r6a2_to_h0i1_exists: h0i1_exists - r6a2_to_h0i1 >= 0 + r6a2_to_h0i2_exists: h0i2_exists - r6a2_to_h0i2 >= 0 + r6a2_to_h0i3_exists: h0i3_exists - r6a2_to_h0i3 >= 0 + r6a2_to_h0i4_exists: h0i4_exists - r6a2_to_h0i4 >= 0 + r6a2_to_h0i5_exists: h0i5_exists - r6a2_to_h0i5 >= 0 + r6a2_to_h0i6_exists: h0i6_exists - r6a2_to_h0i6 >= 0 + r6a2_to_h0i7_exists: h0i7_exists - r6a2_to_h0i7 >= 0 + r6a2_to_h0i8_exists: h0i8_exists - r6a2_to_h0i8 >= 0 + r6a2_to_h0i9_exists: h0i9_exists - r6a2_to_h0i9 >= 0 + r6a2_to_h1i0_exists: h1i0_exists - r6a2_to_h1i0 >= 0 + r6a2_to_h1i1_exists: h1i1_exists - r6a2_to_h1i1 >= 0 + r6a2_to_h1i2_exists: h1i2_exists - r6a2_to_h1i2 >= 0 + r6a2_to_h1i3_exists: h1i3_exists - r6a2_to_h1i3 >= 0 + r6a2_to_h1i4_exists: h1i4_exists - r6a2_to_h1i4 >= 0 + r6a2_to_h1i5_exists: h1i5_exists - r6a2_to_h1i5 >= 0 + r6a2_to_h1i6_exists: h1i6_exists - r6a2_to_h1i6 >= 0 + r6a2_to_h1i7_exists: h1i7_exists - r6a2_to_h1i7 >= 0 + r6a2_to_h1i8_exists: h1i8_exists - r6a2_to_h1i8 >= 0 + r6a2_to_h1i9_exists: h1i9_exists - r6a2_to_h1i9 >= 0 + r6a2_to_h2i0_exists: h2i0_exists - r6a2_to_h2i0 >= 0 + r6a2_to_h2i1_exists: h2i1_exists - r6a2_to_h2i1 >= 0 + r6a2_to_h2i2_exists: h2i2_exists - r6a2_to_h2i2 >= 0 + r6a2_to_h2i3_exists: h2i3_exists - r6a2_to_h2i3 >= 0 + r6a2_to_h2i4_exists: h2i4_exists - r6a2_to_h2i4 >= 0 + r6a2_to_h2i5_exists: h2i5_exists - r6a2_to_h2i5 >= 0 + r6a2_to_h2i6_exists: h2i6_exists - r6a2_to_h2i6 >= 0 + r6a2_to_h2i7_exists: h2i7_exists - r6a2_to_h2i7 >= 0 + r6a2_to_h2i8_exists: h2i8_exists - r6a2_to_h2i8 >= 0 + r6a2_to_h2i9_exists: h2i9_exists - r6a2_to_h2i9 >= 0 + r6a2_to_h3i0_exists: h3i0_exists - r6a2_to_h3i0 >= 0 + r6a2_to_h3i1_exists: h3i1_exists - r6a2_to_h3i1 >= 0 + r6a2_to_h3i2_exists: h3i2_exists - r6a2_to_h3i2 >= 0 + r6a2_to_h3i3_exists: h3i3_exists - r6a2_to_h3i3 >= 0 + r6a2_to_h3i4_exists: h3i4_exists - r6a2_to_h3i4 >= 0 + r6a2_to_h3i5_exists: h3i5_exists - r6a2_to_h3i5 >= 0 + r6a2_to_h3i6_exists: h3i6_exists - r6a2_to_h3i6 >= 0 + r6a2_to_h3i7_exists: h3i7_exists - r6a2_to_h3i7 >= 0 + r6a2_to_h3i8_exists: h3i8_exists - r6a2_to_h3i8 >= 0 + r6a2_to_h3i9_exists: h3i9_exists - r6a2_to_h3i9 >= 0 + r6a2_to_h4i0_exists: h4i0_exists - r6a2_to_h4i0 >= 0 + r6a2_to_h4i1_exists: h4i1_exists - r6a2_to_h4i1 >= 0 + r6a2_to_h4i2_exists: h4i2_exists - r6a2_to_h4i2 >= 0 + r6a2_to_h4i3_exists: h4i3_exists - r6a2_to_h4i3 >= 0 + r6a2_to_h4i4_exists: h4i4_exists - r6a2_to_h4i4 >= 0 + r6a2_to_h4i5_exists: h4i5_exists - r6a2_to_h4i5 >= 0 + r6a2_to_h4i6_exists: h4i6_exists - r6a2_to_h4i6 >= 0 + r6a2_to_h4i7_exists: h4i7_exists - r6a2_to_h4i7 >= 0 + r6a2_to_h4i8_exists: h4i8_exists - r6a2_to_h4i8 >= 0 + r6a2_to_h4i9_exists: h4i9_exists - r6a2_to_h4i9 >= 0 + r6a2_to_h5i0_exists: h5i0_exists - r6a2_to_h5i0 >= 0 + r6a2_to_h5i1_exists: h5i1_exists - r6a2_to_h5i1 >= 0 + r6a2_to_h5i2_exists: h5i2_exists - r6a2_to_h5i2 >= 0 + r6a2_to_h5i3_exists: h5i3_exists - r6a2_to_h5i3 >= 0 + r6a2_to_h5i4_exists: h5i4_exists - r6a2_to_h5i4 >= 0 + r6a2_to_h5i5_exists: h5i5_exists - r6a2_to_h5i5 >= 0 + r6a2_to_h5i6_exists: h5i6_exists - r6a2_to_h5i6 >= 0 + r6a2_to_h5i7_exists: h5i7_exists - r6a2_to_h5i7 >= 0 + r6a2_to_h5i8_exists: h5i8_exists - r6a2_to_h5i8 >= 0 + r6a2_to_h5i9_exists: h5i9_exists - r6a2_to_h5i9 >= 0 + r6a3_allocated: r6a3_to_h0i0 + r6a3_to_h0i1 + r6a3_to_h0i2 + r6a3_to_h0i3 + r6a3_to_h0i4 + r6a3_to_h0i5 + r6a3_to_h0i6 + r6a3_to_h0i7 + r6a3_to_h0i8 + r6a3_to_h0i9 + r6a3_to_h1i0 + r6a3_to_h1i1 + r6a3_to_h1i2 + r6a3_to_h1i3 + r6a3_to_h1i4 + r6a3_to_h1i5 + r6a3_to_h1i6 + r6a3_to_h1i7 + r6a3_to_h1i8 + r6a3_to_h1i9 + r6a3_to_h2i0 + r6a3_to_h2i1 + r6a3_to_h2i2 + r6a3_to_h2i3 + r6a3_to_h2i4 + r6a3_to_h2i5 + r6a3_to_h2i6 + r6a3_to_h2i7 + r6a3_to_h2i8 + r6a3_to_h2i9 + r6a3_to_h3i0 + r6a3_to_h3i1 + r6a3_to_h3i2 + r6a3_to_h3i3 + r6a3_to_h3i4 + r6a3_to_h3i5 + r6a3_to_h3i6 + r6a3_to_h3i7 + r6a3_to_h3i8 + r6a3_to_h3i9 + r6a3_to_h4i0 + r6a3_to_h4i1 + r6a3_to_h4i2 + r6a3_to_h4i3 + r6a3_to_h4i4 + r6a3_to_h4i5 + r6a3_to_h4i6 + r6a3_to_h4i7 + r6a3_to_h4i8 + r6a3_to_h4i9 + r6a3_to_h5i0 + r6a3_to_h5i1 + r6a3_to_h5i2 + r6a3_to_h5i3 + r6a3_to_h5i4 + r6a3_to_h5i5 + r6a3_to_h5i6 + r6a3_to_h5i7 + r6a3_to_h5i8 + r6a3_to_h5i9 = 1 + r6a3_to_h0i0_exists: h0i0_exists - r6a3_to_h0i0 >= 0 + r6a3_to_h0i1_exists: h0i1_exists - r6a3_to_h0i1 >= 0 + r6a3_to_h0i2_exists: h0i2_exists - r6a3_to_h0i2 >= 0 + r6a3_to_h0i3_exists: h0i3_exists - r6a3_to_h0i3 >= 0 + r6a3_to_h0i4_exists: h0i4_exists - r6a3_to_h0i4 >= 0 + r6a3_to_h0i5_exists: h0i5_exists - r6a3_to_h0i5 >= 0 + r6a3_to_h0i6_exists: h0i6_exists - r6a3_to_h0i6 >= 0 + r6a3_to_h0i7_exists: h0i7_exists - r6a3_to_h0i7 >= 0 + r6a3_to_h0i8_exists: h0i8_exists - r6a3_to_h0i8 >= 0 + r6a3_to_h0i9_exists: h0i9_exists - r6a3_to_h0i9 >= 0 + r6a3_to_h1i0_exists: h1i0_exists - r6a3_to_h1i0 >= 0 + r6a3_to_h1i1_exists: h1i1_exists - r6a3_to_h1i1 >= 0 + r6a3_to_h1i2_exists: h1i2_exists - r6a3_to_h1i2 >= 0 + r6a3_to_h1i3_exists: h1i3_exists - r6a3_to_h1i3 >= 0 + r6a3_to_h1i4_exists: h1i4_exists - r6a3_to_h1i4 >= 0 + r6a3_to_h1i5_exists: h1i5_exists - r6a3_to_h1i5 >= 0 + r6a3_to_h1i6_exists: h1i6_exists - r6a3_to_h1i6 >= 0 + r6a3_to_h1i7_exists: h1i7_exists - r6a3_to_h1i7 >= 0 + r6a3_to_h1i8_exists: h1i8_exists - r6a3_to_h1i8 >= 0 + r6a3_to_h1i9_exists: h1i9_exists - r6a3_to_h1i9 >= 0 + r6a3_to_h2i0_exists: h2i0_exists - r6a3_to_h2i0 >= 0 + r6a3_to_h2i1_exists: h2i1_exists - r6a3_to_h2i1 >= 0 + r6a3_to_h2i2_exists: h2i2_exists - r6a3_to_h2i2 >= 0 + r6a3_to_h2i3_exists: h2i3_exists - r6a3_to_h2i3 >= 0 + r6a3_to_h2i4_exists: h2i4_exists - r6a3_to_h2i4 >= 0 + r6a3_to_h2i5_exists: h2i5_exists - r6a3_to_h2i5 >= 0 + r6a3_to_h2i6_exists: h2i6_exists - r6a3_to_h2i6 >= 0 + r6a3_to_h2i7_exists: h2i7_exists - r6a3_to_h2i7 >= 0 + r6a3_to_h2i8_exists: h2i8_exists - r6a3_to_h2i8 >= 0 + r6a3_to_h2i9_exists: h2i9_exists - r6a3_to_h2i9 >= 0 + r6a3_to_h3i0_exists: h3i0_exists - r6a3_to_h3i0 >= 0 + r6a3_to_h3i1_exists: h3i1_exists - r6a3_to_h3i1 >= 0 + r6a3_to_h3i2_exists: h3i2_exists - r6a3_to_h3i2 >= 0 + r6a3_to_h3i3_exists: h3i3_exists - r6a3_to_h3i3 >= 0 + r6a3_to_h3i4_exists: h3i4_exists - r6a3_to_h3i4 >= 0 + r6a3_to_h3i5_exists: h3i5_exists - r6a3_to_h3i5 >= 0 + r6a3_to_h3i6_exists: h3i6_exists - r6a3_to_h3i6 >= 0 + r6a3_to_h3i7_exists: h3i7_exists - r6a3_to_h3i7 >= 0 + r6a3_to_h3i8_exists: h3i8_exists - r6a3_to_h3i8 >= 0 + r6a3_to_h3i9_exists: h3i9_exists - r6a3_to_h3i9 >= 0 + r6a3_to_h4i0_exists: h4i0_exists - r6a3_to_h4i0 >= 0 + r6a3_to_h4i1_exists: h4i1_exists - r6a3_to_h4i1 >= 0 + r6a3_to_h4i2_exists: h4i2_exists - r6a3_to_h4i2 >= 0 + r6a3_to_h4i3_exists: h4i3_exists - r6a3_to_h4i3 >= 0 + r6a3_to_h4i4_exists: h4i4_exists - r6a3_to_h4i4 >= 0 + r6a3_to_h4i5_exists: h4i5_exists - r6a3_to_h4i5 >= 0 + r6a3_to_h4i6_exists: h4i6_exists - r6a3_to_h4i6 >= 0 + r6a3_to_h4i7_exists: h4i7_exists - r6a3_to_h4i7 >= 0 + r6a3_to_h4i8_exists: h4i8_exists - r6a3_to_h4i8 >= 0 + r6a3_to_h4i9_exists: h4i9_exists - r6a3_to_h4i9 >= 0 + r6a3_to_h5i0_exists: h5i0_exists - r6a3_to_h5i0 >= 0 + r6a3_to_h5i1_exists: h5i1_exists - r6a3_to_h5i1 >= 0 + r6a3_to_h5i2_exists: h5i2_exists - r6a3_to_h5i2 >= 0 + r6a3_to_h5i3_exists: h5i3_exists - r6a3_to_h5i3 >= 0 + r6a3_to_h5i4_exists: h5i4_exists - r6a3_to_h5i4 >= 0 + r6a3_to_h5i5_exists: h5i5_exists - r6a3_to_h5i5 >= 0 + r6a3_to_h5i6_exists: h5i6_exists - r6a3_to_h5i6 >= 0 + r6a3_to_h5i7_exists: h5i7_exists - r6a3_to_h5i7 >= 0 + r6a3_to_h5i8_exists: h5i8_exists - r6a3_to_h5i8 >= 0 + r6a3_to_h5i9_exists: h5i9_exists - r6a3_to_h5i9 >= 0 + r7a0_allocated: r7a0_to_h0i0 + r7a0_to_h0i1 + r7a0_to_h0i2 + r7a0_to_h0i3 + r7a0_to_h0i4 + r7a0_to_h0i5 + r7a0_to_h0i6 + r7a0_to_h0i7 + r7a0_to_h0i8 + r7a0_to_h0i9 + r7a0_to_h1i0 + r7a0_to_h1i1 + r7a0_to_h1i2 + r7a0_to_h1i3 + r7a0_to_h1i4 + r7a0_to_h1i5 + r7a0_to_h1i6 + r7a0_to_h1i7 + r7a0_to_h1i8 + r7a0_to_h1i9 + r7a0_to_h2i0 + r7a0_to_h2i1 + r7a0_to_h2i2 + r7a0_to_h2i3 + r7a0_to_h2i4 + r7a0_to_h2i5 + r7a0_to_h2i6 + r7a0_to_h2i7 + r7a0_to_h2i8 + r7a0_to_h2i9 + r7a0_to_h3i0 + r7a0_to_h3i1 + r7a0_to_h3i2 + r7a0_to_h3i3 + r7a0_to_h3i4 + r7a0_to_h3i5 + r7a0_to_h3i6 + r7a0_to_h3i7 + r7a0_to_h3i8 + r7a0_to_h3i9 + r7a0_to_h4i0 + r7a0_to_h4i1 + r7a0_to_h4i2 + r7a0_to_h4i3 + r7a0_to_h4i4 + r7a0_to_h4i5 + r7a0_to_h4i6 + r7a0_to_h4i7 + r7a0_to_h4i8 + r7a0_to_h4i9 + r7a0_to_h5i0 + r7a0_to_h5i1 + r7a0_to_h5i2 + r7a0_to_h5i3 + r7a0_to_h5i4 + r7a0_to_h5i5 + r7a0_to_h5i6 + r7a0_to_h5i7 + r7a0_to_h5i8 + r7a0_to_h5i9 = 1 + r7a0_to_h0i0_exists: h0i0_exists - r7a0_to_h0i0 >= 0 + r7a0_to_h0i1_exists: h0i1_exists - r7a0_to_h0i1 >= 0 + r7a0_to_h0i2_exists: h0i2_exists - r7a0_to_h0i2 >= 0 + r7a0_to_h0i3_exists: h0i3_exists - r7a0_to_h0i3 >= 0 + r7a0_to_h0i4_exists: h0i4_exists - r7a0_to_h0i4 >= 0 + r7a0_to_h0i5_exists: h0i5_exists - r7a0_to_h0i5 >= 0 + r7a0_to_h0i6_exists: h0i6_exists - r7a0_to_h0i6 >= 0 + r7a0_to_h0i7_exists: h0i7_exists - r7a0_to_h0i7 >= 0 + r7a0_to_h0i8_exists: h0i8_exists - r7a0_to_h0i8 >= 0 + r7a0_to_h0i9_exists: h0i9_exists - r7a0_to_h0i9 >= 0 + r7a0_to_h1i0_exists: h1i0_exists - r7a0_to_h1i0 >= 0 + r7a0_to_h1i1_exists: h1i1_exists - r7a0_to_h1i1 >= 0 + r7a0_to_h1i2_exists: h1i2_exists - r7a0_to_h1i2 >= 0 + r7a0_to_h1i3_exists: h1i3_exists - r7a0_to_h1i3 >= 0 + r7a0_to_h1i4_exists: h1i4_exists - r7a0_to_h1i4 >= 0 + r7a0_to_h1i5_exists: h1i5_exists - r7a0_to_h1i5 >= 0 + r7a0_to_h1i6_exists: h1i6_exists - r7a0_to_h1i6 >= 0 + r7a0_to_h1i7_exists: h1i7_exists - r7a0_to_h1i7 >= 0 + r7a0_to_h1i8_exists: h1i8_exists - r7a0_to_h1i8 >= 0 + r7a0_to_h1i9_exists: h1i9_exists - r7a0_to_h1i9 >= 0 + r7a0_to_h2i0_exists: h2i0_exists - r7a0_to_h2i0 >= 0 + r7a0_to_h2i1_exists: h2i1_exists - r7a0_to_h2i1 >= 0 + r7a0_to_h2i2_exists: h2i2_exists - r7a0_to_h2i2 >= 0 + r7a0_to_h2i3_exists: h2i3_exists - r7a0_to_h2i3 >= 0 + r7a0_to_h2i4_exists: h2i4_exists - r7a0_to_h2i4 >= 0 + r7a0_to_h2i5_exists: h2i5_exists - r7a0_to_h2i5 >= 0 + r7a0_to_h2i6_exists: h2i6_exists - r7a0_to_h2i6 >= 0 + r7a0_to_h2i7_exists: h2i7_exists - r7a0_to_h2i7 >= 0 + r7a0_to_h2i8_exists: h2i8_exists - r7a0_to_h2i8 >= 0 + r7a0_to_h2i9_exists: h2i9_exists - r7a0_to_h2i9 >= 0 + r7a0_to_h3i0_exists: h3i0_exists - r7a0_to_h3i0 >= 0 + r7a0_to_h3i1_exists: h3i1_exists - r7a0_to_h3i1 >= 0 + r7a0_to_h3i2_exists: h3i2_exists - r7a0_to_h3i2 >= 0 + r7a0_to_h3i3_exists: h3i3_exists - r7a0_to_h3i3 >= 0 + r7a0_to_h3i4_exists: h3i4_exists - r7a0_to_h3i4 >= 0 + r7a0_to_h3i5_exists: h3i5_exists - r7a0_to_h3i5 >= 0 + r7a0_to_h3i6_exists: h3i6_exists - r7a0_to_h3i6 >= 0 + r7a0_to_h3i7_exists: h3i7_exists - r7a0_to_h3i7 >= 0 + r7a0_to_h3i8_exists: h3i8_exists - r7a0_to_h3i8 >= 0 + r7a0_to_h3i9_exists: h3i9_exists - r7a0_to_h3i9 >= 0 + r7a0_to_h4i0_exists: h4i0_exists - r7a0_to_h4i0 >= 0 + r7a0_to_h4i1_exists: h4i1_exists - r7a0_to_h4i1 >= 0 + r7a0_to_h4i2_exists: h4i2_exists - r7a0_to_h4i2 >= 0 + r7a0_to_h4i3_exists: h4i3_exists - r7a0_to_h4i3 >= 0 + r7a0_to_h4i4_exists: h4i4_exists - r7a0_to_h4i4 >= 0 + r7a0_to_h4i5_exists: h4i5_exists - r7a0_to_h4i5 >= 0 + r7a0_to_h4i6_exists: h4i6_exists - r7a0_to_h4i6 >= 0 + r7a0_to_h4i7_exists: h4i7_exists - r7a0_to_h4i7 >= 0 + r7a0_to_h4i8_exists: h4i8_exists - r7a0_to_h4i8 >= 0 + r7a0_to_h4i9_exists: h4i9_exists - r7a0_to_h4i9 >= 0 + r7a0_to_h5i0_exists: h5i0_exists - r7a0_to_h5i0 >= 0 + r7a0_to_h5i1_exists: h5i1_exists - r7a0_to_h5i1 >= 0 + r7a0_to_h5i2_exists: h5i2_exists - r7a0_to_h5i2 >= 0 + r7a0_to_h5i3_exists: h5i3_exists - r7a0_to_h5i3 >= 0 + r7a0_to_h5i4_exists: h5i4_exists - r7a0_to_h5i4 >= 0 + r7a0_to_h5i5_exists: h5i5_exists - r7a0_to_h5i5 >= 0 + r7a0_to_h5i6_exists: h5i6_exists - r7a0_to_h5i6 >= 0 + r7a0_to_h5i7_exists: h5i7_exists - r7a0_to_h5i7 >= 0 + r7a0_to_h5i8_exists: h5i8_exists - r7a0_to_h5i8 >= 0 + r7a0_to_h5i9_exists: h5i9_exists - r7a0_to_h5i9 >= 0 + r7a1_allocated: r7a1_to_h0i0 + r7a1_to_h0i1 + r7a1_to_h0i2 + r7a1_to_h0i3 + r7a1_to_h0i4 + r7a1_to_h0i5 + r7a1_to_h0i6 + r7a1_to_h0i7 + r7a1_to_h0i8 + r7a1_to_h0i9 + r7a1_to_h1i0 + r7a1_to_h1i1 + r7a1_to_h1i2 + r7a1_to_h1i3 + r7a1_to_h1i4 + r7a1_to_h1i5 + r7a1_to_h1i6 + r7a1_to_h1i7 + r7a1_to_h1i8 + r7a1_to_h1i9 + r7a1_to_h2i0 + r7a1_to_h2i1 + r7a1_to_h2i2 + r7a1_to_h2i3 + r7a1_to_h2i4 + r7a1_to_h2i5 + r7a1_to_h2i6 + r7a1_to_h2i7 + r7a1_to_h2i8 + r7a1_to_h2i9 + r7a1_to_h3i0 + r7a1_to_h3i1 + r7a1_to_h3i2 + r7a1_to_h3i3 + r7a1_to_h3i4 + r7a1_to_h3i5 + r7a1_to_h3i6 + r7a1_to_h3i7 + r7a1_to_h3i8 + r7a1_to_h3i9 + r7a1_to_h4i0 + r7a1_to_h4i1 + r7a1_to_h4i2 + r7a1_to_h4i3 + r7a1_to_h4i4 + r7a1_to_h4i5 + r7a1_to_h4i6 + r7a1_to_h4i7 + r7a1_to_h4i8 + r7a1_to_h4i9 + r7a1_to_h5i0 + r7a1_to_h5i1 + r7a1_to_h5i2 + r7a1_to_h5i3 + r7a1_to_h5i4 + r7a1_to_h5i5 + r7a1_to_h5i6 + r7a1_to_h5i7 + r7a1_to_h5i8 + r7a1_to_h5i9 = 1 + r7a1_to_h0i0_exists: h0i0_exists - r7a1_to_h0i0 >= 0 + r7a1_to_h0i1_exists: h0i1_exists - r7a1_to_h0i1 >= 0 + r7a1_to_h0i2_exists: h0i2_exists - r7a1_to_h0i2 >= 0 + r7a1_to_h0i3_exists: h0i3_exists - r7a1_to_h0i3 >= 0 + r7a1_to_h0i4_exists: h0i4_exists - r7a1_to_h0i4 >= 0 + r7a1_to_h0i5_exists: h0i5_exists - r7a1_to_h0i5 >= 0 + r7a1_to_h0i6_exists: h0i6_exists - r7a1_to_h0i6 >= 0 + r7a1_to_h0i7_exists: h0i7_exists - r7a1_to_h0i7 >= 0 + r7a1_to_h0i8_exists: h0i8_exists - r7a1_to_h0i8 >= 0 + r7a1_to_h0i9_exists: h0i9_exists - r7a1_to_h0i9 >= 0 + r7a1_to_h1i0_exists: h1i0_exists - r7a1_to_h1i0 >= 0 + r7a1_to_h1i1_exists: h1i1_exists - r7a1_to_h1i1 >= 0 + r7a1_to_h1i2_exists: h1i2_exists - r7a1_to_h1i2 >= 0 + r7a1_to_h1i3_exists: h1i3_exists - r7a1_to_h1i3 >= 0 + r7a1_to_h1i4_exists: h1i4_exists - r7a1_to_h1i4 >= 0 + r7a1_to_h1i5_exists: h1i5_exists - r7a1_to_h1i5 >= 0 + r7a1_to_h1i6_exists: h1i6_exists - r7a1_to_h1i6 >= 0 + r7a1_to_h1i7_exists: h1i7_exists - r7a1_to_h1i7 >= 0 + r7a1_to_h1i8_exists: h1i8_exists - r7a1_to_h1i8 >= 0 + r7a1_to_h1i9_exists: h1i9_exists - r7a1_to_h1i9 >= 0 + r7a1_to_h2i0_exists: h2i0_exists - r7a1_to_h2i0 >= 0 + r7a1_to_h2i1_exists: h2i1_exists - r7a1_to_h2i1 >= 0 + r7a1_to_h2i2_exists: h2i2_exists - r7a1_to_h2i2 >= 0 + r7a1_to_h2i3_exists: h2i3_exists - r7a1_to_h2i3 >= 0 + r7a1_to_h2i4_exists: h2i4_exists - r7a1_to_h2i4 >= 0 + r7a1_to_h2i5_exists: h2i5_exists - r7a1_to_h2i5 >= 0 + r7a1_to_h2i6_exists: h2i6_exists - r7a1_to_h2i6 >= 0 + r7a1_to_h2i7_exists: h2i7_exists - r7a1_to_h2i7 >= 0 + r7a1_to_h2i8_exists: h2i8_exists - r7a1_to_h2i8 >= 0 + r7a1_to_h2i9_exists: h2i9_exists - r7a1_to_h2i9 >= 0 + r7a1_to_h3i0_exists: h3i0_exists - r7a1_to_h3i0 >= 0 + r7a1_to_h3i1_exists: h3i1_exists - r7a1_to_h3i1 >= 0 + r7a1_to_h3i2_exists: h3i2_exists - r7a1_to_h3i2 >= 0 + r7a1_to_h3i3_exists: h3i3_exists - r7a1_to_h3i3 >= 0 + r7a1_to_h3i4_exists: h3i4_exists - r7a1_to_h3i4 >= 0 + r7a1_to_h3i5_exists: h3i5_exists - r7a1_to_h3i5 >= 0 + r7a1_to_h3i6_exists: h3i6_exists - r7a1_to_h3i6 >= 0 + r7a1_to_h3i7_exists: h3i7_exists - r7a1_to_h3i7 >= 0 + r7a1_to_h3i8_exists: h3i8_exists - r7a1_to_h3i8 >= 0 + r7a1_to_h3i9_exists: h3i9_exists - r7a1_to_h3i9 >= 0 + r7a1_to_h4i0_exists: h4i0_exists - r7a1_to_h4i0 >= 0 + r7a1_to_h4i1_exists: h4i1_exists - r7a1_to_h4i1 >= 0 + r7a1_to_h4i2_exists: h4i2_exists - r7a1_to_h4i2 >= 0 + r7a1_to_h4i3_exists: h4i3_exists - r7a1_to_h4i3 >= 0 + r7a1_to_h4i4_exists: h4i4_exists - r7a1_to_h4i4 >= 0 + r7a1_to_h4i5_exists: h4i5_exists - r7a1_to_h4i5 >= 0 + r7a1_to_h4i6_exists: h4i6_exists - r7a1_to_h4i6 >= 0 + r7a1_to_h4i7_exists: h4i7_exists - r7a1_to_h4i7 >= 0 + r7a1_to_h4i8_exists: h4i8_exists - r7a1_to_h4i8 >= 0 + r7a1_to_h4i9_exists: h4i9_exists - r7a1_to_h4i9 >= 0 + r7a1_to_h5i0_exists: h5i0_exists - r7a1_to_h5i0 >= 0 + r7a1_to_h5i1_exists: h5i1_exists - r7a1_to_h5i1 >= 0 + r7a1_to_h5i2_exists: h5i2_exists - r7a1_to_h5i2 >= 0 + r7a1_to_h5i3_exists: h5i3_exists - r7a1_to_h5i3 >= 0 + r7a1_to_h5i4_exists: h5i4_exists - r7a1_to_h5i4 >= 0 + r7a1_to_h5i5_exists: h5i5_exists - r7a1_to_h5i5 >= 0 + r7a1_to_h5i6_exists: h5i6_exists - r7a1_to_h5i6 >= 0 + r7a1_to_h5i7_exists: h5i7_exists - r7a1_to_h5i7 >= 0 + r7a1_to_h5i8_exists: h5i8_exists - r7a1_to_h5i8 >= 0 + r7a1_to_h5i9_exists: h5i9_exists - r7a1_to_h5i9 >= 0 + r7a2_allocated: r7a2_to_h0i0 + r7a2_to_h0i1 + r7a2_to_h0i2 + r7a2_to_h0i3 + r7a2_to_h0i4 + r7a2_to_h0i5 + r7a2_to_h0i6 + r7a2_to_h0i7 + r7a2_to_h0i8 + r7a2_to_h0i9 + r7a2_to_h1i0 + r7a2_to_h1i1 + r7a2_to_h1i2 + r7a2_to_h1i3 + r7a2_to_h1i4 + r7a2_to_h1i5 + r7a2_to_h1i6 + r7a2_to_h1i7 + r7a2_to_h1i8 + r7a2_to_h1i9 + r7a2_to_h2i0 + r7a2_to_h2i1 + r7a2_to_h2i2 + r7a2_to_h2i3 + r7a2_to_h2i4 + r7a2_to_h2i5 + r7a2_to_h2i6 + r7a2_to_h2i7 + r7a2_to_h2i8 + r7a2_to_h2i9 + r7a2_to_h3i0 + r7a2_to_h3i1 + r7a2_to_h3i2 + r7a2_to_h3i3 + r7a2_to_h3i4 + r7a2_to_h3i5 + r7a2_to_h3i6 + r7a2_to_h3i7 + r7a2_to_h3i8 + r7a2_to_h3i9 + r7a2_to_h4i0 + r7a2_to_h4i1 + r7a2_to_h4i2 + r7a2_to_h4i3 + r7a2_to_h4i4 + r7a2_to_h4i5 + r7a2_to_h4i6 + r7a2_to_h4i7 + r7a2_to_h4i8 + r7a2_to_h4i9 + r7a2_to_h5i0 + r7a2_to_h5i1 + r7a2_to_h5i2 + r7a2_to_h5i3 + r7a2_to_h5i4 + r7a2_to_h5i5 + r7a2_to_h5i6 + r7a2_to_h5i7 + r7a2_to_h5i8 + r7a2_to_h5i9 = 1 + r7a2_to_h0i0_exists: h0i0_exists - r7a2_to_h0i0 >= 0 + r7a2_to_h0i1_exists: h0i1_exists - r7a2_to_h0i1 >= 0 + r7a2_to_h0i2_exists: h0i2_exists - r7a2_to_h0i2 >= 0 + r7a2_to_h0i3_exists: h0i3_exists - r7a2_to_h0i3 >= 0 + r7a2_to_h0i4_exists: h0i4_exists - r7a2_to_h0i4 >= 0 + r7a2_to_h0i5_exists: h0i5_exists - r7a2_to_h0i5 >= 0 + r7a2_to_h0i6_exists: h0i6_exists - r7a2_to_h0i6 >= 0 + r7a2_to_h0i7_exists: h0i7_exists - r7a2_to_h0i7 >= 0 + r7a2_to_h0i8_exists: h0i8_exists - r7a2_to_h0i8 >= 0 + r7a2_to_h0i9_exists: h0i9_exists - r7a2_to_h0i9 >= 0 + r7a2_to_h1i0_exists: h1i0_exists - r7a2_to_h1i0 >= 0 + r7a2_to_h1i1_exists: h1i1_exists - r7a2_to_h1i1 >= 0 + r7a2_to_h1i2_exists: h1i2_exists - r7a2_to_h1i2 >= 0 + r7a2_to_h1i3_exists: h1i3_exists - r7a2_to_h1i3 >= 0 + r7a2_to_h1i4_exists: h1i4_exists - r7a2_to_h1i4 >= 0 + r7a2_to_h1i5_exists: h1i5_exists - r7a2_to_h1i5 >= 0 + r7a2_to_h1i6_exists: h1i6_exists - r7a2_to_h1i6 >= 0 + r7a2_to_h1i7_exists: h1i7_exists - r7a2_to_h1i7 >= 0 + r7a2_to_h1i8_exists: h1i8_exists - r7a2_to_h1i8 >= 0 + r7a2_to_h1i9_exists: h1i9_exists - r7a2_to_h1i9 >= 0 + r7a2_to_h2i0_exists: h2i0_exists - r7a2_to_h2i0 >= 0 + r7a2_to_h2i1_exists: h2i1_exists - r7a2_to_h2i1 >= 0 + r7a2_to_h2i2_exists: h2i2_exists - r7a2_to_h2i2 >= 0 + r7a2_to_h2i3_exists: h2i3_exists - r7a2_to_h2i3 >= 0 + r7a2_to_h2i4_exists: h2i4_exists - r7a2_to_h2i4 >= 0 + r7a2_to_h2i5_exists: h2i5_exists - r7a2_to_h2i5 >= 0 + r7a2_to_h2i6_exists: h2i6_exists - r7a2_to_h2i6 >= 0 + r7a2_to_h2i7_exists: h2i7_exists - r7a2_to_h2i7 >= 0 + r7a2_to_h2i8_exists: h2i8_exists - r7a2_to_h2i8 >= 0 + r7a2_to_h2i9_exists: h2i9_exists - r7a2_to_h2i9 >= 0 + r7a2_to_h3i0_exists: h3i0_exists - r7a2_to_h3i0 >= 0 + r7a2_to_h3i1_exists: h3i1_exists - r7a2_to_h3i1 >= 0 + r7a2_to_h3i2_exists: h3i2_exists - r7a2_to_h3i2 >= 0 + r7a2_to_h3i3_exists: h3i3_exists - r7a2_to_h3i3 >= 0 + r7a2_to_h3i4_exists: h3i4_exists - r7a2_to_h3i4 >= 0 + r7a2_to_h3i5_exists: h3i5_exists - r7a2_to_h3i5 >= 0 + r7a2_to_h3i6_exists: h3i6_exists - r7a2_to_h3i6 >= 0 + r7a2_to_h3i7_exists: h3i7_exists - r7a2_to_h3i7 >= 0 + r7a2_to_h3i8_exists: h3i8_exists - r7a2_to_h3i8 >= 0 + r7a2_to_h3i9_exists: h3i9_exists - r7a2_to_h3i9 >= 0 + r7a2_to_h4i0_exists: h4i0_exists - r7a2_to_h4i0 >= 0 + r7a2_to_h4i1_exists: h4i1_exists - r7a2_to_h4i1 >= 0 + r7a2_to_h4i2_exists: h4i2_exists - r7a2_to_h4i2 >= 0 + r7a2_to_h4i3_exists: h4i3_exists - r7a2_to_h4i3 >= 0 + r7a2_to_h4i4_exists: h4i4_exists - r7a2_to_h4i4 >= 0 + r7a2_to_h4i5_exists: h4i5_exists - r7a2_to_h4i5 >= 0 + r7a2_to_h4i6_exists: h4i6_exists - r7a2_to_h4i6 >= 0 + r7a2_to_h4i7_exists: h4i7_exists - r7a2_to_h4i7 >= 0 + r7a2_to_h4i8_exists: h4i8_exists - r7a2_to_h4i8 >= 0 + r7a2_to_h4i9_exists: h4i9_exists - r7a2_to_h4i9 >= 0 + r7a2_to_h5i0_exists: h5i0_exists - r7a2_to_h5i0 >= 0 + r7a2_to_h5i1_exists: h5i1_exists - r7a2_to_h5i1 >= 0 + r7a2_to_h5i2_exists: h5i2_exists - r7a2_to_h5i2 >= 0 + r7a2_to_h5i3_exists: h5i3_exists - r7a2_to_h5i3 >= 0 + r7a2_to_h5i4_exists: h5i4_exists - r7a2_to_h5i4 >= 0 + r7a2_to_h5i5_exists: h5i5_exists - r7a2_to_h5i5 >= 0 + r7a2_to_h5i6_exists: h5i6_exists - r7a2_to_h5i6 >= 0 + r7a2_to_h5i7_exists: h5i7_exists - r7a2_to_h5i7 >= 0 + r7a2_to_h5i8_exists: h5i8_exists - r7a2_to_h5i8 >= 0 + r7a2_to_h5i9_exists: h5i9_exists - r7a2_to_h5i9 >= 0 + h0i0_mem_use: 2 r1a0_to_h0i0 + 2 r1a1_to_h0i0 + 2 r1a2_to_h0i0 + 3 r2a0_to_h0i0 + 3 r3a0_to_h0i0 + 2 r5a0_to_h0i0 + 3 r6a0_to_h0i0 + 3 r6a1_to_h0i0 + 3 r6a2_to_h0i0 + 3 r6a3_to_h0i0 + 3 r7a0_to_h0i0 + 3 r7a1_to_h0i0 + 3 r7a2_to_h0i0 - 8 h0i0_mem = 0 + h0i0_hdd_use: 4 r1a0_to_h0i0 + 4 r1a1_to_h0i0 + 4 r1a2_to_h0i0 + 5 r2a0_to_h0i0 + 17 r3a0_to_h0i0 + 4 r5a0_to_h0i0 + 5 r6a0_to_h0i0 + 5 r6a1_to_h0i0 + 5 r6a2_to_h0i0 + 5 r6a3_to_h0i0 + 17 r7a0_to_h0i0 + 17 r7a1_to_h0i0 + 17 r7a2_to_h0i0 - 75 h0i0_hdd = 0 + h0i1_mem_use: 2 r1a0_to_h0i1 + 2 r1a1_to_h0i1 + 2 r1a2_to_h0i1 + 3 r2a0_to_h0i1 + 3 r3a0_to_h0i1 + 2 r5a0_to_h0i1 + 3 r6a0_to_h0i1 + 3 r6a1_to_h0i1 + 3 r6a2_to_h0i1 + 3 r6a3_to_h0i1 + 3 r7a0_to_h0i1 + 3 r7a1_to_h0i1 + 3 r7a2_to_h0i1 - 8 h0i1_mem = 0 + h0i1_hdd_use: 4 r1a0_to_h0i1 + 4 r1a1_to_h0i1 + 4 r1a2_to_h0i1 + 5 r2a0_to_h0i1 + 17 r3a0_to_h0i1 + 4 r5a0_to_h0i1 + 5 r6a0_to_h0i1 + 5 r6a1_to_h0i1 + 5 r6a2_to_h0i1 + 5 r6a3_to_h0i1 + 17 r7a0_to_h0i1 + 17 r7a1_to_h0i1 + 17 r7a2_to_h0i1 - 75 h0i1_hdd = 0 + h0i2_mem_use: 2 r1a0_to_h0i2 + 2 r1a1_to_h0i2 + 2 r1a2_to_h0i2 + 3 r2a0_to_h0i2 + 3 r3a0_to_h0i2 + 2 r5a0_to_h0i2 + 3 r6a0_to_h0i2 + 3 r6a1_to_h0i2 + 3 r6a2_to_h0i2 + 3 r6a3_to_h0i2 + 3 r7a0_to_h0i2 + 3 r7a1_to_h0i2 + 3 r7a2_to_h0i2 - 8 h0i2_mem = 0 + h0i2_hdd_use: 4 r1a0_to_h0i2 + 4 r1a1_to_h0i2 + 4 r1a2_to_h0i2 + 5 r2a0_to_h0i2 + 17 r3a0_to_h0i2 + 4 r5a0_to_h0i2 + 5 r6a0_to_h0i2 + 5 r6a1_to_h0i2 + 5 r6a2_to_h0i2 + 5 r6a3_to_h0i2 + 17 r7a0_to_h0i2 + 17 r7a1_to_h0i2 + 17 r7a2_to_h0i2 - 75 h0i2_hdd = 0 + h0i3_mem_use: 2 r1a0_to_h0i3 + 2 r1a1_to_h0i3 + 2 r1a2_to_h0i3 + 3 r2a0_to_h0i3 + 3 r3a0_to_h0i3 + 2 r5a0_to_h0i3 + 3 r6a0_to_h0i3 + 3 r6a1_to_h0i3 + 3 r6a2_to_h0i3 + 3 r6a3_to_h0i3 + 3 r7a0_to_h0i3 + 3 r7a1_to_h0i3 + 3 r7a2_to_h0i3 - 8 h0i3_mem = 0 + h0i3_hdd_use: 4 r1a0_to_h0i3 + 4 r1a1_to_h0i3 + 4 r1a2_to_h0i3 + 5 r2a0_to_h0i3 + 17 r3a0_to_h0i3 + 4 r5a0_to_h0i3 + 5 r6a0_to_h0i3 + 5 r6a1_to_h0i3 + 5 r6a2_to_h0i3 + 5 r6a3_to_h0i3 + 17 r7a0_to_h0i3 + 17 r7a1_to_h0i3 + 17 r7a2_to_h0i3 - 75 h0i3_hdd = 0 + h0i4_mem_use: 2 r1a0_to_h0i4 + 2 r1a1_to_h0i4 + 2 r1a2_to_h0i4 + 3 r2a0_to_h0i4 + 3 r3a0_to_h0i4 + 2 r5a0_to_h0i4 + 3 r6a0_to_h0i4 + 3 r6a1_to_h0i4 + 3 r6a2_to_h0i4 + 3 r6a3_to_h0i4 + 3 r7a0_to_h0i4 + 3 r7a1_to_h0i4 + 3 r7a2_to_h0i4 - 8 h0i4_mem = 0 + h0i4_hdd_use: 4 r1a0_to_h0i4 + 4 r1a1_to_h0i4 + 4 r1a2_to_h0i4 + 5 r2a0_to_h0i4 + 17 r3a0_to_h0i4 + 4 r5a0_to_h0i4 + 5 r6a0_to_h0i4 + 5 r6a1_to_h0i4 + 5 r6a2_to_h0i4 + 5 r6a3_to_h0i4 + 17 r7a0_to_h0i4 + 17 r7a1_to_h0i4 + 17 r7a2_to_h0i4 - 75 h0i4_hdd = 0 + h0i5_mem_use: 2 r1a0_to_h0i5 + 2 r1a1_to_h0i5 + 2 r1a2_to_h0i5 + 3 r2a0_to_h0i5 + 3 r3a0_to_h0i5 + 2 r5a0_to_h0i5 + 3 r6a0_to_h0i5 + 3 r6a1_to_h0i5 + 3 r6a2_to_h0i5 + 3 r6a3_to_h0i5 + 3 r7a0_to_h0i5 + 3 r7a1_to_h0i5 + 3 r7a2_to_h0i5 - 8 h0i5_mem = 0 + h0i5_hdd_use: 4 r1a0_to_h0i5 + 4 r1a1_to_h0i5 + 4 r1a2_to_h0i5 + 5 r2a0_to_h0i5 + 17 r3a0_to_h0i5 + 4 r5a0_to_h0i5 + 5 r6a0_to_h0i5 + 5 r6a1_to_h0i5 + 5 r6a2_to_h0i5 + 5 r6a3_to_h0i5 + 17 r7a0_to_h0i5 + 17 r7a1_to_h0i5 + 17 r7a2_to_h0i5 - 75 h0i5_hdd = 0 + h0i6_mem_use: 2 r1a0_to_h0i6 + 2 r1a1_to_h0i6 + 2 r1a2_to_h0i6 + 3 r2a0_to_h0i6 + 3 r3a0_to_h0i6 + 2 r5a0_to_h0i6 + 3 r6a0_to_h0i6 + 3 r6a1_to_h0i6 + 3 r6a2_to_h0i6 + 3 r6a3_to_h0i6 + 3 r7a0_to_h0i6 + 3 r7a1_to_h0i6 + 3 r7a2_to_h0i6 - 8 h0i6_mem = 0 + h0i6_hdd_use: 4 r1a0_to_h0i6 + 4 r1a1_to_h0i6 + 4 r1a2_to_h0i6 + 5 r2a0_to_h0i6 + 17 r3a0_to_h0i6 + 4 r5a0_to_h0i6 + 5 r6a0_to_h0i6 + 5 r6a1_to_h0i6 + 5 r6a2_to_h0i6 + 5 r6a3_to_h0i6 + 17 r7a0_to_h0i6 + 17 r7a1_to_h0i6 + 17 r7a2_to_h0i6 - 75 h0i6_hdd = 0 + h0i7_mem_use: 2 r1a0_to_h0i7 + 2 r1a1_to_h0i7 + 2 r1a2_to_h0i7 + 3 r2a0_to_h0i7 + 3 r3a0_to_h0i7 + 2 r5a0_to_h0i7 + 3 r6a0_to_h0i7 + 3 r6a1_to_h0i7 + 3 r6a2_to_h0i7 + 3 r6a3_to_h0i7 + 3 r7a0_to_h0i7 + 3 r7a1_to_h0i7 + 3 r7a2_to_h0i7 - 8 h0i7_mem = 0 + h0i7_hdd_use: 4 r1a0_to_h0i7 + 4 r1a1_to_h0i7 + 4 r1a2_to_h0i7 + 5 r2a0_to_h0i7 + 17 r3a0_to_h0i7 + 4 r5a0_to_h0i7 + 5 r6a0_to_h0i7 + 5 r6a1_to_h0i7 + 5 r6a2_to_h0i7 + 5 r6a3_to_h0i7 + 17 r7a0_to_h0i7 + 17 r7a1_to_h0i7 + 17 r7a2_to_h0i7 - 75 h0i7_hdd = 0 + h0i8_mem_use: 2 r1a0_to_h0i8 + 2 r1a1_to_h0i8 + 2 r1a2_to_h0i8 + 3 r2a0_to_h0i8 + 3 r3a0_to_h0i8 + 2 r5a0_to_h0i8 + 3 r6a0_to_h0i8 + 3 r6a1_to_h0i8 + 3 r6a2_to_h0i8 + 3 r6a3_to_h0i8 + 3 r7a0_to_h0i8 + 3 r7a1_to_h0i8 + 3 r7a2_to_h0i8 - 8 h0i8_mem = 0 + h0i8_hdd_use: 4 r1a0_to_h0i8 + 4 r1a1_to_h0i8 + 4 r1a2_to_h0i8 + 5 r2a0_to_h0i8 + 17 r3a0_to_h0i8 + 4 r5a0_to_h0i8 + 5 r6a0_to_h0i8 + 5 r6a1_to_h0i8 + 5 r6a2_to_h0i8 + 5 r6a3_to_h0i8 + 17 r7a0_to_h0i8 + 17 r7a1_to_h0i8 + 17 r7a2_to_h0i8 - 75 h0i8_hdd = 0 + h0i9_mem_use: 2 r1a0_to_h0i9 + 2 r1a1_to_h0i9 + 2 r1a2_to_h0i9 + 3 r2a0_to_h0i9 + 3 r3a0_to_h0i9 + 2 r5a0_to_h0i9 + 3 r6a0_to_h0i9 + 3 r6a1_to_h0i9 + 3 r6a2_to_h0i9 + 3 r6a3_to_h0i9 + 3 r7a0_to_h0i9 + 3 r7a1_to_h0i9 + 3 r7a2_to_h0i9 - 8 h0i9_mem = 0 + h0i9_hdd_use: 4 r1a0_to_h0i9 + 4 r1a1_to_h0i9 + 4 r1a2_to_h0i9 + 5 r2a0_to_h0i9 + 17 r3a0_to_h0i9 + 4 r5a0_to_h0i9 + 5 r6a0_to_h0i9 + 5 r6a1_to_h0i9 + 5 r6a2_to_h0i9 + 5 r6a3_to_h0i9 + 17 r7a0_to_h0i9 + 17 r7a1_to_h0i9 + 17 r7a2_to_h0i9 - 75 h0i9_hdd = 0 + h1i0_mem_use: 2 r1a0_to_h1i0 + 2 r1a1_to_h1i0 + 2 r1a2_to_h1i0 + 3 r2a0_to_h1i0 + 3 r3a0_to_h1i0 + 2 r5a0_to_h1i0 + 3 r6a0_to_h1i0 + 3 r6a1_to_h1i0 + 3 r6a2_to_h1i0 + 3 r6a3_to_h1i0 + 3 r7a0_to_h1i0 + 3 r7a1_to_h1i0 + 3 r7a2_to_h1i0 - 16 h1i0_mem = 0 + h1i0_hdd_use: 4 r1a0_to_h1i0 + 4 r1a1_to_h1i0 + 4 r1a2_to_h1i0 + 5 r2a0_to_h1i0 + 17 r3a0_to_h1i0 + 4 r5a0_to_h1i0 + 5 r6a0_to_h1i0 + 5 r6a1_to_h1i0 + 5 r6a2_to_h1i0 + 5 r6a3_to_h1i0 + 17 r7a0_to_h1i0 + 17 r7a1_to_h1i0 + 17 r7a2_to_h1i0 - 150 h1i0_hdd = 0 + h1i1_mem_use: 2 r1a0_to_h1i1 + 2 r1a1_to_h1i1 + 2 r1a2_to_h1i1 + 3 r2a0_to_h1i1 + 3 r3a0_to_h1i1 + 2 r5a0_to_h1i1 + 3 r6a0_to_h1i1 + 3 r6a1_to_h1i1 + 3 r6a2_to_h1i1 + 3 r6a3_to_h1i1 + 3 r7a0_to_h1i1 + 3 r7a1_to_h1i1 + 3 r7a2_to_h1i1 - 16 h1i1_mem = 0 + h1i1_hdd_use: 4 r1a0_to_h1i1 + 4 r1a1_to_h1i1 + 4 r1a2_to_h1i1 + 5 r2a0_to_h1i1 + 17 r3a0_to_h1i1 + 4 r5a0_to_h1i1 + 5 r6a0_to_h1i1 + 5 r6a1_to_h1i1 + 5 r6a2_to_h1i1 + 5 r6a3_to_h1i1 + 17 r7a0_to_h1i1 + 17 r7a1_to_h1i1 + 17 r7a2_to_h1i1 - 150 h1i1_hdd = 0 + h1i2_mem_use: 2 r1a0_to_h1i2 + 2 r1a1_to_h1i2 + 2 r1a2_to_h1i2 + 3 r2a0_to_h1i2 + 3 r3a0_to_h1i2 + 2 r5a0_to_h1i2 + 3 r6a0_to_h1i2 + 3 r6a1_to_h1i2 + 3 r6a2_to_h1i2 + 3 r6a3_to_h1i2 + 3 r7a0_to_h1i2 + 3 r7a1_to_h1i2 + 3 r7a2_to_h1i2 - 16 h1i2_mem = 0 + h1i2_hdd_use: 4 r1a0_to_h1i2 + 4 r1a1_to_h1i2 + 4 r1a2_to_h1i2 + 5 r2a0_to_h1i2 + 17 r3a0_to_h1i2 + 4 r5a0_to_h1i2 + 5 r6a0_to_h1i2 + 5 r6a1_to_h1i2 + 5 r6a2_to_h1i2 + 5 r6a3_to_h1i2 + 17 r7a0_to_h1i2 + 17 r7a1_to_h1i2 + 17 r7a2_to_h1i2 - 150 h1i2_hdd = 0 + h1i3_mem_use: 2 r1a0_to_h1i3 + 2 r1a1_to_h1i3 + 2 r1a2_to_h1i3 + 3 r2a0_to_h1i3 + 3 r3a0_to_h1i3 + 2 r5a0_to_h1i3 + 3 r6a0_to_h1i3 + 3 r6a1_to_h1i3 + 3 r6a2_to_h1i3 + 3 r6a3_to_h1i3 + 3 r7a0_to_h1i3 + 3 r7a1_to_h1i3 + 3 r7a2_to_h1i3 - 16 h1i3_mem = 0 + h1i3_hdd_use: 4 r1a0_to_h1i3 + 4 r1a1_to_h1i3 + 4 r1a2_to_h1i3 + 5 r2a0_to_h1i3 + 17 r3a0_to_h1i3 + 4 r5a0_to_h1i3 + 5 r6a0_to_h1i3 + 5 r6a1_to_h1i3 + 5 r6a2_to_h1i3 + 5 r6a3_to_h1i3 + 17 r7a0_to_h1i3 + 17 r7a1_to_h1i3 + 17 r7a2_to_h1i3 - 150 h1i3_hdd = 0 + h1i4_mem_use: 2 r1a0_to_h1i4 + 2 r1a1_to_h1i4 + 2 r1a2_to_h1i4 + 3 r2a0_to_h1i4 + 3 r3a0_to_h1i4 + 2 r5a0_to_h1i4 + 3 r6a0_to_h1i4 + 3 r6a1_to_h1i4 + 3 r6a2_to_h1i4 + 3 r6a3_to_h1i4 + 3 r7a0_to_h1i4 + 3 r7a1_to_h1i4 + 3 r7a2_to_h1i4 - 16 h1i4_mem = 0 + h1i4_hdd_use: 4 r1a0_to_h1i4 + 4 r1a1_to_h1i4 + 4 r1a2_to_h1i4 + 5 r2a0_to_h1i4 + 17 r3a0_to_h1i4 + 4 r5a0_to_h1i4 + 5 r6a0_to_h1i4 + 5 r6a1_to_h1i4 + 5 r6a2_to_h1i4 + 5 r6a3_to_h1i4 + 17 r7a0_to_h1i4 + 17 r7a1_to_h1i4 + 17 r7a2_to_h1i4 - 150 h1i4_hdd = 0 + h1i5_mem_use: 2 r1a0_to_h1i5 + 2 r1a1_to_h1i5 + 2 r1a2_to_h1i5 + 3 r2a0_to_h1i5 + 3 r3a0_to_h1i5 + 2 r5a0_to_h1i5 + 3 r6a0_to_h1i5 + 3 r6a1_to_h1i5 + 3 r6a2_to_h1i5 + 3 r6a3_to_h1i5 + 3 r7a0_to_h1i5 + 3 r7a1_to_h1i5 + 3 r7a2_to_h1i5 - 16 h1i5_mem = 0 + h1i5_hdd_use: 4 r1a0_to_h1i5 + 4 r1a1_to_h1i5 + 4 r1a2_to_h1i5 + 5 r2a0_to_h1i5 + 17 r3a0_to_h1i5 + 4 r5a0_to_h1i5 + 5 r6a0_to_h1i5 + 5 r6a1_to_h1i5 + 5 r6a2_to_h1i5 + 5 r6a3_to_h1i5 + 17 r7a0_to_h1i5 + 17 r7a1_to_h1i5 + 17 r7a2_to_h1i5 - 150 h1i5_hdd = 0 + h1i6_mem_use: 2 r1a0_to_h1i6 + 2 r1a1_to_h1i6 + 2 r1a2_to_h1i6 + 3 r2a0_to_h1i6 + 3 r3a0_to_h1i6 + 2 r5a0_to_h1i6 + 3 r6a0_to_h1i6 + 3 r6a1_to_h1i6 + 3 r6a2_to_h1i6 + 3 r6a3_to_h1i6 + 3 r7a0_to_h1i6 + 3 r7a1_to_h1i6 + 3 r7a2_to_h1i6 - 16 h1i6_mem = 0 + h1i6_hdd_use: 4 r1a0_to_h1i6 + 4 r1a1_to_h1i6 + 4 r1a2_to_h1i6 + 5 r2a0_to_h1i6 + 17 r3a0_to_h1i6 + 4 r5a0_to_h1i6 + 5 r6a0_to_h1i6 + 5 r6a1_to_h1i6 + 5 r6a2_to_h1i6 + 5 r6a3_to_h1i6 + 17 r7a0_to_h1i6 + 17 r7a1_to_h1i6 + 17 r7a2_to_h1i6 - 150 h1i6_hdd = 0 + h1i7_mem_use: 2 r1a0_to_h1i7 + 2 r1a1_to_h1i7 + 2 r1a2_to_h1i7 + 3 r2a0_to_h1i7 + 3 r3a0_to_h1i7 + 2 r5a0_to_h1i7 + 3 r6a0_to_h1i7 + 3 r6a1_to_h1i7 + 3 r6a2_to_h1i7 + 3 r6a3_to_h1i7 + 3 r7a0_to_h1i7 + 3 r7a1_to_h1i7 + 3 r7a2_to_h1i7 - 16 h1i7_mem = 0 + h1i7_hdd_use: 4 r1a0_to_h1i7 + 4 r1a1_to_h1i7 + 4 r1a2_to_h1i7 + 5 r2a0_to_h1i7 + 17 r3a0_to_h1i7 + 4 r5a0_to_h1i7 + 5 r6a0_to_h1i7 + 5 r6a1_to_h1i7 + 5 r6a2_to_h1i7 + 5 r6a3_to_h1i7 + 17 r7a0_to_h1i7 + 17 r7a1_to_h1i7 + 17 r7a2_to_h1i7 - 150 h1i7_hdd = 0 + h1i8_mem_use: 2 r1a0_to_h1i8 + 2 r1a1_to_h1i8 + 2 r1a2_to_h1i8 + 3 r2a0_to_h1i8 + 3 r3a0_to_h1i8 + 2 r5a0_to_h1i8 + 3 r6a0_to_h1i8 + 3 r6a1_to_h1i8 + 3 r6a2_to_h1i8 + 3 r6a3_to_h1i8 + 3 r7a0_to_h1i8 + 3 r7a1_to_h1i8 + 3 r7a2_to_h1i8 - 16 h1i8_mem = 0 + h1i8_hdd_use: 4 r1a0_to_h1i8 + 4 r1a1_to_h1i8 + 4 r1a2_to_h1i8 + 5 r2a0_to_h1i8 + 17 r3a0_to_h1i8 + 4 r5a0_to_h1i8 + 5 r6a0_to_h1i8 + 5 r6a1_to_h1i8 + 5 r6a2_to_h1i8 + 5 r6a3_to_h1i8 + 17 r7a0_to_h1i8 + 17 r7a1_to_h1i8 + 17 r7a2_to_h1i8 - 150 h1i8_hdd = 0 + h1i9_mem_use: 2 r1a0_to_h1i9 + 2 r1a1_to_h1i9 + 2 r1a2_to_h1i9 + 3 r2a0_to_h1i9 + 3 r3a0_to_h1i9 + 2 r5a0_to_h1i9 + 3 r6a0_to_h1i9 + 3 r6a1_to_h1i9 + 3 r6a2_to_h1i9 + 3 r6a3_to_h1i9 + 3 r7a0_to_h1i9 + 3 r7a1_to_h1i9 + 3 r7a2_to_h1i9 - 16 h1i9_mem = 0 + h1i9_hdd_use: 4 r1a0_to_h1i9 + 4 r1a1_to_h1i9 + 4 r1a2_to_h1i9 + 5 r2a0_to_h1i9 + 17 r3a0_to_h1i9 + 4 r5a0_to_h1i9 + 5 r6a0_to_h1i9 + 5 r6a1_to_h1i9 + 5 r6a2_to_h1i9 + 5 r6a3_to_h1i9 + 17 r7a0_to_h1i9 + 17 r7a1_to_h1i9 + 17 r7a2_to_h1i9 - 150 h1i9_hdd = 0 + h2i0_mem_use: 2 r1a0_to_h2i0 + 2 r1a1_to_h2i0 + 2 r1a2_to_h2i0 + 3 r2a0_to_h2i0 + 3 r3a0_to_h2i0 + 2 r5a0_to_h2i0 + 3 r6a0_to_h2i0 + 3 r6a1_to_h2i0 + 3 r6a2_to_h2i0 + 3 r6a3_to_h2i0 + 3 r7a0_to_h2i0 + 3 r7a1_to_h2i0 + 3 r7a2_to_h2i0 - 16 h2i0_mem = 0 + h2i0_hdd_use: 4 r1a0_to_h2i0 + 4 r1a1_to_h2i0 + 4 r1a2_to_h2i0 + 5 r2a0_to_h2i0 + 17 r3a0_to_h2i0 + 4 r5a0_to_h2i0 + 5 r6a0_to_h2i0 + 5 r6a1_to_h2i0 + 5 r6a2_to_h2i0 + 5 r6a3_to_h2i0 + 17 r7a0_to_h2i0 + 17 r7a1_to_h2i0 + 17 r7a2_to_h2i0 - 75 h2i0_hdd = 0 + h2i1_mem_use: 2 r1a0_to_h2i1 + 2 r1a1_to_h2i1 + 2 r1a2_to_h2i1 + 3 r2a0_to_h2i1 + 3 r3a0_to_h2i1 + 2 r5a0_to_h2i1 + 3 r6a0_to_h2i1 + 3 r6a1_to_h2i1 + 3 r6a2_to_h2i1 + 3 r6a3_to_h2i1 + 3 r7a0_to_h2i1 + 3 r7a1_to_h2i1 + 3 r7a2_to_h2i1 - 16 h2i1_mem = 0 + h2i1_hdd_use: 4 r1a0_to_h2i1 + 4 r1a1_to_h2i1 + 4 r1a2_to_h2i1 + 5 r2a0_to_h2i1 + 17 r3a0_to_h2i1 + 4 r5a0_to_h2i1 + 5 r6a0_to_h2i1 + 5 r6a1_to_h2i1 + 5 r6a2_to_h2i1 + 5 r6a3_to_h2i1 + 17 r7a0_to_h2i1 + 17 r7a1_to_h2i1 + 17 r7a2_to_h2i1 - 75 h2i1_hdd = 0 + h2i2_mem_use: 2 r1a0_to_h2i2 + 2 r1a1_to_h2i2 + 2 r1a2_to_h2i2 + 3 r2a0_to_h2i2 + 3 r3a0_to_h2i2 + 2 r5a0_to_h2i2 + 3 r6a0_to_h2i2 + 3 r6a1_to_h2i2 + 3 r6a2_to_h2i2 + 3 r6a3_to_h2i2 + 3 r7a0_to_h2i2 + 3 r7a1_to_h2i2 + 3 r7a2_to_h2i2 - 16 h2i2_mem = 0 + h2i2_hdd_use: 4 r1a0_to_h2i2 + 4 r1a1_to_h2i2 + 4 r1a2_to_h2i2 + 5 r2a0_to_h2i2 + 17 r3a0_to_h2i2 + 4 r5a0_to_h2i2 + 5 r6a0_to_h2i2 + 5 r6a1_to_h2i2 + 5 r6a2_to_h2i2 + 5 r6a3_to_h2i2 + 17 r7a0_to_h2i2 + 17 r7a1_to_h2i2 + 17 r7a2_to_h2i2 - 75 h2i2_hdd = 0 + h2i3_mem_use: 2 r1a0_to_h2i3 + 2 r1a1_to_h2i3 + 2 r1a2_to_h2i3 + 3 r2a0_to_h2i3 + 3 r3a0_to_h2i3 + 2 r5a0_to_h2i3 + 3 r6a0_to_h2i3 + 3 r6a1_to_h2i3 + 3 r6a2_to_h2i3 + 3 r6a3_to_h2i3 + 3 r7a0_to_h2i3 + 3 r7a1_to_h2i3 + 3 r7a2_to_h2i3 - 16 h2i3_mem = 0 + h2i3_hdd_use: 4 r1a0_to_h2i3 + 4 r1a1_to_h2i3 + 4 r1a2_to_h2i3 + 5 r2a0_to_h2i3 + 17 r3a0_to_h2i3 + 4 r5a0_to_h2i3 + 5 r6a0_to_h2i3 + 5 r6a1_to_h2i3 + 5 r6a2_to_h2i3 + 5 r6a3_to_h2i3 + 17 r7a0_to_h2i3 + 17 r7a1_to_h2i3 + 17 r7a2_to_h2i3 - 75 h2i3_hdd = 0 + h2i4_mem_use: 2 r1a0_to_h2i4 + 2 r1a1_to_h2i4 + 2 r1a2_to_h2i4 + 3 r2a0_to_h2i4 + 3 r3a0_to_h2i4 + 2 r5a0_to_h2i4 + 3 r6a0_to_h2i4 + 3 r6a1_to_h2i4 + 3 r6a2_to_h2i4 + 3 r6a3_to_h2i4 + 3 r7a0_to_h2i4 + 3 r7a1_to_h2i4 + 3 r7a2_to_h2i4 - 16 h2i4_mem = 0 + h2i4_hdd_use: 4 r1a0_to_h2i4 + 4 r1a1_to_h2i4 + 4 r1a2_to_h2i4 + 5 r2a0_to_h2i4 + 17 r3a0_to_h2i4 + 4 r5a0_to_h2i4 + 5 r6a0_to_h2i4 + 5 r6a1_to_h2i4 + 5 r6a2_to_h2i4 + 5 r6a3_to_h2i4 + 17 r7a0_to_h2i4 + 17 r7a1_to_h2i4 + 17 r7a2_to_h2i4 - 75 h2i4_hdd = 0 + h2i5_mem_use: 2 r1a0_to_h2i5 + 2 r1a1_to_h2i5 + 2 r1a2_to_h2i5 + 3 r2a0_to_h2i5 + 3 r3a0_to_h2i5 + 2 r5a0_to_h2i5 + 3 r6a0_to_h2i5 + 3 r6a1_to_h2i5 + 3 r6a2_to_h2i5 + 3 r6a3_to_h2i5 + 3 r7a0_to_h2i5 + 3 r7a1_to_h2i5 + 3 r7a2_to_h2i5 - 16 h2i5_mem = 0 + h2i5_hdd_use: 4 r1a0_to_h2i5 + 4 r1a1_to_h2i5 + 4 r1a2_to_h2i5 + 5 r2a0_to_h2i5 + 17 r3a0_to_h2i5 + 4 r5a0_to_h2i5 + 5 r6a0_to_h2i5 + 5 r6a1_to_h2i5 + 5 r6a2_to_h2i5 + 5 r6a3_to_h2i5 + 17 r7a0_to_h2i5 + 17 r7a1_to_h2i5 + 17 r7a2_to_h2i5 - 75 h2i5_hdd = 0 + h2i6_mem_use: 2 r1a0_to_h2i6 + 2 r1a1_to_h2i6 + 2 r1a2_to_h2i6 + 3 r2a0_to_h2i6 + 3 r3a0_to_h2i6 + 2 r5a0_to_h2i6 + 3 r6a0_to_h2i6 + 3 r6a1_to_h2i6 + 3 r6a2_to_h2i6 + 3 r6a3_to_h2i6 + 3 r7a0_to_h2i6 + 3 r7a1_to_h2i6 + 3 r7a2_to_h2i6 - 16 h2i6_mem = 0 + h2i6_hdd_use: 4 r1a0_to_h2i6 + 4 r1a1_to_h2i6 + 4 r1a2_to_h2i6 + 5 r2a0_to_h2i6 + 17 r3a0_to_h2i6 + 4 r5a0_to_h2i6 + 5 r6a0_to_h2i6 + 5 r6a1_to_h2i6 + 5 r6a2_to_h2i6 + 5 r6a3_to_h2i6 + 17 r7a0_to_h2i6 + 17 r7a1_to_h2i6 + 17 r7a2_to_h2i6 - 75 h2i6_hdd = 0 + h2i7_mem_use: 2 r1a0_to_h2i7 + 2 r1a1_to_h2i7 + 2 r1a2_to_h2i7 + 3 r2a0_to_h2i7 + 3 r3a0_to_h2i7 + 2 r5a0_to_h2i7 + 3 r6a0_to_h2i7 + 3 r6a1_to_h2i7 + 3 r6a2_to_h2i7 + 3 r6a3_to_h2i7 + 3 r7a0_to_h2i7 + 3 r7a1_to_h2i7 + 3 r7a2_to_h2i7 - 16 h2i7_mem = 0 + h2i7_hdd_use: 4 r1a0_to_h2i7 + 4 r1a1_to_h2i7 + 4 r1a2_to_h2i7 + 5 r2a0_to_h2i7 + 17 r3a0_to_h2i7 + 4 r5a0_to_h2i7 + 5 r6a0_to_h2i7 + 5 r6a1_to_h2i7 + 5 r6a2_to_h2i7 + 5 r6a3_to_h2i7 + 17 r7a0_to_h2i7 + 17 r7a1_to_h2i7 + 17 r7a2_to_h2i7 - 75 h2i7_hdd = 0 + h2i8_mem_use: 2 r1a0_to_h2i8 + 2 r1a1_to_h2i8 + 2 r1a2_to_h2i8 + 3 r2a0_to_h2i8 + 3 r3a0_to_h2i8 + 2 r5a0_to_h2i8 + 3 r6a0_to_h2i8 + 3 r6a1_to_h2i8 + 3 r6a2_to_h2i8 + 3 r6a3_to_h2i8 + 3 r7a0_to_h2i8 + 3 r7a1_to_h2i8 + 3 r7a2_to_h2i8 - 16 h2i8_mem = 0 + h2i8_hdd_use: 4 r1a0_to_h2i8 + 4 r1a1_to_h2i8 + 4 r1a2_to_h2i8 + 5 r2a0_to_h2i8 + 17 r3a0_to_h2i8 + 4 r5a0_to_h2i8 + 5 r6a0_to_h2i8 + 5 r6a1_to_h2i8 + 5 r6a2_to_h2i8 + 5 r6a3_to_h2i8 + 17 r7a0_to_h2i8 + 17 r7a1_to_h2i8 + 17 r7a2_to_h2i8 - 75 h2i8_hdd = 0 + h2i9_mem_use: 2 r1a0_to_h2i9 + 2 r1a1_to_h2i9 + 2 r1a2_to_h2i9 + 3 r2a0_to_h2i9 + 3 r3a0_to_h2i9 + 2 r5a0_to_h2i9 + 3 r6a0_to_h2i9 + 3 r6a1_to_h2i9 + 3 r6a2_to_h2i9 + 3 r6a3_to_h2i9 + 3 r7a0_to_h2i9 + 3 r7a1_to_h2i9 + 3 r7a2_to_h2i9 - 16 h2i9_mem = 0 + h2i9_hdd_use: 4 r1a0_to_h2i9 + 4 r1a1_to_h2i9 + 4 r1a2_to_h2i9 + 5 r2a0_to_h2i9 + 17 r3a0_to_h2i9 + 4 r5a0_to_h2i9 + 5 r6a0_to_h2i9 + 5 r6a1_to_h2i9 + 5 r6a2_to_h2i9 + 5 r6a3_to_h2i9 + 17 r7a0_to_h2i9 + 17 r7a1_to_h2i9 + 17 r7a2_to_h2i9 - 75 h2i9_hdd = 0 + h3i0_mem_use: 2 r1a0_to_h3i0 + 2 r1a1_to_h3i0 + 2 r1a2_to_h3i0 + 3 r2a0_to_h3i0 + 3 r3a0_to_h3i0 + 2 r5a0_to_h3i0 + 3 r6a0_to_h3i0 + 3 r6a1_to_h3i0 + 3 r6a2_to_h3i0 + 3 r6a3_to_h3i0 + 3 r7a0_to_h3i0 + 3 r7a1_to_h3i0 + 3 r7a2_to_h3i0 - 32 h3i0_mem = 0 + h3i0_hdd_use: 4 r1a0_to_h3i0 + 4 r1a1_to_h3i0 + 4 r1a2_to_h3i0 + 5 r2a0_to_h3i0 + 17 r3a0_to_h3i0 + 4 r5a0_to_h3i0 + 5 r6a0_to_h3i0 + 5 r6a1_to_h3i0 + 5 r6a2_to_h3i0 + 5 r6a3_to_h3i0 + 17 r7a0_to_h3i0 + 17 r7a1_to_h3i0 + 17 r7a2_to_h3i0 - 150 h3i0_hdd = 0 + h3i1_mem_use: 2 r1a0_to_h3i1 + 2 r1a1_to_h3i1 + 2 r1a2_to_h3i1 + 3 r2a0_to_h3i1 + 3 r3a0_to_h3i1 + 2 r5a0_to_h3i1 + 3 r6a0_to_h3i1 + 3 r6a1_to_h3i1 + 3 r6a2_to_h3i1 + 3 r6a3_to_h3i1 + 3 r7a0_to_h3i1 + 3 r7a1_to_h3i1 + 3 r7a2_to_h3i1 - 32 h3i1_mem = 0 + h3i1_hdd_use: 4 r1a0_to_h3i1 + 4 r1a1_to_h3i1 + 4 r1a2_to_h3i1 + 5 r2a0_to_h3i1 + 17 r3a0_to_h3i1 + 4 r5a0_to_h3i1 + 5 r6a0_to_h3i1 + 5 r6a1_to_h3i1 + 5 r6a2_to_h3i1 + 5 r6a3_to_h3i1 + 17 r7a0_to_h3i1 + 17 r7a1_to_h3i1 + 17 r7a2_to_h3i1 - 150 h3i1_hdd = 0 + h3i2_mem_use: 2 r1a0_to_h3i2 + 2 r1a1_to_h3i2 + 2 r1a2_to_h3i2 + 3 r2a0_to_h3i2 + 3 r3a0_to_h3i2 + 2 r5a0_to_h3i2 + 3 r6a0_to_h3i2 + 3 r6a1_to_h3i2 + 3 r6a2_to_h3i2 + 3 r6a3_to_h3i2 + 3 r7a0_to_h3i2 + 3 r7a1_to_h3i2 + 3 r7a2_to_h3i2 - 32 h3i2_mem = 0 + h3i2_hdd_use: 4 r1a0_to_h3i2 + 4 r1a1_to_h3i2 + 4 r1a2_to_h3i2 + 5 r2a0_to_h3i2 + 17 r3a0_to_h3i2 + 4 r5a0_to_h3i2 + 5 r6a0_to_h3i2 + 5 r6a1_to_h3i2 + 5 r6a2_to_h3i2 + 5 r6a3_to_h3i2 + 17 r7a0_to_h3i2 + 17 r7a1_to_h3i2 + 17 r7a2_to_h3i2 - 150 h3i2_hdd = 0 + h3i3_mem_use: 2 r1a0_to_h3i3 + 2 r1a1_to_h3i3 + 2 r1a2_to_h3i3 + 3 r2a0_to_h3i3 + 3 r3a0_to_h3i3 + 2 r5a0_to_h3i3 + 3 r6a0_to_h3i3 + 3 r6a1_to_h3i3 + 3 r6a2_to_h3i3 + 3 r6a3_to_h3i3 + 3 r7a0_to_h3i3 + 3 r7a1_to_h3i3 + 3 r7a2_to_h3i3 - 32 h3i3_mem = 0 + h3i3_hdd_use: 4 r1a0_to_h3i3 + 4 r1a1_to_h3i3 + 4 r1a2_to_h3i3 + 5 r2a0_to_h3i3 + 17 r3a0_to_h3i3 + 4 r5a0_to_h3i3 + 5 r6a0_to_h3i3 + 5 r6a1_to_h3i3 + 5 r6a2_to_h3i3 + 5 r6a3_to_h3i3 + 17 r7a0_to_h3i3 + 17 r7a1_to_h3i3 + 17 r7a2_to_h3i3 - 150 h3i3_hdd = 0 + h3i4_mem_use: 2 r1a0_to_h3i4 + 2 r1a1_to_h3i4 + 2 r1a2_to_h3i4 + 3 r2a0_to_h3i4 + 3 r3a0_to_h3i4 + 2 r5a0_to_h3i4 + 3 r6a0_to_h3i4 + 3 r6a1_to_h3i4 + 3 r6a2_to_h3i4 + 3 r6a3_to_h3i4 + 3 r7a0_to_h3i4 + 3 r7a1_to_h3i4 + 3 r7a2_to_h3i4 - 32 h3i4_mem = 0 + h3i4_hdd_use: 4 r1a0_to_h3i4 + 4 r1a1_to_h3i4 + 4 r1a2_to_h3i4 + 5 r2a0_to_h3i4 + 17 r3a0_to_h3i4 + 4 r5a0_to_h3i4 + 5 r6a0_to_h3i4 + 5 r6a1_to_h3i4 + 5 r6a2_to_h3i4 + 5 r6a3_to_h3i4 + 17 r7a0_to_h3i4 + 17 r7a1_to_h3i4 + 17 r7a2_to_h3i4 - 150 h3i4_hdd = 0 + h3i5_mem_use: 2 r1a0_to_h3i5 + 2 r1a1_to_h3i5 + 2 r1a2_to_h3i5 + 3 r2a0_to_h3i5 + 3 r3a0_to_h3i5 + 2 r5a0_to_h3i5 + 3 r6a0_to_h3i5 + 3 r6a1_to_h3i5 + 3 r6a2_to_h3i5 + 3 r6a3_to_h3i5 + 3 r7a0_to_h3i5 + 3 r7a1_to_h3i5 + 3 r7a2_to_h3i5 - 32 h3i5_mem = 0 + h3i5_hdd_use: 4 r1a0_to_h3i5 + 4 r1a1_to_h3i5 + 4 r1a2_to_h3i5 + 5 r2a0_to_h3i5 + 17 r3a0_to_h3i5 + 4 r5a0_to_h3i5 + 5 r6a0_to_h3i5 + 5 r6a1_to_h3i5 + 5 r6a2_to_h3i5 + 5 r6a3_to_h3i5 + 17 r7a0_to_h3i5 + 17 r7a1_to_h3i5 + 17 r7a2_to_h3i5 - 150 h3i5_hdd = 0 + h3i6_mem_use: 2 r1a0_to_h3i6 + 2 r1a1_to_h3i6 + 2 r1a2_to_h3i6 + 3 r2a0_to_h3i6 + 3 r3a0_to_h3i6 + 2 r5a0_to_h3i6 + 3 r6a0_to_h3i6 + 3 r6a1_to_h3i6 + 3 r6a2_to_h3i6 + 3 r6a3_to_h3i6 + 3 r7a0_to_h3i6 + 3 r7a1_to_h3i6 + 3 r7a2_to_h3i6 - 32 h3i6_mem = 0 + h3i6_hdd_use: 4 r1a0_to_h3i6 + 4 r1a1_to_h3i6 + 4 r1a2_to_h3i6 + 5 r2a0_to_h3i6 + 17 r3a0_to_h3i6 + 4 r5a0_to_h3i6 + 5 r6a0_to_h3i6 + 5 r6a1_to_h3i6 + 5 r6a2_to_h3i6 + 5 r6a3_to_h3i6 + 17 r7a0_to_h3i6 + 17 r7a1_to_h3i6 + 17 r7a2_to_h3i6 - 150 h3i6_hdd = 0 + h3i7_mem_use: 2 r1a0_to_h3i7 + 2 r1a1_to_h3i7 + 2 r1a2_to_h3i7 + 3 r2a0_to_h3i7 + 3 r3a0_to_h3i7 + 2 r5a0_to_h3i7 + 3 r6a0_to_h3i7 + 3 r6a1_to_h3i7 + 3 r6a2_to_h3i7 + 3 r6a3_to_h3i7 + 3 r7a0_to_h3i7 + 3 r7a1_to_h3i7 + 3 r7a2_to_h3i7 - 32 h3i7_mem = 0 + h3i7_hdd_use: 4 r1a0_to_h3i7 + 4 r1a1_to_h3i7 + 4 r1a2_to_h3i7 + 5 r2a0_to_h3i7 + 17 r3a0_to_h3i7 + 4 r5a0_to_h3i7 + 5 r6a0_to_h3i7 + 5 r6a1_to_h3i7 + 5 r6a2_to_h3i7 + 5 r6a3_to_h3i7 + 17 r7a0_to_h3i7 + 17 r7a1_to_h3i7 + 17 r7a2_to_h3i7 - 150 h3i7_hdd = 0 + h3i8_mem_use: 2 r1a0_to_h3i8 + 2 r1a1_to_h3i8 + 2 r1a2_to_h3i8 + 3 r2a0_to_h3i8 + 3 r3a0_to_h3i8 + 2 r5a0_to_h3i8 + 3 r6a0_to_h3i8 + 3 r6a1_to_h3i8 + 3 r6a2_to_h3i8 + 3 r6a3_to_h3i8 + 3 r7a0_to_h3i8 + 3 r7a1_to_h3i8 + 3 r7a2_to_h3i8 - 32 h3i8_mem = 0 + h3i8_hdd_use: 4 r1a0_to_h3i8 + 4 r1a1_to_h3i8 + 4 r1a2_to_h3i8 + 5 r2a0_to_h3i8 + 17 r3a0_to_h3i8 + 4 r5a0_to_h3i8 + 5 r6a0_to_h3i8 + 5 r6a1_to_h3i8 + 5 r6a2_to_h3i8 + 5 r6a3_to_h3i8 + 17 r7a0_to_h3i8 + 17 r7a1_to_h3i8 + 17 r7a2_to_h3i8 - 150 h3i8_hdd = 0 + h3i9_mem_use: 2 r1a0_to_h3i9 + 2 r1a1_to_h3i9 + 2 r1a2_to_h3i9 + 3 r2a0_to_h3i9 + 3 r3a0_to_h3i9 + 2 r5a0_to_h3i9 + 3 r6a0_to_h3i9 + 3 r6a1_to_h3i9 + 3 r6a2_to_h3i9 + 3 r6a3_to_h3i9 + 3 r7a0_to_h3i9 + 3 r7a1_to_h3i9 + 3 r7a2_to_h3i9 - 32 h3i9_mem = 0 + h3i9_hdd_use: 4 r1a0_to_h3i9 + 4 r1a1_to_h3i9 + 4 r1a2_to_h3i9 + 5 r2a0_to_h3i9 + 17 r3a0_to_h3i9 + 4 r5a0_to_h3i9 + 5 r6a0_to_h3i9 + 5 r6a1_to_h3i9 + 5 r6a2_to_h3i9 + 5 r6a3_to_h3i9 + 17 r7a0_to_h3i9 + 17 r7a1_to_h3i9 + 17 r7a2_to_h3i9 - 150 h3i9_hdd = 0 + h4i0_mem_use: 4 r0a0_to_h4i0 + 4 r0a1_to_h4i0 + 4 r0a2_to_h4i0 + 4 r0a3_to_h4i0 + 2 r1a0_to_h4i0 + 2 r1a1_to_h4i0 + 2 r1a2_to_h4i0 + 3 r2a0_to_h4i0 + 3 r3a0_to_h4i0 + 4 r4a0_to_h4i0 + 4 r4a1_to_h4i0 + 4 r4a2_to_h4i0 + 4 r4a3_to_h4i0 + 2 r5a0_to_h4i0 + 3 r6a0_to_h4i0 + 3 r6a1_to_h4i0 + 3 r6a2_to_h4i0 + 3 r6a3_to_h4i0 + 3 r7a0_to_h4i0 + 3 r7a1_to_h4i0 + 3 r7a2_to_h4i0 - 4 h4i0_mem = 0 + h4i0_hdd_use: 29 r0a0_to_h4i0 + 29 r0a1_to_h4i0 + 29 r0a2_to_h4i0 + 29 r0a3_to_h4i0 + 4 r1a0_to_h4i0 + 4 r1a1_to_h4i0 + 4 r1a2_to_h4i0 + 5 r2a0_to_h4i0 + 17 r3a0_to_h4i0 + 29 r4a0_to_h4i0 + 29 r4a1_to_h4i0 + 29 r4a2_to_h4i0 + 29 r4a3_to_h4i0 + 4 r5a0_to_h4i0 + 5 r6a0_to_h4i0 + 5 r6a1_to_h4i0 + 5 r6a2_to_h4i0 + 5 r6a3_to_h4i0 + 17 r7a0_to_h4i0 + 17 r7a1_to_h4i0 + 17 r7a2_to_h4i0 - 50 h4i0_hdd = 0 + h4i1_mem_use: 4 r0a0_to_h4i1 + 4 r0a1_to_h4i1 + 4 r0a2_to_h4i1 + 4 r0a3_to_h4i1 + 2 r1a0_to_h4i1 + 2 r1a1_to_h4i1 + 2 r1a2_to_h4i1 + 3 r2a0_to_h4i1 + 3 r3a0_to_h4i1 + 4 r4a0_to_h4i1 + 4 r4a1_to_h4i1 + 4 r4a2_to_h4i1 + 4 r4a3_to_h4i1 + 2 r5a0_to_h4i1 + 3 r6a0_to_h4i1 + 3 r6a1_to_h4i1 + 3 r6a2_to_h4i1 + 3 r6a3_to_h4i1 + 3 r7a0_to_h4i1 + 3 r7a1_to_h4i1 + 3 r7a2_to_h4i1 - 4 h4i1_mem = 0 + h4i1_hdd_use: 29 r0a0_to_h4i1 + 29 r0a1_to_h4i1 + 29 r0a2_to_h4i1 + 29 r0a3_to_h4i1 + 4 r1a0_to_h4i1 + 4 r1a1_to_h4i1 + 4 r1a2_to_h4i1 + 5 r2a0_to_h4i1 + 17 r3a0_to_h4i1 + 29 r4a0_to_h4i1 + 29 r4a1_to_h4i1 + 29 r4a2_to_h4i1 + 29 r4a3_to_h4i1 + 4 r5a0_to_h4i1 + 5 r6a0_to_h4i1 + 5 r6a1_to_h4i1 + 5 r6a2_to_h4i1 + 5 r6a3_to_h4i1 + 17 r7a0_to_h4i1 + 17 r7a1_to_h4i1 + 17 r7a2_to_h4i1 - 50 h4i1_hdd = 0 + h4i2_mem_use: 4 r0a0_to_h4i2 + 4 r0a1_to_h4i2 + 4 r0a2_to_h4i2 + 4 r0a3_to_h4i2 + 2 r1a0_to_h4i2 + 2 r1a1_to_h4i2 + 2 r1a2_to_h4i2 + 3 r2a0_to_h4i2 + 3 r3a0_to_h4i2 + 4 r4a0_to_h4i2 + 4 r4a1_to_h4i2 + 4 r4a2_to_h4i2 + 4 r4a3_to_h4i2 + 2 r5a0_to_h4i2 + 3 r6a0_to_h4i2 + 3 r6a1_to_h4i2 + 3 r6a2_to_h4i2 + 3 r6a3_to_h4i2 + 3 r7a0_to_h4i2 + 3 r7a1_to_h4i2 + 3 r7a2_to_h4i2 - 4 h4i2_mem = 0 + h4i2_hdd_use: 29 r0a0_to_h4i2 + 29 r0a1_to_h4i2 + 29 r0a2_to_h4i2 + 29 r0a3_to_h4i2 + 4 r1a0_to_h4i2 + 4 r1a1_to_h4i2 + 4 r1a2_to_h4i2 + 5 r2a0_to_h4i2 + 17 r3a0_to_h4i2 + 29 r4a0_to_h4i2 + 29 r4a1_to_h4i2 + 29 r4a2_to_h4i2 + 29 r4a3_to_h4i2 + 4 r5a0_to_h4i2 + 5 r6a0_to_h4i2 + 5 r6a1_to_h4i2 + 5 r6a2_to_h4i2 + 5 r6a3_to_h4i2 + 17 r7a0_to_h4i2 + 17 r7a1_to_h4i2 + 17 r7a2_to_h4i2 - 50 h4i2_hdd = 0 + h4i3_mem_use: 4 r0a0_to_h4i3 + 4 r0a1_to_h4i3 + 4 r0a2_to_h4i3 + 4 r0a3_to_h4i3 + 2 r1a0_to_h4i3 + 2 r1a1_to_h4i3 + 2 r1a2_to_h4i3 + 3 r2a0_to_h4i3 + 3 r3a0_to_h4i3 + 4 r4a0_to_h4i3 + 4 r4a1_to_h4i3 + 4 r4a2_to_h4i3 + 4 r4a3_to_h4i3 + 2 r5a0_to_h4i3 + 3 r6a0_to_h4i3 + 3 r6a1_to_h4i3 + 3 r6a2_to_h4i3 + 3 r6a3_to_h4i3 + 3 r7a0_to_h4i3 + 3 r7a1_to_h4i3 + 3 r7a2_to_h4i3 - 4 h4i3_mem = 0 + h4i3_hdd_use: 29 r0a0_to_h4i3 + 29 r0a1_to_h4i3 + 29 r0a2_to_h4i3 + 29 r0a3_to_h4i3 + 4 r1a0_to_h4i3 + 4 r1a1_to_h4i3 + 4 r1a2_to_h4i3 + 5 r2a0_to_h4i3 + 17 r3a0_to_h4i3 + 29 r4a0_to_h4i3 + 29 r4a1_to_h4i3 + 29 r4a2_to_h4i3 + 29 r4a3_to_h4i3 + 4 r5a0_to_h4i3 + 5 r6a0_to_h4i3 + 5 r6a1_to_h4i3 + 5 r6a2_to_h4i3 + 5 r6a3_to_h4i3 + 17 r7a0_to_h4i3 + 17 r7a1_to_h4i3 + 17 r7a2_to_h4i3 - 50 h4i3_hdd = 0 + h4i4_mem_use: 4 r0a0_to_h4i4 + 4 r0a1_to_h4i4 + 4 r0a2_to_h4i4 + 4 r0a3_to_h4i4 + 2 r1a0_to_h4i4 + 2 r1a1_to_h4i4 + 2 r1a2_to_h4i4 + 3 r2a0_to_h4i4 + 3 r3a0_to_h4i4 + 4 r4a0_to_h4i4 + 4 r4a1_to_h4i4 + 4 r4a2_to_h4i4 + 4 r4a3_to_h4i4 + 2 r5a0_to_h4i4 + 3 r6a0_to_h4i4 + 3 r6a1_to_h4i4 + 3 r6a2_to_h4i4 + 3 r6a3_to_h4i4 + 3 r7a0_to_h4i4 + 3 r7a1_to_h4i4 + 3 r7a2_to_h4i4 - 4 h4i4_mem = 0 + h4i4_hdd_use: 29 r0a0_to_h4i4 + 29 r0a1_to_h4i4 + 29 r0a2_to_h4i4 + 29 r0a3_to_h4i4 + 4 r1a0_to_h4i4 + 4 r1a1_to_h4i4 + 4 r1a2_to_h4i4 + 5 r2a0_to_h4i4 + 17 r3a0_to_h4i4 + 29 r4a0_to_h4i4 + 29 r4a1_to_h4i4 + 29 r4a2_to_h4i4 + 29 r4a3_to_h4i4 + 4 r5a0_to_h4i4 + 5 r6a0_to_h4i4 + 5 r6a1_to_h4i4 + 5 r6a2_to_h4i4 + 5 r6a3_to_h4i4 + 17 r7a0_to_h4i4 + 17 r7a1_to_h4i4 + 17 r7a2_to_h4i4 - 50 h4i4_hdd = 0 + h4i5_mem_use: 4 r0a0_to_h4i5 + 4 r0a1_to_h4i5 + 4 r0a2_to_h4i5 + 4 r0a3_to_h4i5 + 2 r1a0_to_h4i5 + 2 r1a1_to_h4i5 + 2 r1a2_to_h4i5 + 3 r2a0_to_h4i5 + 3 r3a0_to_h4i5 + 4 r4a0_to_h4i5 + 4 r4a1_to_h4i5 + 4 r4a2_to_h4i5 + 4 r4a3_to_h4i5 + 2 r5a0_to_h4i5 + 3 r6a0_to_h4i5 + 3 r6a1_to_h4i5 + 3 r6a2_to_h4i5 + 3 r6a3_to_h4i5 + 3 r7a0_to_h4i5 + 3 r7a1_to_h4i5 + 3 r7a2_to_h4i5 - 4 h4i5_mem = 0 + h4i5_hdd_use: 29 r0a0_to_h4i5 + 29 r0a1_to_h4i5 + 29 r0a2_to_h4i5 + 29 r0a3_to_h4i5 + 4 r1a0_to_h4i5 + 4 r1a1_to_h4i5 + 4 r1a2_to_h4i5 + 5 r2a0_to_h4i5 + 17 r3a0_to_h4i5 + 29 r4a0_to_h4i5 + 29 r4a1_to_h4i5 + 29 r4a2_to_h4i5 + 29 r4a3_to_h4i5 + 4 r5a0_to_h4i5 + 5 r6a0_to_h4i5 + 5 r6a1_to_h4i5 + 5 r6a2_to_h4i5 + 5 r6a3_to_h4i5 + 17 r7a0_to_h4i5 + 17 r7a1_to_h4i5 + 17 r7a2_to_h4i5 - 50 h4i5_hdd = 0 + h4i6_mem_use: 4 r0a0_to_h4i6 + 4 r0a1_to_h4i6 + 4 r0a2_to_h4i6 + 4 r0a3_to_h4i6 + 2 r1a0_to_h4i6 + 2 r1a1_to_h4i6 + 2 r1a2_to_h4i6 + 3 r2a0_to_h4i6 + 3 r3a0_to_h4i6 + 4 r4a0_to_h4i6 + 4 r4a1_to_h4i6 + 4 r4a2_to_h4i6 + 4 r4a3_to_h4i6 + 2 r5a0_to_h4i6 + 3 r6a0_to_h4i6 + 3 r6a1_to_h4i6 + 3 r6a2_to_h4i6 + 3 r6a3_to_h4i6 + 3 r7a0_to_h4i6 + 3 r7a1_to_h4i6 + 3 r7a2_to_h4i6 - 4 h4i6_mem = 0 + h4i6_hdd_use: 29 r0a0_to_h4i6 + 29 r0a1_to_h4i6 + 29 r0a2_to_h4i6 + 29 r0a3_to_h4i6 + 4 r1a0_to_h4i6 + 4 r1a1_to_h4i6 + 4 r1a2_to_h4i6 + 5 r2a0_to_h4i6 + 17 r3a0_to_h4i6 + 29 r4a0_to_h4i6 + 29 r4a1_to_h4i6 + 29 r4a2_to_h4i6 + 29 r4a3_to_h4i6 + 4 r5a0_to_h4i6 + 5 r6a0_to_h4i6 + 5 r6a1_to_h4i6 + 5 r6a2_to_h4i6 + 5 r6a3_to_h4i6 + 17 r7a0_to_h4i6 + 17 r7a1_to_h4i6 + 17 r7a2_to_h4i6 - 50 h4i6_hdd = 0 + h4i7_mem_use: 4 r0a0_to_h4i7 + 4 r0a1_to_h4i7 + 4 r0a2_to_h4i7 + 4 r0a3_to_h4i7 + 2 r1a0_to_h4i7 + 2 r1a1_to_h4i7 + 2 r1a2_to_h4i7 + 3 r2a0_to_h4i7 + 3 r3a0_to_h4i7 + 4 r4a0_to_h4i7 + 4 r4a1_to_h4i7 + 4 r4a2_to_h4i7 + 4 r4a3_to_h4i7 + 2 r5a0_to_h4i7 + 3 r6a0_to_h4i7 + 3 r6a1_to_h4i7 + 3 r6a2_to_h4i7 + 3 r6a3_to_h4i7 + 3 r7a0_to_h4i7 + 3 r7a1_to_h4i7 + 3 r7a2_to_h4i7 - 4 h4i7_mem = 0 + h4i7_hdd_use: 29 r0a0_to_h4i7 + 29 r0a1_to_h4i7 + 29 r0a2_to_h4i7 + 29 r0a3_to_h4i7 + 4 r1a0_to_h4i7 + 4 r1a1_to_h4i7 + 4 r1a2_to_h4i7 + 5 r2a0_to_h4i7 + 17 r3a0_to_h4i7 + 29 r4a0_to_h4i7 + 29 r4a1_to_h4i7 + 29 r4a2_to_h4i7 + 29 r4a3_to_h4i7 + 4 r5a0_to_h4i7 + 5 r6a0_to_h4i7 + 5 r6a1_to_h4i7 + 5 r6a2_to_h4i7 + 5 r6a3_to_h4i7 + 17 r7a0_to_h4i7 + 17 r7a1_to_h4i7 + 17 r7a2_to_h4i7 - 50 h4i7_hdd = 0 + h4i8_mem_use: 4 r0a0_to_h4i8 + 4 r0a1_to_h4i8 + 4 r0a2_to_h4i8 + 4 r0a3_to_h4i8 + 2 r1a0_to_h4i8 + 2 r1a1_to_h4i8 + 2 r1a2_to_h4i8 + 3 r2a0_to_h4i8 + 3 r3a0_to_h4i8 + 4 r4a0_to_h4i8 + 4 r4a1_to_h4i8 + 4 r4a2_to_h4i8 + 4 r4a3_to_h4i8 + 2 r5a0_to_h4i8 + 3 r6a0_to_h4i8 + 3 r6a1_to_h4i8 + 3 r6a2_to_h4i8 + 3 r6a3_to_h4i8 + 3 r7a0_to_h4i8 + 3 r7a1_to_h4i8 + 3 r7a2_to_h4i8 - 4 h4i8_mem = 0 + h4i8_hdd_use: 29 r0a0_to_h4i8 + 29 r0a1_to_h4i8 + 29 r0a2_to_h4i8 + 29 r0a3_to_h4i8 + 4 r1a0_to_h4i8 + 4 r1a1_to_h4i8 + 4 r1a2_to_h4i8 + 5 r2a0_to_h4i8 + 17 r3a0_to_h4i8 + 29 r4a0_to_h4i8 + 29 r4a1_to_h4i8 + 29 r4a2_to_h4i8 + 29 r4a3_to_h4i8 + 4 r5a0_to_h4i8 + 5 r6a0_to_h4i8 + 5 r6a1_to_h4i8 + 5 r6a2_to_h4i8 + 5 r6a3_to_h4i8 + 17 r7a0_to_h4i8 + 17 r7a1_to_h4i8 + 17 r7a2_to_h4i8 - 50 h4i8_hdd = 0 + h4i9_mem_use: 4 r0a0_to_h4i9 + 4 r0a1_to_h4i9 + 4 r0a2_to_h4i9 + 4 r0a3_to_h4i9 + 2 r1a0_to_h4i9 + 2 r1a1_to_h4i9 + 2 r1a2_to_h4i9 + 3 r2a0_to_h4i9 + 3 r3a0_to_h4i9 + 4 r4a0_to_h4i9 + 4 r4a1_to_h4i9 + 4 r4a2_to_h4i9 + 4 r4a3_to_h4i9 + 2 r5a0_to_h4i9 + 3 r6a0_to_h4i9 + 3 r6a1_to_h4i9 + 3 r6a2_to_h4i9 + 3 r6a3_to_h4i9 + 3 r7a0_to_h4i9 + 3 r7a1_to_h4i9 + 3 r7a2_to_h4i9 - 4 h4i9_mem = 0 + h4i9_hdd_use: 29 r0a0_to_h4i9 + 29 r0a1_to_h4i9 + 29 r0a2_to_h4i9 + 29 r0a3_to_h4i9 + 4 r1a0_to_h4i9 + 4 r1a1_to_h4i9 + 4 r1a2_to_h4i9 + 5 r2a0_to_h4i9 + 17 r3a0_to_h4i9 + 29 r4a0_to_h4i9 + 29 r4a1_to_h4i9 + 29 r4a2_to_h4i9 + 29 r4a3_to_h4i9 + 4 r5a0_to_h4i9 + 5 r6a0_to_h4i9 + 5 r6a1_to_h4i9 + 5 r6a2_to_h4i9 + 5 r6a3_to_h4i9 + 17 r7a0_to_h4i9 + 17 r7a1_to_h4i9 + 17 r7a2_to_h4i9 - 50 h4i9_hdd = 0 + h5i0_mem_use: 4 r0a0_to_h5i0 + 4 r0a1_to_h5i0 + 4 r0a2_to_h5i0 + 4 r0a3_to_h5i0 + 2 r1a0_to_h5i0 + 2 r1a1_to_h5i0 + 2 r1a2_to_h5i0 + 3 r2a0_to_h5i0 + 3 r3a0_to_h5i0 + 4 r4a0_to_h5i0 + 4 r4a1_to_h5i0 + 4 r4a2_to_h5i0 + 4 r4a3_to_h5i0 + 2 r5a0_to_h5i0 + 3 r6a0_to_h5i0 + 3 r6a1_to_h5i0 + 3 r6a2_to_h5i0 + 3 r6a3_to_h5i0 + 3 r7a0_to_h5i0 + 3 r7a1_to_h5i0 + 3 r7a2_to_h5i0 - 8 h5i0_mem = 0 + h5i0_hdd_use: 29 r0a0_to_h5i0 + 29 r0a1_to_h5i0 + 29 r0a2_to_h5i0 + 29 r0a3_to_h5i0 + 4 r1a0_to_h5i0 + 4 r1a1_to_h5i0 + 4 r1a2_to_h5i0 + 5 r2a0_to_h5i0 + 17 r3a0_to_h5i0 + 29 r4a0_to_h5i0 + 29 r4a1_to_h5i0 + 29 r4a2_to_h5i0 + 29 r4a3_to_h5i0 + 4 r5a0_to_h5i0 + 5 r6a0_to_h5i0 + 5 r6a1_to_h5i0 + 5 r6a2_to_h5i0 + 5 r6a3_to_h5i0 + 17 r7a0_to_h5i0 + 17 r7a1_to_h5i0 + 17 r7a2_to_h5i0 - 100 h5i0_hdd = 0 + h5i1_mem_use: 4 r0a0_to_h5i1 + 4 r0a1_to_h5i1 + 4 r0a2_to_h5i1 + 4 r0a3_to_h5i1 + 2 r1a0_to_h5i1 + 2 r1a1_to_h5i1 + 2 r1a2_to_h5i1 + 3 r2a0_to_h5i1 + 3 r3a0_to_h5i1 + 4 r4a0_to_h5i1 + 4 r4a1_to_h5i1 + 4 r4a2_to_h5i1 + 4 r4a3_to_h5i1 + 2 r5a0_to_h5i1 + 3 r6a0_to_h5i1 + 3 r6a1_to_h5i1 + 3 r6a2_to_h5i1 + 3 r6a3_to_h5i1 + 3 r7a0_to_h5i1 + 3 r7a1_to_h5i1 + 3 r7a2_to_h5i1 - 8 h5i1_mem = 0 + h5i1_hdd_use: 29 r0a0_to_h5i1 + 29 r0a1_to_h5i1 + 29 r0a2_to_h5i1 + 29 r0a3_to_h5i1 + 4 r1a0_to_h5i1 + 4 r1a1_to_h5i1 + 4 r1a2_to_h5i1 + 5 r2a0_to_h5i1 + 17 r3a0_to_h5i1 + 29 r4a0_to_h5i1 + 29 r4a1_to_h5i1 + 29 r4a2_to_h5i1 + 29 r4a3_to_h5i1 + 4 r5a0_to_h5i1 + 5 r6a0_to_h5i1 + 5 r6a1_to_h5i1 + 5 r6a2_to_h5i1 + 5 r6a3_to_h5i1 + 17 r7a0_to_h5i1 + 17 r7a1_to_h5i1 + 17 r7a2_to_h5i1 - 100 h5i1_hdd = 0 + h5i2_mem_use: 4 r0a0_to_h5i2 + 4 r0a1_to_h5i2 + 4 r0a2_to_h5i2 + 4 r0a3_to_h5i2 + 2 r1a0_to_h5i2 + 2 r1a1_to_h5i2 + 2 r1a2_to_h5i2 + 3 r2a0_to_h5i2 + 3 r3a0_to_h5i2 + 4 r4a0_to_h5i2 + 4 r4a1_to_h5i2 + 4 r4a2_to_h5i2 + 4 r4a3_to_h5i2 + 2 r5a0_to_h5i2 + 3 r6a0_to_h5i2 + 3 r6a1_to_h5i2 + 3 r6a2_to_h5i2 + 3 r6a3_to_h5i2 + 3 r7a0_to_h5i2 + 3 r7a1_to_h5i2 + 3 r7a2_to_h5i2 - 8 h5i2_mem = 0 + h5i2_hdd_use: 29 r0a0_to_h5i2 + 29 r0a1_to_h5i2 + 29 r0a2_to_h5i2 + 29 r0a3_to_h5i2 + 4 r1a0_to_h5i2 + 4 r1a1_to_h5i2 + 4 r1a2_to_h5i2 + 5 r2a0_to_h5i2 + 17 r3a0_to_h5i2 + 29 r4a0_to_h5i2 + 29 r4a1_to_h5i2 + 29 r4a2_to_h5i2 + 29 r4a3_to_h5i2 + 4 r5a0_to_h5i2 + 5 r6a0_to_h5i2 + 5 r6a1_to_h5i2 + 5 r6a2_to_h5i2 + 5 r6a3_to_h5i2 + 17 r7a0_to_h5i2 + 17 r7a1_to_h5i2 + 17 r7a2_to_h5i2 - 100 h5i2_hdd = 0 + h5i3_mem_use: 4 r0a0_to_h5i3 + 4 r0a1_to_h5i3 + 4 r0a2_to_h5i3 + 4 r0a3_to_h5i3 + 2 r1a0_to_h5i3 + 2 r1a1_to_h5i3 + 2 r1a2_to_h5i3 + 3 r2a0_to_h5i3 + 3 r3a0_to_h5i3 + 4 r4a0_to_h5i3 + 4 r4a1_to_h5i3 + 4 r4a2_to_h5i3 + 4 r4a3_to_h5i3 + 2 r5a0_to_h5i3 + 3 r6a0_to_h5i3 + 3 r6a1_to_h5i3 + 3 r6a2_to_h5i3 + 3 r6a3_to_h5i3 + 3 r7a0_to_h5i3 + 3 r7a1_to_h5i3 + 3 r7a2_to_h5i3 - 8 h5i3_mem = 0 + h5i3_hdd_use: 29 r0a0_to_h5i3 + 29 r0a1_to_h5i3 + 29 r0a2_to_h5i3 + 29 r0a3_to_h5i3 + 4 r1a0_to_h5i3 + 4 r1a1_to_h5i3 + 4 r1a2_to_h5i3 + 5 r2a0_to_h5i3 + 17 r3a0_to_h5i3 + 29 r4a0_to_h5i3 + 29 r4a1_to_h5i3 + 29 r4a2_to_h5i3 + 29 r4a3_to_h5i3 + 4 r5a0_to_h5i3 + 5 r6a0_to_h5i3 + 5 r6a1_to_h5i3 + 5 r6a2_to_h5i3 + 5 r6a3_to_h5i3 + 17 r7a0_to_h5i3 + 17 r7a1_to_h5i3 + 17 r7a2_to_h5i3 - 100 h5i3_hdd = 0 + h5i4_mem_use: 4 r0a0_to_h5i4 + 4 r0a1_to_h5i4 + 4 r0a2_to_h5i4 + 4 r0a3_to_h5i4 + 2 r1a0_to_h5i4 + 2 r1a1_to_h5i4 + 2 r1a2_to_h5i4 + 3 r2a0_to_h5i4 + 3 r3a0_to_h5i4 + 4 r4a0_to_h5i4 + 4 r4a1_to_h5i4 + 4 r4a2_to_h5i4 + 4 r4a3_to_h5i4 + 2 r5a0_to_h5i4 + 3 r6a0_to_h5i4 + 3 r6a1_to_h5i4 + 3 r6a2_to_h5i4 + 3 r6a3_to_h5i4 + 3 r7a0_to_h5i4 + 3 r7a1_to_h5i4 + 3 r7a2_to_h5i4 - 8 h5i4_mem = 0 + h5i4_hdd_use: 29 r0a0_to_h5i4 + 29 r0a1_to_h5i4 + 29 r0a2_to_h5i4 + 29 r0a3_to_h5i4 + 4 r1a0_to_h5i4 + 4 r1a1_to_h5i4 + 4 r1a2_to_h5i4 + 5 r2a0_to_h5i4 + 17 r3a0_to_h5i4 + 29 r4a0_to_h5i4 + 29 r4a1_to_h5i4 + 29 r4a2_to_h5i4 + 29 r4a3_to_h5i4 + 4 r5a0_to_h5i4 + 5 r6a0_to_h5i4 + 5 r6a1_to_h5i4 + 5 r6a2_to_h5i4 + 5 r6a3_to_h5i4 + 17 r7a0_to_h5i4 + 17 r7a1_to_h5i4 + 17 r7a2_to_h5i4 - 100 h5i4_hdd = 0 + h5i5_mem_use: 4 r0a0_to_h5i5 + 4 r0a1_to_h5i5 + 4 r0a2_to_h5i5 + 4 r0a3_to_h5i5 + 2 r1a0_to_h5i5 + 2 r1a1_to_h5i5 + 2 r1a2_to_h5i5 + 3 r2a0_to_h5i5 + 3 r3a0_to_h5i5 + 4 r4a0_to_h5i5 + 4 r4a1_to_h5i5 + 4 r4a2_to_h5i5 + 4 r4a3_to_h5i5 + 2 r5a0_to_h5i5 + 3 r6a0_to_h5i5 + 3 r6a1_to_h5i5 + 3 r6a2_to_h5i5 + 3 r6a3_to_h5i5 + 3 r7a0_to_h5i5 + 3 r7a1_to_h5i5 + 3 r7a2_to_h5i5 - 8 h5i5_mem = 0 + h5i5_hdd_use: 29 r0a0_to_h5i5 + 29 r0a1_to_h5i5 + 29 r0a2_to_h5i5 + 29 r0a3_to_h5i5 + 4 r1a0_to_h5i5 + 4 r1a1_to_h5i5 + 4 r1a2_to_h5i5 + 5 r2a0_to_h5i5 + 17 r3a0_to_h5i5 + 29 r4a0_to_h5i5 + 29 r4a1_to_h5i5 + 29 r4a2_to_h5i5 + 29 r4a3_to_h5i5 + 4 r5a0_to_h5i5 + 5 r6a0_to_h5i5 + 5 r6a1_to_h5i5 + 5 r6a2_to_h5i5 + 5 r6a3_to_h5i5 + 17 r7a0_to_h5i5 + 17 r7a1_to_h5i5 + 17 r7a2_to_h5i5 - 100 h5i5_hdd = 0 + h5i6_mem_use: 4 r0a0_to_h5i6 + 4 r0a1_to_h5i6 + 4 r0a2_to_h5i6 + 4 r0a3_to_h5i6 + 2 r1a0_to_h5i6 + 2 r1a1_to_h5i6 + 2 r1a2_to_h5i6 + 3 r2a0_to_h5i6 + 3 r3a0_to_h5i6 + 4 r4a0_to_h5i6 + 4 r4a1_to_h5i6 + 4 r4a2_to_h5i6 + 4 r4a3_to_h5i6 + 2 r5a0_to_h5i6 + 3 r6a0_to_h5i6 + 3 r6a1_to_h5i6 + 3 r6a2_to_h5i6 + 3 r6a3_to_h5i6 + 3 r7a0_to_h5i6 + 3 r7a1_to_h5i6 + 3 r7a2_to_h5i6 - 8 h5i6_mem = 0 + h5i6_hdd_use: 29 r0a0_to_h5i6 + 29 r0a1_to_h5i6 + 29 r0a2_to_h5i6 + 29 r0a3_to_h5i6 + 4 r1a0_to_h5i6 + 4 r1a1_to_h5i6 + 4 r1a2_to_h5i6 + 5 r2a0_to_h5i6 + 17 r3a0_to_h5i6 + 29 r4a0_to_h5i6 + 29 r4a1_to_h5i6 + 29 r4a2_to_h5i6 + 29 r4a3_to_h5i6 + 4 r5a0_to_h5i6 + 5 r6a0_to_h5i6 + 5 r6a1_to_h5i6 + 5 r6a2_to_h5i6 + 5 r6a3_to_h5i6 + 17 r7a0_to_h5i6 + 17 r7a1_to_h5i6 + 17 r7a2_to_h5i6 - 100 h5i6_hdd = 0 + h5i7_mem_use: 4 r0a0_to_h5i7 + 4 r0a1_to_h5i7 + 4 r0a2_to_h5i7 + 4 r0a3_to_h5i7 + 2 r1a0_to_h5i7 + 2 r1a1_to_h5i7 + 2 r1a2_to_h5i7 + 3 r2a0_to_h5i7 + 3 r3a0_to_h5i7 + 4 r4a0_to_h5i7 + 4 r4a1_to_h5i7 + 4 r4a2_to_h5i7 + 4 r4a3_to_h5i7 + 2 r5a0_to_h5i7 + 3 r6a0_to_h5i7 + 3 r6a1_to_h5i7 + 3 r6a2_to_h5i7 + 3 r6a3_to_h5i7 + 3 r7a0_to_h5i7 + 3 r7a1_to_h5i7 + 3 r7a2_to_h5i7 - 8 h5i7_mem = 0 + h5i7_hdd_use: 29 r0a0_to_h5i7 + 29 r0a1_to_h5i7 + 29 r0a2_to_h5i7 + 29 r0a3_to_h5i7 + 4 r1a0_to_h5i7 + 4 r1a1_to_h5i7 + 4 r1a2_to_h5i7 + 5 r2a0_to_h5i7 + 17 r3a0_to_h5i7 + 29 r4a0_to_h5i7 + 29 r4a1_to_h5i7 + 29 r4a2_to_h5i7 + 29 r4a3_to_h5i7 + 4 r5a0_to_h5i7 + 5 r6a0_to_h5i7 + 5 r6a1_to_h5i7 + 5 r6a2_to_h5i7 + 5 r6a3_to_h5i7 + 17 r7a0_to_h5i7 + 17 r7a1_to_h5i7 + 17 r7a2_to_h5i7 - 100 h5i7_hdd = 0 + h5i8_mem_use: 4 r0a0_to_h5i8 + 4 r0a1_to_h5i8 + 4 r0a2_to_h5i8 + 4 r0a3_to_h5i8 + 2 r1a0_to_h5i8 + 2 r1a1_to_h5i8 + 2 r1a2_to_h5i8 + 3 r2a0_to_h5i8 + 3 r3a0_to_h5i8 + 4 r4a0_to_h5i8 + 4 r4a1_to_h5i8 + 4 r4a2_to_h5i8 + 4 r4a3_to_h5i8 + 2 r5a0_to_h5i8 + 3 r6a0_to_h5i8 + 3 r6a1_to_h5i8 + 3 r6a2_to_h5i8 + 3 r6a3_to_h5i8 + 3 r7a0_to_h5i8 + 3 r7a1_to_h5i8 + 3 r7a2_to_h5i8 - 8 h5i8_mem = 0 + h5i8_hdd_use: 29 r0a0_to_h5i8 + 29 r0a1_to_h5i8 + 29 r0a2_to_h5i8 + 29 r0a3_to_h5i8 + 4 r1a0_to_h5i8 + 4 r1a1_to_h5i8 + 4 r1a2_to_h5i8 + 5 r2a0_to_h5i8 + 17 r3a0_to_h5i8 + 29 r4a0_to_h5i8 + 29 r4a1_to_h5i8 + 29 r4a2_to_h5i8 + 29 r4a3_to_h5i8 + 4 r5a0_to_h5i8 + 5 r6a0_to_h5i8 + 5 r6a1_to_h5i8 + 5 r6a2_to_h5i8 + 5 r6a3_to_h5i8 + 17 r7a0_to_h5i8 + 17 r7a1_to_h5i8 + 17 r7a2_to_h5i8 - 100 h5i8_hdd = 0 + h5i9_mem_use: 4 r0a0_to_h5i9 + 4 r0a1_to_h5i9 + 4 r0a2_to_h5i9 + 4 r0a3_to_h5i9 + 2 r1a0_to_h5i9 + 2 r1a1_to_h5i9 + 2 r1a2_to_h5i9 + 3 r2a0_to_h5i9 + 3 r3a0_to_h5i9 + 4 r4a0_to_h5i9 + 4 r4a1_to_h5i9 + 4 r4a2_to_h5i9 + 4 r4a3_to_h5i9 + 2 r5a0_to_h5i9 + 3 r6a0_to_h5i9 + 3 r6a1_to_h5i9 + 3 r6a2_to_h5i9 + 3 r6a3_to_h5i9 + 3 r7a0_to_h5i9 + 3 r7a1_to_h5i9 + 3 r7a2_to_h5i9 - 8 h5i9_mem = 0 + h5i9_hdd_use: 29 r0a0_to_h5i9 + 29 r0a1_to_h5i9 + 29 r0a2_to_h5i9 + 29 r0a3_to_h5i9 + 4 r1a0_to_h5i9 + 4 r1a1_to_h5i9 + 4 r1a2_to_h5i9 + 5 r2a0_to_h5i9 + 17 r3a0_to_h5i9 + 29 r4a0_to_h5i9 + 29 r4a1_to_h5i9 + 29 r4a2_to_h5i9 + 29 r4a3_to_h5i9 + 4 r5a0_to_h5i9 + 5 r6a0_to_h5i9 + 5 r6a1_to_h5i9 + 5 r6a2_to_h5i9 + 5 r6a3_to_h5i9 + 17 r7a0_to_h5i9 + 17 r7a1_to_h5i9 + 17 r7a2_to_h5i9 - 100 h5i9_hdd = 0 + average_mem: h0i0_mem - 0.25 h0i0_exists + h0i1_mem - 0.25 h0i1_exists + h0i2_mem - 0.25 h0i2_exists + h0i3_mem - 0.25 h0i3_exists + h0i4_mem - 0.25 h0i4_exists + h0i5_mem - 0.25 h0i5_exists + h0i6_mem - 0.25 h0i6_exists + h0i7_mem - 0.25 h0i7_exists + h0i8_mem - 0.25 h0i8_exists + h0i9_mem - 0.25 h0i9_exists + h1i0_mem - 0.25 h1i0_exists + h1i1_mem - 0.25 h1i1_exists + h1i2_mem - 0.25 h1i2_exists + h1i3_mem - 0.25 h1i3_exists + h1i4_mem - 0.25 h1i4_exists + h1i5_mem - 0.25 h1i5_exists + h1i6_mem - 0.25 h1i6_exists + h1i7_mem - 0.25 h1i7_exists + h1i8_mem - 0.25 h1i8_exists + h1i9_mem - 0.25 h1i9_exists + h2i0_mem - 0.25 h2i0_exists + h2i1_mem - 0.25 h2i1_exists + h2i2_mem - 0.25 h2i2_exists + h2i3_mem - 0.25 h2i3_exists + h2i4_mem - 0.25 h2i4_exists + h2i5_mem - 0.25 h2i5_exists + h2i6_mem - 0.25 h2i6_exists + h2i7_mem - 0.25 h2i7_exists + h2i8_mem - 0.25 h2i8_exists + h2i9_mem - 0.25 h2i9_exists + h3i0_mem - 0.25 h3i0_exists + h3i1_mem - 0.25 h3i1_exists + h3i2_mem - 0.25 h3i2_exists + h3i3_mem - 0.25 h3i3_exists + h3i4_mem - 0.25 h3i4_exists + h3i5_mem - 0.25 h3i5_exists + h3i6_mem - 0.25 h3i6_exists + h3i7_mem - 0.25 h3i7_exists + h3i8_mem - 0.25 h3i8_exists + h3i9_mem - 0.25 h3i9_exists + h4i0_mem - 0.25 h4i0_exists + h4i1_mem - 0.25 h4i1_exists + h4i2_mem - 0.25 h4i2_exists + h4i3_mem - 0.25 h4i3_exists + h4i4_mem - 0.25 h4i4_exists + h4i5_mem - 0.25 h4i5_exists + h4i6_mem - 0.25 h4i6_exists + h4i7_mem - 0.25 h4i7_exists + h4i8_mem - 0.25 h4i8_exists + h4i9_mem - 0.25 h4i9_exists + h5i0_mem - 0.25 h5i0_exists + h5i1_mem - 0.25 h5i1_exists + h5i2_mem - 0.25 h5i2_exists + h5i3_mem - 0.25 h5i3_exists + h5i4_mem - 0.25 h5i4_exists + h5i5_mem - 0.25 h5i5_exists + h5i6_mem - 0.25 h5i6_exists + h5i7_mem - 0.25 h5i7_exists + h5i8_mem - 0.25 h5i8_exists + h5i9_mem - 0.25 h5i9_exists >= 0 + average_hdd: h0i0_mem - 0.25 h0i0_exists + h0i1_mem - 0.25 h0i1_exists + h0i2_mem - 0.25 h0i2_exists + h0i3_mem - 0.25 h0i3_exists + h0i4_mem - 0.25 h0i4_exists + h0i5_mem - 0.25 h0i5_exists + h0i6_mem - 0.25 h0i6_exists + h0i7_mem - 0.25 h0i7_exists + h0i8_mem - 0.25 h0i8_exists + h0i9_mem - 0.25 h0i9_exists + h1i0_mem - 0.25 h1i0_exists + h1i1_mem - 0.25 h1i1_exists + h1i2_mem - 0.25 h1i2_exists + h1i3_mem - 0.25 h1i3_exists + h1i4_mem - 0.25 h1i4_exists + h1i5_mem - 0.25 h1i5_exists + h1i6_mem - 0.25 h1i6_exists + h1i7_mem - 0.25 h1i7_exists + h1i8_mem - 0.25 h1i8_exists + h1i9_mem - 0.25 h1i9_exists + h2i0_mem - 0.25 h2i0_exists + h2i1_mem - 0.25 h2i1_exists + h2i2_mem - 0.25 h2i2_exists + h2i3_mem - 0.25 h2i3_exists + h2i4_mem - 0.25 h2i4_exists + h2i5_mem - 0.25 h2i5_exists + h2i6_mem - 0.25 h2i6_exists + h2i7_mem - 0.25 h2i7_exists + h2i8_mem - 0.25 h2i8_exists + h2i9_mem - 0.25 h2i9_exists + h3i0_mem - 0.25 h3i0_exists + h3i1_mem - 0.25 h3i1_exists + h3i2_mem - 0.25 h3i2_exists + h3i3_mem - 0.25 h3i3_exists + h3i4_mem - 0.25 h3i4_exists + h3i5_mem - 0.25 h3i5_exists + h3i6_mem - 0.25 h3i6_exists + h3i7_mem - 0.25 h3i7_exists + h3i8_mem - 0.25 h3i8_exists + h3i9_mem - 0.25 h3i9_exists + h4i0_mem - 0.25 h4i0_exists + h4i1_mem - 0.25 h4i1_exists + h4i2_mem - 0.25 h4i2_exists + h4i3_mem - 0.25 h4i3_exists + h4i4_mem - 0.25 h4i4_exists + h4i5_mem - 0.25 h4i5_exists + h4i6_mem - 0.25 h4i6_exists + h4i7_mem - 0.25 h4i7_exists + h4i8_mem - 0.25 h4i8_exists + h4i9_mem - 0.25 h4i9_exists + h5i0_mem - 0.25 h5i0_exists + h5i1_mem - 0.25 h5i1_exists + h5i2_mem - 0.25 h5i2_exists + h5i3_mem - 0.25 h5i3_exists + h5i4_mem - 0.25 h5i4_exists + h5i5_mem - 0.25 h5i5_exists + h5i6_mem - 0.25 h5i6_exists + h5i7_mem - 0.25 h5i7_exists + h5i8_mem - 0.25 h5i8_exists + h5i9_mem - 0.25 h5i9_exists >= 0 + r0_h4i0_redundant: r0a0_to_h4i0 + r0a1_to_h4i0 + r0a2_to_h4i0 + r0a3_to_h4i0 <= 1 + r0_h4i1_redundant: r0a0_to_h4i1 + r0a1_to_h4i1 + r0a2_to_h4i1 + r0a3_to_h4i1 <= 1 + r0_h4i2_redundant: r0a0_to_h4i2 + r0a1_to_h4i2 + r0a2_to_h4i2 + r0a3_to_h4i2 <= 1 + r0_h4i3_redundant: r0a0_to_h4i3 + r0a1_to_h4i3 + r0a2_to_h4i3 + r0a3_to_h4i3 <= 1 + r0_h4i4_redundant: r0a0_to_h4i4 + r0a1_to_h4i4 + r0a2_to_h4i4 + r0a3_to_h4i4 <= 1 + r0_h4i5_redundant: r0a0_to_h4i5 + r0a1_to_h4i5 + r0a2_to_h4i5 + r0a3_to_h4i5 <= 1 + r0_h4i6_redundant: r0a0_to_h4i6 + r0a1_to_h4i6 + r0a2_to_h4i6 + r0a3_to_h4i6 <= 1 + r0_h4i7_redundant: r0a0_to_h4i7 + r0a1_to_h4i7 + r0a2_to_h4i7 + r0a3_to_h4i7 <= 1 + r0_h4i8_redundant: r0a0_to_h4i8 + r0a1_to_h4i8 + r0a2_to_h4i8 + r0a3_to_h4i8 <= 1 + r0_h4i9_redundant: r0a0_to_h4i9 + r0a1_to_h4i9 + r0a2_to_h4i9 + r0a3_to_h4i9 <= 1 + r0_h5i0_redundant: r0a0_to_h5i0 + r0a1_to_h5i0 + r0a2_to_h5i0 + r0a3_to_h5i0 <= 1 + r0_h5i1_redundant: r0a0_to_h5i1 + r0a1_to_h5i1 + r0a2_to_h5i1 + r0a3_to_h5i1 <= 1 + r0_h5i2_redundant: r0a0_to_h5i2 + r0a1_to_h5i2 + r0a2_to_h5i2 + r0a3_to_h5i2 <= 1 + r0_h5i3_redundant: r0a0_to_h5i3 + r0a1_to_h5i3 + r0a2_to_h5i3 + r0a3_to_h5i3 <= 1 + r0_h5i4_redundant: r0a0_to_h5i4 + r0a1_to_h5i4 + r0a2_to_h5i4 + r0a3_to_h5i4 <= 1 + r0_h5i5_redundant: r0a0_to_h5i5 + r0a1_to_h5i5 + r0a2_to_h5i5 + r0a3_to_h5i5 <= 1 + r0_h5i6_redundant: r0a0_to_h5i6 + r0a1_to_h5i6 + r0a2_to_h5i6 + r0a3_to_h5i6 <= 1 + r0_h5i7_redundant: r0a0_to_h5i7 + r0a1_to_h5i7 + r0a2_to_h5i7 + r0a3_to_h5i7 <= 1 + r0_h5i8_redundant: r0a0_to_h5i8 + r0a1_to_h5i8 + r0a2_to_h5i8 + r0a3_to_h5i8 <= 1 + r0_h5i9_redundant: r0a0_to_h5i9 + r0a1_to_h5i9 + r0a2_to_h5i9 + r0a3_to_h5i9 <= 1 + r1_h0i0_redundant: r1a0_to_h0i0 + r1a1_to_h0i0 + r1a2_to_h0i0 <= 1 + r1_h0i1_redundant: r1a0_to_h0i1 + r1a1_to_h0i1 + r1a2_to_h0i1 <= 1 + r1_h0i2_redundant: r1a0_to_h0i2 + r1a1_to_h0i2 + r1a2_to_h0i2 <= 1 + r1_h0i3_redundant: r1a0_to_h0i3 + r1a1_to_h0i3 + r1a2_to_h0i3 <= 1 + r1_h0i4_redundant: r1a0_to_h0i4 + r1a1_to_h0i4 + r1a2_to_h0i4 <= 1 + r1_h0i5_redundant: r1a0_to_h0i5 + r1a1_to_h0i5 + r1a2_to_h0i5 <= 1 + r1_h0i6_redundant: r1a0_to_h0i6 + r1a1_to_h0i6 + r1a2_to_h0i6 <= 1 + r1_h0i7_redundant: r1a0_to_h0i7 + r1a1_to_h0i7 + r1a2_to_h0i7 <= 1 + r1_h0i8_redundant: r1a0_to_h0i8 + r1a1_to_h0i8 + r1a2_to_h0i8 <= 1 + r1_h0i9_redundant: r1a0_to_h0i9 + r1a1_to_h0i9 + r1a2_to_h0i9 <= 1 + r1_h1i0_redundant: r1a0_to_h1i0 + r1a1_to_h1i0 + r1a2_to_h1i0 <= 1 + r1_h1i1_redundant: r1a0_to_h1i1 + r1a1_to_h1i1 + r1a2_to_h1i1 <= 1 + r1_h1i2_redundant: r1a0_to_h1i2 + r1a1_to_h1i2 + r1a2_to_h1i2 <= 1 + r1_h1i3_redundant: r1a0_to_h1i3 + r1a1_to_h1i3 + r1a2_to_h1i3 <= 1 + r1_h1i4_redundant: r1a0_to_h1i4 + r1a1_to_h1i4 + r1a2_to_h1i4 <= 1 + r1_h1i5_redundant: r1a0_to_h1i5 + r1a1_to_h1i5 + r1a2_to_h1i5 <= 1 + r1_h1i6_redundant: r1a0_to_h1i6 + r1a1_to_h1i6 + r1a2_to_h1i6 <= 1 + r1_h1i7_redundant: r1a0_to_h1i7 + r1a1_to_h1i7 + r1a2_to_h1i7 <= 1 + r1_h1i8_redundant: r1a0_to_h1i8 + r1a1_to_h1i8 + r1a2_to_h1i8 <= 1 + r1_h1i9_redundant: r1a0_to_h1i9 + r1a1_to_h1i9 + r1a2_to_h1i9 <= 1 + r1_h2i0_redundant: r1a0_to_h2i0 + r1a1_to_h2i0 + r1a2_to_h2i0 <= 1 + r1_h2i1_redundant: r1a0_to_h2i1 + r1a1_to_h2i1 + r1a2_to_h2i1 <= 1 + r1_h2i2_redundant: r1a0_to_h2i2 + r1a1_to_h2i2 + r1a2_to_h2i2 <= 1 + r1_h2i3_redundant: r1a0_to_h2i3 + r1a1_to_h2i3 + r1a2_to_h2i3 <= 1 + r1_h2i4_redundant: r1a0_to_h2i4 + r1a1_to_h2i4 + r1a2_to_h2i4 <= 1 + r1_h2i5_redundant: r1a0_to_h2i5 + r1a1_to_h2i5 + r1a2_to_h2i5 <= 1 + r1_h2i6_redundant: r1a0_to_h2i6 + r1a1_to_h2i6 + r1a2_to_h2i6 <= 1 + r1_h2i7_redundant: r1a0_to_h2i7 + r1a1_to_h2i7 + r1a2_to_h2i7 <= 1 + r1_h2i8_redundant: r1a0_to_h2i8 + r1a1_to_h2i8 + r1a2_to_h2i8 <= 1 + r1_h2i9_redundant: r1a0_to_h2i9 + r1a1_to_h2i9 + r1a2_to_h2i9 <= 1 + r1_h3i0_redundant: r1a0_to_h3i0 + r1a1_to_h3i0 + r1a2_to_h3i0 <= 1 + r1_h3i1_redundant: r1a0_to_h3i1 + r1a1_to_h3i1 + r1a2_to_h3i1 <= 1 + r1_h3i2_redundant: r1a0_to_h3i2 + r1a1_to_h3i2 + r1a2_to_h3i2 <= 1 + r1_h3i3_redundant: r1a0_to_h3i3 + r1a1_to_h3i3 + r1a2_to_h3i3 <= 1 + r1_h3i4_redundant: r1a0_to_h3i4 + r1a1_to_h3i4 + r1a2_to_h3i4 <= 1 + r1_h3i5_redundant: r1a0_to_h3i5 + r1a1_to_h3i5 + r1a2_to_h3i5 <= 1 + r1_h3i6_redundant: r1a0_to_h3i6 + r1a1_to_h3i6 + r1a2_to_h3i6 <= 1 + r1_h3i7_redundant: r1a0_to_h3i7 + r1a1_to_h3i7 + r1a2_to_h3i7 <= 1 + r1_h3i8_redundant: r1a0_to_h3i8 + r1a1_to_h3i8 + r1a2_to_h3i8 <= 1 + r1_h3i9_redundant: r1a0_to_h3i9 + r1a1_to_h3i9 + r1a2_to_h3i9 <= 1 + r1_h4i0_redundant: r1a0_to_h4i0 + r1a1_to_h4i0 + r1a2_to_h4i0 <= 1 + r1_h4i1_redundant: r1a0_to_h4i1 + r1a1_to_h4i1 + r1a2_to_h4i1 <= 1 + r1_h4i2_redundant: r1a0_to_h4i2 + r1a1_to_h4i2 + r1a2_to_h4i2 <= 1 + r1_h4i3_redundant: r1a0_to_h4i3 + r1a1_to_h4i3 + r1a2_to_h4i3 <= 1 + r1_h4i4_redundant: r1a0_to_h4i4 + r1a1_to_h4i4 + r1a2_to_h4i4 <= 1 + r1_h4i5_redundant: r1a0_to_h4i5 + r1a1_to_h4i5 + r1a2_to_h4i5 <= 1 + r1_h4i6_redundant: r1a0_to_h4i6 + r1a1_to_h4i6 + r1a2_to_h4i6 <= 1 + r1_h4i7_redundant: r1a0_to_h4i7 + r1a1_to_h4i7 + r1a2_to_h4i7 <= 1 + r1_h4i8_redundant: r1a0_to_h4i8 + r1a1_to_h4i8 + r1a2_to_h4i8 <= 1 + r1_h4i9_redundant: r1a0_to_h4i9 + r1a1_to_h4i9 + r1a2_to_h4i9 <= 1 + r1_h5i0_redundant: r1a0_to_h5i0 + r1a1_to_h5i0 + r1a2_to_h5i0 <= 1 + r1_h5i1_redundant: r1a0_to_h5i1 + r1a1_to_h5i1 + r1a2_to_h5i1 <= 1 + r1_h5i2_redundant: r1a0_to_h5i2 + r1a1_to_h5i2 + r1a2_to_h5i2 <= 1 + r1_h5i3_redundant: r1a0_to_h5i3 + r1a1_to_h5i3 + r1a2_to_h5i3 <= 1 + r1_h5i4_redundant: r1a0_to_h5i4 + r1a1_to_h5i4 + r1a2_to_h5i4 <= 1 + r1_h5i5_redundant: r1a0_to_h5i5 + r1a1_to_h5i5 + r1a2_to_h5i5 <= 1 + r1_h5i6_redundant: r1a0_to_h5i6 + r1a1_to_h5i6 + r1a2_to_h5i6 <= 1 + r1_h5i7_redundant: r1a0_to_h5i7 + r1a1_to_h5i7 + r1a2_to_h5i7 <= 1 + r1_h5i8_redundant: r1a0_to_h5i8 + r1a1_to_h5i8 + r1a2_to_h5i8 <= 1 + r1_h5i9_redundant: r1a0_to_h5i9 + r1a1_to_h5i9 + r1a2_to_h5i9 <= 1 + r2_h4i0_redundant: r4a0_to_h4i0 + r4a1_to_h4i0 + r4a2_to_h4i0 + r4a3_to_h4i0 <= 1 + r2_h4i1_redundant: r4a0_to_h4i1 + r4a1_to_h4i1 + r4a2_to_h4i1 + r4a3_to_h4i1 <= 1 + r2_h4i2_redundant: r4a0_to_h4i2 + r4a1_to_h4i2 + r4a2_to_h4i2 + r4a3_to_h4i2 <= 1 + r2_h4i3_redundant: r4a0_to_h4i3 + r4a1_to_h4i3 + r4a2_to_h4i3 + r4a3_to_h4i3 <= 1 + r2_h4i4_redundant: r4a0_to_h4i4 + r4a1_to_h4i4 + r4a2_to_h4i4 + r4a3_to_h4i4 <= 1 + r2_h4i5_redundant: r4a0_to_h4i5 + r4a1_to_h4i5 + r4a2_to_h4i5 + r4a3_to_h4i5 <= 1 + r2_h4i6_redundant: r4a0_to_h4i6 + r4a1_to_h4i6 + r4a2_to_h4i6 + r4a3_to_h4i6 <= 1 + r2_h4i7_redundant: r4a0_to_h4i7 + r4a1_to_h4i7 + r4a2_to_h4i7 + r4a3_to_h4i7 <= 1 + r2_h4i8_redundant: r4a0_to_h4i8 + r4a1_to_h4i8 + r4a2_to_h4i8 + r4a3_to_h4i8 <= 1 + r2_h4i9_redundant: r4a0_to_h4i9 + r4a1_to_h4i9 + r4a2_to_h4i9 + r4a3_to_h4i9 <= 1 + r2_h5i0_redundant: r4a0_to_h5i0 + r4a1_to_h5i0 + r4a2_to_h5i0 + r4a3_to_h5i0 <= 1 + r2_h5i1_redundant: r4a0_to_h5i1 + r4a1_to_h5i1 + r4a2_to_h5i1 + r4a3_to_h5i1 <= 1 + r2_h5i2_redundant: r4a0_to_h5i2 + r4a1_to_h5i2 + r4a2_to_h5i2 + r4a3_to_h5i2 <= 1 + r2_h5i3_redundant: r4a0_to_h5i3 + r4a1_to_h5i3 + r4a2_to_h5i3 + r4a3_to_h5i3 <= 1 + r2_h5i4_redundant: r4a0_to_h5i4 + r4a1_to_h5i4 + r4a2_to_h5i4 + r4a3_to_h5i4 <= 1 + r2_h5i5_redundant: r4a0_to_h5i5 + r4a1_to_h5i5 + r4a2_to_h5i5 + r4a3_to_h5i5 <= 1 + r2_h5i6_redundant: r4a0_to_h5i6 + r4a1_to_h5i6 + r4a2_to_h5i6 + r4a3_to_h5i6 <= 1 + r2_h5i7_redundant: r4a0_to_h5i7 + r4a1_to_h5i7 + r4a2_to_h5i7 + r4a3_to_h5i7 <= 1 + r2_h5i8_redundant: r4a0_to_h5i8 + r4a1_to_h5i8 + r4a2_to_h5i8 + r4a3_to_h5i8 <= 1 + r2_h5i9_redundant: r4a0_to_h5i9 + r4a1_to_h5i9 + r4a2_to_h5i9 + r4a3_to_h5i9 <= 1 + r3_h0i0_redundant: r6a0_to_h0i0 + r6a1_to_h0i0 + r6a2_to_h0i0 + r6a3_to_h0i0 <= 1 + r3_h0i1_redundant: r6a0_to_h0i1 + r6a1_to_h0i1 + r6a2_to_h0i1 + r6a3_to_h0i1 <= 1 + r3_h0i2_redundant: r6a0_to_h0i2 + r6a1_to_h0i2 + r6a2_to_h0i2 + r6a3_to_h0i2 <= 1 + r3_h0i3_redundant: r6a0_to_h0i3 + r6a1_to_h0i3 + r6a2_to_h0i3 + r6a3_to_h0i3 <= 1 + r3_h0i4_redundant: r6a0_to_h0i4 + r6a1_to_h0i4 + r6a2_to_h0i4 + r6a3_to_h0i4 <= 1 + r3_h0i5_redundant: r6a0_to_h0i5 + r6a1_to_h0i5 + r6a2_to_h0i5 + r6a3_to_h0i5 <= 1 + r3_h0i6_redundant: r6a0_to_h0i6 + r6a1_to_h0i6 + r6a2_to_h0i6 + r6a3_to_h0i6 <= 1 + r3_h0i7_redundant: r6a0_to_h0i7 + r6a1_to_h0i7 + r6a2_to_h0i7 + r6a3_to_h0i7 <= 1 + r3_h0i8_redundant: r6a0_to_h0i8 + r6a1_to_h0i8 + r6a2_to_h0i8 + r6a3_to_h0i8 <= 1 + r3_h0i9_redundant: r6a0_to_h0i9 + r6a1_to_h0i9 + r6a2_to_h0i9 + r6a3_to_h0i9 <= 1 + r3_h1i0_redundant: r6a0_to_h1i0 + r6a1_to_h1i0 + r6a2_to_h1i0 + r6a3_to_h1i0 <= 1 + r3_h1i1_redundant: r6a0_to_h1i1 + r6a1_to_h1i1 + r6a2_to_h1i1 + r6a3_to_h1i1 <= 1 + r3_h1i2_redundant: r6a0_to_h1i2 + r6a1_to_h1i2 + r6a2_to_h1i2 + r6a3_to_h1i2 <= 1 + r3_h1i3_redundant: r6a0_to_h1i3 + r6a1_to_h1i3 + r6a2_to_h1i3 + r6a3_to_h1i3 <= 1 + r3_h1i4_redundant: r6a0_to_h1i4 + r6a1_to_h1i4 + r6a2_to_h1i4 + r6a3_to_h1i4 <= 1 + r3_h1i5_redundant: r6a0_to_h1i5 + r6a1_to_h1i5 + r6a2_to_h1i5 + r6a3_to_h1i5 <= 1 + r3_h1i6_redundant: r6a0_to_h1i6 + r6a1_to_h1i6 + r6a2_to_h1i6 + r6a3_to_h1i6 <= 1 + r3_h1i7_redundant: r6a0_to_h1i7 + r6a1_to_h1i7 + r6a2_to_h1i7 + r6a3_to_h1i7 <= 1 + r3_h1i8_redundant: r6a0_to_h1i8 + r6a1_to_h1i8 + r6a2_to_h1i8 + r6a3_to_h1i8 <= 1 + r3_h1i9_redundant: r6a0_to_h1i9 + r6a1_to_h1i9 + r6a2_to_h1i9 + r6a3_to_h1i9 <= 1 + r3_h2i0_redundant: r6a0_to_h2i0 + r6a1_to_h2i0 + r6a2_to_h2i0 + r6a3_to_h2i0 <= 1 + r3_h2i1_redundant: r6a0_to_h2i1 + r6a1_to_h2i1 + r6a2_to_h2i1 + r6a3_to_h2i1 <= 1 + r3_h2i2_redundant: r6a0_to_h2i2 + r6a1_to_h2i2 + r6a2_to_h2i2 + r6a3_to_h2i2 <= 1 + r3_h2i3_redundant: r6a0_to_h2i3 + r6a1_to_h2i3 + r6a2_to_h2i3 + r6a3_to_h2i3 <= 1 + r3_h2i4_redundant: r6a0_to_h2i4 + r6a1_to_h2i4 + r6a2_to_h2i4 + r6a3_to_h2i4 <= 1 + r3_h2i5_redundant: r6a0_to_h2i5 + r6a1_to_h2i5 + r6a2_to_h2i5 + r6a3_to_h2i5 <= 1 + r3_h2i6_redundant: r6a0_to_h2i6 + r6a1_to_h2i6 + r6a2_to_h2i6 + r6a3_to_h2i6 <= 1 + r3_h2i7_redundant: r6a0_to_h2i7 + r6a1_to_h2i7 + r6a2_to_h2i7 + r6a3_to_h2i7 <= 1 + r3_h2i8_redundant: r6a0_to_h2i8 + r6a1_to_h2i8 + r6a2_to_h2i8 + r6a3_to_h2i8 <= 1 + r3_h2i9_redundant: r6a0_to_h2i9 + r6a1_to_h2i9 + r6a2_to_h2i9 + r6a3_to_h2i9 <= 1 + r3_h3i0_redundant: r6a0_to_h3i0 + r6a1_to_h3i0 + r6a2_to_h3i0 + r6a3_to_h3i0 <= 1 + r3_h3i1_redundant: r6a0_to_h3i1 + r6a1_to_h3i1 + r6a2_to_h3i1 + r6a3_to_h3i1 <= 1 + r3_h3i2_redundant: r6a0_to_h3i2 + r6a1_to_h3i2 + r6a2_to_h3i2 + r6a3_to_h3i2 <= 1 + r3_h3i3_redundant: r6a0_to_h3i3 + r6a1_to_h3i3 + r6a2_to_h3i3 + r6a3_to_h3i3 <= 1 + r3_h3i4_redundant: r6a0_to_h3i4 + r6a1_to_h3i4 + r6a2_to_h3i4 + r6a3_to_h3i4 <= 1 + r3_h3i5_redundant: r6a0_to_h3i5 + r6a1_to_h3i5 + r6a2_to_h3i5 + r6a3_to_h3i5 <= 1 + r3_h3i6_redundant: r6a0_to_h3i6 + r6a1_to_h3i6 + r6a2_to_h3i6 + r6a3_to_h3i6 <= 1 + r3_h3i7_redundant: r6a0_to_h3i7 + r6a1_to_h3i7 + r6a2_to_h3i7 + r6a3_to_h3i7 <= 1 + r3_h3i8_redundant: r6a0_to_h3i8 + r6a1_to_h3i8 + r6a2_to_h3i8 + r6a3_to_h3i8 <= 1 + r3_h3i9_redundant: r6a0_to_h3i9 + r6a1_to_h3i9 + r6a2_to_h3i9 + r6a3_to_h3i9 <= 1 + r3_h4i0_redundant: r6a0_to_h4i0 + r6a1_to_h4i0 + r6a2_to_h4i0 + r6a3_to_h4i0 <= 1 + r3_h4i1_redundant: r6a0_to_h4i1 + r6a1_to_h4i1 + r6a2_to_h4i1 + r6a3_to_h4i1 <= 1 + r3_h4i2_redundant: r6a0_to_h4i2 + r6a1_to_h4i2 + r6a2_to_h4i2 + r6a3_to_h4i2 <= 1 + r3_h4i3_redundant: r6a0_to_h4i3 + r6a1_to_h4i3 + r6a2_to_h4i3 + r6a3_to_h4i3 <= 1 + r3_h4i4_redundant: r6a0_to_h4i4 + r6a1_to_h4i4 + r6a2_to_h4i4 + r6a3_to_h4i4 <= 1 + r3_h4i5_redundant: r6a0_to_h4i5 + r6a1_to_h4i5 + r6a2_to_h4i5 + r6a3_to_h4i5 <= 1 + r3_h4i6_redundant: r6a0_to_h4i6 + r6a1_to_h4i6 + r6a2_to_h4i6 + r6a3_to_h4i6 <= 1 + r3_h4i7_redundant: r6a0_to_h4i7 + r6a1_to_h4i7 + r6a2_to_h4i7 + r6a3_to_h4i7 <= 1 + r3_h4i8_redundant: r6a0_to_h4i8 + r6a1_to_h4i8 + r6a2_to_h4i8 + r6a3_to_h4i8 <= 1 + r3_h4i9_redundant: r6a0_to_h4i9 + r6a1_to_h4i9 + r6a2_to_h4i9 + r6a3_to_h4i9 <= 1 + r3_h5i0_redundant: r6a0_to_h5i0 + r6a1_to_h5i0 + r6a2_to_h5i0 + r6a3_to_h5i0 <= 1 + r3_h5i1_redundant: r6a0_to_h5i1 + r6a1_to_h5i1 + r6a2_to_h5i1 + r6a3_to_h5i1 <= 1 + r3_h5i2_redundant: r6a0_to_h5i2 + r6a1_to_h5i2 + r6a2_to_h5i2 + r6a3_to_h5i2 <= 1 + r3_h5i3_redundant: r6a0_to_h5i3 + r6a1_to_h5i3 + r6a2_to_h5i3 + r6a3_to_h5i3 <= 1 + r3_h5i4_redundant: r6a0_to_h5i4 + r6a1_to_h5i4 + r6a2_to_h5i4 + r6a3_to_h5i4 <= 1 + r3_h5i5_redundant: r6a0_to_h5i5 + r6a1_to_h5i5 + r6a2_to_h5i5 + r6a3_to_h5i5 <= 1 + r3_h5i6_redundant: r6a0_to_h5i6 + r6a1_to_h5i6 + r6a2_to_h5i6 + r6a3_to_h5i6 <= 1 + r3_h5i7_redundant: r6a0_to_h5i7 + r6a1_to_h5i7 + r6a2_to_h5i7 + r6a3_to_h5i7 <= 1 + r3_h5i8_redundant: r6a0_to_h5i8 + r6a1_to_h5i8 + r6a2_to_h5i8 + r6a3_to_h5i8 <= 1 + r3_h5i9_redundant: r6a0_to_h5i9 + r6a1_to_h5i9 + r6a2_to_h5i9 + r6a3_to_h5i9 <= 1 + r4_h0i0_redundant: r7a0_to_h0i0 + r7a1_to_h0i0 + r7a2_to_h0i0 <= 1 + r4_h0i1_redundant: r7a0_to_h0i1 + r7a1_to_h0i1 + r7a2_to_h0i1 <= 1 + r4_h0i2_redundant: r7a0_to_h0i2 + r7a1_to_h0i2 + r7a2_to_h0i2 <= 1 + r4_h0i3_redundant: r7a0_to_h0i3 + r7a1_to_h0i3 + r7a2_to_h0i3 <= 1 + r4_h0i4_redundant: r7a0_to_h0i4 + r7a1_to_h0i4 + r7a2_to_h0i4 <= 1 + r4_h0i5_redundant: r7a0_to_h0i5 + r7a1_to_h0i5 + r7a2_to_h0i5 <= 1 + r4_h0i6_redundant: r7a0_to_h0i6 + r7a1_to_h0i6 + r7a2_to_h0i6 <= 1 + r4_h0i7_redundant: r7a0_to_h0i7 + r7a1_to_h0i7 + r7a2_to_h0i7 <= 1 + r4_h0i8_redundant: r7a0_to_h0i8 + r7a1_to_h0i8 + r7a2_to_h0i8 <= 1 + r4_h0i9_redundant: r7a0_to_h0i9 + r7a1_to_h0i9 + r7a2_to_h0i9 <= 1 + r4_h1i0_redundant: r7a0_to_h1i0 + r7a1_to_h1i0 + r7a2_to_h1i0 <= 1 + r4_h1i1_redundant: r7a0_to_h1i1 + r7a1_to_h1i1 + r7a2_to_h1i1 <= 1 + r4_h1i2_redundant: r7a0_to_h1i2 + r7a1_to_h1i2 + r7a2_to_h1i2 <= 1 + r4_h1i3_redundant: r7a0_to_h1i3 + r7a1_to_h1i3 + r7a2_to_h1i3 <= 1 + r4_h1i4_redundant: r7a0_to_h1i4 + r7a1_to_h1i4 + r7a2_to_h1i4 <= 1 + r4_h1i5_redundant: r7a0_to_h1i5 + r7a1_to_h1i5 + r7a2_to_h1i5 <= 1 + r4_h1i6_redundant: r7a0_to_h1i6 + r7a1_to_h1i6 + r7a2_to_h1i6 <= 1 + r4_h1i7_redundant: r7a0_to_h1i7 + r7a1_to_h1i7 + r7a2_to_h1i7 <= 1 + r4_h1i8_redundant: r7a0_to_h1i8 + r7a1_to_h1i8 + r7a2_to_h1i8 <= 1 + r4_h1i9_redundant: r7a0_to_h1i9 + r7a1_to_h1i9 + r7a2_to_h1i9 <= 1 + r4_h2i0_redundant: r7a0_to_h2i0 + r7a1_to_h2i0 + r7a2_to_h2i0 <= 1 + r4_h2i1_redundant: r7a0_to_h2i1 + r7a1_to_h2i1 + r7a2_to_h2i1 <= 1 + r4_h2i2_redundant: r7a0_to_h2i2 + r7a1_to_h2i2 + r7a2_to_h2i2 <= 1 + r4_h2i3_redundant: r7a0_to_h2i3 + r7a1_to_h2i3 + r7a2_to_h2i3 <= 1 + r4_h2i4_redundant: r7a0_to_h2i4 + r7a1_to_h2i4 + r7a2_to_h2i4 <= 1 + r4_h2i5_redundant: r7a0_to_h2i5 + r7a1_to_h2i5 + r7a2_to_h2i5 <= 1 + r4_h2i6_redundant: r7a0_to_h2i6 + r7a1_to_h2i6 + r7a2_to_h2i6 <= 1 + r4_h2i7_redundant: r7a0_to_h2i7 + r7a1_to_h2i7 + r7a2_to_h2i7 <= 1 + r4_h2i8_redundant: r7a0_to_h2i8 + r7a1_to_h2i8 + r7a2_to_h2i8 <= 1 + r4_h2i9_redundant: r7a0_to_h2i9 + r7a1_to_h2i9 + r7a2_to_h2i9 <= 1 + r4_h3i0_redundant: r7a0_to_h3i0 + r7a1_to_h3i0 + r7a2_to_h3i0 <= 1 + r4_h3i1_redundant: r7a0_to_h3i1 + r7a1_to_h3i1 + r7a2_to_h3i1 <= 1 + r4_h3i2_redundant: r7a0_to_h3i2 + r7a1_to_h3i2 + r7a2_to_h3i2 <= 1 + r4_h3i3_redundant: r7a0_to_h3i3 + r7a1_to_h3i3 + r7a2_to_h3i3 <= 1 + r4_h3i4_redundant: r7a0_to_h3i4 + r7a1_to_h3i4 + r7a2_to_h3i4 <= 1 + r4_h3i5_redundant: r7a0_to_h3i5 + r7a1_to_h3i5 + r7a2_to_h3i5 <= 1 + r4_h3i6_redundant: r7a0_to_h3i6 + r7a1_to_h3i6 + r7a2_to_h3i6 <= 1 + r4_h3i7_redundant: r7a0_to_h3i7 + r7a1_to_h3i7 + r7a2_to_h3i7 <= 1 + r4_h3i8_redundant: r7a0_to_h3i8 + r7a1_to_h3i8 + r7a2_to_h3i8 <= 1 + r4_h3i9_redundant: r7a0_to_h3i9 + r7a1_to_h3i9 + r7a2_to_h3i9 <= 1 + r4_h4i0_redundant: r7a0_to_h4i0 + r7a1_to_h4i0 + r7a2_to_h4i0 <= 1 + r4_h4i1_redundant: r7a0_to_h4i1 + r7a1_to_h4i1 + r7a2_to_h4i1 <= 1 + r4_h4i2_redundant: r7a0_to_h4i2 + r7a1_to_h4i2 + r7a2_to_h4i2 <= 1 + r4_h4i3_redundant: r7a0_to_h4i3 + r7a1_to_h4i3 + r7a2_to_h4i3 <= 1 + r4_h4i4_redundant: r7a0_to_h4i4 + r7a1_to_h4i4 + r7a2_to_h4i4 <= 1 + r4_h4i5_redundant: r7a0_to_h4i5 + r7a1_to_h4i5 + r7a2_to_h4i5 <= 1 + r4_h4i6_redundant: r7a0_to_h4i6 + r7a1_to_h4i6 + r7a2_to_h4i6 <= 1 + r4_h4i7_redundant: r7a0_to_h4i7 + r7a1_to_h4i7 + r7a2_to_h4i7 <= 1 + r4_h4i8_redundant: r7a0_to_h4i8 + r7a1_to_h4i8 + r7a2_to_h4i8 <= 1 + r4_h4i9_redundant: r7a0_to_h4i9 + r7a1_to_h4i9 + r7a2_to_h4i9 <= 1 + r4_h5i0_redundant: r7a0_to_h5i0 + r7a1_to_h5i0 + r7a2_to_h5i0 <= 1 + r4_h5i1_redundant: r7a0_to_h5i1 + r7a1_to_h5i1 + r7a2_to_h5i1 <= 1 + r4_h5i2_redundant: r7a0_to_h5i2 + r7a1_to_h5i2 + r7a2_to_h5i2 <= 1 + r4_h5i3_redundant: r7a0_to_h5i3 + r7a1_to_h5i3 + r7a2_to_h5i3 <= 1 + r4_h5i4_redundant: r7a0_to_h5i4 + r7a1_to_h5i4 + r7a2_to_h5i4 <= 1 + r4_h5i5_redundant: r7a0_to_h5i5 + r7a1_to_h5i5 + r7a2_to_h5i5 <= 1 + r4_h5i6_redundant: r7a0_to_h5i6 + r7a1_to_h5i6 + r7a2_to_h5i6 <= 1 + r4_h5i7_redundant: r7a0_to_h5i7 + r7a1_to_h5i7 + r7a2_to_h5i7 <= 1 + r4_h5i8_redundant: r7a0_to_h5i8 + r7a1_to_h5i8 + r7a2_to_h5i8 <= 1 + r4_h5i9_redundant: r7a0_to_h5i9 + r7a1_to_h5i9 + r7a2_to_h5i9 <= 1 + h0i1_after_h0i0: h0i0_exists - h0i1_exists >= 0 + h0i2_after_h0i1: h0i1_exists - h0i2_exists >= 0 + h0i3_after_h0i2: h0i2_exists - h0i3_exists >= 0 + h0i4_after_h0i3: h0i3_exists - h0i4_exists >= 0 + h0i5_after_h0i4: h0i4_exists - h0i5_exists >= 0 + h0i6_after_h0i5: h0i5_exists - h0i6_exists >= 0 + h0i7_after_h0i6: h0i6_exists - h0i7_exists >= 0 + h0i8_after_h0i7: h0i7_exists - h0i8_exists >= 0 + h0i9_after_h0i8: h0i8_exists - h0i9_exists >= 0 + h1i1_after_h1i0: h1i0_exists - h1i1_exists >= 0 + h1i2_after_h1i1: h1i1_exists - h1i2_exists >= 0 + h1i3_after_h1i2: h1i2_exists - h1i3_exists >= 0 + h1i4_after_h1i3: h1i3_exists - h1i4_exists >= 0 + h1i5_after_h1i4: h1i4_exists - h1i5_exists >= 0 + h1i6_after_h1i5: h1i5_exists - h1i6_exists >= 0 + h1i7_after_h1i6: h1i6_exists - h1i7_exists >= 0 + h1i8_after_h1i7: h1i7_exists - h1i8_exists >= 0 + h1i9_after_h1i8: h1i8_exists - h1i9_exists >= 0 + h2i1_after_h2i0: h2i0_exists - h2i1_exists >= 0 + h2i2_after_h2i1: h2i1_exists - h2i2_exists >= 0 + h2i3_after_h2i2: h2i2_exists - h2i3_exists >= 0 + h2i4_after_h2i3: h2i3_exists - h2i4_exists >= 0 + h2i5_after_h2i4: h2i4_exists - h2i5_exists >= 0 + h2i6_after_h2i5: h2i5_exists - h2i6_exists >= 0 + h2i7_after_h2i6: h2i6_exists - h2i7_exists >= 0 + h2i8_after_h2i7: h2i7_exists - h2i8_exists >= 0 + h2i9_after_h2i8: h2i8_exists - h2i9_exists >= 0 + h3i1_after_h3i0: h3i0_exists - h3i1_exists >= 0 + h3i2_after_h3i1: h3i1_exists - h3i2_exists >= 0 + h3i3_after_h3i2: h3i2_exists - h3i3_exists >= 0 + h3i4_after_h3i3: h3i3_exists - h3i4_exists >= 0 + h3i5_after_h3i4: h3i4_exists - h3i5_exists >= 0 + h3i6_after_h3i5: h3i5_exists - h3i6_exists >= 0 + h3i7_after_h3i6: h3i6_exists - h3i7_exists >= 0 + h3i8_after_h3i7: h3i7_exists - h3i8_exists >= 0 + h3i9_after_h3i8: h3i8_exists - h3i9_exists >= 0 + h4i1_after_h4i0: h4i0_exists - h4i1_exists >= 0 + h4i2_after_h4i1: h4i1_exists - h4i2_exists >= 0 + h4i3_after_h4i2: h4i2_exists - h4i3_exists >= 0 + h4i4_after_h4i3: h4i3_exists - h4i4_exists >= 0 + h4i5_after_h4i4: h4i4_exists - h4i5_exists >= 0 + h4i6_after_h4i5: h4i5_exists - h4i6_exists >= 0 + h4i7_after_h4i6: h4i6_exists - h4i7_exists >= 0 + h4i8_after_h4i7: h4i7_exists - h4i8_exists >= 0 + h4i9_after_h4i8: h4i8_exists - h4i9_exists >= 0 + h5i1_after_h5i0: h5i0_exists - h5i1_exists >= 0 + h5i2_after_h5i1: h5i1_exists - h5i2_exists >= 0 + h5i3_after_h5i2: h5i2_exists - h5i3_exists >= 0 + h5i4_after_h5i3: h5i3_exists - h5i4_exists >= 0 + h5i5_after_h5i4: h5i4_exists - h5i5_exists >= 0 + h5i6_after_h5i5: h5i5_exists - h5i6_exists >= 0 + h5i7_after_h5i6: h5i6_exists - h5i7_exists >= 0 + h5i8_after_h5i7: h5i7_exists - h5i8_exists >= 0 + h5i9_after_h5i8: h5i8_exists - h5i9_exists >= 0 +Bounds + 0 <= h0i0_mem <= 1 + 0 <= h0i0_hdd <= 1 + 0 <= h0i1_mem <= 1 + 0 <= h0i1_hdd <= 1 + 0 <= h0i2_mem <= 1 + 0 <= h0i2_hdd <= 1 + 0 <= h0i3_mem <= 1 + 0 <= h0i3_hdd <= 1 + 0 <= h0i4_mem <= 1 + 0 <= h0i4_hdd <= 1 + 0 <= h0i5_mem <= 1 + 0 <= h0i5_hdd <= 1 + 0 <= h0i6_mem <= 1 + 0 <= h0i6_hdd <= 1 + 0 <= h0i7_mem <= 1 + 0 <= h0i7_hdd <= 1 + 0 <= h0i8_mem <= 1 + 0 <= h0i8_hdd <= 1 + 0 <= h0i9_mem <= 1 + 0 <= h0i9_hdd <= 1 + 0 <= h1i0_mem <= 1 + 0 <= h1i0_hdd <= 1 + 0 <= h1i1_mem <= 1 + 0 <= h1i1_hdd <= 1 + 0 <= h1i2_mem <= 1 + 0 <= h1i2_hdd <= 1 + 0 <= h1i3_mem <= 1 + 0 <= h1i3_hdd <= 1 + 0 <= h1i4_mem <= 1 + 0 <= h1i4_hdd <= 1 + 0 <= h1i5_mem <= 1 + 0 <= h1i5_hdd <= 1 + 0 <= h1i6_mem <= 1 + 0 <= h1i6_hdd <= 1 + 0 <= h1i7_mem <= 1 + 0 <= h1i7_hdd <= 1 + 0 <= h1i8_mem <= 1 + 0 <= h1i8_hdd <= 1 + 0 <= h1i9_mem <= 1 + 0 <= h1i9_hdd <= 1 + 0 <= h2i0_mem <= 1 + 0 <= h2i0_hdd <= 1 + 0 <= h2i1_mem <= 1 + 0 <= h2i1_hdd <= 1 + 0 <= h2i2_mem <= 1 + 0 <= h2i2_hdd <= 1 + 0 <= h2i3_mem <= 1 + 0 <= h2i3_hdd <= 1 + 0 <= h2i4_mem <= 1 + 0 <= h2i4_hdd <= 1 + 0 <= h2i5_mem <= 1 + 0 <= h2i5_hdd <= 1 + 0 <= h2i6_mem <= 1 + 0 <= h2i6_hdd <= 1 + 0 <= h2i7_mem <= 1 + 0 <= h2i7_hdd <= 1 + 0 <= h2i8_mem <= 1 + 0 <= h2i8_hdd <= 1 + 0 <= h2i9_mem <= 1 + 0 <= h2i9_hdd <= 1 + 0 <= h3i0_mem <= 1 + 0 <= h3i0_hdd <= 1 + 0 <= h3i1_mem <= 1 + 0 <= h3i1_hdd <= 1 + 0 <= h3i2_mem <= 1 + 0 <= h3i2_hdd <= 1 + 0 <= h3i3_mem <= 1 + 0 <= h3i3_hdd <= 1 + 0 <= h3i4_mem <= 1 + 0 <= h3i4_hdd <= 1 + 0 <= h3i5_mem <= 1 + 0 <= h3i5_hdd <= 1 + 0 <= h3i6_mem <= 1 + 0 <= h3i6_hdd <= 1 + 0 <= h3i7_mem <= 1 + 0 <= h3i7_hdd <= 1 + 0 <= h3i8_mem <= 1 + 0 <= h3i8_hdd <= 1 + 0 <= h3i9_mem <= 1 + 0 <= h3i9_hdd <= 1 + 0 <= h4i0_mem <= 1 + 0 <= h4i0_hdd <= 1 + 0 <= h4i1_mem <= 1 + 0 <= h4i1_hdd <= 1 + 0 <= h4i2_mem <= 1 + 0 <= h4i2_hdd <= 1 + 0 <= h4i3_mem <= 1 + 0 <= h4i3_hdd <= 1 + 0 <= h4i4_mem <= 1 + 0 <= h4i4_hdd <= 1 + 0 <= h4i5_mem <= 1 + 0 <= h4i5_hdd <= 1 + 0 <= h4i6_mem <= 1 + 0 <= h4i6_hdd <= 1 + 0 <= h4i7_mem <= 1 + 0 <= h4i7_hdd <= 1 + 0 <= h4i8_mem <= 1 + 0 <= h4i8_hdd <= 1 + 0 <= h4i9_mem <= 1 + 0 <= h4i9_hdd <= 1 + 0 <= h5i0_mem <= 1 + 0 <= h5i0_hdd <= 1 + 0 <= h5i1_mem <= 1 + 0 <= h5i1_hdd <= 1 + 0 <= h5i2_mem <= 1 + 0 <= h5i2_hdd <= 1 + 0 <= h5i3_mem <= 1 + 0 <= h5i3_hdd <= 1 + 0 <= h5i4_mem <= 1 + 0 <= h5i4_hdd <= 1 + 0 <= h5i5_mem <= 1 + 0 <= h5i5_hdd <= 1 + 0 <= h5i6_mem <= 1 + 0 <= h5i6_hdd <= 1 + 0 <= h5i7_mem <= 1 + 0 <= h5i7_hdd <= 1 + 0 <= h5i8_mem <= 1 + 0 <= h5i8_hdd <= 1 + 0 <= h5i9_mem <= 1 + 0 <= h5i9_hdd <= 1 +Binary + h0i0_exists + h0i1_exists + h0i2_exists + h0i3_exists + h0i4_exists + h0i5_exists + h0i6_exists + h0i7_exists + h0i8_exists + h0i9_exists + h1i0_exists + h1i1_exists + h1i2_exists + h1i3_exists + h1i4_exists + h1i5_exists + h1i6_exists + h1i7_exists + h1i8_exists + h1i9_exists + h2i0_exists + h2i1_exists + h2i2_exists + h2i3_exists + h2i4_exists + h2i5_exists + h2i6_exists + h2i7_exists + h2i8_exists + h2i9_exists + h3i0_exists + h3i1_exists + h3i2_exists + h3i3_exists + h3i4_exists + h3i5_exists + h3i6_exists + h3i7_exists + h3i8_exists + h3i9_exists + h4i0_exists + h4i1_exists + h4i2_exists + h4i3_exists + h4i4_exists + h4i5_exists + h4i6_exists + h4i7_exists + h4i8_exists + h4i9_exists + h5i0_exists + h5i1_exists + h5i2_exists + h5i3_exists + h5i4_exists + h5i5_exists + h5i6_exists + h5i7_exists + h5i8_exists + h5i9_exists + r0a0_to_h4i0 + r0a0_to_h4i1 + r0a0_to_h4i2 + r0a0_to_h4i3 + r0a0_to_h4i4 + r0a0_to_h4i5 + r0a0_to_h4i6 + r0a0_to_h4i7 + r0a0_to_h4i8 + r0a0_to_h4i9 + r0a0_to_h5i0 + r0a0_to_h5i1 + r0a0_to_h5i2 + r0a0_to_h5i3 + r0a0_to_h5i4 + r0a0_to_h5i5 + r0a0_to_h5i6 + r0a0_to_h5i7 + r0a0_to_h5i8 + r0a0_to_h5i9 + r0a1_to_h4i0 + r0a1_to_h4i1 + r0a1_to_h4i2 + r0a1_to_h4i3 + r0a1_to_h4i4 + r0a1_to_h4i5 + r0a1_to_h4i6 + r0a1_to_h4i7 + r0a1_to_h4i8 + r0a1_to_h4i9 + r0a1_to_h5i0 + r0a1_to_h5i1 + r0a1_to_h5i2 + r0a1_to_h5i3 + r0a1_to_h5i4 + r0a1_to_h5i5 + r0a1_to_h5i6 + r0a1_to_h5i7 + r0a1_to_h5i8 + r0a1_to_h5i9 + r0a2_to_h4i0 + r0a2_to_h4i1 + r0a2_to_h4i2 + r0a2_to_h4i3 + r0a2_to_h4i4 + r0a2_to_h4i5 + r0a2_to_h4i6 + r0a2_to_h4i7 + r0a2_to_h4i8 + r0a2_to_h4i9 + r0a2_to_h5i0 + r0a2_to_h5i1 + r0a2_to_h5i2 + r0a2_to_h5i3 + r0a2_to_h5i4 + r0a2_to_h5i5 + r0a2_to_h5i6 + r0a2_to_h5i7 + r0a2_to_h5i8 + r0a2_to_h5i9 + r0a3_to_h4i0 + r0a3_to_h4i1 + r0a3_to_h4i2 + r0a3_to_h4i3 + r0a3_to_h4i4 + r0a3_to_h4i5 + r0a3_to_h4i6 + r0a3_to_h4i7 + r0a3_to_h4i8 + r0a3_to_h4i9 + r0a3_to_h5i0 + r0a3_to_h5i1 + r0a3_to_h5i2 + r0a3_to_h5i3 + r0a3_to_h5i4 + r0a3_to_h5i5 + r0a3_to_h5i6 + r0a3_to_h5i7 + r0a3_to_h5i8 + r0a3_to_h5i9 + r1a0_to_h0i0 + r1a0_to_h0i1 + r1a0_to_h0i2 + r1a0_to_h0i3 + r1a0_to_h0i4 + r1a0_to_h0i5 + r1a0_to_h0i6 + r1a0_to_h0i7 + r1a0_to_h0i8 + r1a0_to_h0i9 + r1a0_to_h1i0 + r1a0_to_h1i1 + r1a0_to_h1i2 + r1a0_to_h1i3 + r1a0_to_h1i4 + r1a0_to_h1i5 + r1a0_to_h1i6 + r1a0_to_h1i7 + r1a0_to_h1i8 + r1a0_to_h1i9 + r1a0_to_h2i0 + r1a0_to_h2i1 + r1a0_to_h2i2 + r1a0_to_h2i3 + r1a0_to_h2i4 + r1a0_to_h2i5 + r1a0_to_h2i6 + r1a0_to_h2i7 + r1a0_to_h2i8 + r1a0_to_h2i9 + r1a0_to_h3i0 + r1a0_to_h3i1 + r1a0_to_h3i2 + r1a0_to_h3i3 + r1a0_to_h3i4 + r1a0_to_h3i5 + r1a0_to_h3i6 + r1a0_to_h3i7 + r1a0_to_h3i8 + r1a0_to_h3i9 + r1a0_to_h4i0 + r1a0_to_h4i1 + r1a0_to_h4i2 + r1a0_to_h4i3 + r1a0_to_h4i4 + r1a0_to_h4i5 + r1a0_to_h4i6 + r1a0_to_h4i7 + r1a0_to_h4i8 + r1a0_to_h4i9 + r1a0_to_h5i0 + r1a0_to_h5i1 + r1a0_to_h5i2 + r1a0_to_h5i3 + r1a0_to_h5i4 + r1a0_to_h5i5 + r1a0_to_h5i6 + r1a0_to_h5i7 + r1a0_to_h5i8 + r1a0_to_h5i9 + r1a1_to_h0i0 + r1a1_to_h0i1 + r1a1_to_h0i2 + r1a1_to_h0i3 + r1a1_to_h0i4 + r1a1_to_h0i5 + r1a1_to_h0i6 + r1a1_to_h0i7 + r1a1_to_h0i8 + r1a1_to_h0i9 + r1a1_to_h1i0 + r1a1_to_h1i1 + r1a1_to_h1i2 + r1a1_to_h1i3 + r1a1_to_h1i4 + r1a1_to_h1i5 + r1a1_to_h1i6 + r1a1_to_h1i7 + r1a1_to_h1i8 + r1a1_to_h1i9 + r1a1_to_h2i0 + r1a1_to_h2i1 + r1a1_to_h2i2 + r1a1_to_h2i3 + r1a1_to_h2i4 + r1a1_to_h2i5 + r1a1_to_h2i6 + r1a1_to_h2i7 + r1a1_to_h2i8 + r1a1_to_h2i9 + r1a1_to_h3i0 + r1a1_to_h3i1 + r1a1_to_h3i2 + r1a1_to_h3i3 + r1a1_to_h3i4 + r1a1_to_h3i5 + r1a1_to_h3i6 + r1a1_to_h3i7 + r1a1_to_h3i8 + r1a1_to_h3i9 + r1a1_to_h4i0 + r1a1_to_h4i1 + r1a1_to_h4i2 + r1a1_to_h4i3 + r1a1_to_h4i4 + r1a1_to_h4i5 + r1a1_to_h4i6 + r1a1_to_h4i7 + r1a1_to_h4i8 + r1a1_to_h4i9 + r1a1_to_h5i0 + r1a1_to_h5i1 + r1a1_to_h5i2 + r1a1_to_h5i3 + r1a1_to_h5i4 + r1a1_to_h5i5 + r1a1_to_h5i6 + r1a1_to_h5i7 + r1a1_to_h5i8 + r1a1_to_h5i9 + r1a2_to_h0i0 + r1a2_to_h0i1 + r1a2_to_h0i2 + r1a2_to_h0i3 + r1a2_to_h0i4 + r1a2_to_h0i5 + r1a2_to_h0i6 + r1a2_to_h0i7 + r1a2_to_h0i8 + r1a2_to_h0i9 + r1a2_to_h1i0 + r1a2_to_h1i1 + r1a2_to_h1i2 + r1a2_to_h1i3 + r1a2_to_h1i4 + r1a2_to_h1i5 + r1a2_to_h1i6 + r1a2_to_h1i7 + r1a2_to_h1i8 + r1a2_to_h1i9 + r1a2_to_h2i0 + r1a2_to_h2i1 + r1a2_to_h2i2 + r1a2_to_h2i3 + r1a2_to_h2i4 + r1a2_to_h2i5 + r1a2_to_h2i6 + r1a2_to_h2i7 + r1a2_to_h2i8 + r1a2_to_h2i9 + r1a2_to_h3i0 + r1a2_to_h3i1 + r1a2_to_h3i2 + r1a2_to_h3i3 + r1a2_to_h3i4 + r1a2_to_h3i5 + r1a2_to_h3i6 + r1a2_to_h3i7 + r1a2_to_h3i8 + r1a2_to_h3i9 + r1a2_to_h4i0 + r1a2_to_h4i1 + r1a2_to_h4i2 + r1a2_to_h4i3 + r1a2_to_h4i4 + r1a2_to_h4i5 + r1a2_to_h4i6 + r1a2_to_h4i7 + r1a2_to_h4i8 + r1a2_to_h4i9 + r1a2_to_h5i0 + r1a2_to_h5i1 + r1a2_to_h5i2 + r1a2_to_h5i3 + r1a2_to_h5i4 + r1a2_to_h5i5 + r1a2_to_h5i6 + r1a2_to_h5i7 + r1a2_to_h5i8 + r1a2_to_h5i9 + r2a0_to_h0i0 + r2a0_to_h0i1 + r2a0_to_h0i2 + r2a0_to_h0i3 + r2a0_to_h0i4 + r2a0_to_h0i5 + r2a0_to_h0i6 + r2a0_to_h0i7 + r2a0_to_h0i8 + r2a0_to_h0i9 + r2a0_to_h1i0 + r2a0_to_h1i1 + r2a0_to_h1i2 + r2a0_to_h1i3 + r2a0_to_h1i4 + r2a0_to_h1i5 + r2a0_to_h1i6 + r2a0_to_h1i7 + r2a0_to_h1i8 + r2a0_to_h1i9 + r2a0_to_h2i0 + r2a0_to_h2i1 + r2a0_to_h2i2 + r2a0_to_h2i3 + r2a0_to_h2i4 + r2a0_to_h2i5 + r2a0_to_h2i6 + r2a0_to_h2i7 + r2a0_to_h2i8 + r2a0_to_h2i9 + r2a0_to_h3i0 + r2a0_to_h3i1 + r2a0_to_h3i2 + r2a0_to_h3i3 + r2a0_to_h3i4 + r2a0_to_h3i5 + r2a0_to_h3i6 + r2a0_to_h3i7 + r2a0_to_h3i8 + r2a0_to_h3i9 + r2a0_to_h4i0 + r2a0_to_h4i1 + r2a0_to_h4i2 + r2a0_to_h4i3 + r2a0_to_h4i4 + r2a0_to_h4i5 + r2a0_to_h4i6 + r2a0_to_h4i7 + r2a0_to_h4i8 + r2a0_to_h4i9 + r2a0_to_h5i0 + r2a0_to_h5i1 + r2a0_to_h5i2 + r2a0_to_h5i3 + r2a0_to_h5i4 + r2a0_to_h5i5 + r2a0_to_h5i6 + r2a0_to_h5i7 + r2a0_to_h5i8 + r2a0_to_h5i9 + r3a0_to_h0i0 + r3a0_to_h0i1 + r3a0_to_h0i2 + r3a0_to_h0i3 + r3a0_to_h0i4 + r3a0_to_h0i5 + r3a0_to_h0i6 + r3a0_to_h0i7 + r3a0_to_h0i8 + r3a0_to_h0i9 + r3a0_to_h1i0 + r3a0_to_h1i1 + r3a0_to_h1i2 + r3a0_to_h1i3 + r3a0_to_h1i4 + r3a0_to_h1i5 + r3a0_to_h1i6 + r3a0_to_h1i7 + r3a0_to_h1i8 + r3a0_to_h1i9 + r3a0_to_h2i0 + r3a0_to_h2i1 + r3a0_to_h2i2 + r3a0_to_h2i3 + r3a0_to_h2i4 + r3a0_to_h2i5 + r3a0_to_h2i6 + r3a0_to_h2i7 + r3a0_to_h2i8 + r3a0_to_h2i9 + r3a0_to_h3i0 + r3a0_to_h3i1 + r3a0_to_h3i2 + r3a0_to_h3i3 + r3a0_to_h3i4 + r3a0_to_h3i5 + r3a0_to_h3i6 + r3a0_to_h3i7 + r3a0_to_h3i8 + r3a0_to_h3i9 + r3a0_to_h4i0 + r3a0_to_h4i1 + r3a0_to_h4i2 + r3a0_to_h4i3 + r3a0_to_h4i4 + r3a0_to_h4i5 + r3a0_to_h4i6 + r3a0_to_h4i7 + r3a0_to_h4i8 + r3a0_to_h4i9 + r3a0_to_h5i0 + r3a0_to_h5i1 + r3a0_to_h5i2 + r3a0_to_h5i3 + r3a0_to_h5i4 + r3a0_to_h5i5 + r3a0_to_h5i6 + r3a0_to_h5i7 + r3a0_to_h5i8 + r3a0_to_h5i9 + r4a0_to_h4i0 + r4a0_to_h4i1 + r4a0_to_h4i2 + r4a0_to_h4i3 + r4a0_to_h4i4 + r4a0_to_h4i5 + r4a0_to_h4i6 + r4a0_to_h4i7 + r4a0_to_h4i8 + r4a0_to_h4i9 + r4a0_to_h5i0 + r4a0_to_h5i1 + r4a0_to_h5i2 + r4a0_to_h5i3 + r4a0_to_h5i4 + r4a0_to_h5i5 + r4a0_to_h5i6 + r4a0_to_h5i7 + r4a0_to_h5i8 + r4a0_to_h5i9 + r4a1_to_h4i0 + r4a1_to_h4i1 + r4a1_to_h4i2 + r4a1_to_h4i3 + r4a1_to_h4i4 + r4a1_to_h4i5 + r4a1_to_h4i6 + r4a1_to_h4i7 + r4a1_to_h4i8 + r4a1_to_h4i9 + r4a1_to_h5i0 + r4a1_to_h5i1 + r4a1_to_h5i2 + r4a1_to_h5i3 + r4a1_to_h5i4 + r4a1_to_h5i5 + r4a1_to_h5i6 + r4a1_to_h5i7 + r4a1_to_h5i8 + r4a1_to_h5i9 + r4a2_to_h4i0 + r4a2_to_h4i1 + r4a2_to_h4i2 + r4a2_to_h4i3 + r4a2_to_h4i4 + r4a2_to_h4i5 + r4a2_to_h4i6 + r4a2_to_h4i7 + r4a2_to_h4i8 + r4a2_to_h4i9 + r4a2_to_h5i0 + r4a2_to_h5i1 + r4a2_to_h5i2 + r4a2_to_h5i3 + r4a2_to_h5i4 + r4a2_to_h5i5 + r4a2_to_h5i6 + r4a2_to_h5i7 + r4a2_to_h5i8 + r4a2_to_h5i9 + r4a3_to_h4i0 + r4a3_to_h4i1 + r4a3_to_h4i2 + r4a3_to_h4i3 + r4a3_to_h4i4 + r4a3_to_h4i5 + r4a3_to_h4i6 + r4a3_to_h4i7 + r4a3_to_h4i8 + r4a3_to_h4i9 + r4a3_to_h5i0 + r4a3_to_h5i1 + r4a3_to_h5i2 + r4a3_to_h5i3 + r4a3_to_h5i4 + r4a3_to_h5i5 + r4a3_to_h5i6 + r4a3_to_h5i7 + r4a3_to_h5i8 + r4a3_to_h5i9 + r5a0_to_h0i0 + r5a0_to_h0i1 + r5a0_to_h0i2 + r5a0_to_h0i3 + r5a0_to_h0i4 + r5a0_to_h0i5 + r5a0_to_h0i6 + r5a0_to_h0i7 + r5a0_to_h0i8 + r5a0_to_h0i9 + r5a0_to_h1i0 + r5a0_to_h1i1 + r5a0_to_h1i2 + r5a0_to_h1i3 + r5a0_to_h1i4 + r5a0_to_h1i5 + r5a0_to_h1i6 + r5a0_to_h1i7 + r5a0_to_h1i8 + r5a0_to_h1i9 + r5a0_to_h2i0 + r5a0_to_h2i1 + r5a0_to_h2i2 + r5a0_to_h2i3 + r5a0_to_h2i4 + r5a0_to_h2i5 + r5a0_to_h2i6 + r5a0_to_h2i7 + r5a0_to_h2i8 + r5a0_to_h2i9 + r5a0_to_h3i0 + r5a0_to_h3i1 + r5a0_to_h3i2 + r5a0_to_h3i3 + r5a0_to_h3i4 + r5a0_to_h3i5 + r5a0_to_h3i6 + r5a0_to_h3i7 + r5a0_to_h3i8 + r5a0_to_h3i9 + r5a0_to_h4i0 + r5a0_to_h4i1 + r5a0_to_h4i2 + r5a0_to_h4i3 + r5a0_to_h4i4 + r5a0_to_h4i5 + r5a0_to_h4i6 + r5a0_to_h4i7 + r5a0_to_h4i8 + r5a0_to_h4i9 + r5a0_to_h5i0 + r5a0_to_h5i1 + r5a0_to_h5i2 + r5a0_to_h5i3 + r5a0_to_h5i4 + r5a0_to_h5i5 + r5a0_to_h5i6 + r5a0_to_h5i7 + r5a0_to_h5i8 + r5a0_to_h5i9 + r6a0_to_h0i0 + r6a0_to_h0i1 + r6a0_to_h0i2 + r6a0_to_h0i3 + r6a0_to_h0i4 + r6a0_to_h0i5 + r6a0_to_h0i6 + r6a0_to_h0i7 + r6a0_to_h0i8 + r6a0_to_h0i9 + r6a0_to_h1i0 + r6a0_to_h1i1 + r6a0_to_h1i2 + r6a0_to_h1i3 + r6a0_to_h1i4 + r6a0_to_h1i5 + r6a0_to_h1i6 + r6a0_to_h1i7 + r6a0_to_h1i8 + r6a0_to_h1i9 + r6a0_to_h2i0 + r6a0_to_h2i1 + r6a0_to_h2i2 + r6a0_to_h2i3 + r6a0_to_h2i4 + r6a0_to_h2i5 + r6a0_to_h2i6 + r6a0_to_h2i7 + r6a0_to_h2i8 + r6a0_to_h2i9 + r6a0_to_h3i0 + r6a0_to_h3i1 + r6a0_to_h3i2 + r6a0_to_h3i3 + r6a0_to_h3i4 + r6a0_to_h3i5 + r6a0_to_h3i6 + r6a0_to_h3i7 + r6a0_to_h3i8 + r6a0_to_h3i9 + r6a0_to_h4i0 + r6a0_to_h4i1 + r6a0_to_h4i2 + r6a0_to_h4i3 + r6a0_to_h4i4 + r6a0_to_h4i5 + r6a0_to_h4i6 + r6a0_to_h4i7 + r6a0_to_h4i8 + r6a0_to_h4i9 + r6a0_to_h5i0 + r6a0_to_h5i1 + r6a0_to_h5i2 + r6a0_to_h5i3 + r6a0_to_h5i4 + r6a0_to_h5i5 + r6a0_to_h5i6 + r6a0_to_h5i7 + r6a0_to_h5i8 + r6a0_to_h5i9 + r6a1_to_h0i0 + r6a1_to_h0i1 + r6a1_to_h0i2 + r6a1_to_h0i3 + r6a1_to_h0i4 + r6a1_to_h0i5 + r6a1_to_h0i6 + r6a1_to_h0i7 + r6a1_to_h0i8 + r6a1_to_h0i9 + r6a1_to_h1i0 + r6a1_to_h1i1 + r6a1_to_h1i2 + r6a1_to_h1i3 + r6a1_to_h1i4 + r6a1_to_h1i5 + r6a1_to_h1i6 + r6a1_to_h1i7 + r6a1_to_h1i8 + r6a1_to_h1i9 + r6a1_to_h2i0 + r6a1_to_h2i1 + r6a1_to_h2i2 + r6a1_to_h2i3 + r6a1_to_h2i4 + r6a1_to_h2i5 + r6a1_to_h2i6 + r6a1_to_h2i7 + r6a1_to_h2i8 + r6a1_to_h2i9 + r6a1_to_h3i0 + r6a1_to_h3i1 + r6a1_to_h3i2 + r6a1_to_h3i3 + r6a1_to_h3i4 + r6a1_to_h3i5 + r6a1_to_h3i6 + r6a1_to_h3i7 + r6a1_to_h3i8 + r6a1_to_h3i9 + r6a1_to_h4i0 + r6a1_to_h4i1 + r6a1_to_h4i2 + r6a1_to_h4i3 + r6a1_to_h4i4 + r6a1_to_h4i5 + r6a1_to_h4i6 + r6a1_to_h4i7 + r6a1_to_h4i8 + r6a1_to_h4i9 + r6a1_to_h5i0 + r6a1_to_h5i1 + r6a1_to_h5i2 + r6a1_to_h5i3 + r6a1_to_h5i4 + r6a1_to_h5i5 + r6a1_to_h5i6 + r6a1_to_h5i7 + r6a1_to_h5i8 + r6a1_to_h5i9 + r6a2_to_h0i0 + r6a2_to_h0i1 + r6a2_to_h0i2 + r6a2_to_h0i3 + r6a2_to_h0i4 + r6a2_to_h0i5 + r6a2_to_h0i6 + r6a2_to_h0i7 + r6a2_to_h0i8 + r6a2_to_h0i9 + r6a2_to_h1i0 + r6a2_to_h1i1 + r6a2_to_h1i2 + r6a2_to_h1i3 + r6a2_to_h1i4 + r6a2_to_h1i5 + r6a2_to_h1i6 + r6a2_to_h1i7 + r6a2_to_h1i8 + r6a2_to_h1i9 + r6a2_to_h2i0 + r6a2_to_h2i1 + r6a2_to_h2i2 + r6a2_to_h2i3 + r6a2_to_h2i4 + r6a2_to_h2i5 + r6a2_to_h2i6 + r6a2_to_h2i7 + r6a2_to_h2i8 + r6a2_to_h2i9 + r6a2_to_h3i0 + r6a2_to_h3i1 + r6a2_to_h3i2 + r6a2_to_h3i3 + r6a2_to_h3i4 + r6a2_to_h3i5 + r6a2_to_h3i6 + r6a2_to_h3i7 + r6a2_to_h3i8 + r6a2_to_h3i9 + r6a2_to_h4i0 + r6a2_to_h4i1 + r6a2_to_h4i2 + r6a2_to_h4i3 + r6a2_to_h4i4 + r6a2_to_h4i5 + r6a2_to_h4i6 + r6a2_to_h4i7 + r6a2_to_h4i8 + r6a2_to_h4i9 + r6a2_to_h5i0 + r6a2_to_h5i1 + r6a2_to_h5i2 + r6a2_to_h5i3 + r6a2_to_h5i4 + r6a2_to_h5i5 + r6a2_to_h5i6 + r6a2_to_h5i7 + r6a2_to_h5i8 + r6a2_to_h5i9 + r6a3_to_h0i0 + r6a3_to_h0i1 + r6a3_to_h0i2 + r6a3_to_h0i3 + r6a3_to_h0i4 + r6a3_to_h0i5 + r6a3_to_h0i6 + r6a3_to_h0i7 + r6a3_to_h0i8 + r6a3_to_h0i9 + r6a3_to_h1i0 + r6a3_to_h1i1 + r6a3_to_h1i2 + r6a3_to_h1i3 + r6a3_to_h1i4 + r6a3_to_h1i5 + r6a3_to_h1i6 + r6a3_to_h1i7 + r6a3_to_h1i8 + r6a3_to_h1i9 + r6a3_to_h2i0 + r6a3_to_h2i1 + r6a3_to_h2i2 + r6a3_to_h2i3 + r6a3_to_h2i4 + r6a3_to_h2i5 + r6a3_to_h2i6 + r6a3_to_h2i7 + r6a3_to_h2i8 + r6a3_to_h2i9 + r6a3_to_h3i0 + r6a3_to_h3i1 + r6a3_to_h3i2 + r6a3_to_h3i3 + r6a3_to_h3i4 + r6a3_to_h3i5 + r6a3_to_h3i6 + r6a3_to_h3i7 + r6a3_to_h3i8 + r6a3_to_h3i9 + r6a3_to_h4i0 + r6a3_to_h4i1 + r6a3_to_h4i2 + r6a3_to_h4i3 + r6a3_to_h4i4 + r6a3_to_h4i5 + r6a3_to_h4i6 + r6a3_to_h4i7 + r6a3_to_h4i8 + r6a3_to_h4i9 + r6a3_to_h5i0 + r6a3_to_h5i1 + r6a3_to_h5i2 + r6a3_to_h5i3 + r6a3_to_h5i4 + r6a3_to_h5i5 + r6a3_to_h5i6 + r6a3_to_h5i7 + r6a3_to_h5i8 + r6a3_to_h5i9 + r7a0_to_h0i0 + r7a0_to_h0i1 + r7a0_to_h0i2 + r7a0_to_h0i3 + r7a0_to_h0i4 + r7a0_to_h0i5 + r7a0_to_h0i6 + r7a0_to_h0i7 + r7a0_to_h0i8 + r7a0_to_h0i9 + r7a0_to_h1i0 + r7a0_to_h1i1 + r7a0_to_h1i2 + r7a0_to_h1i3 + r7a0_to_h1i4 + r7a0_to_h1i5 + r7a0_to_h1i6 + r7a0_to_h1i7 + r7a0_to_h1i8 + r7a0_to_h1i9 + r7a0_to_h2i0 + r7a0_to_h2i1 + r7a0_to_h2i2 + r7a0_to_h2i3 + r7a0_to_h2i4 + r7a0_to_h2i5 + r7a0_to_h2i6 + r7a0_to_h2i7 + r7a0_to_h2i8 + r7a0_to_h2i9 + r7a0_to_h3i0 + r7a0_to_h3i1 + r7a0_to_h3i2 + r7a0_to_h3i3 + r7a0_to_h3i4 + r7a0_to_h3i5 + r7a0_to_h3i6 + r7a0_to_h3i7 + r7a0_to_h3i8 + r7a0_to_h3i9 + r7a0_to_h4i0 + r7a0_to_h4i1 + r7a0_to_h4i2 + r7a0_to_h4i3 + r7a0_to_h4i4 + r7a0_to_h4i5 + r7a0_to_h4i6 + r7a0_to_h4i7 + r7a0_to_h4i8 + r7a0_to_h4i9 + r7a0_to_h5i0 + r7a0_to_h5i1 + r7a0_to_h5i2 + r7a0_to_h5i3 + r7a0_to_h5i4 + r7a0_to_h5i5 + r7a0_to_h5i6 + r7a0_to_h5i7 + r7a0_to_h5i8 + r7a0_to_h5i9 + r7a1_to_h0i0 + r7a1_to_h0i1 + r7a1_to_h0i2 + r7a1_to_h0i3 + r7a1_to_h0i4 + r7a1_to_h0i5 + r7a1_to_h0i6 + r7a1_to_h0i7 + r7a1_to_h0i8 + r7a1_to_h0i9 + r7a1_to_h1i0 + r7a1_to_h1i1 + r7a1_to_h1i2 + r7a1_to_h1i3 + r7a1_to_h1i4 + r7a1_to_h1i5 + r7a1_to_h1i6 + r7a1_to_h1i7 + r7a1_to_h1i8 + r7a1_to_h1i9 + r7a1_to_h2i0 + r7a1_to_h2i1 + r7a1_to_h2i2 + r7a1_to_h2i3 + r7a1_to_h2i4 + r7a1_to_h2i5 + r7a1_to_h2i6 + r7a1_to_h2i7 + r7a1_to_h2i8 + r7a1_to_h2i9 + r7a1_to_h3i0 + r7a1_to_h3i1 + r7a1_to_h3i2 + r7a1_to_h3i3 + r7a1_to_h3i4 + r7a1_to_h3i5 + r7a1_to_h3i6 + r7a1_to_h3i7 + r7a1_to_h3i8 + r7a1_to_h3i9 + r7a1_to_h4i0 + r7a1_to_h4i1 + r7a1_to_h4i2 + r7a1_to_h4i3 + r7a1_to_h4i4 + r7a1_to_h4i5 + r7a1_to_h4i6 + r7a1_to_h4i7 + r7a1_to_h4i8 + r7a1_to_h4i9 + r7a1_to_h5i0 + r7a1_to_h5i1 + r7a1_to_h5i2 + r7a1_to_h5i3 + r7a1_to_h5i4 + r7a1_to_h5i5 + r7a1_to_h5i6 + r7a1_to_h5i7 + r7a1_to_h5i8 + r7a1_to_h5i9 + r7a2_to_h0i0 + r7a2_to_h0i1 + r7a2_to_h0i2 + r7a2_to_h0i3 + r7a2_to_h0i4 + r7a2_to_h0i5 + r7a2_to_h0i6 + r7a2_to_h0i7 + r7a2_to_h0i8 + r7a2_to_h0i9 + r7a2_to_h1i0 + r7a2_to_h1i1 + r7a2_to_h1i2 + r7a2_to_h1i3 + r7a2_to_h1i4 + r7a2_to_h1i5 + r7a2_to_h1i6 + r7a2_to_h1i7 + r7a2_to_h1i8 + r7a2_to_h1i9 + r7a2_to_h2i0 + r7a2_to_h2i1 + r7a2_to_h2i2 + r7a2_to_h2i3 + r7a2_to_h2i4 + r7a2_to_h2i5 + r7a2_to_h2i6 + r7a2_to_h2i7 + r7a2_to_h2i8 + r7a2_to_h2i9 + r7a2_to_h3i0 + r7a2_to_h3i1 + r7a2_to_h3i2 + r7a2_to_h3i3 + r7a2_to_h3i4 + r7a2_to_h3i5 + r7a2_to_h3i6 + r7a2_to_h3i7 + r7a2_to_h3i8 + r7a2_to_h3i9 + r7a2_to_h4i0 + r7a2_to_h4i1 + r7a2_to_h4i2 + r7a2_to_h4i3 + r7a2_to_h4i4 + r7a2_to_h4i5 + r7a2_to_h4i6 + r7a2_to_h4i7 + r7a2_to_h4i8 + r7a2_to_h4i9 + r7a2_to_h5i0 + r7a2_to_h5i1 + r7a2_to_h5i2 + r7a2_to_h5i3 + r7a2_to_h5i4 + r7a2_to_h5i5 + r7a2_to_h5i6 + r7a2_to_h5i7 + r7a2_to_h5i8 + r7a2_to_h5i9 +End diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.xmi new file mode 100644 index 00000000..913039b2 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.xmi @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/solution.txt b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/solution.txt new file mode 100644 index 00000000..847b84c9 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/solution.txt @@ -0,0 +1,55 @@ +Optimal - objective value 25.00000000 + 0 h0i0_exists 1 2 + 1 h0i1_exists 1 2 + 2 h0i2_exists 1 2 + 20 h2i0_exists 1 3 + 40 h4i0_exists 1 2 + 41 h4i1_exists 1 2 + 42 h4i2_exists 1 2 + 43 h4i3_exists 1 2 + 44 h4i4_exists 1 2 + 45 h4i5_exists 1 2 + 50 h5i0_exists 1 4 + 64 r0a0_to_h4i4 1 0 + 85 r0a1_to_h4i5 1 0 + 110 r0a2_to_h5i0 1 0 + 122 r0a3_to_h4i2 1 0 + 160 r1a0_to_h2i0 1 0 + 200 r1a1_to_h0i0 1 0 + 262 r1a2_to_h0i2 1 0 + 340 r2a0_to_h2i0 1 0 + 400 r3a0_to_h2i0 1 0 + 450 r4a0_to_h5i0 1 0 + 463 r4a1_to_h4i3 1 0 + 481 r4a2_to_h4i1 1 0 + 500 r4a3_to_h4i0 1 0 + 540 r5a0_to_h2i0 1 0 + 580 r6a0_to_h0i0 1 0 + 660 r6a1_to_h2i0 1 0 + 702 r6a2_to_h0i2 1 0 + 761 r6a3_to_h0i1 1 0 + 821 r7a0_to_h0i1 1 0 + 880 r7a1_to_h0i0 1 0 + 942 r7a2_to_h0i2 1 0 + 1000 h0i0_mem 1 0 + 1001 h0i0_hdd 0.34666667 0 + 1002 h0i1_mem 0.75 0 + 1003 h0i1_hdd 0.29333333 0 + 1004 h0i2_mem 1 0 + 1005 h0i2_hdd 0.34666667 0 + 1040 h2i0_mem 0.8125 0 + 1041 h2i0_hdd 0.46666667 0 + 1080 h4i0_mem 1 0 + 1081 h4i0_hdd 0.58 0 + 1082 h4i1_mem 1 0 + 1083 h4i1_hdd 0.58 0 + 1084 h4i2_mem 1 0 + 1085 h4i2_hdd 0.58 0 + 1086 h4i3_mem 1 0 + 1087 h4i3_hdd 0.58 0 + 1088 h4i4_mem 1 0 + 1089 h4i4_hdd 0.58 0 + 1090 h4i5_mem 1 0 + 1091 h4i5_hdd 0.58 0 + 1100 h5i0_mem 1 0 + 1101 h5i0_hdd 0.58 0 diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore index 4e059848..d3114d9d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/.gitignore @@ -25,3 +25,20 @@ /.GuidanceObjective.java._trace /.RemoveHostInstance.java._trace /.UnallocateAppInstance.java._trace +/Allocate.java +/AllocationWithoutResourceRequirement.java +/AverageFreeHddMetric.java +/AverageFreeMemoryMetric.java +/CostMetric.java +/CpsCost.java +/CpsQueries.java +/CreateHostInstance.java +/GuidanceObjective.java +/InstanceDoesNotSatisfyRequirement.java +/NotEnoughAvailableHdd.java +/NotEnoughAvailableMemory.java +/RedundantInstancesOnSameHost.java +/RemoveHostInstance.java +/RequirementNotSatisfied.java +/ResourceRequirement.java +/UnallocateAppInstance.java diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/.gitignore index c903a5e9..a4f039d9 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/.gitignore @@ -18,3 +18,19 @@ /.RequiredAppInstances.java._trace /.UnallocatedAppInstance.java._trace /.NoHostToAllocateTo.java._trace +/AvailableHdd.java +/AvailableMemory.java +/CpsApplications.java +/CpsHosts.java +/CpsQueriesAll.java +/FreeHddPercentage.java +/FreeMemoryPercentage.java +/HddRequirement.java +/HostInstanceCost.java +/MemoryRequirement.java +/NoHostToAllocateTo.java +/RequiredAppInstances.java +/SatisfyingInstance.java +/TotalHdd.java +/TotalMemory.java +/UnallocatedAppInstance.java diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend index 7ec0f84d..0203a6b6 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend @@ -19,11 +19,11 @@ class CbcCpsMain { new IllegalStateException("This is a static utility class and should not be instantiated directly.") } - static def void main(String[] args) { + public static def void main(String[] args) { Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl) EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE) - val generator = new CpsGenerator(1, 4, 1) + val generator = new CpsGenerator(1, 4, 2) val problem = generator.generateCpsProblem val toLp = new CpsToLpTranslator(problem, 10, true) val lp = toLp.lpProblem @@ -49,5 +49,6 @@ class CbcCpsMain { } finally { reader.close } + println("Additional cost: " + problem.requests.flatMap[requirements.map[count]].reduce[p1, p2|p1 + p2] * 5) } } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend new file mode 100644 index 00000000..628d5963 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend @@ -0,0 +1,31 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo + +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage +import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator +import org.eclipse.emf.common.util.URI +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl +import uk.ac.kcl.inf.mdeoptimiser.languages.MoptStandaloneSetup + +class CpsMdeOptimiserMain { + static val PROJECT_PATH = "." + static val PROBLEM_PATH = "model/problem.xmi" + static val MOPT_PATH = "src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt" + + private new() { + new IllegalStateException("This is a static utility class and should not be instantiated directly.") + } + + public static def void main(String[] args) { + Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, + new XMIResourceFactoryImpl) + EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE) + val generator = new CpsGenerator(1, 4, 2) + val problem = generator.generateCpsProblem + problem.eResource.URI = URI.createFileURI(PROBLEM_PATH) + problem.eResource.save(emptyMap) + val injector = new MoptStandaloneSetup().createInjectorAndDoEMFRegistration(); + injector.getInstance(ExcludedRun).run(PROJECT_PATH, MOPT_PATH) + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.xtend new file mode 100644 index 00000000..1e9c5adf --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.xtend @@ -0,0 +1,85 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo + +import java.util.Properties +import org.moeaframework.Executor +import org.moeaframework.Instrumenter +import org.moeaframework.algorithm.PeriodicAction +import org.moeaframework.core.TerminationCondition +import org.moeaframework.core.spi.AlgorithmFactory +import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run +import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.Optimisation +import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.SolverSpec +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.OptimisationInterpreter +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.executor.SolutionGenerator +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.MoeaOptimisation +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.algorithms.MoeaOptimisationAlgorithmProvider +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.instrumentation.PopulationCollector +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.problem.MoeaOptimisationProblem +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.operators.adaptation.MutationStepSizeStrategyFactory +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.output.MDEOBatch + +class ExcludedMoeaOptimisation extends MoeaOptimisation { + SolutionGenerator solutionGenerator + Instrumenter algorithmStepSizeInstrumenter + + override execute(SolverSpec solverSpec, SolutionGenerator solutionGenerator) { + this.solutionGenerator = solutionGenerator + super.execute(solverSpec, solutionGenerator) + } + + override Instrumenter runOptimisation(SolverSpec solverSpec, Properties optimisationProperties) { + val algorithmFactory = new AlgorithmFactory + algorithmFactory.addProvider(new MoeaOptimisationAlgorithmProvider) + + algorithmStepSizeInstrumenter = new Instrumenter().addExcludedPackage("org.eclipse").withProblemClass( + MoeaOptimisationProblem, solutionGenerator).attachApproximationSetCollector().attachElapsedTimeCollector(). + attachPopulationSizeCollector.attach(new PopulationCollector()).withFrequency(1).withFrequencyType( + PeriodicAction.FrequencyType.STEPS) + + var stepSizeStrategy = new MutationStepSizeStrategyFactory(solverSpec.algorithm, algorithmStepSizeInstrumenter). + strategy + + solutionGenerator.setMutationStepSizeStrategy(stepSizeStrategy) + + // TODO: Place this in a better location. + // Exclude JDK packages from Instrumenter + this.algorithmStepSizeInstrumenter.addExcludedPackage("jdk") + + new Executor().usingAlgorithmFactory(algorithmFactory).withAlgorithm(solverSpec.algorithm.name) // Initialize problem with our solution generator + .withProblemClass(MoeaOptimisationProblem, solutionGenerator).withProperties(optimisationProperties). + withInstrumenter(algorithmStepSizeInstrumenter).withTerminationCondition( + optimisationProperties.get("terminationCondition") as TerminationCondition).run() + + return algorithmStepSizeInstrumenter + } +} + +class ExcludedOptimisationInterpreter extends OptimisationInterpreter { + val Optimisation model + + new(String projectPath, Optimisation model) { + super(projectPath, model) + this.model = model + } + + override start() { + // This model provider loads the model given by the user in the DSL + var solutionGenerator = new SolutionGenerator(model, getBreedingOperators, getMutationOperators, + getModelProvider, getMetamodel); + + return new ExcludedMoeaOptimisation().execute(model.solver, solutionGenerator) + } + +} + +class ExcludedRun extends Run { + override runBatch(String moptProjectPath, Optimisation optimisationModel, Integer batch, boolean singleBatch) { + val optimisationInterpreter = new ExcludedOptimisationInterpreter(moptProjectPath, optimisationModel); + val startTime = System.nanoTime(); + val optimisationOutcome = optimisationInterpreter.start(); + val endTime = System.nanoTime(); + val experimentDuration = ((endTime - startTime) / 1000000); + val generatedRules = optimisationInterpreter.getRulegenOperators(); + return new MDEOBatch(batch, experimentDuration, optimisationOutcome, generatedRules, singleBatch); + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.xtend new file mode 100644 index 00000000..1a9286b3 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.xtend @@ -0,0 +1,29 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution +import com.google.common.collect.HashMultiset + +class NonRedundantAllocationsConstraint implements IGuidanceFunction { + override getName() { + "NonRedundantAllocations" + } + + override computeFitness(Solution solution) { + val cps = solution.model as CyberPhysicalSystem + var int cost = 0 + for (hostType : cps.hostTypes) { + for (host : hostType.instances) { + val bins = HashMultiset.create + for (app : host.applications) { + bins.add(app.requirement) + } + for (entry : bins.entrySet) { + cost += entry.count - 1 + } + } + } + cost + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.xtend new file mode 100644 index 00000000..663aa26c --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.xtend @@ -0,0 +1,24 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution + +class NotAllocatedAppInstancesConstraint implements IGuidanceFunction { + override getName() { + "NotAllocatedAppInstances" + } + + override computeFitness(Solution solution) { + val cps = solution.model as CyberPhysicalSystem + var int cost = 0 + for (appType : cps.applicationTypes) { + for (app : appType.instances) { + if (app.allocatedTo === null || !appType.requirements.exists[hostType == app.allocatedTo.type]) { + cost++ + } + } + } + cost + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.xtend new file mode 100644 index 00000000..e44381ec --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.xtend @@ -0,0 +1,27 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution + +class NotSatisfiedRequirementsConstraint implements IGuidanceFunction { + override getName() { + "NotSatisfiedRequirements" + } + + override computeFitness(Solution solution) { + val cps = solution.model as CyberPhysicalSystem + var int cost = 0 + for (request : cps.requests) { + for (requirement : request.requirements) { + cost += Math.abs(requirement.count - requirement.instances.size) + for (app : requirement.instances) { + if (app.type != requirement.type) { + cost++ + } + } + } + } + cost + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.xtend new file mode 100644 index 00000000..fc1d666f --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.xtend @@ -0,0 +1,31 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo + +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance + +class ResourceUtilizationUtil { + private new() { + new IllegalStateException("This is a static utility class and should not be instantiated directly.") + } + + static def getMemoryUtilization(HostInstance host) { + var int utilization = 0 + for (app : host.applications) { + val req = app.type.requirements.findFirst[hostType == host.type] + if (req !== null) { + utilization += req.requiredMemory + } + } + utilization + } + + static def getHddUtilization(HostInstance host) { + var int utilization = 0 + for (app : host.applications) { + val req = app.type.requirements.findFirst[hostType == host.type] + if (req !== null) { + utilization += req.requiredHdd + } + } + utilization + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.xtend new file mode 100644 index 00000000..85cc8115 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.xtend @@ -0,0 +1,33 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution + +class TooLowAverageHddConstraint implements IGuidanceFunction { + static val THRESHOLD = 0.25 + + override getName() { + "TooLowAverageHdd" + } + + override computeFitness(Solution solution) { + val cps = solution.model as CyberPhysicalSystem + var double sumUtilization + var int numHosts + for (hostType : cps.hostTypes) { + numHosts += hostType.instances.size + for (host : hostType.instances) { + val utilization = ResourceUtilizationUtil.getHddUtilization(host) + sumUtilization += (utilization as double) / hostType.defaultHdd + } + } + val averageUtilization = sumUtilization / numHosts + val difference = THRESHOLD - averageUtilization + if (difference > 0) { + difference + } else { + 0 + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.xtend new file mode 100644 index 00000000..e9b47d4c --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.xtend @@ -0,0 +1,33 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution + +class TooLowAverageMemoryConstraint implements IGuidanceFunction { + static val THRESHOLD = 0.25 + + override getName() { + "TooLowAverageMemory" + } + + override computeFitness(Solution solution) { + val cps = solution.model as CyberPhysicalSystem + var double sumUtilization + var int numHosts + for (hostType : cps.hostTypes) { + numHosts += hostType.instances.size + for (host : hostType.instances) { + val utilization = ResourceUtilizationUtil.getMemoryUtilization(host) + sumUtilization += (utilization as double) / hostType.defaultMemory + } + } + val averageUtilization = sumUtilization / numHosts + val difference = THRESHOLD - averageUtilization + if (difference > 0) { + difference + } else { + 0 + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.xtend new file mode 100644 index 00000000..af65e442 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.xtend @@ -0,0 +1,23 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution + +class TotalCostFitnessFunction implements IGuidanceFunction { + override getName() { + "TotalCost" + } + + override computeFitness(Solution solution) { + val cps = solution.model as CyberPhysicalSystem + var int cost = 0 + for (appType : cps.applicationTypes) { + cost += 5 * appType.instances.size + } + for (hostType : cps.hostTypes) { + cost += hostType.cost * hostType.instances.size + } + cost + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.xtend new file mode 100644 index 00000000..08450f45 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.xtend @@ -0,0 +1,27 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution + +class UnavailableHddConstraint implements IGuidanceFunction { + override getName() { + "UnavailableHdd" + } + + override computeFitness(Solution solution) { + val cps = solution.model as CyberPhysicalSystem + var int cost = 0 + for (hostType : cps.hostTypes) { + for (host : hostType.instances) { + val utilization = ResourceUtilizationUtil.getHddUtilization(host) + val difference = utilization - hostType.defaultHdd + if (difference > 0) { + cost += difference + } + } + } + cost + } + +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.xtend new file mode 100644 index 00000000..e46d59a6 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.xtend @@ -0,0 +1,27 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution + +class UnavailableMemoryConstraint implements IGuidanceFunction { + override getName() { + "UnavailableMemory" + } + + override computeFitness(Solution solution) { + val cps = solution.model as CyberPhysicalSystem + var int cost = 0 + for (hostType : cps.hostTypes) { + for (host : hostType.instances) { + val utilization = ResourceUtilizationUtil.getMemoryUtilization(host) + val difference = utilization - hostType.defaultMemory + if (difference > 0) { + cost += difference + } + } + } + cost + } + +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt new file mode 100644 index 00000000..4c05939d --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt @@ -0,0 +1,41 @@ +problem { + basepath + metamodel + model +} + +goal { + objective TotalCost minimise java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.TotalCostFitnessFunction" } + constraint NotSatisfiedRequriements java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.NotSatisfiedRequirementsConstraint" } + constraint NotAllocatedAppInstances java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.NotAllocatedAppInstancesConstraint" } + constraint NonRedundantAllocations java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.NonRedundantAllocationsConstraint" } + constraint UnavailableMemory java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.UnavailableMemoryConstraint" } + constraint UnavailableHdd java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.UnavailableHddConstraint" } + constraint TooLowAverageMemory java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.TooLowAverageMemoryConstraint" } + constraint TooLowAverageHdd java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.TooLowAverageHddConstraint" } +} + +search { +// mutate using unit "createAppInstance" +// mutate using unit "createHostInstance" +// mutate using unit "allocate" +// mutate using unit "deleteAppInstance" +// mutate using unit "unallocate" + mutate { "ApplicationInstance" } + mutate { "HostInstance" } +} + +solver { + optimisation provider moea algorithm NSGAII { + variation: mutation + population: 25 + mutation.step: 3 + mutation.strategy: random + } + + termination { + time: 120 + } + + batches 1 +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin index 3f9e895d..1ba73ccf 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin index d8814a3b..b8ff0f95 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.gitignore index 9f908c7a..011600b4 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.gitignore @@ -1,2 +1,6 @@ /.CpsToLpTranslator.java._trace /.CbcCpsMain.java._trace +/.CbcCpsMain.xtendbin +/.CpsToLpTranslator.xtendbin +/CbcCpsMain.java +/CpsToLpTranslator.java diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java index d36cdccd..00a4887b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java @@ -2,12 +2,15 @@ package hu.bme.mit.inf.dslreasoner.domains.cps.cplex; import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.Request; +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; import hu.bme.mit.inf.dslreasoner.domains.cps.cplex.CpsToLpTranslator; import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; import java.io.FileWriter; +import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; import java.util.function.Consumer; @@ -15,7 +18,11 @@ import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; import org.eclipse.xtext.xbase.lib.Exceptions; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.Functions.Function2; import org.eclipse.xtext.xbase.lib.InputOutput; +import org.eclipse.xtext.xbase.lib.IterableExtensions; +import org.eclipse.xtext.xbase.lib.ListExtensions; @SuppressWarnings("all") public class CbcCpsMain { @@ -33,7 +40,7 @@ public class CbcCpsMain { XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); _extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, _xMIResourceFactoryImpl); EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE); - final CpsGenerator generator = new CpsGenerator(1, 4, 1); + final CpsGenerator generator = new CpsGenerator(1, 4, 2); final CyberPhysicalSystem problem = generator.generateCpsProblem(); final CpsToLpTranslator toLp = new CpsToLpTranslator(problem, 10, true); final CharSequence lp = toLp.getLpProblem(); @@ -70,6 +77,19 @@ public class CbcCpsMain { } finally { reader.close(); } + final Function1> _function_1 = (Request it) -> { + final Function1 _function_2 = (Requirement it_1) -> { + return Integer.valueOf(it_1.getCount()); + }; + return ListExtensions.map(it.getRequirements(), _function_2); + }; + final Function2 _function_2 = (Integer p1, Integer p2) -> { + return Integer.valueOf(((p1).intValue() + (p2).intValue())); + }; + Integer _reduce = IterableExtensions.reduce(IterableExtensions.flatMap(problem.getRequests(), _function_1), _function_2); + int _multiply = ((_reduce).intValue() * 5); + String _plus_1 = ("Additional cost: " + Integer.valueOf(_multiply)); + InputOutput.println(_plus_1); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin index cdfe3921..a727fe17 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin index 9be64b30..8217bf52 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsSolver.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsSolver.xtendbin index 02fb74ef..1462e776 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsSolver.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsSolver.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.gitignore index e24f10f4..2338336b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.gitignore @@ -1,3 +1,9 @@ /.RuleBasedCpsSolver.java._trace /.RuleBasedCpsMain.java._trace /.CpsStateCoder.java._trace +/.CpsStateCoder.xtendbin +/.RuleBasedCpsMain.xtendbin +/.RuleBasedCpsSolver.xtendbin +/CpsStateCoder.java +/RuleBasedCpsMain.java +/RuleBasedCpsSolver.java diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin index d975ffab..306f031b 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.gitignore index d5d16f2e..716ffd30 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.gitignore @@ -1 +1,3 @@ /.CpsGenerator.java._trace +/.CpsGenerator.xtendbin +/CpsGenerator.java diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin new file mode 100644 index 00000000..9d288343 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin new file mode 100644 index 00000000..46cce8d1 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NonRedundantAllocationsConstraint.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NonRedundantAllocationsConstraint.xtendbin new file mode 100644 index 00000000..667c165b Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NonRedundantAllocationsConstraint.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NotAllocatedAppInstancesConstraint.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NotAllocatedAppInstancesConstraint.xtendbin new file mode 100644 index 00000000..b1b1967a Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NotAllocatedAppInstancesConstraint.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NotSatisfiedRequirementsConstraint.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NotSatisfiedRequirementsConstraint.xtendbin new file mode 100644 index 00000000..b4385fa3 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.NotSatisfiedRequirementsConstraint.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ResourceUtilizationUtil.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ResourceUtilizationUtil.xtendbin new file mode 100644 index 00000000..a46e86d4 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ResourceUtilizationUtil.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TooLowAverageHddConstraint.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TooLowAverageHddConstraint.xtendbin new file mode 100644 index 00000000..5a6b7da0 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TooLowAverageHddConstraint.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TooLowAverageMemoryConstraint.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TooLowAverageMemoryConstraint.xtendbin new file mode 100644 index 00000000..5b1f5002 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TooLowAverageMemoryConstraint.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TotalCostFitnessFunction.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TotalCostFitnessFunction.xtendbin new file mode 100644 index 00000000..fdfd8717 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.TotalCostFitnessFunction.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.UnavailableHddConstraint.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.UnavailableHddConstraint.xtendbin new file mode 100644 index 00000000..43ca6549 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.UnavailableHddConstraint.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.UnavailableMemoryConstraint.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.UnavailableMemoryConstraint.xtendbin new file mode 100644 index 00000000..aff12eca Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.UnavailableMemoryConstraint.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.gitignore new file mode 100644 index 00000000..51a2537b --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.gitignore @@ -0,0 +1,15 @@ +/.TotalCostFitnessFunction.java._trace +/.CpsMdeOptimiserMain.java._trace +/.ExcludedOptimisationInterpreter.java._trace +/.ExcludedMoeaOptimisation.java._trace +/.ExcludedRun.java._trace +/.SatisfiedRequirementsConstraint.java._trace +/.NotSatisfiedRequirementsConstraint.java._trace +/.NotAllocatedAppInstancesConstraint.java._trace +/.NonRedundantAllocationsConstraint.java._trace +/.UnavailableMemoryConstraint.java._trace +/.ResourceUtilizationUtil.java._trace +/.UnavailableHddConstraint.java._trace +/.TooLowAverageMemoryConstraint.java._trace +/.TooLowAverageHddUtilization.java._trace +/.TooLowAverageHddConstraint.java._trace diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java new file mode 100644 index 00000000..288505a1 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java @@ -0,0 +1,46 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import com.google.inject.Injector; +import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator; +import hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.ExcludedRun; +import java.util.Map; +import org.eclipse.emf.common.util.URI; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.xtext.xbase.lib.CollectionLiterals; +import org.eclipse.xtext.xbase.lib.Exceptions; +import uk.ac.kcl.inf.mdeoptimiser.languages.MoptStandaloneSetup; + +@SuppressWarnings("all") +public class CpsMdeOptimiserMain { + private static final String PROJECT_PATH = "."; + + private static final String PROBLEM_PATH = "model/problem.xmi"; + + private static final String MOPT_PATH = "src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt"; + + private CpsMdeOptimiserMain() { + new IllegalStateException("This is a static utility class and should not be instantiated directly."); + } + + public static void main(final String[] args) { + try { + Map _extensionToFactoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(); + XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); + _extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, _xMIResourceFactoryImpl); + EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE); + final CpsGenerator generator = new CpsGenerator(1, 4, 2); + final CyberPhysicalSystem problem = generator.generateCpsProblem(); + Resource _eResource = problem.eResource(); + _eResource.setURI(URI.createFileURI(CpsMdeOptimiserMain.PROBLEM_PATH)); + problem.eResource().save(CollectionLiterals.emptyMap()); + final Injector injector = new MoptStandaloneSetup().createInjectorAndDoEMFRegistration(); + injector.getInstance(ExcludedRun.class).run(CpsMdeOptimiserMain.PROJECT_PATH, CpsMdeOptimiserMain.MOPT_PATH); + } catch (Throwable _e) { + throw Exceptions.sneakyThrow(_e); + } + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java new file mode 100644 index 00000000..52d3f665 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java @@ -0,0 +1,54 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import java.util.Properties; +import org.moeaframework.Executor; +import org.moeaframework.Instrumenter; +import org.moeaframework.algorithm.PeriodicAction; +import org.moeaframework.core.TerminationCondition; +import org.moeaframework.core.spi.AlgorithmFactory; +import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.AlgorithmSpec; +import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.SolverSpec; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.executor.SolutionGenerator; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.MoeaOptimisation; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.algorithms.MoeaOptimisationAlgorithmProvider; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.instrumentation.PopulationCollector; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.problem.MoeaOptimisationProblem; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.operators.adaptation.MutationStepSizeStrategy; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.operators.adaptation.MutationStepSizeStrategyFactory; + +@SuppressWarnings("all") +public class ExcludedMoeaOptimisation extends MoeaOptimisation { + private SolutionGenerator solutionGenerator; + + private Instrumenter algorithmStepSizeInstrumenter; + + @Override + public Instrumenter execute(final SolverSpec solverSpec, final SolutionGenerator solutionGenerator) { + Instrumenter _xblockexpression = null; + { + this.solutionGenerator = solutionGenerator; + _xblockexpression = super.execute(solverSpec, solutionGenerator); + } + return _xblockexpression; + } + + @Override + public Instrumenter runOptimisation(final SolverSpec solverSpec, final Properties optimisationProperties) { + final AlgorithmFactory algorithmFactory = new AlgorithmFactory(); + MoeaOptimisationAlgorithmProvider _moeaOptimisationAlgorithmProvider = new MoeaOptimisationAlgorithmProvider(); + algorithmFactory.addProvider(_moeaOptimisationAlgorithmProvider); + Instrumenter _attachPopulationSizeCollector = new Instrumenter().addExcludedPackage("org.eclipse").withProblemClass( + MoeaOptimisationProblem.class, this.solutionGenerator).attachApproximationSetCollector().attachElapsedTimeCollector().attachPopulationSizeCollector(); + PopulationCollector _populationCollector = new PopulationCollector(); + this.algorithmStepSizeInstrumenter = _attachPopulationSizeCollector.attach(_populationCollector).withFrequency(1).withFrequencyType( + PeriodicAction.FrequencyType.STEPS); + AlgorithmSpec _algorithm = solverSpec.getAlgorithm(); + MutationStepSizeStrategy stepSizeStrategy = new MutationStepSizeStrategyFactory(_algorithm, this.algorithmStepSizeInstrumenter).getStrategy(); + this.solutionGenerator.setMutationStepSizeStrategy(stepSizeStrategy); + this.algorithmStepSizeInstrumenter.addExcludedPackage("jdk"); + Object _get = optimisationProperties.get("terminationCondition"); + new Executor().usingAlgorithmFactory(algorithmFactory).withAlgorithm(solverSpec.getAlgorithm().getName()).withProblemClass(MoeaOptimisationProblem.class, this.solutionGenerator).withProperties(optimisationProperties).withInstrumenter(this.algorithmStepSizeInstrumenter).withTerminationCondition( + ((TerminationCondition) _get)).run(); + return this.algorithmStepSizeInstrumenter; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.java new file mode 100644 index 00000000..90641d73 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.java @@ -0,0 +1,31 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.ExcludedMoeaOptimisation; +import java.util.List; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.henshin.model.Unit; +import org.moeaframework.Instrumenter; +import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.Optimisation; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IModelProvider; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.OptimisationInterpreter; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.executor.SolutionGenerator; + +@SuppressWarnings("all") +public class ExcludedOptimisationInterpreter extends OptimisationInterpreter { + private final Optimisation model; + + public ExcludedOptimisationInterpreter(final String projectPath, final Optimisation model) { + super(projectPath, model); + this.model = model; + } + + @Override + public Instrumenter start() { + List _breedingOperators = this.getBreedingOperators(); + List _mutationOperators = this.getMutationOperators(); + IModelProvider _modelProvider = this.getModelProvider(); + EPackage _metamodel = this.getMetamodel(); + SolutionGenerator solutionGenerator = new SolutionGenerator(this.model, _breedingOperators, _mutationOperators, _modelProvider, _metamodel); + return new ExcludedMoeaOptimisation().execute(this.model.getSolver(), solutionGenerator); + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedRun.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedRun.java new file mode 100644 index 00000000..76f12e79 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedRun.java @@ -0,0 +1,24 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.ExcludedOptimisationInterpreter; +import java.util.List; +import java.util.Map; +import org.eclipse.emf.ecore.EPackage; +import org.moeaframework.Instrumenter; +import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run; +import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.Optimisation; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.output.MDEOBatch; + +@SuppressWarnings("all") +public class ExcludedRun extends Run { + @Override + public MDEOBatch runBatch(final String moptProjectPath, final Optimisation optimisationModel, final Integer batch, final boolean singleBatch) { + final ExcludedOptimisationInterpreter optimisationInterpreter = new ExcludedOptimisationInterpreter(moptProjectPath, optimisationModel); + final long startTime = System.nanoTime(); + final Instrumenter optimisationOutcome = optimisationInterpreter.start(); + final long endTime = System.nanoTime(); + final long experimentDuration = ((endTime - startTime) / 1000000); + final Map> generatedRules = optimisationInterpreter.getRulegenOperators(); + return new MDEOBatch(batch, experimentDuration, optimisationOutcome, generatedRules, singleBatch); + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.java new file mode 100644 index 00000000..6100d821 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.java @@ -0,0 +1,54 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import com.google.common.collect.HashMultiset; +import com.google.common.collect.Multiset; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; +import java.util.Set; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution; + +@SuppressWarnings("all") +public class NonRedundantAllocationsConstraint implements IGuidanceFunction { + @Override + public String getName() { + return "NonRedundantAllocations"; + } + + @Override + public double computeFitness(final Solution solution) { + int _xblockexpression = (int) 0; + { + EObject _model = solution.getModel(); + final CyberPhysicalSystem cps = ((CyberPhysicalSystem) _model); + int cost = 0; + EList _hostTypes = cps.getHostTypes(); + for (final HostType hostType : _hostTypes) { + EList _instances = hostType.getInstances(); + for (final HostInstance host : _instances) { + { + final HashMultiset bins = HashMultiset.create(); + EList _applications = host.getApplications(); + for (final ApplicationInstance app : _applications) { + bins.add(app.getRequirement()); + } + Set> _entrySet = bins.entrySet(); + for (final Multiset.Entry entry : _entrySet) { + int _cost = cost; + int _count = entry.getCount(); + int _minus = (_count - 1); + cost = (_cost + _minus); + } + } + } + } + _xblockexpression = cost; + } + return _xblockexpression; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.java new file mode 100644 index 00000000..e9ade5de --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.java @@ -0,0 +1,47 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import com.google.common.base.Objects; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution; + +@SuppressWarnings("all") +public class NotAllocatedAppInstancesConstraint implements IGuidanceFunction { + @Override + public String getName() { + return "NotAllocatedAppInstances"; + } + + @Override + public double computeFitness(final Solution solution) { + int _xblockexpression = (int) 0; + { + EObject _model = solution.getModel(); + final CyberPhysicalSystem cps = ((CyberPhysicalSystem) _model); + int cost = 0; + EList _applicationTypes = cps.getApplicationTypes(); + for (final ApplicationType appType : _applicationTypes) { + EList _instances = appType.getInstances(); + for (final ApplicationInstance app : _instances) { + if (((app.getAllocatedTo() == null) || (!IterableExtensions.exists(appType.getRequirements(), ((Function1) (ResourceRequirement it) -> { + HostType _hostType = it.getHostType(); + HostType _type = app.getAllocatedTo().getType(); + return Boolean.valueOf(Objects.equal(_hostType, _type)); + }))))) { + cost++; + } + } + } + _xblockexpression = cost; + } + return _xblockexpression; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.java new file mode 100644 index 00000000..34f73952 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.java @@ -0,0 +1,55 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import com.google.common.base.Objects; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.Request; +import hu.bme.mit.inf.dslreasoner.domains.cps.Requirement; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution; + +@SuppressWarnings("all") +public class NotSatisfiedRequirementsConstraint implements IGuidanceFunction { + @Override + public String getName() { + return "NotSatisfiedRequirements"; + } + + @Override + public double computeFitness(final Solution solution) { + int _xblockexpression = (int) 0; + { + EObject _model = solution.getModel(); + final CyberPhysicalSystem cps = ((CyberPhysicalSystem) _model); + int cost = 0; + EList _requests = cps.getRequests(); + for (final Request request : _requests) { + EList _requirements = request.getRequirements(); + for (final Requirement requirement : _requirements) { + { + int _cost = cost; + int _count = requirement.getCount(); + int _size = requirement.getInstances().size(); + int _minus = (_count - _size); + int _abs = Math.abs(_minus); + cost = (_cost + _abs); + EList _instances = requirement.getInstances(); + for (final ApplicationInstance app : _instances) { + ApplicationType _type = app.getType(); + ApplicationType _type_1 = requirement.getType(); + boolean _notEquals = (!Objects.equal(_type, _type_1)); + if (_notEquals) { + cost++; + } + } + } + } + } + _xblockexpression = cost; + } + return _xblockexpression; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.java new file mode 100644 index 00000000..a03213e3 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.java @@ -0,0 +1,67 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import com.google.common.base.Objects; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.ResourceRequirement; +import org.eclipse.emf.common.util.EList; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; + +@SuppressWarnings("all") +public class ResourceUtilizationUtil { + private ResourceUtilizationUtil() { + new IllegalStateException("This is a static utility class and should not be instantiated directly."); + } + + public static int getMemoryUtilization(final HostInstance host) { + int _xblockexpression = (int) 0; + { + int utilization = 0; + EList _applications = host.getApplications(); + for (final ApplicationInstance app : _applications) { + { + final Function1 _function = (ResourceRequirement it) -> { + HostType _hostType = it.getHostType(); + HostType _type = host.getType(); + return Boolean.valueOf(Objects.equal(_hostType, _type)); + }; + final ResourceRequirement req = IterableExtensions.findFirst(app.getType().getRequirements(), _function); + if ((req != null)) { + int _utilization = utilization; + int _requiredMemory = req.getRequiredMemory(); + utilization = (_utilization + _requiredMemory); + } + } + } + _xblockexpression = utilization; + } + return _xblockexpression; + } + + public static int getHddUtilization(final HostInstance host) { + int _xblockexpression = (int) 0; + { + int utilization = 0; + EList _applications = host.getApplications(); + for (final ApplicationInstance app : _applications) { + { + final Function1 _function = (ResourceRequirement it) -> { + HostType _hostType = it.getHostType(); + HostType _type = host.getType(); + return Boolean.valueOf(Objects.equal(_hostType, _type)); + }; + final ResourceRequirement req = IterableExtensions.findFirst(app.getType().getRequirements(), _function); + if ((req != null)) { + int _utilization = utilization; + int _requiredHdd = req.getRequiredHdd(); + utilization = (_utilization + _requiredHdd); + } + } + } + _xblockexpression = utilization; + } + return _xblockexpression; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.java new file mode 100644 index 00000000..0ff3c795 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.java @@ -0,0 +1,59 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.ResourceUtilizationUtil; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution; + +@SuppressWarnings("all") +public class TooLowAverageHddConstraint implements IGuidanceFunction { + private static final double THRESHOLD = 0.25; + + @Override + public String getName() { + return "TooLowAverageHdd"; + } + + @Override + public double computeFitness(final Solution solution) { + double _xblockexpression = (double) 0; + { + EObject _model = solution.getModel(); + final CyberPhysicalSystem cps = ((CyberPhysicalSystem) _model); + double sumUtilization = 0; + int numHosts = 0; + EList _hostTypes = cps.getHostTypes(); + for (final HostType hostType : _hostTypes) { + { + int _numHosts = numHosts; + int _size = hostType.getInstances().size(); + numHosts = (_numHosts + _size); + EList _instances = hostType.getInstances(); + for (final HostInstance host : _instances) { + { + final int utilization = ResourceUtilizationUtil.getHddUtilization(host); + double _sumUtilization = sumUtilization; + int _defaultHdd = hostType.getDefaultHdd(); + double _divide = (((double) utilization) / _defaultHdd); + sumUtilization = (_sumUtilization + _divide); + } + } + } + } + final double averageUtilization = (sumUtilization / numHosts); + final double difference = (TooLowAverageHddConstraint.THRESHOLD - averageUtilization); + double _xifexpression = (double) 0; + if ((difference > 0)) { + _xifexpression = difference; + } else { + _xifexpression = 0; + } + _xblockexpression = _xifexpression; + } + return _xblockexpression; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.java new file mode 100644 index 00000000..341925bc --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.java @@ -0,0 +1,59 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.ResourceUtilizationUtil; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution; + +@SuppressWarnings("all") +public class TooLowAverageMemoryConstraint implements IGuidanceFunction { + private static final double THRESHOLD = 0.25; + + @Override + public String getName() { + return "TooLowAverageMemory"; + } + + @Override + public double computeFitness(final Solution solution) { + double _xblockexpression = (double) 0; + { + EObject _model = solution.getModel(); + final CyberPhysicalSystem cps = ((CyberPhysicalSystem) _model); + double sumUtilization = 0; + int numHosts = 0; + EList _hostTypes = cps.getHostTypes(); + for (final HostType hostType : _hostTypes) { + { + int _numHosts = numHosts; + int _size = hostType.getInstances().size(); + numHosts = (_numHosts + _size); + EList _instances = hostType.getInstances(); + for (final HostInstance host : _instances) { + { + final int utilization = ResourceUtilizationUtil.getMemoryUtilization(host); + double _sumUtilization = sumUtilization; + int _defaultMemory = hostType.getDefaultMemory(); + double _divide = (((double) utilization) / _defaultMemory); + sumUtilization = (_sumUtilization + _divide); + } + } + } + } + final double averageUtilization = (sumUtilization / numHosts); + final double difference = (TooLowAverageMemoryConstraint.THRESHOLD - averageUtilization); + double _xifexpression = (double) 0; + if ((difference > 0)) { + _xifexpression = difference; + } else { + _xifexpression = 0; + } + _xblockexpression = _xifexpression; + } + return _xblockexpression; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.java new file mode 100644 index 00000000..7bb80ca8 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.java @@ -0,0 +1,44 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution; + +@SuppressWarnings("all") +public class TotalCostFitnessFunction implements IGuidanceFunction { + @Override + public String getName() { + return "TotalCost"; + } + + @Override + public double computeFitness(final Solution solution) { + int _xblockexpression = (int) 0; + { + EObject _model = solution.getModel(); + final CyberPhysicalSystem cps = ((CyberPhysicalSystem) _model); + int cost = 0; + EList _applicationTypes = cps.getApplicationTypes(); + for (final ApplicationType appType : _applicationTypes) { + int _cost = cost; + int _size = appType.getInstances().size(); + int _multiply = (5 * _size); + cost = (_cost + _multiply); + } + EList _hostTypes = cps.getHostTypes(); + for (final HostType hostType : _hostTypes) { + int _cost_1 = cost; + int _cost_2 = hostType.getCost(); + int _size_1 = hostType.getInstances().size(); + int _multiply_1 = (_cost_2 * _size_1); + cost = (_cost_1 + _multiply_1); + } + _xblockexpression = cost; + } + return _xblockexpression; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.java new file mode 100644 index 00000000..00d1c4e6 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.java @@ -0,0 +1,45 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.ResourceUtilizationUtil; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution; + +@SuppressWarnings("all") +public class UnavailableHddConstraint implements IGuidanceFunction { + @Override + public String getName() { + return "UnavailableHdd"; + } + + @Override + public double computeFitness(final Solution solution) { + int _xblockexpression = (int) 0; + { + EObject _model = solution.getModel(); + final CyberPhysicalSystem cps = ((CyberPhysicalSystem) _model); + int cost = 0; + EList _hostTypes = cps.getHostTypes(); + for (final HostType hostType : _hostTypes) { + EList _instances = hostType.getInstances(); + for (final HostInstance host : _instances) { + { + final int utilization = ResourceUtilizationUtil.getHddUtilization(host); + int _defaultHdd = hostType.getDefaultHdd(); + final int difference = (utilization - _defaultHdd); + if ((difference > 0)) { + int _cost = cost; + cost = (_cost + difference); + } + } + } + } + _xblockexpression = cost; + } + return _xblockexpression; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.java new file mode 100644 index 00000000..a9be9f1f --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.java @@ -0,0 +1,45 @@ +package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; + +import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance; +import hu.bme.mit.inf.dslreasoner.domains.cps.HostType; +import hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.ResourceUtilizationUtil; +import org.eclipse.emf.common.util.EList; +import org.eclipse.emf.ecore.EObject; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution; + +@SuppressWarnings("all") +public class UnavailableMemoryConstraint implements IGuidanceFunction { + @Override + public String getName() { + return "UnavailableMemory"; + } + + @Override + public double computeFitness(final Solution solution) { + int _xblockexpression = (int) 0; + { + EObject _model = solution.getModel(); + final CyberPhysicalSystem cps = ((CyberPhysicalSystem) _model); + int cost = 0; + EList _hostTypes = cps.getHostTypes(); + for (final HostType hostType : _hostTypes) { + EList _instances = hostType.getInstances(); + for (final HostInstance host : _instances) { + { + final int utilization = ResourceUtilizationUtil.getMemoryUtilization(host); + int _defaultMemory = hostType.getDefaultMemory(); + final int difference = (utilization - _defaultMemory); + if ((difference > 0)) { + int _cost = cost; + cost = (_cost + difference); + } + } + } + } + _xblockexpression = cost; + } + return _xblockexpression; + } +} -- cgit v1.2.3-54-g00ecf From 89fe6051866933495237f0c733147700275b9549 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Sat, 25 May 2019 15:00:10 -0400 Subject: MDEOptimiser tuning for CPS --- .../.gitignore | 5 + .../model/cps.henshin | 346 ++- .../model/cps.henshin_diagram | 293 +++ .../problem.lp | 2483 -------------------- .../problem.xmi | 49 - .../solution.txt | 55 - .../dslreasoner/domains/cps/cplex/CbcCpsMain.xtend | 21 +- .../domains/cps/dse/RuleBasedCpsMain.xtend | 2 +- .../domains/cps/generator/CpsGenerator.xtend | 14 + .../domains/cps/mdeo/CpsMdeOptimiserMain.xtend | 29 +- .../mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt | 12 +- .../domains/cps/cplex/.CbcCpsMain.xtendbin | Bin 6363 -> 7229 bytes .../domains/cps/cplex/.CpsToLpTranslator.xtendbin | Bin 11104 -> 11104 bytes .../dslreasoner/domains/cps/cplex/CbcCpsMain.java | 40 +- .../domains/cps/dse/.CpsStateCoder.xtendbin | Bin 7626 -> 7626 bytes .../domains/cps/dse/.RuleBasedCpsMain.xtendbin | Bin 5189 -> 5193 bytes .../domains/cps/generator/.CpsGenerator.xtendbin | Bin 8807 -> 9849 bytes .../domains/cps/generator/CpsGenerator.java | 23 + .../domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin | Bin 4969 -> 6286 bytes .../mdeo/.ExcludedOptimisationInterpreter.xtendbin | Bin 7559 -> 7559 bytes .../domains/cps/mdeo/CpsMdeOptimiserMain.java | 41 +- 21 files changed, 747 insertions(+), 2666 deletions(-) delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.lp delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.xmi delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/solution.txt (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.gitignore index ae3c1726..a71b16b9 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/.gitignore @@ -1 +1,6 @@ /bin/ +/problem.lp +/solution.txt +/model/cps_fixup.henshin +/model/problem.xmi +/mdeo-results diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin index 21e35a56..a4f4f576 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin @@ -132,59 +132,112 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -255,4 +308,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin_diagram b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin_diagram index 54bc3a6d..985ff350 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin_diagram +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/model/cps.henshin_diagram @@ -186,6 +186,16 @@ + + + + + + + + + + @@ -220,6 +230,136 @@ + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -403,4 +543,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.lp b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.lp deleted file mode 100644 index a380d816..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.lp +++ /dev/null @@ -1,2483 +0,0 @@ -Minimize - total_cost: 2 h0i0_exists + 2 h0i1_exists + 2 h0i2_exists + 2 h0i3_exists + 2 h0i4_exists + 2 h0i5_exists + 2 h0i6_exists + 2 h0i7_exists + 2 h0i8_exists + 2 h0i9_exists + 4 h1i0_exists + 4 h1i1_exists + 4 h1i2_exists + 4 h1i3_exists + 4 h1i4_exists + 4 h1i5_exists + 4 h1i6_exists + 4 h1i7_exists + 4 h1i8_exists + 4 h1i9_exists + 3 h2i0_exists + 3 h2i1_exists + 3 h2i2_exists + 3 h2i3_exists + 3 h2i4_exists + 3 h2i5_exists + 3 h2i6_exists + 3 h2i7_exists + 3 h2i8_exists + 3 h2i9_exists + 6 h3i0_exists + 6 h3i1_exists + 6 h3i2_exists + 6 h3i3_exists + 6 h3i4_exists + 6 h3i5_exists + 6 h3i6_exists + 6 h3i7_exists + 6 h3i8_exists + 6 h3i9_exists + 2 h4i0_exists + 2 h4i1_exists + 2 h4i2_exists + 2 h4i3_exists + 2 h4i4_exists + 2 h4i5_exists + 2 h4i6_exists + 2 h4i7_exists + 2 h4i8_exists + 2 h4i9_exists + 4 h5i0_exists + 4 h5i1_exists + 4 h5i2_exists + 4 h5i3_exists + 4 h5i4_exists + 4 h5i5_exists + 4 h5i6_exists + 4 h5i7_exists + 4 h5i8_exists + 4 h5i9_exists -Subject To - r0a0_allocated: r0a0_to_h4i0 + r0a0_to_h4i1 + r0a0_to_h4i2 + r0a0_to_h4i3 + r0a0_to_h4i4 + r0a0_to_h4i5 + r0a0_to_h4i6 + r0a0_to_h4i7 + r0a0_to_h4i8 + r0a0_to_h4i9 + r0a0_to_h5i0 + r0a0_to_h5i1 + r0a0_to_h5i2 + r0a0_to_h5i3 + r0a0_to_h5i4 + r0a0_to_h5i5 + r0a0_to_h5i6 + r0a0_to_h5i7 + r0a0_to_h5i8 + r0a0_to_h5i9 = 1 - r0a0_to_h4i0_exists: h4i0_exists - r0a0_to_h4i0 >= 0 - r0a0_to_h4i1_exists: h4i1_exists - r0a0_to_h4i1 >= 0 - r0a0_to_h4i2_exists: h4i2_exists - r0a0_to_h4i2 >= 0 - r0a0_to_h4i3_exists: h4i3_exists - r0a0_to_h4i3 >= 0 - r0a0_to_h4i4_exists: h4i4_exists - r0a0_to_h4i4 >= 0 - r0a0_to_h4i5_exists: h4i5_exists - r0a0_to_h4i5 >= 0 - r0a0_to_h4i6_exists: h4i6_exists - r0a0_to_h4i6 >= 0 - r0a0_to_h4i7_exists: h4i7_exists - r0a0_to_h4i7 >= 0 - r0a0_to_h4i8_exists: h4i8_exists - r0a0_to_h4i8 >= 0 - r0a0_to_h4i9_exists: h4i9_exists - r0a0_to_h4i9 >= 0 - r0a0_to_h5i0_exists: h5i0_exists - r0a0_to_h5i0 >= 0 - r0a0_to_h5i1_exists: h5i1_exists - r0a0_to_h5i1 >= 0 - r0a0_to_h5i2_exists: h5i2_exists - r0a0_to_h5i2 >= 0 - r0a0_to_h5i3_exists: h5i3_exists - r0a0_to_h5i3 >= 0 - r0a0_to_h5i4_exists: h5i4_exists - r0a0_to_h5i4 >= 0 - r0a0_to_h5i5_exists: h5i5_exists - r0a0_to_h5i5 >= 0 - r0a0_to_h5i6_exists: h5i6_exists - r0a0_to_h5i6 >= 0 - r0a0_to_h5i7_exists: h5i7_exists - r0a0_to_h5i7 >= 0 - r0a0_to_h5i8_exists: h5i8_exists - r0a0_to_h5i8 >= 0 - r0a0_to_h5i9_exists: h5i9_exists - r0a0_to_h5i9 >= 0 - r0a1_allocated: r0a1_to_h4i0 + r0a1_to_h4i1 + r0a1_to_h4i2 + r0a1_to_h4i3 + r0a1_to_h4i4 + r0a1_to_h4i5 + r0a1_to_h4i6 + r0a1_to_h4i7 + r0a1_to_h4i8 + r0a1_to_h4i9 + r0a1_to_h5i0 + r0a1_to_h5i1 + r0a1_to_h5i2 + r0a1_to_h5i3 + r0a1_to_h5i4 + r0a1_to_h5i5 + r0a1_to_h5i6 + r0a1_to_h5i7 + r0a1_to_h5i8 + r0a1_to_h5i9 = 1 - r0a1_to_h4i0_exists: h4i0_exists - r0a1_to_h4i0 >= 0 - r0a1_to_h4i1_exists: h4i1_exists - r0a1_to_h4i1 >= 0 - r0a1_to_h4i2_exists: h4i2_exists - r0a1_to_h4i2 >= 0 - r0a1_to_h4i3_exists: h4i3_exists - r0a1_to_h4i3 >= 0 - r0a1_to_h4i4_exists: h4i4_exists - r0a1_to_h4i4 >= 0 - r0a1_to_h4i5_exists: h4i5_exists - r0a1_to_h4i5 >= 0 - r0a1_to_h4i6_exists: h4i6_exists - r0a1_to_h4i6 >= 0 - r0a1_to_h4i7_exists: h4i7_exists - r0a1_to_h4i7 >= 0 - r0a1_to_h4i8_exists: h4i8_exists - r0a1_to_h4i8 >= 0 - r0a1_to_h4i9_exists: h4i9_exists - r0a1_to_h4i9 >= 0 - r0a1_to_h5i0_exists: h5i0_exists - r0a1_to_h5i0 >= 0 - r0a1_to_h5i1_exists: h5i1_exists - r0a1_to_h5i1 >= 0 - r0a1_to_h5i2_exists: h5i2_exists - r0a1_to_h5i2 >= 0 - r0a1_to_h5i3_exists: h5i3_exists - r0a1_to_h5i3 >= 0 - r0a1_to_h5i4_exists: h5i4_exists - r0a1_to_h5i4 >= 0 - r0a1_to_h5i5_exists: h5i5_exists - r0a1_to_h5i5 >= 0 - r0a1_to_h5i6_exists: h5i6_exists - r0a1_to_h5i6 >= 0 - r0a1_to_h5i7_exists: h5i7_exists - r0a1_to_h5i7 >= 0 - r0a1_to_h5i8_exists: h5i8_exists - r0a1_to_h5i8 >= 0 - r0a1_to_h5i9_exists: h5i9_exists - r0a1_to_h5i9 >= 0 - r0a2_allocated: r0a2_to_h4i0 + r0a2_to_h4i1 + r0a2_to_h4i2 + r0a2_to_h4i3 + r0a2_to_h4i4 + r0a2_to_h4i5 + r0a2_to_h4i6 + r0a2_to_h4i7 + r0a2_to_h4i8 + r0a2_to_h4i9 + r0a2_to_h5i0 + r0a2_to_h5i1 + r0a2_to_h5i2 + r0a2_to_h5i3 + r0a2_to_h5i4 + r0a2_to_h5i5 + r0a2_to_h5i6 + r0a2_to_h5i7 + r0a2_to_h5i8 + r0a2_to_h5i9 = 1 - r0a2_to_h4i0_exists: h4i0_exists - r0a2_to_h4i0 >= 0 - r0a2_to_h4i1_exists: h4i1_exists - r0a2_to_h4i1 >= 0 - r0a2_to_h4i2_exists: h4i2_exists - r0a2_to_h4i2 >= 0 - r0a2_to_h4i3_exists: h4i3_exists - r0a2_to_h4i3 >= 0 - r0a2_to_h4i4_exists: h4i4_exists - r0a2_to_h4i4 >= 0 - r0a2_to_h4i5_exists: h4i5_exists - r0a2_to_h4i5 >= 0 - r0a2_to_h4i6_exists: h4i6_exists - r0a2_to_h4i6 >= 0 - r0a2_to_h4i7_exists: h4i7_exists - r0a2_to_h4i7 >= 0 - r0a2_to_h4i8_exists: h4i8_exists - r0a2_to_h4i8 >= 0 - r0a2_to_h4i9_exists: h4i9_exists - r0a2_to_h4i9 >= 0 - r0a2_to_h5i0_exists: h5i0_exists - r0a2_to_h5i0 >= 0 - r0a2_to_h5i1_exists: h5i1_exists - r0a2_to_h5i1 >= 0 - r0a2_to_h5i2_exists: h5i2_exists - r0a2_to_h5i2 >= 0 - r0a2_to_h5i3_exists: h5i3_exists - r0a2_to_h5i3 >= 0 - r0a2_to_h5i4_exists: h5i4_exists - r0a2_to_h5i4 >= 0 - r0a2_to_h5i5_exists: h5i5_exists - r0a2_to_h5i5 >= 0 - r0a2_to_h5i6_exists: h5i6_exists - r0a2_to_h5i6 >= 0 - r0a2_to_h5i7_exists: h5i7_exists - r0a2_to_h5i7 >= 0 - r0a2_to_h5i8_exists: h5i8_exists - r0a2_to_h5i8 >= 0 - r0a2_to_h5i9_exists: h5i9_exists - r0a2_to_h5i9 >= 0 - r0a3_allocated: r0a3_to_h4i0 + r0a3_to_h4i1 + r0a3_to_h4i2 + r0a3_to_h4i3 + r0a3_to_h4i4 + r0a3_to_h4i5 + r0a3_to_h4i6 + r0a3_to_h4i7 + r0a3_to_h4i8 + r0a3_to_h4i9 + r0a3_to_h5i0 + r0a3_to_h5i1 + r0a3_to_h5i2 + r0a3_to_h5i3 + r0a3_to_h5i4 + r0a3_to_h5i5 + r0a3_to_h5i6 + r0a3_to_h5i7 + r0a3_to_h5i8 + r0a3_to_h5i9 = 1 - r0a3_to_h4i0_exists: h4i0_exists - r0a3_to_h4i0 >= 0 - r0a3_to_h4i1_exists: h4i1_exists - r0a3_to_h4i1 >= 0 - r0a3_to_h4i2_exists: h4i2_exists - r0a3_to_h4i2 >= 0 - r0a3_to_h4i3_exists: h4i3_exists - r0a3_to_h4i3 >= 0 - r0a3_to_h4i4_exists: h4i4_exists - r0a3_to_h4i4 >= 0 - r0a3_to_h4i5_exists: h4i5_exists - r0a3_to_h4i5 >= 0 - r0a3_to_h4i6_exists: h4i6_exists - r0a3_to_h4i6 >= 0 - r0a3_to_h4i7_exists: h4i7_exists - r0a3_to_h4i7 >= 0 - r0a3_to_h4i8_exists: h4i8_exists - r0a3_to_h4i8 >= 0 - r0a3_to_h4i9_exists: h4i9_exists - r0a3_to_h4i9 >= 0 - r0a3_to_h5i0_exists: h5i0_exists - r0a3_to_h5i0 >= 0 - r0a3_to_h5i1_exists: h5i1_exists - r0a3_to_h5i1 >= 0 - r0a3_to_h5i2_exists: h5i2_exists - r0a3_to_h5i2 >= 0 - r0a3_to_h5i3_exists: h5i3_exists - r0a3_to_h5i3 >= 0 - r0a3_to_h5i4_exists: h5i4_exists - r0a3_to_h5i4 >= 0 - r0a3_to_h5i5_exists: h5i5_exists - r0a3_to_h5i5 >= 0 - r0a3_to_h5i6_exists: h5i6_exists - r0a3_to_h5i6 >= 0 - r0a3_to_h5i7_exists: h5i7_exists - r0a3_to_h5i7 >= 0 - r0a3_to_h5i8_exists: h5i8_exists - r0a3_to_h5i8 >= 0 - r0a3_to_h5i9_exists: h5i9_exists - r0a3_to_h5i9 >= 0 - r1a0_allocated: r1a0_to_h0i0 + r1a0_to_h0i1 + r1a0_to_h0i2 + r1a0_to_h0i3 + r1a0_to_h0i4 + r1a0_to_h0i5 + r1a0_to_h0i6 + r1a0_to_h0i7 + r1a0_to_h0i8 + r1a0_to_h0i9 + r1a0_to_h1i0 + r1a0_to_h1i1 + r1a0_to_h1i2 + r1a0_to_h1i3 + r1a0_to_h1i4 + r1a0_to_h1i5 + r1a0_to_h1i6 + r1a0_to_h1i7 + r1a0_to_h1i8 + r1a0_to_h1i9 + r1a0_to_h2i0 + r1a0_to_h2i1 + r1a0_to_h2i2 + r1a0_to_h2i3 + r1a0_to_h2i4 + r1a0_to_h2i5 + r1a0_to_h2i6 + r1a0_to_h2i7 + r1a0_to_h2i8 + r1a0_to_h2i9 + r1a0_to_h3i0 + r1a0_to_h3i1 + r1a0_to_h3i2 + r1a0_to_h3i3 + r1a0_to_h3i4 + r1a0_to_h3i5 + r1a0_to_h3i6 + r1a0_to_h3i7 + r1a0_to_h3i8 + r1a0_to_h3i9 + r1a0_to_h4i0 + r1a0_to_h4i1 + r1a0_to_h4i2 + r1a0_to_h4i3 + r1a0_to_h4i4 + r1a0_to_h4i5 + r1a0_to_h4i6 + r1a0_to_h4i7 + r1a0_to_h4i8 + r1a0_to_h4i9 + r1a0_to_h5i0 + r1a0_to_h5i1 + r1a0_to_h5i2 + r1a0_to_h5i3 + r1a0_to_h5i4 + r1a0_to_h5i5 + r1a0_to_h5i6 + r1a0_to_h5i7 + r1a0_to_h5i8 + r1a0_to_h5i9 = 1 - r1a0_to_h0i0_exists: h0i0_exists - r1a0_to_h0i0 >= 0 - r1a0_to_h0i1_exists: h0i1_exists - r1a0_to_h0i1 >= 0 - r1a0_to_h0i2_exists: h0i2_exists - r1a0_to_h0i2 >= 0 - r1a0_to_h0i3_exists: h0i3_exists - r1a0_to_h0i3 >= 0 - r1a0_to_h0i4_exists: h0i4_exists - r1a0_to_h0i4 >= 0 - r1a0_to_h0i5_exists: h0i5_exists - r1a0_to_h0i5 >= 0 - r1a0_to_h0i6_exists: h0i6_exists - r1a0_to_h0i6 >= 0 - r1a0_to_h0i7_exists: h0i7_exists - r1a0_to_h0i7 >= 0 - r1a0_to_h0i8_exists: h0i8_exists - r1a0_to_h0i8 >= 0 - r1a0_to_h0i9_exists: h0i9_exists - r1a0_to_h0i9 >= 0 - r1a0_to_h1i0_exists: h1i0_exists - r1a0_to_h1i0 >= 0 - r1a0_to_h1i1_exists: h1i1_exists - r1a0_to_h1i1 >= 0 - r1a0_to_h1i2_exists: h1i2_exists - r1a0_to_h1i2 >= 0 - r1a0_to_h1i3_exists: h1i3_exists - r1a0_to_h1i3 >= 0 - r1a0_to_h1i4_exists: h1i4_exists - r1a0_to_h1i4 >= 0 - r1a0_to_h1i5_exists: h1i5_exists - r1a0_to_h1i5 >= 0 - r1a0_to_h1i6_exists: h1i6_exists - r1a0_to_h1i6 >= 0 - r1a0_to_h1i7_exists: h1i7_exists - r1a0_to_h1i7 >= 0 - r1a0_to_h1i8_exists: h1i8_exists - r1a0_to_h1i8 >= 0 - r1a0_to_h1i9_exists: h1i9_exists - r1a0_to_h1i9 >= 0 - r1a0_to_h2i0_exists: h2i0_exists - r1a0_to_h2i0 >= 0 - r1a0_to_h2i1_exists: h2i1_exists - r1a0_to_h2i1 >= 0 - r1a0_to_h2i2_exists: h2i2_exists - r1a0_to_h2i2 >= 0 - r1a0_to_h2i3_exists: h2i3_exists - r1a0_to_h2i3 >= 0 - r1a0_to_h2i4_exists: h2i4_exists - r1a0_to_h2i4 >= 0 - r1a0_to_h2i5_exists: h2i5_exists - r1a0_to_h2i5 >= 0 - r1a0_to_h2i6_exists: h2i6_exists - r1a0_to_h2i6 >= 0 - r1a0_to_h2i7_exists: h2i7_exists - r1a0_to_h2i7 >= 0 - r1a0_to_h2i8_exists: h2i8_exists - r1a0_to_h2i8 >= 0 - r1a0_to_h2i9_exists: h2i9_exists - r1a0_to_h2i9 >= 0 - r1a0_to_h3i0_exists: h3i0_exists - r1a0_to_h3i0 >= 0 - r1a0_to_h3i1_exists: h3i1_exists - r1a0_to_h3i1 >= 0 - r1a0_to_h3i2_exists: h3i2_exists - r1a0_to_h3i2 >= 0 - r1a0_to_h3i3_exists: h3i3_exists - r1a0_to_h3i3 >= 0 - r1a0_to_h3i4_exists: h3i4_exists - r1a0_to_h3i4 >= 0 - r1a0_to_h3i5_exists: h3i5_exists - r1a0_to_h3i5 >= 0 - r1a0_to_h3i6_exists: h3i6_exists - r1a0_to_h3i6 >= 0 - r1a0_to_h3i7_exists: h3i7_exists - r1a0_to_h3i7 >= 0 - r1a0_to_h3i8_exists: h3i8_exists - r1a0_to_h3i8 >= 0 - r1a0_to_h3i9_exists: h3i9_exists - r1a0_to_h3i9 >= 0 - r1a0_to_h4i0_exists: h4i0_exists - r1a0_to_h4i0 >= 0 - r1a0_to_h4i1_exists: h4i1_exists - r1a0_to_h4i1 >= 0 - r1a0_to_h4i2_exists: h4i2_exists - r1a0_to_h4i2 >= 0 - r1a0_to_h4i3_exists: h4i3_exists - r1a0_to_h4i3 >= 0 - r1a0_to_h4i4_exists: h4i4_exists - r1a0_to_h4i4 >= 0 - r1a0_to_h4i5_exists: h4i5_exists - r1a0_to_h4i5 >= 0 - r1a0_to_h4i6_exists: h4i6_exists - r1a0_to_h4i6 >= 0 - r1a0_to_h4i7_exists: h4i7_exists - r1a0_to_h4i7 >= 0 - r1a0_to_h4i8_exists: h4i8_exists - r1a0_to_h4i8 >= 0 - r1a0_to_h4i9_exists: h4i9_exists - r1a0_to_h4i9 >= 0 - r1a0_to_h5i0_exists: h5i0_exists - r1a0_to_h5i0 >= 0 - r1a0_to_h5i1_exists: h5i1_exists - r1a0_to_h5i1 >= 0 - r1a0_to_h5i2_exists: h5i2_exists - r1a0_to_h5i2 >= 0 - r1a0_to_h5i3_exists: h5i3_exists - r1a0_to_h5i3 >= 0 - r1a0_to_h5i4_exists: h5i4_exists - r1a0_to_h5i4 >= 0 - r1a0_to_h5i5_exists: h5i5_exists - r1a0_to_h5i5 >= 0 - r1a0_to_h5i6_exists: h5i6_exists - r1a0_to_h5i6 >= 0 - r1a0_to_h5i7_exists: h5i7_exists - r1a0_to_h5i7 >= 0 - r1a0_to_h5i8_exists: h5i8_exists - r1a0_to_h5i8 >= 0 - r1a0_to_h5i9_exists: h5i9_exists - r1a0_to_h5i9 >= 0 - r1a1_allocated: r1a1_to_h0i0 + r1a1_to_h0i1 + r1a1_to_h0i2 + r1a1_to_h0i3 + r1a1_to_h0i4 + r1a1_to_h0i5 + r1a1_to_h0i6 + r1a1_to_h0i7 + r1a1_to_h0i8 + r1a1_to_h0i9 + r1a1_to_h1i0 + r1a1_to_h1i1 + r1a1_to_h1i2 + r1a1_to_h1i3 + r1a1_to_h1i4 + r1a1_to_h1i5 + r1a1_to_h1i6 + r1a1_to_h1i7 + r1a1_to_h1i8 + r1a1_to_h1i9 + r1a1_to_h2i0 + r1a1_to_h2i1 + r1a1_to_h2i2 + r1a1_to_h2i3 + r1a1_to_h2i4 + r1a1_to_h2i5 + r1a1_to_h2i6 + r1a1_to_h2i7 + r1a1_to_h2i8 + r1a1_to_h2i9 + r1a1_to_h3i0 + r1a1_to_h3i1 + r1a1_to_h3i2 + r1a1_to_h3i3 + r1a1_to_h3i4 + r1a1_to_h3i5 + r1a1_to_h3i6 + r1a1_to_h3i7 + r1a1_to_h3i8 + r1a1_to_h3i9 + r1a1_to_h4i0 + r1a1_to_h4i1 + r1a1_to_h4i2 + r1a1_to_h4i3 + r1a1_to_h4i4 + r1a1_to_h4i5 + r1a1_to_h4i6 + r1a1_to_h4i7 + r1a1_to_h4i8 + r1a1_to_h4i9 + r1a1_to_h5i0 + r1a1_to_h5i1 + r1a1_to_h5i2 + r1a1_to_h5i3 + r1a1_to_h5i4 + r1a1_to_h5i5 + r1a1_to_h5i6 + r1a1_to_h5i7 + r1a1_to_h5i8 + r1a1_to_h5i9 = 1 - r1a1_to_h0i0_exists: h0i0_exists - r1a1_to_h0i0 >= 0 - r1a1_to_h0i1_exists: h0i1_exists - r1a1_to_h0i1 >= 0 - r1a1_to_h0i2_exists: h0i2_exists - r1a1_to_h0i2 >= 0 - r1a1_to_h0i3_exists: h0i3_exists - r1a1_to_h0i3 >= 0 - r1a1_to_h0i4_exists: h0i4_exists - r1a1_to_h0i4 >= 0 - r1a1_to_h0i5_exists: h0i5_exists - r1a1_to_h0i5 >= 0 - r1a1_to_h0i6_exists: h0i6_exists - r1a1_to_h0i6 >= 0 - r1a1_to_h0i7_exists: h0i7_exists - r1a1_to_h0i7 >= 0 - r1a1_to_h0i8_exists: h0i8_exists - r1a1_to_h0i8 >= 0 - r1a1_to_h0i9_exists: h0i9_exists - r1a1_to_h0i9 >= 0 - r1a1_to_h1i0_exists: h1i0_exists - r1a1_to_h1i0 >= 0 - r1a1_to_h1i1_exists: h1i1_exists - r1a1_to_h1i1 >= 0 - r1a1_to_h1i2_exists: h1i2_exists - r1a1_to_h1i2 >= 0 - r1a1_to_h1i3_exists: h1i3_exists - r1a1_to_h1i3 >= 0 - r1a1_to_h1i4_exists: h1i4_exists - r1a1_to_h1i4 >= 0 - r1a1_to_h1i5_exists: h1i5_exists - r1a1_to_h1i5 >= 0 - r1a1_to_h1i6_exists: h1i6_exists - r1a1_to_h1i6 >= 0 - r1a1_to_h1i7_exists: h1i7_exists - r1a1_to_h1i7 >= 0 - r1a1_to_h1i8_exists: h1i8_exists - r1a1_to_h1i8 >= 0 - r1a1_to_h1i9_exists: h1i9_exists - r1a1_to_h1i9 >= 0 - r1a1_to_h2i0_exists: h2i0_exists - r1a1_to_h2i0 >= 0 - r1a1_to_h2i1_exists: h2i1_exists - r1a1_to_h2i1 >= 0 - r1a1_to_h2i2_exists: h2i2_exists - r1a1_to_h2i2 >= 0 - r1a1_to_h2i3_exists: h2i3_exists - r1a1_to_h2i3 >= 0 - r1a1_to_h2i4_exists: h2i4_exists - r1a1_to_h2i4 >= 0 - r1a1_to_h2i5_exists: h2i5_exists - r1a1_to_h2i5 >= 0 - r1a1_to_h2i6_exists: h2i6_exists - r1a1_to_h2i6 >= 0 - r1a1_to_h2i7_exists: h2i7_exists - r1a1_to_h2i7 >= 0 - r1a1_to_h2i8_exists: h2i8_exists - r1a1_to_h2i8 >= 0 - r1a1_to_h2i9_exists: h2i9_exists - r1a1_to_h2i9 >= 0 - r1a1_to_h3i0_exists: h3i0_exists - r1a1_to_h3i0 >= 0 - r1a1_to_h3i1_exists: h3i1_exists - r1a1_to_h3i1 >= 0 - r1a1_to_h3i2_exists: h3i2_exists - r1a1_to_h3i2 >= 0 - r1a1_to_h3i3_exists: h3i3_exists - r1a1_to_h3i3 >= 0 - r1a1_to_h3i4_exists: h3i4_exists - r1a1_to_h3i4 >= 0 - r1a1_to_h3i5_exists: h3i5_exists - r1a1_to_h3i5 >= 0 - r1a1_to_h3i6_exists: h3i6_exists - r1a1_to_h3i6 >= 0 - r1a1_to_h3i7_exists: h3i7_exists - r1a1_to_h3i7 >= 0 - r1a1_to_h3i8_exists: h3i8_exists - r1a1_to_h3i8 >= 0 - r1a1_to_h3i9_exists: h3i9_exists - r1a1_to_h3i9 >= 0 - r1a1_to_h4i0_exists: h4i0_exists - r1a1_to_h4i0 >= 0 - r1a1_to_h4i1_exists: h4i1_exists - r1a1_to_h4i1 >= 0 - r1a1_to_h4i2_exists: h4i2_exists - r1a1_to_h4i2 >= 0 - r1a1_to_h4i3_exists: h4i3_exists - r1a1_to_h4i3 >= 0 - r1a1_to_h4i4_exists: h4i4_exists - r1a1_to_h4i4 >= 0 - r1a1_to_h4i5_exists: h4i5_exists - r1a1_to_h4i5 >= 0 - r1a1_to_h4i6_exists: h4i6_exists - r1a1_to_h4i6 >= 0 - r1a1_to_h4i7_exists: h4i7_exists - r1a1_to_h4i7 >= 0 - r1a1_to_h4i8_exists: h4i8_exists - r1a1_to_h4i8 >= 0 - r1a1_to_h4i9_exists: h4i9_exists - r1a1_to_h4i9 >= 0 - r1a1_to_h5i0_exists: h5i0_exists - r1a1_to_h5i0 >= 0 - r1a1_to_h5i1_exists: h5i1_exists - r1a1_to_h5i1 >= 0 - r1a1_to_h5i2_exists: h5i2_exists - r1a1_to_h5i2 >= 0 - r1a1_to_h5i3_exists: h5i3_exists - r1a1_to_h5i3 >= 0 - r1a1_to_h5i4_exists: h5i4_exists - r1a1_to_h5i4 >= 0 - r1a1_to_h5i5_exists: h5i5_exists - r1a1_to_h5i5 >= 0 - r1a1_to_h5i6_exists: h5i6_exists - r1a1_to_h5i6 >= 0 - r1a1_to_h5i7_exists: h5i7_exists - r1a1_to_h5i7 >= 0 - r1a1_to_h5i8_exists: h5i8_exists - r1a1_to_h5i8 >= 0 - r1a1_to_h5i9_exists: h5i9_exists - r1a1_to_h5i9 >= 0 - r1a2_allocated: r1a2_to_h0i0 + r1a2_to_h0i1 + r1a2_to_h0i2 + r1a2_to_h0i3 + r1a2_to_h0i4 + r1a2_to_h0i5 + r1a2_to_h0i6 + r1a2_to_h0i7 + r1a2_to_h0i8 + r1a2_to_h0i9 + r1a2_to_h1i0 + r1a2_to_h1i1 + r1a2_to_h1i2 + r1a2_to_h1i3 + r1a2_to_h1i4 + r1a2_to_h1i5 + r1a2_to_h1i6 + r1a2_to_h1i7 + r1a2_to_h1i8 + r1a2_to_h1i9 + r1a2_to_h2i0 + r1a2_to_h2i1 + r1a2_to_h2i2 + r1a2_to_h2i3 + r1a2_to_h2i4 + r1a2_to_h2i5 + r1a2_to_h2i6 + r1a2_to_h2i7 + r1a2_to_h2i8 + r1a2_to_h2i9 + r1a2_to_h3i0 + r1a2_to_h3i1 + r1a2_to_h3i2 + r1a2_to_h3i3 + r1a2_to_h3i4 + r1a2_to_h3i5 + r1a2_to_h3i6 + r1a2_to_h3i7 + r1a2_to_h3i8 + r1a2_to_h3i9 + r1a2_to_h4i0 + r1a2_to_h4i1 + r1a2_to_h4i2 + r1a2_to_h4i3 + r1a2_to_h4i4 + r1a2_to_h4i5 + r1a2_to_h4i6 + r1a2_to_h4i7 + r1a2_to_h4i8 + r1a2_to_h4i9 + r1a2_to_h5i0 + r1a2_to_h5i1 + r1a2_to_h5i2 + r1a2_to_h5i3 + r1a2_to_h5i4 + r1a2_to_h5i5 + r1a2_to_h5i6 + r1a2_to_h5i7 + r1a2_to_h5i8 + r1a2_to_h5i9 = 1 - r1a2_to_h0i0_exists: h0i0_exists - r1a2_to_h0i0 >= 0 - r1a2_to_h0i1_exists: h0i1_exists - r1a2_to_h0i1 >= 0 - r1a2_to_h0i2_exists: h0i2_exists - r1a2_to_h0i2 >= 0 - r1a2_to_h0i3_exists: h0i3_exists - r1a2_to_h0i3 >= 0 - r1a2_to_h0i4_exists: h0i4_exists - r1a2_to_h0i4 >= 0 - r1a2_to_h0i5_exists: h0i5_exists - r1a2_to_h0i5 >= 0 - r1a2_to_h0i6_exists: h0i6_exists - r1a2_to_h0i6 >= 0 - r1a2_to_h0i7_exists: h0i7_exists - r1a2_to_h0i7 >= 0 - r1a2_to_h0i8_exists: h0i8_exists - r1a2_to_h0i8 >= 0 - r1a2_to_h0i9_exists: h0i9_exists - r1a2_to_h0i9 >= 0 - r1a2_to_h1i0_exists: h1i0_exists - r1a2_to_h1i0 >= 0 - r1a2_to_h1i1_exists: h1i1_exists - r1a2_to_h1i1 >= 0 - r1a2_to_h1i2_exists: h1i2_exists - r1a2_to_h1i2 >= 0 - r1a2_to_h1i3_exists: h1i3_exists - r1a2_to_h1i3 >= 0 - r1a2_to_h1i4_exists: h1i4_exists - r1a2_to_h1i4 >= 0 - r1a2_to_h1i5_exists: h1i5_exists - r1a2_to_h1i5 >= 0 - r1a2_to_h1i6_exists: h1i6_exists - r1a2_to_h1i6 >= 0 - r1a2_to_h1i7_exists: h1i7_exists - r1a2_to_h1i7 >= 0 - r1a2_to_h1i8_exists: h1i8_exists - r1a2_to_h1i8 >= 0 - r1a2_to_h1i9_exists: h1i9_exists - r1a2_to_h1i9 >= 0 - r1a2_to_h2i0_exists: h2i0_exists - r1a2_to_h2i0 >= 0 - r1a2_to_h2i1_exists: h2i1_exists - r1a2_to_h2i1 >= 0 - r1a2_to_h2i2_exists: h2i2_exists - r1a2_to_h2i2 >= 0 - r1a2_to_h2i3_exists: h2i3_exists - r1a2_to_h2i3 >= 0 - r1a2_to_h2i4_exists: h2i4_exists - r1a2_to_h2i4 >= 0 - r1a2_to_h2i5_exists: h2i5_exists - r1a2_to_h2i5 >= 0 - r1a2_to_h2i6_exists: h2i6_exists - r1a2_to_h2i6 >= 0 - r1a2_to_h2i7_exists: h2i7_exists - r1a2_to_h2i7 >= 0 - r1a2_to_h2i8_exists: h2i8_exists - r1a2_to_h2i8 >= 0 - r1a2_to_h2i9_exists: h2i9_exists - r1a2_to_h2i9 >= 0 - r1a2_to_h3i0_exists: h3i0_exists - r1a2_to_h3i0 >= 0 - r1a2_to_h3i1_exists: h3i1_exists - r1a2_to_h3i1 >= 0 - r1a2_to_h3i2_exists: h3i2_exists - r1a2_to_h3i2 >= 0 - r1a2_to_h3i3_exists: h3i3_exists - r1a2_to_h3i3 >= 0 - r1a2_to_h3i4_exists: h3i4_exists - r1a2_to_h3i4 >= 0 - r1a2_to_h3i5_exists: h3i5_exists - r1a2_to_h3i5 >= 0 - r1a2_to_h3i6_exists: h3i6_exists - r1a2_to_h3i6 >= 0 - r1a2_to_h3i7_exists: h3i7_exists - r1a2_to_h3i7 >= 0 - r1a2_to_h3i8_exists: h3i8_exists - r1a2_to_h3i8 >= 0 - r1a2_to_h3i9_exists: h3i9_exists - r1a2_to_h3i9 >= 0 - r1a2_to_h4i0_exists: h4i0_exists - r1a2_to_h4i0 >= 0 - r1a2_to_h4i1_exists: h4i1_exists - r1a2_to_h4i1 >= 0 - r1a2_to_h4i2_exists: h4i2_exists - r1a2_to_h4i2 >= 0 - r1a2_to_h4i3_exists: h4i3_exists - r1a2_to_h4i3 >= 0 - r1a2_to_h4i4_exists: h4i4_exists - r1a2_to_h4i4 >= 0 - r1a2_to_h4i5_exists: h4i5_exists - r1a2_to_h4i5 >= 0 - r1a2_to_h4i6_exists: h4i6_exists - r1a2_to_h4i6 >= 0 - r1a2_to_h4i7_exists: h4i7_exists - r1a2_to_h4i7 >= 0 - r1a2_to_h4i8_exists: h4i8_exists - r1a2_to_h4i8 >= 0 - r1a2_to_h4i9_exists: h4i9_exists - r1a2_to_h4i9 >= 0 - r1a2_to_h5i0_exists: h5i0_exists - r1a2_to_h5i0 >= 0 - r1a2_to_h5i1_exists: h5i1_exists - r1a2_to_h5i1 >= 0 - r1a2_to_h5i2_exists: h5i2_exists - r1a2_to_h5i2 >= 0 - r1a2_to_h5i3_exists: h5i3_exists - r1a2_to_h5i3 >= 0 - r1a2_to_h5i4_exists: h5i4_exists - r1a2_to_h5i4 >= 0 - r1a2_to_h5i5_exists: h5i5_exists - r1a2_to_h5i5 >= 0 - r1a2_to_h5i6_exists: h5i6_exists - r1a2_to_h5i6 >= 0 - r1a2_to_h5i7_exists: h5i7_exists - r1a2_to_h5i7 >= 0 - r1a2_to_h5i8_exists: h5i8_exists - r1a2_to_h5i8 >= 0 - r1a2_to_h5i9_exists: h5i9_exists - r1a2_to_h5i9 >= 0 - r2a0_allocated: r2a0_to_h0i0 + r2a0_to_h0i1 + r2a0_to_h0i2 + r2a0_to_h0i3 + r2a0_to_h0i4 + r2a0_to_h0i5 + r2a0_to_h0i6 + r2a0_to_h0i7 + r2a0_to_h0i8 + r2a0_to_h0i9 + r2a0_to_h1i0 + r2a0_to_h1i1 + r2a0_to_h1i2 + r2a0_to_h1i3 + r2a0_to_h1i4 + r2a0_to_h1i5 + r2a0_to_h1i6 + r2a0_to_h1i7 + r2a0_to_h1i8 + r2a0_to_h1i9 + r2a0_to_h2i0 + r2a0_to_h2i1 + r2a0_to_h2i2 + r2a0_to_h2i3 + r2a0_to_h2i4 + r2a0_to_h2i5 + r2a0_to_h2i6 + r2a0_to_h2i7 + r2a0_to_h2i8 + r2a0_to_h2i9 + r2a0_to_h3i0 + r2a0_to_h3i1 + r2a0_to_h3i2 + r2a0_to_h3i3 + r2a0_to_h3i4 + r2a0_to_h3i5 + r2a0_to_h3i6 + r2a0_to_h3i7 + r2a0_to_h3i8 + r2a0_to_h3i9 + r2a0_to_h4i0 + r2a0_to_h4i1 + r2a0_to_h4i2 + r2a0_to_h4i3 + r2a0_to_h4i4 + r2a0_to_h4i5 + r2a0_to_h4i6 + r2a0_to_h4i7 + r2a0_to_h4i8 + r2a0_to_h4i9 + r2a0_to_h5i0 + r2a0_to_h5i1 + r2a0_to_h5i2 + r2a0_to_h5i3 + r2a0_to_h5i4 + r2a0_to_h5i5 + r2a0_to_h5i6 + r2a0_to_h5i7 + r2a0_to_h5i8 + r2a0_to_h5i9 = 1 - r2a0_to_h0i0_exists: h0i0_exists - r2a0_to_h0i0 >= 0 - r2a0_to_h0i1_exists: h0i1_exists - r2a0_to_h0i1 >= 0 - r2a0_to_h0i2_exists: h0i2_exists - r2a0_to_h0i2 >= 0 - r2a0_to_h0i3_exists: h0i3_exists - r2a0_to_h0i3 >= 0 - r2a0_to_h0i4_exists: h0i4_exists - r2a0_to_h0i4 >= 0 - r2a0_to_h0i5_exists: h0i5_exists - r2a0_to_h0i5 >= 0 - r2a0_to_h0i6_exists: h0i6_exists - r2a0_to_h0i6 >= 0 - r2a0_to_h0i7_exists: h0i7_exists - r2a0_to_h0i7 >= 0 - r2a0_to_h0i8_exists: h0i8_exists - r2a0_to_h0i8 >= 0 - r2a0_to_h0i9_exists: h0i9_exists - r2a0_to_h0i9 >= 0 - r2a0_to_h1i0_exists: h1i0_exists - r2a0_to_h1i0 >= 0 - r2a0_to_h1i1_exists: h1i1_exists - r2a0_to_h1i1 >= 0 - r2a0_to_h1i2_exists: h1i2_exists - r2a0_to_h1i2 >= 0 - r2a0_to_h1i3_exists: h1i3_exists - r2a0_to_h1i3 >= 0 - r2a0_to_h1i4_exists: h1i4_exists - r2a0_to_h1i4 >= 0 - r2a0_to_h1i5_exists: h1i5_exists - r2a0_to_h1i5 >= 0 - r2a0_to_h1i6_exists: h1i6_exists - r2a0_to_h1i6 >= 0 - r2a0_to_h1i7_exists: h1i7_exists - r2a0_to_h1i7 >= 0 - r2a0_to_h1i8_exists: h1i8_exists - r2a0_to_h1i8 >= 0 - r2a0_to_h1i9_exists: h1i9_exists - r2a0_to_h1i9 >= 0 - r2a0_to_h2i0_exists: h2i0_exists - r2a0_to_h2i0 >= 0 - r2a0_to_h2i1_exists: h2i1_exists - r2a0_to_h2i1 >= 0 - r2a0_to_h2i2_exists: h2i2_exists - r2a0_to_h2i2 >= 0 - r2a0_to_h2i3_exists: h2i3_exists - r2a0_to_h2i3 >= 0 - r2a0_to_h2i4_exists: h2i4_exists - r2a0_to_h2i4 >= 0 - r2a0_to_h2i5_exists: h2i5_exists - r2a0_to_h2i5 >= 0 - r2a0_to_h2i6_exists: h2i6_exists - r2a0_to_h2i6 >= 0 - r2a0_to_h2i7_exists: h2i7_exists - r2a0_to_h2i7 >= 0 - r2a0_to_h2i8_exists: h2i8_exists - r2a0_to_h2i8 >= 0 - r2a0_to_h2i9_exists: h2i9_exists - r2a0_to_h2i9 >= 0 - r2a0_to_h3i0_exists: h3i0_exists - r2a0_to_h3i0 >= 0 - r2a0_to_h3i1_exists: h3i1_exists - r2a0_to_h3i1 >= 0 - r2a0_to_h3i2_exists: h3i2_exists - r2a0_to_h3i2 >= 0 - r2a0_to_h3i3_exists: h3i3_exists - r2a0_to_h3i3 >= 0 - r2a0_to_h3i4_exists: h3i4_exists - r2a0_to_h3i4 >= 0 - r2a0_to_h3i5_exists: h3i5_exists - r2a0_to_h3i5 >= 0 - r2a0_to_h3i6_exists: h3i6_exists - r2a0_to_h3i6 >= 0 - r2a0_to_h3i7_exists: h3i7_exists - r2a0_to_h3i7 >= 0 - r2a0_to_h3i8_exists: h3i8_exists - r2a0_to_h3i8 >= 0 - r2a0_to_h3i9_exists: h3i9_exists - r2a0_to_h3i9 >= 0 - r2a0_to_h4i0_exists: h4i0_exists - r2a0_to_h4i0 >= 0 - r2a0_to_h4i1_exists: h4i1_exists - r2a0_to_h4i1 >= 0 - r2a0_to_h4i2_exists: h4i2_exists - r2a0_to_h4i2 >= 0 - r2a0_to_h4i3_exists: h4i3_exists - r2a0_to_h4i3 >= 0 - r2a0_to_h4i4_exists: h4i4_exists - r2a0_to_h4i4 >= 0 - r2a0_to_h4i5_exists: h4i5_exists - r2a0_to_h4i5 >= 0 - r2a0_to_h4i6_exists: h4i6_exists - r2a0_to_h4i6 >= 0 - r2a0_to_h4i7_exists: h4i7_exists - r2a0_to_h4i7 >= 0 - r2a0_to_h4i8_exists: h4i8_exists - r2a0_to_h4i8 >= 0 - r2a0_to_h4i9_exists: h4i9_exists - r2a0_to_h4i9 >= 0 - r2a0_to_h5i0_exists: h5i0_exists - r2a0_to_h5i0 >= 0 - r2a0_to_h5i1_exists: h5i1_exists - r2a0_to_h5i1 >= 0 - r2a0_to_h5i2_exists: h5i2_exists - r2a0_to_h5i2 >= 0 - r2a0_to_h5i3_exists: h5i3_exists - r2a0_to_h5i3 >= 0 - r2a0_to_h5i4_exists: h5i4_exists - r2a0_to_h5i4 >= 0 - r2a0_to_h5i5_exists: h5i5_exists - r2a0_to_h5i5 >= 0 - r2a0_to_h5i6_exists: h5i6_exists - r2a0_to_h5i6 >= 0 - r2a0_to_h5i7_exists: h5i7_exists - r2a0_to_h5i7 >= 0 - r2a0_to_h5i8_exists: h5i8_exists - r2a0_to_h5i8 >= 0 - r2a0_to_h5i9_exists: h5i9_exists - r2a0_to_h5i9 >= 0 - r3a0_allocated: r3a0_to_h0i0 + r3a0_to_h0i1 + r3a0_to_h0i2 + r3a0_to_h0i3 + r3a0_to_h0i4 + r3a0_to_h0i5 + r3a0_to_h0i6 + r3a0_to_h0i7 + r3a0_to_h0i8 + r3a0_to_h0i9 + r3a0_to_h1i0 + r3a0_to_h1i1 + r3a0_to_h1i2 + r3a0_to_h1i3 + r3a0_to_h1i4 + r3a0_to_h1i5 + r3a0_to_h1i6 + r3a0_to_h1i7 + r3a0_to_h1i8 + r3a0_to_h1i9 + r3a0_to_h2i0 + r3a0_to_h2i1 + r3a0_to_h2i2 + r3a0_to_h2i3 + r3a0_to_h2i4 + r3a0_to_h2i5 + r3a0_to_h2i6 + r3a0_to_h2i7 + r3a0_to_h2i8 + r3a0_to_h2i9 + r3a0_to_h3i0 + r3a0_to_h3i1 + r3a0_to_h3i2 + r3a0_to_h3i3 + r3a0_to_h3i4 + r3a0_to_h3i5 + r3a0_to_h3i6 + r3a0_to_h3i7 + r3a0_to_h3i8 + r3a0_to_h3i9 + r3a0_to_h4i0 + r3a0_to_h4i1 + r3a0_to_h4i2 + r3a0_to_h4i3 + r3a0_to_h4i4 + r3a0_to_h4i5 + r3a0_to_h4i6 + r3a0_to_h4i7 + r3a0_to_h4i8 + r3a0_to_h4i9 + r3a0_to_h5i0 + r3a0_to_h5i1 + r3a0_to_h5i2 + r3a0_to_h5i3 + r3a0_to_h5i4 + r3a0_to_h5i5 + r3a0_to_h5i6 + r3a0_to_h5i7 + r3a0_to_h5i8 + r3a0_to_h5i9 = 1 - r3a0_to_h0i0_exists: h0i0_exists - r3a0_to_h0i0 >= 0 - r3a0_to_h0i1_exists: h0i1_exists - r3a0_to_h0i1 >= 0 - r3a0_to_h0i2_exists: h0i2_exists - r3a0_to_h0i2 >= 0 - r3a0_to_h0i3_exists: h0i3_exists - r3a0_to_h0i3 >= 0 - r3a0_to_h0i4_exists: h0i4_exists - r3a0_to_h0i4 >= 0 - r3a0_to_h0i5_exists: h0i5_exists - r3a0_to_h0i5 >= 0 - r3a0_to_h0i6_exists: h0i6_exists - r3a0_to_h0i6 >= 0 - r3a0_to_h0i7_exists: h0i7_exists - r3a0_to_h0i7 >= 0 - r3a0_to_h0i8_exists: h0i8_exists - r3a0_to_h0i8 >= 0 - r3a0_to_h0i9_exists: h0i9_exists - r3a0_to_h0i9 >= 0 - r3a0_to_h1i0_exists: h1i0_exists - r3a0_to_h1i0 >= 0 - r3a0_to_h1i1_exists: h1i1_exists - r3a0_to_h1i1 >= 0 - r3a0_to_h1i2_exists: h1i2_exists - r3a0_to_h1i2 >= 0 - r3a0_to_h1i3_exists: h1i3_exists - r3a0_to_h1i3 >= 0 - r3a0_to_h1i4_exists: h1i4_exists - r3a0_to_h1i4 >= 0 - r3a0_to_h1i5_exists: h1i5_exists - r3a0_to_h1i5 >= 0 - r3a0_to_h1i6_exists: h1i6_exists - r3a0_to_h1i6 >= 0 - r3a0_to_h1i7_exists: h1i7_exists - r3a0_to_h1i7 >= 0 - r3a0_to_h1i8_exists: h1i8_exists - r3a0_to_h1i8 >= 0 - r3a0_to_h1i9_exists: h1i9_exists - r3a0_to_h1i9 >= 0 - r3a0_to_h2i0_exists: h2i0_exists - r3a0_to_h2i0 >= 0 - r3a0_to_h2i1_exists: h2i1_exists - r3a0_to_h2i1 >= 0 - r3a0_to_h2i2_exists: h2i2_exists - r3a0_to_h2i2 >= 0 - r3a0_to_h2i3_exists: h2i3_exists - r3a0_to_h2i3 >= 0 - r3a0_to_h2i4_exists: h2i4_exists - r3a0_to_h2i4 >= 0 - r3a0_to_h2i5_exists: h2i5_exists - r3a0_to_h2i5 >= 0 - r3a0_to_h2i6_exists: h2i6_exists - r3a0_to_h2i6 >= 0 - r3a0_to_h2i7_exists: h2i7_exists - r3a0_to_h2i7 >= 0 - r3a0_to_h2i8_exists: h2i8_exists - r3a0_to_h2i8 >= 0 - r3a0_to_h2i9_exists: h2i9_exists - r3a0_to_h2i9 >= 0 - r3a0_to_h3i0_exists: h3i0_exists - r3a0_to_h3i0 >= 0 - r3a0_to_h3i1_exists: h3i1_exists - r3a0_to_h3i1 >= 0 - r3a0_to_h3i2_exists: h3i2_exists - r3a0_to_h3i2 >= 0 - r3a0_to_h3i3_exists: h3i3_exists - r3a0_to_h3i3 >= 0 - r3a0_to_h3i4_exists: h3i4_exists - r3a0_to_h3i4 >= 0 - r3a0_to_h3i5_exists: h3i5_exists - r3a0_to_h3i5 >= 0 - r3a0_to_h3i6_exists: h3i6_exists - r3a0_to_h3i6 >= 0 - r3a0_to_h3i7_exists: h3i7_exists - r3a0_to_h3i7 >= 0 - r3a0_to_h3i8_exists: h3i8_exists - r3a0_to_h3i8 >= 0 - r3a0_to_h3i9_exists: h3i9_exists - r3a0_to_h3i9 >= 0 - r3a0_to_h4i0_exists: h4i0_exists - r3a0_to_h4i0 >= 0 - r3a0_to_h4i1_exists: h4i1_exists - r3a0_to_h4i1 >= 0 - r3a0_to_h4i2_exists: h4i2_exists - r3a0_to_h4i2 >= 0 - r3a0_to_h4i3_exists: h4i3_exists - r3a0_to_h4i3 >= 0 - r3a0_to_h4i4_exists: h4i4_exists - r3a0_to_h4i4 >= 0 - r3a0_to_h4i5_exists: h4i5_exists - r3a0_to_h4i5 >= 0 - r3a0_to_h4i6_exists: h4i6_exists - r3a0_to_h4i6 >= 0 - r3a0_to_h4i7_exists: h4i7_exists - r3a0_to_h4i7 >= 0 - r3a0_to_h4i8_exists: h4i8_exists - r3a0_to_h4i8 >= 0 - r3a0_to_h4i9_exists: h4i9_exists - r3a0_to_h4i9 >= 0 - r3a0_to_h5i0_exists: h5i0_exists - r3a0_to_h5i0 >= 0 - r3a0_to_h5i1_exists: h5i1_exists - r3a0_to_h5i1 >= 0 - r3a0_to_h5i2_exists: h5i2_exists - r3a0_to_h5i2 >= 0 - r3a0_to_h5i3_exists: h5i3_exists - r3a0_to_h5i3 >= 0 - r3a0_to_h5i4_exists: h5i4_exists - r3a0_to_h5i4 >= 0 - r3a0_to_h5i5_exists: h5i5_exists - r3a0_to_h5i5 >= 0 - r3a0_to_h5i6_exists: h5i6_exists - r3a0_to_h5i6 >= 0 - r3a0_to_h5i7_exists: h5i7_exists - r3a0_to_h5i7 >= 0 - r3a0_to_h5i8_exists: h5i8_exists - r3a0_to_h5i8 >= 0 - r3a0_to_h5i9_exists: h5i9_exists - r3a0_to_h5i9 >= 0 - r4a0_allocated: r4a0_to_h4i0 + r4a0_to_h4i1 + r4a0_to_h4i2 + r4a0_to_h4i3 + r4a0_to_h4i4 + r4a0_to_h4i5 + r4a0_to_h4i6 + r4a0_to_h4i7 + r4a0_to_h4i8 + r4a0_to_h4i9 + r4a0_to_h5i0 + r4a0_to_h5i1 + r4a0_to_h5i2 + r4a0_to_h5i3 + r4a0_to_h5i4 + r4a0_to_h5i5 + r4a0_to_h5i6 + r4a0_to_h5i7 + r4a0_to_h5i8 + r4a0_to_h5i9 = 1 - r4a0_to_h4i0_exists: h4i0_exists - r4a0_to_h4i0 >= 0 - r4a0_to_h4i1_exists: h4i1_exists - r4a0_to_h4i1 >= 0 - r4a0_to_h4i2_exists: h4i2_exists - r4a0_to_h4i2 >= 0 - r4a0_to_h4i3_exists: h4i3_exists - r4a0_to_h4i3 >= 0 - r4a0_to_h4i4_exists: h4i4_exists - r4a0_to_h4i4 >= 0 - r4a0_to_h4i5_exists: h4i5_exists - r4a0_to_h4i5 >= 0 - r4a0_to_h4i6_exists: h4i6_exists - r4a0_to_h4i6 >= 0 - r4a0_to_h4i7_exists: h4i7_exists - r4a0_to_h4i7 >= 0 - r4a0_to_h4i8_exists: h4i8_exists - r4a0_to_h4i8 >= 0 - r4a0_to_h4i9_exists: h4i9_exists - r4a0_to_h4i9 >= 0 - r4a0_to_h5i0_exists: h5i0_exists - r4a0_to_h5i0 >= 0 - r4a0_to_h5i1_exists: h5i1_exists - r4a0_to_h5i1 >= 0 - r4a0_to_h5i2_exists: h5i2_exists - r4a0_to_h5i2 >= 0 - r4a0_to_h5i3_exists: h5i3_exists - r4a0_to_h5i3 >= 0 - r4a0_to_h5i4_exists: h5i4_exists - r4a0_to_h5i4 >= 0 - r4a0_to_h5i5_exists: h5i5_exists - r4a0_to_h5i5 >= 0 - r4a0_to_h5i6_exists: h5i6_exists - r4a0_to_h5i6 >= 0 - r4a0_to_h5i7_exists: h5i7_exists - r4a0_to_h5i7 >= 0 - r4a0_to_h5i8_exists: h5i8_exists - r4a0_to_h5i8 >= 0 - r4a0_to_h5i9_exists: h5i9_exists - r4a0_to_h5i9 >= 0 - r4a1_allocated: r4a1_to_h4i0 + r4a1_to_h4i1 + r4a1_to_h4i2 + r4a1_to_h4i3 + r4a1_to_h4i4 + r4a1_to_h4i5 + r4a1_to_h4i6 + r4a1_to_h4i7 + r4a1_to_h4i8 + r4a1_to_h4i9 + r4a1_to_h5i0 + r4a1_to_h5i1 + r4a1_to_h5i2 + r4a1_to_h5i3 + r4a1_to_h5i4 + r4a1_to_h5i5 + r4a1_to_h5i6 + r4a1_to_h5i7 + r4a1_to_h5i8 + r4a1_to_h5i9 = 1 - r4a1_to_h4i0_exists: h4i0_exists - r4a1_to_h4i0 >= 0 - r4a1_to_h4i1_exists: h4i1_exists - r4a1_to_h4i1 >= 0 - r4a1_to_h4i2_exists: h4i2_exists - r4a1_to_h4i2 >= 0 - r4a1_to_h4i3_exists: h4i3_exists - r4a1_to_h4i3 >= 0 - r4a1_to_h4i4_exists: h4i4_exists - r4a1_to_h4i4 >= 0 - r4a1_to_h4i5_exists: h4i5_exists - r4a1_to_h4i5 >= 0 - r4a1_to_h4i6_exists: h4i6_exists - r4a1_to_h4i6 >= 0 - r4a1_to_h4i7_exists: h4i7_exists - r4a1_to_h4i7 >= 0 - r4a1_to_h4i8_exists: h4i8_exists - r4a1_to_h4i8 >= 0 - r4a1_to_h4i9_exists: h4i9_exists - r4a1_to_h4i9 >= 0 - r4a1_to_h5i0_exists: h5i0_exists - r4a1_to_h5i0 >= 0 - r4a1_to_h5i1_exists: h5i1_exists - r4a1_to_h5i1 >= 0 - r4a1_to_h5i2_exists: h5i2_exists - r4a1_to_h5i2 >= 0 - r4a1_to_h5i3_exists: h5i3_exists - r4a1_to_h5i3 >= 0 - r4a1_to_h5i4_exists: h5i4_exists - r4a1_to_h5i4 >= 0 - r4a1_to_h5i5_exists: h5i5_exists - r4a1_to_h5i5 >= 0 - r4a1_to_h5i6_exists: h5i6_exists - r4a1_to_h5i6 >= 0 - r4a1_to_h5i7_exists: h5i7_exists - r4a1_to_h5i7 >= 0 - r4a1_to_h5i8_exists: h5i8_exists - r4a1_to_h5i8 >= 0 - r4a1_to_h5i9_exists: h5i9_exists - r4a1_to_h5i9 >= 0 - r4a2_allocated: r4a2_to_h4i0 + r4a2_to_h4i1 + r4a2_to_h4i2 + r4a2_to_h4i3 + r4a2_to_h4i4 + r4a2_to_h4i5 + r4a2_to_h4i6 + r4a2_to_h4i7 + r4a2_to_h4i8 + r4a2_to_h4i9 + r4a2_to_h5i0 + r4a2_to_h5i1 + r4a2_to_h5i2 + r4a2_to_h5i3 + r4a2_to_h5i4 + r4a2_to_h5i5 + r4a2_to_h5i6 + r4a2_to_h5i7 + r4a2_to_h5i8 + r4a2_to_h5i9 = 1 - r4a2_to_h4i0_exists: h4i0_exists - r4a2_to_h4i0 >= 0 - r4a2_to_h4i1_exists: h4i1_exists - r4a2_to_h4i1 >= 0 - r4a2_to_h4i2_exists: h4i2_exists - r4a2_to_h4i2 >= 0 - r4a2_to_h4i3_exists: h4i3_exists - r4a2_to_h4i3 >= 0 - r4a2_to_h4i4_exists: h4i4_exists - r4a2_to_h4i4 >= 0 - r4a2_to_h4i5_exists: h4i5_exists - r4a2_to_h4i5 >= 0 - r4a2_to_h4i6_exists: h4i6_exists - r4a2_to_h4i6 >= 0 - r4a2_to_h4i7_exists: h4i7_exists - r4a2_to_h4i7 >= 0 - r4a2_to_h4i8_exists: h4i8_exists - r4a2_to_h4i8 >= 0 - r4a2_to_h4i9_exists: h4i9_exists - r4a2_to_h4i9 >= 0 - r4a2_to_h5i0_exists: h5i0_exists - r4a2_to_h5i0 >= 0 - r4a2_to_h5i1_exists: h5i1_exists - r4a2_to_h5i1 >= 0 - r4a2_to_h5i2_exists: h5i2_exists - r4a2_to_h5i2 >= 0 - r4a2_to_h5i3_exists: h5i3_exists - r4a2_to_h5i3 >= 0 - r4a2_to_h5i4_exists: h5i4_exists - r4a2_to_h5i4 >= 0 - r4a2_to_h5i5_exists: h5i5_exists - r4a2_to_h5i5 >= 0 - r4a2_to_h5i6_exists: h5i6_exists - r4a2_to_h5i6 >= 0 - r4a2_to_h5i7_exists: h5i7_exists - r4a2_to_h5i7 >= 0 - r4a2_to_h5i8_exists: h5i8_exists - r4a2_to_h5i8 >= 0 - r4a2_to_h5i9_exists: h5i9_exists - r4a2_to_h5i9 >= 0 - r4a3_allocated: r4a3_to_h4i0 + r4a3_to_h4i1 + r4a3_to_h4i2 + r4a3_to_h4i3 + r4a3_to_h4i4 + r4a3_to_h4i5 + r4a3_to_h4i6 + r4a3_to_h4i7 + r4a3_to_h4i8 + r4a3_to_h4i9 + r4a3_to_h5i0 + r4a3_to_h5i1 + r4a3_to_h5i2 + r4a3_to_h5i3 + r4a3_to_h5i4 + r4a3_to_h5i5 + r4a3_to_h5i6 + r4a3_to_h5i7 + r4a3_to_h5i8 + r4a3_to_h5i9 = 1 - r4a3_to_h4i0_exists: h4i0_exists - r4a3_to_h4i0 >= 0 - r4a3_to_h4i1_exists: h4i1_exists - r4a3_to_h4i1 >= 0 - r4a3_to_h4i2_exists: h4i2_exists - r4a3_to_h4i2 >= 0 - r4a3_to_h4i3_exists: h4i3_exists - r4a3_to_h4i3 >= 0 - r4a3_to_h4i4_exists: h4i4_exists - r4a3_to_h4i4 >= 0 - r4a3_to_h4i5_exists: h4i5_exists - r4a3_to_h4i5 >= 0 - r4a3_to_h4i6_exists: h4i6_exists - r4a3_to_h4i6 >= 0 - r4a3_to_h4i7_exists: h4i7_exists - r4a3_to_h4i7 >= 0 - r4a3_to_h4i8_exists: h4i8_exists - r4a3_to_h4i8 >= 0 - r4a3_to_h4i9_exists: h4i9_exists - r4a3_to_h4i9 >= 0 - r4a3_to_h5i0_exists: h5i0_exists - r4a3_to_h5i0 >= 0 - r4a3_to_h5i1_exists: h5i1_exists - r4a3_to_h5i1 >= 0 - r4a3_to_h5i2_exists: h5i2_exists - r4a3_to_h5i2 >= 0 - r4a3_to_h5i3_exists: h5i3_exists - r4a3_to_h5i3 >= 0 - r4a3_to_h5i4_exists: h5i4_exists - r4a3_to_h5i4 >= 0 - r4a3_to_h5i5_exists: h5i5_exists - r4a3_to_h5i5 >= 0 - r4a3_to_h5i6_exists: h5i6_exists - r4a3_to_h5i6 >= 0 - r4a3_to_h5i7_exists: h5i7_exists - r4a3_to_h5i7 >= 0 - r4a3_to_h5i8_exists: h5i8_exists - r4a3_to_h5i8 >= 0 - r4a3_to_h5i9_exists: h5i9_exists - r4a3_to_h5i9 >= 0 - r5a0_allocated: r5a0_to_h0i0 + r5a0_to_h0i1 + r5a0_to_h0i2 + r5a0_to_h0i3 + r5a0_to_h0i4 + r5a0_to_h0i5 + r5a0_to_h0i6 + r5a0_to_h0i7 + r5a0_to_h0i8 + r5a0_to_h0i9 + r5a0_to_h1i0 + r5a0_to_h1i1 + r5a0_to_h1i2 + r5a0_to_h1i3 + r5a0_to_h1i4 + r5a0_to_h1i5 + r5a0_to_h1i6 + r5a0_to_h1i7 + r5a0_to_h1i8 + r5a0_to_h1i9 + r5a0_to_h2i0 + r5a0_to_h2i1 + r5a0_to_h2i2 + r5a0_to_h2i3 + r5a0_to_h2i4 + r5a0_to_h2i5 + r5a0_to_h2i6 + r5a0_to_h2i7 + r5a0_to_h2i8 + r5a0_to_h2i9 + r5a0_to_h3i0 + r5a0_to_h3i1 + r5a0_to_h3i2 + r5a0_to_h3i3 + r5a0_to_h3i4 + r5a0_to_h3i5 + r5a0_to_h3i6 + r5a0_to_h3i7 + r5a0_to_h3i8 + r5a0_to_h3i9 + r5a0_to_h4i0 + r5a0_to_h4i1 + r5a0_to_h4i2 + r5a0_to_h4i3 + r5a0_to_h4i4 + r5a0_to_h4i5 + r5a0_to_h4i6 + r5a0_to_h4i7 + r5a0_to_h4i8 + r5a0_to_h4i9 + r5a0_to_h5i0 + r5a0_to_h5i1 + r5a0_to_h5i2 + r5a0_to_h5i3 + r5a0_to_h5i4 + r5a0_to_h5i5 + r5a0_to_h5i6 + r5a0_to_h5i7 + r5a0_to_h5i8 + r5a0_to_h5i9 = 1 - r5a0_to_h0i0_exists: h0i0_exists - r5a0_to_h0i0 >= 0 - r5a0_to_h0i1_exists: h0i1_exists - r5a0_to_h0i1 >= 0 - r5a0_to_h0i2_exists: h0i2_exists - r5a0_to_h0i2 >= 0 - r5a0_to_h0i3_exists: h0i3_exists - r5a0_to_h0i3 >= 0 - r5a0_to_h0i4_exists: h0i4_exists - r5a0_to_h0i4 >= 0 - r5a0_to_h0i5_exists: h0i5_exists - r5a0_to_h0i5 >= 0 - r5a0_to_h0i6_exists: h0i6_exists - r5a0_to_h0i6 >= 0 - r5a0_to_h0i7_exists: h0i7_exists - r5a0_to_h0i7 >= 0 - r5a0_to_h0i8_exists: h0i8_exists - r5a0_to_h0i8 >= 0 - r5a0_to_h0i9_exists: h0i9_exists - r5a0_to_h0i9 >= 0 - r5a0_to_h1i0_exists: h1i0_exists - r5a0_to_h1i0 >= 0 - r5a0_to_h1i1_exists: h1i1_exists - r5a0_to_h1i1 >= 0 - r5a0_to_h1i2_exists: h1i2_exists - r5a0_to_h1i2 >= 0 - r5a0_to_h1i3_exists: h1i3_exists - r5a0_to_h1i3 >= 0 - r5a0_to_h1i4_exists: h1i4_exists - r5a0_to_h1i4 >= 0 - r5a0_to_h1i5_exists: h1i5_exists - r5a0_to_h1i5 >= 0 - r5a0_to_h1i6_exists: h1i6_exists - r5a0_to_h1i6 >= 0 - r5a0_to_h1i7_exists: h1i7_exists - r5a0_to_h1i7 >= 0 - r5a0_to_h1i8_exists: h1i8_exists - r5a0_to_h1i8 >= 0 - r5a0_to_h1i9_exists: h1i9_exists - r5a0_to_h1i9 >= 0 - r5a0_to_h2i0_exists: h2i0_exists - r5a0_to_h2i0 >= 0 - r5a0_to_h2i1_exists: h2i1_exists - r5a0_to_h2i1 >= 0 - r5a0_to_h2i2_exists: h2i2_exists - r5a0_to_h2i2 >= 0 - r5a0_to_h2i3_exists: h2i3_exists - r5a0_to_h2i3 >= 0 - r5a0_to_h2i4_exists: h2i4_exists - r5a0_to_h2i4 >= 0 - r5a0_to_h2i5_exists: h2i5_exists - r5a0_to_h2i5 >= 0 - r5a0_to_h2i6_exists: h2i6_exists - r5a0_to_h2i6 >= 0 - r5a0_to_h2i7_exists: h2i7_exists - r5a0_to_h2i7 >= 0 - r5a0_to_h2i8_exists: h2i8_exists - r5a0_to_h2i8 >= 0 - r5a0_to_h2i9_exists: h2i9_exists - r5a0_to_h2i9 >= 0 - r5a0_to_h3i0_exists: h3i0_exists - r5a0_to_h3i0 >= 0 - r5a0_to_h3i1_exists: h3i1_exists - r5a0_to_h3i1 >= 0 - r5a0_to_h3i2_exists: h3i2_exists - r5a0_to_h3i2 >= 0 - r5a0_to_h3i3_exists: h3i3_exists - r5a0_to_h3i3 >= 0 - r5a0_to_h3i4_exists: h3i4_exists - r5a0_to_h3i4 >= 0 - r5a0_to_h3i5_exists: h3i5_exists - r5a0_to_h3i5 >= 0 - r5a0_to_h3i6_exists: h3i6_exists - r5a0_to_h3i6 >= 0 - r5a0_to_h3i7_exists: h3i7_exists - r5a0_to_h3i7 >= 0 - r5a0_to_h3i8_exists: h3i8_exists - r5a0_to_h3i8 >= 0 - r5a0_to_h3i9_exists: h3i9_exists - r5a0_to_h3i9 >= 0 - r5a0_to_h4i0_exists: h4i0_exists - r5a0_to_h4i0 >= 0 - r5a0_to_h4i1_exists: h4i1_exists - r5a0_to_h4i1 >= 0 - r5a0_to_h4i2_exists: h4i2_exists - r5a0_to_h4i2 >= 0 - r5a0_to_h4i3_exists: h4i3_exists - r5a0_to_h4i3 >= 0 - r5a0_to_h4i4_exists: h4i4_exists - r5a0_to_h4i4 >= 0 - r5a0_to_h4i5_exists: h4i5_exists - r5a0_to_h4i5 >= 0 - r5a0_to_h4i6_exists: h4i6_exists - r5a0_to_h4i6 >= 0 - r5a0_to_h4i7_exists: h4i7_exists - r5a0_to_h4i7 >= 0 - r5a0_to_h4i8_exists: h4i8_exists - r5a0_to_h4i8 >= 0 - r5a0_to_h4i9_exists: h4i9_exists - r5a0_to_h4i9 >= 0 - r5a0_to_h5i0_exists: h5i0_exists - r5a0_to_h5i0 >= 0 - r5a0_to_h5i1_exists: h5i1_exists - r5a0_to_h5i1 >= 0 - r5a0_to_h5i2_exists: h5i2_exists - r5a0_to_h5i2 >= 0 - r5a0_to_h5i3_exists: h5i3_exists - r5a0_to_h5i3 >= 0 - r5a0_to_h5i4_exists: h5i4_exists - r5a0_to_h5i4 >= 0 - r5a0_to_h5i5_exists: h5i5_exists - r5a0_to_h5i5 >= 0 - r5a0_to_h5i6_exists: h5i6_exists - r5a0_to_h5i6 >= 0 - r5a0_to_h5i7_exists: h5i7_exists - r5a0_to_h5i7 >= 0 - r5a0_to_h5i8_exists: h5i8_exists - r5a0_to_h5i8 >= 0 - r5a0_to_h5i9_exists: h5i9_exists - r5a0_to_h5i9 >= 0 - r6a0_allocated: r6a0_to_h0i0 + r6a0_to_h0i1 + r6a0_to_h0i2 + r6a0_to_h0i3 + r6a0_to_h0i4 + r6a0_to_h0i5 + r6a0_to_h0i6 + r6a0_to_h0i7 + r6a0_to_h0i8 + r6a0_to_h0i9 + r6a0_to_h1i0 + r6a0_to_h1i1 + r6a0_to_h1i2 + r6a0_to_h1i3 + r6a0_to_h1i4 + r6a0_to_h1i5 + r6a0_to_h1i6 + r6a0_to_h1i7 + r6a0_to_h1i8 + r6a0_to_h1i9 + r6a0_to_h2i0 + r6a0_to_h2i1 + r6a0_to_h2i2 + r6a0_to_h2i3 + r6a0_to_h2i4 + r6a0_to_h2i5 + r6a0_to_h2i6 + r6a0_to_h2i7 + r6a0_to_h2i8 + r6a0_to_h2i9 + r6a0_to_h3i0 + r6a0_to_h3i1 + r6a0_to_h3i2 + r6a0_to_h3i3 + r6a0_to_h3i4 + r6a0_to_h3i5 + r6a0_to_h3i6 + r6a0_to_h3i7 + r6a0_to_h3i8 + r6a0_to_h3i9 + r6a0_to_h4i0 + r6a0_to_h4i1 + r6a0_to_h4i2 + r6a0_to_h4i3 + r6a0_to_h4i4 + r6a0_to_h4i5 + r6a0_to_h4i6 + r6a0_to_h4i7 + r6a0_to_h4i8 + r6a0_to_h4i9 + r6a0_to_h5i0 + r6a0_to_h5i1 + r6a0_to_h5i2 + r6a0_to_h5i3 + r6a0_to_h5i4 + r6a0_to_h5i5 + r6a0_to_h5i6 + r6a0_to_h5i7 + r6a0_to_h5i8 + r6a0_to_h5i9 = 1 - r6a0_to_h0i0_exists: h0i0_exists - r6a0_to_h0i0 >= 0 - r6a0_to_h0i1_exists: h0i1_exists - r6a0_to_h0i1 >= 0 - r6a0_to_h0i2_exists: h0i2_exists - r6a0_to_h0i2 >= 0 - r6a0_to_h0i3_exists: h0i3_exists - r6a0_to_h0i3 >= 0 - r6a0_to_h0i4_exists: h0i4_exists - r6a0_to_h0i4 >= 0 - r6a0_to_h0i5_exists: h0i5_exists - r6a0_to_h0i5 >= 0 - r6a0_to_h0i6_exists: h0i6_exists - r6a0_to_h0i6 >= 0 - r6a0_to_h0i7_exists: h0i7_exists - r6a0_to_h0i7 >= 0 - r6a0_to_h0i8_exists: h0i8_exists - r6a0_to_h0i8 >= 0 - r6a0_to_h0i9_exists: h0i9_exists - r6a0_to_h0i9 >= 0 - r6a0_to_h1i0_exists: h1i0_exists - r6a0_to_h1i0 >= 0 - r6a0_to_h1i1_exists: h1i1_exists - r6a0_to_h1i1 >= 0 - r6a0_to_h1i2_exists: h1i2_exists - r6a0_to_h1i2 >= 0 - r6a0_to_h1i3_exists: h1i3_exists - r6a0_to_h1i3 >= 0 - r6a0_to_h1i4_exists: h1i4_exists - r6a0_to_h1i4 >= 0 - r6a0_to_h1i5_exists: h1i5_exists - r6a0_to_h1i5 >= 0 - r6a0_to_h1i6_exists: h1i6_exists - r6a0_to_h1i6 >= 0 - r6a0_to_h1i7_exists: h1i7_exists - r6a0_to_h1i7 >= 0 - r6a0_to_h1i8_exists: h1i8_exists - r6a0_to_h1i8 >= 0 - r6a0_to_h1i9_exists: h1i9_exists - r6a0_to_h1i9 >= 0 - r6a0_to_h2i0_exists: h2i0_exists - r6a0_to_h2i0 >= 0 - r6a0_to_h2i1_exists: h2i1_exists - r6a0_to_h2i1 >= 0 - r6a0_to_h2i2_exists: h2i2_exists - r6a0_to_h2i2 >= 0 - r6a0_to_h2i3_exists: h2i3_exists - r6a0_to_h2i3 >= 0 - r6a0_to_h2i4_exists: h2i4_exists - r6a0_to_h2i4 >= 0 - r6a0_to_h2i5_exists: h2i5_exists - r6a0_to_h2i5 >= 0 - r6a0_to_h2i6_exists: h2i6_exists - r6a0_to_h2i6 >= 0 - r6a0_to_h2i7_exists: h2i7_exists - r6a0_to_h2i7 >= 0 - r6a0_to_h2i8_exists: h2i8_exists - r6a0_to_h2i8 >= 0 - r6a0_to_h2i9_exists: h2i9_exists - r6a0_to_h2i9 >= 0 - r6a0_to_h3i0_exists: h3i0_exists - r6a0_to_h3i0 >= 0 - r6a0_to_h3i1_exists: h3i1_exists - r6a0_to_h3i1 >= 0 - r6a0_to_h3i2_exists: h3i2_exists - r6a0_to_h3i2 >= 0 - r6a0_to_h3i3_exists: h3i3_exists - r6a0_to_h3i3 >= 0 - r6a0_to_h3i4_exists: h3i4_exists - r6a0_to_h3i4 >= 0 - r6a0_to_h3i5_exists: h3i5_exists - r6a0_to_h3i5 >= 0 - r6a0_to_h3i6_exists: h3i6_exists - r6a0_to_h3i6 >= 0 - r6a0_to_h3i7_exists: h3i7_exists - r6a0_to_h3i7 >= 0 - r6a0_to_h3i8_exists: h3i8_exists - r6a0_to_h3i8 >= 0 - r6a0_to_h3i9_exists: h3i9_exists - r6a0_to_h3i9 >= 0 - r6a0_to_h4i0_exists: h4i0_exists - r6a0_to_h4i0 >= 0 - r6a0_to_h4i1_exists: h4i1_exists - r6a0_to_h4i1 >= 0 - r6a0_to_h4i2_exists: h4i2_exists - r6a0_to_h4i2 >= 0 - r6a0_to_h4i3_exists: h4i3_exists - r6a0_to_h4i3 >= 0 - r6a0_to_h4i4_exists: h4i4_exists - r6a0_to_h4i4 >= 0 - r6a0_to_h4i5_exists: h4i5_exists - r6a0_to_h4i5 >= 0 - r6a0_to_h4i6_exists: h4i6_exists - r6a0_to_h4i6 >= 0 - r6a0_to_h4i7_exists: h4i7_exists - r6a0_to_h4i7 >= 0 - r6a0_to_h4i8_exists: h4i8_exists - r6a0_to_h4i8 >= 0 - r6a0_to_h4i9_exists: h4i9_exists - r6a0_to_h4i9 >= 0 - r6a0_to_h5i0_exists: h5i0_exists - r6a0_to_h5i0 >= 0 - r6a0_to_h5i1_exists: h5i1_exists - r6a0_to_h5i1 >= 0 - r6a0_to_h5i2_exists: h5i2_exists - r6a0_to_h5i2 >= 0 - r6a0_to_h5i3_exists: h5i3_exists - r6a0_to_h5i3 >= 0 - r6a0_to_h5i4_exists: h5i4_exists - r6a0_to_h5i4 >= 0 - r6a0_to_h5i5_exists: h5i5_exists - r6a0_to_h5i5 >= 0 - r6a0_to_h5i6_exists: h5i6_exists - r6a0_to_h5i6 >= 0 - r6a0_to_h5i7_exists: h5i7_exists - r6a0_to_h5i7 >= 0 - r6a0_to_h5i8_exists: h5i8_exists - r6a0_to_h5i8 >= 0 - r6a0_to_h5i9_exists: h5i9_exists - r6a0_to_h5i9 >= 0 - r6a1_allocated: r6a1_to_h0i0 + r6a1_to_h0i1 + r6a1_to_h0i2 + r6a1_to_h0i3 + r6a1_to_h0i4 + r6a1_to_h0i5 + r6a1_to_h0i6 + r6a1_to_h0i7 + r6a1_to_h0i8 + r6a1_to_h0i9 + r6a1_to_h1i0 + r6a1_to_h1i1 + r6a1_to_h1i2 + r6a1_to_h1i3 + r6a1_to_h1i4 + r6a1_to_h1i5 + r6a1_to_h1i6 + r6a1_to_h1i7 + r6a1_to_h1i8 + r6a1_to_h1i9 + r6a1_to_h2i0 + r6a1_to_h2i1 + r6a1_to_h2i2 + r6a1_to_h2i3 + r6a1_to_h2i4 + r6a1_to_h2i5 + r6a1_to_h2i6 + r6a1_to_h2i7 + r6a1_to_h2i8 + r6a1_to_h2i9 + r6a1_to_h3i0 + r6a1_to_h3i1 + r6a1_to_h3i2 + r6a1_to_h3i3 + r6a1_to_h3i4 + r6a1_to_h3i5 + r6a1_to_h3i6 + r6a1_to_h3i7 + r6a1_to_h3i8 + r6a1_to_h3i9 + r6a1_to_h4i0 + r6a1_to_h4i1 + r6a1_to_h4i2 + r6a1_to_h4i3 + r6a1_to_h4i4 + r6a1_to_h4i5 + r6a1_to_h4i6 + r6a1_to_h4i7 + r6a1_to_h4i8 + r6a1_to_h4i9 + r6a1_to_h5i0 + r6a1_to_h5i1 + r6a1_to_h5i2 + r6a1_to_h5i3 + r6a1_to_h5i4 + r6a1_to_h5i5 + r6a1_to_h5i6 + r6a1_to_h5i7 + r6a1_to_h5i8 + r6a1_to_h5i9 = 1 - r6a1_to_h0i0_exists: h0i0_exists - r6a1_to_h0i0 >= 0 - r6a1_to_h0i1_exists: h0i1_exists - r6a1_to_h0i1 >= 0 - r6a1_to_h0i2_exists: h0i2_exists - r6a1_to_h0i2 >= 0 - r6a1_to_h0i3_exists: h0i3_exists - r6a1_to_h0i3 >= 0 - r6a1_to_h0i4_exists: h0i4_exists - r6a1_to_h0i4 >= 0 - r6a1_to_h0i5_exists: h0i5_exists - r6a1_to_h0i5 >= 0 - r6a1_to_h0i6_exists: h0i6_exists - r6a1_to_h0i6 >= 0 - r6a1_to_h0i7_exists: h0i7_exists - r6a1_to_h0i7 >= 0 - r6a1_to_h0i8_exists: h0i8_exists - r6a1_to_h0i8 >= 0 - r6a1_to_h0i9_exists: h0i9_exists - r6a1_to_h0i9 >= 0 - r6a1_to_h1i0_exists: h1i0_exists - r6a1_to_h1i0 >= 0 - r6a1_to_h1i1_exists: h1i1_exists - r6a1_to_h1i1 >= 0 - r6a1_to_h1i2_exists: h1i2_exists - r6a1_to_h1i2 >= 0 - r6a1_to_h1i3_exists: h1i3_exists - r6a1_to_h1i3 >= 0 - r6a1_to_h1i4_exists: h1i4_exists - r6a1_to_h1i4 >= 0 - r6a1_to_h1i5_exists: h1i5_exists - r6a1_to_h1i5 >= 0 - r6a1_to_h1i6_exists: h1i6_exists - r6a1_to_h1i6 >= 0 - r6a1_to_h1i7_exists: h1i7_exists - r6a1_to_h1i7 >= 0 - r6a1_to_h1i8_exists: h1i8_exists - r6a1_to_h1i8 >= 0 - r6a1_to_h1i9_exists: h1i9_exists - r6a1_to_h1i9 >= 0 - r6a1_to_h2i0_exists: h2i0_exists - r6a1_to_h2i0 >= 0 - r6a1_to_h2i1_exists: h2i1_exists - r6a1_to_h2i1 >= 0 - r6a1_to_h2i2_exists: h2i2_exists - r6a1_to_h2i2 >= 0 - r6a1_to_h2i3_exists: h2i3_exists - r6a1_to_h2i3 >= 0 - r6a1_to_h2i4_exists: h2i4_exists - r6a1_to_h2i4 >= 0 - r6a1_to_h2i5_exists: h2i5_exists - r6a1_to_h2i5 >= 0 - r6a1_to_h2i6_exists: h2i6_exists - r6a1_to_h2i6 >= 0 - r6a1_to_h2i7_exists: h2i7_exists - r6a1_to_h2i7 >= 0 - r6a1_to_h2i8_exists: h2i8_exists - r6a1_to_h2i8 >= 0 - r6a1_to_h2i9_exists: h2i9_exists - r6a1_to_h2i9 >= 0 - r6a1_to_h3i0_exists: h3i0_exists - r6a1_to_h3i0 >= 0 - r6a1_to_h3i1_exists: h3i1_exists - r6a1_to_h3i1 >= 0 - r6a1_to_h3i2_exists: h3i2_exists - r6a1_to_h3i2 >= 0 - r6a1_to_h3i3_exists: h3i3_exists - r6a1_to_h3i3 >= 0 - r6a1_to_h3i4_exists: h3i4_exists - r6a1_to_h3i4 >= 0 - r6a1_to_h3i5_exists: h3i5_exists - r6a1_to_h3i5 >= 0 - r6a1_to_h3i6_exists: h3i6_exists - r6a1_to_h3i6 >= 0 - r6a1_to_h3i7_exists: h3i7_exists - r6a1_to_h3i7 >= 0 - r6a1_to_h3i8_exists: h3i8_exists - r6a1_to_h3i8 >= 0 - r6a1_to_h3i9_exists: h3i9_exists - r6a1_to_h3i9 >= 0 - r6a1_to_h4i0_exists: h4i0_exists - r6a1_to_h4i0 >= 0 - r6a1_to_h4i1_exists: h4i1_exists - r6a1_to_h4i1 >= 0 - r6a1_to_h4i2_exists: h4i2_exists - r6a1_to_h4i2 >= 0 - r6a1_to_h4i3_exists: h4i3_exists - r6a1_to_h4i3 >= 0 - r6a1_to_h4i4_exists: h4i4_exists - r6a1_to_h4i4 >= 0 - r6a1_to_h4i5_exists: h4i5_exists - r6a1_to_h4i5 >= 0 - r6a1_to_h4i6_exists: h4i6_exists - r6a1_to_h4i6 >= 0 - r6a1_to_h4i7_exists: h4i7_exists - r6a1_to_h4i7 >= 0 - r6a1_to_h4i8_exists: h4i8_exists - r6a1_to_h4i8 >= 0 - r6a1_to_h4i9_exists: h4i9_exists - r6a1_to_h4i9 >= 0 - r6a1_to_h5i0_exists: h5i0_exists - r6a1_to_h5i0 >= 0 - r6a1_to_h5i1_exists: h5i1_exists - r6a1_to_h5i1 >= 0 - r6a1_to_h5i2_exists: h5i2_exists - r6a1_to_h5i2 >= 0 - r6a1_to_h5i3_exists: h5i3_exists - r6a1_to_h5i3 >= 0 - r6a1_to_h5i4_exists: h5i4_exists - r6a1_to_h5i4 >= 0 - r6a1_to_h5i5_exists: h5i5_exists - r6a1_to_h5i5 >= 0 - r6a1_to_h5i6_exists: h5i6_exists - r6a1_to_h5i6 >= 0 - r6a1_to_h5i7_exists: h5i7_exists - r6a1_to_h5i7 >= 0 - r6a1_to_h5i8_exists: h5i8_exists - r6a1_to_h5i8 >= 0 - r6a1_to_h5i9_exists: h5i9_exists - r6a1_to_h5i9 >= 0 - r6a2_allocated: r6a2_to_h0i0 + r6a2_to_h0i1 + r6a2_to_h0i2 + r6a2_to_h0i3 + r6a2_to_h0i4 + r6a2_to_h0i5 + r6a2_to_h0i6 + r6a2_to_h0i7 + r6a2_to_h0i8 + r6a2_to_h0i9 + r6a2_to_h1i0 + r6a2_to_h1i1 + r6a2_to_h1i2 + r6a2_to_h1i3 + r6a2_to_h1i4 + r6a2_to_h1i5 + r6a2_to_h1i6 + r6a2_to_h1i7 + r6a2_to_h1i8 + r6a2_to_h1i9 + r6a2_to_h2i0 + r6a2_to_h2i1 + r6a2_to_h2i2 + r6a2_to_h2i3 + r6a2_to_h2i4 + r6a2_to_h2i5 + r6a2_to_h2i6 + r6a2_to_h2i7 + r6a2_to_h2i8 + r6a2_to_h2i9 + r6a2_to_h3i0 + r6a2_to_h3i1 + r6a2_to_h3i2 + r6a2_to_h3i3 + r6a2_to_h3i4 + r6a2_to_h3i5 + r6a2_to_h3i6 + r6a2_to_h3i7 + r6a2_to_h3i8 + r6a2_to_h3i9 + r6a2_to_h4i0 + r6a2_to_h4i1 + r6a2_to_h4i2 + r6a2_to_h4i3 + r6a2_to_h4i4 + r6a2_to_h4i5 + r6a2_to_h4i6 + r6a2_to_h4i7 + r6a2_to_h4i8 + r6a2_to_h4i9 + r6a2_to_h5i0 + r6a2_to_h5i1 + r6a2_to_h5i2 + r6a2_to_h5i3 + r6a2_to_h5i4 + r6a2_to_h5i5 + r6a2_to_h5i6 + r6a2_to_h5i7 + r6a2_to_h5i8 + r6a2_to_h5i9 = 1 - r6a2_to_h0i0_exists: h0i0_exists - r6a2_to_h0i0 >= 0 - r6a2_to_h0i1_exists: h0i1_exists - r6a2_to_h0i1 >= 0 - r6a2_to_h0i2_exists: h0i2_exists - r6a2_to_h0i2 >= 0 - r6a2_to_h0i3_exists: h0i3_exists - r6a2_to_h0i3 >= 0 - r6a2_to_h0i4_exists: h0i4_exists - r6a2_to_h0i4 >= 0 - r6a2_to_h0i5_exists: h0i5_exists - r6a2_to_h0i5 >= 0 - r6a2_to_h0i6_exists: h0i6_exists - r6a2_to_h0i6 >= 0 - r6a2_to_h0i7_exists: h0i7_exists - r6a2_to_h0i7 >= 0 - r6a2_to_h0i8_exists: h0i8_exists - r6a2_to_h0i8 >= 0 - r6a2_to_h0i9_exists: h0i9_exists - r6a2_to_h0i9 >= 0 - r6a2_to_h1i0_exists: h1i0_exists - r6a2_to_h1i0 >= 0 - r6a2_to_h1i1_exists: h1i1_exists - r6a2_to_h1i1 >= 0 - r6a2_to_h1i2_exists: h1i2_exists - r6a2_to_h1i2 >= 0 - r6a2_to_h1i3_exists: h1i3_exists - r6a2_to_h1i3 >= 0 - r6a2_to_h1i4_exists: h1i4_exists - r6a2_to_h1i4 >= 0 - r6a2_to_h1i5_exists: h1i5_exists - r6a2_to_h1i5 >= 0 - r6a2_to_h1i6_exists: h1i6_exists - r6a2_to_h1i6 >= 0 - r6a2_to_h1i7_exists: h1i7_exists - r6a2_to_h1i7 >= 0 - r6a2_to_h1i8_exists: h1i8_exists - r6a2_to_h1i8 >= 0 - r6a2_to_h1i9_exists: h1i9_exists - r6a2_to_h1i9 >= 0 - r6a2_to_h2i0_exists: h2i0_exists - r6a2_to_h2i0 >= 0 - r6a2_to_h2i1_exists: h2i1_exists - r6a2_to_h2i1 >= 0 - r6a2_to_h2i2_exists: h2i2_exists - r6a2_to_h2i2 >= 0 - r6a2_to_h2i3_exists: h2i3_exists - r6a2_to_h2i3 >= 0 - r6a2_to_h2i4_exists: h2i4_exists - r6a2_to_h2i4 >= 0 - r6a2_to_h2i5_exists: h2i5_exists - r6a2_to_h2i5 >= 0 - r6a2_to_h2i6_exists: h2i6_exists - r6a2_to_h2i6 >= 0 - r6a2_to_h2i7_exists: h2i7_exists - r6a2_to_h2i7 >= 0 - r6a2_to_h2i8_exists: h2i8_exists - r6a2_to_h2i8 >= 0 - r6a2_to_h2i9_exists: h2i9_exists - r6a2_to_h2i9 >= 0 - r6a2_to_h3i0_exists: h3i0_exists - r6a2_to_h3i0 >= 0 - r6a2_to_h3i1_exists: h3i1_exists - r6a2_to_h3i1 >= 0 - r6a2_to_h3i2_exists: h3i2_exists - r6a2_to_h3i2 >= 0 - r6a2_to_h3i3_exists: h3i3_exists - r6a2_to_h3i3 >= 0 - r6a2_to_h3i4_exists: h3i4_exists - r6a2_to_h3i4 >= 0 - r6a2_to_h3i5_exists: h3i5_exists - r6a2_to_h3i5 >= 0 - r6a2_to_h3i6_exists: h3i6_exists - r6a2_to_h3i6 >= 0 - r6a2_to_h3i7_exists: h3i7_exists - r6a2_to_h3i7 >= 0 - r6a2_to_h3i8_exists: h3i8_exists - r6a2_to_h3i8 >= 0 - r6a2_to_h3i9_exists: h3i9_exists - r6a2_to_h3i9 >= 0 - r6a2_to_h4i0_exists: h4i0_exists - r6a2_to_h4i0 >= 0 - r6a2_to_h4i1_exists: h4i1_exists - r6a2_to_h4i1 >= 0 - r6a2_to_h4i2_exists: h4i2_exists - r6a2_to_h4i2 >= 0 - r6a2_to_h4i3_exists: h4i3_exists - r6a2_to_h4i3 >= 0 - r6a2_to_h4i4_exists: h4i4_exists - r6a2_to_h4i4 >= 0 - r6a2_to_h4i5_exists: h4i5_exists - r6a2_to_h4i5 >= 0 - r6a2_to_h4i6_exists: h4i6_exists - r6a2_to_h4i6 >= 0 - r6a2_to_h4i7_exists: h4i7_exists - r6a2_to_h4i7 >= 0 - r6a2_to_h4i8_exists: h4i8_exists - r6a2_to_h4i8 >= 0 - r6a2_to_h4i9_exists: h4i9_exists - r6a2_to_h4i9 >= 0 - r6a2_to_h5i0_exists: h5i0_exists - r6a2_to_h5i0 >= 0 - r6a2_to_h5i1_exists: h5i1_exists - r6a2_to_h5i1 >= 0 - r6a2_to_h5i2_exists: h5i2_exists - r6a2_to_h5i2 >= 0 - r6a2_to_h5i3_exists: h5i3_exists - r6a2_to_h5i3 >= 0 - r6a2_to_h5i4_exists: h5i4_exists - r6a2_to_h5i4 >= 0 - r6a2_to_h5i5_exists: h5i5_exists - r6a2_to_h5i5 >= 0 - r6a2_to_h5i6_exists: h5i6_exists - r6a2_to_h5i6 >= 0 - r6a2_to_h5i7_exists: h5i7_exists - r6a2_to_h5i7 >= 0 - r6a2_to_h5i8_exists: h5i8_exists - r6a2_to_h5i8 >= 0 - r6a2_to_h5i9_exists: h5i9_exists - r6a2_to_h5i9 >= 0 - r6a3_allocated: r6a3_to_h0i0 + r6a3_to_h0i1 + r6a3_to_h0i2 + r6a3_to_h0i3 + r6a3_to_h0i4 + r6a3_to_h0i5 + r6a3_to_h0i6 + r6a3_to_h0i7 + r6a3_to_h0i8 + r6a3_to_h0i9 + r6a3_to_h1i0 + r6a3_to_h1i1 + r6a3_to_h1i2 + r6a3_to_h1i3 + r6a3_to_h1i4 + r6a3_to_h1i5 + r6a3_to_h1i6 + r6a3_to_h1i7 + r6a3_to_h1i8 + r6a3_to_h1i9 + r6a3_to_h2i0 + r6a3_to_h2i1 + r6a3_to_h2i2 + r6a3_to_h2i3 + r6a3_to_h2i4 + r6a3_to_h2i5 + r6a3_to_h2i6 + r6a3_to_h2i7 + r6a3_to_h2i8 + r6a3_to_h2i9 + r6a3_to_h3i0 + r6a3_to_h3i1 + r6a3_to_h3i2 + r6a3_to_h3i3 + r6a3_to_h3i4 + r6a3_to_h3i5 + r6a3_to_h3i6 + r6a3_to_h3i7 + r6a3_to_h3i8 + r6a3_to_h3i9 + r6a3_to_h4i0 + r6a3_to_h4i1 + r6a3_to_h4i2 + r6a3_to_h4i3 + r6a3_to_h4i4 + r6a3_to_h4i5 + r6a3_to_h4i6 + r6a3_to_h4i7 + r6a3_to_h4i8 + r6a3_to_h4i9 + r6a3_to_h5i0 + r6a3_to_h5i1 + r6a3_to_h5i2 + r6a3_to_h5i3 + r6a3_to_h5i4 + r6a3_to_h5i5 + r6a3_to_h5i6 + r6a3_to_h5i7 + r6a3_to_h5i8 + r6a3_to_h5i9 = 1 - r6a3_to_h0i0_exists: h0i0_exists - r6a3_to_h0i0 >= 0 - r6a3_to_h0i1_exists: h0i1_exists - r6a3_to_h0i1 >= 0 - r6a3_to_h0i2_exists: h0i2_exists - r6a3_to_h0i2 >= 0 - r6a3_to_h0i3_exists: h0i3_exists - r6a3_to_h0i3 >= 0 - r6a3_to_h0i4_exists: h0i4_exists - r6a3_to_h0i4 >= 0 - r6a3_to_h0i5_exists: h0i5_exists - r6a3_to_h0i5 >= 0 - r6a3_to_h0i6_exists: h0i6_exists - r6a3_to_h0i6 >= 0 - r6a3_to_h0i7_exists: h0i7_exists - r6a3_to_h0i7 >= 0 - r6a3_to_h0i8_exists: h0i8_exists - r6a3_to_h0i8 >= 0 - r6a3_to_h0i9_exists: h0i9_exists - r6a3_to_h0i9 >= 0 - r6a3_to_h1i0_exists: h1i0_exists - r6a3_to_h1i0 >= 0 - r6a3_to_h1i1_exists: h1i1_exists - r6a3_to_h1i1 >= 0 - r6a3_to_h1i2_exists: h1i2_exists - r6a3_to_h1i2 >= 0 - r6a3_to_h1i3_exists: h1i3_exists - r6a3_to_h1i3 >= 0 - r6a3_to_h1i4_exists: h1i4_exists - r6a3_to_h1i4 >= 0 - r6a3_to_h1i5_exists: h1i5_exists - r6a3_to_h1i5 >= 0 - r6a3_to_h1i6_exists: h1i6_exists - r6a3_to_h1i6 >= 0 - r6a3_to_h1i7_exists: h1i7_exists - r6a3_to_h1i7 >= 0 - r6a3_to_h1i8_exists: h1i8_exists - r6a3_to_h1i8 >= 0 - r6a3_to_h1i9_exists: h1i9_exists - r6a3_to_h1i9 >= 0 - r6a3_to_h2i0_exists: h2i0_exists - r6a3_to_h2i0 >= 0 - r6a3_to_h2i1_exists: h2i1_exists - r6a3_to_h2i1 >= 0 - r6a3_to_h2i2_exists: h2i2_exists - r6a3_to_h2i2 >= 0 - r6a3_to_h2i3_exists: h2i3_exists - r6a3_to_h2i3 >= 0 - r6a3_to_h2i4_exists: h2i4_exists - r6a3_to_h2i4 >= 0 - r6a3_to_h2i5_exists: h2i5_exists - r6a3_to_h2i5 >= 0 - r6a3_to_h2i6_exists: h2i6_exists - r6a3_to_h2i6 >= 0 - r6a3_to_h2i7_exists: h2i7_exists - r6a3_to_h2i7 >= 0 - r6a3_to_h2i8_exists: h2i8_exists - r6a3_to_h2i8 >= 0 - r6a3_to_h2i9_exists: h2i9_exists - r6a3_to_h2i9 >= 0 - r6a3_to_h3i0_exists: h3i0_exists - r6a3_to_h3i0 >= 0 - r6a3_to_h3i1_exists: h3i1_exists - r6a3_to_h3i1 >= 0 - r6a3_to_h3i2_exists: h3i2_exists - r6a3_to_h3i2 >= 0 - r6a3_to_h3i3_exists: h3i3_exists - r6a3_to_h3i3 >= 0 - r6a3_to_h3i4_exists: h3i4_exists - r6a3_to_h3i4 >= 0 - r6a3_to_h3i5_exists: h3i5_exists - r6a3_to_h3i5 >= 0 - r6a3_to_h3i6_exists: h3i6_exists - r6a3_to_h3i6 >= 0 - r6a3_to_h3i7_exists: h3i7_exists - r6a3_to_h3i7 >= 0 - r6a3_to_h3i8_exists: h3i8_exists - r6a3_to_h3i8 >= 0 - r6a3_to_h3i9_exists: h3i9_exists - r6a3_to_h3i9 >= 0 - r6a3_to_h4i0_exists: h4i0_exists - r6a3_to_h4i0 >= 0 - r6a3_to_h4i1_exists: h4i1_exists - r6a3_to_h4i1 >= 0 - r6a3_to_h4i2_exists: h4i2_exists - r6a3_to_h4i2 >= 0 - r6a3_to_h4i3_exists: h4i3_exists - r6a3_to_h4i3 >= 0 - r6a3_to_h4i4_exists: h4i4_exists - r6a3_to_h4i4 >= 0 - r6a3_to_h4i5_exists: h4i5_exists - r6a3_to_h4i5 >= 0 - r6a3_to_h4i6_exists: h4i6_exists - r6a3_to_h4i6 >= 0 - r6a3_to_h4i7_exists: h4i7_exists - r6a3_to_h4i7 >= 0 - r6a3_to_h4i8_exists: h4i8_exists - r6a3_to_h4i8 >= 0 - r6a3_to_h4i9_exists: h4i9_exists - r6a3_to_h4i9 >= 0 - r6a3_to_h5i0_exists: h5i0_exists - r6a3_to_h5i0 >= 0 - r6a3_to_h5i1_exists: h5i1_exists - r6a3_to_h5i1 >= 0 - r6a3_to_h5i2_exists: h5i2_exists - r6a3_to_h5i2 >= 0 - r6a3_to_h5i3_exists: h5i3_exists - r6a3_to_h5i3 >= 0 - r6a3_to_h5i4_exists: h5i4_exists - r6a3_to_h5i4 >= 0 - r6a3_to_h5i5_exists: h5i5_exists - r6a3_to_h5i5 >= 0 - r6a3_to_h5i6_exists: h5i6_exists - r6a3_to_h5i6 >= 0 - r6a3_to_h5i7_exists: h5i7_exists - r6a3_to_h5i7 >= 0 - r6a3_to_h5i8_exists: h5i8_exists - r6a3_to_h5i8 >= 0 - r6a3_to_h5i9_exists: h5i9_exists - r6a3_to_h5i9 >= 0 - r7a0_allocated: r7a0_to_h0i0 + r7a0_to_h0i1 + r7a0_to_h0i2 + r7a0_to_h0i3 + r7a0_to_h0i4 + r7a0_to_h0i5 + r7a0_to_h0i6 + r7a0_to_h0i7 + r7a0_to_h0i8 + r7a0_to_h0i9 + r7a0_to_h1i0 + r7a0_to_h1i1 + r7a0_to_h1i2 + r7a0_to_h1i3 + r7a0_to_h1i4 + r7a0_to_h1i5 + r7a0_to_h1i6 + r7a0_to_h1i7 + r7a0_to_h1i8 + r7a0_to_h1i9 + r7a0_to_h2i0 + r7a0_to_h2i1 + r7a0_to_h2i2 + r7a0_to_h2i3 + r7a0_to_h2i4 + r7a0_to_h2i5 + r7a0_to_h2i6 + r7a0_to_h2i7 + r7a0_to_h2i8 + r7a0_to_h2i9 + r7a0_to_h3i0 + r7a0_to_h3i1 + r7a0_to_h3i2 + r7a0_to_h3i3 + r7a0_to_h3i4 + r7a0_to_h3i5 + r7a0_to_h3i6 + r7a0_to_h3i7 + r7a0_to_h3i8 + r7a0_to_h3i9 + r7a0_to_h4i0 + r7a0_to_h4i1 + r7a0_to_h4i2 + r7a0_to_h4i3 + r7a0_to_h4i4 + r7a0_to_h4i5 + r7a0_to_h4i6 + r7a0_to_h4i7 + r7a0_to_h4i8 + r7a0_to_h4i9 + r7a0_to_h5i0 + r7a0_to_h5i1 + r7a0_to_h5i2 + r7a0_to_h5i3 + r7a0_to_h5i4 + r7a0_to_h5i5 + r7a0_to_h5i6 + r7a0_to_h5i7 + r7a0_to_h5i8 + r7a0_to_h5i9 = 1 - r7a0_to_h0i0_exists: h0i0_exists - r7a0_to_h0i0 >= 0 - r7a0_to_h0i1_exists: h0i1_exists - r7a0_to_h0i1 >= 0 - r7a0_to_h0i2_exists: h0i2_exists - r7a0_to_h0i2 >= 0 - r7a0_to_h0i3_exists: h0i3_exists - r7a0_to_h0i3 >= 0 - r7a0_to_h0i4_exists: h0i4_exists - r7a0_to_h0i4 >= 0 - r7a0_to_h0i5_exists: h0i5_exists - r7a0_to_h0i5 >= 0 - r7a0_to_h0i6_exists: h0i6_exists - r7a0_to_h0i6 >= 0 - r7a0_to_h0i7_exists: h0i7_exists - r7a0_to_h0i7 >= 0 - r7a0_to_h0i8_exists: h0i8_exists - r7a0_to_h0i8 >= 0 - r7a0_to_h0i9_exists: h0i9_exists - r7a0_to_h0i9 >= 0 - r7a0_to_h1i0_exists: h1i0_exists - r7a0_to_h1i0 >= 0 - r7a0_to_h1i1_exists: h1i1_exists - r7a0_to_h1i1 >= 0 - r7a0_to_h1i2_exists: h1i2_exists - r7a0_to_h1i2 >= 0 - r7a0_to_h1i3_exists: h1i3_exists - r7a0_to_h1i3 >= 0 - r7a0_to_h1i4_exists: h1i4_exists - r7a0_to_h1i4 >= 0 - r7a0_to_h1i5_exists: h1i5_exists - r7a0_to_h1i5 >= 0 - r7a0_to_h1i6_exists: h1i6_exists - r7a0_to_h1i6 >= 0 - r7a0_to_h1i7_exists: h1i7_exists - r7a0_to_h1i7 >= 0 - r7a0_to_h1i8_exists: h1i8_exists - r7a0_to_h1i8 >= 0 - r7a0_to_h1i9_exists: h1i9_exists - r7a0_to_h1i9 >= 0 - r7a0_to_h2i0_exists: h2i0_exists - r7a0_to_h2i0 >= 0 - r7a0_to_h2i1_exists: h2i1_exists - r7a0_to_h2i1 >= 0 - r7a0_to_h2i2_exists: h2i2_exists - r7a0_to_h2i2 >= 0 - r7a0_to_h2i3_exists: h2i3_exists - r7a0_to_h2i3 >= 0 - r7a0_to_h2i4_exists: h2i4_exists - r7a0_to_h2i4 >= 0 - r7a0_to_h2i5_exists: h2i5_exists - r7a0_to_h2i5 >= 0 - r7a0_to_h2i6_exists: h2i6_exists - r7a0_to_h2i6 >= 0 - r7a0_to_h2i7_exists: h2i7_exists - r7a0_to_h2i7 >= 0 - r7a0_to_h2i8_exists: h2i8_exists - r7a0_to_h2i8 >= 0 - r7a0_to_h2i9_exists: h2i9_exists - r7a0_to_h2i9 >= 0 - r7a0_to_h3i0_exists: h3i0_exists - r7a0_to_h3i0 >= 0 - r7a0_to_h3i1_exists: h3i1_exists - r7a0_to_h3i1 >= 0 - r7a0_to_h3i2_exists: h3i2_exists - r7a0_to_h3i2 >= 0 - r7a0_to_h3i3_exists: h3i3_exists - r7a0_to_h3i3 >= 0 - r7a0_to_h3i4_exists: h3i4_exists - r7a0_to_h3i4 >= 0 - r7a0_to_h3i5_exists: h3i5_exists - r7a0_to_h3i5 >= 0 - r7a0_to_h3i6_exists: h3i6_exists - r7a0_to_h3i6 >= 0 - r7a0_to_h3i7_exists: h3i7_exists - r7a0_to_h3i7 >= 0 - r7a0_to_h3i8_exists: h3i8_exists - r7a0_to_h3i8 >= 0 - r7a0_to_h3i9_exists: h3i9_exists - r7a0_to_h3i9 >= 0 - r7a0_to_h4i0_exists: h4i0_exists - r7a0_to_h4i0 >= 0 - r7a0_to_h4i1_exists: h4i1_exists - r7a0_to_h4i1 >= 0 - r7a0_to_h4i2_exists: h4i2_exists - r7a0_to_h4i2 >= 0 - r7a0_to_h4i3_exists: h4i3_exists - r7a0_to_h4i3 >= 0 - r7a0_to_h4i4_exists: h4i4_exists - r7a0_to_h4i4 >= 0 - r7a0_to_h4i5_exists: h4i5_exists - r7a0_to_h4i5 >= 0 - r7a0_to_h4i6_exists: h4i6_exists - r7a0_to_h4i6 >= 0 - r7a0_to_h4i7_exists: h4i7_exists - r7a0_to_h4i7 >= 0 - r7a0_to_h4i8_exists: h4i8_exists - r7a0_to_h4i8 >= 0 - r7a0_to_h4i9_exists: h4i9_exists - r7a0_to_h4i9 >= 0 - r7a0_to_h5i0_exists: h5i0_exists - r7a0_to_h5i0 >= 0 - r7a0_to_h5i1_exists: h5i1_exists - r7a0_to_h5i1 >= 0 - r7a0_to_h5i2_exists: h5i2_exists - r7a0_to_h5i2 >= 0 - r7a0_to_h5i3_exists: h5i3_exists - r7a0_to_h5i3 >= 0 - r7a0_to_h5i4_exists: h5i4_exists - r7a0_to_h5i4 >= 0 - r7a0_to_h5i5_exists: h5i5_exists - r7a0_to_h5i5 >= 0 - r7a0_to_h5i6_exists: h5i6_exists - r7a0_to_h5i6 >= 0 - r7a0_to_h5i7_exists: h5i7_exists - r7a0_to_h5i7 >= 0 - r7a0_to_h5i8_exists: h5i8_exists - r7a0_to_h5i8 >= 0 - r7a0_to_h5i9_exists: h5i9_exists - r7a0_to_h5i9 >= 0 - r7a1_allocated: r7a1_to_h0i0 + r7a1_to_h0i1 + r7a1_to_h0i2 + r7a1_to_h0i3 + r7a1_to_h0i4 + r7a1_to_h0i5 + r7a1_to_h0i6 + r7a1_to_h0i7 + r7a1_to_h0i8 + r7a1_to_h0i9 + r7a1_to_h1i0 + r7a1_to_h1i1 + r7a1_to_h1i2 + r7a1_to_h1i3 + r7a1_to_h1i4 + r7a1_to_h1i5 + r7a1_to_h1i6 + r7a1_to_h1i7 + r7a1_to_h1i8 + r7a1_to_h1i9 + r7a1_to_h2i0 + r7a1_to_h2i1 + r7a1_to_h2i2 + r7a1_to_h2i3 + r7a1_to_h2i4 + r7a1_to_h2i5 + r7a1_to_h2i6 + r7a1_to_h2i7 + r7a1_to_h2i8 + r7a1_to_h2i9 + r7a1_to_h3i0 + r7a1_to_h3i1 + r7a1_to_h3i2 + r7a1_to_h3i3 + r7a1_to_h3i4 + r7a1_to_h3i5 + r7a1_to_h3i6 + r7a1_to_h3i7 + r7a1_to_h3i8 + r7a1_to_h3i9 + r7a1_to_h4i0 + r7a1_to_h4i1 + r7a1_to_h4i2 + r7a1_to_h4i3 + r7a1_to_h4i4 + r7a1_to_h4i5 + r7a1_to_h4i6 + r7a1_to_h4i7 + r7a1_to_h4i8 + r7a1_to_h4i9 + r7a1_to_h5i0 + r7a1_to_h5i1 + r7a1_to_h5i2 + r7a1_to_h5i3 + r7a1_to_h5i4 + r7a1_to_h5i5 + r7a1_to_h5i6 + r7a1_to_h5i7 + r7a1_to_h5i8 + r7a1_to_h5i9 = 1 - r7a1_to_h0i0_exists: h0i0_exists - r7a1_to_h0i0 >= 0 - r7a1_to_h0i1_exists: h0i1_exists - r7a1_to_h0i1 >= 0 - r7a1_to_h0i2_exists: h0i2_exists - r7a1_to_h0i2 >= 0 - r7a1_to_h0i3_exists: h0i3_exists - r7a1_to_h0i3 >= 0 - r7a1_to_h0i4_exists: h0i4_exists - r7a1_to_h0i4 >= 0 - r7a1_to_h0i5_exists: h0i5_exists - r7a1_to_h0i5 >= 0 - r7a1_to_h0i6_exists: h0i6_exists - r7a1_to_h0i6 >= 0 - r7a1_to_h0i7_exists: h0i7_exists - r7a1_to_h0i7 >= 0 - r7a1_to_h0i8_exists: h0i8_exists - r7a1_to_h0i8 >= 0 - r7a1_to_h0i9_exists: h0i9_exists - r7a1_to_h0i9 >= 0 - r7a1_to_h1i0_exists: h1i0_exists - r7a1_to_h1i0 >= 0 - r7a1_to_h1i1_exists: h1i1_exists - r7a1_to_h1i1 >= 0 - r7a1_to_h1i2_exists: h1i2_exists - r7a1_to_h1i2 >= 0 - r7a1_to_h1i3_exists: h1i3_exists - r7a1_to_h1i3 >= 0 - r7a1_to_h1i4_exists: h1i4_exists - r7a1_to_h1i4 >= 0 - r7a1_to_h1i5_exists: h1i5_exists - r7a1_to_h1i5 >= 0 - r7a1_to_h1i6_exists: h1i6_exists - r7a1_to_h1i6 >= 0 - r7a1_to_h1i7_exists: h1i7_exists - r7a1_to_h1i7 >= 0 - r7a1_to_h1i8_exists: h1i8_exists - r7a1_to_h1i8 >= 0 - r7a1_to_h1i9_exists: h1i9_exists - r7a1_to_h1i9 >= 0 - r7a1_to_h2i0_exists: h2i0_exists - r7a1_to_h2i0 >= 0 - r7a1_to_h2i1_exists: h2i1_exists - r7a1_to_h2i1 >= 0 - r7a1_to_h2i2_exists: h2i2_exists - r7a1_to_h2i2 >= 0 - r7a1_to_h2i3_exists: h2i3_exists - r7a1_to_h2i3 >= 0 - r7a1_to_h2i4_exists: h2i4_exists - r7a1_to_h2i4 >= 0 - r7a1_to_h2i5_exists: h2i5_exists - r7a1_to_h2i5 >= 0 - r7a1_to_h2i6_exists: h2i6_exists - r7a1_to_h2i6 >= 0 - r7a1_to_h2i7_exists: h2i7_exists - r7a1_to_h2i7 >= 0 - r7a1_to_h2i8_exists: h2i8_exists - r7a1_to_h2i8 >= 0 - r7a1_to_h2i9_exists: h2i9_exists - r7a1_to_h2i9 >= 0 - r7a1_to_h3i0_exists: h3i0_exists - r7a1_to_h3i0 >= 0 - r7a1_to_h3i1_exists: h3i1_exists - r7a1_to_h3i1 >= 0 - r7a1_to_h3i2_exists: h3i2_exists - r7a1_to_h3i2 >= 0 - r7a1_to_h3i3_exists: h3i3_exists - r7a1_to_h3i3 >= 0 - r7a1_to_h3i4_exists: h3i4_exists - r7a1_to_h3i4 >= 0 - r7a1_to_h3i5_exists: h3i5_exists - r7a1_to_h3i5 >= 0 - r7a1_to_h3i6_exists: h3i6_exists - r7a1_to_h3i6 >= 0 - r7a1_to_h3i7_exists: h3i7_exists - r7a1_to_h3i7 >= 0 - r7a1_to_h3i8_exists: h3i8_exists - r7a1_to_h3i8 >= 0 - r7a1_to_h3i9_exists: h3i9_exists - r7a1_to_h3i9 >= 0 - r7a1_to_h4i0_exists: h4i0_exists - r7a1_to_h4i0 >= 0 - r7a1_to_h4i1_exists: h4i1_exists - r7a1_to_h4i1 >= 0 - r7a1_to_h4i2_exists: h4i2_exists - r7a1_to_h4i2 >= 0 - r7a1_to_h4i3_exists: h4i3_exists - r7a1_to_h4i3 >= 0 - r7a1_to_h4i4_exists: h4i4_exists - r7a1_to_h4i4 >= 0 - r7a1_to_h4i5_exists: h4i5_exists - r7a1_to_h4i5 >= 0 - r7a1_to_h4i6_exists: h4i6_exists - r7a1_to_h4i6 >= 0 - r7a1_to_h4i7_exists: h4i7_exists - r7a1_to_h4i7 >= 0 - r7a1_to_h4i8_exists: h4i8_exists - r7a1_to_h4i8 >= 0 - r7a1_to_h4i9_exists: h4i9_exists - r7a1_to_h4i9 >= 0 - r7a1_to_h5i0_exists: h5i0_exists - r7a1_to_h5i0 >= 0 - r7a1_to_h5i1_exists: h5i1_exists - r7a1_to_h5i1 >= 0 - r7a1_to_h5i2_exists: h5i2_exists - r7a1_to_h5i2 >= 0 - r7a1_to_h5i3_exists: h5i3_exists - r7a1_to_h5i3 >= 0 - r7a1_to_h5i4_exists: h5i4_exists - r7a1_to_h5i4 >= 0 - r7a1_to_h5i5_exists: h5i5_exists - r7a1_to_h5i5 >= 0 - r7a1_to_h5i6_exists: h5i6_exists - r7a1_to_h5i6 >= 0 - r7a1_to_h5i7_exists: h5i7_exists - r7a1_to_h5i7 >= 0 - r7a1_to_h5i8_exists: h5i8_exists - r7a1_to_h5i8 >= 0 - r7a1_to_h5i9_exists: h5i9_exists - r7a1_to_h5i9 >= 0 - r7a2_allocated: r7a2_to_h0i0 + r7a2_to_h0i1 + r7a2_to_h0i2 + r7a2_to_h0i3 + r7a2_to_h0i4 + r7a2_to_h0i5 + r7a2_to_h0i6 + r7a2_to_h0i7 + r7a2_to_h0i8 + r7a2_to_h0i9 + r7a2_to_h1i0 + r7a2_to_h1i1 + r7a2_to_h1i2 + r7a2_to_h1i3 + r7a2_to_h1i4 + r7a2_to_h1i5 + r7a2_to_h1i6 + r7a2_to_h1i7 + r7a2_to_h1i8 + r7a2_to_h1i9 + r7a2_to_h2i0 + r7a2_to_h2i1 + r7a2_to_h2i2 + r7a2_to_h2i3 + r7a2_to_h2i4 + r7a2_to_h2i5 + r7a2_to_h2i6 + r7a2_to_h2i7 + r7a2_to_h2i8 + r7a2_to_h2i9 + r7a2_to_h3i0 + r7a2_to_h3i1 + r7a2_to_h3i2 + r7a2_to_h3i3 + r7a2_to_h3i4 + r7a2_to_h3i5 + r7a2_to_h3i6 + r7a2_to_h3i7 + r7a2_to_h3i8 + r7a2_to_h3i9 + r7a2_to_h4i0 + r7a2_to_h4i1 + r7a2_to_h4i2 + r7a2_to_h4i3 + r7a2_to_h4i4 + r7a2_to_h4i5 + r7a2_to_h4i6 + r7a2_to_h4i7 + r7a2_to_h4i8 + r7a2_to_h4i9 + r7a2_to_h5i0 + r7a2_to_h5i1 + r7a2_to_h5i2 + r7a2_to_h5i3 + r7a2_to_h5i4 + r7a2_to_h5i5 + r7a2_to_h5i6 + r7a2_to_h5i7 + r7a2_to_h5i8 + r7a2_to_h5i9 = 1 - r7a2_to_h0i0_exists: h0i0_exists - r7a2_to_h0i0 >= 0 - r7a2_to_h0i1_exists: h0i1_exists - r7a2_to_h0i1 >= 0 - r7a2_to_h0i2_exists: h0i2_exists - r7a2_to_h0i2 >= 0 - r7a2_to_h0i3_exists: h0i3_exists - r7a2_to_h0i3 >= 0 - r7a2_to_h0i4_exists: h0i4_exists - r7a2_to_h0i4 >= 0 - r7a2_to_h0i5_exists: h0i5_exists - r7a2_to_h0i5 >= 0 - r7a2_to_h0i6_exists: h0i6_exists - r7a2_to_h0i6 >= 0 - r7a2_to_h0i7_exists: h0i7_exists - r7a2_to_h0i7 >= 0 - r7a2_to_h0i8_exists: h0i8_exists - r7a2_to_h0i8 >= 0 - r7a2_to_h0i9_exists: h0i9_exists - r7a2_to_h0i9 >= 0 - r7a2_to_h1i0_exists: h1i0_exists - r7a2_to_h1i0 >= 0 - r7a2_to_h1i1_exists: h1i1_exists - r7a2_to_h1i1 >= 0 - r7a2_to_h1i2_exists: h1i2_exists - r7a2_to_h1i2 >= 0 - r7a2_to_h1i3_exists: h1i3_exists - r7a2_to_h1i3 >= 0 - r7a2_to_h1i4_exists: h1i4_exists - r7a2_to_h1i4 >= 0 - r7a2_to_h1i5_exists: h1i5_exists - r7a2_to_h1i5 >= 0 - r7a2_to_h1i6_exists: h1i6_exists - r7a2_to_h1i6 >= 0 - r7a2_to_h1i7_exists: h1i7_exists - r7a2_to_h1i7 >= 0 - r7a2_to_h1i8_exists: h1i8_exists - r7a2_to_h1i8 >= 0 - r7a2_to_h1i9_exists: h1i9_exists - r7a2_to_h1i9 >= 0 - r7a2_to_h2i0_exists: h2i0_exists - r7a2_to_h2i0 >= 0 - r7a2_to_h2i1_exists: h2i1_exists - r7a2_to_h2i1 >= 0 - r7a2_to_h2i2_exists: h2i2_exists - r7a2_to_h2i2 >= 0 - r7a2_to_h2i3_exists: h2i3_exists - r7a2_to_h2i3 >= 0 - r7a2_to_h2i4_exists: h2i4_exists - r7a2_to_h2i4 >= 0 - r7a2_to_h2i5_exists: h2i5_exists - r7a2_to_h2i5 >= 0 - r7a2_to_h2i6_exists: h2i6_exists - r7a2_to_h2i6 >= 0 - r7a2_to_h2i7_exists: h2i7_exists - r7a2_to_h2i7 >= 0 - r7a2_to_h2i8_exists: h2i8_exists - r7a2_to_h2i8 >= 0 - r7a2_to_h2i9_exists: h2i9_exists - r7a2_to_h2i9 >= 0 - r7a2_to_h3i0_exists: h3i0_exists - r7a2_to_h3i0 >= 0 - r7a2_to_h3i1_exists: h3i1_exists - r7a2_to_h3i1 >= 0 - r7a2_to_h3i2_exists: h3i2_exists - r7a2_to_h3i2 >= 0 - r7a2_to_h3i3_exists: h3i3_exists - r7a2_to_h3i3 >= 0 - r7a2_to_h3i4_exists: h3i4_exists - r7a2_to_h3i4 >= 0 - r7a2_to_h3i5_exists: h3i5_exists - r7a2_to_h3i5 >= 0 - r7a2_to_h3i6_exists: h3i6_exists - r7a2_to_h3i6 >= 0 - r7a2_to_h3i7_exists: h3i7_exists - r7a2_to_h3i7 >= 0 - r7a2_to_h3i8_exists: h3i8_exists - r7a2_to_h3i8 >= 0 - r7a2_to_h3i9_exists: h3i9_exists - r7a2_to_h3i9 >= 0 - r7a2_to_h4i0_exists: h4i0_exists - r7a2_to_h4i0 >= 0 - r7a2_to_h4i1_exists: h4i1_exists - r7a2_to_h4i1 >= 0 - r7a2_to_h4i2_exists: h4i2_exists - r7a2_to_h4i2 >= 0 - r7a2_to_h4i3_exists: h4i3_exists - r7a2_to_h4i3 >= 0 - r7a2_to_h4i4_exists: h4i4_exists - r7a2_to_h4i4 >= 0 - r7a2_to_h4i5_exists: h4i5_exists - r7a2_to_h4i5 >= 0 - r7a2_to_h4i6_exists: h4i6_exists - r7a2_to_h4i6 >= 0 - r7a2_to_h4i7_exists: h4i7_exists - r7a2_to_h4i7 >= 0 - r7a2_to_h4i8_exists: h4i8_exists - r7a2_to_h4i8 >= 0 - r7a2_to_h4i9_exists: h4i9_exists - r7a2_to_h4i9 >= 0 - r7a2_to_h5i0_exists: h5i0_exists - r7a2_to_h5i0 >= 0 - r7a2_to_h5i1_exists: h5i1_exists - r7a2_to_h5i1 >= 0 - r7a2_to_h5i2_exists: h5i2_exists - r7a2_to_h5i2 >= 0 - r7a2_to_h5i3_exists: h5i3_exists - r7a2_to_h5i3 >= 0 - r7a2_to_h5i4_exists: h5i4_exists - r7a2_to_h5i4 >= 0 - r7a2_to_h5i5_exists: h5i5_exists - r7a2_to_h5i5 >= 0 - r7a2_to_h5i6_exists: h5i6_exists - r7a2_to_h5i6 >= 0 - r7a2_to_h5i7_exists: h5i7_exists - r7a2_to_h5i7 >= 0 - r7a2_to_h5i8_exists: h5i8_exists - r7a2_to_h5i8 >= 0 - r7a2_to_h5i9_exists: h5i9_exists - r7a2_to_h5i9 >= 0 - h0i0_mem_use: 2 r1a0_to_h0i0 + 2 r1a1_to_h0i0 + 2 r1a2_to_h0i0 + 3 r2a0_to_h0i0 + 3 r3a0_to_h0i0 + 2 r5a0_to_h0i0 + 3 r6a0_to_h0i0 + 3 r6a1_to_h0i0 + 3 r6a2_to_h0i0 + 3 r6a3_to_h0i0 + 3 r7a0_to_h0i0 + 3 r7a1_to_h0i0 + 3 r7a2_to_h0i0 - 8 h0i0_mem = 0 - h0i0_hdd_use: 4 r1a0_to_h0i0 + 4 r1a1_to_h0i0 + 4 r1a2_to_h0i0 + 5 r2a0_to_h0i0 + 17 r3a0_to_h0i0 + 4 r5a0_to_h0i0 + 5 r6a0_to_h0i0 + 5 r6a1_to_h0i0 + 5 r6a2_to_h0i0 + 5 r6a3_to_h0i0 + 17 r7a0_to_h0i0 + 17 r7a1_to_h0i0 + 17 r7a2_to_h0i0 - 75 h0i0_hdd = 0 - h0i1_mem_use: 2 r1a0_to_h0i1 + 2 r1a1_to_h0i1 + 2 r1a2_to_h0i1 + 3 r2a0_to_h0i1 + 3 r3a0_to_h0i1 + 2 r5a0_to_h0i1 + 3 r6a0_to_h0i1 + 3 r6a1_to_h0i1 + 3 r6a2_to_h0i1 + 3 r6a3_to_h0i1 + 3 r7a0_to_h0i1 + 3 r7a1_to_h0i1 + 3 r7a2_to_h0i1 - 8 h0i1_mem = 0 - h0i1_hdd_use: 4 r1a0_to_h0i1 + 4 r1a1_to_h0i1 + 4 r1a2_to_h0i1 + 5 r2a0_to_h0i1 + 17 r3a0_to_h0i1 + 4 r5a0_to_h0i1 + 5 r6a0_to_h0i1 + 5 r6a1_to_h0i1 + 5 r6a2_to_h0i1 + 5 r6a3_to_h0i1 + 17 r7a0_to_h0i1 + 17 r7a1_to_h0i1 + 17 r7a2_to_h0i1 - 75 h0i1_hdd = 0 - h0i2_mem_use: 2 r1a0_to_h0i2 + 2 r1a1_to_h0i2 + 2 r1a2_to_h0i2 + 3 r2a0_to_h0i2 + 3 r3a0_to_h0i2 + 2 r5a0_to_h0i2 + 3 r6a0_to_h0i2 + 3 r6a1_to_h0i2 + 3 r6a2_to_h0i2 + 3 r6a3_to_h0i2 + 3 r7a0_to_h0i2 + 3 r7a1_to_h0i2 + 3 r7a2_to_h0i2 - 8 h0i2_mem = 0 - h0i2_hdd_use: 4 r1a0_to_h0i2 + 4 r1a1_to_h0i2 + 4 r1a2_to_h0i2 + 5 r2a0_to_h0i2 + 17 r3a0_to_h0i2 + 4 r5a0_to_h0i2 + 5 r6a0_to_h0i2 + 5 r6a1_to_h0i2 + 5 r6a2_to_h0i2 + 5 r6a3_to_h0i2 + 17 r7a0_to_h0i2 + 17 r7a1_to_h0i2 + 17 r7a2_to_h0i2 - 75 h0i2_hdd = 0 - h0i3_mem_use: 2 r1a0_to_h0i3 + 2 r1a1_to_h0i3 + 2 r1a2_to_h0i3 + 3 r2a0_to_h0i3 + 3 r3a0_to_h0i3 + 2 r5a0_to_h0i3 + 3 r6a0_to_h0i3 + 3 r6a1_to_h0i3 + 3 r6a2_to_h0i3 + 3 r6a3_to_h0i3 + 3 r7a0_to_h0i3 + 3 r7a1_to_h0i3 + 3 r7a2_to_h0i3 - 8 h0i3_mem = 0 - h0i3_hdd_use: 4 r1a0_to_h0i3 + 4 r1a1_to_h0i3 + 4 r1a2_to_h0i3 + 5 r2a0_to_h0i3 + 17 r3a0_to_h0i3 + 4 r5a0_to_h0i3 + 5 r6a0_to_h0i3 + 5 r6a1_to_h0i3 + 5 r6a2_to_h0i3 + 5 r6a3_to_h0i3 + 17 r7a0_to_h0i3 + 17 r7a1_to_h0i3 + 17 r7a2_to_h0i3 - 75 h0i3_hdd = 0 - h0i4_mem_use: 2 r1a0_to_h0i4 + 2 r1a1_to_h0i4 + 2 r1a2_to_h0i4 + 3 r2a0_to_h0i4 + 3 r3a0_to_h0i4 + 2 r5a0_to_h0i4 + 3 r6a0_to_h0i4 + 3 r6a1_to_h0i4 + 3 r6a2_to_h0i4 + 3 r6a3_to_h0i4 + 3 r7a0_to_h0i4 + 3 r7a1_to_h0i4 + 3 r7a2_to_h0i4 - 8 h0i4_mem = 0 - h0i4_hdd_use: 4 r1a0_to_h0i4 + 4 r1a1_to_h0i4 + 4 r1a2_to_h0i4 + 5 r2a0_to_h0i4 + 17 r3a0_to_h0i4 + 4 r5a0_to_h0i4 + 5 r6a0_to_h0i4 + 5 r6a1_to_h0i4 + 5 r6a2_to_h0i4 + 5 r6a3_to_h0i4 + 17 r7a0_to_h0i4 + 17 r7a1_to_h0i4 + 17 r7a2_to_h0i4 - 75 h0i4_hdd = 0 - h0i5_mem_use: 2 r1a0_to_h0i5 + 2 r1a1_to_h0i5 + 2 r1a2_to_h0i5 + 3 r2a0_to_h0i5 + 3 r3a0_to_h0i5 + 2 r5a0_to_h0i5 + 3 r6a0_to_h0i5 + 3 r6a1_to_h0i5 + 3 r6a2_to_h0i5 + 3 r6a3_to_h0i5 + 3 r7a0_to_h0i5 + 3 r7a1_to_h0i5 + 3 r7a2_to_h0i5 - 8 h0i5_mem = 0 - h0i5_hdd_use: 4 r1a0_to_h0i5 + 4 r1a1_to_h0i5 + 4 r1a2_to_h0i5 + 5 r2a0_to_h0i5 + 17 r3a0_to_h0i5 + 4 r5a0_to_h0i5 + 5 r6a0_to_h0i5 + 5 r6a1_to_h0i5 + 5 r6a2_to_h0i5 + 5 r6a3_to_h0i5 + 17 r7a0_to_h0i5 + 17 r7a1_to_h0i5 + 17 r7a2_to_h0i5 - 75 h0i5_hdd = 0 - h0i6_mem_use: 2 r1a0_to_h0i6 + 2 r1a1_to_h0i6 + 2 r1a2_to_h0i6 + 3 r2a0_to_h0i6 + 3 r3a0_to_h0i6 + 2 r5a0_to_h0i6 + 3 r6a0_to_h0i6 + 3 r6a1_to_h0i6 + 3 r6a2_to_h0i6 + 3 r6a3_to_h0i6 + 3 r7a0_to_h0i6 + 3 r7a1_to_h0i6 + 3 r7a2_to_h0i6 - 8 h0i6_mem = 0 - h0i6_hdd_use: 4 r1a0_to_h0i6 + 4 r1a1_to_h0i6 + 4 r1a2_to_h0i6 + 5 r2a0_to_h0i6 + 17 r3a0_to_h0i6 + 4 r5a0_to_h0i6 + 5 r6a0_to_h0i6 + 5 r6a1_to_h0i6 + 5 r6a2_to_h0i6 + 5 r6a3_to_h0i6 + 17 r7a0_to_h0i6 + 17 r7a1_to_h0i6 + 17 r7a2_to_h0i6 - 75 h0i6_hdd = 0 - h0i7_mem_use: 2 r1a0_to_h0i7 + 2 r1a1_to_h0i7 + 2 r1a2_to_h0i7 + 3 r2a0_to_h0i7 + 3 r3a0_to_h0i7 + 2 r5a0_to_h0i7 + 3 r6a0_to_h0i7 + 3 r6a1_to_h0i7 + 3 r6a2_to_h0i7 + 3 r6a3_to_h0i7 + 3 r7a0_to_h0i7 + 3 r7a1_to_h0i7 + 3 r7a2_to_h0i7 - 8 h0i7_mem = 0 - h0i7_hdd_use: 4 r1a0_to_h0i7 + 4 r1a1_to_h0i7 + 4 r1a2_to_h0i7 + 5 r2a0_to_h0i7 + 17 r3a0_to_h0i7 + 4 r5a0_to_h0i7 + 5 r6a0_to_h0i7 + 5 r6a1_to_h0i7 + 5 r6a2_to_h0i7 + 5 r6a3_to_h0i7 + 17 r7a0_to_h0i7 + 17 r7a1_to_h0i7 + 17 r7a2_to_h0i7 - 75 h0i7_hdd = 0 - h0i8_mem_use: 2 r1a0_to_h0i8 + 2 r1a1_to_h0i8 + 2 r1a2_to_h0i8 + 3 r2a0_to_h0i8 + 3 r3a0_to_h0i8 + 2 r5a0_to_h0i8 + 3 r6a0_to_h0i8 + 3 r6a1_to_h0i8 + 3 r6a2_to_h0i8 + 3 r6a3_to_h0i8 + 3 r7a0_to_h0i8 + 3 r7a1_to_h0i8 + 3 r7a2_to_h0i8 - 8 h0i8_mem = 0 - h0i8_hdd_use: 4 r1a0_to_h0i8 + 4 r1a1_to_h0i8 + 4 r1a2_to_h0i8 + 5 r2a0_to_h0i8 + 17 r3a0_to_h0i8 + 4 r5a0_to_h0i8 + 5 r6a0_to_h0i8 + 5 r6a1_to_h0i8 + 5 r6a2_to_h0i8 + 5 r6a3_to_h0i8 + 17 r7a0_to_h0i8 + 17 r7a1_to_h0i8 + 17 r7a2_to_h0i8 - 75 h0i8_hdd = 0 - h0i9_mem_use: 2 r1a0_to_h0i9 + 2 r1a1_to_h0i9 + 2 r1a2_to_h0i9 + 3 r2a0_to_h0i9 + 3 r3a0_to_h0i9 + 2 r5a0_to_h0i9 + 3 r6a0_to_h0i9 + 3 r6a1_to_h0i9 + 3 r6a2_to_h0i9 + 3 r6a3_to_h0i9 + 3 r7a0_to_h0i9 + 3 r7a1_to_h0i9 + 3 r7a2_to_h0i9 - 8 h0i9_mem = 0 - h0i9_hdd_use: 4 r1a0_to_h0i9 + 4 r1a1_to_h0i9 + 4 r1a2_to_h0i9 + 5 r2a0_to_h0i9 + 17 r3a0_to_h0i9 + 4 r5a0_to_h0i9 + 5 r6a0_to_h0i9 + 5 r6a1_to_h0i9 + 5 r6a2_to_h0i9 + 5 r6a3_to_h0i9 + 17 r7a0_to_h0i9 + 17 r7a1_to_h0i9 + 17 r7a2_to_h0i9 - 75 h0i9_hdd = 0 - h1i0_mem_use: 2 r1a0_to_h1i0 + 2 r1a1_to_h1i0 + 2 r1a2_to_h1i0 + 3 r2a0_to_h1i0 + 3 r3a0_to_h1i0 + 2 r5a0_to_h1i0 + 3 r6a0_to_h1i0 + 3 r6a1_to_h1i0 + 3 r6a2_to_h1i0 + 3 r6a3_to_h1i0 + 3 r7a0_to_h1i0 + 3 r7a1_to_h1i0 + 3 r7a2_to_h1i0 - 16 h1i0_mem = 0 - h1i0_hdd_use: 4 r1a0_to_h1i0 + 4 r1a1_to_h1i0 + 4 r1a2_to_h1i0 + 5 r2a0_to_h1i0 + 17 r3a0_to_h1i0 + 4 r5a0_to_h1i0 + 5 r6a0_to_h1i0 + 5 r6a1_to_h1i0 + 5 r6a2_to_h1i0 + 5 r6a3_to_h1i0 + 17 r7a0_to_h1i0 + 17 r7a1_to_h1i0 + 17 r7a2_to_h1i0 - 150 h1i0_hdd = 0 - h1i1_mem_use: 2 r1a0_to_h1i1 + 2 r1a1_to_h1i1 + 2 r1a2_to_h1i1 + 3 r2a0_to_h1i1 + 3 r3a0_to_h1i1 + 2 r5a0_to_h1i1 + 3 r6a0_to_h1i1 + 3 r6a1_to_h1i1 + 3 r6a2_to_h1i1 + 3 r6a3_to_h1i1 + 3 r7a0_to_h1i1 + 3 r7a1_to_h1i1 + 3 r7a2_to_h1i1 - 16 h1i1_mem = 0 - h1i1_hdd_use: 4 r1a0_to_h1i1 + 4 r1a1_to_h1i1 + 4 r1a2_to_h1i1 + 5 r2a0_to_h1i1 + 17 r3a0_to_h1i1 + 4 r5a0_to_h1i1 + 5 r6a0_to_h1i1 + 5 r6a1_to_h1i1 + 5 r6a2_to_h1i1 + 5 r6a3_to_h1i1 + 17 r7a0_to_h1i1 + 17 r7a1_to_h1i1 + 17 r7a2_to_h1i1 - 150 h1i1_hdd = 0 - h1i2_mem_use: 2 r1a0_to_h1i2 + 2 r1a1_to_h1i2 + 2 r1a2_to_h1i2 + 3 r2a0_to_h1i2 + 3 r3a0_to_h1i2 + 2 r5a0_to_h1i2 + 3 r6a0_to_h1i2 + 3 r6a1_to_h1i2 + 3 r6a2_to_h1i2 + 3 r6a3_to_h1i2 + 3 r7a0_to_h1i2 + 3 r7a1_to_h1i2 + 3 r7a2_to_h1i2 - 16 h1i2_mem = 0 - h1i2_hdd_use: 4 r1a0_to_h1i2 + 4 r1a1_to_h1i2 + 4 r1a2_to_h1i2 + 5 r2a0_to_h1i2 + 17 r3a0_to_h1i2 + 4 r5a0_to_h1i2 + 5 r6a0_to_h1i2 + 5 r6a1_to_h1i2 + 5 r6a2_to_h1i2 + 5 r6a3_to_h1i2 + 17 r7a0_to_h1i2 + 17 r7a1_to_h1i2 + 17 r7a2_to_h1i2 - 150 h1i2_hdd = 0 - h1i3_mem_use: 2 r1a0_to_h1i3 + 2 r1a1_to_h1i3 + 2 r1a2_to_h1i3 + 3 r2a0_to_h1i3 + 3 r3a0_to_h1i3 + 2 r5a0_to_h1i3 + 3 r6a0_to_h1i3 + 3 r6a1_to_h1i3 + 3 r6a2_to_h1i3 + 3 r6a3_to_h1i3 + 3 r7a0_to_h1i3 + 3 r7a1_to_h1i3 + 3 r7a2_to_h1i3 - 16 h1i3_mem = 0 - h1i3_hdd_use: 4 r1a0_to_h1i3 + 4 r1a1_to_h1i3 + 4 r1a2_to_h1i3 + 5 r2a0_to_h1i3 + 17 r3a0_to_h1i3 + 4 r5a0_to_h1i3 + 5 r6a0_to_h1i3 + 5 r6a1_to_h1i3 + 5 r6a2_to_h1i3 + 5 r6a3_to_h1i3 + 17 r7a0_to_h1i3 + 17 r7a1_to_h1i3 + 17 r7a2_to_h1i3 - 150 h1i3_hdd = 0 - h1i4_mem_use: 2 r1a0_to_h1i4 + 2 r1a1_to_h1i4 + 2 r1a2_to_h1i4 + 3 r2a0_to_h1i4 + 3 r3a0_to_h1i4 + 2 r5a0_to_h1i4 + 3 r6a0_to_h1i4 + 3 r6a1_to_h1i4 + 3 r6a2_to_h1i4 + 3 r6a3_to_h1i4 + 3 r7a0_to_h1i4 + 3 r7a1_to_h1i4 + 3 r7a2_to_h1i4 - 16 h1i4_mem = 0 - h1i4_hdd_use: 4 r1a0_to_h1i4 + 4 r1a1_to_h1i4 + 4 r1a2_to_h1i4 + 5 r2a0_to_h1i4 + 17 r3a0_to_h1i4 + 4 r5a0_to_h1i4 + 5 r6a0_to_h1i4 + 5 r6a1_to_h1i4 + 5 r6a2_to_h1i4 + 5 r6a3_to_h1i4 + 17 r7a0_to_h1i4 + 17 r7a1_to_h1i4 + 17 r7a2_to_h1i4 - 150 h1i4_hdd = 0 - h1i5_mem_use: 2 r1a0_to_h1i5 + 2 r1a1_to_h1i5 + 2 r1a2_to_h1i5 + 3 r2a0_to_h1i5 + 3 r3a0_to_h1i5 + 2 r5a0_to_h1i5 + 3 r6a0_to_h1i5 + 3 r6a1_to_h1i5 + 3 r6a2_to_h1i5 + 3 r6a3_to_h1i5 + 3 r7a0_to_h1i5 + 3 r7a1_to_h1i5 + 3 r7a2_to_h1i5 - 16 h1i5_mem = 0 - h1i5_hdd_use: 4 r1a0_to_h1i5 + 4 r1a1_to_h1i5 + 4 r1a2_to_h1i5 + 5 r2a0_to_h1i5 + 17 r3a0_to_h1i5 + 4 r5a0_to_h1i5 + 5 r6a0_to_h1i5 + 5 r6a1_to_h1i5 + 5 r6a2_to_h1i5 + 5 r6a3_to_h1i5 + 17 r7a0_to_h1i5 + 17 r7a1_to_h1i5 + 17 r7a2_to_h1i5 - 150 h1i5_hdd = 0 - h1i6_mem_use: 2 r1a0_to_h1i6 + 2 r1a1_to_h1i6 + 2 r1a2_to_h1i6 + 3 r2a0_to_h1i6 + 3 r3a0_to_h1i6 + 2 r5a0_to_h1i6 + 3 r6a0_to_h1i6 + 3 r6a1_to_h1i6 + 3 r6a2_to_h1i6 + 3 r6a3_to_h1i6 + 3 r7a0_to_h1i6 + 3 r7a1_to_h1i6 + 3 r7a2_to_h1i6 - 16 h1i6_mem = 0 - h1i6_hdd_use: 4 r1a0_to_h1i6 + 4 r1a1_to_h1i6 + 4 r1a2_to_h1i6 + 5 r2a0_to_h1i6 + 17 r3a0_to_h1i6 + 4 r5a0_to_h1i6 + 5 r6a0_to_h1i6 + 5 r6a1_to_h1i6 + 5 r6a2_to_h1i6 + 5 r6a3_to_h1i6 + 17 r7a0_to_h1i6 + 17 r7a1_to_h1i6 + 17 r7a2_to_h1i6 - 150 h1i6_hdd = 0 - h1i7_mem_use: 2 r1a0_to_h1i7 + 2 r1a1_to_h1i7 + 2 r1a2_to_h1i7 + 3 r2a0_to_h1i7 + 3 r3a0_to_h1i7 + 2 r5a0_to_h1i7 + 3 r6a0_to_h1i7 + 3 r6a1_to_h1i7 + 3 r6a2_to_h1i7 + 3 r6a3_to_h1i7 + 3 r7a0_to_h1i7 + 3 r7a1_to_h1i7 + 3 r7a2_to_h1i7 - 16 h1i7_mem = 0 - h1i7_hdd_use: 4 r1a0_to_h1i7 + 4 r1a1_to_h1i7 + 4 r1a2_to_h1i7 + 5 r2a0_to_h1i7 + 17 r3a0_to_h1i7 + 4 r5a0_to_h1i7 + 5 r6a0_to_h1i7 + 5 r6a1_to_h1i7 + 5 r6a2_to_h1i7 + 5 r6a3_to_h1i7 + 17 r7a0_to_h1i7 + 17 r7a1_to_h1i7 + 17 r7a2_to_h1i7 - 150 h1i7_hdd = 0 - h1i8_mem_use: 2 r1a0_to_h1i8 + 2 r1a1_to_h1i8 + 2 r1a2_to_h1i8 + 3 r2a0_to_h1i8 + 3 r3a0_to_h1i8 + 2 r5a0_to_h1i8 + 3 r6a0_to_h1i8 + 3 r6a1_to_h1i8 + 3 r6a2_to_h1i8 + 3 r6a3_to_h1i8 + 3 r7a0_to_h1i8 + 3 r7a1_to_h1i8 + 3 r7a2_to_h1i8 - 16 h1i8_mem = 0 - h1i8_hdd_use: 4 r1a0_to_h1i8 + 4 r1a1_to_h1i8 + 4 r1a2_to_h1i8 + 5 r2a0_to_h1i8 + 17 r3a0_to_h1i8 + 4 r5a0_to_h1i8 + 5 r6a0_to_h1i8 + 5 r6a1_to_h1i8 + 5 r6a2_to_h1i8 + 5 r6a3_to_h1i8 + 17 r7a0_to_h1i8 + 17 r7a1_to_h1i8 + 17 r7a2_to_h1i8 - 150 h1i8_hdd = 0 - h1i9_mem_use: 2 r1a0_to_h1i9 + 2 r1a1_to_h1i9 + 2 r1a2_to_h1i9 + 3 r2a0_to_h1i9 + 3 r3a0_to_h1i9 + 2 r5a0_to_h1i9 + 3 r6a0_to_h1i9 + 3 r6a1_to_h1i9 + 3 r6a2_to_h1i9 + 3 r6a3_to_h1i9 + 3 r7a0_to_h1i9 + 3 r7a1_to_h1i9 + 3 r7a2_to_h1i9 - 16 h1i9_mem = 0 - h1i9_hdd_use: 4 r1a0_to_h1i9 + 4 r1a1_to_h1i9 + 4 r1a2_to_h1i9 + 5 r2a0_to_h1i9 + 17 r3a0_to_h1i9 + 4 r5a0_to_h1i9 + 5 r6a0_to_h1i9 + 5 r6a1_to_h1i9 + 5 r6a2_to_h1i9 + 5 r6a3_to_h1i9 + 17 r7a0_to_h1i9 + 17 r7a1_to_h1i9 + 17 r7a2_to_h1i9 - 150 h1i9_hdd = 0 - h2i0_mem_use: 2 r1a0_to_h2i0 + 2 r1a1_to_h2i0 + 2 r1a2_to_h2i0 + 3 r2a0_to_h2i0 + 3 r3a0_to_h2i0 + 2 r5a0_to_h2i0 + 3 r6a0_to_h2i0 + 3 r6a1_to_h2i0 + 3 r6a2_to_h2i0 + 3 r6a3_to_h2i0 + 3 r7a0_to_h2i0 + 3 r7a1_to_h2i0 + 3 r7a2_to_h2i0 - 16 h2i0_mem = 0 - h2i0_hdd_use: 4 r1a0_to_h2i0 + 4 r1a1_to_h2i0 + 4 r1a2_to_h2i0 + 5 r2a0_to_h2i0 + 17 r3a0_to_h2i0 + 4 r5a0_to_h2i0 + 5 r6a0_to_h2i0 + 5 r6a1_to_h2i0 + 5 r6a2_to_h2i0 + 5 r6a3_to_h2i0 + 17 r7a0_to_h2i0 + 17 r7a1_to_h2i0 + 17 r7a2_to_h2i0 - 75 h2i0_hdd = 0 - h2i1_mem_use: 2 r1a0_to_h2i1 + 2 r1a1_to_h2i1 + 2 r1a2_to_h2i1 + 3 r2a0_to_h2i1 + 3 r3a0_to_h2i1 + 2 r5a0_to_h2i1 + 3 r6a0_to_h2i1 + 3 r6a1_to_h2i1 + 3 r6a2_to_h2i1 + 3 r6a3_to_h2i1 + 3 r7a0_to_h2i1 + 3 r7a1_to_h2i1 + 3 r7a2_to_h2i1 - 16 h2i1_mem = 0 - h2i1_hdd_use: 4 r1a0_to_h2i1 + 4 r1a1_to_h2i1 + 4 r1a2_to_h2i1 + 5 r2a0_to_h2i1 + 17 r3a0_to_h2i1 + 4 r5a0_to_h2i1 + 5 r6a0_to_h2i1 + 5 r6a1_to_h2i1 + 5 r6a2_to_h2i1 + 5 r6a3_to_h2i1 + 17 r7a0_to_h2i1 + 17 r7a1_to_h2i1 + 17 r7a2_to_h2i1 - 75 h2i1_hdd = 0 - h2i2_mem_use: 2 r1a0_to_h2i2 + 2 r1a1_to_h2i2 + 2 r1a2_to_h2i2 + 3 r2a0_to_h2i2 + 3 r3a0_to_h2i2 + 2 r5a0_to_h2i2 + 3 r6a0_to_h2i2 + 3 r6a1_to_h2i2 + 3 r6a2_to_h2i2 + 3 r6a3_to_h2i2 + 3 r7a0_to_h2i2 + 3 r7a1_to_h2i2 + 3 r7a2_to_h2i2 - 16 h2i2_mem = 0 - h2i2_hdd_use: 4 r1a0_to_h2i2 + 4 r1a1_to_h2i2 + 4 r1a2_to_h2i2 + 5 r2a0_to_h2i2 + 17 r3a0_to_h2i2 + 4 r5a0_to_h2i2 + 5 r6a0_to_h2i2 + 5 r6a1_to_h2i2 + 5 r6a2_to_h2i2 + 5 r6a3_to_h2i2 + 17 r7a0_to_h2i2 + 17 r7a1_to_h2i2 + 17 r7a2_to_h2i2 - 75 h2i2_hdd = 0 - h2i3_mem_use: 2 r1a0_to_h2i3 + 2 r1a1_to_h2i3 + 2 r1a2_to_h2i3 + 3 r2a0_to_h2i3 + 3 r3a0_to_h2i3 + 2 r5a0_to_h2i3 + 3 r6a0_to_h2i3 + 3 r6a1_to_h2i3 + 3 r6a2_to_h2i3 + 3 r6a3_to_h2i3 + 3 r7a0_to_h2i3 + 3 r7a1_to_h2i3 + 3 r7a2_to_h2i3 - 16 h2i3_mem = 0 - h2i3_hdd_use: 4 r1a0_to_h2i3 + 4 r1a1_to_h2i3 + 4 r1a2_to_h2i3 + 5 r2a0_to_h2i3 + 17 r3a0_to_h2i3 + 4 r5a0_to_h2i3 + 5 r6a0_to_h2i3 + 5 r6a1_to_h2i3 + 5 r6a2_to_h2i3 + 5 r6a3_to_h2i3 + 17 r7a0_to_h2i3 + 17 r7a1_to_h2i3 + 17 r7a2_to_h2i3 - 75 h2i3_hdd = 0 - h2i4_mem_use: 2 r1a0_to_h2i4 + 2 r1a1_to_h2i4 + 2 r1a2_to_h2i4 + 3 r2a0_to_h2i4 + 3 r3a0_to_h2i4 + 2 r5a0_to_h2i4 + 3 r6a0_to_h2i4 + 3 r6a1_to_h2i4 + 3 r6a2_to_h2i4 + 3 r6a3_to_h2i4 + 3 r7a0_to_h2i4 + 3 r7a1_to_h2i4 + 3 r7a2_to_h2i4 - 16 h2i4_mem = 0 - h2i4_hdd_use: 4 r1a0_to_h2i4 + 4 r1a1_to_h2i4 + 4 r1a2_to_h2i4 + 5 r2a0_to_h2i4 + 17 r3a0_to_h2i4 + 4 r5a0_to_h2i4 + 5 r6a0_to_h2i4 + 5 r6a1_to_h2i4 + 5 r6a2_to_h2i4 + 5 r6a3_to_h2i4 + 17 r7a0_to_h2i4 + 17 r7a1_to_h2i4 + 17 r7a2_to_h2i4 - 75 h2i4_hdd = 0 - h2i5_mem_use: 2 r1a0_to_h2i5 + 2 r1a1_to_h2i5 + 2 r1a2_to_h2i5 + 3 r2a0_to_h2i5 + 3 r3a0_to_h2i5 + 2 r5a0_to_h2i5 + 3 r6a0_to_h2i5 + 3 r6a1_to_h2i5 + 3 r6a2_to_h2i5 + 3 r6a3_to_h2i5 + 3 r7a0_to_h2i5 + 3 r7a1_to_h2i5 + 3 r7a2_to_h2i5 - 16 h2i5_mem = 0 - h2i5_hdd_use: 4 r1a0_to_h2i5 + 4 r1a1_to_h2i5 + 4 r1a2_to_h2i5 + 5 r2a0_to_h2i5 + 17 r3a0_to_h2i5 + 4 r5a0_to_h2i5 + 5 r6a0_to_h2i5 + 5 r6a1_to_h2i5 + 5 r6a2_to_h2i5 + 5 r6a3_to_h2i5 + 17 r7a0_to_h2i5 + 17 r7a1_to_h2i5 + 17 r7a2_to_h2i5 - 75 h2i5_hdd = 0 - h2i6_mem_use: 2 r1a0_to_h2i6 + 2 r1a1_to_h2i6 + 2 r1a2_to_h2i6 + 3 r2a0_to_h2i6 + 3 r3a0_to_h2i6 + 2 r5a0_to_h2i6 + 3 r6a0_to_h2i6 + 3 r6a1_to_h2i6 + 3 r6a2_to_h2i6 + 3 r6a3_to_h2i6 + 3 r7a0_to_h2i6 + 3 r7a1_to_h2i6 + 3 r7a2_to_h2i6 - 16 h2i6_mem = 0 - h2i6_hdd_use: 4 r1a0_to_h2i6 + 4 r1a1_to_h2i6 + 4 r1a2_to_h2i6 + 5 r2a0_to_h2i6 + 17 r3a0_to_h2i6 + 4 r5a0_to_h2i6 + 5 r6a0_to_h2i6 + 5 r6a1_to_h2i6 + 5 r6a2_to_h2i6 + 5 r6a3_to_h2i6 + 17 r7a0_to_h2i6 + 17 r7a1_to_h2i6 + 17 r7a2_to_h2i6 - 75 h2i6_hdd = 0 - h2i7_mem_use: 2 r1a0_to_h2i7 + 2 r1a1_to_h2i7 + 2 r1a2_to_h2i7 + 3 r2a0_to_h2i7 + 3 r3a0_to_h2i7 + 2 r5a0_to_h2i7 + 3 r6a0_to_h2i7 + 3 r6a1_to_h2i7 + 3 r6a2_to_h2i7 + 3 r6a3_to_h2i7 + 3 r7a0_to_h2i7 + 3 r7a1_to_h2i7 + 3 r7a2_to_h2i7 - 16 h2i7_mem = 0 - h2i7_hdd_use: 4 r1a0_to_h2i7 + 4 r1a1_to_h2i7 + 4 r1a2_to_h2i7 + 5 r2a0_to_h2i7 + 17 r3a0_to_h2i7 + 4 r5a0_to_h2i7 + 5 r6a0_to_h2i7 + 5 r6a1_to_h2i7 + 5 r6a2_to_h2i7 + 5 r6a3_to_h2i7 + 17 r7a0_to_h2i7 + 17 r7a1_to_h2i7 + 17 r7a2_to_h2i7 - 75 h2i7_hdd = 0 - h2i8_mem_use: 2 r1a0_to_h2i8 + 2 r1a1_to_h2i8 + 2 r1a2_to_h2i8 + 3 r2a0_to_h2i8 + 3 r3a0_to_h2i8 + 2 r5a0_to_h2i8 + 3 r6a0_to_h2i8 + 3 r6a1_to_h2i8 + 3 r6a2_to_h2i8 + 3 r6a3_to_h2i8 + 3 r7a0_to_h2i8 + 3 r7a1_to_h2i8 + 3 r7a2_to_h2i8 - 16 h2i8_mem = 0 - h2i8_hdd_use: 4 r1a0_to_h2i8 + 4 r1a1_to_h2i8 + 4 r1a2_to_h2i8 + 5 r2a0_to_h2i8 + 17 r3a0_to_h2i8 + 4 r5a0_to_h2i8 + 5 r6a0_to_h2i8 + 5 r6a1_to_h2i8 + 5 r6a2_to_h2i8 + 5 r6a3_to_h2i8 + 17 r7a0_to_h2i8 + 17 r7a1_to_h2i8 + 17 r7a2_to_h2i8 - 75 h2i8_hdd = 0 - h2i9_mem_use: 2 r1a0_to_h2i9 + 2 r1a1_to_h2i9 + 2 r1a2_to_h2i9 + 3 r2a0_to_h2i9 + 3 r3a0_to_h2i9 + 2 r5a0_to_h2i9 + 3 r6a0_to_h2i9 + 3 r6a1_to_h2i9 + 3 r6a2_to_h2i9 + 3 r6a3_to_h2i9 + 3 r7a0_to_h2i9 + 3 r7a1_to_h2i9 + 3 r7a2_to_h2i9 - 16 h2i9_mem = 0 - h2i9_hdd_use: 4 r1a0_to_h2i9 + 4 r1a1_to_h2i9 + 4 r1a2_to_h2i9 + 5 r2a0_to_h2i9 + 17 r3a0_to_h2i9 + 4 r5a0_to_h2i9 + 5 r6a0_to_h2i9 + 5 r6a1_to_h2i9 + 5 r6a2_to_h2i9 + 5 r6a3_to_h2i9 + 17 r7a0_to_h2i9 + 17 r7a1_to_h2i9 + 17 r7a2_to_h2i9 - 75 h2i9_hdd = 0 - h3i0_mem_use: 2 r1a0_to_h3i0 + 2 r1a1_to_h3i0 + 2 r1a2_to_h3i0 + 3 r2a0_to_h3i0 + 3 r3a0_to_h3i0 + 2 r5a0_to_h3i0 + 3 r6a0_to_h3i0 + 3 r6a1_to_h3i0 + 3 r6a2_to_h3i0 + 3 r6a3_to_h3i0 + 3 r7a0_to_h3i0 + 3 r7a1_to_h3i0 + 3 r7a2_to_h3i0 - 32 h3i0_mem = 0 - h3i0_hdd_use: 4 r1a0_to_h3i0 + 4 r1a1_to_h3i0 + 4 r1a2_to_h3i0 + 5 r2a0_to_h3i0 + 17 r3a0_to_h3i0 + 4 r5a0_to_h3i0 + 5 r6a0_to_h3i0 + 5 r6a1_to_h3i0 + 5 r6a2_to_h3i0 + 5 r6a3_to_h3i0 + 17 r7a0_to_h3i0 + 17 r7a1_to_h3i0 + 17 r7a2_to_h3i0 - 150 h3i0_hdd = 0 - h3i1_mem_use: 2 r1a0_to_h3i1 + 2 r1a1_to_h3i1 + 2 r1a2_to_h3i1 + 3 r2a0_to_h3i1 + 3 r3a0_to_h3i1 + 2 r5a0_to_h3i1 + 3 r6a0_to_h3i1 + 3 r6a1_to_h3i1 + 3 r6a2_to_h3i1 + 3 r6a3_to_h3i1 + 3 r7a0_to_h3i1 + 3 r7a1_to_h3i1 + 3 r7a2_to_h3i1 - 32 h3i1_mem = 0 - h3i1_hdd_use: 4 r1a0_to_h3i1 + 4 r1a1_to_h3i1 + 4 r1a2_to_h3i1 + 5 r2a0_to_h3i1 + 17 r3a0_to_h3i1 + 4 r5a0_to_h3i1 + 5 r6a0_to_h3i1 + 5 r6a1_to_h3i1 + 5 r6a2_to_h3i1 + 5 r6a3_to_h3i1 + 17 r7a0_to_h3i1 + 17 r7a1_to_h3i1 + 17 r7a2_to_h3i1 - 150 h3i1_hdd = 0 - h3i2_mem_use: 2 r1a0_to_h3i2 + 2 r1a1_to_h3i2 + 2 r1a2_to_h3i2 + 3 r2a0_to_h3i2 + 3 r3a0_to_h3i2 + 2 r5a0_to_h3i2 + 3 r6a0_to_h3i2 + 3 r6a1_to_h3i2 + 3 r6a2_to_h3i2 + 3 r6a3_to_h3i2 + 3 r7a0_to_h3i2 + 3 r7a1_to_h3i2 + 3 r7a2_to_h3i2 - 32 h3i2_mem = 0 - h3i2_hdd_use: 4 r1a0_to_h3i2 + 4 r1a1_to_h3i2 + 4 r1a2_to_h3i2 + 5 r2a0_to_h3i2 + 17 r3a0_to_h3i2 + 4 r5a0_to_h3i2 + 5 r6a0_to_h3i2 + 5 r6a1_to_h3i2 + 5 r6a2_to_h3i2 + 5 r6a3_to_h3i2 + 17 r7a0_to_h3i2 + 17 r7a1_to_h3i2 + 17 r7a2_to_h3i2 - 150 h3i2_hdd = 0 - h3i3_mem_use: 2 r1a0_to_h3i3 + 2 r1a1_to_h3i3 + 2 r1a2_to_h3i3 + 3 r2a0_to_h3i3 + 3 r3a0_to_h3i3 + 2 r5a0_to_h3i3 + 3 r6a0_to_h3i3 + 3 r6a1_to_h3i3 + 3 r6a2_to_h3i3 + 3 r6a3_to_h3i3 + 3 r7a0_to_h3i3 + 3 r7a1_to_h3i3 + 3 r7a2_to_h3i3 - 32 h3i3_mem = 0 - h3i3_hdd_use: 4 r1a0_to_h3i3 + 4 r1a1_to_h3i3 + 4 r1a2_to_h3i3 + 5 r2a0_to_h3i3 + 17 r3a0_to_h3i3 + 4 r5a0_to_h3i3 + 5 r6a0_to_h3i3 + 5 r6a1_to_h3i3 + 5 r6a2_to_h3i3 + 5 r6a3_to_h3i3 + 17 r7a0_to_h3i3 + 17 r7a1_to_h3i3 + 17 r7a2_to_h3i3 - 150 h3i3_hdd = 0 - h3i4_mem_use: 2 r1a0_to_h3i4 + 2 r1a1_to_h3i4 + 2 r1a2_to_h3i4 + 3 r2a0_to_h3i4 + 3 r3a0_to_h3i4 + 2 r5a0_to_h3i4 + 3 r6a0_to_h3i4 + 3 r6a1_to_h3i4 + 3 r6a2_to_h3i4 + 3 r6a3_to_h3i4 + 3 r7a0_to_h3i4 + 3 r7a1_to_h3i4 + 3 r7a2_to_h3i4 - 32 h3i4_mem = 0 - h3i4_hdd_use: 4 r1a0_to_h3i4 + 4 r1a1_to_h3i4 + 4 r1a2_to_h3i4 + 5 r2a0_to_h3i4 + 17 r3a0_to_h3i4 + 4 r5a0_to_h3i4 + 5 r6a0_to_h3i4 + 5 r6a1_to_h3i4 + 5 r6a2_to_h3i4 + 5 r6a3_to_h3i4 + 17 r7a0_to_h3i4 + 17 r7a1_to_h3i4 + 17 r7a2_to_h3i4 - 150 h3i4_hdd = 0 - h3i5_mem_use: 2 r1a0_to_h3i5 + 2 r1a1_to_h3i5 + 2 r1a2_to_h3i5 + 3 r2a0_to_h3i5 + 3 r3a0_to_h3i5 + 2 r5a0_to_h3i5 + 3 r6a0_to_h3i5 + 3 r6a1_to_h3i5 + 3 r6a2_to_h3i5 + 3 r6a3_to_h3i5 + 3 r7a0_to_h3i5 + 3 r7a1_to_h3i5 + 3 r7a2_to_h3i5 - 32 h3i5_mem = 0 - h3i5_hdd_use: 4 r1a0_to_h3i5 + 4 r1a1_to_h3i5 + 4 r1a2_to_h3i5 + 5 r2a0_to_h3i5 + 17 r3a0_to_h3i5 + 4 r5a0_to_h3i5 + 5 r6a0_to_h3i5 + 5 r6a1_to_h3i5 + 5 r6a2_to_h3i5 + 5 r6a3_to_h3i5 + 17 r7a0_to_h3i5 + 17 r7a1_to_h3i5 + 17 r7a2_to_h3i5 - 150 h3i5_hdd = 0 - h3i6_mem_use: 2 r1a0_to_h3i6 + 2 r1a1_to_h3i6 + 2 r1a2_to_h3i6 + 3 r2a0_to_h3i6 + 3 r3a0_to_h3i6 + 2 r5a0_to_h3i6 + 3 r6a0_to_h3i6 + 3 r6a1_to_h3i6 + 3 r6a2_to_h3i6 + 3 r6a3_to_h3i6 + 3 r7a0_to_h3i6 + 3 r7a1_to_h3i6 + 3 r7a2_to_h3i6 - 32 h3i6_mem = 0 - h3i6_hdd_use: 4 r1a0_to_h3i6 + 4 r1a1_to_h3i6 + 4 r1a2_to_h3i6 + 5 r2a0_to_h3i6 + 17 r3a0_to_h3i6 + 4 r5a0_to_h3i6 + 5 r6a0_to_h3i6 + 5 r6a1_to_h3i6 + 5 r6a2_to_h3i6 + 5 r6a3_to_h3i6 + 17 r7a0_to_h3i6 + 17 r7a1_to_h3i6 + 17 r7a2_to_h3i6 - 150 h3i6_hdd = 0 - h3i7_mem_use: 2 r1a0_to_h3i7 + 2 r1a1_to_h3i7 + 2 r1a2_to_h3i7 + 3 r2a0_to_h3i7 + 3 r3a0_to_h3i7 + 2 r5a0_to_h3i7 + 3 r6a0_to_h3i7 + 3 r6a1_to_h3i7 + 3 r6a2_to_h3i7 + 3 r6a3_to_h3i7 + 3 r7a0_to_h3i7 + 3 r7a1_to_h3i7 + 3 r7a2_to_h3i7 - 32 h3i7_mem = 0 - h3i7_hdd_use: 4 r1a0_to_h3i7 + 4 r1a1_to_h3i7 + 4 r1a2_to_h3i7 + 5 r2a0_to_h3i7 + 17 r3a0_to_h3i7 + 4 r5a0_to_h3i7 + 5 r6a0_to_h3i7 + 5 r6a1_to_h3i7 + 5 r6a2_to_h3i7 + 5 r6a3_to_h3i7 + 17 r7a0_to_h3i7 + 17 r7a1_to_h3i7 + 17 r7a2_to_h3i7 - 150 h3i7_hdd = 0 - h3i8_mem_use: 2 r1a0_to_h3i8 + 2 r1a1_to_h3i8 + 2 r1a2_to_h3i8 + 3 r2a0_to_h3i8 + 3 r3a0_to_h3i8 + 2 r5a0_to_h3i8 + 3 r6a0_to_h3i8 + 3 r6a1_to_h3i8 + 3 r6a2_to_h3i8 + 3 r6a3_to_h3i8 + 3 r7a0_to_h3i8 + 3 r7a1_to_h3i8 + 3 r7a2_to_h3i8 - 32 h3i8_mem = 0 - h3i8_hdd_use: 4 r1a0_to_h3i8 + 4 r1a1_to_h3i8 + 4 r1a2_to_h3i8 + 5 r2a0_to_h3i8 + 17 r3a0_to_h3i8 + 4 r5a0_to_h3i8 + 5 r6a0_to_h3i8 + 5 r6a1_to_h3i8 + 5 r6a2_to_h3i8 + 5 r6a3_to_h3i8 + 17 r7a0_to_h3i8 + 17 r7a1_to_h3i8 + 17 r7a2_to_h3i8 - 150 h3i8_hdd = 0 - h3i9_mem_use: 2 r1a0_to_h3i9 + 2 r1a1_to_h3i9 + 2 r1a2_to_h3i9 + 3 r2a0_to_h3i9 + 3 r3a0_to_h3i9 + 2 r5a0_to_h3i9 + 3 r6a0_to_h3i9 + 3 r6a1_to_h3i9 + 3 r6a2_to_h3i9 + 3 r6a3_to_h3i9 + 3 r7a0_to_h3i9 + 3 r7a1_to_h3i9 + 3 r7a2_to_h3i9 - 32 h3i9_mem = 0 - h3i9_hdd_use: 4 r1a0_to_h3i9 + 4 r1a1_to_h3i9 + 4 r1a2_to_h3i9 + 5 r2a0_to_h3i9 + 17 r3a0_to_h3i9 + 4 r5a0_to_h3i9 + 5 r6a0_to_h3i9 + 5 r6a1_to_h3i9 + 5 r6a2_to_h3i9 + 5 r6a3_to_h3i9 + 17 r7a0_to_h3i9 + 17 r7a1_to_h3i9 + 17 r7a2_to_h3i9 - 150 h3i9_hdd = 0 - h4i0_mem_use: 4 r0a0_to_h4i0 + 4 r0a1_to_h4i0 + 4 r0a2_to_h4i0 + 4 r0a3_to_h4i0 + 2 r1a0_to_h4i0 + 2 r1a1_to_h4i0 + 2 r1a2_to_h4i0 + 3 r2a0_to_h4i0 + 3 r3a0_to_h4i0 + 4 r4a0_to_h4i0 + 4 r4a1_to_h4i0 + 4 r4a2_to_h4i0 + 4 r4a3_to_h4i0 + 2 r5a0_to_h4i0 + 3 r6a0_to_h4i0 + 3 r6a1_to_h4i0 + 3 r6a2_to_h4i0 + 3 r6a3_to_h4i0 + 3 r7a0_to_h4i0 + 3 r7a1_to_h4i0 + 3 r7a2_to_h4i0 - 4 h4i0_mem = 0 - h4i0_hdd_use: 29 r0a0_to_h4i0 + 29 r0a1_to_h4i0 + 29 r0a2_to_h4i0 + 29 r0a3_to_h4i0 + 4 r1a0_to_h4i0 + 4 r1a1_to_h4i0 + 4 r1a2_to_h4i0 + 5 r2a0_to_h4i0 + 17 r3a0_to_h4i0 + 29 r4a0_to_h4i0 + 29 r4a1_to_h4i0 + 29 r4a2_to_h4i0 + 29 r4a3_to_h4i0 + 4 r5a0_to_h4i0 + 5 r6a0_to_h4i0 + 5 r6a1_to_h4i0 + 5 r6a2_to_h4i0 + 5 r6a3_to_h4i0 + 17 r7a0_to_h4i0 + 17 r7a1_to_h4i0 + 17 r7a2_to_h4i0 - 50 h4i0_hdd = 0 - h4i1_mem_use: 4 r0a0_to_h4i1 + 4 r0a1_to_h4i1 + 4 r0a2_to_h4i1 + 4 r0a3_to_h4i1 + 2 r1a0_to_h4i1 + 2 r1a1_to_h4i1 + 2 r1a2_to_h4i1 + 3 r2a0_to_h4i1 + 3 r3a0_to_h4i1 + 4 r4a0_to_h4i1 + 4 r4a1_to_h4i1 + 4 r4a2_to_h4i1 + 4 r4a3_to_h4i1 + 2 r5a0_to_h4i1 + 3 r6a0_to_h4i1 + 3 r6a1_to_h4i1 + 3 r6a2_to_h4i1 + 3 r6a3_to_h4i1 + 3 r7a0_to_h4i1 + 3 r7a1_to_h4i1 + 3 r7a2_to_h4i1 - 4 h4i1_mem = 0 - h4i1_hdd_use: 29 r0a0_to_h4i1 + 29 r0a1_to_h4i1 + 29 r0a2_to_h4i1 + 29 r0a3_to_h4i1 + 4 r1a0_to_h4i1 + 4 r1a1_to_h4i1 + 4 r1a2_to_h4i1 + 5 r2a0_to_h4i1 + 17 r3a0_to_h4i1 + 29 r4a0_to_h4i1 + 29 r4a1_to_h4i1 + 29 r4a2_to_h4i1 + 29 r4a3_to_h4i1 + 4 r5a0_to_h4i1 + 5 r6a0_to_h4i1 + 5 r6a1_to_h4i1 + 5 r6a2_to_h4i1 + 5 r6a3_to_h4i1 + 17 r7a0_to_h4i1 + 17 r7a1_to_h4i1 + 17 r7a2_to_h4i1 - 50 h4i1_hdd = 0 - h4i2_mem_use: 4 r0a0_to_h4i2 + 4 r0a1_to_h4i2 + 4 r0a2_to_h4i2 + 4 r0a3_to_h4i2 + 2 r1a0_to_h4i2 + 2 r1a1_to_h4i2 + 2 r1a2_to_h4i2 + 3 r2a0_to_h4i2 + 3 r3a0_to_h4i2 + 4 r4a0_to_h4i2 + 4 r4a1_to_h4i2 + 4 r4a2_to_h4i2 + 4 r4a3_to_h4i2 + 2 r5a0_to_h4i2 + 3 r6a0_to_h4i2 + 3 r6a1_to_h4i2 + 3 r6a2_to_h4i2 + 3 r6a3_to_h4i2 + 3 r7a0_to_h4i2 + 3 r7a1_to_h4i2 + 3 r7a2_to_h4i2 - 4 h4i2_mem = 0 - h4i2_hdd_use: 29 r0a0_to_h4i2 + 29 r0a1_to_h4i2 + 29 r0a2_to_h4i2 + 29 r0a3_to_h4i2 + 4 r1a0_to_h4i2 + 4 r1a1_to_h4i2 + 4 r1a2_to_h4i2 + 5 r2a0_to_h4i2 + 17 r3a0_to_h4i2 + 29 r4a0_to_h4i2 + 29 r4a1_to_h4i2 + 29 r4a2_to_h4i2 + 29 r4a3_to_h4i2 + 4 r5a0_to_h4i2 + 5 r6a0_to_h4i2 + 5 r6a1_to_h4i2 + 5 r6a2_to_h4i2 + 5 r6a3_to_h4i2 + 17 r7a0_to_h4i2 + 17 r7a1_to_h4i2 + 17 r7a2_to_h4i2 - 50 h4i2_hdd = 0 - h4i3_mem_use: 4 r0a0_to_h4i3 + 4 r0a1_to_h4i3 + 4 r0a2_to_h4i3 + 4 r0a3_to_h4i3 + 2 r1a0_to_h4i3 + 2 r1a1_to_h4i3 + 2 r1a2_to_h4i3 + 3 r2a0_to_h4i3 + 3 r3a0_to_h4i3 + 4 r4a0_to_h4i3 + 4 r4a1_to_h4i3 + 4 r4a2_to_h4i3 + 4 r4a3_to_h4i3 + 2 r5a0_to_h4i3 + 3 r6a0_to_h4i3 + 3 r6a1_to_h4i3 + 3 r6a2_to_h4i3 + 3 r6a3_to_h4i3 + 3 r7a0_to_h4i3 + 3 r7a1_to_h4i3 + 3 r7a2_to_h4i3 - 4 h4i3_mem = 0 - h4i3_hdd_use: 29 r0a0_to_h4i3 + 29 r0a1_to_h4i3 + 29 r0a2_to_h4i3 + 29 r0a3_to_h4i3 + 4 r1a0_to_h4i3 + 4 r1a1_to_h4i3 + 4 r1a2_to_h4i3 + 5 r2a0_to_h4i3 + 17 r3a0_to_h4i3 + 29 r4a0_to_h4i3 + 29 r4a1_to_h4i3 + 29 r4a2_to_h4i3 + 29 r4a3_to_h4i3 + 4 r5a0_to_h4i3 + 5 r6a0_to_h4i3 + 5 r6a1_to_h4i3 + 5 r6a2_to_h4i3 + 5 r6a3_to_h4i3 + 17 r7a0_to_h4i3 + 17 r7a1_to_h4i3 + 17 r7a2_to_h4i3 - 50 h4i3_hdd = 0 - h4i4_mem_use: 4 r0a0_to_h4i4 + 4 r0a1_to_h4i4 + 4 r0a2_to_h4i4 + 4 r0a3_to_h4i4 + 2 r1a0_to_h4i4 + 2 r1a1_to_h4i4 + 2 r1a2_to_h4i4 + 3 r2a0_to_h4i4 + 3 r3a0_to_h4i4 + 4 r4a0_to_h4i4 + 4 r4a1_to_h4i4 + 4 r4a2_to_h4i4 + 4 r4a3_to_h4i4 + 2 r5a0_to_h4i4 + 3 r6a0_to_h4i4 + 3 r6a1_to_h4i4 + 3 r6a2_to_h4i4 + 3 r6a3_to_h4i4 + 3 r7a0_to_h4i4 + 3 r7a1_to_h4i4 + 3 r7a2_to_h4i4 - 4 h4i4_mem = 0 - h4i4_hdd_use: 29 r0a0_to_h4i4 + 29 r0a1_to_h4i4 + 29 r0a2_to_h4i4 + 29 r0a3_to_h4i4 + 4 r1a0_to_h4i4 + 4 r1a1_to_h4i4 + 4 r1a2_to_h4i4 + 5 r2a0_to_h4i4 + 17 r3a0_to_h4i4 + 29 r4a0_to_h4i4 + 29 r4a1_to_h4i4 + 29 r4a2_to_h4i4 + 29 r4a3_to_h4i4 + 4 r5a0_to_h4i4 + 5 r6a0_to_h4i4 + 5 r6a1_to_h4i4 + 5 r6a2_to_h4i4 + 5 r6a3_to_h4i4 + 17 r7a0_to_h4i4 + 17 r7a1_to_h4i4 + 17 r7a2_to_h4i4 - 50 h4i4_hdd = 0 - h4i5_mem_use: 4 r0a0_to_h4i5 + 4 r0a1_to_h4i5 + 4 r0a2_to_h4i5 + 4 r0a3_to_h4i5 + 2 r1a0_to_h4i5 + 2 r1a1_to_h4i5 + 2 r1a2_to_h4i5 + 3 r2a0_to_h4i5 + 3 r3a0_to_h4i5 + 4 r4a0_to_h4i5 + 4 r4a1_to_h4i5 + 4 r4a2_to_h4i5 + 4 r4a3_to_h4i5 + 2 r5a0_to_h4i5 + 3 r6a0_to_h4i5 + 3 r6a1_to_h4i5 + 3 r6a2_to_h4i5 + 3 r6a3_to_h4i5 + 3 r7a0_to_h4i5 + 3 r7a1_to_h4i5 + 3 r7a2_to_h4i5 - 4 h4i5_mem = 0 - h4i5_hdd_use: 29 r0a0_to_h4i5 + 29 r0a1_to_h4i5 + 29 r0a2_to_h4i5 + 29 r0a3_to_h4i5 + 4 r1a0_to_h4i5 + 4 r1a1_to_h4i5 + 4 r1a2_to_h4i5 + 5 r2a0_to_h4i5 + 17 r3a0_to_h4i5 + 29 r4a0_to_h4i5 + 29 r4a1_to_h4i5 + 29 r4a2_to_h4i5 + 29 r4a3_to_h4i5 + 4 r5a0_to_h4i5 + 5 r6a0_to_h4i5 + 5 r6a1_to_h4i5 + 5 r6a2_to_h4i5 + 5 r6a3_to_h4i5 + 17 r7a0_to_h4i5 + 17 r7a1_to_h4i5 + 17 r7a2_to_h4i5 - 50 h4i5_hdd = 0 - h4i6_mem_use: 4 r0a0_to_h4i6 + 4 r0a1_to_h4i6 + 4 r0a2_to_h4i6 + 4 r0a3_to_h4i6 + 2 r1a0_to_h4i6 + 2 r1a1_to_h4i6 + 2 r1a2_to_h4i6 + 3 r2a0_to_h4i6 + 3 r3a0_to_h4i6 + 4 r4a0_to_h4i6 + 4 r4a1_to_h4i6 + 4 r4a2_to_h4i6 + 4 r4a3_to_h4i6 + 2 r5a0_to_h4i6 + 3 r6a0_to_h4i6 + 3 r6a1_to_h4i6 + 3 r6a2_to_h4i6 + 3 r6a3_to_h4i6 + 3 r7a0_to_h4i6 + 3 r7a1_to_h4i6 + 3 r7a2_to_h4i6 - 4 h4i6_mem = 0 - h4i6_hdd_use: 29 r0a0_to_h4i6 + 29 r0a1_to_h4i6 + 29 r0a2_to_h4i6 + 29 r0a3_to_h4i6 + 4 r1a0_to_h4i6 + 4 r1a1_to_h4i6 + 4 r1a2_to_h4i6 + 5 r2a0_to_h4i6 + 17 r3a0_to_h4i6 + 29 r4a0_to_h4i6 + 29 r4a1_to_h4i6 + 29 r4a2_to_h4i6 + 29 r4a3_to_h4i6 + 4 r5a0_to_h4i6 + 5 r6a0_to_h4i6 + 5 r6a1_to_h4i6 + 5 r6a2_to_h4i6 + 5 r6a3_to_h4i6 + 17 r7a0_to_h4i6 + 17 r7a1_to_h4i6 + 17 r7a2_to_h4i6 - 50 h4i6_hdd = 0 - h4i7_mem_use: 4 r0a0_to_h4i7 + 4 r0a1_to_h4i7 + 4 r0a2_to_h4i7 + 4 r0a3_to_h4i7 + 2 r1a0_to_h4i7 + 2 r1a1_to_h4i7 + 2 r1a2_to_h4i7 + 3 r2a0_to_h4i7 + 3 r3a0_to_h4i7 + 4 r4a0_to_h4i7 + 4 r4a1_to_h4i7 + 4 r4a2_to_h4i7 + 4 r4a3_to_h4i7 + 2 r5a0_to_h4i7 + 3 r6a0_to_h4i7 + 3 r6a1_to_h4i7 + 3 r6a2_to_h4i7 + 3 r6a3_to_h4i7 + 3 r7a0_to_h4i7 + 3 r7a1_to_h4i7 + 3 r7a2_to_h4i7 - 4 h4i7_mem = 0 - h4i7_hdd_use: 29 r0a0_to_h4i7 + 29 r0a1_to_h4i7 + 29 r0a2_to_h4i7 + 29 r0a3_to_h4i7 + 4 r1a0_to_h4i7 + 4 r1a1_to_h4i7 + 4 r1a2_to_h4i7 + 5 r2a0_to_h4i7 + 17 r3a0_to_h4i7 + 29 r4a0_to_h4i7 + 29 r4a1_to_h4i7 + 29 r4a2_to_h4i7 + 29 r4a3_to_h4i7 + 4 r5a0_to_h4i7 + 5 r6a0_to_h4i7 + 5 r6a1_to_h4i7 + 5 r6a2_to_h4i7 + 5 r6a3_to_h4i7 + 17 r7a0_to_h4i7 + 17 r7a1_to_h4i7 + 17 r7a2_to_h4i7 - 50 h4i7_hdd = 0 - h4i8_mem_use: 4 r0a0_to_h4i8 + 4 r0a1_to_h4i8 + 4 r0a2_to_h4i8 + 4 r0a3_to_h4i8 + 2 r1a0_to_h4i8 + 2 r1a1_to_h4i8 + 2 r1a2_to_h4i8 + 3 r2a0_to_h4i8 + 3 r3a0_to_h4i8 + 4 r4a0_to_h4i8 + 4 r4a1_to_h4i8 + 4 r4a2_to_h4i8 + 4 r4a3_to_h4i8 + 2 r5a0_to_h4i8 + 3 r6a0_to_h4i8 + 3 r6a1_to_h4i8 + 3 r6a2_to_h4i8 + 3 r6a3_to_h4i8 + 3 r7a0_to_h4i8 + 3 r7a1_to_h4i8 + 3 r7a2_to_h4i8 - 4 h4i8_mem = 0 - h4i8_hdd_use: 29 r0a0_to_h4i8 + 29 r0a1_to_h4i8 + 29 r0a2_to_h4i8 + 29 r0a3_to_h4i8 + 4 r1a0_to_h4i8 + 4 r1a1_to_h4i8 + 4 r1a2_to_h4i8 + 5 r2a0_to_h4i8 + 17 r3a0_to_h4i8 + 29 r4a0_to_h4i8 + 29 r4a1_to_h4i8 + 29 r4a2_to_h4i8 + 29 r4a3_to_h4i8 + 4 r5a0_to_h4i8 + 5 r6a0_to_h4i8 + 5 r6a1_to_h4i8 + 5 r6a2_to_h4i8 + 5 r6a3_to_h4i8 + 17 r7a0_to_h4i8 + 17 r7a1_to_h4i8 + 17 r7a2_to_h4i8 - 50 h4i8_hdd = 0 - h4i9_mem_use: 4 r0a0_to_h4i9 + 4 r0a1_to_h4i9 + 4 r0a2_to_h4i9 + 4 r0a3_to_h4i9 + 2 r1a0_to_h4i9 + 2 r1a1_to_h4i9 + 2 r1a2_to_h4i9 + 3 r2a0_to_h4i9 + 3 r3a0_to_h4i9 + 4 r4a0_to_h4i9 + 4 r4a1_to_h4i9 + 4 r4a2_to_h4i9 + 4 r4a3_to_h4i9 + 2 r5a0_to_h4i9 + 3 r6a0_to_h4i9 + 3 r6a1_to_h4i9 + 3 r6a2_to_h4i9 + 3 r6a3_to_h4i9 + 3 r7a0_to_h4i9 + 3 r7a1_to_h4i9 + 3 r7a2_to_h4i9 - 4 h4i9_mem = 0 - h4i9_hdd_use: 29 r0a0_to_h4i9 + 29 r0a1_to_h4i9 + 29 r0a2_to_h4i9 + 29 r0a3_to_h4i9 + 4 r1a0_to_h4i9 + 4 r1a1_to_h4i9 + 4 r1a2_to_h4i9 + 5 r2a0_to_h4i9 + 17 r3a0_to_h4i9 + 29 r4a0_to_h4i9 + 29 r4a1_to_h4i9 + 29 r4a2_to_h4i9 + 29 r4a3_to_h4i9 + 4 r5a0_to_h4i9 + 5 r6a0_to_h4i9 + 5 r6a1_to_h4i9 + 5 r6a2_to_h4i9 + 5 r6a3_to_h4i9 + 17 r7a0_to_h4i9 + 17 r7a1_to_h4i9 + 17 r7a2_to_h4i9 - 50 h4i9_hdd = 0 - h5i0_mem_use: 4 r0a0_to_h5i0 + 4 r0a1_to_h5i0 + 4 r0a2_to_h5i0 + 4 r0a3_to_h5i0 + 2 r1a0_to_h5i0 + 2 r1a1_to_h5i0 + 2 r1a2_to_h5i0 + 3 r2a0_to_h5i0 + 3 r3a0_to_h5i0 + 4 r4a0_to_h5i0 + 4 r4a1_to_h5i0 + 4 r4a2_to_h5i0 + 4 r4a3_to_h5i0 + 2 r5a0_to_h5i0 + 3 r6a0_to_h5i0 + 3 r6a1_to_h5i0 + 3 r6a2_to_h5i0 + 3 r6a3_to_h5i0 + 3 r7a0_to_h5i0 + 3 r7a1_to_h5i0 + 3 r7a2_to_h5i0 - 8 h5i0_mem = 0 - h5i0_hdd_use: 29 r0a0_to_h5i0 + 29 r0a1_to_h5i0 + 29 r0a2_to_h5i0 + 29 r0a3_to_h5i0 + 4 r1a0_to_h5i0 + 4 r1a1_to_h5i0 + 4 r1a2_to_h5i0 + 5 r2a0_to_h5i0 + 17 r3a0_to_h5i0 + 29 r4a0_to_h5i0 + 29 r4a1_to_h5i0 + 29 r4a2_to_h5i0 + 29 r4a3_to_h5i0 + 4 r5a0_to_h5i0 + 5 r6a0_to_h5i0 + 5 r6a1_to_h5i0 + 5 r6a2_to_h5i0 + 5 r6a3_to_h5i0 + 17 r7a0_to_h5i0 + 17 r7a1_to_h5i0 + 17 r7a2_to_h5i0 - 100 h5i0_hdd = 0 - h5i1_mem_use: 4 r0a0_to_h5i1 + 4 r0a1_to_h5i1 + 4 r0a2_to_h5i1 + 4 r0a3_to_h5i1 + 2 r1a0_to_h5i1 + 2 r1a1_to_h5i1 + 2 r1a2_to_h5i1 + 3 r2a0_to_h5i1 + 3 r3a0_to_h5i1 + 4 r4a0_to_h5i1 + 4 r4a1_to_h5i1 + 4 r4a2_to_h5i1 + 4 r4a3_to_h5i1 + 2 r5a0_to_h5i1 + 3 r6a0_to_h5i1 + 3 r6a1_to_h5i1 + 3 r6a2_to_h5i1 + 3 r6a3_to_h5i1 + 3 r7a0_to_h5i1 + 3 r7a1_to_h5i1 + 3 r7a2_to_h5i1 - 8 h5i1_mem = 0 - h5i1_hdd_use: 29 r0a0_to_h5i1 + 29 r0a1_to_h5i1 + 29 r0a2_to_h5i1 + 29 r0a3_to_h5i1 + 4 r1a0_to_h5i1 + 4 r1a1_to_h5i1 + 4 r1a2_to_h5i1 + 5 r2a0_to_h5i1 + 17 r3a0_to_h5i1 + 29 r4a0_to_h5i1 + 29 r4a1_to_h5i1 + 29 r4a2_to_h5i1 + 29 r4a3_to_h5i1 + 4 r5a0_to_h5i1 + 5 r6a0_to_h5i1 + 5 r6a1_to_h5i1 + 5 r6a2_to_h5i1 + 5 r6a3_to_h5i1 + 17 r7a0_to_h5i1 + 17 r7a1_to_h5i1 + 17 r7a2_to_h5i1 - 100 h5i1_hdd = 0 - h5i2_mem_use: 4 r0a0_to_h5i2 + 4 r0a1_to_h5i2 + 4 r0a2_to_h5i2 + 4 r0a3_to_h5i2 + 2 r1a0_to_h5i2 + 2 r1a1_to_h5i2 + 2 r1a2_to_h5i2 + 3 r2a0_to_h5i2 + 3 r3a0_to_h5i2 + 4 r4a0_to_h5i2 + 4 r4a1_to_h5i2 + 4 r4a2_to_h5i2 + 4 r4a3_to_h5i2 + 2 r5a0_to_h5i2 + 3 r6a0_to_h5i2 + 3 r6a1_to_h5i2 + 3 r6a2_to_h5i2 + 3 r6a3_to_h5i2 + 3 r7a0_to_h5i2 + 3 r7a1_to_h5i2 + 3 r7a2_to_h5i2 - 8 h5i2_mem = 0 - h5i2_hdd_use: 29 r0a0_to_h5i2 + 29 r0a1_to_h5i2 + 29 r0a2_to_h5i2 + 29 r0a3_to_h5i2 + 4 r1a0_to_h5i2 + 4 r1a1_to_h5i2 + 4 r1a2_to_h5i2 + 5 r2a0_to_h5i2 + 17 r3a0_to_h5i2 + 29 r4a0_to_h5i2 + 29 r4a1_to_h5i2 + 29 r4a2_to_h5i2 + 29 r4a3_to_h5i2 + 4 r5a0_to_h5i2 + 5 r6a0_to_h5i2 + 5 r6a1_to_h5i2 + 5 r6a2_to_h5i2 + 5 r6a3_to_h5i2 + 17 r7a0_to_h5i2 + 17 r7a1_to_h5i2 + 17 r7a2_to_h5i2 - 100 h5i2_hdd = 0 - h5i3_mem_use: 4 r0a0_to_h5i3 + 4 r0a1_to_h5i3 + 4 r0a2_to_h5i3 + 4 r0a3_to_h5i3 + 2 r1a0_to_h5i3 + 2 r1a1_to_h5i3 + 2 r1a2_to_h5i3 + 3 r2a0_to_h5i3 + 3 r3a0_to_h5i3 + 4 r4a0_to_h5i3 + 4 r4a1_to_h5i3 + 4 r4a2_to_h5i3 + 4 r4a3_to_h5i3 + 2 r5a0_to_h5i3 + 3 r6a0_to_h5i3 + 3 r6a1_to_h5i3 + 3 r6a2_to_h5i3 + 3 r6a3_to_h5i3 + 3 r7a0_to_h5i3 + 3 r7a1_to_h5i3 + 3 r7a2_to_h5i3 - 8 h5i3_mem = 0 - h5i3_hdd_use: 29 r0a0_to_h5i3 + 29 r0a1_to_h5i3 + 29 r0a2_to_h5i3 + 29 r0a3_to_h5i3 + 4 r1a0_to_h5i3 + 4 r1a1_to_h5i3 + 4 r1a2_to_h5i3 + 5 r2a0_to_h5i3 + 17 r3a0_to_h5i3 + 29 r4a0_to_h5i3 + 29 r4a1_to_h5i3 + 29 r4a2_to_h5i3 + 29 r4a3_to_h5i3 + 4 r5a0_to_h5i3 + 5 r6a0_to_h5i3 + 5 r6a1_to_h5i3 + 5 r6a2_to_h5i3 + 5 r6a3_to_h5i3 + 17 r7a0_to_h5i3 + 17 r7a1_to_h5i3 + 17 r7a2_to_h5i3 - 100 h5i3_hdd = 0 - h5i4_mem_use: 4 r0a0_to_h5i4 + 4 r0a1_to_h5i4 + 4 r0a2_to_h5i4 + 4 r0a3_to_h5i4 + 2 r1a0_to_h5i4 + 2 r1a1_to_h5i4 + 2 r1a2_to_h5i4 + 3 r2a0_to_h5i4 + 3 r3a0_to_h5i4 + 4 r4a0_to_h5i4 + 4 r4a1_to_h5i4 + 4 r4a2_to_h5i4 + 4 r4a3_to_h5i4 + 2 r5a0_to_h5i4 + 3 r6a0_to_h5i4 + 3 r6a1_to_h5i4 + 3 r6a2_to_h5i4 + 3 r6a3_to_h5i4 + 3 r7a0_to_h5i4 + 3 r7a1_to_h5i4 + 3 r7a2_to_h5i4 - 8 h5i4_mem = 0 - h5i4_hdd_use: 29 r0a0_to_h5i4 + 29 r0a1_to_h5i4 + 29 r0a2_to_h5i4 + 29 r0a3_to_h5i4 + 4 r1a0_to_h5i4 + 4 r1a1_to_h5i4 + 4 r1a2_to_h5i4 + 5 r2a0_to_h5i4 + 17 r3a0_to_h5i4 + 29 r4a0_to_h5i4 + 29 r4a1_to_h5i4 + 29 r4a2_to_h5i4 + 29 r4a3_to_h5i4 + 4 r5a0_to_h5i4 + 5 r6a0_to_h5i4 + 5 r6a1_to_h5i4 + 5 r6a2_to_h5i4 + 5 r6a3_to_h5i4 + 17 r7a0_to_h5i4 + 17 r7a1_to_h5i4 + 17 r7a2_to_h5i4 - 100 h5i4_hdd = 0 - h5i5_mem_use: 4 r0a0_to_h5i5 + 4 r0a1_to_h5i5 + 4 r0a2_to_h5i5 + 4 r0a3_to_h5i5 + 2 r1a0_to_h5i5 + 2 r1a1_to_h5i5 + 2 r1a2_to_h5i5 + 3 r2a0_to_h5i5 + 3 r3a0_to_h5i5 + 4 r4a0_to_h5i5 + 4 r4a1_to_h5i5 + 4 r4a2_to_h5i5 + 4 r4a3_to_h5i5 + 2 r5a0_to_h5i5 + 3 r6a0_to_h5i5 + 3 r6a1_to_h5i5 + 3 r6a2_to_h5i5 + 3 r6a3_to_h5i5 + 3 r7a0_to_h5i5 + 3 r7a1_to_h5i5 + 3 r7a2_to_h5i5 - 8 h5i5_mem = 0 - h5i5_hdd_use: 29 r0a0_to_h5i5 + 29 r0a1_to_h5i5 + 29 r0a2_to_h5i5 + 29 r0a3_to_h5i5 + 4 r1a0_to_h5i5 + 4 r1a1_to_h5i5 + 4 r1a2_to_h5i5 + 5 r2a0_to_h5i5 + 17 r3a0_to_h5i5 + 29 r4a0_to_h5i5 + 29 r4a1_to_h5i5 + 29 r4a2_to_h5i5 + 29 r4a3_to_h5i5 + 4 r5a0_to_h5i5 + 5 r6a0_to_h5i5 + 5 r6a1_to_h5i5 + 5 r6a2_to_h5i5 + 5 r6a3_to_h5i5 + 17 r7a0_to_h5i5 + 17 r7a1_to_h5i5 + 17 r7a2_to_h5i5 - 100 h5i5_hdd = 0 - h5i6_mem_use: 4 r0a0_to_h5i6 + 4 r0a1_to_h5i6 + 4 r0a2_to_h5i6 + 4 r0a3_to_h5i6 + 2 r1a0_to_h5i6 + 2 r1a1_to_h5i6 + 2 r1a2_to_h5i6 + 3 r2a0_to_h5i6 + 3 r3a0_to_h5i6 + 4 r4a0_to_h5i6 + 4 r4a1_to_h5i6 + 4 r4a2_to_h5i6 + 4 r4a3_to_h5i6 + 2 r5a0_to_h5i6 + 3 r6a0_to_h5i6 + 3 r6a1_to_h5i6 + 3 r6a2_to_h5i6 + 3 r6a3_to_h5i6 + 3 r7a0_to_h5i6 + 3 r7a1_to_h5i6 + 3 r7a2_to_h5i6 - 8 h5i6_mem = 0 - h5i6_hdd_use: 29 r0a0_to_h5i6 + 29 r0a1_to_h5i6 + 29 r0a2_to_h5i6 + 29 r0a3_to_h5i6 + 4 r1a0_to_h5i6 + 4 r1a1_to_h5i6 + 4 r1a2_to_h5i6 + 5 r2a0_to_h5i6 + 17 r3a0_to_h5i6 + 29 r4a0_to_h5i6 + 29 r4a1_to_h5i6 + 29 r4a2_to_h5i6 + 29 r4a3_to_h5i6 + 4 r5a0_to_h5i6 + 5 r6a0_to_h5i6 + 5 r6a1_to_h5i6 + 5 r6a2_to_h5i6 + 5 r6a3_to_h5i6 + 17 r7a0_to_h5i6 + 17 r7a1_to_h5i6 + 17 r7a2_to_h5i6 - 100 h5i6_hdd = 0 - h5i7_mem_use: 4 r0a0_to_h5i7 + 4 r0a1_to_h5i7 + 4 r0a2_to_h5i7 + 4 r0a3_to_h5i7 + 2 r1a0_to_h5i7 + 2 r1a1_to_h5i7 + 2 r1a2_to_h5i7 + 3 r2a0_to_h5i7 + 3 r3a0_to_h5i7 + 4 r4a0_to_h5i7 + 4 r4a1_to_h5i7 + 4 r4a2_to_h5i7 + 4 r4a3_to_h5i7 + 2 r5a0_to_h5i7 + 3 r6a0_to_h5i7 + 3 r6a1_to_h5i7 + 3 r6a2_to_h5i7 + 3 r6a3_to_h5i7 + 3 r7a0_to_h5i7 + 3 r7a1_to_h5i7 + 3 r7a2_to_h5i7 - 8 h5i7_mem = 0 - h5i7_hdd_use: 29 r0a0_to_h5i7 + 29 r0a1_to_h5i7 + 29 r0a2_to_h5i7 + 29 r0a3_to_h5i7 + 4 r1a0_to_h5i7 + 4 r1a1_to_h5i7 + 4 r1a2_to_h5i7 + 5 r2a0_to_h5i7 + 17 r3a0_to_h5i7 + 29 r4a0_to_h5i7 + 29 r4a1_to_h5i7 + 29 r4a2_to_h5i7 + 29 r4a3_to_h5i7 + 4 r5a0_to_h5i7 + 5 r6a0_to_h5i7 + 5 r6a1_to_h5i7 + 5 r6a2_to_h5i7 + 5 r6a3_to_h5i7 + 17 r7a0_to_h5i7 + 17 r7a1_to_h5i7 + 17 r7a2_to_h5i7 - 100 h5i7_hdd = 0 - h5i8_mem_use: 4 r0a0_to_h5i8 + 4 r0a1_to_h5i8 + 4 r0a2_to_h5i8 + 4 r0a3_to_h5i8 + 2 r1a0_to_h5i8 + 2 r1a1_to_h5i8 + 2 r1a2_to_h5i8 + 3 r2a0_to_h5i8 + 3 r3a0_to_h5i8 + 4 r4a0_to_h5i8 + 4 r4a1_to_h5i8 + 4 r4a2_to_h5i8 + 4 r4a3_to_h5i8 + 2 r5a0_to_h5i8 + 3 r6a0_to_h5i8 + 3 r6a1_to_h5i8 + 3 r6a2_to_h5i8 + 3 r6a3_to_h5i8 + 3 r7a0_to_h5i8 + 3 r7a1_to_h5i8 + 3 r7a2_to_h5i8 - 8 h5i8_mem = 0 - h5i8_hdd_use: 29 r0a0_to_h5i8 + 29 r0a1_to_h5i8 + 29 r0a2_to_h5i8 + 29 r0a3_to_h5i8 + 4 r1a0_to_h5i8 + 4 r1a1_to_h5i8 + 4 r1a2_to_h5i8 + 5 r2a0_to_h5i8 + 17 r3a0_to_h5i8 + 29 r4a0_to_h5i8 + 29 r4a1_to_h5i8 + 29 r4a2_to_h5i8 + 29 r4a3_to_h5i8 + 4 r5a0_to_h5i8 + 5 r6a0_to_h5i8 + 5 r6a1_to_h5i8 + 5 r6a2_to_h5i8 + 5 r6a3_to_h5i8 + 17 r7a0_to_h5i8 + 17 r7a1_to_h5i8 + 17 r7a2_to_h5i8 - 100 h5i8_hdd = 0 - h5i9_mem_use: 4 r0a0_to_h5i9 + 4 r0a1_to_h5i9 + 4 r0a2_to_h5i9 + 4 r0a3_to_h5i9 + 2 r1a0_to_h5i9 + 2 r1a1_to_h5i9 + 2 r1a2_to_h5i9 + 3 r2a0_to_h5i9 + 3 r3a0_to_h5i9 + 4 r4a0_to_h5i9 + 4 r4a1_to_h5i9 + 4 r4a2_to_h5i9 + 4 r4a3_to_h5i9 + 2 r5a0_to_h5i9 + 3 r6a0_to_h5i9 + 3 r6a1_to_h5i9 + 3 r6a2_to_h5i9 + 3 r6a3_to_h5i9 + 3 r7a0_to_h5i9 + 3 r7a1_to_h5i9 + 3 r7a2_to_h5i9 - 8 h5i9_mem = 0 - h5i9_hdd_use: 29 r0a0_to_h5i9 + 29 r0a1_to_h5i9 + 29 r0a2_to_h5i9 + 29 r0a3_to_h5i9 + 4 r1a0_to_h5i9 + 4 r1a1_to_h5i9 + 4 r1a2_to_h5i9 + 5 r2a0_to_h5i9 + 17 r3a0_to_h5i9 + 29 r4a0_to_h5i9 + 29 r4a1_to_h5i9 + 29 r4a2_to_h5i9 + 29 r4a3_to_h5i9 + 4 r5a0_to_h5i9 + 5 r6a0_to_h5i9 + 5 r6a1_to_h5i9 + 5 r6a2_to_h5i9 + 5 r6a3_to_h5i9 + 17 r7a0_to_h5i9 + 17 r7a1_to_h5i9 + 17 r7a2_to_h5i9 - 100 h5i9_hdd = 0 - average_mem: h0i0_mem - 0.25 h0i0_exists + h0i1_mem - 0.25 h0i1_exists + h0i2_mem - 0.25 h0i2_exists + h0i3_mem - 0.25 h0i3_exists + h0i4_mem - 0.25 h0i4_exists + h0i5_mem - 0.25 h0i5_exists + h0i6_mem - 0.25 h0i6_exists + h0i7_mem - 0.25 h0i7_exists + h0i8_mem - 0.25 h0i8_exists + h0i9_mem - 0.25 h0i9_exists + h1i0_mem - 0.25 h1i0_exists + h1i1_mem - 0.25 h1i1_exists + h1i2_mem - 0.25 h1i2_exists + h1i3_mem - 0.25 h1i3_exists + h1i4_mem - 0.25 h1i4_exists + h1i5_mem - 0.25 h1i5_exists + h1i6_mem - 0.25 h1i6_exists + h1i7_mem - 0.25 h1i7_exists + h1i8_mem - 0.25 h1i8_exists + h1i9_mem - 0.25 h1i9_exists + h2i0_mem - 0.25 h2i0_exists + h2i1_mem - 0.25 h2i1_exists + h2i2_mem - 0.25 h2i2_exists + h2i3_mem - 0.25 h2i3_exists + h2i4_mem - 0.25 h2i4_exists + h2i5_mem - 0.25 h2i5_exists + h2i6_mem - 0.25 h2i6_exists + h2i7_mem - 0.25 h2i7_exists + h2i8_mem - 0.25 h2i8_exists + h2i9_mem - 0.25 h2i9_exists + h3i0_mem - 0.25 h3i0_exists + h3i1_mem - 0.25 h3i1_exists + h3i2_mem - 0.25 h3i2_exists + h3i3_mem - 0.25 h3i3_exists + h3i4_mem - 0.25 h3i4_exists + h3i5_mem - 0.25 h3i5_exists + h3i6_mem - 0.25 h3i6_exists + h3i7_mem - 0.25 h3i7_exists + h3i8_mem - 0.25 h3i8_exists + h3i9_mem - 0.25 h3i9_exists + h4i0_mem - 0.25 h4i0_exists + h4i1_mem - 0.25 h4i1_exists + h4i2_mem - 0.25 h4i2_exists + h4i3_mem - 0.25 h4i3_exists + h4i4_mem - 0.25 h4i4_exists + h4i5_mem - 0.25 h4i5_exists + h4i6_mem - 0.25 h4i6_exists + h4i7_mem - 0.25 h4i7_exists + h4i8_mem - 0.25 h4i8_exists + h4i9_mem - 0.25 h4i9_exists + h5i0_mem - 0.25 h5i0_exists + h5i1_mem - 0.25 h5i1_exists + h5i2_mem - 0.25 h5i2_exists + h5i3_mem - 0.25 h5i3_exists + h5i4_mem - 0.25 h5i4_exists + h5i5_mem - 0.25 h5i5_exists + h5i6_mem - 0.25 h5i6_exists + h5i7_mem - 0.25 h5i7_exists + h5i8_mem - 0.25 h5i8_exists + h5i9_mem - 0.25 h5i9_exists >= 0 - average_hdd: h0i0_mem - 0.25 h0i0_exists + h0i1_mem - 0.25 h0i1_exists + h0i2_mem - 0.25 h0i2_exists + h0i3_mem - 0.25 h0i3_exists + h0i4_mem - 0.25 h0i4_exists + h0i5_mem - 0.25 h0i5_exists + h0i6_mem - 0.25 h0i6_exists + h0i7_mem - 0.25 h0i7_exists + h0i8_mem - 0.25 h0i8_exists + h0i9_mem - 0.25 h0i9_exists + h1i0_mem - 0.25 h1i0_exists + h1i1_mem - 0.25 h1i1_exists + h1i2_mem - 0.25 h1i2_exists + h1i3_mem - 0.25 h1i3_exists + h1i4_mem - 0.25 h1i4_exists + h1i5_mem - 0.25 h1i5_exists + h1i6_mem - 0.25 h1i6_exists + h1i7_mem - 0.25 h1i7_exists + h1i8_mem - 0.25 h1i8_exists + h1i9_mem - 0.25 h1i9_exists + h2i0_mem - 0.25 h2i0_exists + h2i1_mem - 0.25 h2i1_exists + h2i2_mem - 0.25 h2i2_exists + h2i3_mem - 0.25 h2i3_exists + h2i4_mem - 0.25 h2i4_exists + h2i5_mem - 0.25 h2i5_exists + h2i6_mem - 0.25 h2i6_exists + h2i7_mem - 0.25 h2i7_exists + h2i8_mem - 0.25 h2i8_exists + h2i9_mem - 0.25 h2i9_exists + h3i0_mem - 0.25 h3i0_exists + h3i1_mem - 0.25 h3i1_exists + h3i2_mem - 0.25 h3i2_exists + h3i3_mem - 0.25 h3i3_exists + h3i4_mem - 0.25 h3i4_exists + h3i5_mem - 0.25 h3i5_exists + h3i6_mem - 0.25 h3i6_exists + h3i7_mem - 0.25 h3i7_exists + h3i8_mem - 0.25 h3i8_exists + h3i9_mem - 0.25 h3i9_exists + h4i0_mem - 0.25 h4i0_exists + h4i1_mem - 0.25 h4i1_exists + h4i2_mem - 0.25 h4i2_exists + h4i3_mem - 0.25 h4i3_exists + h4i4_mem - 0.25 h4i4_exists + h4i5_mem - 0.25 h4i5_exists + h4i6_mem - 0.25 h4i6_exists + h4i7_mem - 0.25 h4i7_exists + h4i8_mem - 0.25 h4i8_exists + h4i9_mem - 0.25 h4i9_exists + h5i0_mem - 0.25 h5i0_exists + h5i1_mem - 0.25 h5i1_exists + h5i2_mem - 0.25 h5i2_exists + h5i3_mem - 0.25 h5i3_exists + h5i4_mem - 0.25 h5i4_exists + h5i5_mem - 0.25 h5i5_exists + h5i6_mem - 0.25 h5i6_exists + h5i7_mem - 0.25 h5i7_exists + h5i8_mem - 0.25 h5i8_exists + h5i9_mem - 0.25 h5i9_exists >= 0 - r0_h4i0_redundant: r0a0_to_h4i0 + r0a1_to_h4i0 + r0a2_to_h4i0 + r0a3_to_h4i0 <= 1 - r0_h4i1_redundant: r0a0_to_h4i1 + r0a1_to_h4i1 + r0a2_to_h4i1 + r0a3_to_h4i1 <= 1 - r0_h4i2_redundant: r0a0_to_h4i2 + r0a1_to_h4i2 + r0a2_to_h4i2 + r0a3_to_h4i2 <= 1 - r0_h4i3_redundant: r0a0_to_h4i3 + r0a1_to_h4i3 + r0a2_to_h4i3 + r0a3_to_h4i3 <= 1 - r0_h4i4_redundant: r0a0_to_h4i4 + r0a1_to_h4i4 + r0a2_to_h4i4 + r0a3_to_h4i4 <= 1 - r0_h4i5_redundant: r0a0_to_h4i5 + r0a1_to_h4i5 + r0a2_to_h4i5 + r0a3_to_h4i5 <= 1 - r0_h4i6_redundant: r0a0_to_h4i6 + r0a1_to_h4i6 + r0a2_to_h4i6 + r0a3_to_h4i6 <= 1 - r0_h4i7_redundant: r0a0_to_h4i7 + r0a1_to_h4i7 + r0a2_to_h4i7 + r0a3_to_h4i7 <= 1 - r0_h4i8_redundant: r0a0_to_h4i8 + r0a1_to_h4i8 + r0a2_to_h4i8 + r0a3_to_h4i8 <= 1 - r0_h4i9_redundant: r0a0_to_h4i9 + r0a1_to_h4i9 + r0a2_to_h4i9 + r0a3_to_h4i9 <= 1 - r0_h5i0_redundant: r0a0_to_h5i0 + r0a1_to_h5i0 + r0a2_to_h5i0 + r0a3_to_h5i0 <= 1 - r0_h5i1_redundant: r0a0_to_h5i1 + r0a1_to_h5i1 + r0a2_to_h5i1 + r0a3_to_h5i1 <= 1 - r0_h5i2_redundant: r0a0_to_h5i2 + r0a1_to_h5i2 + r0a2_to_h5i2 + r0a3_to_h5i2 <= 1 - r0_h5i3_redundant: r0a0_to_h5i3 + r0a1_to_h5i3 + r0a2_to_h5i3 + r0a3_to_h5i3 <= 1 - r0_h5i4_redundant: r0a0_to_h5i4 + r0a1_to_h5i4 + r0a2_to_h5i4 + r0a3_to_h5i4 <= 1 - r0_h5i5_redundant: r0a0_to_h5i5 + r0a1_to_h5i5 + r0a2_to_h5i5 + r0a3_to_h5i5 <= 1 - r0_h5i6_redundant: r0a0_to_h5i6 + r0a1_to_h5i6 + r0a2_to_h5i6 + r0a3_to_h5i6 <= 1 - r0_h5i7_redundant: r0a0_to_h5i7 + r0a1_to_h5i7 + r0a2_to_h5i7 + r0a3_to_h5i7 <= 1 - r0_h5i8_redundant: r0a0_to_h5i8 + r0a1_to_h5i8 + r0a2_to_h5i8 + r0a3_to_h5i8 <= 1 - r0_h5i9_redundant: r0a0_to_h5i9 + r0a1_to_h5i9 + r0a2_to_h5i9 + r0a3_to_h5i9 <= 1 - r1_h0i0_redundant: r1a0_to_h0i0 + r1a1_to_h0i0 + r1a2_to_h0i0 <= 1 - r1_h0i1_redundant: r1a0_to_h0i1 + r1a1_to_h0i1 + r1a2_to_h0i1 <= 1 - r1_h0i2_redundant: r1a0_to_h0i2 + r1a1_to_h0i2 + r1a2_to_h0i2 <= 1 - r1_h0i3_redundant: r1a0_to_h0i3 + r1a1_to_h0i3 + r1a2_to_h0i3 <= 1 - r1_h0i4_redundant: r1a0_to_h0i4 + r1a1_to_h0i4 + r1a2_to_h0i4 <= 1 - r1_h0i5_redundant: r1a0_to_h0i5 + r1a1_to_h0i5 + r1a2_to_h0i5 <= 1 - r1_h0i6_redundant: r1a0_to_h0i6 + r1a1_to_h0i6 + r1a2_to_h0i6 <= 1 - r1_h0i7_redundant: r1a0_to_h0i7 + r1a1_to_h0i7 + r1a2_to_h0i7 <= 1 - r1_h0i8_redundant: r1a0_to_h0i8 + r1a1_to_h0i8 + r1a2_to_h0i8 <= 1 - r1_h0i9_redundant: r1a0_to_h0i9 + r1a1_to_h0i9 + r1a2_to_h0i9 <= 1 - r1_h1i0_redundant: r1a0_to_h1i0 + r1a1_to_h1i0 + r1a2_to_h1i0 <= 1 - r1_h1i1_redundant: r1a0_to_h1i1 + r1a1_to_h1i1 + r1a2_to_h1i1 <= 1 - r1_h1i2_redundant: r1a0_to_h1i2 + r1a1_to_h1i2 + r1a2_to_h1i2 <= 1 - r1_h1i3_redundant: r1a0_to_h1i3 + r1a1_to_h1i3 + r1a2_to_h1i3 <= 1 - r1_h1i4_redundant: r1a0_to_h1i4 + r1a1_to_h1i4 + r1a2_to_h1i4 <= 1 - r1_h1i5_redundant: r1a0_to_h1i5 + r1a1_to_h1i5 + r1a2_to_h1i5 <= 1 - r1_h1i6_redundant: r1a0_to_h1i6 + r1a1_to_h1i6 + r1a2_to_h1i6 <= 1 - r1_h1i7_redundant: r1a0_to_h1i7 + r1a1_to_h1i7 + r1a2_to_h1i7 <= 1 - r1_h1i8_redundant: r1a0_to_h1i8 + r1a1_to_h1i8 + r1a2_to_h1i8 <= 1 - r1_h1i9_redundant: r1a0_to_h1i9 + r1a1_to_h1i9 + r1a2_to_h1i9 <= 1 - r1_h2i0_redundant: r1a0_to_h2i0 + r1a1_to_h2i0 + r1a2_to_h2i0 <= 1 - r1_h2i1_redundant: r1a0_to_h2i1 + r1a1_to_h2i1 + r1a2_to_h2i1 <= 1 - r1_h2i2_redundant: r1a0_to_h2i2 + r1a1_to_h2i2 + r1a2_to_h2i2 <= 1 - r1_h2i3_redundant: r1a0_to_h2i3 + r1a1_to_h2i3 + r1a2_to_h2i3 <= 1 - r1_h2i4_redundant: r1a0_to_h2i4 + r1a1_to_h2i4 + r1a2_to_h2i4 <= 1 - r1_h2i5_redundant: r1a0_to_h2i5 + r1a1_to_h2i5 + r1a2_to_h2i5 <= 1 - r1_h2i6_redundant: r1a0_to_h2i6 + r1a1_to_h2i6 + r1a2_to_h2i6 <= 1 - r1_h2i7_redundant: r1a0_to_h2i7 + r1a1_to_h2i7 + r1a2_to_h2i7 <= 1 - r1_h2i8_redundant: r1a0_to_h2i8 + r1a1_to_h2i8 + r1a2_to_h2i8 <= 1 - r1_h2i9_redundant: r1a0_to_h2i9 + r1a1_to_h2i9 + r1a2_to_h2i9 <= 1 - r1_h3i0_redundant: r1a0_to_h3i0 + r1a1_to_h3i0 + r1a2_to_h3i0 <= 1 - r1_h3i1_redundant: r1a0_to_h3i1 + r1a1_to_h3i1 + r1a2_to_h3i1 <= 1 - r1_h3i2_redundant: r1a0_to_h3i2 + r1a1_to_h3i2 + r1a2_to_h3i2 <= 1 - r1_h3i3_redundant: r1a0_to_h3i3 + r1a1_to_h3i3 + r1a2_to_h3i3 <= 1 - r1_h3i4_redundant: r1a0_to_h3i4 + r1a1_to_h3i4 + r1a2_to_h3i4 <= 1 - r1_h3i5_redundant: r1a0_to_h3i5 + r1a1_to_h3i5 + r1a2_to_h3i5 <= 1 - r1_h3i6_redundant: r1a0_to_h3i6 + r1a1_to_h3i6 + r1a2_to_h3i6 <= 1 - r1_h3i7_redundant: r1a0_to_h3i7 + r1a1_to_h3i7 + r1a2_to_h3i7 <= 1 - r1_h3i8_redundant: r1a0_to_h3i8 + r1a1_to_h3i8 + r1a2_to_h3i8 <= 1 - r1_h3i9_redundant: r1a0_to_h3i9 + r1a1_to_h3i9 + r1a2_to_h3i9 <= 1 - r1_h4i0_redundant: r1a0_to_h4i0 + r1a1_to_h4i0 + r1a2_to_h4i0 <= 1 - r1_h4i1_redundant: r1a0_to_h4i1 + r1a1_to_h4i1 + r1a2_to_h4i1 <= 1 - r1_h4i2_redundant: r1a0_to_h4i2 + r1a1_to_h4i2 + r1a2_to_h4i2 <= 1 - r1_h4i3_redundant: r1a0_to_h4i3 + r1a1_to_h4i3 + r1a2_to_h4i3 <= 1 - r1_h4i4_redundant: r1a0_to_h4i4 + r1a1_to_h4i4 + r1a2_to_h4i4 <= 1 - r1_h4i5_redundant: r1a0_to_h4i5 + r1a1_to_h4i5 + r1a2_to_h4i5 <= 1 - r1_h4i6_redundant: r1a0_to_h4i6 + r1a1_to_h4i6 + r1a2_to_h4i6 <= 1 - r1_h4i7_redundant: r1a0_to_h4i7 + r1a1_to_h4i7 + r1a2_to_h4i7 <= 1 - r1_h4i8_redundant: r1a0_to_h4i8 + r1a1_to_h4i8 + r1a2_to_h4i8 <= 1 - r1_h4i9_redundant: r1a0_to_h4i9 + r1a1_to_h4i9 + r1a2_to_h4i9 <= 1 - r1_h5i0_redundant: r1a0_to_h5i0 + r1a1_to_h5i0 + r1a2_to_h5i0 <= 1 - r1_h5i1_redundant: r1a0_to_h5i1 + r1a1_to_h5i1 + r1a2_to_h5i1 <= 1 - r1_h5i2_redundant: r1a0_to_h5i2 + r1a1_to_h5i2 + r1a2_to_h5i2 <= 1 - r1_h5i3_redundant: r1a0_to_h5i3 + r1a1_to_h5i3 + r1a2_to_h5i3 <= 1 - r1_h5i4_redundant: r1a0_to_h5i4 + r1a1_to_h5i4 + r1a2_to_h5i4 <= 1 - r1_h5i5_redundant: r1a0_to_h5i5 + r1a1_to_h5i5 + r1a2_to_h5i5 <= 1 - r1_h5i6_redundant: r1a0_to_h5i6 + r1a1_to_h5i6 + r1a2_to_h5i6 <= 1 - r1_h5i7_redundant: r1a0_to_h5i7 + r1a1_to_h5i7 + r1a2_to_h5i7 <= 1 - r1_h5i8_redundant: r1a0_to_h5i8 + r1a1_to_h5i8 + r1a2_to_h5i8 <= 1 - r1_h5i9_redundant: r1a0_to_h5i9 + r1a1_to_h5i9 + r1a2_to_h5i9 <= 1 - r2_h4i0_redundant: r4a0_to_h4i0 + r4a1_to_h4i0 + r4a2_to_h4i0 + r4a3_to_h4i0 <= 1 - r2_h4i1_redundant: r4a0_to_h4i1 + r4a1_to_h4i1 + r4a2_to_h4i1 + r4a3_to_h4i1 <= 1 - r2_h4i2_redundant: r4a0_to_h4i2 + r4a1_to_h4i2 + r4a2_to_h4i2 + r4a3_to_h4i2 <= 1 - r2_h4i3_redundant: r4a0_to_h4i3 + r4a1_to_h4i3 + r4a2_to_h4i3 + r4a3_to_h4i3 <= 1 - r2_h4i4_redundant: r4a0_to_h4i4 + r4a1_to_h4i4 + r4a2_to_h4i4 + r4a3_to_h4i4 <= 1 - r2_h4i5_redundant: r4a0_to_h4i5 + r4a1_to_h4i5 + r4a2_to_h4i5 + r4a3_to_h4i5 <= 1 - r2_h4i6_redundant: r4a0_to_h4i6 + r4a1_to_h4i6 + r4a2_to_h4i6 + r4a3_to_h4i6 <= 1 - r2_h4i7_redundant: r4a0_to_h4i7 + r4a1_to_h4i7 + r4a2_to_h4i7 + r4a3_to_h4i7 <= 1 - r2_h4i8_redundant: r4a0_to_h4i8 + r4a1_to_h4i8 + r4a2_to_h4i8 + r4a3_to_h4i8 <= 1 - r2_h4i9_redundant: r4a0_to_h4i9 + r4a1_to_h4i9 + r4a2_to_h4i9 + r4a3_to_h4i9 <= 1 - r2_h5i0_redundant: r4a0_to_h5i0 + r4a1_to_h5i0 + r4a2_to_h5i0 + r4a3_to_h5i0 <= 1 - r2_h5i1_redundant: r4a0_to_h5i1 + r4a1_to_h5i1 + r4a2_to_h5i1 + r4a3_to_h5i1 <= 1 - r2_h5i2_redundant: r4a0_to_h5i2 + r4a1_to_h5i2 + r4a2_to_h5i2 + r4a3_to_h5i2 <= 1 - r2_h5i3_redundant: r4a0_to_h5i3 + r4a1_to_h5i3 + r4a2_to_h5i3 + r4a3_to_h5i3 <= 1 - r2_h5i4_redundant: r4a0_to_h5i4 + r4a1_to_h5i4 + r4a2_to_h5i4 + r4a3_to_h5i4 <= 1 - r2_h5i5_redundant: r4a0_to_h5i5 + r4a1_to_h5i5 + r4a2_to_h5i5 + r4a3_to_h5i5 <= 1 - r2_h5i6_redundant: r4a0_to_h5i6 + r4a1_to_h5i6 + r4a2_to_h5i6 + r4a3_to_h5i6 <= 1 - r2_h5i7_redundant: r4a0_to_h5i7 + r4a1_to_h5i7 + r4a2_to_h5i7 + r4a3_to_h5i7 <= 1 - r2_h5i8_redundant: r4a0_to_h5i8 + r4a1_to_h5i8 + r4a2_to_h5i8 + r4a3_to_h5i8 <= 1 - r2_h5i9_redundant: r4a0_to_h5i9 + r4a1_to_h5i9 + r4a2_to_h5i9 + r4a3_to_h5i9 <= 1 - r3_h0i0_redundant: r6a0_to_h0i0 + r6a1_to_h0i0 + r6a2_to_h0i0 + r6a3_to_h0i0 <= 1 - r3_h0i1_redundant: r6a0_to_h0i1 + r6a1_to_h0i1 + r6a2_to_h0i1 + r6a3_to_h0i1 <= 1 - r3_h0i2_redundant: r6a0_to_h0i2 + r6a1_to_h0i2 + r6a2_to_h0i2 + r6a3_to_h0i2 <= 1 - r3_h0i3_redundant: r6a0_to_h0i3 + r6a1_to_h0i3 + r6a2_to_h0i3 + r6a3_to_h0i3 <= 1 - r3_h0i4_redundant: r6a0_to_h0i4 + r6a1_to_h0i4 + r6a2_to_h0i4 + r6a3_to_h0i4 <= 1 - r3_h0i5_redundant: r6a0_to_h0i5 + r6a1_to_h0i5 + r6a2_to_h0i5 + r6a3_to_h0i5 <= 1 - r3_h0i6_redundant: r6a0_to_h0i6 + r6a1_to_h0i6 + r6a2_to_h0i6 + r6a3_to_h0i6 <= 1 - r3_h0i7_redundant: r6a0_to_h0i7 + r6a1_to_h0i7 + r6a2_to_h0i7 + r6a3_to_h0i7 <= 1 - r3_h0i8_redundant: r6a0_to_h0i8 + r6a1_to_h0i8 + r6a2_to_h0i8 + r6a3_to_h0i8 <= 1 - r3_h0i9_redundant: r6a0_to_h0i9 + r6a1_to_h0i9 + r6a2_to_h0i9 + r6a3_to_h0i9 <= 1 - r3_h1i0_redundant: r6a0_to_h1i0 + r6a1_to_h1i0 + r6a2_to_h1i0 + r6a3_to_h1i0 <= 1 - r3_h1i1_redundant: r6a0_to_h1i1 + r6a1_to_h1i1 + r6a2_to_h1i1 + r6a3_to_h1i1 <= 1 - r3_h1i2_redundant: r6a0_to_h1i2 + r6a1_to_h1i2 + r6a2_to_h1i2 + r6a3_to_h1i2 <= 1 - r3_h1i3_redundant: r6a0_to_h1i3 + r6a1_to_h1i3 + r6a2_to_h1i3 + r6a3_to_h1i3 <= 1 - r3_h1i4_redundant: r6a0_to_h1i4 + r6a1_to_h1i4 + r6a2_to_h1i4 + r6a3_to_h1i4 <= 1 - r3_h1i5_redundant: r6a0_to_h1i5 + r6a1_to_h1i5 + r6a2_to_h1i5 + r6a3_to_h1i5 <= 1 - r3_h1i6_redundant: r6a0_to_h1i6 + r6a1_to_h1i6 + r6a2_to_h1i6 + r6a3_to_h1i6 <= 1 - r3_h1i7_redundant: r6a0_to_h1i7 + r6a1_to_h1i7 + r6a2_to_h1i7 + r6a3_to_h1i7 <= 1 - r3_h1i8_redundant: r6a0_to_h1i8 + r6a1_to_h1i8 + r6a2_to_h1i8 + r6a3_to_h1i8 <= 1 - r3_h1i9_redundant: r6a0_to_h1i9 + r6a1_to_h1i9 + r6a2_to_h1i9 + r6a3_to_h1i9 <= 1 - r3_h2i0_redundant: r6a0_to_h2i0 + r6a1_to_h2i0 + r6a2_to_h2i0 + r6a3_to_h2i0 <= 1 - r3_h2i1_redundant: r6a0_to_h2i1 + r6a1_to_h2i1 + r6a2_to_h2i1 + r6a3_to_h2i1 <= 1 - r3_h2i2_redundant: r6a0_to_h2i2 + r6a1_to_h2i2 + r6a2_to_h2i2 + r6a3_to_h2i2 <= 1 - r3_h2i3_redundant: r6a0_to_h2i3 + r6a1_to_h2i3 + r6a2_to_h2i3 + r6a3_to_h2i3 <= 1 - r3_h2i4_redundant: r6a0_to_h2i4 + r6a1_to_h2i4 + r6a2_to_h2i4 + r6a3_to_h2i4 <= 1 - r3_h2i5_redundant: r6a0_to_h2i5 + r6a1_to_h2i5 + r6a2_to_h2i5 + r6a3_to_h2i5 <= 1 - r3_h2i6_redundant: r6a0_to_h2i6 + r6a1_to_h2i6 + r6a2_to_h2i6 + r6a3_to_h2i6 <= 1 - r3_h2i7_redundant: r6a0_to_h2i7 + r6a1_to_h2i7 + r6a2_to_h2i7 + r6a3_to_h2i7 <= 1 - r3_h2i8_redundant: r6a0_to_h2i8 + r6a1_to_h2i8 + r6a2_to_h2i8 + r6a3_to_h2i8 <= 1 - r3_h2i9_redundant: r6a0_to_h2i9 + r6a1_to_h2i9 + r6a2_to_h2i9 + r6a3_to_h2i9 <= 1 - r3_h3i0_redundant: r6a0_to_h3i0 + r6a1_to_h3i0 + r6a2_to_h3i0 + r6a3_to_h3i0 <= 1 - r3_h3i1_redundant: r6a0_to_h3i1 + r6a1_to_h3i1 + r6a2_to_h3i1 + r6a3_to_h3i1 <= 1 - r3_h3i2_redundant: r6a0_to_h3i2 + r6a1_to_h3i2 + r6a2_to_h3i2 + r6a3_to_h3i2 <= 1 - r3_h3i3_redundant: r6a0_to_h3i3 + r6a1_to_h3i3 + r6a2_to_h3i3 + r6a3_to_h3i3 <= 1 - r3_h3i4_redundant: r6a0_to_h3i4 + r6a1_to_h3i4 + r6a2_to_h3i4 + r6a3_to_h3i4 <= 1 - r3_h3i5_redundant: r6a0_to_h3i5 + r6a1_to_h3i5 + r6a2_to_h3i5 + r6a3_to_h3i5 <= 1 - r3_h3i6_redundant: r6a0_to_h3i6 + r6a1_to_h3i6 + r6a2_to_h3i6 + r6a3_to_h3i6 <= 1 - r3_h3i7_redundant: r6a0_to_h3i7 + r6a1_to_h3i7 + r6a2_to_h3i7 + r6a3_to_h3i7 <= 1 - r3_h3i8_redundant: r6a0_to_h3i8 + r6a1_to_h3i8 + r6a2_to_h3i8 + r6a3_to_h3i8 <= 1 - r3_h3i9_redundant: r6a0_to_h3i9 + r6a1_to_h3i9 + r6a2_to_h3i9 + r6a3_to_h3i9 <= 1 - r3_h4i0_redundant: r6a0_to_h4i0 + r6a1_to_h4i0 + r6a2_to_h4i0 + r6a3_to_h4i0 <= 1 - r3_h4i1_redundant: r6a0_to_h4i1 + r6a1_to_h4i1 + r6a2_to_h4i1 + r6a3_to_h4i1 <= 1 - r3_h4i2_redundant: r6a0_to_h4i2 + r6a1_to_h4i2 + r6a2_to_h4i2 + r6a3_to_h4i2 <= 1 - r3_h4i3_redundant: r6a0_to_h4i3 + r6a1_to_h4i3 + r6a2_to_h4i3 + r6a3_to_h4i3 <= 1 - r3_h4i4_redundant: r6a0_to_h4i4 + r6a1_to_h4i4 + r6a2_to_h4i4 + r6a3_to_h4i4 <= 1 - r3_h4i5_redundant: r6a0_to_h4i5 + r6a1_to_h4i5 + r6a2_to_h4i5 + r6a3_to_h4i5 <= 1 - r3_h4i6_redundant: r6a0_to_h4i6 + r6a1_to_h4i6 + r6a2_to_h4i6 + r6a3_to_h4i6 <= 1 - r3_h4i7_redundant: r6a0_to_h4i7 + r6a1_to_h4i7 + r6a2_to_h4i7 + r6a3_to_h4i7 <= 1 - r3_h4i8_redundant: r6a0_to_h4i8 + r6a1_to_h4i8 + r6a2_to_h4i8 + r6a3_to_h4i8 <= 1 - r3_h4i9_redundant: r6a0_to_h4i9 + r6a1_to_h4i9 + r6a2_to_h4i9 + r6a3_to_h4i9 <= 1 - r3_h5i0_redundant: r6a0_to_h5i0 + r6a1_to_h5i0 + r6a2_to_h5i0 + r6a3_to_h5i0 <= 1 - r3_h5i1_redundant: r6a0_to_h5i1 + r6a1_to_h5i1 + r6a2_to_h5i1 + r6a3_to_h5i1 <= 1 - r3_h5i2_redundant: r6a0_to_h5i2 + r6a1_to_h5i2 + r6a2_to_h5i2 + r6a3_to_h5i2 <= 1 - r3_h5i3_redundant: r6a0_to_h5i3 + r6a1_to_h5i3 + r6a2_to_h5i3 + r6a3_to_h5i3 <= 1 - r3_h5i4_redundant: r6a0_to_h5i4 + r6a1_to_h5i4 + r6a2_to_h5i4 + r6a3_to_h5i4 <= 1 - r3_h5i5_redundant: r6a0_to_h5i5 + r6a1_to_h5i5 + r6a2_to_h5i5 + r6a3_to_h5i5 <= 1 - r3_h5i6_redundant: r6a0_to_h5i6 + r6a1_to_h5i6 + r6a2_to_h5i6 + r6a3_to_h5i6 <= 1 - r3_h5i7_redundant: r6a0_to_h5i7 + r6a1_to_h5i7 + r6a2_to_h5i7 + r6a3_to_h5i7 <= 1 - r3_h5i8_redundant: r6a0_to_h5i8 + r6a1_to_h5i8 + r6a2_to_h5i8 + r6a3_to_h5i8 <= 1 - r3_h5i9_redundant: r6a0_to_h5i9 + r6a1_to_h5i9 + r6a2_to_h5i9 + r6a3_to_h5i9 <= 1 - r4_h0i0_redundant: r7a0_to_h0i0 + r7a1_to_h0i0 + r7a2_to_h0i0 <= 1 - r4_h0i1_redundant: r7a0_to_h0i1 + r7a1_to_h0i1 + r7a2_to_h0i1 <= 1 - r4_h0i2_redundant: r7a0_to_h0i2 + r7a1_to_h0i2 + r7a2_to_h0i2 <= 1 - r4_h0i3_redundant: r7a0_to_h0i3 + r7a1_to_h0i3 + r7a2_to_h0i3 <= 1 - r4_h0i4_redundant: r7a0_to_h0i4 + r7a1_to_h0i4 + r7a2_to_h0i4 <= 1 - r4_h0i5_redundant: r7a0_to_h0i5 + r7a1_to_h0i5 + r7a2_to_h0i5 <= 1 - r4_h0i6_redundant: r7a0_to_h0i6 + r7a1_to_h0i6 + r7a2_to_h0i6 <= 1 - r4_h0i7_redundant: r7a0_to_h0i7 + r7a1_to_h0i7 + r7a2_to_h0i7 <= 1 - r4_h0i8_redundant: r7a0_to_h0i8 + r7a1_to_h0i8 + r7a2_to_h0i8 <= 1 - r4_h0i9_redundant: r7a0_to_h0i9 + r7a1_to_h0i9 + r7a2_to_h0i9 <= 1 - r4_h1i0_redundant: r7a0_to_h1i0 + r7a1_to_h1i0 + r7a2_to_h1i0 <= 1 - r4_h1i1_redundant: r7a0_to_h1i1 + r7a1_to_h1i1 + r7a2_to_h1i1 <= 1 - r4_h1i2_redundant: r7a0_to_h1i2 + r7a1_to_h1i2 + r7a2_to_h1i2 <= 1 - r4_h1i3_redundant: r7a0_to_h1i3 + r7a1_to_h1i3 + r7a2_to_h1i3 <= 1 - r4_h1i4_redundant: r7a0_to_h1i4 + r7a1_to_h1i4 + r7a2_to_h1i4 <= 1 - r4_h1i5_redundant: r7a0_to_h1i5 + r7a1_to_h1i5 + r7a2_to_h1i5 <= 1 - r4_h1i6_redundant: r7a0_to_h1i6 + r7a1_to_h1i6 + r7a2_to_h1i6 <= 1 - r4_h1i7_redundant: r7a0_to_h1i7 + r7a1_to_h1i7 + r7a2_to_h1i7 <= 1 - r4_h1i8_redundant: r7a0_to_h1i8 + r7a1_to_h1i8 + r7a2_to_h1i8 <= 1 - r4_h1i9_redundant: r7a0_to_h1i9 + r7a1_to_h1i9 + r7a2_to_h1i9 <= 1 - r4_h2i0_redundant: r7a0_to_h2i0 + r7a1_to_h2i0 + r7a2_to_h2i0 <= 1 - r4_h2i1_redundant: r7a0_to_h2i1 + r7a1_to_h2i1 + r7a2_to_h2i1 <= 1 - r4_h2i2_redundant: r7a0_to_h2i2 + r7a1_to_h2i2 + r7a2_to_h2i2 <= 1 - r4_h2i3_redundant: r7a0_to_h2i3 + r7a1_to_h2i3 + r7a2_to_h2i3 <= 1 - r4_h2i4_redundant: r7a0_to_h2i4 + r7a1_to_h2i4 + r7a2_to_h2i4 <= 1 - r4_h2i5_redundant: r7a0_to_h2i5 + r7a1_to_h2i5 + r7a2_to_h2i5 <= 1 - r4_h2i6_redundant: r7a0_to_h2i6 + r7a1_to_h2i6 + r7a2_to_h2i6 <= 1 - r4_h2i7_redundant: r7a0_to_h2i7 + r7a1_to_h2i7 + r7a2_to_h2i7 <= 1 - r4_h2i8_redundant: r7a0_to_h2i8 + r7a1_to_h2i8 + r7a2_to_h2i8 <= 1 - r4_h2i9_redundant: r7a0_to_h2i9 + r7a1_to_h2i9 + r7a2_to_h2i9 <= 1 - r4_h3i0_redundant: r7a0_to_h3i0 + r7a1_to_h3i0 + r7a2_to_h3i0 <= 1 - r4_h3i1_redundant: r7a0_to_h3i1 + r7a1_to_h3i1 + r7a2_to_h3i1 <= 1 - r4_h3i2_redundant: r7a0_to_h3i2 + r7a1_to_h3i2 + r7a2_to_h3i2 <= 1 - r4_h3i3_redundant: r7a0_to_h3i3 + r7a1_to_h3i3 + r7a2_to_h3i3 <= 1 - r4_h3i4_redundant: r7a0_to_h3i4 + r7a1_to_h3i4 + r7a2_to_h3i4 <= 1 - r4_h3i5_redundant: r7a0_to_h3i5 + r7a1_to_h3i5 + r7a2_to_h3i5 <= 1 - r4_h3i6_redundant: r7a0_to_h3i6 + r7a1_to_h3i6 + r7a2_to_h3i6 <= 1 - r4_h3i7_redundant: r7a0_to_h3i7 + r7a1_to_h3i7 + r7a2_to_h3i7 <= 1 - r4_h3i8_redundant: r7a0_to_h3i8 + r7a1_to_h3i8 + r7a2_to_h3i8 <= 1 - r4_h3i9_redundant: r7a0_to_h3i9 + r7a1_to_h3i9 + r7a2_to_h3i9 <= 1 - r4_h4i0_redundant: r7a0_to_h4i0 + r7a1_to_h4i0 + r7a2_to_h4i0 <= 1 - r4_h4i1_redundant: r7a0_to_h4i1 + r7a1_to_h4i1 + r7a2_to_h4i1 <= 1 - r4_h4i2_redundant: r7a0_to_h4i2 + r7a1_to_h4i2 + r7a2_to_h4i2 <= 1 - r4_h4i3_redundant: r7a0_to_h4i3 + r7a1_to_h4i3 + r7a2_to_h4i3 <= 1 - r4_h4i4_redundant: r7a0_to_h4i4 + r7a1_to_h4i4 + r7a2_to_h4i4 <= 1 - r4_h4i5_redundant: r7a0_to_h4i5 + r7a1_to_h4i5 + r7a2_to_h4i5 <= 1 - r4_h4i6_redundant: r7a0_to_h4i6 + r7a1_to_h4i6 + r7a2_to_h4i6 <= 1 - r4_h4i7_redundant: r7a0_to_h4i7 + r7a1_to_h4i7 + r7a2_to_h4i7 <= 1 - r4_h4i8_redundant: r7a0_to_h4i8 + r7a1_to_h4i8 + r7a2_to_h4i8 <= 1 - r4_h4i9_redundant: r7a0_to_h4i9 + r7a1_to_h4i9 + r7a2_to_h4i9 <= 1 - r4_h5i0_redundant: r7a0_to_h5i0 + r7a1_to_h5i0 + r7a2_to_h5i0 <= 1 - r4_h5i1_redundant: r7a0_to_h5i1 + r7a1_to_h5i1 + r7a2_to_h5i1 <= 1 - r4_h5i2_redundant: r7a0_to_h5i2 + r7a1_to_h5i2 + r7a2_to_h5i2 <= 1 - r4_h5i3_redundant: r7a0_to_h5i3 + r7a1_to_h5i3 + r7a2_to_h5i3 <= 1 - r4_h5i4_redundant: r7a0_to_h5i4 + r7a1_to_h5i4 + r7a2_to_h5i4 <= 1 - r4_h5i5_redundant: r7a0_to_h5i5 + r7a1_to_h5i5 + r7a2_to_h5i5 <= 1 - r4_h5i6_redundant: r7a0_to_h5i6 + r7a1_to_h5i6 + r7a2_to_h5i6 <= 1 - r4_h5i7_redundant: r7a0_to_h5i7 + r7a1_to_h5i7 + r7a2_to_h5i7 <= 1 - r4_h5i8_redundant: r7a0_to_h5i8 + r7a1_to_h5i8 + r7a2_to_h5i8 <= 1 - r4_h5i9_redundant: r7a0_to_h5i9 + r7a1_to_h5i9 + r7a2_to_h5i9 <= 1 - h0i1_after_h0i0: h0i0_exists - h0i1_exists >= 0 - h0i2_after_h0i1: h0i1_exists - h0i2_exists >= 0 - h0i3_after_h0i2: h0i2_exists - h0i3_exists >= 0 - h0i4_after_h0i3: h0i3_exists - h0i4_exists >= 0 - h0i5_after_h0i4: h0i4_exists - h0i5_exists >= 0 - h0i6_after_h0i5: h0i5_exists - h0i6_exists >= 0 - h0i7_after_h0i6: h0i6_exists - h0i7_exists >= 0 - h0i8_after_h0i7: h0i7_exists - h0i8_exists >= 0 - h0i9_after_h0i8: h0i8_exists - h0i9_exists >= 0 - h1i1_after_h1i0: h1i0_exists - h1i1_exists >= 0 - h1i2_after_h1i1: h1i1_exists - h1i2_exists >= 0 - h1i3_after_h1i2: h1i2_exists - h1i3_exists >= 0 - h1i4_after_h1i3: h1i3_exists - h1i4_exists >= 0 - h1i5_after_h1i4: h1i4_exists - h1i5_exists >= 0 - h1i6_after_h1i5: h1i5_exists - h1i6_exists >= 0 - h1i7_after_h1i6: h1i6_exists - h1i7_exists >= 0 - h1i8_after_h1i7: h1i7_exists - h1i8_exists >= 0 - h1i9_after_h1i8: h1i8_exists - h1i9_exists >= 0 - h2i1_after_h2i0: h2i0_exists - h2i1_exists >= 0 - h2i2_after_h2i1: h2i1_exists - h2i2_exists >= 0 - h2i3_after_h2i2: h2i2_exists - h2i3_exists >= 0 - h2i4_after_h2i3: h2i3_exists - h2i4_exists >= 0 - h2i5_after_h2i4: h2i4_exists - h2i5_exists >= 0 - h2i6_after_h2i5: h2i5_exists - h2i6_exists >= 0 - h2i7_after_h2i6: h2i6_exists - h2i7_exists >= 0 - h2i8_after_h2i7: h2i7_exists - h2i8_exists >= 0 - h2i9_after_h2i8: h2i8_exists - h2i9_exists >= 0 - h3i1_after_h3i0: h3i0_exists - h3i1_exists >= 0 - h3i2_after_h3i1: h3i1_exists - h3i2_exists >= 0 - h3i3_after_h3i2: h3i2_exists - h3i3_exists >= 0 - h3i4_after_h3i3: h3i3_exists - h3i4_exists >= 0 - h3i5_after_h3i4: h3i4_exists - h3i5_exists >= 0 - h3i6_after_h3i5: h3i5_exists - h3i6_exists >= 0 - h3i7_after_h3i6: h3i6_exists - h3i7_exists >= 0 - h3i8_after_h3i7: h3i7_exists - h3i8_exists >= 0 - h3i9_after_h3i8: h3i8_exists - h3i9_exists >= 0 - h4i1_after_h4i0: h4i0_exists - h4i1_exists >= 0 - h4i2_after_h4i1: h4i1_exists - h4i2_exists >= 0 - h4i3_after_h4i2: h4i2_exists - h4i3_exists >= 0 - h4i4_after_h4i3: h4i3_exists - h4i4_exists >= 0 - h4i5_after_h4i4: h4i4_exists - h4i5_exists >= 0 - h4i6_after_h4i5: h4i5_exists - h4i6_exists >= 0 - h4i7_after_h4i6: h4i6_exists - h4i7_exists >= 0 - h4i8_after_h4i7: h4i7_exists - h4i8_exists >= 0 - h4i9_after_h4i8: h4i8_exists - h4i9_exists >= 0 - h5i1_after_h5i0: h5i0_exists - h5i1_exists >= 0 - h5i2_after_h5i1: h5i1_exists - h5i2_exists >= 0 - h5i3_after_h5i2: h5i2_exists - h5i3_exists >= 0 - h5i4_after_h5i3: h5i3_exists - h5i4_exists >= 0 - h5i5_after_h5i4: h5i4_exists - h5i5_exists >= 0 - h5i6_after_h5i5: h5i5_exists - h5i6_exists >= 0 - h5i7_after_h5i6: h5i6_exists - h5i7_exists >= 0 - h5i8_after_h5i7: h5i7_exists - h5i8_exists >= 0 - h5i9_after_h5i8: h5i8_exists - h5i9_exists >= 0 -Bounds - 0 <= h0i0_mem <= 1 - 0 <= h0i0_hdd <= 1 - 0 <= h0i1_mem <= 1 - 0 <= h0i1_hdd <= 1 - 0 <= h0i2_mem <= 1 - 0 <= h0i2_hdd <= 1 - 0 <= h0i3_mem <= 1 - 0 <= h0i3_hdd <= 1 - 0 <= h0i4_mem <= 1 - 0 <= h0i4_hdd <= 1 - 0 <= h0i5_mem <= 1 - 0 <= h0i5_hdd <= 1 - 0 <= h0i6_mem <= 1 - 0 <= h0i6_hdd <= 1 - 0 <= h0i7_mem <= 1 - 0 <= h0i7_hdd <= 1 - 0 <= h0i8_mem <= 1 - 0 <= h0i8_hdd <= 1 - 0 <= h0i9_mem <= 1 - 0 <= h0i9_hdd <= 1 - 0 <= h1i0_mem <= 1 - 0 <= h1i0_hdd <= 1 - 0 <= h1i1_mem <= 1 - 0 <= h1i1_hdd <= 1 - 0 <= h1i2_mem <= 1 - 0 <= h1i2_hdd <= 1 - 0 <= h1i3_mem <= 1 - 0 <= h1i3_hdd <= 1 - 0 <= h1i4_mem <= 1 - 0 <= h1i4_hdd <= 1 - 0 <= h1i5_mem <= 1 - 0 <= h1i5_hdd <= 1 - 0 <= h1i6_mem <= 1 - 0 <= h1i6_hdd <= 1 - 0 <= h1i7_mem <= 1 - 0 <= h1i7_hdd <= 1 - 0 <= h1i8_mem <= 1 - 0 <= h1i8_hdd <= 1 - 0 <= h1i9_mem <= 1 - 0 <= h1i9_hdd <= 1 - 0 <= h2i0_mem <= 1 - 0 <= h2i0_hdd <= 1 - 0 <= h2i1_mem <= 1 - 0 <= h2i1_hdd <= 1 - 0 <= h2i2_mem <= 1 - 0 <= h2i2_hdd <= 1 - 0 <= h2i3_mem <= 1 - 0 <= h2i3_hdd <= 1 - 0 <= h2i4_mem <= 1 - 0 <= h2i4_hdd <= 1 - 0 <= h2i5_mem <= 1 - 0 <= h2i5_hdd <= 1 - 0 <= h2i6_mem <= 1 - 0 <= h2i6_hdd <= 1 - 0 <= h2i7_mem <= 1 - 0 <= h2i7_hdd <= 1 - 0 <= h2i8_mem <= 1 - 0 <= h2i8_hdd <= 1 - 0 <= h2i9_mem <= 1 - 0 <= h2i9_hdd <= 1 - 0 <= h3i0_mem <= 1 - 0 <= h3i0_hdd <= 1 - 0 <= h3i1_mem <= 1 - 0 <= h3i1_hdd <= 1 - 0 <= h3i2_mem <= 1 - 0 <= h3i2_hdd <= 1 - 0 <= h3i3_mem <= 1 - 0 <= h3i3_hdd <= 1 - 0 <= h3i4_mem <= 1 - 0 <= h3i4_hdd <= 1 - 0 <= h3i5_mem <= 1 - 0 <= h3i5_hdd <= 1 - 0 <= h3i6_mem <= 1 - 0 <= h3i6_hdd <= 1 - 0 <= h3i7_mem <= 1 - 0 <= h3i7_hdd <= 1 - 0 <= h3i8_mem <= 1 - 0 <= h3i8_hdd <= 1 - 0 <= h3i9_mem <= 1 - 0 <= h3i9_hdd <= 1 - 0 <= h4i0_mem <= 1 - 0 <= h4i0_hdd <= 1 - 0 <= h4i1_mem <= 1 - 0 <= h4i1_hdd <= 1 - 0 <= h4i2_mem <= 1 - 0 <= h4i2_hdd <= 1 - 0 <= h4i3_mem <= 1 - 0 <= h4i3_hdd <= 1 - 0 <= h4i4_mem <= 1 - 0 <= h4i4_hdd <= 1 - 0 <= h4i5_mem <= 1 - 0 <= h4i5_hdd <= 1 - 0 <= h4i6_mem <= 1 - 0 <= h4i6_hdd <= 1 - 0 <= h4i7_mem <= 1 - 0 <= h4i7_hdd <= 1 - 0 <= h4i8_mem <= 1 - 0 <= h4i8_hdd <= 1 - 0 <= h4i9_mem <= 1 - 0 <= h4i9_hdd <= 1 - 0 <= h5i0_mem <= 1 - 0 <= h5i0_hdd <= 1 - 0 <= h5i1_mem <= 1 - 0 <= h5i1_hdd <= 1 - 0 <= h5i2_mem <= 1 - 0 <= h5i2_hdd <= 1 - 0 <= h5i3_mem <= 1 - 0 <= h5i3_hdd <= 1 - 0 <= h5i4_mem <= 1 - 0 <= h5i4_hdd <= 1 - 0 <= h5i5_mem <= 1 - 0 <= h5i5_hdd <= 1 - 0 <= h5i6_mem <= 1 - 0 <= h5i6_hdd <= 1 - 0 <= h5i7_mem <= 1 - 0 <= h5i7_hdd <= 1 - 0 <= h5i8_mem <= 1 - 0 <= h5i8_hdd <= 1 - 0 <= h5i9_mem <= 1 - 0 <= h5i9_hdd <= 1 -Binary - h0i0_exists - h0i1_exists - h0i2_exists - h0i3_exists - h0i4_exists - h0i5_exists - h0i6_exists - h0i7_exists - h0i8_exists - h0i9_exists - h1i0_exists - h1i1_exists - h1i2_exists - h1i3_exists - h1i4_exists - h1i5_exists - h1i6_exists - h1i7_exists - h1i8_exists - h1i9_exists - h2i0_exists - h2i1_exists - h2i2_exists - h2i3_exists - h2i4_exists - h2i5_exists - h2i6_exists - h2i7_exists - h2i8_exists - h2i9_exists - h3i0_exists - h3i1_exists - h3i2_exists - h3i3_exists - h3i4_exists - h3i5_exists - h3i6_exists - h3i7_exists - h3i8_exists - h3i9_exists - h4i0_exists - h4i1_exists - h4i2_exists - h4i3_exists - h4i4_exists - h4i5_exists - h4i6_exists - h4i7_exists - h4i8_exists - h4i9_exists - h5i0_exists - h5i1_exists - h5i2_exists - h5i3_exists - h5i4_exists - h5i5_exists - h5i6_exists - h5i7_exists - h5i8_exists - h5i9_exists - r0a0_to_h4i0 - r0a0_to_h4i1 - r0a0_to_h4i2 - r0a0_to_h4i3 - r0a0_to_h4i4 - r0a0_to_h4i5 - r0a0_to_h4i6 - r0a0_to_h4i7 - r0a0_to_h4i8 - r0a0_to_h4i9 - r0a0_to_h5i0 - r0a0_to_h5i1 - r0a0_to_h5i2 - r0a0_to_h5i3 - r0a0_to_h5i4 - r0a0_to_h5i5 - r0a0_to_h5i6 - r0a0_to_h5i7 - r0a0_to_h5i8 - r0a0_to_h5i9 - r0a1_to_h4i0 - r0a1_to_h4i1 - r0a1_to_h4i2 - r0a1_to_h4i3 - r0a1_to_h4i4 - r0a1_to_h4i5 - r0a1_to_h4i6 - r0a1_to_h4i7 - r0a1_to_h4i8 - r0a1_to_h4i9 - r0a1_to_h5i0 - r0a1_to_h5i1 - r0a1_to_h5i2 - r0a1_to_h5i3 - r0a1_to_h5i4 - r0a1_to_h5i5 - r0a1_to_h5i6 - r0a1_to_h5i7 - r0a1_to_h5i8 - r0a1_to_h5i9 - r0a2_to_h4i0 - r0a2_to_h4i1 - r0a2_to_h4i2 - r0a2_to_h4i3 - r0a2_to_h4i4 - r0a2_to_h4i5 - r0a2_to_h4i6 - r0a2_to_h4i7 - r0a2_to_h4i8 - r0a2_to_h4i9 - r0a2_to_h5i0 - r0a2_to_h5i1 - r0a2_to_h5i2 - r0a2_to_h5i3 - r0a2_to_h5i4 - r0a2_to_h5i5 - r0a2_to_h5i6 - r0a2_to_h5i7 - r0a2_to_h5i8 - r0a2_to_h5i9 - r0a3_to_h4i0 - r0a3_to_h4i1 - r0a3_to_h4i2 - r0a3_to_h4i3 - r0a3_to_h4i4 - r0a3_to_h4i5 - r0a3_to_h4i6 - r0a3_to_h4i7 - r0a3_to_h4i8 - r0a3_to_h4i9 - r0a3_to_h5i0 - r0a3_to_h5i1 - r0a3_to_h5i2 - r0a3_to_h5i3 - r0a3_to_h5i4 - r0a3_to_h5i5 - r0a3_to_h5i6 - r0a3_to_h5i7 - r0a3_to_h5i8 - r0a3_to_h5i9 - r1a0_to_h0i0 - r1a0_to_h0i1 - r1a0_to_h0i2 - r1a0_to_h0i3 - r1a0_to_h0i4 - r1a0_to_h0i5 - r1a0_to_h0i6 - r1a0_to_h0i7 - r1a0_to_h0i8 - r1a0_to_h0i9 - r1a0_to_h1i0 - r1a0_to_h1i1 - r1a0_to_h1i2 - r1a0_to_h1i3 - r1a0_to_h1i4 - r1a0_to_h1i5 - r1a0_to_h1i6 - r1a0_to_h1i7 - r1a0_to_h1i8 - r1a0_to_h1i9 - r1a0_to_h2i0 - r1a0_to_h2i1 - r1a0_to_h2i2 - r1a0_to_h2i3 - r1a0_to_h2i4 - r1a0_to_h2i5 - r1a0_to_h2i6 - r1a0_to_h2i7 - r1a0_to_h2i8 - r1a0_to_h2i9 - r1a0_to_h3i0 - r1a0_to_h3i1 - r1a0_to_h3i2 - r1a0_to_h3i3 - r1a0_to_h3i4 - r1a0_to_h3i5 - r1a0_to_h3i6 - r1a0_to_h3i7 - r1a0_to_h3i8 - r1a0_to_h3i9 - r1a0_to_h4i0 - r1a0_to_h4i1 - r1a0_to_h4i2 - r1a0_to_h4i3 - r1a0_to_h4i4 - r1a0_to_h4i5 - r1a0_to_h4i6 - r1a0_to_h4i7 - r1a0_to_h4i8 - r1a0_to_h4i9 - r1a0_to_h5i0 - r1a0_to_h5i1 - r1a0_to_h5i2 - r1a0_to_h5i3 - r1a0_to_h5i4 - r1a0_to_h5i5 - r1a0_to_h5i6 - r1a0_to_h5i7 - r1a0_to_h5i8 - r1a0_to_h5i9 - r1a1_to_h0i0 - r1a1_to_h0i1 - r1a1_to_h0i2 - r1a1_to_h0i3 - r1a1_to_h0i4 - r1a1_to_h0i5 - r1a1_to_h0i6 - r1a1_to_h0i7 - r1a1_to_h0i8 - r1a1_to_h0i9 - r1a1_to_h1i0 - r1a1_to_h1i1 - r1a1_to_h1i2 - r1a1_to_h1i3 - r1a1_to_h1i4 - r1a1_to_h1i5 - r1a1_to_h1i6 - r1a1_to_h1i7 - r1a1_to_h1i8 - r1a1_to_h1i9 - r1a1_to_h2i0 - r1a1_to_h2i1 - r1a1_to_h2i2 - r1a1_to_h2i3 - r1a1_to_h2i4 - r1a1_to_h2i5 - r1a1_to_h2i6 - r1a1_to_h2i7 - r1a1_to_h2i8 - r1a1_to_h2i9 - r1a1_to_h3i0 - r1a1_to_h3i1 - r1a1_to_h3i2 - r1a1_to_h3i3 - r1a1_to_h3i4 - r1a1_to_h3i5 - r1a1_to_h3i6 - r1a1_to_h3i7 - r1a1_to_h3i8 - r1a1_to_h3i9 - r1a1_to_h4i0 - r1a1_to_h4i1 - r1a1_to_h4i2 - r1a1_to_h4i3 - r1a1_to_h4i4 - r1a1_to_h4i5 - r1a1_to_h4i6 - r1a1_to_h4i7 - r1a1_to_h4i8 - r1a1_to_h4i9 - r1a1_to_h5i0 - r1a1_to_h5i1 - r1a1_to_h5i2 - r1a1_to_h5i3 - r1a1_to_h5i4 - r1a1_to_h5i5 - r1a1_to_h5i6 - r1a1_to_h5i7 - r1a1_to_h5i8 - r1a1_to_h5i9 - r1a2_to_h0i0 - r1a2_to_h0i1 - r1a2_to_h0i2 - r1a2_to_h0i3 - r1a2_to_h0i4 - r1a2_to_h0i5 - r1a2_to_h0i6 - r1a2_to_h0i7 - r1a2_to_h0i8 - r1a2_to_h0i9 - r1a2_to_h1i0 - r1a2_to_h1i1 - r1a2_to_h1i2 - r1a2_to_h1i3 - r1a2_to_h1i4 - r1a2_to_h1i5 - r1a2_to_h1i6 - r1a2_to_h1i7 - r1a2_to_h1i8 - r1a2_to_h1i9 - r1a2_to_h2i0 - r1a2_to_h2i1 - r1a2_to_h2i2 - r1a2_to_h2i3 - r1a2_to_h2i4 - r1a2_to_h2i5 - r1a2_to_h2i6 - r1a2_to_h2i7 - r1a2_to_h2i8 - r1a2_to_h2i9 - r1a2_to_h3i0 - r1a2_to_h3i1 - r1a2_to_h3i2 - r1a2_to_h3i3 - r1a2_to_h3i4 - r1a2_to_h3i5 - r1a2_to_h3i6 - r1a2_to_h3i7 - r1a2_to_h3i8 - r1a2_to_h3i9 - r1a2_to_h4i0 - r1a2_to_h4i1 - r1a2_to_h4i2 - r1a2_to_h4i3 - r1a2_to_h4i4 - r1a2_to_h4i5 - r1a2_to_h4i6 - r1a2_to_h4i7 - r1a2_to_h4i8 - r1a2_to_h4i9 - r1a2_to_h5i0 - r1a2_to_h5i1 - r1a2_to_h5i2 - r1a2_to_h5i3 - r1a2_to_h5i4 - r1a2_to_h5i5 - r1a2_to_h5i6 - r1a2_to_h5i7 - r1a2_to_h5i8 - r1a2_to_h5i9 - r2a0_to_h0i0 - r2a0_to_h0i1 - r2a0_to_h0i2 - r2a0_to_h0i3 - r2a0_to_h0i4 - r2a0_to_h0i5 - r2a0_to_h0i6 - r2a0_to_h0i7 - r2a0_to_h0i8 - r2a0_to_h0i9 - r2a0_to_h1i0 - r2a0_to_h1i1 - r2a0_to_h1i2 - r2a0_to_h1i3 - r2a0_to_h1i4 - r2a0_to_h1i5 - r2a0_to_h1i6 - r2a0_to_h1i7 - r2a0_to_h1i8 - r2a0_to_h1i9 - r2a0_to_h2i0 - r2a0_to_h2i1 - r2a0_to_h2i2 - r2a0_to_h2i3 - r2a0_to_h2i4 - r2a0_to_h2i5 - r2a0_to_h2i6 - r2a0_to_h2i7 - r2a0_to_h2i8 - r2a0_to_h2i9 - r2a0_to_h3i0 - r2a0_to_h3i1 - r2a0_to_h3i2 - r2a0_to_h3i3 - r2a0_to_h3i4 - r2a0_to_h3i5 - r2a0_to_h3i6 - r2a0_to_h3i7 - r2a0_to_h3i8 - r2a0_to_h3i9 - r2a0_to_h4i0 - r2a0_to_h4i1 - r2a0_to_h4i2 - r2a0_to_h4i3 - r2a0_to_h4i4 - r2a0_to_h4i5 - r2a0_to_h4i6 - r2a0_to_h4i7 - r2a0_to_h4i8 - r2a0_to_h4i9 - r2a0_to_h5i0 - r2a0_to_h5i1 - r2a0_to_h5i2 - r2a0_to_h5i3 - r2a0_to_h5i4 - r2a0_to_h5i5 - r2a0_to_h5i6 - r2a0_to_h5i7 - r2a0_to_h5i8 - r2a0_to_h5i9 - r3a0_to_h0i0 - r3a0_to_h0i1 - r3a0_to_h0i2 - r3a0_to_h0i3 - r3a0_to_h0i4 - r3a0_to_h0i5 - r3a0_to_h0i6 - r3a0_to_h0i7 - r3a0_to_h0i8 - r3a0_to_h0i9 - r3a0_to_h1i0 - r3a0_to_h1i1 - r3a0_to_h1i2 - r3a0_to_h1i3 - r3a0_to_h1i4 - r3a0_to_h1i5 - r3a0_to_h1i6 - r3a0_to_h1i7 - r3a0_to_h1i8 - r3a0_to_h1i9 - r3a0_to_h2i0 - r3a0_to_h2i1 - r3a0_to_h2i2 - r3a0_to_h2i3 - r3a0_to_h2i4 - r3a0_to_h2i5 - r3a0_to_h2i6 - r3a0_to_h2i7 - r3a0_to_h2i8 - r3a0_to_h2i9 - r3a0_to_h3i0 - r3a0_to_h3i1 - r3a0_to_h3i2 - r3a0_to_h3i3 - r3a0_to_h3i4 - r3a0_to_h3i5 - r3a0_to_h3i6 - r3a0_to_h3i7 - r3a0_to_h3i8 - r3a0_to_h3i9 - r3a0_to_h4i0 - r3a0_to_h4i1 - r3a0_to_h4i2 - r3a0_to_h4i3 - r3a0_to_h4i4 - r3a0_to_h4i5 - r3a0_to_h4i6 - r3a0_to_h4i7 - r3a0_to_h4i8 - r3a0_to_h4i9 - r3a0_to_h5i0 - r3a0_to_h5i1 - r3a0_to_h5i2 - r3a0_to_h5i3 - r3a0_to_h5i4 - r3a0_to_h5i5 - r3a0_to_h5i6 - r3a0_to_h5i7 - r3a0_to_h5i8 - r3a0_to_h5i9 - r4a0_to_h4i0 - r4a0_to_h4i1 - r4a0_to_h4i2 - r4a0_to_h4i3 - r4a0_to_h4i4 - r4a0_to_h4i5 - r4a0_to_h4i6 - r4a0_to_h4i7 - r4a0_to_h4i8 - r4a0_to_h4i9 - r4a0_to_h5i0 - r4a0_to_h5i1 - r4a0_to_h5i2 - r4a0_to_h5i3 - r4a0_to_h5i4 - r4a0_to_h5i5 - r4a0_to_h5i6 - r4a0_to_h5i7 - r4a0_to_h5i8 - r4a0_to_h5i9 - r4a1_to_h4i0 - r4a1_to_h4i1 - r4a1_to_h4i2 - r4a1_to_h4i3 - r4a1_to_h4i4 - r4a1_to_h4i5 - r4a1_to_h4i6 - r4a1_to_h4i7 - r4a1_to_h4i8 - r4a1_to_h4i9 - r4a1_to_h5i0 - r4a1_to_h5i1 - r4a1_to_h5i2 - r4a1_to_h5i3 - r4a1_to_h5i4 - r4a1_to_h5i5 - r4a1_to_h5i6 - r4a1_to_h5i7 - r4a1_to_h5i8 - r4a1_to_h5i9 - r4a2_to_h4i0 - r4a2_to_h4i1 - r4a2_to_h4i2 - r4a2_to_h4i3 - r4a2_to_h4i4 - r4a2_to_h4i5 - r4a2_to_h4i6 - r4a2_to_h4i7 - r4a2_to_h4i8 - r4a2_to_h4i9 - r4a2_to_h5i0 - r4a2_to_h5i1 - r4a2_to_h5i2 - r4a2_to_h5i3 - r4a2_to_h5i4 - r4a2_to_h5i5 - r4a2_to_h5i6 - r4a2_to_h5i7 - r4a2_to_h5i8 - r4a2_to_h5i9 - r4a3_to_h4i0 - r4a3_to_h4i1 - r4a3_to_h4i2 - r4a3_to_h4i3 - r4a3_to_h4i4 - r4a3_to_h4i5 - r4a3_to_h4i6 - r4a3_to_h4i7 - r4a3_to_h4i8 - r4a3_to_h4i9 - r4a3_to_h5i0 - r4a3_to_h5i1 - r4a3_to_h5i2 - r4a3_to_h5i3 - r4a3_to_h5i4 - r4a3_to_h5i5 - r4a3_to_h5i6 - r4a3_to_h5i7 - r4a3_to_h5i8 - r4a3_to_h5i9 - r5a0_to_h0i0 - r5a0_to_h0i1 - r5a0_to_h0i2 - r5a0_to_h0i3 - r5a0_to_h0i4 - r5a0_to_h0i5 - r5a0_to_h0i6 - r5a0_to_h0i7 - r5a0_to_h0i8 - r5a0_to_h0i9 - r5a0_to_h1i0 - r5a0_to_h1i1 - r5a0_to_h1i2 - r5a0_to_h1i3 - r5a0_to_h1i4 - r5a0_to_h1i5 - r5a0_to_h1i6 - r5a0_to_h1i7 - r5a0_to_h1i8 - r5a0_to_h1i9 - r5a0_to_h2i0 - r5a0_to_h2i1 - r5a0_to_h2i2 - r5a0_to_h2i3 - r5a0_to_h2i4 - r5a0_to_h2i5 - r5a0_to_h2i6 - r5a0_to_h2i7 - r5a0_to_h2i8 - r5a0_to_h2i9 - r5a0_to_h3i0 - r5a0_to_h3i1 - r5a0_to_h3i2 - r5a0_to_h3i3 - r5a0_to_h3i4 - r5a0_to_h3i5 - r5a0_to_h3i6 - r5a0_to_h3i7 - r5a0_to_h3i8 - r5a0_to_h3i9 - r5a0_to_h4i0 - r5a0_to_h4i1 - r5a0_to_h4i2 - r5a0_to_h4i3 - r5a0_to_h4i4 - r5a0_to_h4i5 - r5a0_to_h4i6 - r5a0_to_h4i7 - r5a0_to_h4i8 - r5a0_to_h4i9 - r5a0_to_h5i0 - r5a0_to_h5i1 - r5a0_to_h5i2 - r5a0_to_h5i3 - r5a0_to_h5i4 - r5a0_to_h5i5 - r5a0_to_h5i6 - r5a0_to_h5i7 - r5a0_to_h5i8 - r5a0_to_h5i9 - r6a0_to_h0i0 - r6a0_to_h0i1 - r6a0_to_h0i2 - r6a0_to_h0i3 - r6a0_to_h0i4 - r6a0_to_h0i5 - r6a0_to_h0i6 - r6a0_to_h0i7 - r6a0_to_h0i8 - r6a0_to_h0i9 - r6a0_to_h1i0 - r6a0_to_h1i1 - r6a0_to_h1i2 - r6a0_to_h1i3 - r6a0_to_h1i4 - r6a0_to_h1i5 - r6a0_to_h1i6 - r6a0_to_h1i7 - r6a0_to_h1i8 - r6a0_to_h1i9 - r6a0_to_h2i0 - r6a0_to_h2i1 - r6a0_to_h2i2 - r6a0_to_h2i3 - r6a0_to_h2i4 - r6a0_to_h2i5 - r6a0_to_h2i6 - r6a0_to_h2i7 - r6a0_to_h2i8 - r6a0_to_h2i9 - r6a0_to_h3i0 - r6a0_to_h3i1 - r6a0_to_h3i2 - r6a0_to_h3i3 - r6a0_to_h3i4 - r6a0_to_h3i5 - r6a0_to_h3i6 - r6a0_to_h3i7 - r6a0_to_h3i8 - r6a0_to_h3i9 - r6a0_to_h4i0 - r6a0_to_h4i1 - r6a0_to_h4i2 - r6a0_to_h4i3 - r6a0_to_h4i4 - r6a0_to_h4i5 - r6a0_to_h4i6 - r6a0_to_h4i7 - r6a0_to_h4i8 - r6a0_to_h4i9 - r6a0_to_h5i0 - r6a0_to_h5i1 - r6a0_to_h5i2 - r6a0_to_h5i3 - r6a0_to_h5i4 - r6a0_to_h5i5 - r6a0_to_h5i6 - r6a0_to_h5i7 - r6a0_to_h5i8 - r6a0_to_h5i9 - r6a1_to_h0i0 - r6a1_to_h0i1 - r6a1_to_h0i2 - r6a1_to_h0i3 - r6a1_to_h0i4 - r6a1_to_h0i5 - r6a1_to_h0i6 - r6a1_to_h0i7 - r6a1_to_h0i8 - r6a1_to_h0i9 - r6a1_to_h1i0 - r6a1_to_h1i1 - r6a1_to_h1i2 - r6a1_to_h1i3 - r6a1_to_h1i4 - r6a1_to_h1i5 - r6a1_to_h1i6 - r6a1_to_h1i7 - r6a1_to_h1i8 - r6a1_to_h1i9 - r6a1_to_h2i0 - r6a1_to_h2i1 - r6a1_to_h2i2 - r6a1_to_h2i3 - r6a1_to_h2i4 - r6a1_to_h2i5 - r6a1_to_h2i6 - r6a1_to_h2i7 - r6a1_to_h2i8 - r6a1_to_h2i9 - r6a1_to_h3i0 - r6a1_to_h3i1 - r6a1_to_h3i2 - r6a1_to_h3i3 - r6a1_to_h3i4 - r6a1_to_h3i5 - r6a1_to_h3i6 - r6a1_to_h3i7 - r6a1_to_h3i8 - r6a1_to_h3i9 - r6a1_to_h4i0 - r6a1_to_h4i1 - r6a1_to_h4i2 - r6a1_to_h4i3 - r6a1_to_h4i4 - r6a1_to_h4i5 - r6a1_to_h4i6 - r6a1_to_h4i7 - r6a1_to_h4i8 - r6a1_to_h4i9 - r6a1_to_h5i0 - r6a1_to_h5i1 - r6a1_to_h5i2 - r6a1_to_h5i3 - r6a1_to_h5i4 - r6a1_to_h5i5 - r6a1_to_h5i6 - r6a1_to_h5i7 - r6a1_to_h5i8 - r6a1_to_h5i9 - r6a2_to_h0i0 - r6a2_to_h0i1 - r6a2_to_h0i2 - r6a2_to_h0i3 - r6a2_to_h0i4 - r6a2_to_h0i5 - r6a2_to_h0i6 - r6a2_to_h0i7 - r6a2_to_h0i8 - r6a2_to_h0i9 - r6a2_to_h1i0 - r6a2_to_h1i1 - r6a2_to_h1i2 - r6a2_to_h1i3 - r6a2_to_h1i4 - r6a2_to_h1i5 - r6a2_to_h1i6 - r6a2_to_h1i7 - r6a2_to_h1i8 - r6a2_to_h1i9 - r6a2_to_h2i0 - r6a2_to_h2i1 - r6a2_to_h2i2 - r6a2_to_h2i3 - r6a2_to_h2i4 - r6a2_to_h2i5 - r6a2_to_h2i6 - r6a2_to_h2i7 - r6a2_to_h2i8 - r6a2_to_h2i9 - r6a2_to_h3i0 - r6a2_to_h3i1 - r6a2_to_h3i2 - r6a2_to_h3i3 - r6a2_to_h3i4 - r6a2_to_h3i5 - r6a2_to_h3i6 - r6a2_to_h3i7 - r6a2_to_h3i8 - r6a2_to_h3i9 - r6a2_to_h4i0 - r6a2_to_h4i1 - r6a2_to_h4i2 - r6a2_to_h4i3 - r6a2_to_h4i4 - r6a2_to_h4i5 - r6a2_to_h4i6 - r6a2_to_h4i7 - r6a2_to_h4i8 - r6a2_to_h4i9 - r6a2_to_h5i0 - r6a2_to_h5i1 - r6a2_to_h5i2 - r6a2_to_h5i3 - r6a2_to_h5i4 - r6a2_to_h5i5 - r6a2_to_h5i6 - r6a2_to_h5i7 - r6a2_to_h5i8 - r6a2_to_h5i9 - r6a3_to_h0i0 - r6a3_to_h0i1 - r6a3_to_h0i2 - r6a3_to_h0i3 - r6a3_to_h0i4 - r6a3_to_h0i5 - r6a3_to_h0i6 - r6a3_to_h0i7 - r6a3_to_h0i8 - r6a3_to_h0i9 - r6a3_to_h1i0 - r6a3_to_h1i1 - r6a3_to_h1i2 - r6a3_to_h1i3 - r6a3_to_h1i4 - r6a3_to_h1i5 - r6a3_to_h1i6 - r6a3_to_h1i7 - r6a3_to_h1i8 - r6a3_to_h1i9 - r6a3_to_h2i0 - r6a3_to_h2i1 - r6a3_to_h2i2 - r6a3_to_h2i3 - r6a3_to_h2i4 - r6a3_to_h2i5 - r6a3_to_h2i6 - r6a3_to_h2i7 - r6a3_to_h2i8 - r6a3_to_h2i9 - r6a3_to_h3i0 - r6a3_to_h3i1 - r6a3_to_h3i2 - r6a3_to_h3i3 - r6a3_to_h3i4 - r6a3_to_h3i5 - r6a3_to_h3i6 - r6a3_to_h3i7 - r6a3_to_h3i8 - r6a3_to_h3i9 - r6a3_to_h4i0 - r6a3_to_h4i1 - r6a3_to_h4i2 - r6a3_to_h4i3 - r6a3_to_h4i4 - r6a3_to_h4i5 - r6a3_to_h4i6 - r6a3_to_h4i7 - r6a3_to_h4i8 - r6a3_to_h4i9 - r6a3_to_h5i0 - r6a3_to_h5i1 - r6a3_to_h5i2 - r6a3_to_h5i3 - r6a3_to_h5i4 - r6a3_to_h5i5 - r6a3_to_h5i6 - r6a3_to_h5i7 - r6a3_to_h5i8 - r6a3_to_h5i9 - r7a0_to_h0i0 - r7a0_to_h0i1 - r7a0_to_h0i2 - r7a0_to_h0i3 - r7a0_to_h0i4 - r7a0_to_h0i5 - r7a0_to_h0i6 - r7a0_to_h0i7 - r7a0_to_h0i8 - r7a0_to_h0i9 - r7a0_to_h1i0 - r7a0_to_h1i1 - r7a0_to_h1i2 - r7a0_to_h1i3 - r7a0_to_h1i4 - r7a0_to_h1i5 - r7a0_to_h1i6 - r7a0_to_h1i7 - r7a0_to_h1i8 - r7a0_to_h1i9 - r7a0_to_h2i0 - r7a0_to_h2i1 - r7a0_to_h2i2 - r7a0_to_h2i3 - r7a0_to_h2i4 - r7a0_to_h2i5 - r7a0_to_h2i6 - r7a0_to_h2i7 - r7a0_to_h2i8 - r7a0_to_h2i9 - r7a0_to_h3i0 - r7a0_to_h3i1 - r7a0_to_h3i2 - r7a0_to_h3i3 - r7a0_to_h3i4 - r7a0_to_h3i5 - r7a0_to_h3i6 - r7a0_to_h3i7 - r7a0_to_h3i8 - r7a0_to_h3i9 - r7a0_to_h4i0 - r7a0_to_h4i1 - r7a0_to_h4i2 - r7a0_to_h4i3 - r7a0_to_h4i4 - r7a0_to_h4i5 - r7a0_to_h4i6 - r7a0_to_h4i7 - r7a0_to_h4i8 - r7a0_to_h4i9 - r7a0_to_h5i0 - r7a0_to_h5i1 - r7a0_to_h5i2 - r7a0_to_h5i3 - r7a0_to_h5i4 - r7a0_to_h5i5 - r7a0_to_h5i6 - r7a0_to_h5i7 - r7a0_to_h5i8 - r7a0_to_h5i9 - r7a1_to_h0i0 - r7a1_to_h0i1 - r7a1_to_h0i2 - r7a1_to_h0i3 - r7a1_to_h0i4 - r7a1_to_h0i5 - r7a1_to_h0i6 - r7a1_to_h0i7 - r7a1_to_h0i8 - r7a1_to_h0i9 - r7a1_to_h1i0 - r7a1_to_h1i1 - r7a1_to_h1i2 - r7a1_to_h1i3 - r7a1_to_h1i4 - r7a1_to_h1i5 - r7a1_to_h1i6 - r7a1_to_h1i7 - r7a1_to_h1i8 - r7a1_to_h1i9 - r7a1_to_h2i0 - r7a1_to_h2i1 - r7a1_to_h2i2 - r7a1_to_h2i3 - r7a1_to_h2i4 - r7a1_to_h2i5 - r7a1_to_h2i6 - r7a1_to_h2i7 - r7a1_to_h2i8 - r7a1_to_h2i9 - r7a1_to_h3i0 - r7a1_to_h3i1 - r7a1_to_h3i2 - r7a1_to_h3i3 - r7a1_to_h3i4 - r7a1_to_h3i5 - r7a1_to_h3i6 - r7a1_to_h3i7 - r7a1_to_h3i8 - r7a1_to_h3i9 - r7a1_to_h4i0 - r7a1_to_h4i1 - r7a1_to_h4i2 - r7a1_to_h4i3 - r7a1_to_h4i4 - r7a1_to_h4i5 - r7a1_to_h4i6 - r7a1_to_h4i7 - r7a1_to_h4i8 - r7a1_to_h4i9 - r7a1_to_h5i0 - r7a1_to_h5i1 - r7a1_to_h5i2 - r7a1_to_h5i3 - r7a1_to_h5i4 - r7a1_to_h5i5 - r7a1_to_h5i6 - r7a1_to_h5i7 - r7a1_to_h5i8 - r7a1_to_h5i9 - r7a2_to_h0i0 - r7a2_to_h0i1 - r7a2_to_h0i2 - r7a2_to_h0i3 - r7a2_to_h0i4 - r7a2_to_h0i5 - r7a2_to_h0i6 - r7a2_to_h0i7 - r7a2_to_h0i8 - r7a2_to_h0i9 - r7a2_to_h1i0 - r7a2_to_h1i1 - r7a2_to_h1i2 - r7a2_to_h1i3 - r7a2_to_h1i4 - r7a2_to_h1i5 - r7a2_to_h1i6 - r7a2_to_h1i7 - r7a2_to_h1i8 - r7a2_to_h1i9 - r7a2_to_h2i0 - r7a2_to_h2i1 - r7a2_to_h2i2 - r7a2_to_h2i3 - r7a2_to_h2i4 - r7a2_to_h2i5 - r7a2_to_h2i6 - r7a2_to_h2i7 - r7a2_to_h2i8 - r7a2_to_h2i9 - r7a2_to_h3i0 - r7a2_to_h3i1 - r7a2_to_h3i2 - r7a2_to_h3i3 - r7a2_to_h3i4 - r7a2_to_h3i5 - r7a2_to_h3i6 - r7a2_to_h3i7 - r7a2_to_h3i8 - r7a2_to_h3i9 - r7a2_to_h4i0 - r7a2_to_h4i1 - r7a2_to_h4i2 - r7a2_to_h4i3 - r7a2_to_h4i4 - r7a2_to_h4i5 - r7a2_to_h4i6 - r7a2_to_h4i7 - r7a2_to_h4i8 - r7a2_to_h4i9 - r7a2_to_h5i0 - r7a2_to_h5i1 - r7a2_to_h5i2 - r7a2_to_h5i3 - r7a2_to_h5i4 - r7a2_to_h5i5 - r7a2_to_h5i6 - r7a2_to_h5i7 - r7a2_to_h5i8 - r7a2_to_h5i9 -End diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.xmi deleted file mode 100644 index 913039b2..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/problem.xmi +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/solution.txt b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/solution.txt deleted file mode 100644 index 847b84c9..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/solution.txt +++ /dev/null @@ -1,55 +0,0 @@ -Optimal - objective value 25.00000000 - 0 h0i0_exists 1 2 - 1 h0i1_exists 1 2 - 2 h0i2_exists 1 2 - 20 h2i0_exists 1 3 - 40 h4i0_exists 1 2 - 41 h4i1_exists 1 2 - 42 h4i2_exists 1 2 - 43 h4i3_exists 1 2 - 44 h4i4_exists 1 2 - 45 h4i5_exists 1 2 - 50 h5i0_exists 1 4 - 64 r0a0_to_h4i4 1 0 - 85 r0a1_to_h4i5 1 0 - 110 r0a2_to_h5i0 1 0 - 122 r0a3_to_h4i2 1 0 - 160 r1a0_to_h2i0 1 0 - 200 r1a1_to_h0i0 1 0 - 262 r1a2_to_h0i2 1 0 - 340 r2a0_to_h2i0 1 0 - 400 r3a0_to_h2i0 1 0 - 450 r4a0_to_h5i0 1 0 - 463 r4a1_to_h4i3 1 0 - 481 r4a2_to_h4i1 1 0 - 500 r4a3_to_h4i0 1 0 - 540 r5a0_to_h2i0 1 0 - 580 r6a0_to_h0i0 1 0 - 660 r6a1_to_h2i0 1 0 - 702 r6a2_to_h0i2 1 0 - 761 r6a3_to_h0i1 1 0 - 821 r7a0_to_h0i1 1 0 - 880 r7a1_to_h0i0 1 0 - 942 r7a2_to_h0i2 1 0 - 1000 h0i0_mem 1 0 - 1001 h0i0_hdd 0.34666667 0 - 1002 h0i1_mem 0.75 0 - 1003 h0i1_hdd 0.29333333 0 - 1004 h0i2_mem 1 0 - 1005 h0i2_hdd 0.34666667 0 - 1040 h2i0_mem 0.8125 0 - 1041 h2i0_hdd 0.46666667 0 - 1080 h4i0_mem 1 0 - 1081 h4i0_hdd 0.58 0 - 1082 h4i1_mem 1 0 - 1083 h4i1_hdd 0.58 0 - 1084 h4i2_mem 1 0 - 1085 h4i2_hdd 0.58 0 - 1086 h4i3_mem 1 0 - 1087 h4i3_hdd 0.58 0 - 1088 h4i4_mem 1 0 - 1089 h4i4_hdd 0.58 0 - 1090 h4i5_mem 1 0 - 1091 h4i5_hdd 0.58 0 - 1100 h5i0_mem 1 0 - 1101 h5i0_hdd 0.58 0 diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend index 0203a6b6..1a07e26e 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.xtend @@ -6,14 +6,16 @@ import java.io.BufferedReader import java.io.BufferedWriter import java.io.FileReader import java.io.FileWriter +import java.util.concurrent.TimeUnit +import java.util.regex.Pattern import org.eclipse.emf.ecore.EPackage import org.eclipse.emf.ecore.resource.Resource import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl -import java.util.concurrent.TimeUnit class CbcCpsMain { static val PROBLEM_FILE = "problem.lp" static val SOLUTION_FILE = "solution.txt" + static val VALUE_REGEX = Pattern.compile("Optimal - objective value\\s*([0-9]+(\\.[0-9]+)?)") private new() { new IllegalStateException("This is a static utility class and should not be instantiated directly.") @@ -23,7 +25,7 @@ class CbcCpsMain { Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl) EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE) - val generator = new CpsGenerator(1, 4, 2) + val generator = new CpsGenerator(1, 4, 1) val problem = generator.generateCpsProblem val toLp = new CpsToLpTranslator(problem, 10, true) val lp = toLp.lpProblem @@ -44,11 +46,22 @@ class CbcCpsMain { System.exit(-1) } val reader = new BufferedReader(new FileReader(SOLUTION_FILE)) + var double value = Double.NaN try { - reader.lines.forEach[println(it)] + var String line + while ((line = reader.readLine) !== null) { + println(line) + val matcher = VALUE_REGEX.matcher(line) + if (matcher.matches) { + value = Double.parseDouble(matcher.group(1)) + } + } } finally { reader.close } - println("Additional cost: " + problem.requests.flatMap[requirements.map[count]].reduce[p1, p2|p1 + p2] * 5) + val applicationCost = problem.requests.flatMap[requirements.map[count]].reduce[p1, p2|p1 + p2] * 5 + val cost = applicationCost + value + println + println("Cost: " + cost) } } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.xtend index b2cc0063..35b3b1df 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsMain.xtend @@ -20,7 +20,7 @@ class RuleBasedCpsMain { new IllegalStateException("This is a static utility class and should not be instantiated directly.") } - static def void main(String[] args) { + public static def void main(String[] args) { DesignSpaceExplorer.turnOnLogging(DseLoggingLevel.VERBOSE_FULL) Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl) diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend index 390d13d3..e8d29949 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.xtend @@ -22,11 +22,17 @@ class CpsGenerator { val Random random val int applicationTypeCount val int demandFactor + val boolean populateAppInstances new(long randomSeed, int applicationTypeCount, int demandFactor) { + this(randomSeed, applicationTypeCount, demandFactor, false) + } + + new(long randomSeed, int applicationTypeCount, int demandFactor, boolean populateAppInstances) { this.random = new Random(randomSeed) this.applicationTypeCount = applicationTypeCount this.demandFactor = demandFactor + this.populateAppInstances = populateAppInstances } def generateCpsProblem() { @@ -50,6 +56,14 @@ class CpsGenerator { requirements += createRequirement => [ count = nextInt(CpsGenerator.MIN_REPLICAS, CpsGenerator.MAX_REPLICAS) type = appType + if (populateAppInstances) { + for (j : 0 ..< count) { + val app = createApplicationInstance + app.type = appType + appType.instances += app + instances += app + } + } ] } ] diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend index 628d5963..459c6ab7 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend @@ -2,6 +2,11 @@ package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator +import java.io.BufferedReader +import java.io.BufferedWriter +import java.io.FileReader +import java.io.FileWriter +import java.util.Map import org.eclipse.emf.common.util.URI import org.eclipse.emf.ecore.EPackage import org.eclipse.emf.ecore.resource.Resource @@ -21,11 +26,33 @@ class CpsMdeOptimiserMain { Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl) EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE) - val generator = new CpsGenerator(1, 4, 2) + val generator = new CpsGenerator(1, 4, 1) val problem = generator.generateCpsProblem problem.eResource.URI = URI.createFileURI(PROBLEM_PATH) problem.eResource.save(emptyMap) + fixupHenshinModel("model/cps.henshin", "model/cps_fixup.henshin", #{"cps.ecore" -> CpsPackage.eNS_URI}) val injector = new MoptStandaloneSetup().createInjectorAndDoEMFRegistration(); injector.getInstance(ExcludedRun).run(PROJECT_PATH, MOPT_PATH) } + + private def static void fixupHenshinModel(String originalPath, String outputPath, Map remapMap) { + val reader = new BufferedReader(new FileReader(originalPath)) + try { + val writer = new BufferedWriter(new FileWriter(outputPath)) + try { + var String line + while ((line = reader.readLine) !== null) { + for (entry : remapMap.entrySet) { + line = line.replace(entry.key, entry.value) + } + writer.write(line) + writer.write("\n") + } + } finally { + writer.close + } + } finally { + reader.close + } + } } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt index 4c05939d..67fe7508 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt @@ -16,11 +16,13 @@ goal { } search { -// mutate using unit "createAppInstance" -// mutate using unit "createHostInstance" -// mutate using unit "allocate" -// mutate using unit "deleteAppInstance" -// mutate using unit "unallocate" +// mutate using unit "createAppInstance" +// mutate using unit "deleteAppInstance" +// mutate using unit "createHostInstance" +// mutate using unit "deleteHostInstance" +// mutate using unit "allocate" +// mutate using unit "unallocate" +// mutate using unit "reallocate" mutate { "ApplicationInstance" } mutate { "HostInstance" } } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin index 1ba73ccf..71900272 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CbcCpsMain.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin index b8ff0f95..b0bc1a5c 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java index 00a4887b..a6ff0d0e 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/CbcCpsMain.java @@ -13,7 +13,8 @@ import java.io.FileWriter; import java.util.List; import java.util.Map; import java.util.concurrent.TimeUnit; -import java.util.function.Consumer; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; @@ -30,6 +31,8 @@ public class CbcCpsMain { private static final String SOLUTION_FILE = "solution.txt"; + private static final Pattern VALUE_REGEX = Pattern.compile("Optimal - objective value\\s*([0-9]+(\\.[0-9]+)?)"); + private CbcCpsMain() { new IllegalStateException("This is a static utility class and should not be instantiated directly."); } @@ -40,7 +43,7 @@ public class CbcCpsMain { XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); _extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, _xMIResourceFactoryImpl); EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE); - final CpsGenerator generator = new CpsGenerator(1, 4, 2); + final CpsGenerator generator = new CpsGenerator(1, 4, 1); final CyberPhysicalSystem problem = generator.generateCpsProblem(); final CpsToLpTranslator toLp = new CpsToLpTranslator(problem, 10, true); final CharSequence lp = toLp.getLpProblem(); @@ -69,27 +72,36 @@ public class CbcCpsMain { } FileReader _fileReader = new FileReader(CbcCpsMain.SOLUTION_FILE); final BufferedReader reader = new BufferedReader(_fileReader); + double value = Double.NaN; try { - final Consumer _function = (String it) -> { - InputOutput.println(it); - }; - reader.lines().forEach(_function); + String line = null; + while (((line = reader.readLine()) != null)) { + { + InputOutput.println(line); + final Matcher matcher = CbcCpsMain.VALUE_REGEX.matcher(line); + boolean _matches = matcher.matches(); + if (_matches) { + value = Double.parseDouble(matcher.group(1)); + } + } + } } finally { reader.close(); } - final Function1> _function_1 = (Request it) -> { - final Function1 _function_2 = (Requirement it_1) -> { + final Function1> _function = (Request it) -> { + final Function1 _function_1 = (Requirement it_1) -> { return Integer.valueOf(it_1.getCount()); }; - return ListExtensions.map(it.getRequirements(), _function_2); + return ListExtensions.map(it.getRequirements(), _function_1); }; - final Function2 _function_2 = (Integer p1, Integer p2) -> { + final Function2 _function_1 = (Integer p1, Integer p2) -> { return Integer.valueOf(((p1).intValue() + (p2).intValue())); }; - Integer _reduce = IterableExtensions.reduce(IterableExtensions.flatMap(problem.getRequests(), _function_1), _function_2); - int _multiply = ((_reduce).intValue() * 5); - String _plus_1 = ("Additional cost: " + Integer.valueOf(_multiply)); - InputOutput.println(_plus_1); + Integer _reduce = IterableExtensions.reduce(IterableExtensions.flatMap(problem.getRequests(), _function), _function_1); + final int applicationCost = ((_reduce).intValue() * 5); + final double cost = (applicationCost + value); + InputOutput.println(); + InputOutput.println(("Cost: " + Double.valueOf(cost))); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin index a727fe17..94ae5907 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin index 8217bf52..933852a1 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.RuleBasedCpsMain.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin index 306f031b..a46b8a8e 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/.CpsGenerator.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.java index e59ef004..ce0cd02d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/generator/CpsGenerator.java @@ -1,5 +1,6 @@ package hu.bme.mit.inf.dslreasoner.domains.cps.generator; +import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationInstance; import hu.bme.mit.inf.dslreasoner.domains.cps.ApplicationType; import hu.bme.mit.inf.dslreasoner.domains.cps.CpsFactory; import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; @@ -17,6 +18,7 @@ import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl; import org.eclipse.xtext.xbase.lib.CollectionLiterals; +import org.eclipse.xtext.xbase.lib.ExclusiveRange; import org.eclipse.xtext.xbase.lib.Extension; import org.eclipse.xtext.xbase.lib.ObjectExtensions; import org.eclipse.xtext.xbase.lib.Procedures.Procedure1; @@ -46,11 +48,18 @@ public class CpsGenerator { private final int demandFactor; + private final boolean populateAppInstances; + public CpsGenerator(final long randomSeed, final int applicationTypeCount, final int demandFactor) { + this(randomSeed, applicationTypeCount, demandFactor, false); + } + + public CpsGenerator(final long randomSeed, final int applicationTypeCount, final int demandFactor, final boolean populateAppInstances) { Random _random = new Random(randomSeed); this.random = _random; this.applicationTypeCount = applicationTypeCount; this.demandFactor = demandFactor; + this.populateAppInstances = populateAppInstances; } public CyberPhysicalSystem generateCpsProblem() { @@ -83,6 +92,20 @@ public class CpsGenerator { final Procedure1 _function_2 = (Requirement it_2) -> { it_2.setCount(this.nextInt(CpsGenerator.MIN_REPLICAS, CpsGenerator.MAX_REPLICAS)); it_2.setType(appType); + if (this.populateAppInstances) { + int _count = it_2.getCount(); + ExclusiveRange _doubleDotLessThan = new ExclusiveRange(0, _count, true); + for (final Integer j : _doubleDotLessThan) { + { + final ApplicationInstance app = this._cpsFactory.createApplicationInstance(); + app.setType(appType); + EList _instances = appType.getInstances(); + _instances.add(app); + EList _instances_1 = it_2.getInstances(); + _instances_1.add(app); + } + } + } }; Requirement _doubleArrow = ObjectExtensions.operator_doubleArrow(_createRequirement, _function_2); _requirements.add(_doubleArrow); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin index 9d288343..c7d29222 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin index 46cce8d1..40ce34e3 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java index 288505a1..7a2a7e99 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java @@ -5,13 +5,20 @@ import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator; import hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.ExcludedRun; +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.FileReader; +import java.io.FileWriter; +import java.util.Collections; import java.util.Map; +import java.util.Set; import org.eclipse.emf.common.util.URI; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; import org.eclipse.xtext.xbase.lib.CollectionLiterals; import org.eclipse.xtext.xbase.lib.Exceptions; +import org.eclipse.xtext.xbase.lib.Pair; import uk.ac.kcl.inf.mdeoptimiser.languages.MoptStandaloneSetup; @SuppressWarnings("all") @@ -32,15 +39,47 @@ public class CpsMdeOptimiserMain { XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); _extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, _xMIResourceFactoryImpl); EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE); - final CpsGenerator generator = new CpsGenerator(1, 4, 2); + final CpsGenerator generator = new CpsGenerator(1, 4, 1); final CyberPhysicalSystem problem = generator.generateCpsProblem(); Resource _eResource = problem.eResource(); _eResource.setURI(URI.createFileURI(CpsMdeOptimiserMain.PROBLEM_PATH)); problem.eResource().save(CollectionLiterals.emptyMap()); + Pair _mappedTo = Pair.of("cps.ecore", CpsPackage.eNS_URI); + CpsMdeOptimiserMain.fixupHenshinModel("model/cps.henshin", "model/cps_fixup.henshin", Collections.unmodifiableMap(CollectionLiterals.newHashMap(_mappedTo))); final Injector injector = new MoptStandaloneSetup().createInjectorAndDoEMFRegistration(); injector.getInstance(ExcludedRun.class).run(CpsMdeOptimiserMain.PROJECT_PATH, CpsMdeOptimiserMain.MOPT_PATH); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } } + + private static void fixupHenshinModel(final String originalPath, final String outputPath, final Map remapMap) { + try { + FileReader _fileReader = new FileReader(originalPath); + final BufferedReader reader = new BufferedReader(_fileReader); + try { + FileWriter _fileWriter = new FileWriter(outputPath); + final BufferedWriter writer = new BufferedWriter(_fileWriter); + try { + String line = null; + while (((line = reader.readLine()) != null)) { + { + Set> _entrySet = remapMap.entrySet(); + for (final Map.Entry entry : _entrySet) { + line = line.replace(entry.getKey(), entry.getValue()); + } + writer.write(line); + writer.write("\n"); + } + } + } finally { + writer.close(); + } + } finally { + reader.close(); + } + } catch (Throwable _e) { + throw Exceptions.sneakyThrow(_e); + } + } } -- cgit v1.2.3-54-g00ecf From cd63ccf6fba2a812a9b115635bbd209c92cebad0 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Sun, 9 Jun 2019 15:13:00 -0400 Subject: Bump MDEOptimizer version https://github.com/mde-optimiser/mde_optimiser/issues/49 --- .../domains/cps/mdeo/CpsMdeOptimiserMain.xtend | 5 +- .../cps/mdeo/ExcludedOptimisationInterpreter.xtend | 85 ------- .../domains/cps/cplex/.CpsToLpTranslator.xtendbin | Bin 11104 -> 11104 bytes .../domains/cps/dse/.CpsStateCoder.xtendbin | Bin 7626 -> 7626 bytes .../domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin | Bin 6286 -> 6069 bytes .../mdeo/.ExcludedOptimisationInterpreter.xtendbin | Bin 7559 -> 0 bytes .../domains/cps/mdeo/CpsMdeOptimiserMain.java | 7 +- .../domains/cps/mdeo/ExcludedMoeaOptimisation.java | 54 ---- .../cps/mdeo/ExcludedOptimisationInterpreter.java | 31 --- .../dslreasoner/domains/cps/mdeo/ExcludedRun.java | 24 -- .../model/satellite_fixup.henshin | 38 +++ .../plugin.xml | 3 + .../satellite/queries/SatelliteQueries.java | 33 +++ .../domains/satellite/queries/internal/.gitignore | 1 + .../queries/internal/SatelliteQueriesAll.java | 51 ++++ .../queries/internal/SpacecraftOfKindCount.java | 189 ++++++++++++++ .../domains/satellite/mdeo/CostObjective.xtend | 22 +- .../mdeo/ExcludedOptimisationInterpreter.xtend | 85 ------- .../satellite/mdeo/SatelliteMdeOptimiserMain.xtend | 5 +- .../domains/satellite/mdeo/satellite.mopt | 15 +- .../domains/satellite/queries/SatelliteQueries.vql | 283 ++++++++++----------- .../domains/satellite/mdeo/.CostObjective.xtendbin | Bin 0 -> 2595 bytes .../mdeo/.LocalSearchEngineManager.xtendbin | Bin 0 -> 4284 bytes .../mdeo/.MetricBasedGuidanceFunction.xtendbin | Bin 0 -> 5142 bytes .../mdeo/.PatternMatchConstraint.xtendbin | Bin 0 -> 5113 bytes .../mdeo/.SatelliteMdeOptimiserMain.xtendbin | Bin 0 -> 5312 bytes .../domains/satellite/mdeo/CostObjective.java | 16 ++ .../satellite/mdeo/LocalSearchEngineManager.java | 39 +++ .../mdeo/MetricBasedGuidanceFunction.java | 72 ++++++ .../satellite/mdeo/PatternMatchConstraint.java | 54 ++++ .../satellite/mdeo/SatelliteMdeOptimiserMain.java | 69 +++++ 31 files changed, 731 insertions(+), 450 deletions(-) delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.java delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedRun.java create 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/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/ExcludedOptimisationInterpreter.xtend create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.CostObjective.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.LocalSearchEngineManager.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.MetricBasedGuidanceFunction.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.PatternMatchConstraint.xtendbin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.SatelliteMdeOptimiserMain.xtendbin create 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 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/MetricBasedGuidanceFunction.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/PatternMatchConstraint.java create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.java (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend index 459c6ab7..4a4b7a87 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend @@ -11,7 +11,7 @@ import org.eclipse.emf.common.util.URI import org.eclipse.emf.ecore.EPackage import org.eclipse.emf.ecore.resource.Resource import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl -import uk.ac.kcl.inf.mdeoptimiser.languages.MoptStandaloneSetup +import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run class CpsMdeOptimiserMain { static val PROJECT_PATH = "." @@ -31,8 +31,7 @@ class CpsMdeOptimiserMain { problem.eResource.URI = URI.createFileURI(PROBLEM_PATH) problem.eResource.save(emptyMap) fixupHenshinModel("model/cps.henshin", "model/cps_fixup.henshin", #{"cps.ecore" -> CpsPackage.eNS_URI}) - val injector = new MoptStandaloneSetup().createInjectorAndDoEMFRegistration(); - injector.getInstance(ExcludedRun).run(PROJECT_PATH, MOPT_PATH) + Run.main(#["-p", PROJECT_PATH, "-m", MOPT_PATH]) } private def static void fixupHenshinModel(String originalPath, String outputPath, Map remapMap) { diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.xtend deleted file mode 100644 index 1e9c5adf..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.xtend +++ /dev/null @@ -1,85 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo - -import java.util.Properties -import org.moeaframework.Executor -import org.moeaframework.Instrumenter -import org.moeaframework.algorithm.PeriodicAction -import org.moeaframework.core.TerminationCondition -import org.moeaframework.core.spi.AlgorithmFactory -import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run -import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.Optimisation -import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.SolverSpec -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.OptimisationInterpreter -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.executor.SolutionGenerator -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.MoeaOptimisation -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.algorithms.MoeaOptimisationAlgorithmProvider -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.instrumentation.PopulationCollector -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.problem.MoeaOptimisationProblem -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.operators.adaptation.MutationStepSizeStrategyFactory -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.output.MDEOBatch - -class ExcludedMoeaOptimisation extends MoeaOptimisation { - SolutionGenerator solutionGenerator - Instrumenter algorithmStepSizeInstrumenter - - override execute(SolverSpec solverSpec, SolutionGenerator solutionGenerator) { - this.solutionGenerator = solutionGenerator - super.execute(solverSpec, solutionGenerator) - } - - override Instrumenter runOptimisation(SolverSpec solverSpec, Properties optimisationProperties) { - val algorithmFactory = new AlgorithmFactory - algorithmFactory.addProvider(new MoeaOptimisationAlgorithmProvider) - - algorithmStepSizeInstrumenter = new Instrumenter().addExcludedPackage("org.eclipse").withProblemClass( - MoeaOptimisationProblem, solutionGenerator).attachApproximationSetCollector().attachElapsedTimeCollector(). - attachPopulationSizeCollector.attach(new PopulationCollector()).withFrequency(1).withFrequencyType( - PeriodicAction.FrequencyType.STEPS) - - var stepSizeStrategy = new MutationStepSizeStrategyFactory(solverSpec.algorithm, algorithmStepSizeInstrumenter). - strategy - - solutionGenerator.setMutationStepSizeStrategy(stepSizeStrategy) - - // TODO: Place this in a better location. - // Exclude JDK packages from Instrumenter - this.algorithmStepSizeInstrumenter.addExcludedPackage("jdk") - - new Executor().usingAlgorithmFactory(algorithmFactory).withAlgorithm(solverSpec.algorithm.name) // Initialize problem with our solution generator - .withProblemClass(MoeaOptimisationProblem, solutionGenerator).withProperties(optimisationProperties). - withInstrumenter(algorithmStepSizeInstrumenter).withTerminationCondition( - optimisationProperties.get("terminationCondition") as TerminationCondition).run() - - return algorithmStepSizeInstrumenter - } -} - -class ExcludedOptimisationInterpreter extends OptimisationInterpreter { - val Optimisation model - - new(String projectPath, Optimisation model) { - super(projectPath, model) - this.model = model - } - - override start() { - // This model provider loads the model given by the user in the DSL - var solutionGenerator = new SolutionGenerator(model, getBreedingOperators, getMutationOperators, - getModelProvider, getMetamodel); - - return new ExcludedMoeaOptimisation().execute(model.solver, solutionGenerator) - } - -} - -class ExcludedRun extends Run { - override runBatch(String moptProjectPath, Optimisation optimisationModel, Integer batch, boolean singleBatch) { - val optimisationInterpreter = new ExcludedOptimisationInterpreter(moptProjectPath, optimisationModel); - val startTime = System.nanoTime(); - val optimisationOutcome = optimisationInterpreter.start(); - val endTime = System.nanoTime(); - val experimentDuration = ((endTime - startTime) / 1000000); - val generatedRules = optimisationInterpreter.getRulegenOperators(); - return new MDEOBatch(batch, experimentDuration, optimisationOutcome, generatedRules, singleBatch); - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin index fd8995c0..9acd8621 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/cplex/.CpsToLpTranslator.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin index afdf61a1..ee672cb1 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/dse/.CpsStateCoder.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin index e8035410..b9f0df1a 100644 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin and b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.CpsMdeOptimiserMain.xtendbin differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin deleted file mode 100644 index 315d1748..00000000 Binary files a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/.ExcludedOptimisationInterpreter.xtendbin and /dev/null differ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java index 7a2a7e99..c047f255 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.java @@ -1,10 +1,8 @@ package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; -import com.google.inject.Injector; import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage; import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem; import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator; -import hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.ExcludedRun; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileReader; @@ -19,7 +17,7 @@ import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; import org.eclipse.xtext.xbase.lib.CollectionLiterals; import org.eclipse.xtext.xbase.lib.Exceptions; import org.eclipse.xtext.xbase.lib.Pair; -import uk.ac.kcl.inf.mdeoptimiser.languages.MoptStandaloneSetup; +import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run; @SuppressWarnings("all") public class CpsMdeOptimiserMain { @@ -46,8 +44,7 @@ public class CpsMdeOptimiserMain { problem.eResource().save(CollectionLiterals.emptyMap()); Pair _mappedTo = Pair.of("cps.ecore", CpsPackage.eNS_URI); CpsMdeOptimiserMain.fixupHenshinModel("model/cps.henshin", "model/cps_fixup.henshin", Collections.unmodifiableMap(CollectionLiterals.newHashMap(_mappedTo))); - final Injector injector = new MoptStandaloneSetup().createInjectorAndDoEMFRegistration(); - injector.getInstance(ExcludedRun.class).run(CpsMdeOptimiserMain.PROJECT_PATH, CpsMdeOptimiserMain.MOPT_PATH); + Run.main(new String[] { "-p", CpsMdeOptimiserMain.PROJECT_PATH, "-m", CpsMdeOptimiserMain.MOPT_PATH }); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java deleted file mode 100644 index 52d3f665..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedMoeaOptimisation.java +++ /dev/null @@ -1,54 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; - -import java.util.Properties; -import org.moeaframework.Executor; -import org.moeaframework.Instrumenter; -import org.moeaframework.algorithm.PeriodicAction; -import org.moeaframework.core.TerminationCondition; -import org.moeaframework.core.spi.AlgorithmFactory; -import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.AlgorithmSpec; -import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.SolverSpec; -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.executor.SolutionGenerator; -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.MoeaOptimisation; -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.algorithms.MoeaOptimisationAlgorithmProvider; -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.instrumentation.PopulationCollector; -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.problem.MoeaOptimisationProblem; -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.operators.adaptation.MutationStepSizeStrategy; -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.operators.adaptation.MutationStepSizeStrategyFactory; - -@SuppressWarnings("all") -public class ExcludedMoeaOptimisation extends MoeaOptimisation { - private SolutionGenerator solutionGenerator; - - private Instrumenter algorithmStepSizeInstrumenter; - - @Override - public Instrumenter execute(final SolverSpec solverSpec, final SolutionGenerator solutionGenerator) { - Instrumenter _xblockexpression = null; - { - this.solutionGenerator = solutionGenerator; - _xblockexpression = super.execute(solverSpec, solutionGenerator); - } - return _xblockexpression; - } - - @Override - public Instrumenter runOptimisation(final SolverSpec solverSpec, final Properties optimisationProperties) { - final AlgorithmFactory algorithmFactory = new AlgorithmFactory(); - MoeaOptimisationAlgorithmProvider _moeaOptimisationAlgorithmProvider = new MoeaOptimisationAlgorithmProvider(); - algorithmFactory.addProvider(_moeaOptimisationAlgorithmProvider); - Instrumenter _attachPopulationSizeCollector = new Instrumenter().addExcludedPackage("org.eclipse").withProblemClass( - MoeaOptimisationProblem.class, this.solutionGenerator).attachApproximationSetCollector().attachElapsedTimeCollector().attachPopulationSizeCollector(); - PopulationCollector _populationCollector = new PopulationCollector(); - this.algorithmStepSizeInstrumenter = _attachPopulationSizeCollector.attach(_populationCollector).withFrequency(1).withFrequencyType( - PeriodicAction.FrequencyType.STEPS); - AlgorithmSpec _algorithm = solverSpec.getAlgorithm(); - MutationStepSizeStrategy stepSizeStrategy = new MutationStepSizeStrategyFactory(_algorithm, this.algorithmStepSizeInstrumenter).getStrategy(); - this.solutionGenerator.setMutationStepSizeStrategy(stepSizeStrategy); - this.algorithmStepSizeInstrumenter.addExcludedPackage("jdk"); - Object _get = optimisationProperties.get("terminationCondition"); - new Executor().usingAlgorithmFactory(algorithmFactory).withAlgorithm(solverSpec.getAlgorithm().getName()).withProblemClass(MoeaOptimisationProblem.class, this.solutionGenerator).withProperties(optimisationProperties).withInstrumenter(this.algorithmStepSizeInstrumenter).withTerminationCondition( - ((TerminationCondition) _get)).run(); - return this.algorithmStepSizeInstrumenter; - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.java deleted file mode 100644 index 90641d73..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedOptimisationInterpreter.java +++ /dev/null @@ -1,31 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; - -import hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.ExcludedMoeaOptimisation; -import java.util.List; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.henshin.model.Unit; -import org.moeaframework.Instrumenter; -import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.Optimisation; -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IModelProvider; -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.OptimisationInterpreter; -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.executor.SolutionGenerator; - -@SuppressWarnings("all") -public class ExcludedOptimisationInterpreter extends OptimisationInterpreter { - private final Optimisation model; - - public ExcludedOptimisationInterpreter(final String projectPath, final Optimisation model) { - super(projectPath, model); - this.model = model; - } - - @Override - public Instrumenter start() { - List _breedingOperators = this.getBreedingOperators(); - List _mutationOperators = this.getMutationOperators(); - IModelProvider _modelProvider = this.getModelProvider(); - EPackage _metamodel = this.getMetamodel(); - SolutionGenerator solutionGenerator = new SolutionGenerator(this.model, _breedingOperators, _mutationOperators, _modelProvider, _metamodel); - return new ExcludedMoeaOptimisation().execute(this.model.getSolver(), solutionGenerator); - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedRun.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedRun.java deleted file mode 100644 index 76f12e79..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ExcludedRun.java +++ /dev/null @@ -1,24 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo; - -import hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.ExcludedOptimisationInterpreter; -import java.util.List; -import java.util.Map; -import org.eclipse.emf.ecore.EPackage; -import org.moeaframework.Instrumenter; -import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run; -import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.Optimisation; -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.output.MDEOBatch; - -@SuppressWarnings("all") -public class ExcludedRun extends Run { - @Override - public MDEOBatch runBatch(final String moptProjectPath, final Optimisation optimisationModel, final Integer batch, final boolean singleBatch) { - final ExcludedOptimisationInterpreter optimisationInterpreter = new ExcludedOptimisationInterpreter(moptProjectPath, optimisationModel); - final long startTime = System.nanoTime(); - final Instrumenter optimisationOutcome = optimisationInterpreter.start(); - final long endTime = System.nanoTime(); - final long experimentDuration = ((endTime - startTime) / 1000000); - final Map> generatedRules = optimisationInterpreter.getRulegenOperators(); - return new MDEOBatch(batch, experimentDuration, optimisationOutcome, generatedRules, singleBatch); - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite_fixup.henshin b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite_fixup.henshin index 5cc76605..224ced8f 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite_fixup.henshin +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite_fixup.henshin @@ -20,4 +20,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 8c9f4be1..a8146d37 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml @@ -15,6 +15,9 @@ + + + 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 9025d93a..d7326877 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.java @@ -5,6 +5,8 @@ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries; 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; @@ -12,6 +14,7 @@ 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; @@ -32,6 +35,9 @@ import org.eclipse.viatra.query.runtime.api.impl.BaseGeneratedPatternGroup; *
  • threeUCubeSatWithNonUhfCrossLink
  • *
  • cubeSatWithKaAntenna
  • *
  • smallSat
  • + *
  • coverageMetric
  • + *
  • timeMetric
  • + *
  • costMetric
  • * * * @see IQueryGroup @@ -65,6 +71,9 @@ 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() { @@ -138,4 +147,28 @@ 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/.gitignore b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore index 58443486..2f9ae41d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/.gitignore @@ -67,3 +67,4 @@ /.CubeSat6U.java._trace /.MatchingCommSubsystem.java._trace /.TransmittingCommSubsystem.java._trace +/.SpacecraftOfKindCount.java._trace 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 4093e2b2..0235dbec 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SatelliteQueriesAll.java @@ -5,6 +5,8 @@ package hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal; 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; @@ -12,18 +14,33 @@ 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; @@ -55,6 +72,23 @@ 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 @@ -101,5 +135,22 @@ 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 new file mode 100644 index 00000000..3c4f9244 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/internal/SpacecraftOfKindCount.java @@ -0,0 +1,189 @@ +/** + * 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 43b2902f..3a8688e9 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/mdeo/ExcludedOptimisationInterpreter.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/ExcludedOptimisationInterpreter.xtend deleted file mode 100644 index ddf5748e..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/ExcludedOptimisationInterpreter.xtend +++ /dev/null @@ -1,85 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo - -import java.util.Properties -import org.moeaframework.Executor -import org.moeaframework.Instrumenter -import org.moeaframework.algorithm.PeriodicAction -import org.moeaframework.core.TerminationCondition -import org.moeaframework.core.spi.AlgorithmFactory -import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run -import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.Optimisation -import uk.ac.kcl.inf.mdeoptimiser.languages.mopt.SolverSpec -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.OptimisationInterpreter -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.executor.SolutionGenerator -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.MoeaOptimisation -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.algorithms.MoeaOptimisationAlgorithmProvider -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.instrumentation.PopulationCollector -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.moea.problem.MoeaOptimisationProblem -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.operators.adaptation.MutationStepSizeStrategyFactory -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.output.MDEOBatch - -class ExcludedMoeaOptimisation extends MoeaOptimisation { - SolutionGenerator solutionGenerator - Instrumenter algorithmStepSizeInstrumenter - - override execute(SolverSpec solverSpec, SolutionGenerator solutionGenerator) { - this.solutionGenerator = solutionGenerator - super.execute(solverSpec, solutionGenerator) - } - - override Instrumenter runOptimisation(SolverSpec solverSpec, Properties optimisationProperties) { - val algorithmFactory = new AlgorithmFactory - algorithmFactory.addProvider(new MoeaOptimisationAlgorithmProvider) - - algorithmStepSizeInstrumenter = new Instrumenter().addExcludedPackage("org.eclipse").withProblemClass( - MoeaOptimisationProblem, solutionGenerator).attachApproximationSetCollector().attachElapsedTimeCollector(). - attachPopulationSizeCollector.attach(new PopulationCollector()).withFrequency(1).withFrequencyType( - PeriodicAction.FrequencyType.STEPS) - - var stepSizeStrategy = new MutationStepSizeStrategyFactory(solverSpec.algorithm, algorithmStepSizeInstrumenter). - strategy - - solutionGenerator.setMutationStepSizeStrategy(stepSizeStrategy) - - // TODO: Place this in a better location. - // Exclude JDK packages from Instrumenter - this.algorithmStepSizeInstrumenter.addExcludedPackage("jdk") - - new Executor().usingAlgorithmFactory(algorithmFactory).withAlgorithm(solverSpec.algorithm.name) // Initialize problem with our solution generator - .withProblemClass(MoeaOptimisationProblem, solutionGenerator).withProperties(optimisationProperties). - withInstrumenter(algorithmStepSizeInstrumenter).withTerminationCondition( - optimisationProperties.get("terminationCondition") as TerminationCondition).run() - - return algorithmStepSizeInstrumenter - } -} - -class ExcludedOptimisationInterpreter extends OptimisationInterpreter { - val Optimisation model - - new(String projectPath, Optimisation model) { - super(projectPath, model) - this.model = model - } - - override start() { - // This model provider loads the model given by the user in the DSL - var solutionGenerator = new SolutionGenerator(model, getBreedingOperators, getMutationOperators, - getModelProvider, getMetamodel); - - return new ExcludedMoeaOptimisation().execute(model.solver, solutionGenerator) - } - -} - -class ExcludedRun extends Run { - override runBatch(String moptProjectPath, Optimisation optimisationModel, Integer batch, boolean singleBatch) { - val optimisationInterpreter = new ExcludedOptimisationInterpreter(moptProjectPath, optimisationModel); - val startTime = System.nanoTime(); - val optimisationOutcome = optimisationInterpreter.start(); - val endTime = System.nanoTime(); - val experimentDuration = ((endTime - startTime) / 1000000); - val generatedRules = optimisationInterpreter.getRulegenOperators(); - return new MDEOBatch(batch, experimentDuration, optimisationOutcome, generatedRules, singleBatch); - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend index c5a30f94..58034c43 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend @@ -9,7 +9,7 @@ import org.eclipse.emf.ecore.EPackage import org.eclipse.emf.ecore.resource.Resource import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl import satellite.SatellitePackage -import uk.ac.kcl.inf.mdeoptimiser.languages.MoptStandaloneSetup +import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run class SatelliteMdeOptimiserMain { static val PROJECT_PATH = "." @@ -25,8 +25,7 @@ class SatelliteMdeOptimiserMain { EPackage.Registry.INSTANCE.put(SatellitePackage.eNS_URI, SatellitePackage.eINSTANCE) fixupHenshinModel("model/satellite.henshin", "model/satellite_fixup.henshin", #{"satellite.ecore" -> SatellitePackage.eNS_URI}) - val injector = new MoptStandaloneSetup().createInjectorAndDoEMFRegistration(); - injector.getInstance(ExcludedRun).run(PROJECT_PATH, MOPT_PATH) + Run.main(#["-p", PROJECT_PATH, "-m", MOPT_PATH]) } private def static void fixupHenshinModel(String originalPath, String outputPath, Map remapMap) { diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt index 138ea309..e9bd1a64 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt @@ -10,13 +10,14 @@ goal { } search { - mutate using unit "addCubeSat3U" -// mutate { "CubeSat3U" } -// mutate { "CubeSat6U" } -// mutate { "SmallSat" } -// mutate { "InterferometryPayload" } -// mutate { "CommSubsystem" } -// mutate { "DirectedCommunicationLink" } +// mutate using unit "addCubeSat3U" + mutate { "CubeSat3U" } + mutate { "CubeSat6U" } + mutate { "SmallSat" } + mutate { "InterferometryPayload" } + mutate { "UHFCommSubsystem" } + mutate { "XCommSubsystem" } + mutate { "KaCommSubsystem" } } solver { 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 bdda6ec7..711c7ce6 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,147 +158,146 @@ pattern smallSat(Sat : SmallSat) { SmallSat(Sat); } -//// -//// Metrics -//// // -//// Coverage +// Metrics // -//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.communicationLink(Spacecraft, Link); -// DirectedCommunicationLink.target(Link, 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; -//} \ No newline at end of file + +// 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; +} 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 new file mode 100644 index 00000000..9d4649e5 Binary files /dev/null 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 new file mode 100644 index 00000000..9c013962 Binary files /dev/null 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/.MetricBasedGuidanceFunction.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.MetricBasedGuidanceFunction.xtendbin new file mode 100644 index 00000000..456c7785 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.MetricBasedGuidanceFunction.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 new file mode 100644 index 00000000..4eaa04bd Binary files /dev/null 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/.SatelliteMdeOptimiserMain.xtendbin b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.SatelliteMdeOptimiserMain.xtendbin new file mode 100644 index 00000000..11cbad32 Binary files /dev/null and b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/.SatelliteMdeOptimiserMain.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 new file mode 100644 index 00000000..8659913c --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.java @@ -0,0 +1,16 @@ +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/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.java new file mode 100644 index 00000000..18708a37 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.java @@ -0,0 +1,39 @@ +package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo; + +import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries; +import java.util.WeakHashMap; +import java.util.function.Function; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine; +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions; +import org.eclipse.viatra.query.runtime.emf.EMFScope; +import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.LocalSearchHints; +import org.eclipse.viatra.query.runtime.matchers.backend.QueryEvaluationHint; + +@SuppressWarnings("all") +public class LocalSearchEngineManager { + public static final LocalSearchEngineManager INSTANCE = new LocalSearchEngineManager(); + + private final WeakHashMap engineMap = new WeakHashMap(); + + private LocalSearchEngineManager() { + } + + public ViatraQueryEngine getEngine(final EObject eObject) { + final Function _function = (EObject it) -> { + ViatraQueryEngine _xblockexpression = null; + { + final EMFScope scope = new EMFScope(it); + final QueryEvaluationHint localSearchHints = LocalSearchHints.getDefault().build(); + final ViatraQueryEngineOptions options = ViatraQueryEngineOptions.defineOptions().withDefaultHint(localSearchHints).withDefaultBackend( + localSearchHints.getQueryBackendFactory()).build(); + final ViatraQueryEngine engine = AdvancedViatraQueryEngine.on(scope, options); + SatelliteQueries.instance().prepare(engine); + _xblockexpression = engine; + } + return _xblockexpression; + }; + return this.engineMap.computeIfAbsent(eObject, _function); + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/MetricBasedGuidanceFunction.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/MetricBasedGuidanceFunction.java new file mode 100644 index 00000000..f3dae715 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/MetricBasedGuidanceFunction.java @@ -0,0 +1,72 @@ +package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo; + +import hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo.LocalSearchEngineManager; +import java.util.Iterator; +import org.eclipse.emf.ecore.EObject; +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 uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution; + +@SuppressWarnings("all") +public abstract class MetricBasedGuidanceFunction implements IGuidanceFunction { + private final IQuerySpecification> querySpecification; + + protected MetricBasedGuidanceFunction(final IQuerySpecification> querySpecification) { + this.querySpecification = querySpecification; + int _size = querySpecification.getParameters().size(); + boolean _notEquals = (_size != 1); + if (_notEquals) { + throw new IllegalArgumentException("Metric must have a single parameter"); + } + } + + @Override + public double computeFitness(final Solution model) { + double _xblockexpression = (double) 0; + { + final double value = this.getMetricValue(model); + _xblockexpression = this.computeFitness(value); + } + return _xblockexpression; + } + + protected double computeFitness(final double metricValue) { + return metricValue; + } + + private double getMetricValue(final Solution solution) { + double _xblockexpression = (double) 0; + { + final EObject model = solution.getModel(); + final ViatraQueryEngine queryEngine = LocalSearchEngineManager.INSTANCE.getEngine(model); + final ViatraQueryMatcher matcher = this.querySpecification.getMatcher(queryEngine); + final Iterator iterator = matcher.getAllMatches().iterator(); + boolean _hasNext = iterator.hasNext(); + boolean _not = (!_hasNext); + if (_not) { + throw new IllegalStateException("Too few matches"); + } + final Object objectValue = iterator.next().get(0); + double _xifexpression = (double) 0; + if ((objectValue instanceof Number)) { + double _xblockexpression_1 = (double) 0; + { + final double doubleValue = ((Number)objectValue).doubleValue(); + boolean _hasNext_1 = iterator.hasNext(); + if (_hasNext_1) { + throw new IllegalStateException("Too many matches"); + } + _xblockexpression_1 = doubleValue; + } + _xifexpression = _xblockexpression_1; + } else { + throw new IllegalStateException("Metric value must be a number"); + } + _xblockexpression = _xifexpression; + } + return _xblockexpression; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/PatternMatchConstraint.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/PatternMatchConstraint.java new file mode 100644 index 00000000..f089d469 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/PatternMatchConstraint.java @@ -0,0 +1,54 @@ +package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo; + +import com.google.common.base.Objects; +import com.google.common.collect.ImmutableList; +import hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo.LocalSearchEngineManager; +import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries; +import org.eclipse.emf.ecore.EObject; +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.matchers.psystem.annotations.PAnnotation; +import org.eclipse.xtext.xbase.lib.Functions.Function1; +import org.eclipse.xtext.xbase.lib.IterableExtensions; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction; +import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution; + +@SuppressWarnings("all") +public class PatternMatchConstraint implements IGuidanceFunction { + private static final String CONSTRAINT_ANNOTATION_NAME = "Constraint"; + + private final ImmutableList> queries = ImmutableList.>copyOf(IterableExtensions.>filter(SatelliteQueries.instance().getSpecifications(), ((Function1, Boolean>) (IQuerySpecification it) -> { + final Function1 _function = (PAnnotation it_1) -> { + String _name = it_1.getName(); + return Boolean.valueOf(Objects.equal(_name, PatternMatchConstraint.CONSTRAINT_ANNOTATION_NAME)); + }; + return Boolean.valueOf(IterableExtensions.exists(it.getAllAnnotations(), _function)); + }))); + + @Override + public String getName() { + return "PatternMatch"; + } + + @Override + public double computeFitness(final Solution solution) { + int _xblockexpression = (int) 0; + { + final EObject model = solution.getModel(); + final ViatraQueryEngine queryEngine = LocalSearchEngineManager.INSTANCE.getEngine(model); + int matchCount = 0; + for (final IQuerySpecification query : this.queries) { + { + final ViatraQueryMatcher matcher = query.getMatcher(queryEngine); + int _matchCount = matchCount; + int _countMatches = matcher.countMatches(); + matchCount = (_matchCount + _countMatches); + } + } + _xblockexpression = matchCount; + } + return _xblockexpression; + } +} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.java new file mode 100644 index 00000000..6cbb08fc --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/xtend-gen/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.java @@ -0,0 +1,69 @@ +package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo; + +import java.io.BufferedReader; +import java.io.BufferedWriter; +import java.io.FileReader; +import java.io.FileWriter; +import java.util.Collections; +import java.util.Map; +import java.util.Set; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.resource.Resource; +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl; +import org.eclipse.xtext.xbase.lib.CollectionLiterals; +import org.eclipse.xtext.xbase.lib.Exceptions; +import org.eclipse.xtext.xbase.lib.Pair; +import satellite.SatellitePackage; +import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run; + +@SuppressWarnings("all") +public class SatelliteMdeOptimiserMain { + private static final String PROJECT_PATH = "."; + + private static final String MOPT_PATH = "src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt"; + + private SatelliteMdeOptimiserMain() { + new IllegalStateException("This is a static utility class and should not be instantiated directly."); + } + + public static void main(final String[] args) { + Map _extensionToFactoryMap = Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap(); + XMIResourceFactoryImpl _xMIResourceFactoryImpl = new XMIResourceFactoryImpl(); + _extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, _xMIResourceFactoryImpl); + EPackage.Registry.INSTANCE.put(SatellitePackage.eNS_URI, SatellitePackage.eINSTANCE); + Pair _mappedTo = Pair.of("satellite.ecore", SatellitePackage.eNS_URI); + SatelliteMdeOptimiserMain.fixupHenshinModel("model/satellite.henshin", "model/satellite_fixup.henshin", + Collections.unmodifiableMap(CollectionLiterals.newHashMap(_mappedTo))); + Run.main(new String[] { "-p", SatelliteMdeOptimiserMain.PROJECT_PATH, "-m", SatelliteMdeOptimiserMain.MOPT_PATH }); + } + + private static void fixupHenshinModel(final String originalPath, final String outputPath, final Map remapMap) { + try { + FileReader _fileReader = new FileReader(originalPath); + final BufferedReader reader = new BufferedReader(_fileReader); + try { + FileWriter _fileWriter = new FileWriter(outputPath); + final BufferedWriter writer = new BufferedWriter(_fileWriter); + try { + String line = null; + while (((line = reader.readLine()) != null)) { + { + Set> _entrySet = remapMap.entrySet(); + for (final Map.Entry entry : _entrySet) { + line = line.replace(entry.getKey(), entry.getValue()); + } + writer.write(line); + writer.write("\n"); + } + } + } finally { + writer.close(); + } + } finally { + reader.close(); + } + } catch (Throwable _e) { + throw Exceptions.sneakyThrow(_e); + } + } +} -- cgit v1.2.3-54-g00ecf From fc84d3fe670331bc89fb1e4c44104bc1fc811438 Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Wed, 14 Aug 2019 18:26:33 +0200 Subject: Measurements WIP --- .../.ApplicationConfigurationIdeModule.xtendbin | Bin 1701 -> 1701 bytes .../ide/.ApplicationConfigurationIdeSetup.xtendbin | Bin 2570 -> 2570 bytes .../domains/transima/fam/FamPatterns.vql | 2 +- .../domains/cps/dse/RuleBasedCpsSolver.xtend | 6 +- .../.classpath | 7 +- .../.project | 1 + .../.settings/org.eclipse.core.resources.prefs | 3 - .../META-INF/MANIFEST.MF | 16 +- .../configs/generation.vsconfig | 2 +- .../ecore-gen/satellite/CommSubsystem.java | 20 +- .../ecore-gen/satellite/ConstellationMission.java | 2 +- .../ecore-gen/satellite/InterferometryMission.java | 28 -- .../ecore-gen/satellite/SatellitePackage.java | 88 +----- .../satellite/impl/CommSubsystemImpl.java | 115 +------ .../satellite/impl/InterferometryMissionImpl.java | 130 -------- .../satellite/impl/SatellitePackageImpl.java | 37 +-- .../inputs/SatelliteInstance.xmi | 9 +- .../model/satellite.ecore | 12 +- .../model/satellite.genmodel | 5 +- .../model/satellite.henshin | 61 ---- .../model/satellite.henshin_diagram | 131 -------- .../model/satellite_fixup.henshin | 61 ---- .../plugin.xml | 1 + .../representations.aird | 2 + .../domains/satellite/mdeo/CostObjective.xtend | 13 - .../satellite/mdeo/LocalSearchEngineManager.xtend | 31 -- .../mdeo/MetricBasedGuidanceFunction.xtend | 47 --- .../satellite/mdeo/PatternMatchConstraint.xtend | 29 -- .../satellite/mdeo/SatelliteMdeOptimiserMain.xtend | 51 --- .../domains/satellite/mdeo/satellite.mopt | 36 --- .../domains/satellite/queries/SatelliteQueries.vql | 11 +- .../META-INF/MANIFEST.MF | 3 +- .../plugin.xml | 74 +---- .../yakindu/mutated/mutated.vql | 270 ---------------- .../partialsnapshot_mavo/yakindu/patterns.vql | 64 ++-- .../ModelGenerationMethodProvider.xtend | 35 +- .../cardinality/LinearTypeConstraintHint.xtend | 30 ++ .../cardinality/PolyhedronScopePropagator.xtend | 106 +++++-- .../cardinality/PolyhedronSolver.xtend | 72 ++++- .../cardinality/RelationConstraintCalculator.xtend | 5 +- .../logic2viatra/cardinality/ScopePropagator.xtend | 25 +- .../cardinality/ScopePropagatorStrategy.xtend | 11 +- .../cardinality/TypeHierarchyScopePropagator.xtend | 20 +- .../cardinality/Z3PolyhedronSolver.xtend | 32 +- .../logic2viatra/patterns/PatternGenerator.xtend | 18 +- .../logic2viatra/patterns/PatternProvider.xtend | 6 +- .../patterns/RelationRefinementGenerator.xtend | 2 +- .../logic2viatra/patterns/UnfinishedIndexer.xtend | 26 +- .../rules/RefinementRuleProvider.xtend | 15 +- .../PartialInterpretation.java | 24 ++ .../PartialinterpretationPackage.java | 60 +++- .../partialinterpretation/Scope.java | 24 ++ .../impl/BinaryElementRelationLinkImpl.java | 4 + .../impl/BooleanElementImpl.java | 4 +- .../impl/IntegerElementImpl.java | 4 +- .../impl/NaryRelationLinkElementImpl.java | 6 +- .../impl/NaryRelationLinkImpl.java | 1 + .../impl/PartialComplexTypeInterpretationImpl.java | 3 + .../impl/PartialConstantInterpretationImpl.java | 2 + .../impl/PartialFunctionInterpretationImpl.java | 2 + .../impl/PartialInterpretationImpl.java | 73 ++++- .../impl/PartialRelationInterpretationImpl.java | 7 + .../impl/PartialTypeInterpratationImpl.java | 2 + .../impl/PartialinterpretationFactoryImpl.java | 19 ++ .../impl/PartialinterpretationPackageImpl.java | 88 +++++- .../impl/PrimitiveElementImpl.java | 4 +- .../impl/RealElementImpl.java | 4 +- .../partialinterpretation/impl/ScopeImpl.java | 64 +++- .../impl/StringElementImpl.java | 4 +- .../impl/UnaryElementRelationLinkImpl.java | 2 + .../model/PartialInterpretation.ecore | 6 + .../model/PartialInterpretation.genmodel | 14 +- .../neighbourhood/Descriptor.xtend | 8 + .../neighbourhood/NeighbourhoodOptions.xtend | 4 +- .../neighbourhood/PartialInterpretation2Hash.xtend | 2 +- ...nterpretation2NeighbourhoodRepresentation.xtend | 4 +- .../NeighbourhoodBasedStateCoderFactory.xtend | 29 +- .../viatrasolver/reasoner/ViatraReasoner.xtend | 25 +- .../reasoner/ViatraReasonerConfiguration.xtend | 3 + .../reasoner/dse/BasicScopeGlobalConstraint.xtend | 103 ++++++ .../dse/BestFirstStrategyForModelGeneration.java | 2 +- .../dse/ModelGenerationCompositeObjective.xtend | 2 +- .../viatrasolver/reasoner/dse/ScopeObjective.xtend | 4 +- .../reasoner/dse/UnfinishedWFObjective.xtend | 34 +- .../reasoner/dse/ViatraReasonerSolutionSaver.xtend | 11 +- .../META-INF/MANIFEST.MF | 8 +- ..._ViatraSolver_polyhedral_typeHierarchy_Clp.json | 13 + ..._ViatraSolver_polyhedral_typeHierarchy_Clp.json | 16 + ..._ViatraSolver_polyhedral_typeHierarchy_Clp.json | 15 + ..._ViatraSolver_polyhedral_typeHierarchy_Clp.json | 15 + ..._ViatraSolver_polyhedral_typeHierarchy_Clp.json | 17 + .../initialModels/satellite.xmi | 14 + .../bme/mit/inf/dslreasoner/run/CountMatches.xtend | 176 ----------- .../run/Ecore2LogicTraceBasedHint.xtend | 56 ++++ .../mit/inf/dslreasoner/run/MetamodelLoader.xtend | 302 +++++++++++++----- .../bme/mit/inf/dslreasoner/run/SGraphHint.xtend | 46 +++ .../mit/inf/dslreasoner/run/SatelliteHint.xtend | 86 +++++ .../run/TypeDistributionCalculator.xtend | 35 ++ .../dslreasoner/run/script/MeasurementScript.xtend | 70 ++++ .../run/script/MeasurementScriptRunner.xtend | 351 +++++++++++++++++++++ 100 files changed, 1976 insertions(+), 1667 deletions(-) delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.settings/org.eclipse.core.resources.prefs delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin_diagram delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite_fixup.henshin create mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/representations.aird delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/MetricBasedGuidanceFunction.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/PatternMatchConstraint.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/mutated/mutated.vql create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend create mode 100644 Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BasicScopeGlobalConstraint.xtend create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/configs/FAM_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/configs/Yakindu_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/configs/ecore_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/configs/fs_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/configs/satellite_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/initialModels/satellite.xmi delete mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/Ecore2LogicTraceBasedHint.xtend create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/TypeDistributionCalculator.xtend create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScript.xtend create mode 100644 Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScriptRunner.xtend (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf') 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 069bd953..22db4093 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 624846d6..3ad5d167 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/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql b/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql index f0e48d42..1d9a6b6d 100644 --- a/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql +++ b/Domains/Examples/ModelGenExampleFAM_plugin/src/hu/bme/mit/inf/dslreasoner/domains/transima/fam/FamPatterns.vql @@ -10,7 +10,7 @@ pattern terminatorAndInformation(T : FAMTerminator, I : InformationLink) = { InformationLink.to(I,In); FunctionalInput.terminator(In,T); } - +/* @QueryBasedFeature pattern type(This : Function, Target : FunctionType) = { find rootElements(_Model, This); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend index e4c758f0..503c06ea 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/dse/RuleBasedCpsSolver.xtend @@ -35,18 +35,18 @@ class RuleBasedCpsSolver { val dse = new DesignSpaceExplorer dse.addMetaModelPackage(CpsPackage.eINSTANCE) dse.initialModel = problem.eResource.resourceSet - dse.addTransformationRule(createRule(RequirementNotSatisfied.instance).action [ + dse.addTransformationRule(createRule.precondition(RequirementNotSatisfied.instance).action [ val app = createApplicationInstance req.type.instances += app req.instances += app ].build) - dse.addTransformationRule(createRule(Allocate.instance).action [ + dse.addTransformationRule(createRule.precondition(Allocate.instance).action [ app.allocatedTo = host ].build) // dse.addTransformationRule(createRule(UnallocateAppInstance.instance).action [ // app.allocatedTo = null // ].build) - dse.addTransformationRule(createRule(CreateHostInstance.instance).action [ + dse.addTransformationRule(createRule.precondition(CreateHostInstance.instance).action [ hostType.instances += createHostInstance ].build) // dse.addTransformationRule(createRule(RemoveHostInstance.instance).action [ diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.classpath b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.classpath index e5e58475..6781ea8f 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.classpath +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.classpath @@ -3,9 +3,12 @@ - + + + + + - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.project b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.project index 16db5fc5..e594a173 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.project +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.project @@ -32,6 +32,7 @@ + org.eclipse.sirius.nature.modelingproject org.eclipse.jdt.core.javanature org.eclipse.pde.PluginNature org.eclipse.viatra.query.projectnature diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.settings/org.eclipse.core.resources.prefs b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.settings/org.eclipse.core.resources.prefs deleted file mode 100644 index 4a3e59e4..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/.settings/org.eclipse.core.resources.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -encoding//model/satellite.henshin=UTF-8 -encoding//model/satellite.henshin_diagram=UTF-8 diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF index 36d729b4..966fc660 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/META-INF/MANIFEST.MF @@ -7,6 +7,7 @@ Bundle-ClassPath: . Bundle-Vendor: %providerName Bundle-Localization: plugin Export-Package: hu.bme.mit.inf.dslreasoner.domains.satellite.queries, + hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal, satellite, satellite.impl, satellite.util @@ -22,20 +23,7 @@ Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime, org.eclipse.viatra.dse.genetic, hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner;bundle-version="1.0.0", org.eclipse.emf.ecore.xmi;bundle-version="2.15.0", - uk.ac.kcl.inf.mdeoptimiser.libraries.core;bundle-version="1.0.0", - uk.ac.kcl.inf.mdeoptimiser.interfaces.cli;bundle-version="1.0.0", - org.eclipse.emf.henshin.interpreter;bundle-version="1.5.0", - uk.ac.kcl.inf.mdeoptimiser.libraries.rulegen;bundle-version="1.0.0", - org.sidiff.common;bundle-version="1.0.0", - org.sidiff.common.emf;bundle-version="1.0.0", - org.sidiff.common.emf.extensions;bundle-version="1.0.0", - org.moeaframework;bundle-version="2.13.0", - org.apache.commons.math3;bundle-version="3.6.1", - org.apache.commons.lang3;bundle-version="3.8.1", - com.google.inject;bundle-version="3.0.0", - org.sidiff.common.henshin;bundle-version="1.0.0", - org.sidiff.serge;bundle-version="1.0.0", - org.eclipse.viatra.query.runtime.rete;bundle-version="2.2.0" + org.eclipse.viatra.query.runtime.rete;bundle-version="2.0.0" Import-Package: org.apache.log4j Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.domains.satellite Bundle-ActivationPolicy: lazy 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 66c468d0..2fb246c9 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 @@ -2,7 +2,7 @@ import epackage "model/satellite.ecore" import viatra "src/hu/bme/mit/inf/dslreasoner/domains/satellite/queries/SatelliteQueries.vql" generate { - metamodel = { package satellite excluding { InterferometryMission.observationTime } } + metamodel = { package satellite } constraints = { package hu.bme.mit.inf.dslreasoner.domains.satellite.queries } partial-model = { "inputs/SatelliteInstance.xmi"} solver = ViatraSolver diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java index 90bca78c..3b9d7ecf 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/CommSubsystem.java @@ -2,7 +2,6 @@ */ package satellite; -import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EObject; /** @@ -15,7 +14,6 @@ import org.eclipse.emf.ecore.EObject; *

    *
      *
    • {@link satellite.CommSubsystem#getTarget Target}
    • - *
    • {@link satellite.CommSubsystem#getSource Source}
    • *
    * * @see satellite.SatellitePackage#getCommSubsystem() @@ -26,14 +24,12 @@ public interface CommSubsystem extends EObject { /** * Returns the value of the 'Target' reference. - * It is bidirectional and its opposite is '{@link satellite.CommSubsystem#getSource Source}'. * * * @return the value of the 'Target' reference. * @see #setTarget(CommSubsystem) * @see satellite.SatellitePackage#getCommSubsystem_Target() - * @see satellite.CommSubsystem#getSource - * @model opposite="source" + * @model * @generated */ CommSubsystem getTarget(); @@ -48,18 +44,4 @@ public interface CommSubsystem extends EObject { */ void setTarget(CommSubsystem value); - /** - * Returns the value of the 'Source' reference list. - * The list contents are of type {@link satellite.CommSubsystem}. - * It is bidirectional and its opposite is '{@link satellite.CommSubsystem#getTarget Target}'. - * - * - * @return the value of the 'Source' reference list. - * @see satellite.SatellitePackage#getCommSubsystem_Source() - * @see satellite.CommSubsystem#getTarget - * @model opposite="target" - * @generated - */ - EList getSource(); - } // CommSubsystem diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/ConstellationMission.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/ConstellationMission.java index 6182d7ad..8ff69955 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/ConstellationMission.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/ConstellationMission.java @@ -53,7 +53,7 @@ public interface ConstellationMission extends EObject { * * @return the value of the 'Spacecraft' containment reference list. * @see satellite.SatellitePackage#getConstellationMission_Spacecraft() - * @model containment="true" lower="2" upper="50" + * @model containment="true" lower="2" * @generated */ EList getSpacecraft(); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/InterferometryMission.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/InterferometryMission.java index eb4ea064..4e28df38 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/InterferometryMission.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/InterferometryMission.java @@ -7,39 +7,11 @@ package satellite; * A representation of the model object 'Interferometry Mission'. * * - *

    - * The following features are supported: - *

    - *
      - *
    • {@link satellite.InterferometryMission#getObservationTime Observation Time}
    • - *
    * * @see satellite.SatellitePackage#getInterferometryMission() * @model * @generated */ public interface InterferometryMission extends ConstellationMission { - /** - * Returns the value of the 'Observation Time' attribute. - * The default value is "2.0". - * - * - * @return the value of the 'Observation Time' attribute. - * @see #setObservationTime(float) - * @see satellite.SatellitePackage#getInterferometryMission_ObservationTime() - * @model default="2.0" required="true" - * @generated - */ - float getObservationTime(); - - /** - * Sets the value of the '{@link satellite.InterferometryMission#getObservationTime Observation Time}' attribute. - * - * - * @param value the new value of the 'Observation Time' attribute. - * @see #getObservationTime() - * @generated - */ - void setObservationTime(float value); } // InterferometryMission diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java index 7be4ef84..9ca99311 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/SatellitePackage.java @@ -2,7 +2,6 @@ */ package satellite; -import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; @@ -130,15 +129,6 @@ public interface SatellitePackage extends EPackage { */ int INTERFEROMETRY_MISSION__SPACECRAFT = CONSTELLATION_MISSION__SPACECRAFT; - /** - * The feature id for the 'Observation Time' attribute. - * - * - * @generated - * @ordered - */ - int INTERFEROMETRY_MISSION__OBSERVATION_TIME = CONSTELLATION_MISSION_FEATURE_COUNT + 0; - /** * The number of structural features of the 'Interferometry Mission' class. * @@ -146,7 +136,7 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int INTERFEROMETRY_MISSION_FEATURE_COUNT = CONSTELLATION_MISSION_FEATURE_COUNT + 1; + int INTERFEROMETRY_MISSION_FEATURE_COUNT = CONSTELLATION_MISSION_FEATURE_COUNT + 0; /** * The number of operations of the 'Interferometry Mission' class. @@ -296,15 +286,6 @@ public interface SatellitePackage extends EPackage { */ int COMM_SUBSYSTEM__TARGET = 0; - /** - * The feature id for the 'Source' reference list. - * - * - * @generated - * @ordered - */ - int COMM_SUBSYSTEM__SOURCE = 1; - /** * The number of structural features of the 'Comm Subsystem' class. * @@ -312,7 +293,7 @@ public interface SatellitePackage extends EPackage { * @generated * @ordered */ - int COMM_SUBSYSTEM_FEATURE_COUNT = 2; + int COMM_SUBSYSTEM_FEATURE_COUNT = 1; /** * The number of operations of the 'Comm Subsystem' class. @@ -582,15 +563,6 @@ public interface SatellitePackage extends EPackage { */ int UHF_COMM_SUBSYSTEM__TARGET = COMM_SUBSYSTEM__TARGET; - /** - * The feature id for the 'Source' reference list. - * - * - * @generated - * @ordered - */ - int UHF_COMM_SUBSYSTEM__SOURCE = COMM_SUBSYSTEM__SOURCE; - /** * The number of structural features of the 'UHF Comm Subsystem' class. * @@ -628,15 +600,6 @@ public interface SatellitePackage extends EPackage { */ int XCOMM_SUBSYSTEM__TARGET = COMM_SUBSYSTEM__TARGET; - /** - * The feature id for the 'Source' reference list. - * - * - * @generated - * @ordered - */ - int XCOMM_SUBSYSTEM__SOURCE = COMM_SUBSYSTEM__SOURCE; - /** * The number of structural features of the 'XComm Subsystem' class. * @@ -674,15 +637,6 @@ public interface SatellitePackage extends EPackage { */ int KA_COMM_SUBSYSTEM__TARGET = COMM_SUBSYSTEM__TARGET; - /** - * The feature id for the 'Source' reference list. - * - * - * @generated - * @ordered - */ - int KA_COMM_SUBSYSTEM__SOURCE = COMM_SUBSYSTEM__SOURCE; - /** * The number of structural features of the 'Ka Comm Subsystem' class. * @@ -743,17 +697,6 @@ public interface SatellitePackage extends EPackage { */ EClass getInterferometryMission(); - /** - * Returns the meta object for the attribute '{@link satellite.InterferometryMission#getObservationTime Observation Time}'. - * - * - * @return the meta object for the attribute 'Observation Time'. - * @see satellite.InterferometryMission#getObservationTime() - * @see #getInterferometryMission() - * @generated - */ - EAttribute getInterferometryMission_ObservationTime(); - /** * Returns the meta object for class '{@link satellite.CommunicatingElement Communicating Element}'. * @@ -827,17 +770,6 @@ public interface SatellitePackage extends EPackage { */ EReference getCommSubsystem_Target(); - /** - * Returns the meta object for the reference list '{@link satellite.CommSubsystem#getSource Source}'. - * - * - * @return the meta object for the reference list 'Source'. - * @see satellite.CommSubsystem#getSource() - * @see #getCommSubsystem() - * @generated - */ - EReference getCommSubsystem_Source(); - /** * Returns the meta object for class '{@link satellite.Payload Payload}'. * @@ -988,14 +920,6 @@ public interface SatellitePackage extends EPackage { */ EClass INTERFEROMETRY_MISSION = eINSTANCE.getInterferometryMission(); - /** - * The meta object literal for the 'Observation Time' attribute feature. - * - * - * @generated - */ - EAttribute INTERFEROMETRY_MISSION__OBSERVATION_TIME = eINSTANCE.getInterferometryMission_ObservationTime(); - /** * The meta object literal for the '{@link satellite.impl.CommunicatingElementImpl Communicating Element}' class. * @@ -1060,14 +984,6 @@ public interface SatellitePackage extends EPackage { */ EReference COMM_SUBSYSTEM__TARGET = eINSTANCE.getCommSubsystem_Target(); - /** - * The meta object literal for the 'Source' reference list feature. - * - * - * @generated - */ - EReference COMM_SUBSYSTEM__SOURCE = eINSTANCE.getCommSubsystem_Source(); - /** * The meta object literal for the '{@link satellite.impl.PayloadImpl Payload}' class. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java index 21e385a8..d39abd4d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/CommSubsystemImpl.java @@ -2,16 +2,11 @@ */ package satellite.impl; -import java.util.Collection; import org.eclipse.emf.common.notify.Notification; -import org.eclipse.emf.common.notify.NotificationChain; -import org.eclipse.emf.common.util.EList; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.InternalEObject; import org.eclipse.emf.ecore.impl.ENotificationImpl; import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; -import org.eclipse.emf.ecore.util.EObjectWithInverseResolvingEList; -import org.eclipse.emf.ecore.util.InternalEList; import satellite.CommSubsystem; import satellite.SatellitePackage; @@ -24,7 +19,6 @@ import satellite.SatellitePackage; *

    *
      *
    • {@link satellite.impl.CommSubsystemImpl#getTarget Target}
    • - *
    • {@link satellite.impl.CommSubsystemImpl#getSource Source}
    • *
    * * @generated @@ -40,16 +34,6 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp */ protected CommSubsystem target; - /** - * The cached value of the '{@link #getSource() Source}' reference list. - * - * - * @see #getSource() - * @generated - * @ordered - */ - protected EList source; - /** * * @@ -97,25 +81,6 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp return target; } - /** - * - * - * @generated - */ - public NotificationChain basicSetTarget(CommSubsystem newTarget, NotificationChain msgs) { - CommSubsystem oldTarget = target; - target = newTarget; - if (eNotificationRequired()) { - ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, - SatellitePackage.COMM_SUBSYSTEM__TARGET, oldTarget, newTarget); - if (msgs == null) - msgs = notification; - else - msgs.add(notification); - } - return msgs; - } - /** * * @@ -123,70 +88,11 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp */ @Override public void setTarget(CommSubsystem newTarget) { - if (newTarget != target) { - NotificationChain msgs = null; - if (target != null) - msgs = ((InternalEObject) target).eInverseRemove(this, SatellitePackage.COMM_SUBSYSTEM__SOURCE, - CommSubsystem.class, msgs); - if (newTarget != null) - msgs = ((InternalEObject) newTarget).eInverseAdd(this, SatellitePackage.COMM_SUBSYSTEM__SOURCE, - CommSubsystem.class, msgs); - msgs = basicSetTarget(newTarget, msgs); - if (msgs != null) - msgs.dispatch(); - } else if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.COMM_SUBSYSTEM__TARGET, newTarget, - newTarget)); - } - - /** - * - * - * @generated - */ - @Override - public EList getSource() { - if (source == null) { - source = new EObjectWithInverseResolvingEList(CommSubsystem.class, this, - SatellitePackage.COMM_SUBSYSTEM__SOURCE, SatellitePackage.COMM_SUBSYSTEM__TARGET); - } - return source; - } - - /** - * - * - * @generated - */ - @SuppressWarnings("unchecked") - @Override - public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case SatellitePackage.COMM_SUBSYSTEM__TARGET: - if (target != null) - msgs = ((InternalEObject) target).eInverseRemove(this, SatellitePackage.COMM_SUBSYSTEM__SOURCE, - CommSubsystem.class, msgs); - return basicSetTarget((CommSubsystem) otherEnd, msgs); - case SatellitePackage.COMM_SUBSYSTEM__SOURCE: - return ((InternalEList) (InternalEList) getSource()).basicAdd(otherEnd, msgs); - } - return super.eInverseAdd(otherEnd, featureID, msgs); - } - - /** - * - * - * @generated - */ - @Override - public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) { - switch (featureID) { - case SatellitePackage.COMM_SUBSYSTEM__TARGET: - return basicSetTarget(null, msgs); - case SatellitePackage.COMM_SUBSYSTEM__SOURCE: - return ((InternalEList) getSource()).basicRemove(otherEnd, msgs); - } - return super.eInverseRemove(otherEnd, featureID, msgs); + CommSubsystem oldTarget = target; + target = newTarget; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, SatellitePackage.COMM_SUBSYSTEM__TARGET, oldTarget, + target)); } /** @@ -201,8 +107,6 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp if (resolve) return getTarget(); return basicGetTarget(); - case SatellitePackage.COMM_SUBSYSTEM__SOURCE: - return getSource(); } return super.eGet(featureID, resolve, coreType); } @@ -219,10 +123,6 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp case SatellitePackage.COMM_SUBSYSTEM__TARGET: setTarget((CommSubsystem) newValue); return; - case SatellitePackage.COMM_SUBSYSTEM__SOURCE: - getSource().clear(); - getSource().addAll((Collection) newValue); - return; } super.eSet(featureID, newValue); } @@ -238,9 +138,6 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp case SatellitePackage.COMM_SUBSYSTEM__TARGET: setTarget((CommSubsystem) null); return; - case SatellitePackage.COMM_SUBSYSTEM__SOURCE: - getSource().clear(); - return; } super.eUnset(featureID); } @@ -255,8 +152,6 @@ public abstract class CommSubsystemImpl extends MinimalEObjectImpl.Container imp switch (featureID) { case SatellitePackage.COMM_SUBSYSTEM__TARGET: return target != null; - case SatellitePackage.COMM_SUBSYSTEM__SOURCE: - return source != null && !source.isEmpty(); } return super.eIsSet(featureID); } diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/InterferometryMissionImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/InterferometryMissionImpl.java index 3401ad51..450f8a9a 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/InterferometryMissionImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/InterferometryMissionImpl.java @@ -2,12 +2,7 @@ */ package satellite.impl; -import org.eclipse.emf.common.notify.Notification; - import org.eclipse.emf.ecore.EClass; - -import org.eclipse.emf.ecore.impl.ENotificationImpl; - import satellite.InterferometryMission; import satellite.SatellitePackage; @@ -15,36 +10,10 @@ import satellite.SatellitePackage; * * An implementation of the model object 'Interferometry Mission'. * - *

    - * The following features are implemented: - *

    - *
      - *
    • {@link satellite.impl.InterferometryMissionImpl#getObservationTime Observation Time}
    • - *
    * * @generated */ public class InterferometryMissionImpl extends ConstellationMissionImpl implements InterferometryMission { - /** - * The default value of the '{@link #getObservationTime() Observation Time}' attribute. - * - * - * @see #getObservationTime() - * @generated - * @ordered - */ - protected static final float OBSERVATION_TIME_EDEFAULT = 2.0F; - - /** - * The cached value of the '{@link #getObservationTime() Observation Time}' attribute. - * - * - * @see #getObservationTime() - * @generated - * @ordered - */ - protected float observationTime = OBSERVATION_TIME_EDEFAULT; - /** * * @@ -64,103 +33,4 @@ public class InterferometryMissionImpl extends ConstellationMissionImpl implemen return SatellitePackage.Literals.INTERFEROMETRY_MISSION; } - /** - * - * - * @generated - */ - @Override - public float getObservationTime() { - return observationTime; - } - - /** - * - * - * @generated - */ - @Override - public void setObservationTime(float newObservationTime) { - float oldObservationTime = observationTime; - observationTime = newObservationTime; - if (eNotificationRequired()) - eNotify(new ENotificationImpl(this, Notification.SET, - SatellitePackage.INTERFEROMETRY_MISSION__OBSERVATION_TIME, oldObservationTime, observationTime)); - } - - /** - * - * - * @generated - */ - @Override - public Object eGet(int featureID, boolean resolve, boolean coreType) { - switch (featureID) { - case SatellitePackage.INTERFEROMETRY_MISSION__OBSERVATION_TIME: - return getObservationTime(); - } - return super.eGet(featureID, resolve, coreType); - } - - /** - * - * - * @generated - */ - @Override - public void eSet(int featureID, Object newValue) { - switch (featureID) { - case SatellitePackage.INTERFEROMETRY_MISSION__OBSERVATION_TIME: - setObservationTime((Float) newValue); - return; - } - super.eSet(featureID, newValue); - } - - /** - * - * - * @generated - */ - @Override - public void eUnset(int featureID) { - switch (featureID) { - case SatellitePackage.INTERFEROMETRY_MISSION__OBSERVATION_TIME: - setObservationTime(OBSERVATION_TIME_EDEFAULT); - return; - } - super.eUnset(featureID); - } - - /** - * - * - * @generated - */ - @Override - public boolean eIsSet(int featureID) { - switch (featureID) { - case SatellitePackage.INTERFEROMETRY_MISSION__OBSERVATION_TIME: - return observationTime != OBSERVATION_TIME_EDEFAULT; - } - return super.eIsSet(featureID); - } - - /** - * - * - * @generated - */ - @Override - public String toString() { - if (eIsProxy()) - return super.toString(); - - StringBuilder result = new StringBuilder(super.toString()); - result.append(" (observationTime: "); - result.append(observationTime); - result.append(')'); - return result.toString(); - } - } //InterferometryMissionImpl diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java index 17212a96..f6dc1e30 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/ecore-gen/satellite/impl/SatellitePackageImpl.java @@ -2,7 +2,6 @@ */ package satellite.impl; -import org.eclipse.emf.ecore.EAttribute; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.EReference; @@ -242,16 +241,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka return interferometryMissionEClass; } - /** - * - * - * @generated - */ - @Override - public EAttribute getInterferometryMission_ObservationTime() { - return (EAttribute) interferometryMissionEClass.getEStructuralFeatures().get(0); - } - /** * * @@ -322,16 +311,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka return (EReference) commSubsystemEClass.getEStructuralFeatures().get(0); } - /** - * - * - * @generated - */ - @Override - public EReference getCommSubsystem_Source() { - return (EReference) commSubsystemEClass.getEStructuralFeatures().get(1); - } - /** * * @@ -457,7 +436,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka createEReference(constellationMissionEClass, CONSTELLATION_MISSION__SPACECRAFT); interferometryMissionEClass = createEClass(INTERFEROMETRY_MISSION); - createEAttribute(interferometryMissionEClass, INTERFEROMETRY_MISSION__OBSERVATION_TIME); communicatingElementEClass = createEClass(COMMUNICATING_ELEMENT); createEReference(communicatingElementEClass, COMMUNICATING_ELEMENT__COMM_SUBSYSTEM); @@ -469,7 +447,6 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka commSubsystemEClass = createEClass(COMM_SUBSYSTEM); createEReference(commSubsystemEClass, COMM_SUBSYSTEM__TARGET); - createEReference(commSubsystemEClass, COMM_SUBSYSTEM__SOURCE); payloadEClass = createEClass(PAYLOAD); @@ -537,15 +514,12 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka initEReference(getConstellationMission_GroundStationNetwork(), this.getGroundStationNetwork(), null, "groundStationNetwork", null, 1, 1, ConstellationMission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getConstellationMission_Spacecraft(), this.getSpacecraft(), null, "spacecraft", null, 2, 50, + initEReference(getConstellationMission_Spacecraft(), this.getSpacecraft(), null, "spacecraft", null, 2, -1, ConstellationMission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(interferometryMissionEClass, InterferometryMission.class, "InterferometryMission", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEAttribute(getInterferometryMission_ObservationTime(), ecorePackage.getEFloat(), "observationTime", "2.0", - 1, 1, InterferometryMission.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, - IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(communicatingElementEClass, CommunicatingElement.class, "CommunicatingElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); @@ -564,12 +538,9 @@ public class SatellitePackageImpl extends EPackageImpl implements SatellitePacka initEClass(commSubsystemEClass, CommSubsystem.class, "CommSubsystem", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); - initEReference(getCommSubsystem_Target(), this.getCommSubsystem(), this.getCommSubsystem_Source(), "target", - null, 0, 1, CommSubsystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); - initEReference(getCommSubsystem_Source(), this.getCommSubsystem(), this.getCommSubsystem_Target(), "source", - null, 0, -1, CommSubsystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, - IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEReference(getCommSubsystem_Target(), this.getCommSubsystem(), null, "target", null, 0, 1, + CommSubsystem.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, + !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(payloadEClass, Payload.class, "Payload", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/inputs/SatelliteInstance.xmi b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/inputs/SatelliteInstance.xmi index 7b8e355a..3d07a199 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/inputs/SatelliteInstance.xmi +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/inputs/SatelliteInstance.xmi @@ -4,11 +4,4 @@ xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:satellite="http://www.example.org/satellite" - xsi:schemaLocation="http://www.example.org/satellite ../model/satellite.ecore"> - - - - - + xsi:schemaLocation="http://www.example.org/satellite ../model/satellite.ecore"/> diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore index 1685c756..9f17d43c 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.ecore @@ -5,12 +5,9 @@ - - - + upperBound="-1" eType="#//Spacecraft" containment="true"/> + @@ -21,10 +18,7 @@ containment="true"/> - - + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel index 09b5f64c..bc98abd6 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.genmodel @@ -15,9 +15,7 @@ - - - + @@ -27,7 +25,6 @@ - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin deleted file mode 100644 index 33059424..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin_diagram b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin_diagram deleted file mode 100644 index a5c675d8..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite.henshin_diagram +++ /dev/null @@ -1,131 +0,0 @@ - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite_fixup.henshin b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite_fixup.henshin deleted file mode 100644 index 224ced8f..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/model/satellite_fixup.henshin +++ /dev/null @@ -1,61 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 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 a07867dc..b0b77996 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/plugin.xml @@ -8,6 +8,7 @@ + diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/representations.aird b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/representations.aird new file mode 100644 index 00000000..efa8e366 --- /dev/null +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/representations.aird @@ -0,0 +1,2 @@ + + 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 deleted file mode 100644 index 43b2902f..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/CostObjective.xtend +++ /dev/null @@ -1,13 +0,0 @@ -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" -// } -//} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.xtend deleted file mode 100644 index ee7f0060..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/LocalSearchEngineManager.xtend +++ /dev/null @@ -1,31 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo - -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries -import java.util.WeakHashMap -import org.eclipse.emf.ecore.EObject -import org.eclipse.viatra.query.runtime.api.AdvancedViatraQueryEngine -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngine -import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions -import org.eclipse.viatra.query.runtime.emf.EMFScope -import org.eclipse.viatra.query.runtime.localsearch.matcher.integration.LocalSearchHints - -class LocalSearchEngineManager { - public static val INSTANCE = new LocalSearchEngineManager - - val WeakHashMap engineMap = new WeakHashMap - - private new() { - } - - def getEngine(EObject eObject) { - engineMap.computeIfAbsent(eObject) [ - val scope = new EMFScope(it) - val localSearchHints = LocalSearchHints.^default.build - val options = ViatraQueryEngineOptions.defineOptions.withDefaultHint(localSearchHints).withDefaultBackend( - localSearchHints.queryBackendFactory).build - val engine = AdvancedViatraQueryEngine.on(scope, options) - SatelliteQueries.instance.prepare(engine) - engine - ] - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/MetricBasedGuidanceFunction.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/MetricBasedGuidanceFunction.xtend deleted file mode 100644 index 1529794f..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/MetricBasedGuidanceFunction.xtend +++ /dev/null @@ -1,47 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo - -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 uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution - -abstract class MetricBasedGuidanceFunction implements IGuidanceFunction { - val IQuerySpecification> querySpecification - - protected new(IQuerySpecification> querySpecification) { - this.querySpecification = querySpecification - if (querySpecification.parameters.size != 1) { - throw new IllegalArgumentException("Metric must have a single parameter") - } - } - - override computeFitness(Solution model) { - val value = getMetricValue(model) - computeFitness(value) - } - - protected def double computeFitness(double metricValue) { - metricValue - } - - private def getMetricValue(Solution solution) { - val model = solution.model - val queryEngine = LocalSearchEngineManager.INSTANCE.getEngine(model) - val matcher = querySpecification.getMatcher(queryEngine) - val iterator = matcher.allMatches.iterator - if (!iterator.hasNext) { - throw new IllegalStateException("Too few matches") - } - val objectValue = iterator.next.get(0) - if (objectValue instanceof Number) { - val doubleValue = objectValue.doubleValue - if (iterator.hasNext) { - throw new IllegalStateException("Too many matches") - } - doubleValue - } else { - throw new IllegalStateException("Metric value must be a number") - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/PatternMatchConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/PatternMatchConstraint.xtend deleted file mode 100644 index b238e64f..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/PatternMatchConstraint.xtend +++ /dev/null @@ -1,29 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo - -import com.google.common.collect.ImmutableList -import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.SatelliteQueries -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution - -class PatternMatchConstraint implements IGuidanceFunction { - static val CONSTRAINT_ANNOTATION_NAME = "Constraint" - - val queries = ImmutableList.copyOf(SatelliteQueries.instance.specifications.filter [ - allAnnotations.exists[name == CONSTRAINT_ANNOTATION_NAME] - ]) - - override getName() { - "PatternMatch" - } - - override computeFitness(Solution solution) { - val model = solution.model - val queryEngine = LocalSearchEngineManager.INSTANCE.getEngine(model) - var int matchCount = 0 - for (query : queries) { - val matcher = query.getMatcher(queryEngine) - matchCount += matcher.countMatches - } - matchCount - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend deleted file mode 100644 index 58034c43..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/SatelliteMdeOptimiserMain.xtend +++ /dev/null @@ -1,51 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo - -import java.io.BufferedReader -import java.io.BufferedWriter -import java.io.FileReader -import java.io.FileWriter -import java.util.Map -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.resource.Resource -import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl -import satellite.SatellitePackage -import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run - -class SatelliteMdeOptimiserMain { - static val PROJECT_PATH = "." - static val MOPT_PATH = "src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt" - - private new() { - new IllegalStateException("This is a static utility class and should not be instantiated directly.") - } - - public static def void main(String[] args) { - Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, - new XMIResourceFactoryImpl) - EPackage.Registry.INSTANCE.put(SatellitePackage.eNS_URI, SatellitePackage.eINSTANCE) - fixupHenshinModel("model/satellite.henshin", "model/satellite_fixup.henshin", - #{"satellite.ecore" -> SatellitePackage.eNS_URI}) - Run.main(#["-p", PROJECT_PATH, "-m", MOPT_PATH]) - } - - private def static void fixupHenshinModel(String originalPath, String outputPath, Map remapMap) { - val reader = new BufferedReader(new FileReader(originalPath)) - try { - val writer = new BufferedWriter(new FileWriter(outputPath)) - try { - var String line - while ((line = reader.readLine) !== null) { - for (entry : remapMap.entrySet) { - line = line.replace(entry.key, entry.value) - } - writer.write(line) - writer.write("\n") - } - } finally { - writer.close - } - } finally { - reader.close - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt b/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt deleted file mode 100644 index e9bd1a64..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.satellite/src/hu/bme/mit/inf/dslreasoner/domains/satellite/mdeo/satellite.mopt +++ /dev/null @@ -1,36 +0,0 @@ -problem { - basepath - metamodel - model <../inputs/SatelliteInstance.xmi> -} - -goal { - objective Cost minimise java { "hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo.CostObjective" } - constraint PatternMatch java { "hu.bme.mit.inf.dslreasoner.domains.satellite.mdeo.PatternMatchConstraint" } -} - -search { -// mutate using unit "addCubeSat3U" - mutate { "CubeSat3U" } - mutate { "CubeSat6U" } - mutate { "SmallSat" } - mutate { "InterferometryPayload" } - mutate { "UHFCommSubsystem" } - mutate { "XCommSubsystem" } - mutate { "KaCommSubsystem" } -} - -solver { - optimisation provider moea algorithm NSGAII { - variation: mutation - population: 25 - mutation.step: 3 - mutation.strategy: random - } - - termination { - time: 120 - } - - batches 1 -} \ No newline at end of file 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 c1d3f7d3..1f83a3b0 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 @@ -21,6 +21,13 @@ pattern transmittingGroundStationNetwork(Station : GroundStationNetwork) { find transmittingCommSubsystem(Station, _); } +@Constraint(severity = "error", key = {Station}, + message = "The ground station network may not have UHF communication subsystems.") +pattern roundStationNetworkUHF(Station : GroundStationNetwork) { + CommunicatingElement.commSubsystem(Station, Comm); + UHFCommSubsystem(Comm); +} + // At least two spacecraft must have the interferometry payload configured @Constraint(severity = "error", key = {Mission}, @@ -97,10 +104,6 @@ private pattern cubeSat3U(Sat : CubeSat3U) { CubeSat3U(Sat); } -private pattern cubeSat6U(Sat : CubeSat6U) { - CubeSat6U(Sat); -} - // No communication loops may exist // No spacecraft may directly communicate with itself diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF index 81ee8677..2666dc5e 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/META-INF/MANIFEST.MF @@ -9,8 +9,7 @@ Bundle-Localization: plugin Export-Package: hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm, hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.impl, hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.util, - hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu, - hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated + hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu Require-Bundle: org.eclipse.viatra.query.runtime, org.eclipse.core.runtime, org.eclipse.emf.ecore;visibility:=reexport, diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml index 993ec75d..7bf4a20b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/plugin.xml @@ -9,6 +9,8 @@ + + @@ -21,10 +23,14 @@ + + + + @@ -32,72 +38,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/mutated/mutated.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/mutated/mutated.vql deleted file mode 100644 index 58f66fe2..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/mutated/mutated.vql +++ /dev/null @@ -1,270 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated - -import epackage "hu.bme.mit.inf.yakindumm" - -///////// -// Entry -///////// - -pattern entryInRegion_M0(r1 : Region, e1 : Entry) { - Region.vertices(r1, e1); -} -pattern entryInRegion_M1(r1 : Region, e1) { - Region.vertices(r1, e1); -} -pattern entryInRegion_M2(r1 : Region, e1: Entry) { - // For positive constraint - Region(r1);Entry(e1); -} - - -//@Constraint(severity="error", message="error", key = {r1}) -pattern noEntryInRegion_M0(r1 : Region) { - neg find entryInRegion_M0(r1, _); -} -pattern noEntryInRegion_M1(r1 : Region) { - neg find entryInRegion_M1(r1, _); -} -pattern noEntryInRegion_M2(r1 : Region) { - neg find entryInRegion_M2(r1, _); -} -pattern noEntryInRegion_M3(r1 : Region) { - find entryInRegion_M0(r1, _); -} -pattern noEntryInRegion_M4(r1 : Region) { - find entryInRegion_M1(r1, _); -} -pattern noEntryInRegion_M5(r1 : Region) { - find entryInRegion_M2(r1, _); -} - -//@Constraint(severity="error", message="error", key = {r}) -pattern multipleEntryInRegion_M0(r : Region) { - find entryInRegion_M0(r, e1); - find entryInRegion_M0(r, e2); - e1 != e2; -} -pattern multipleEntryInRegion_M1(r : Region) { - find entryInRegion_M1(r, e1); - find entryInRegion_M0(r, e2); - e1 != e2; -} -pattern multipleEntryInRegion_M2(r : Region) { - find entryInRegion_M2(r, e1); - find entryInRegion_M0(r, e2); - e1 != e2; -} -pattern multipleEntryInRegion_M3(r : Region) { - find entryInRegion_M0(r, e1); - find entryInRegion_M1(r, e2); - e1 != e2; -} -pattern multipleEntryInRegion_M4(r : Region) { - find entryInRegion_M2(r, e1); - find entryInRegion_M2(r, e2); - e1 != e2; -} -pattern multipleEntryInRegion_M5(r : Region) { - find entryInRegion_M0(r, e1); - find entryInRegion_M0(r, e2); -} - - -pattern transition_M0(t : Transition, src : Vertex, trg : Vertex) { - Transition.source(t, src); - Transition.target(t, trg); -} -pattern transition_M1(t : Transition, src : Vertex, trg : Vertex) { - Transition.source(t, src); - Vertex(trg); -} -pattern transition_M2(t : Transition, src : Vertex, trg : Vertex) { - Vertex(src); - Transition.target(t, trg); -} -pattern transition_M3(t : Transition, src : Vertex, trg : Vertex) { - Transition.source(t_x, src); - Transition.target(t, trg); -} -pattern transition_M4(t : Transition, src : Vertex, trg : Vertex) { - Transition.source(t, src); - Transition.target(t_x, trg); -} - -//@Constraint(severity="error", message="error", key = {e}) -pattern incomingToEntry_M0(t : Transition, e : Entry) { - find transition_M0(t, _, e); -} -pattern incomingToEntry_1(t : Transition, e) { - find transition_M0(t, _, e); -} -pattern incomingToEntry_2(t : Transition, e : Entry) { - find transition_M1(t, _, e); -} -pattern incomingToEntry_3(t : Transition, e : Entry) { - find transition_M2(t, _, e); -} -pattern incomingToEntry_4(t : Transition, e : Entry) { - find transition_M3(t, _, e); -} -pattern incomingToEntry_5(t : Transition, e : Entry) { - find transition_M4(t, _, e); -} - -pattern noOutgoingTransitionFromEntry_M0(e : Entry) { - neg find transition_M0(_, e, _); -} - -pattern noOutgoingTransitionFromEntry_M1(e) { - Vertex(e); - neg find transition_M0(_, e, _); -} -pattern noOutgoingTransitionFromEntry_M2(e : Entry) { - neg find transition_M1(_, e, _); -} -pattern noOutgoingTransitionFromEntry_M3(e : Entry) { - neg find transition_M2(_, e, _); -} -pattern noOutgoingTransitionFromEntry_M4(e : Entry) { - neg find transition_M3(_, e, _); -} -pattern noOutgoingTransitionFromEntry_M5(e : Entry) { - neg find transition_M4(_, e, _); -} - - -//@Constraint(severity="error", message="error", key = {e}) -pattern multipleTransitionFromEntry_M0(e : Entry, t1 : Transition, t2: Transition) { - Entry.outgoingTransitions(e,t1); - Entry.outgoingTransitions(e,t2); - t1!=t2; -} -pattern multipleTransitionFromEntry_M1(e, t1 : Transition, t2: Transition) { - Entry.outgoingTransitions(e,t1); - Entry.outgoingTransitions(e,t2); - t1!=t2; -} -pattern multipleTransitionFromEntry_M2(e : Entry, t1 : Transition, t2: Transition) { - Transition(t1); - Entry.outgoingTransitions(e,t2); - t1!=t2; -} -pattern multipleTransitionFromEntry_M3(e : Entry, t1 : Transition, t2: Transition) { - Entry.outgoingTransitions(e,t1); - Transition(t2); - t1!=t2; -} -pattern multipleTransitionFromEntry_M4(e : Entry, t1 : Transition, t2: Transition) { - Entry.outgoingTransitions(e,t1); - Entry.outgoingTransitions(e,t2); -} - -///////// -// Exit -///////// - -//@Constraint(severity="error", message="error", key = {e}) -pattern outgoingFromExit_M0(t : Transition, e : Exit) { - Exit.outgoingTransitions(e,t); -} -pattern outgoingFromExit_M1(t : Transition, e) { - Vertex.outgoingTransitions(e,t); -} -pattern outgoingFromExit_M2(t : Transition, e : Exit) { - Transition(t); - Exit(e); -} - -///////// -// Final -///////// - -//@Constraint(severity="error", message="error", key = {f}) -pattern outgoingFromFinal_M0(t : Transition, f : FinalState) { - FinalState.outgoingTransitions(f,t); -} -pattern outgoingFromFinal_M1(t : Transition, f) { - Vertex.outgoingTransitions(f,t); -} -pattern outgoingFromFinal_M2(t : Transition, f : FinalState) { - Transition(t); - FinalState(f); -} - -///////// -// State vs Region -///////// - -//@Constraint(severity="error", message="error", key = {region}) -pattern noStateInRegion_M0(region: Region) { - neg find StateInRegion_M0(region,_); -} -pattern noStateInRegion_M1(region: Region) { - neg find StateInRegion_M1(region,_); -} -pattern noStateInRegion_M2(region: Region) { - neg find StateInRegion_M2(region,_); -} -pattern noStateInRegion_M3(region: Region) { - find StateInRegion_M0(region,_); -} - -pattern StateInRegion_M0(region: Region, state: State) { - Region.vertices(region,state); -} -pattern StateInRegion_M1(region: Region, state) { - Region.vertices(region,state); -} -pattern StateInRegion_M2(region: Region, state:State) { - Region(region);State(state); -} - -///////// -// Choice -///////// - -@Constraint(severity="error", message="error", key = {c}) -pattern choiceHasNoOutgoing_M0(c : Choice) { - neg find transition_M0(_, c, _); -} -pattern choiceHasNoOutgoing_M1(c:Vertex) { - neg find transition_M0(_, c, _); -} -pattern choiceHasNoOutgoing_M2(c : Choice) { - neg find transition_M1(_, c, _); -} -pattern choiceHasNoOutgoing_M3(c : Choice) { - neg find transition_M2(_, c, _); -} -pattern choiceHasNoOutgoing_M4(c : Choice) { - neg find transition_M3(_, c, _); -} -pattern choiceHasNoOutgoing_M5(c : Choice) { - neg find transition_M4(_, c, _); -} -pattern choiceHasNoOutgoing_M6(c : Choice) { - find transition_M0(_, c, _); -} - -@Constraint(severity="error", message="error", key = {c}) -pattern choiceHasNoIncoming_M0(c: Choice) { - neg find transition_M0(_, _, c); -} -pattern choiceHasNoIncoming_M1(c:Vertex) { - neg find transition_M0(_, _, c); -} -pattern choiceHasNoIncoming_M2(c: Choice) { - neg find transition_M1(_, _, c); -} -pattern choiceHasNoIncoming_M3(c: Choice) { - neg find transition_M2(_, _, c); -} -pattern choiceHasNoIncoming_M4(c: Choice) { - neg find transition_M3(_, _, c); -} -pattern choiceHasNoIncoming_M5(c: Choice) { - neg find transition_M4(_, _, c); -} -pattern choiceHasNoIncoming_M6(c: Choice) { - find transition_M0(_, _, c); -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql index f4bfa3c1..98a10cde 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph/queries/hu/bme/mit/inf/dslreasoner/partialsnapshot_mavo/yakindu/patterns.vql @@ -27,14 +27,22 @@ pattern transition(t : Transition, src : Vertex, trg : Vertex) { Transition.target(t, trg); } +pattern transitionFrom(t : Transition, src : Vertex) { + Transition.source(t, src); +} + +pattern transitionTo(t : Transition, trg : Vertex) { + Transition.target(t, trg); +} + @Constraint(severity="error", message="error", key = {e}) pattern incomingToEntry(t : Transition, e : Entry) { - find transition(t, _, e); + find transitionTo(t, e); } @Constraint(severity="error", message="error", key = {e}) pattern noOutgoingTransitionFromEntry(e : Entry) { - neg find transition(_, e, _); + neg find transitionFrom(_, e); } @Constraint(severity="error", message="error", key = {e}) @@ -80,12 +88,12 @@ pattern StateInRegion(region: Region, state: State) { @Constraint(severity="error", message="error", key = {c}) pattern choiceHasNoOutgoing(c : Choice) { - neg find transition(_, c, _); + neg find transitionFrom(_, c); } @Constraint(severity="error", message="error", key = {c}) pattern choiceHasNoIncoming(c: Choice) { - neg find transition(_, _, c); + neg find transitionTo(_, c); } ///////// @@ -94,27 +102,33 @@ pattern choiceHasNoIncoming(c: Choice) { @Constraint(severity="error", message="error", key = {s}) pattern synchHasNoOutgoing(s : Synchronization) { - neg find transition(_, s, _); + neg find transitionFrom(_, s); } @Constraint(severity="error", message="error", key = {s}) pattern synchHasNoIncoming(s : Synchronization) { - neg find transition(_, _, s); + neg find transitionTo(_, s); } @Constraint(severity="error", message="error", key = {s}) -pattern SynchronizedIncomingInSameRegion(s : Synchronization, v1 : Vertex, v2 : Vertex) { - find transition(t1, v1, s); - find transition(t2, v2, s); +pattern SynchronizedIncomingInSameRegion(s : Synchronization, t1 : Transition, t2 : Transition) { + find SynchronizedIncomingInSameRegionHelper1(r, s, t1); + find SynchronizedIncomingInSameRegionHelper1(r, s, t2); t1!=t2; - Region.vertices(r, v1); - Region.vertices(r, v2); } or { - find transition(t1, s, v1); - find transition(t2, s, v2); + find SynchronizedIncomingInSameRegionHelper2(r, s, t1); + find SynchronizedIncomingInSameRegionHelper2(r, s, t2); t1!=t2; +} + +pattern SynchronizedIncomingInSameRegionHelper1(r : Region, s : Synchronization, t1 : Transition) { + find transition(t1, v1, s); + Region.vertices(r, v1); +} + +pattern SynchronizedIncomingInSameRegionHelper2(r : Region, s : Synchronization, t1 : Transition) { + find transition(t1, s, v1); Region.vertices(r, v1); - Region.vertices(r, v2); } @Constraint(severity="error", message="error", key = {s}) @@ -136,18 +150,24 @@ pattern hasMultipleIncomingTrainsition(v : Synchronization) { } @Constraint(severity="error", message="error", key = {s}) -pattern SynchronizedRegionsAreNotSiblings(s : Synchronization, v1 : Vertex, v2 : Vertex) { - find transition(_, v1, s); - find transition(_, v2, s); - CompositeElement.regions.vertices(r1, v1); - CompositeElement.regions.vertices(r2, v2); +pattern SynchronizedRegionsAreNotSiblings(s : Synchronization, r1 : CompositeElement, r2 : CompositeElement) { + find SynchronizedRegionsAreNotSiblingsHelper1(s, r1); + find SynchronizedRegionsAreNotSiblingsHelper1(s, r2); r1 != r2; } or { + find SynchronizedRegionsAreNotSiblingsHelper2(s, r1); + find SynchronizedRegionsAreNotSiblingsHelper2(s, r2); + r1 != r2; +} + +pattern SynchronizedRegionsAreNotSiblingsHelper1(s : Synchronization, r1 : CompositeElement) { find transition(_, s, v1); - find transition(_, s, v2); CompositeElement.regions.vertices(r1, v1); - CompositeElement.regions.vertices(r2, v2); - r1 != r2; +} + +pattern SynchronizedRegionsAreNotSiblingsHelper2(s : Synchronization, r1 : CompositeElement) { + find transition(_, v1, s); + CompositeElement.regions.vertices(r1, v1); } /////////////////////////////// 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 index 23632d4d..e45ec1c8 100644 --- 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 @@ -5,6 +5,7 @@ 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 @@ -46,16 +47,28 @@ class ModelGenerationStatistics { 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 { @@ -93,6 +106,7 @@ class ModelGenerationMethodProvider { boolean nameNewElements, TypeInferenceMethod typeInferenceMethod, ScopePropagatorStrategy scopePropagatorStrategy, + Collection hints, DocumentationLevel debugLevel ) { val statistics = new ModelGenerationStatistics @@ -103,8 +117,8 @@ class ModelGenerationMethodProvider { val relationConstraints = relationConstraintCalculator.calculateRelationConstraints(logicProblem) val queries = patternProvider.generateQueries(logicProblem, emptySolution, statistics, existingQueries, - workspace, typeInferenceMethod, scopePropagatorStrategy, relationConstraints, writeFiles) - val scopePropagator = createScopePropagator(scopePropagatorStrategy, emptySolution, queries, statistics) + workspace, typeInferenceMethod, scopePropagatorStrategy, relationConstraints, hints, writeFiles) + val scopePropagator = createScopePropagator(scopePropagatorStrategy, emptySolution, hints, queries, statistics) scopePropagator.propagateAllScopeConstraints val objectRefinementRules = refinementRuleProvider.createObjectRefinementRules(queries, scopePropagator, nameNewElements, statistics) @@ -138,14 +152,20 @@ class ModelGenerationMethodProvider { } private def createScopePropagator(ScopePropagatorStrategy scopePropagatorStrategy, - PartialInterpretation emptySolution, GeneratedPatterns queries, ModelGenerationStatistics statistics) { + 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.Count: + 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) @@ -160,7 +180,8 @@ class ModelGenerationMethodProvider { scopePropagatorStrategy.solver) } new PolyhedronScopePropagator(emptySolution, statistics, types, queries.multiplicityConstraintQueries, - queries.hasElementInContainmentQuery, solver, scopePropagatorStrategy.requiresUpperBoundIndexing) + 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/cardinality/LinearTypeConstraintHint.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend new file mode 100644 index 00000000..8c21ca1d --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/LinearTypeConstraintHint.xtend @@ -0,0 +1,30 @@ +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.patterns.PatternGenerator +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import org.eclipse.viatra.query.runtime.api.IPatternMatch +import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher + +interface LinearTypeExpressionBuilderFactory { + def ViatraQueryMatcher createMatcher(String queryName) + + def LinearTypeExpressionBuilder createBuilder() +} + +interface LinearTypeExpressionBuilder { + def LinearTypeExpressionBuilder add(int scale, Type type) + + def LinearBoundedExpression build() +} + +@FunctionalInterface +interface RelationConstraintUpdater { + def void update(PartialInterpretation p) +} + +interface LinearTypeConstraintHint { + def CharSequence getAdditionalPatterns(PatternGenerator patternGenerator) + + def RelationConstraintUpdater createConstraintUpdater(LinearTypeExpressionBuilderFactory builderFactory) +} 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 7c05e818..51dba244 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,5 +1,7 @@ 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 @@ -15,6 +17,7 @@ import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.par import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope import java.util.ArrayDeque import java.util.ArrayList +import java.util.Collection import java.util.HashMap import java.util.HashSet import java.util.List @@ -29,26 +32,33 @@ 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 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, - PolyhedronSolver solver, boolean propagateRelations) { + Map>> allPatternsByName, + Collection hints, PolyhedronSolver solver, boolean propagateRelations, + boolean updateHeuristic) { super(p, statistics) + this.updateHeuristic = updateHeuristic val builder = new PolyhedronBuilder(p) builder.buildPolyhedron(possibleNewDynamicTypes) scopeBounds = builder.scopeBounds topLevelBounds = builder.topLevelBounds polyhedron = builder.polyhedron operator = solver.createSaturationOperator(polyhedron) + propagateAllScopeConstraints() if (propagateRelations) { - propagateAllScopeConstraints() val maximumNumberOfNewNodes = topLevelBounds.upperBound if (maximumNumberOfNewNodes === null) { throw new IllegalStateException("Could not determine maximum number of new nodes, it may be unbounded") @@ -57,7 +67,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { throw new IllegalStateException("Maximum number of new nodes is not positive") } builder.buildMultiplicityConstraints(unfinishedMultiplicityQueries, hasElementInContainmentQuery, - maximumNumberOfNewNodes) + allPatternsByName, hints, maximumNumberOfNewNodes) relevantRelations = builder.relevantRelations updaters = builder.updaters } else { @@ -66,21 +76,40 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { } override void doPropagateAllScopeConstraints() { + super.doPropagateAllScopeConstraints() resetBounds() populatePolyhedronFromScope() // println(polyhedron) - val result = operator.saturate() -// println(polyhedron) - if (result == PolyhedronSaturationResult.EMPTY) { - setScopesInvalid() - } else { - populateScopesFromPolyhedron() - if (result != PolyhedronSaturationResult.SATURATED) { - super.propagateAllScopeConstraints() + 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) + 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) + } +// println(polyhedron) + if (updateHeuristic) { + copyScopeBoundsToHeuristic() } } - + override propagateAdditionToRelation(Relation r) { super.propagateAdditionToRelation(r) if (relevantRelations.contains(r)) { @@ -186,7 +215,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { } @FinalFieldsConstructor - private static class PolyhedronBuilder { + private static class PolyhedronBuilder implements LinearTypeExpressionBuilderFactory { static val INFINITY_SCALE = 10 val PartialInterpretation p @@ -197,6 +226,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { Map typeBounds int infinity ViatraQueryEngine queryEngine + Map>> allPatternsByName ImmutableList.Builder updatersBuilder Map scopeBounds @@ -222,9 +252,11 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { def buildMultiplicityConstraints( Map constraints, IQuerySpecification> hasElementInContainmentQuery, - int maximumNuberOfNewNodes) { + Map>> allPatternsByName, + Collection hints, int maximumNuberOfNewNodes) { infinity = maximumNuberOfNewNodes * INFINITY_SCALE queryEngine = ViatraQueryEngine.on(new EMFScope(p)) + this.allPatternsByName = allPatternsByName updatersBuilder = ImmutableList.builder val containmentConstraints = constraints.entrySet.filter[key.containment].groupBy[key.targetType] for (pair : containmentConstraints.entrySet) { @@ -238,10 +270,13 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { } } buildRelevantRelations(constraints.keySet) + for (hint : hints) { + updatersBuilder.add(hint.createConstraintUpdater(this)) + } updaters = updatersBuilder.build addCachedConstraintsToPolyhedron() } - + private def buildRelevantRelations(Set constraints) { val builder = ImmutableSet.builder for (constraint : constraints) { @@ -345,7 +380,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { } } - private def addCoefficients(Map accumulator, int scale, Map a) { + private static def addCoefficients(Map accumulator, int scale, Map a) { for (pair : a.entrySet) { val dimension = pair.key val currentValue = accumulator.get(pair.key) ?: 0 @@ -411,14 +446,41 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { } scopeBoundsBuilder.build } + + override createMatcher(String queryName) { + val querySpecification = allPatternsByName.get(queryName) + if (querySpecification === null) { + throw new IllegalArgumentException("Unknown pattern: " + queryName) + } + querySpecification.getMatcher(queryEngine) + } + + override createBuilder() { + new PolyhedronBuilderLinearTypeExpressionBuilder(this) + } } - private static interface RelationConstraintUpdater { - def void update(PartialInterpretation p) + @FinalFieldsConstructor + private static class PolyhedronBuilderLinearTypeExpressionBuilder implements LinearTypeExpressionBuilder { + val PolyhedronBuilder polyhedronBuilder + val Map coefficients = new HashMap + + override add(int scale, Type type) { + val typeCoefficients = polyhedronBuilder.subtypeDimensions.get(type) + if (typeCoefficients === null) { + throw new IllegalArgumentException("Unknown type: " + type) + } + PolyhedronBuilder.addCoefficients(coefficients, scale, typeCoefficients) + this + } + + override build() { + polyhedronBuilder.toExpression(coefficients) + } } @FinalFieldsConstructor - static class ContainmentConstraintUpdater implements RelationConstraintUpdater { + private static class ContainmentConstraintUpdater implements RelationConstraintUpdater { val String name val LinearBoundedExpression orphansLowerBound val LinearBoundedExpression orphansUpperBound @@ -460,7 +522,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { } @FinalFieldsConstructor - static class ContainmentRootConstraintUpdater implements RelationConstraintUpdater { + private static class ContainmentRootConstraintUpdater implements RelationConstraintUpdater { val LinearBoundedExpression typeCardinality val ViatraQueryMatcher hasElementInContainmentMatcher @@ -479,7 +541,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { } @FinalFieldsConstructor - static class UnfinishedMultiplicityConstraintUpdater implements RelationConstraintUpdater { + private static class UnfinishedMultiplicityConstraintUpdater implements RelationConstraintUpdater { val String name val LinearBoundedExpression availableMultiplicityExpression val ViatraQueryMatcher unfinishedMultiplicityMatcher @@ -500,7 +562,7 @@ class PolyhedronScopePropagator extends TypeHierarchyScopePropagator { } @FinalFieldsConstructor - static class UnrepairableMultiplicityConstraintUpdater implements RelationConstraintUpdater { + private static class UnrepairableMultiplicityConstraintUpdater implements RelationConstraintUpdater { val String name val LinearBoundedExpression targetCardinalityExpression val ViatraQueryMatcher unrepairableMultiplicityMatcher 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 9c6cb82e..4e046190 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 @@ -3,6 +3,7 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality import java.util.List import java.util.Map import org.eclipse.xtend.lib.annotations.Accessors +import org.eclipse.xtend.lib.annotations.Data import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor interface PolyhedronSolver { @@ -52,16 +53,66 @@ class Polyhedron { val List expressionsToSaturate override toString() ''' - Dimensions: - «FOR dimension : dimensions» - «dimension» - «ENDFOR» - Constraints: - «FOR constraint : constraints» - «constraint» - «ENDFOR» + Dimensions: + «FOR dimension : dimensions» + «dimension» + «ENDFOR» + Constraints: + «FOR constraint : constraints» + «constraint» + «ENDFOR» ''' + def createSignature() { + val size = dimensions.size + constraints.size + val lowerBounds = newArrayOfSize(size) + val upperBounds = newArrayOfSize(size) + var int i = 0 + for (dimension : dimensions) { + lowerBounds.set(i, dimension.lowerBound) + upperBounds.set(i, dimension.upperBound) + i++ + } + for (constraint : constraints) { + lowerBounds.set(i, constraint.lowerBound) + upperBounds.set(i, constraint.upperBound) + i++ + } + new PolyhedronSignature.Bounds(lowerBounds, upperBounds) + } + + def applySignature(PolyhedronSignature.Bounds signature) { + val lowerBounds = signature.lowerBounds + val upperBounds = signature.upperBounds + var int i = 0 + for (dimension : dimensions) { + dimension.lowerBound = lowerBounds.get(i) + dimension.upperBound = upperBounds.get(i) + i++ + } + for (constraint : constraints) { + constraint.lowerBound = lowerBounds.get(i) + constraint.upperBound = upperBounds.get(i) + i++ + } + } +} + +abstract class PolyhedronSignature { + public static val EMPTY = new PolyhedronSignature { + override toString() { + "PolyhedronSignature.EMPTY" + } + } + + private new() { + } + + @Data + static class Bounds extends PolyhedronSignature { + val Integer[] lowerBounds + val Integer[] upperBounds + } } @Accessors @@ -80,6 +131,11 @@ abstract class LinearBoundedExpression { upperBound = tighterBound } } + + def void assertEqualsTo(int bound) { + tightenLowerBound(bound) + tightenUpperBound(bound) + } } @Accessors diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/RelationConstraintCalculator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/RelationConstraintCalculator.xtend index 52a390a8..013e53e1 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/RelationConstraintCalculator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/RelationConstraintCalculator.xtend @@ -117,9 +117,12 @@ class RelationConstraintCalculator { var inverseUpperMultiplicity = -1 val inverseRelation = inverseRelations.get(relation) if (inverseRelation !== null) { - inverseUpperMultiplicity = upperMultiplicities.get(relation) + inverseUpperMultiplicity = upperMultiplicities.get(inverseRelation) container = containmentRelations.contains(inverseRelation) } + if (containment) { + inverseUpperMultiplicity = 1 + } val constraint = new RelationMultiplicityConstraint(relation, inverseRelation, containment, container, lowerMultiplicity, upperMultiplicity, inverseUpperMultiplicity) if (constraint.isActive) { diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend index 0bdb202e..2376fb38 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagator.xtend @@ -14,7 +14,7 @@ import org.eclipse.xtend.lib.annotations.Accessors class ScopePropagator { @Accessors(PROTECTED_GETTER) val PartialInterpretation partialInterpretation - val ModelGenerationStatistics statistics + @Accessors(PROTECTED_GETTER) val ModelGenerationStatistics statistics val Map type2Scope @Accessors(PROTECTED_GETTER) val Map> superScopes @Accessors(PROTECTED_GETTER) val Map> subScopes @@ -59,12 +59,21 @@ class ScopePropagator { } } } while (changed) + + copyScopeBoundsToHeuristic() } def propagateAllScopeConstraints() { statistics.incrementScopePropagationCount() doPropagateAllScopeConstraints() } + + protected def copyScopeBoundsToHeuristic() { + partialInterpretation.minNewElementsHeuristic = partialInterpretation.minNewElements + for (scope : partialInterpretation.scopes) { + scope.minNewElementsHeuristic = scope.minNewElements + } + } protected def void doPropagateAllScopeConstraints() { // Nothing to propagate. @@ -73,12 +82,17 @@ class ScopePropagator { def propagateAdditionToType(PartialTypeInterpratation t) { // println('''Adding to «(t as PartialComplexTypeInterpretation).interpretationOf.name»''') val targetScope = type2Scope.get(t) - targetScope.removeOne - val sups = superScopes.get(targetScope) - sups.forEach[removeOne] + if (targetScope !== null) { + targetScope.removeOne + val sups = superScopes.get(targetScope) + sups.forEach[removeOne] + } if (this.partialInterpretation.minNewElements > 0) { this.partialInterpretation.minNewElements = this.partialInterpretation.minNewElements - 1 } + if (this.partialInterpretation.minNewElementsHeuristic > 0) { + this.partialInterpretation.minNewElementsHeuristic = this.partialInterpretation.minNewElementsHeuristic - 1 + } if (this.partialInterpretation.maxNewElements > 0) { this.partialInterpretation.maxNewElements = this.partialInterpretation.maxNewElements - 1 } else if (this.partialInterpretation.maxNewElements === 0) { @@ -105,5 +119,8 @@ class ScopePropagator { if (scope.minNewElements > 0) { scope.minNewElements = scope.minNewElements - 1 } + if (scope.minNewElementsHeuristic > 0) { + scope.minNewElementsHeuristic = scope.minNewElementsHeuristic - 1 + } } } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagatorStrategy.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagatorStrategy.xtend index b0ed75cb..3165917a 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagatorStrategy.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/ScopePropagatorStrategy.xtend @@ -16,7 +16,9 @@ enum PolyhedralScopePropagatorSolver { } abstract class ScopePropagatorStrategy { - public static val Count = new Simple("Count") + public static val None = new Simple("None") + + public static val Basic = new Simple("Basic") public static val BasicTypeHierarchy = new Simple("BasicTypeHierarchy") @@ -47,14 +49,19 @@ abstract class ScopePropagatorStrategy { val PolyhedralScopePropagatorConstraints constraints val PolyhedralScopePropagatorSolver solver + val boolean updateHeuristic val double timeoutSeconds @FinalFieldsConstructor new() { } + new(PolyhedralScopePropagatorConstraints constraints, PolyhedralScopePropagatorSolver solver, boolean updateHeuristic) { + this(constraints, solver, updateHeuristic, UNLIMITED_TIME) + } + new(PolyhedralScopePropagatorConstraints constraints, PolyhedralScopePropagatorSolver solver) { - this(constraints, solver, UNLIMITED_TIME) + this(constraints, solver, true) } override requiresUpperBoundIndexing() { diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/TypeHierarchyScopePropagator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/TypeHierarchyScopePropagator.xtend index be8ef00a..d1704b39 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/TypeHierarchyScopePropagator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/TypeHierarchyScopePropagator.xtend @@ -27,12 +27,16 @@ class TypeHierarchyScopePropagator extends ScopePropagator { } private def propagateLowerLimitUp(Scope subScope, Scope superScope) { + var changed = false if (subScope.minNewElements > superScope.minNewElements) { superScope.minNewElements = subScope.minNewElements - return true - } else { - return false + changed = true + } + if (subScope.minNewElementsHeuristic > superScope.minNewElementsHeuristic) { + superScope.minNewElementsHeuristic = subScope.minNewElementsHeuristic + changed = true } + changed } private def propagateUpperLimitDown(Scope subScope, Scope superScope) { @@ -50,16 +54,20 @@ class TypeHierarchyScopePropagator extends ScopePropagator { } private def propagateLowerLimitUp(Scope subScope, PartialInterpretation p) { + var changed = false if (subScope.minNewElements > p.minNewElements) { // println(''' // «(subScope.targetTypeInterpretation as PartialComplexTypeInterpretation).interpretationOf.name» -> nodes // p.minNewElements «p.minNewElements» = subScope.minNewElements «subScope.minNewElements» // ''') p.minNewElements = subScope.minNewElements - return true - } else { - return false + changed = true + } + if (subScope.minNewElementsHeuristic > p.minNewElementsHeuristic) { + p.minNewElementsHeuristic = subScope.minNewElementsHeuristic + changed = true } + changed } private def propagateUpperLimitDown(Scope subScope, PartialInterpretation p) { diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/Z3PolyhedronSolver.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/Z3PolyhedronSolver.xtend index 23444956..3b831433 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/Z3PolyhedronSolver.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/cardinality/Z3PolyhedronSolver.xtend @@ -13,6 +13,7 @@ import java.math.BigDecimal import java.math.MathContext import java.math.RoundingMode import java.util.Map +import org.eclipse.xtend.lib.annotations.Accessors import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor class Z3PolyhedronSolver implements PolyhedronSolver { @@ -28,10 +29,33 @@ class Z3PolyhedronSolver implements PolyhedronSolver { } override createSaturationOperator(Polyhedron polyhedron) { + new DisposingZ3SaturationOperator(this, polyhedron) + } + + def createPersistentSaturationOperator(Polyhedron polyhedron) { new Z3SaturationOperator(polyhedron, lpRelaxation, timeoutSeconds) } } +@FinalFieldsConstructor +class DisposingZ3SaturationOperator implements PolyhedronSaturationOperator { + val Z3PolyhedronSolver solver + @Accessors val Polyhedron polyhedron + + override saturate() { + val persistentOperator = solver.createPersistentSaturationOperator(polyhedron) + try { + persistentOperator.saturate + } finally { + persistentOperator.close + } + } + + override close() throws Exception { + // Nothing to close. + } +} + class Z3SaturationOperator extends AbstractPolyhedronSaturationOperator { static val INFINITY_SYMBOL_NAME = "oo" static val MULT_SYMBOL_NAME = "*" @@ -106,9 +130,9 @@ class Z3SaturationOperator extends AbstractPolyhedronSaturationOperator { IntNum: resultExpr.getInt() RatNum: - floor(resultExpr) + ceil(resultExpr) AlgebraicNum: - floor(resultExpr.toLower(ALGEBRAIC_NUMBER_ROUNDING)) + ceil(resultExpr.toUpper(ALGEBRAIC_NUMBER_ROUNDING)) default: if (isNegativeInfinity(resultExpr)) { null @@ -136,9 +160,9 @@ class Z3SaturationOperator extends AbstractPolyhedronSaturationOperator { IntNum: resultExpr.getInt() RatNum: - ceil(resultExpr) + floor(resultExpr) AlgebraicNum: - ceil(resultExpr.toUpper(ALGEBRAIC_NUMBER_ROUNDING)) + floor(resultExpr.toLower(ALGEBRAIC_NUMBER_ROUNDING)) default: if (isPositiveInfinity(resultExpr)) { null diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend index 1b0db90e..5c35fb54 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternGenerator.xtend @@ -16,8 +16,11 @@ import hu.bme.mit.inf.dslreasoner.viatra2logic.viatra2logicannotations.Transform import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.TypeAnalysisResult 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.RelationConstraints +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import java.util.Collection import java.util.HashMap import java.util.Map import org.eclipse.emf.ecore.EAttribute @@ -26,7 +29,6 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery import org.eclipse.xtend.lib.annotations.Accessors import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* -import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy class PatternGenerator { @Accessors(PUBLIC_GETTER) val TypeIndexer typeIndexer // = new TypeIndexer(this) @@ -104,7 +106,9 @@ class PatternGenerator { } def isRepresentative(Relation relation, Relation inverse) { - if (inverse === null) { + if (relation === null) { + return false + } else if (inverse === null) { return true } else { relation.name.compareTo(inverse.name) < 1 @@ -144,7 +148,8 @@ class PatternGenerator { PartialInterpretation emptySolution, Map fqn2PQuery, TypeAnalysisResult typeAnalysisResult, - RelationConstraints constraints + RelationConstraints constraints, + Collection hints ) { return ''' @@ -294,6 +299,13 @@ class PatternGenerator { // 4.3 Relation refinement ////////// «relationRefinementGenerator.generateRefineReference(problem)» + + ////////// + // 5 Hints + ////////// + «FOR hint : hints» + «hint.getAdditionalPatterns(this)» + «ENDFOR» ''' } } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend index eadf0ae0..f5c85524 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/PatternProvider.xtend @@ -26,6 +26,7 @@ import org.eclipse.viatra.query.runtime.matchers.psystem.queries.PQuery import org.eclipse.xtend.lib.annotations.Data import static extension hu.bme.mit.inf.dslreasoner.util.CollectionsUtil.* +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint @Data class GeneratedPatterns { @@ -62,7 +63,8 @@ class PatternProvider { def generateQueries(LogicProblem problem, PartialInterpretation emptySolution, ModelGenerationStatistics statistics, Set existingQueries, ReasonerWorkspace workspace, TypeInferenceMethod typeInferenceMethod, - ScopePropagatorStrategy scopePropagatorStrategy, RelationConstraints relationConstraints, boolean writeToFile) { + ScopePropagatorStrategy scopePropagatorStrategy, RelationConstraints relationConstraints, + Collection hints, boolean writeToFile) { val fqn2Query = existingQueries.toMap[it.fullyQualifiedName] val PatternGenerator patternGenerator = new PatternGenerator(typeInferenceMethod, scopePropagatorStrategy) val typeAnalysisResult = if (patternGenerator.requiresTypeAnalysis) { @@ -75,7 +77,7 @@ class PatternProvider { null } val baseIndexerFile = patternGenerator.transformBaseProperties(problem, emptySolution, fqn2Query, - typeAnalysisResult, relationConstraints) + typeAnalysisResult, relationConstraints, hints) if (writeToFile) { workspace.writeText('''generated3valued.vql_deactivated''', baseIndexerFile) } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend index fa73c861..d915d47e 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/RelationRefinementGenerator.xtend @@ -44,7 +44,7 @@ class RelationRefinementGenerator { def referRefinementQuery(RelationDeclaration relation, Relation inverseRelation, String relInterpretationName, String inverseInterpretationName, String sourceName, - String targetName) '''find «this.relationRefinementQueryName(relation,inverseRelation)»(problem, interpretation, «relInterpretationName», «IF inverseRelation !== null»inverseInterpretationName, «ENDIF»«sourceName», «targetName»);''' + String targetName) '''find «this.relationRefinementQueryName(relation,inverseRelation)»(problem, interpretation, «relInterpretationName», «IF inverseRelation !== null»«inverseInterpretationName», «ENDIF»«sourceName», «targetName»);''' def getRefineRelationQueries(LogicProblem p) { // val containmentRelations = p.containmentHierarchies.map[containmentRelations].flatten.toSet diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend index 15b5a047..a8a07756 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/patterns/UnfinishedIndexer.xtend @@ -1,5 +1,6 @@ package hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RelationDeclaration import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.RelationMultiplicityConstraint @@ -76,21 +77,26 @@ class UnfinishedIndexer { «IF indexUpperMultiplicities» «IF constraint.constrainsUnrepairable || constraint.constrainsRemainingInverse» private pattern «repairMatchName(constraint)»(problem:LogicProblem, interpretation:PartialInterpretation, source:DefinedElement, target:DefinedElement) { - find interpretation(problem,interpretation); - find mustExist(problem,interpretation,source); - «base.typeIndexer.referInstanceOf(constraint.sourceType,Modality::MUST,"source")» - find mustExist(problem,interpretation,target); - «base.typeIndexer.referInstanceOf(constraint.targetType,Modality::MUST,"target")» - neg «base.referRelation(constraint.relation,"source","target",Modality.MUST,fqn2PQuery)» - «base.referRelation(constraint.relation,"source","target",Modality.MAY,fqn2PQuery)» + «IF base.isRepresentative(constraint.relation, constraint.inverseRelation) && constraint.relation instanceof RelationDeclaration» + «base.relationRefinementGenerator.referRefinementQuery(constraint.relation as RelationDeclaration, constraint.inverseRelation, "_", "_", "source", "target")» + «ELSE» + «IF base.isRepresentative(constraint.inverseRelation, constraint.relation) && constraint.inverseRelation instanceof RelationDeclaration» + «base.relationRefinementGenerator.referRefinementQuery(constraint.inverseRelation as RelationDeclaration, constraint.relation, "_", "_", "target", "source")» + «ELSE» + find interpretation(problem,interpretation); + find mustExist(problem,interpretation,source); + «base.typeIndexer.referInstanceOf(constraint.sourceType,Modality::MUST,"source")» + find mustExist(problem,interpretation,target); + «base.typeIndexer.referInstanceOf(constraint.targetType,Modality::MUST,"target")» + neg «base.referRelation(constraint.relation,"source","target",Modality.MUST,fqn2PQuery)» + «base.referRelation(constraint.relation,"source","target",Modality.MAY,fqn2PQuery)» + «ENDIF» + «ENDIF» } «ENDIF» «IF constraint.constrainsUnrepairable» private pattern «unrepairableMultiplicityName(constraint)»_helper(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement, unrepairableMultiplicity:java Integer) { - find interpretation(problem,interpretation); - find mustExist(problem,interpretation,object); - «base.typeIndexer.referInstanceOf(constraint.sourceType,Modality::MUST,"object")» find «unfinishedMultiplicityName(constraint)»_helper(problem, interpretation, object, missingMultiplicity); numberOfRepairMatches == count find «repairMatchName(constraint)»(problem, interpretation, object, _); check(numberOfRepairMatches < missingMultiplicity); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend index bf816de9..7891ebd8 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra/src/hu/bme/mit/inf/dslreasoner/viatrasolver/logic2viatra/rules/RefinementRuleProvider.xtend @@ -67,7 +67,8 @@ class RefinementRuleProvider { if(containmentRelation != null) { if(inverseRelation!= null) { ruleBuilder.action[match | - //println(name) + statistics.incrementTransformationCount +// println(name) val startTime = System.nanoTime //val problem = match.get(0) as LogicProblem val interpretation = match.get(1) as PartialInterpretation @@ -107,7 +108,8 @@ class RefinementRuleProvider { ] } else { ruleBuilder.action[match | - //println(name) + statistics.incrementTransformationCount +// println(name) val startTime = System.nanoTime //val problem = match.get(0) as LogicProblem val interpretation = match.get(1) as PartialInterpretation @@ -144,6 +146,9 @@ class RefinementRuleProvider { } } else { ruleBuilder.action[match | + statistics.incrementTransformationCount +// println(name) + val startTime = System.nanoTime //val problem = match.get(0) as LogicProblem val interpretation = match.get(1) as PartialInterpretation @@ -198,8 +203,9 @@ class RefinementRuleProvider { .precondition(lhs) if (inverseRelation == null) { ruleBuilder.action [ match | + statistics.incrementTransformationCount val startTime = System.nanoTime - //println(name) +// println(name) // val problem = match.get(0) as LogicProblem // val interpretation = match.get(1) as PartialInterpretation val relationInterpretation = match.get(2) as PartialRelationInterpretation @@ -217,8 +223,9 @@ class RefinementRuleProvider { ] } else { ruleBuilder.action [ match | + statistics.incrementTransformationCount val startTime = System.nanoTime - //println(name) +// println(name) // val problem = match.get(0) as LogicProblem // val interpretation = match.get(1) as PartialInterpretation val relationInterpretation = match.get(2) as PartialRelationInterpretation diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java index 098cc15b..9d0c3fea 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialInterpretation.java @@ -30,6 +30,7 @@ import org.eclipse.emf.ecore.EObject; *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getScopes Scopes}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElements Min New Elements}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMaxNewElements Max New Elements}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElementsHeuristic Min New Elements Heuristic}
  • * * * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation() @@ -255,4 +256,27 @@ public interface PartialInterpretation extends EObject { */ void setMaxNewElements(int value); + /** + * Returns the value of the 'Min New Elements Heuristic' attribute. + * The default value is "0". + * + * + * @return the value of the 'Min New Elements Heuristic' attribute. + * @see #setMinNewElementsHeuristic(int) + * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getPartialInterpretation_MinNewElementsHeuristic() + * @model default="0" required="true" + * @generated + */ + int getMinNewElementsHeuristic(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElementsHeuristic Min New Elements Heuristic}' attribute. + * + * + * @param value the new value of the 'Min New Elements Heuristic' attribute. + * @see #getMinNewElementsHeuristic() + * @generated + */ + void setMinNewElementsHeuristic(int value); + } // PartialInterpretation diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java index 4f34b9b7..f462ebe4 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/PartialinterpretationPackage.java @@ -166,6 +166,15 @@ public interface PartialinterpretationPackage extends EPackage { */ int PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS = 10; + /** + * The feature id for the 'Min New Elements Heuristic' attribute. + * + * + * @generated + * @ordered + */ + int PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC = 11; + /** * The number of structural features of the 'Partial Interpretation' class. * @@ -173,7 +182,7 @@ public interface PartialinterpretationPackage extends EPackage { * @generated * @ordered */ - int PARTIAL_INTERPRETATION_FEATURE_COUNT = 11; + int PARTIAL_INTERPRETATION_FEATURE_COUNT = 12; /** * The number of operations of the 'Partial Interpretation' class. @@ -912,6 +921,15 @@ public interface PartialinterpretationPackage extends EPackage { */ int SCOPE__TARGET_TYPE_INTERPRETATION = 2; + /** + * The feature id for the 'Min New Elements Heuristic' attribute. + * + * + * @generated + * @ordered + */ + int SCOPE__MIN_NEW_ELEMENTS_HEURISTIC = 3; + /** * The number of structural features of the 'Scope' class. * @@ -919,7 +937,7 @@ public interface PartialinterpretationPackage extends EPackage { * @generated * @ordered */ - int SCOPE_FEATURE_COUNT = 3; + int SCOPE_FEATURE_COUNT = 4; /** * The number of operations of the 'Scope' class. @@ -1357,6 +1375,17 @@ public interface PartialinterpretationPackage extends EPackage { */ EAttribute getPartialInterpretation_MaxNewElements(); + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElementsHeuristic Min New Elements Heuristic}'. + * + * + * @return the meta object for the attribute 'Min New Elements Heuristic'. + * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation#getMinNewElementsHeuristic() + * @see #getPartialInterpretation() + * @generated + */ + EAttribute getPartialInterpretation_MinNewElementsHeuristic(); + /** * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialConstantInterpretation Partial Constant Interpretation}'. * @@ -1749,6 +1778,17 @@ public interface PartialinterpretationPackage extends EPackage { */ EReference getScope_TargetTypeInterpretation(); + /** + * Returns the meta object for the attribute '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMinNewElementsHeuristic Min New Elements Heuristic}'. + * + * + * @return the meta object for the attribute 'Min New Elements Heuristic'. + * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMinNewElementsHeuristic() + * @see #getScope() + * @generated + */ + EAttribute getScope_MinNewElementsHeuristic(); + /** * Returns the meta object for class '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialPrimitiveInterpretation Partial Primitive Interpretation}'. * @@ -1952,6 +1992,14 @@ public interface PartialinterpretationPackage extends EPackage { */ EAttribute PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS = eINSTANCE.getPartialInterpretation_MaxNewElements(); + /** + * The meta object literal for the 'Min New Elements Heuristic' attribute feature. + * + * + * @generated + */ + EAttribute PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC = eINSTANCE.getPartialInterpretation_MinNewElementsHeuristic(); + /** * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialConstantInterpretationImpl Partial Constant Interpretation}' class. * @@ -2278,6 +2326,14 @@ public interface PartialinterpretationPackage extends EPackage { */ EReference SCOPE__TARGET_TYPE_INTERPRETATION = eINSTANCE.getScope_TargetTypeInterpretation(); + /** + * The meta object literal for the 'Min New Elements Heuristic' attribute feature. + * + * + * @generated + */ + EAttribute SCOPE__MIN_NEW_ELEMENTS_HEURISTIC = eINSTANCE.getScope_MinNewElementsHeuristic(); + /** * The meta object literal for the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialPrimitiveInterpretationImpl Partial Primitive Interpretation}' class. * diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/Scope.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/Scope.java index 155b9f00..a0b58615 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/Scope.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/Scope.java @@ -16,6 +16,7 @@ import org.eclipse.emf.ecore.EObject; *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMinNewElements Min New Elements}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMaxNewElements Max New Elements}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getTargetTypeInterpretation Target Type Interpretation}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMinNewElementsHeuristic Min New Elements Heuristic}
  • * * * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getScope() @@ -105,4 +106,27 @@ public interface Scope extends EObject { */ void setTargetTypeInterpretation(PartialTypeInterpratation value); + /** + * Returns the value of the 'Min New Elements Heuristic' attribute. + * The default value is "0". + * + * + * @return the value of the 'Min New Elements Heuristic' attribute. + * @see #setMinNewElementsHeuristic(int) + * @see hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialinterpretationPackage#getScope_MinNewElementsHeuristic() + * @model default="0" required="true" + * @generated + */ + int getMinNewElementsHeuristic(); + + /** + * Sets the value of the '{@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.Scope#getMinNewElementsHeuristic Min New Elements Heuristic}' attribute. + * + * + * @param value the new value of the 'Min New Elements Heuristic' attribute. + * @see #getMinNewElementsHeuristic() + * @generated + */ + void setMinNewElementsHeuristic(int value); + } // Scope diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java index f5efe02a..ca33dd65 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BinaryElementRelationLinkImpl.java @@ -73,6 +73,7 @@ public class BinaryElementRelationLinkImpl extends RelationLinkImpl implements B * * @generated */ + @Override public DefinedElement getParam1() { if (param1 != null && param1.eIsProxy()) { InternalEObject oldParam1 = (InternalEObject)param1; @@ -99,6 +100,7 @@ public class BinaryElementRelationLinkImpl extends RelationLinkImpl implements B * * @generated */ + @Override public void setParam1(DefinedElement newParam1) { DefinedElement oldParam1 = param1; param1 = newParam1; @@ -111,6 +113,7 @@ public class BinaryElementRelationLinkImpl extends RelationLinkImpl implements B * * @generated */ + @Override public DefinedElement getParam2() { if (param2 != null && param2.eIsProxy()) { InternalEObject oldParam2 = (InternalEObject)param2; @@ -137,6 +140,7 @@ public class BinaryElementRelationLinkImpl extends RelationLinkImpl implements B * * @generated */ + @Override public void setParam2(DefinedElement newParam2) { DefinedElement oldParam2 = param2; param2 = newParam2; diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BooleanElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BooleanElementImpl.java index e906e07d..5f12d9e4 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BooleanElementImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/BooleanElementImpl.java @@ -69,6 +69,7 @@ public class BooleanElementImpl extends PrimitiveElementImpl implements BooleanE * * @generated */ + @Override public boolean isValue() { return value; } @@ -78,6 +79,7 @@ public class BooleanElementImpl extends PrimitiveElementImpl implements BooleanE * * @generated */ + @Override public void setValue(boolean newValue) { boolean oldValue = value; value = newValue; @@ -152,7 +154,7 @@ public class BooleanElementImpl extends PrimitiveElementImpl implements BooleanE public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (value: "); result.append(value); result.append(')'); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/IntegerElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/IntegerElementImpl.java index ef1a4b96..c8fbe1dd 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/IntegerElementImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/IntegerElementImpl.java @@ -69,6 +69,7 @@ public class IntegerElementImpl extends PrimitiveElementImpl implements IntegerE * * @generated */ + @Override public int getValue() { return value; } @@ -78,6 +79,7 @@ public class IntegerElementImpl extends PrimitiveElementImpl implements IntegerE * * @generated */ + @Override public void setValue(int newValue) { int oldValue = value; value = newValue; @@ -152,7 +154,7 @@ public class IntegerElementImpl extends PrimitiveElementImpl implements IntegerE public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (value: "); result.append(value); result.append(')'); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java index 749a03c5..c319a3f4 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkElementImpl.java @@ -83,6 +83,7 @@ public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container im * * @generated */ + @Override public int getIndex() { return index; } @@ -92,6 +93,7 @@ public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container im * * @generated */ + @Override public void setIndex(int newIndex) { int oldIndex = index; index = newIndex; @@ -104,6 +106,7 @@ public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container im * * @generated */ + @Override public DefinedElement getParam() { if (param != null && param.eIsProxy()) { InternalEObject oldParam = (InternalEObject)param; @@ -130,6 +133,7 @@ public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container im * * @generated */ + @Override public void setParam(DefinedElement newParam) { DefinedElement oldParam = param; param = newParam; @@ -215,7 +219,7 @@ public class NaryRelationLinkElementImpl extends MinimalEObjectImpl.Container im public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (index: "); result.append(index); result.append(')'); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java index f387ee06..9f7628cf 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/NaryRelationLinkImpl.java @@ -66,6 +66,7 @@ public class NaryRelationLinkImpl extends RelationLinkImpl implements NaryRelati * * @generated */ + @Override public EList getElements() { if (elements == null) { elements = new EObjectContainmentEList(NaryRelationLinkElement.class, this, PartialinterpretationPackage.NARY_RELATION_LINK__ELEMENTS); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialComplexTypeInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialComplexTypeInterpretationImpl.java index 07ee282d..c00b4278 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialComplexTypeInterpretationImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialComplexTypeInterpretationImpl.java @@ -79,6 +79,7 @@ public class PartialComplexTypeInterpretationImpl extends PartialTypeInterpratat * * @generated */ + @Override public EList getSupertypeInterpretation() { if (supertypeInterpretation == null) { supertypeInterpretation = new EObjectResolvingEList(PartialComplexTypeInterpretation.class, this, PartialinterpretationPackage.PARTIAL_COMPLEX_TYPE_INTERPRETATION__SUPERTYPE_INTERPRETATION); @@ -91,6 +92,7 @@ public class PartialComplexTypeInterpretationImpl extends PartialTypeInterpratat * * @generated */ + @Override public TypeDeclaration getInterpretationOf() { if (interpretationOf != null && interpretationOf.eIsProxy()) { InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; @@ -117,6 +119,7 @@ public class PartialComplexTypeInterpretationImpl extends PartialTypeInterpratat * * @generated */ + @Override public void setInterpretationOf(TypeDeclaration newInterpretationOf) { TypeDeclaration oldInterpretationOf = interpretationOf; interpretationOf = newInterpretationOf; diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java index 81b2ce8d..6d51f0db 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialConstantInterpretationImpl.java @@ -63,6 +63,7 @@ public class PartialConstantInterpretationImpl extends MinimalEObjectImpl.Contai * * @generated */ + @Override public ConstantDeclaration getInterpretationOf() { if (interpretationOf != null && interpretationOf.eIsProxy()) { InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; @@ -89,6 +90,7 @@ public class PartialConstantInterpretationImpl extends MinimalEObjectImpl.Contai * * @generated */ + @Override public void setInterpretationOf(ConstantDeclaration newInterpretationOf) { ConstantDeclaration oldInterpretationOf = interpretationOf; interpretationOf = newInterpretationOf; diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java index 2d361e8e..855c4abc 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialFunctionInterpretationImpl.java @@ -63,6 +63,7 @@ public class PartialFunctionInterpretationImpl extends MinimalEObjectImpl.Contai * * @generated */ + @Override public FunctionDeclaration getInterpretationOf() { if (interpretationOf != null && interpretationOf.eIsProxy()) { InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; @@ -89,6 +90,7 @@ public class PartialFunctionInterpretationImpl extends MinimalEObjectImpl.Contai * * @generated */ + @Override public void setInterpretationOf(FunctionDeclaration newInterpretationOf) { FunctionDeclaration oldInterpretationOf = interpretationOf; interpretationOf = newInterpretationOf; diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java index bce3e2e0..9afdd8d2 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialInterpretationImpl.java @@ -47,6 +47,7 @@ import org.eclipse.emf.ecore.util.InternalEList; *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getScopes Scopes}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getMinNewElements Min New Elements}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getMaxNewElements Max New Elements}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.PartialInterpretationImpl#getMinNewElementsHeuristic Min New Elements Heuristic}
  • * * * @generated @@ -182,6 +183,26 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl */ protected int maxNewElements = MAX_NEW_ELEMENTS_EDEFAULT; + /** + * The default value of the '{@link #getMinNewElementsHeuristic() Min New Elements Heuristic}' attribute. + * + * + * @see #getMinNewElementsHeuristic() + * @generated + * @ordered + */ + protected static final int MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getMinNewElementsHeuristic() Min New Elements Heuristic}' attribute. + * + * + * @see #getMinNewElementsHeuristic() + * @generated + * @ordered + */ + protected int minNewElementsHeuristic = MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT; + /** * * @@ -206,6 +227,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public LogicProblem getProblem() { if (problem != null && problem.eIsProxy()) { InternalEObject oldProblem = (InternalEObject)problem; @@ -232,6 +254,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public void setProblem(LogicProblem newProblem) { LogicProblem oldProblem = problem; problem = newProblem; @@ -244,6 +267,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public EList getPartialconstantinterpretation() { if (partialconstantinterpretation == null) { partialconstantinterpretation = new EObjectContainmentEList(PartialConstantInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALCONSTANTINTERPRETATION); @@ -256,6 +280,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public EList getPartialrelationinterpretation() { if (partialrelationinterpretation == null) { partialrelationinterpretation = new EObjectContainmentEList(PartialRelationInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALRELATIONINTERPRETATION); @@ -268,6 +293,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public EList getPartialfunctioninterpretation() { if (partialfunctioninterpretation == null) { partialfunctioninterpretation = new EObjectContainmentEList(PartialFunctionInterpretation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALFUNCTIONINTERPRETATION); @@ -280,6 +306,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public EList getNewElements() { if (newElements == null) { newElements = new EObjectContainmentEList(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__NEW_ELEMENTS); @@ -292,6 +319,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public EList getPartialtypeinterpratation() { if (partialtypeinterpratation == null) { partialtypeinterpratation = new EObjectContainmentEList(PartialTypeInterpratation.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__PARTIALTYPEINTERPRATATION); @@ -304,6 +332,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public EList getOpenWorldElements() { if (openWorldElements == null) { openWorldElements = new EObjectContainmentEList(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__OPEN_WORLD_ELEMENTS); @@ -316,6 +345,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public LogicProblem getProblemConainer() { return problemConainer; } @@ -340,6 +370,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public void setProblemConainer(LogicProblem newProblemConainer) { if (newProblemConainer != problemConainer) { NotificationChain msgs = null; @@ -359,6 +390,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public EList getScopes() { if (scopes == null) { scopes = new EObjectContainmentEList(Scope.class, this, PartialinterpretationPackage.PARTIAL_INTERPRETATION__SCOPES); @@ -371,6 +403,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public int getMinNewElements() { return minNewElements; } @@ -380,6 +413,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public void setMinNewElements(int newMinNewElements) { int oldMinNewElements = minNewElements; minNewElements = newMinNewElements; @@ -392,6 +426,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public int getMaxNewElements() { return maxNewElements; } @@ -401,6 +436,7 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl * * @generated */ + @Override public void setMaxNewElements(int newMaxNewElements) { int oldMaxNewElements = maxNewElements; maxNewElements = newMaxNewElements; @@ -408,6 +444,29 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS, oldMaxNewElements, maxNewElements)); } + /** + * + * + * @generated + */ + @Override + public int getMinNewElementsHeuristic() { + return minNewElementsHeuristic; + } + + /** + * + * + * @generated + */ + @Override + public void setMinNewElementsHeuristic(int newMinNewElementsHeuristic) { + int oldMinNewElementsHeuristic = minNewElementsHeuristic; + minNewElementsHeuristic = newMinNewElementsHeuristic; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC, oldMinNewElementsHeuristic, minNewElementsHeuristic)); + } + /** * * @@ -467,6 +526,8 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl return getMinNewElements(); case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: return getMaxNewElements(); + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC: + return getMinNewElementsHeuristic(); } return super.eGet(featureID, resolve, coreType); } @@ -520,6 +581,9 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: setMaxNewElements((Integer)newValue); return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC: + setMinNewElementsHeuristic((Integer)newValue); + return; } super.eSet(featureID, newValue); } @@ -565,6 +629,9 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: setMaxNewElements(MAX_NEW_ELEMENTS_EDEFAULT); return; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC: + setMinNewElementsHeuristic(MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT); + return; } super.eUnset(featureID); } @@ -599,6 +666,8 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl return minNewElements != MIN_NEW_ELEMENTS_EDEFAULT; case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS: return maxNewElements != MAX_NEW_ELEMENTS_EDEFAULT; + case PartialinterpretationPackage.PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC: + return minNewElementsHeuristic != MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT; } return super.eIsSet(featureID); } @@ -612,11 +681,13 @@ public class PartialInterpretationImpl extends MinimalEObjectImpl.Container impl public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (minNewElements: "); result.append(minNewElements); result.append(", maxNewElements: "); result.append(maxNewElements); + result.append(", minNewElementsHeuristic: "); + result.append(minNewElementsHeuristic); result.append(')'); return result.toString(); } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java index 71aef9af..7ad06504 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialRelationInterpretationImpl.java @@ -106,6 +106,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai * * @generated */ + @Override public RelationDeclaration getInterpretationOf() { if (interpretationOf != null && interpretationOf.eIsProxy()) { InternalEObject oldInterpretationOf = (InternalEObject)interpretationOf; @@ -132,6 +133,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai * * @generated */ + @Override public void setInterpretationOf(RelationDeclaration newInterpretationOf) { RelationDeclaration oldInterpretationOf = interpretationOf; interpretationOf = newInterpretationOf; @@ -144,6 +146,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai * * @generated */ + @Override public EList getRelationlinks() { if (relationlinks == null) { relationlinks = new EObjectContainmentEList(RelationLink.class, this, PartialinterpretationPackage.PARTIAL_RELATION_INTERPRETATION__RELATIONLINKS); @@ -156,6 +159,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai * * @generated */ + @Override public TypeReference getParam1() { if (param1 != null && param1.eIsProxy()) { InternalEObject oldParam1 = (InternalEObject)param1; @@ -182,6 +186,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai * * @generated */ + @Override public void setParam1(TypeReference newParam1) { TypeReference oldParam1 = param1; param1 = newParam1; @@ -194,6 +199,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai * * @generated */ + @Override public TypeReference getParam2() { if (param2 != null && param2.eIsProxy()) { InternalEObject oldParam2 = (InternalEObject)param2; @@ -220,6 +226,7 @@ public class PartialRelationInterpretationImpl extends MinimalEObjectImpl.Contai * * @generated */ + @Override public void setParam2(TypeReference newParam2) { TypeReference oldParam2 = param2; param2 = newParam2; diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java index da9b1472..51eabd2c 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialTypeInterpratationImpl.java @@ -76,6 +76,7 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C * * @generated */ + @Override public EList getElements() { if (elements == null) { elements = new EObjectResolvingEList(DefinedElement.class, this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__ELEMENTS); @@ -88,6 +89,7 @@ public abstract class PartialTypeInterpratationImpl extends MinimalEObjectImpl.C * * @generated */ + @Override public EList getScopes() { if (scopes == null) { scopes = new EObjectWithInverseResolvingEList(Scope.class, this, PartialinterpretationPackage.PARTIAL_TYPE_INTERPRATATION__SCOPES, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java index af1db8a1..06ca4e37 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationFactoryImpl.java @@ -84,6 +84,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public PartialInterpretation createPartialInterpretation() { PartialInterpretationImpl partialInterpretation = new PartialInterpretationImpl(); return partialInterpretation; @@ -94,6 +95,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public PartialConstantInterpretation createPartialConstantInterpretation() { PartialConstantInterpretationImpl partialConstantInterpretation = new PartialConstantInterpretationImpl(); return partialConstantInterpretation; @@ -104,6 +106,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public PartialRelationInterpretation createPartialRelationInterpretation() { PartialRelationInterpretationImpl partialRelationInterpretation = new PartialRelationInterpretationImpl(); return partialRelationInterpretation; @@ -114,6 +117,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public PartialFunctionInterpretation createPartialFunctionInterpretation() { PartialFunctionInterpretationImpl partialFunctionInterpretation = new PartialFunctionInterpretationImpl(); return partialFunctionInterpretation; @@ -124,6 +128,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public UnaryElementRelationLink createUnaryElementRelationLink() { UnaryElementRelationLinkImpl unaryElementRelationLink = new UnaryElementRelationLinkImpl(); return unaryElementRelationLink; @@ -134,6 +139,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public BinaryElementRelationLink createBinaryElementRelationLink() { BinaryElementRelationLinkImpl binaryElementRelationLink = new BinaryElementRelationLinkImpl(); return binaryElementRelationLink; @@ -144,6 +150,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public NaryRelationLink createNaryRelationLink() { NaryRelationLinkImpl naryRelationLink = new NaryRelationLinkImpl(); return naryRelationLink; @@ -154,6 +161,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public NaryRelationLinkElement createNaryRelationLinkElement() { NaryRelationLinkElementImpl naryRelationLinkElement = new NaryRelationLinkElementImpl(); return naryRelationLinkElement; @@ -164,6 +172,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public BooleanElement createBooleanElement() { BooleanElementImpl booleanElement = new BooleanElementImpl(); return booleanElement; @@ -174,6 +183,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public IntegerElement createIntegerElement() { IntegerElementImpl integerElement = new IntegerElementImpl(); return integerElement; @@ -184,6 +194,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public RealElement createRealElement() { RealElementImpl realElement = new RealElementImpl(); return realElement; @@ -194,6 +205,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public StringElement createStringElement() { StringElementImpl stringElement = new StringElementImpl(); return stringElement; @@ -204,6 +216,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public Scope createScope() { ScopeImpl scope = new ScopeImpl(); return scope; @@ -214,6 +227,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public PartialBooleanInterpretation createPartialBooleanInterpretation() { PartialBooleanInterpretationImpl partialBooleanInterpretation = new PartialBooleanInterpretationImpl(); return partialBooleanInterpretation; @@ -224,6 +238,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public PartialIntegerInterpretation createPartialIntegerInterpretation() { PartialIntegerInterpretationImpl partialIntegerInterpretation = new PartialIntegerInterpretationImpl(); return partialIntegerInterpretation; @@ -234,6 +249,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public PartialRealInterpretation createPartialRealInterpretation() { PartialRealInterpretationImpl partialRealInterpretation = new PartialRealInterpretationImpl(); return partialRealInterpretation; @@ -244,6 +260,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public PartialStringInterpretation createPartialStringInterpretation() { PartialStringInterpretationImpl partialStringInterpretation = new PartialStringInterpretationImpl(); return partialStringInterpretation; @@ -254,6 +271,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public PartialComplexTypeInterpretation createPartialComplexTypeInterpretation() { PartialComplexTypeInterpretationImpl partialComplexTypeInterpretation = new PartialComplexTypeInterpretationImpl(); return partialComplexTypeInterpretation; @@ -264,6 +282,7 @@ public class PartialinterpretationFactoryImpl extends EFactoryImpl implements Pa * * @generated */ + @Override public PartialinterpretationPackage getPartialinterpretationPackage() { return (PartialinterpretationPackage)getEPackage(); } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java index a21dc306..1ea3a11d 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PartialinterpretationPackageImpl.java @@ -227,7 +227,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa /** * Creates, registers, and initializes the Package for this model, and for any others upon which it depends. - * + * *

    This method is used to initialize {@link PartialinterpretationPackage#eINSTANCE} when that field is accessed. * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. * @@ -241,7 +241,8 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa if (isInited) return (PartialinterpretationPackage)EPackage.Registry.INSTANCE.getEPackage(PartialinterpretationPackage.eNS_URI); // Obtain or create and register package - PartialinterpretationPackageImpl thePartialinterpretationPackage = (PartialinterpretationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof PartialinterpretationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new PartialinterpretationPackageImpl()); + Object registeredPartialinterpretationPackage = EPackage.Registry.INSTANCE.get(eNS_URI); + PartialinterpretationPackageImpl thePartialinterpretationPackage = registeredPartialinterpretationPackage instanceof PartialinterpretationPackageImpl ? (PartialinterpretationPackageImpl)registeredPartialinterpretationPackage : new PartialinterpretationPackageImpl(); isInited = true; @@ -258,7 +259,6 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa // Mark meta-data to indicate it can't be changed thePartialinterpretationPackage.freeze(); - // Update the registry and return the package EPackage.Registry.INSTANCE.put(PartialinterpretationPackage.eNS_URI, thePartialinterpretationPackage); return thePartialinterpretationPackage; @@ -269,6 +269,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getPartialInterpretation() { return partialInterpretationEClass; } @@ -278,6 +279,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialInterpretation_Problem() { return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(0); } @@ -287,6 +289,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialInterpretation_Partialconstantinterpretation() { return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(1); } @@ -296,6 +299,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialInterpretation_Partialrelationinterpretation() { return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(2); } @@ -305,6 +309,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialInterpretation_Partialfunctioninterpretation() { return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(3); } @@ -314,6 +319,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialInterpretation_NewElements() { return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(4); } @@ -323,6 +329,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialInterpretation_Partialtypeinterpratation() { return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(5); } @@ -332,6 +339,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialInterpretation_OpenWorldElements() { return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(6); } @@ -341,6 +349,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialInterpretation_ProblemConainer() { return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(7); } @@ -350,6 +359,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialInterpretation_Scopes() { return (EReference)partialInterpretationEClass.getEStructuralFeatures().get(8); } @@ -359,6 +369,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EAttribute getPartialInterpretation_MinNewElements() { return (EAttribute)partialInterpretationEClass.getEStructuralFeatures().get(9); } @@ -368,6 +379,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EAttribute getPartialInterpretation_MaxNewElements() { return (EAttribute)partialInterpretationEClass.getEStructuralFeatures().get(10); } @@ -377,6 +389,17 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override + public EAttribute getPartialInterpretation_MinNewElementsHeuristic() { + return (EAttribute)partialInterpretationEClass.getEStructuralFeatures().get(11); + } + + /** + * + * + * @generated + */ + @Override public EClass getPartialConstantInterpretation() { return partialConstantInterpretationEClass; } @@ -386,6 +409,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialConstantInterpretation_InterpretationOf() { return (EReference)partialConstantInterpretationEClass.getEStructuralFeatures().get(0); } @@ -395,6 +419,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getPartialRelationInterpretation() { return partialRelationInterpretationEClass; } @@ -404,6 +429,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialRelationInterpretation_InterpretationOf() { return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(0); } @@ -413,6 +439,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialRelationInterpretation_Relationlinks() { return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(1); } @@ -422,6 +449,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialRelationInterpretation_Param1() { return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(2); } @@ -431,6 +459,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialRelationInterpretation_Param2() { return (EReference)partialRelationInterpretationEClass.getEStructuralFeatures().get(3); } @@ -440,6 +469,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getPartialFunctionInterpretation() { return partialFunctionInterpretationEClass; } @@ -449,6 +479,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialFunctionInterpretation_InterpretationOf() { return (EReference)partialFunctionInterpretationEClass.getEStructuralFeatures().get(0); } @@ -458,6 +489,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getPartialTypeInterpratation() { return partialTypeInterpratationEClass; } @@ -467,6 +499,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialTypeInterpratation_Elements() { return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(0); } @@ -476,6 +509,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialTypeInterpratation_Scopes() { return (EReference)partialTypeInterpratationEClass.getEStructuralFeatures().get(1); } @@ -485,6 +519,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getRelationLink() { return relationLinkEClass; } @@ -494,6 +529,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getUnaryElementRelationLink() { return unaryElementRelationLinkEClass; } @@ -503,6 +539,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getUnaryElementRelationLink_Param1() { return (EReference)unaryElementRelationLinkEClass.getEStructuralFeatures().get(0); } @@ -512,6 +549,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getBinaryElementRelationLink() { return binaryElementRelationLinkEClass; } @@ -521,6 +559,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getBinaryElementRelationLink_Param1() { return (EReference)binaryElementRelationLinkEClass.getEStructuralFeatures().get(0); } @@ -530,6 +569,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getBinaryElementRelationLink_Param2() { return (EReference)binaryElementRelationLinkEClass.getEStructuralFeatures().get(1); } @@ -539,6 +579,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getNaryRelationLink() { return naryRelationLinkEClass; } @@ -548,6 +589,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getNaryRelationLink_Elements() { return (EReference)naryRelationLinkEClass.getEStructuralFeatures().get(0); } @@ -557,6 +599,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getNaryRelationLinkElement() { return naryRelationLinkElementEClass; } @@ -566,6 +609,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EAttribute getNaryRelationLinkElement_Index() { return (EAttribute)naryRelationLinkElementEClass.getEStructuralFeatures().get(0); } @@ -575,6 +619,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getNaryRelationLinkElement_Param() { return (EReference)naryRelationLinkElementEClass.getEStructuralFeatures().get(1); } @@ -584,6 +629,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getPrimitiveElement() { return primitiveElementEClass; } @@ -593,6 +639,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EAttribute getPrimitiveElement_ValueSet() { return (EAttribute)primitiveElementEClass.getEStructuralFeatures().get(0); } @@ -602,6 +649,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getBooleanElement() { return booleanElementEClass; } @@ -611,6 +659,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EAttribute getBooleanElement_Value() { return (EAttribute)booleanElementEClass.getEStructuralFeatures().get(0); } @@ -620,6 +669,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getIntegerElement() { return integerElementEClass; } @@ -629,6 +679,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EAttribute getIntegerElement_Value() { return (EAttribute)integerElementEClass.getEStructuralFeatures().get(0); } @@ -638,6 +689,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getRealElement() { return realElementEClass; } @@ -647,6 +699,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EAttribute getRealElement_Value() { return (EAttribute)realElementEClass.getEStructuralFeatures().get(0); } @@ -656,6 +709,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getStringElement() { return stringElementEClass; } @@ -665,6 +719,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EAttribute getStringElement_Value() { return (EAttribute)stringElementEClass.getEStructuralFeatures().get(0); } @@ -674,6 +729,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getScope() { return scopeEClass; } @@ -683,6 +739,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EAttribute getScope_MinNewElements() { return (EAttribute)scopeEClass.getEStructuralFeatures().get(0); } @@ -692,6 +749,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EAttribute getScope_MaxNewElements() { return (EAttribute)scopeEClass.getEStructuralFeatures().get(1); } @@ -701,6 +759,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getScope_TargetTypeInterpretation() { return (EReference)scopeEClass.getEStructuralFeatures().get(2); } @@ -710,6 +769,17 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override + public EAttribute getScope_MinNewElementsHeuristic() { + return (EAttribute)scopeEClass.getEStructuralFeatures().get(3); + } + + /** + * + * + * @generated + */ + @Override public EClass getPartialPrimitiveInterpretation() { return partialPrimitiveInterpretationEClass; } @@ -719,6 +789,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getPartialBooleanInterpretation() { return partialBooleanInterpretationEClass; } @@ -728,6 +799,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getPartialIntegerInterpretation() { return partialIntegerInterpretationEClass; } @@ -737,6 +809,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getPartialRealInterpretation() { return partialRealInterpretationEClass; } @@ -746,6 +819,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getPartialStringInterpretation() { return partialStringInterpretationEClass; } @@ -755,6 +829,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EClass getPartialComplexTypeInterpretation() { return partialComplexTypeInterpretationEClass; } @@ -764,6 +839,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialComplexTypeInterpretation_SupertypeInterpretation() { return (EReference)partialComplexTypeInterpretationEClass.getEStructuralFeatures().get(0); } @@ -773,6 +849,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public EReference getPartialComplexTypeInterpretation_InterpretationOf() { return (EReference)partialComplexTypeInterpretationEClass.getEStructuralFeatures().get(1); } @@ -782,6 +859,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa * * @generated */ + @Override public PartialinterpretationFactory getPartialinterpretationFactory() { return (PartialinterpretationFactory)getEFactoryInstance(); } @@ -817,6 +895,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa createEReference(partialInterpretationEClass, PARTIAL_INTERPRETATION__SCOPES); createEAttribute(partialInterpretationEClass, PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS); createEAttribute(partialInterpretationEClass, PARTIAL_INTERPRETATION__MAX_NEW_ELEMENTS); + createEAttribute(partialInterpretationEClass, PARTIAL_INTERPRETATION__MIN_NEW_ELEMENTS_HEURISTIC); partialConstantInterpretationEClass = createEClass(PARTIAL_CONSTANT_INTERPRETATION); createEReference(partialConstantInterpretationEClass, PARTIAL_CONSTANT_INTERPRETATION__INTERPRETATION_OF); @@ -869,6 +948,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa createEAttribute(scopeEClass, SCOPE__MIN_NEW_ELEMENTS); createEAttribute(scopeEClass, SCOPE__MAX_NEW_ELEMENTS); createEReference(scopeEClass, SCOPE__TARGET_TYPE_INTERPRETATION); + createEAttribute(scopeEClass, SCOPE__MIN_NEW_ELEMENTS_HEURISTIC); partialPrimitiveInterpretationEClass = createEClass(PARTIAL_PRIMITIVE_INTERPRETATION); @@ -945,6 +1025,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa initEReference(getPartialInterpretation_Scopes(), this.getScope(), null, "scopes", null, 0, -1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getPartialInterpretation_MinNewElements(), ecorePackage.getEInt(), "minNewElements", "0", 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getPartialInterpretation_MaxNewElements(), ecorePackage.getEInt(), "maxNewElements", "-1", 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getPartialInterpretation_MinNewElementsHeuristic(), ecorePackage.getEInt(), "minNewElementsHeuristic", "0", 1, 1, PartialInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(partialConstantInterpretationEClass, PartialConstantInterpretation.class, "PartialConstantInterpretation", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); initEReference(getPartialConstantInterpretation_InterpretationOf(), theLogiclanguagePackage.getConstantDeclaration(), null, "interpretationOf", null, 1, 1, PartialConstantInterpretation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); @@ -997,6 +1078,7 @@ public class PartialinterpretationPackageImpl extends EPackageImpl implements Pa initEAttribute(getScope_MinNewElements(), ecorePackage.getEInt(), "minNewElements", "0", 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEAttribute(getScope_MaxNewElements(), ecorePackage.getEInt(), "maxNewElements", "-1", 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEReference(getScope_TargetTypeInterpretation(), this.getPartialTypeInterpratation(), this.getPartialTypeInterpratation_Scopes(), "targetTypeInterpretation", null, 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); + initEAttribute(getScope_MinNewElementsHeuristic(), ecorePackage.getEInt(), "minNewElementsHeuristic", "0", 1, 1, Scope.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); initEClass(partialPrimitiveInterpretationEClass, PartialPrimitiveInterpretation.class, "PartialPrimitiveInterpretation", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PrimitiveElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PrimitiveElementImpl.java index 29a1e1be..a8ef81b0 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PrimitiveElementImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/PrimitiveElementImpl.java @@ -71,6 +71,7 @@ public abstract class PrimitiveElementImpl extends DefinedElementImpl implements * * @generated */ + @Override public boolean isValueSet() { return valueSet; } @@ -80,6 +81,7 @@ public abstract class PrimitiveElementImpl extends DefinedElementImpl implements * * @generated */ + @Override public void setValueSet(boolean newValueSet) { boolean oldValueSet = valueSet; valueSet = newValueSet; @@ -154,7 +156,7 @@ public abstract class PrimitiveElementImpl extends DefinedElementImpl implements public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (valueSet: "); result.append(valueSet); result.append(')'); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RealElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RealElementImpl.java index 0361a3e9..67cff5a2 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RealElementImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/RealElementImpl.java @@ -71,6 +71,7 @@ public class RealElementImpl extends PrimitiveElementImpl implements RealElement * * @generated */ + @Override public BigDecimal getValue() { return value; } @@ -80,6 +81,7 @@ public class RealElementImpl extends PrimitiveElementImpl implements RealElement * * @generated */ + @Override public void setValue(BigDecimal newValue) { BigDecimal oldValue = value; value = newValue; @@ -154,7 +156,7 @@ public class RealElementImpl extends PrimitiveElementImpl implements RealElement public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (value: "); result.append(value); result.append(')'); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java index d8ade871..a1b6de35 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/ScopeImpl.java @@ -26,6 +26,7 @@ import org.eclipse.emf.ecore.impl.MinimalEObjectImpl; *

  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.ScopeImpl#getMinNewElements Min New Elements}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.ScopeImpl#getMaxNewElements Max New Elements}
  • *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.ScopeImpl#getTargetTypeInterpretation Target Type Interpretation}
  • + *
  • {@link hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.impl.ScopeImpl#getMinNewElementsHeuristic Min New Elements Heuristic}
  • * * * @generated @@ -81,6 +82,26 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { */ protected PartialTypeInterpratation targetTypeInterpretation; + /** + * The default value of the '{@link #getMinNewElementsHeuristic() Min New Elements Heuristic}' attribute. + * + * + * @see #getMinNewElementsHeuristic() + * @generated + * @ordered + */ + protected static final int MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT = 0; + + /** + * The cached value of the '{@link #getMinNewElementsHeuristic() Min New Elements Heuristic}' attribute. + * + * + * @see #getMinNewElementsHeuristic() + * @generated + * @ordered + */ + protected int minNewElementsHeuristic = MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT; + /** * * @@ -105,6 +126,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { * * @generated */ + @Override public int getMinNewElements() { return minNewElements; } @@ -114,6 +136,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { * * @generated */ + @Override public void setMinNewElements(int newMinNewElements) { int oldMinNewElements = minNewElements; minNewElements = newMinNewElements; @@ -126,6 +149,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { * * @generated */ + @Override public int getMaxNewElements() { return maxNewElements; } @@ -135,6 +159,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { * * @generated */ + @Override public void setMaxNewElements(int newMaxNewElements) { int oldMaxNewElements = maxNewElements; maxNewElements = newMaxNewElements; @@ -147,6 +172,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { * * @generated */ + @Override public PartialTypeInterpratation getTargetTypeInterpretation() { if (targetTypeInterpretation != null && targetTypeInterpretation.eIsProxy()) { InternalEObject oldTargetTypeInterpretation = (InternalEObject)targetTypeInterpretation; @@ -188,6 +214,7 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { * * @generated */ + @Override public void setTargetTypeInterpretation(PartialTypeInterpratation newTargetTypeInterpretation) { if (newTargetTypeInterpretation != targetTypeInterpretation) { NotificationChain msgs = null; @@ -202,6 +229,29 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION, newTargetTypeInterpretation, newTargetTypeInterpretation)); } + /** + * + * + * @generated + */ + @Override + public int getMinNewElementsHeuristic() { + return minNewElementsHeuristic; + } + + /** + * + * + * @generated + */ + @Override + public void setMinNewElementsHeuristic(int newMinNewElementsHeuristic) { + int oldMinNewElementsHeuristic = minNewElementsHeuristic; + minNewElementsHeuristic = newMinNewElementsHeuristic; + if (eNotificationRequired()) + eNotify(new ENotificationImpl(this, Notification.SET, PartialinterpretationPackage.SCOPE__MIN_NEW_ELEMENTS_HEURISTIC, oldMinNewElementsHeuristic, minNewElementsHeuristic)); + } + /** * * @@ -247,6 +297,8 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: if (resolve) return getTargetTypeInterpretation(); return basicGetTargetTypeInterpretation(); + case PartialinterpretationPackage.SCOPE__MIN_NEW_ELEMENTS_HEURISTIC: + return getMinNewElementsHeuristic(); } return super.eGet(featureID, resolve, coreType); } @@ -268,6 +320,9 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: setTargetTypeInterpretation((PartialTypeInterpratation)newValue); return; + case PartialinterpretationPackage.SCOPE__MIN_NEW_ELEMENTS_HEURISTIC: + setMinNewElementsHeuristic((Integer)newValue); + return; } super.eSet(featureID, newValue); } @@ -289,6 +344,9 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: setTargetTypeInterpretation((PartialTypeInterpratation)null); return; + case PartialinterpretationPackage.SCOPE__MIN_NEW_ELEMENTS_HEURISTIC: + setMinNewElementsHeuristic(MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT); + return; } super.eUnset(featureID); } @@ -307,6 +365,8 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { return maxNewElements != MAX_NEW_ELEMENTS_EDEFAULT; case PartialinterpretationPackage.SCOPE__TARGET_TYPE_INTERPRETATION: return targetTypeInterpretation != null; + case PartialinterpretationPackage.SCOPE__MIN_NEW_ELEMENTS_HEURISTIC: + return minNewElementsHeuristic != MIN_NEW_ELEMENTS_HEURISTIC_EDEFAULT; } return super.eIsSet(featureID); } @@ -320,11 +380,13 @@ public class ScopeImpl extends MinimalEObjectImpl.Container implements Scope { public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (minNewElements: "); result.append(minNewElements); result.append(", maxNewElements: "); result.append(maxNewElements); + result.append(", minNewElementsHeuristic: "); + result.append(minNewElementsHeuristic); result.append(')'); return result.toString(); } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/StringElementImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/StringElementImpl.java index f207401d..0242c9b2 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/StringElementImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/StringElementImpl.java @@ -69,6 +69,7 @@ public class StringElementImpl extends PrimitiveElementImpl implements StringEle * * @generated */ + @Override public String getValue() { return value; } @@ -78,6 +79,7 @@ public class StringElementImpl extends PrimitiveElementImpl implements StringEle * * @generated */ + @Override public void setValue(String newValue) { String oldValue = value; value = newValue; @@ -152,7 +154,7 @@ public class StringElementImpl extends PrimitiveElementImpl implements StringEle public String toString() { if (eIsProxy()) return super.toString(); - StringBuffer result = new StringBuffer(super.toString()); + StringBuilder result = new StringBuilder(super.toString()); result.append(" (value: "); result.append(value); result.append(')'); diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java index 2cb56323..e76a89b7 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/ecore-gen/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/partialinterpretation/impl/UnaryElementRelationLinkImpl.java @@ -62,6 +62,7 @@ public class UnaryElementRelationLinkImpl extends RelationLinkImpl implements Un * * @generated */ + @Override public DefinedElement getParam1() { if (param1 != null && param1.eIsProxy()) { InternalEObject oldParam1 = (InternalEObject)param1; @@ -88,6 +89,7 @@ public class UnaryElementRelationLinkImpl extends RelationLinkImpl implements Un * * @generated */ + @Override public void setParam1(DefinedElement newParam1) { DefinedElement oldParam1 = param1; param1 = newParam1; diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore index acf82a3f..47d54258 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.ecore @@ -27,6 +27,9 @@ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="0"/> + + diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel index 2ac0a4f3..daeaf594 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/model/PartialInterpretation.genmodel @@ -18,7 +18,10 @@ - + + + + @@ -33,9 +36,8 @@ - - + @@ -50,6 +52,7 @@ + @@ -70,11 +73,16 @@ + + + + + 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 c7c1ad77..e4bdb086 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 @@ -60,6 +60,10 @@ import org.eclipse.xtend2.lib.StringConcatenationClient return this.dataHash.hashCode } + override equals(Object other) { + other.class == LocalNodeDescriptor && (other as AbstractNodeDescriptor).hashCode == 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»]''' } @@ -143,6 +147,10 @@ import org.eclipse.xtend2.lib.StringConcatenationClient return this.dataHash.hashCode } + override equals(Object other) { + other.class == FurtherNodeDescriptor && (other as AbstractNodeDescriptor).hashCode == hashCode + } + override prettyPrint() { ''' («dataHash»)[ 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 index efc89803..c6e03f75 100644 --- 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 @@ -7,12 +7,12 @@ import org.eclipse.xtend.lib.annotations.Data @Data class NeighbourhoodOptions { - public static val FixPointRage = -1 + public static val FixPointRange = -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) + public static val DEFAULT = new NeighbourhoodOptions(FixPointRange, FullParallels, MaxNumbers, null, null) val int range val int parallels diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend index d474877d..ddf7d712 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage/src/hu/bme/mit/inf/dslreasoner/viatrasolver/partialinterpretationlanguage/neighbourhood/PartialInterpretation2Hash.xtend @@ -5,7 +5,7 @@ import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement class PartialInterpretation2Hash extends PartialInterpretation2NeighbourhoodRepresentation{ - protected new() { + new() { super(false, true) } 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 a0382e8e..3048167e 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 @@ -25,7 +25,7 @@ abstract class PartialInterpretation2NeighbourhoodRepresentation nodeRepresentations = null - var Map modelRepresentation = null +class NeighbourhoodBasedHashStateCoderFactory extends AbstractNeighbourhoodBasedStateCoderFactory { + new() { + } new(NeighbourhoodOptions options) { super(options) } + override protected doCreateStateCoder(NeighbourhoodOptions options) { + new NeighbourhoodBasedPartialInterpretationStateCoder(new PartialInterpretation2Hash, options) + } +} + +class NeighbourhoodBasedPartialInterpretationStateCoder extends AbstractNeighbourhoodBasedPartialInterpretationStateCoder { + val PartialInterpretation2NeighbourhoodRepresentation calculator + var Map nodeRepresentations = null + var ModelRep modelRepresentation = null + + new(PartialInterpretation2NeighbourhoodRepresentation calculator, NeighbourhoodOptions options) { + super(options) + this.calculator = calculator + } + override protected isRefreshNeeded() { nodeRepresentations === null || modelRepresentation === 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 1abde0a8..aa02cd30 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 @@ -12,12 +12,15 @@ 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 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.NeighbourhoodBasedHashStateCoderFactory 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 @@ -39,7 +42,6 @@ import org.eclipse.viatra.dse.api.DesignSpaceExplorer import org.eclipse.viatra.dse.api.DesignSpaceExplorer.DseLoggingLevel import org.eclipse.viatra.dse.solutionstore.SolutionStore import org.eclipse.viatra.dse.statecode.IStateCoderFactory -import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.statecoder.NeighbourhoodBasedStateCoderFactory class ViatraReasoner extends LogicReasoner { val PartialInterpretationInitialiser initialiser = new PartialInterpretationInitialiser() @@ -71,6 +73,11 @@ class ViatraReasoner extends LogicReasoner { workspace.writeModel(emptySolution, "init.partialmodel") } emptySolution.problemConainer = problem + var BasicScopeGlobalConstraint basicScopeGlobalConstraint = null + if (viatraConfig.scopePropagatorStrategy == ScopePropagatorStrategy.None) { + basicScopeGlobalConstraint = new BasicScopeGlobalConstraint(emptySolution) + emptySolution.scopes.clear + } val method = modelGenerationMethodProvider.createModelGenerationMethod( problem, @@ -79,11 +86,12 @@ class ViatraReasoner extends LogicReasoner { viatraConfig.nameNewElements, viatraConfig.typeInferenceMethod, viatraConfig.scopePropagatorStrategy, + viatraConfig.hints, viatraConfig.documentationLevel ) dse.addObjective(new ModelGenerationCompositeObjective( - new ScopeObjective, + basicScopeGlobalConstraint ?: new ScopeObjective, method.unfinishedMultiplicities.map[new UnfinishedMultiplicityObjective(it)], wf2ObjectiveConverter.createCompletenessObjective(method.unfinishedWF) )) @@ -132,6 +140,9 @@ class ViatraReasoner extends LogicReasoner { dse.addGlobalConstraint(wf2ObjectiveConverter.createInvalidationGlobalConstraint(method.invalidWF)) dse.addGlobalConstraint(new SurelyViolatedObjectiveGlobalConstraint(solutionSaver)) dse.addGlobalConstraint(new InconsistentScopeGlobalConstraint) + if (basicScopeGlobalConstraint !== null) { + dse.addGlobalConstraint(basicScopeGlobalConstraint) + } for (additionalConstraint : viatraConfig.searchSpaceConstraints.additionalGlobalConstraints) { dse.addGlobalConstraint(additionalConstraint.apply(method)) } @@ -140,7 +151,7 @@ class ViatraReasoner extends LogicReasoner { val IStateCoderFactory statecoder = switch (viatraConfig.stateCoderStrategy) { case Neighbourhood: - new NeighbourhoodBasedStateCoderFactory + new NeighbourhoodBasedHashStateCoderFactory case PairwiseNeighbourhood: new PairwiseNeighbourhoodBasedStateCoderFactory default: @@ -215,10 +226,18 @@ class ViatraReasoner extends LogicReasoner { it.name = "Decisions" it.value = method.statistics.decisionsTried ] + it.entries += createIntStatisticEntry => [ + it.name = "Transformations" + it.value = method.statistics.transformationInvocations + ] it.entries += createIntStatisticEntry => [ it.name = "ScopePropagations" it.value = method.statistics.scopePropagatorInvocations ] + it.entries += createIntStatisticEntry => [ + it.name = "ScopePropagationsSolverCalls" + it.value = method.statistics.scopePropagatorSolverInvocations + ] if (diversityChecker.isActive) { it.entries += createIntStatisticEntry => [ it.name = "SolutionDiversityCheckTime" 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 a5f42a5f..6f38d261 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 @@ -16,6 +16,7 @@ import java.util.LinkedList import java.util.List import java.util.Set import org.eclipse.xtext.xbase.lib.Functions.Function1 +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeConstraintHint enum StateCoderStrategy { Neighbourhood, @@ -56,6 +57,8 @@ class ViatraReasonerConfiguration extends LogicSolverConfiguration { public var ScopePropagatorStrategy scopePropagatorStrategy = new ScopePropagatorStrategy.Polyhedral( PolyhedralScopePropagatorConstraints.Relational, PolyhedralScopePropagatorSolver.Clp) + + public var List hints = newArrayList public var List costObjectives = newArrayList } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BasicScopeGlobalConstraint.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BasicScopeGlobalConstraint.xtend new file mode 100644 index 00000000..67f447ed --- /dev/null +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/BasicScopeGlobalConstraint.xtend @@ -0,0 +1,103 @@ +package hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.dse + +import com.google.common.collect.ImmutableList +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialInterpretation +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partialinterpretation.PartialTypeInterpratation +import java.util.Comparator +import java.util.List +import org.eclipse.viatra.dse.base.ThreadContext +import org.eclipse.viatra.dse.objectives.Comparators +import org.eclipse.viatra.dse.objectives.IGlobalConstraint +import org.eclipse.viatra.dse.objectives.IObjective +import org.eclipse.xtend.lib.annotations.FinalFieldsConstructor + +class BasicScopeGlobalConstraint implements IGlobalConstraint, IObjective { + val PartialInterpretation p + val List assertions + + new(PartialInterpretation p) { + this.p = p + assertions = ImmutableList.copyOf(p.scopes.map [ + val currentSize = targetTypeInterpretation.elements.size + val minElements = minNewElements + currentSize + val maxElements = if (maxNewElements < 0) { + -1 + } else { + maxNewElements + currentSize + } + new ScopeAssertion(minElements, maxElements, targetTypeInterpretation) + ]) + } + + override init(ThreadContext context) { + if (context.model != p) { + throw new IllegalArgumentException( + "Partial model must be passed to the constructor of BasicScopeGlobalConstraint") + } + } + + override checkGlobalConstraint(ThreadContext context) { + assertions.forall[upperBoundSatisfied] + } + + override getFitness(ThreadContext context) { + var double fitness = p.minNewElements + for (assertion : assertions) { + if (!assertion.lowerBoundSatisfied) { + fitness += 1 + } + } + fitness + } + + override satisifiesHardObjective(Double fitness) { + fitness <= 0.01 + } + + override BasicScopeGlobalConstraint createNew() { + this + } + + override getName() { + class.name + } + + override getComparator() { + Comparators.LOWER_IS_BETTER + } + + override getLevel() { + 2 + } + + override isHardObjective() { + true + } + + override setComparator(Comparator comparator) { + throw new UnsupportedOperationException + } + + override setLevel(int level) { + throw new UnsupportedOperationException + } + + @FinalFieldsConstructor + private static class ScopeAssertion { + val int lowerBound + val int upperBound + val PartialTypeInterpratation typeDefinitions + + private def getCount() { + typeDefinitions.elements.size + } + + private def isLowerBoundSatisfied() { + count >= lowerBound + } + + private def isUpperBoundSatisfied() { + upperBound < 0 || count <= upperBound + } + } +} 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 5af7fc69..081e48fa 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 @@ -255,7 +255,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()); +// logger.warn("Unexpected state code: " + context.getDesignSpaceManager().getCurrentState()); numberOfStatecoderFail++; activationIds = Collections.emptyList(); } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend index 9a33753c..2976bebe 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ModelGenerationCompositeObjective.xtend @@ -59,7 +59,7 @@ class ModelGenerationCompositeObjective implements IThreeValuedObjective { } sum += multiplicity sum += unfinishedWFsFitness // *0.5 - // println('''Sum=«sum»|Scope=«scopeFitnes»|Multiplicity=«multiplicity»|WFs=«unfinishedWFsFitness»''') +// println('''Sum=«sum»|Scope=«scopeFitnes»|Multiplicity=«multiplicity»|WFs=«unfinishedWFsFitness»''') return sum } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend index 69efe0d7..e7967b00 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/ScopeObjective.xtend @@ -23,9 +23,9 @@ class ScopeObjective implements IObjective{ override getFitness(ThreadContext context) { val interpretation = context.model as PartialInterpretation - var res = interpretation.minNewElements.doubleValue + var res = interpretation.minNewElementsHeuristic.doubleValue for(scope : interpretation.scopes) { - res += scope.minNewElements*2 + res += scope.minNewElementsHeuristic*2 } return res } diff --git a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend index bf34aeeb..1b61ffa5 100644 --- a/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend +++ b/Solvers/VIATRA-Solver/hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner/src/hu/bme/mit/inf/dslreasoner/viatrasolver/reasoner/dse/UnfinishedWFObjective.xtend @@ -14,41 +14,51 @@ import org.eclipse.viatra.query.runtime.api.ViatraQueryMatcher class UnfinishedWFObjective implements IObjective { Collection>> unfinishedWFs val List> matchers - - new(Collection>> unfinishedWFs) { + + new( + Collection>> unfinishedWFs) { this.unfinishedWFs = unfinishedWFs matchers = new ArrayList(unfinishedWFs.size) } + override getName() '''unfinishedWFs''' + override createNew() { return new UnfinishedWFObjective(unfinishedWFs) } + override init(ThreadContext context) { - val engine = context.queryEngine//ViatraQueryEngine.on(new EMFScope(context.model)) - for(unfinishedWF : unfinishedWFs) { + val engine = context.queryEngine // ViatraQueryEngine.on(new EMFScope(context.model)) + for (unfinishedWF : unfinishedWFs) { matchers += unfinishedWF.getMatcher(engine) } } - + override getComparator() { Comparators.LOWER_IS_BETTER } + override getFitness(ThreadContext context) { var sumOfMatches = 0 - for(matcher : matchers) { + for (matcher : matchers) { val number = matcher.countMatches - //println('''«matcher.patternName» = «number»''') - sumOfMatches+=number +// if (number > 0) { +// println('''«matcher.patternName» = «number»''') +// } + sumOfMatches += number } return sumOfMatches.doubleValue } - + override getLevel() { 2 } + override isHardObjective() { true } - override satisifiesHardObjective(Double fitness) { return fitness <=0.01 } - + + override satisifiesHardObjective(Double fitness) { return fitness <= 0.01 } + override setComparator(Comparator comparator) { throw new UnsupportedOperationException() } + override setLevel(int level) { throw new UnsupportedOperationException() } -} \ No newline at end of file +} 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 6bffeb59..74500cc2 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 @@ -42,7 +42,7 @@ class ViatraReasonerSolutionSaver implements ISolutionSaver { private def saveBestSolutionOnly(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory) { val fitness = context.lastFitness - if (!fitness.satisifiesHardObjectives) { + if (!shouldSaveSolution(fitness, context)) { return false } val dominatedTrajectories = newArrayList @@ -83,7 +83,7 @@ class ViatraReasonerSolutionSaver implements ISolutionSaver { private def saveAnyDiverseSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory) { val fitness = context.lastFitness - if (!fitness.satisifiesHardObjectives) { + if (!shouldSaveSolution(fitness, context)) { return false } if (!diversityChecker.newSolution(context, id, emptyList)) { @@ -92,7 +92,12 @@ class ViatraReasonerSolutionSaver implements ISolutionSaver { basicSaveSolution(context, id, solutionTrajectory, fitness) } - private def basicSaveSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory, Fitness fitness) { + private def shouldSaveSolution(Fitness fitness, ThreadContext context) { + return fitness.satisifiesHardObjectives + } + + private def basicSaveSolution(ThreadContext context, Object id, SolutionTrajectory solutionTrajectory, + Fitness fitness) { var boolean solutionSaved = false var dseSolution = solutionsCollection.get(id) if (dseSolution === null) { diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF b/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF index cc274c7c..fe223d4a 100644 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/META-INF/MANIFEST.MF @@ -28,8 +28,10 @@ Require-Bundle: hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlan hu.bme.mit.inf.dslreasoner.visualisation;bundle-version="1.0.0", hu.bme.mit.inf.dslreasoner.domains.alloyexamples;bundle-version="1.0.0", org.eclipse.collections;bundle-version="9.2.0", - org.eclipse.viatra.query.patternlanguage.emf;bundle-version="2.2.0", - org.eclipse.viatra.query.runtime.rete;bundle-version="2.2.0", - org.objectweb.asm;bundle-version="7.0.0" + org.eclipse.viatra.query.patternlanguage.emf;bundle-version="2.0.0", + org.eclipse.viatra.query.runtime.rete;bundle-version="2.0.0", + org.objectweb.asm;bundle-version="7.0.0", + com.google.gson;bundle-version="2.8.2", + hu.bme.mit.inf.dslreasoner.domains.satellite;bundle-version="0.1.0" Import-Package: org.apache.log4j Bundle-RequiredExecutionEnvironment: JavaSE-1.8 diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/configs/FAM_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/FAM_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json new file mode 100644 index 00000000..26df3c74 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/FAM_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json @@ -0,0 +1,13 @@ +{ + "inputPath": "initialModels", + "outputPath": "outputModels", + "timeout": 1200, + "saveModels": true, + "warmupIterations": 0, + "iterations": 1, + "domain": "FAM", + "scope": "none", + "sizes": [500], + "solver": "ViatraSolver", + "scopePropagator": "basic" +} diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/configs/Yakindu_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/Yakindu_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json new file mode 100644 index 00000000..5f8a01b1 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/Yakindu_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json @@ -0,0 +1,16 @@ +{ + "inputPath": "initialModels", + "outputPath": "outputModels", + "timeout": 1200, + "saveModels": false, + "warmupIterations": 0, + "iterations": 5, + "domain": "Yakindu", + "scope": "quantiles", + "sizes": [100], + "solver": "ViatraSolver", + "scopePropagator": "polyhedral", + "propagatedConstraints": "hints", + "polyhedronSolver": "Clp", + "scopeHeuristic": "basic" +} diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/configs/ecore_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/ecore_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json new file mode 100644 index 00000000..42073422 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/ecore_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json @@ -0,0 +1,15 @@ +{ + "inputPath": "initialModels", + "outputPath": "outputModels", + "timeout": 1200, + "saveModels": true, + "warmupIterations": 0, + "iterations": 5, + "domain": "ecore", + "scope": "quantiles", + "sizes": [100], + "solver": "ViatraSolver", + "scopePropagator": "polyhedral", + "propagatedConstraints": "relations", + "polyhedronSolver": "Clp" +} diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/configs/fs_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/fs_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json new file mode 100644 index 00000000..d7955ddd --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/fs_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json @@ -0,0 +1,15 @@ +{ + "inputPath": "initialModels", + "outputPath": "outputModels", + "timeout": 1200, + "saveModels": true, + "warmupIterations": 1, + "iterations": 1, + "domain": "fs", + "scope": "useful", + "sizes": [50, 100, 150, 200, 250, 300, 350, 400, 450, 500], + "solver": "ViatraSolver", + "scopePropagator": "polyhedral", + "propagatedConstraints": "relations", + "polyhedronSolver": "Clp" +} diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/configs/satellite_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/satellite_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json new file mode 100644 index 00000000..474962e7 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/configs/satellite_useful_ViatraSolver_polyhedral_typeHierarchy_Clp.json @@ -0,0 +1,17 @@ +{ + "inputPath": "initialModels", + "outputPath": "outputModels", + "timeout": 1200, + "saveModels": true, + "saveTemporaryFiles": true, + "warmupIterations": 0, + "iterations": 1, + "domain": "satellite", + "scope": "quantiles", + "sizes": [50], + "solver": "ViatraSolver", + "scopePropagator": "polyhedral", + "propagatedConstraints": "hints", + "polyhedronSolver": "Clp", + "scopeHeuristic": "polyhedral" +} diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/initialModels/satellite.xmi b/Tests/hu.bme.mit.inf.dslreasoner.run/initialModels/satellite.xmi new file mode 100644 index 00000000..77f6ecfd --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/initialModels/satellite.xmi @@ -0,0 +1,14 @@ + + + + + + + diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend deleted file mode 100644 index 02caf9dd..00000000 --- a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/CountMatches.xtend +++ /dev/null @@ -1,176 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.run - -import hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.YakindummPackage -import hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu.mutated.Mutated -import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace -import java.io.File -import java.util.ArrayList -import java.util.Collection -import java.util.Comparator -import java.util.HashMap -import java.util.List -import java.util.Map -import java.util.TreeSet -import org.eclipse.emf.ecore.EObject -import org.eclipse.emf.ecore.resource.Resource -import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl -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.emf.EMFScope - -class QueryComparator implements Comparator>{ - - override compare(IQuerySpecification arg0, IQuerySpecification arg1) { - arg0.fullyQualifiedName.compareTo(arg1.fullyQualifiedName) - } -} - -class CountMatches { - var static List> wfPatterns; - var static Map,IQuerySpecification> query2Reference - - def static void main(String[] args) { - YakindummPackage.eINSTANCE.eClass - Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put("*",new XMIResourceFactoryImpl) - - wfPatterns = Mutated.instance.specifications.toList; - //wfPatterns = wfPatterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toList - wfPatterns.sort(new QueryComparator) - - val groupName2Representant = new HashMap - query2Reference = new HashMap - for(wfPattern : wfPatterns) { - val groupName = wfPattern.groupName - if(groupName2Representant.containsKey(groupName)) { - val representant = groupName2Representant.get(groupName) - query2Reference.put(wfPattern,representant) - } else { - groupName2Representant.put(groupName,wfPattern) - } - } - - - println('''modelpath;run;model;« - FOR wfPattern:wfPatterns SEPARATOR ";"»#(« - wfPattern.fullyQualifiedName.split("\\.").last»);hash(« - wfPattern.fullyQualifiedName.split("\\.").last»)«ENDFOR»;« - FOR mutant : wfPatterns.filter[query2Reference.keySet.contains(it)] SEPARATOR ';'»diff(« - mutant.fullyQualifiedName.split("\\.").last»)«ENDFOR»''' - ) - countMatches('''D:/FASE18Meas/RemoHF''') - } - - def private static simpleName(IQuerySpecification wfPattern) { - wfPattern.fullyQualifiedName.split("\\.").last - } - def private static groupName(IQuerySpecification wfPattern) { - wfPattern.simpleName.split('_').head - } - - def static void countMatches(String path) { - val file = new File(path) - if(file.isDirectory) { - for(subFileName : file.list) { - (path + "/" + subFileName).countMatches - } - } else if(file.isFile) { - if(path.endsWith("xmi")) { - countMatches(file,path) - } - } - } - - def static void countMatches(File file, String path) { - - - val pathSegments = path.split("/") - val groupName = pathSegments.get(pathSegments.size-2).split("\\.").last.split("_").get(0) - print(groupName +";") - val nameExtension = pathSegments.get(pathSegments.size-1).split("\\.").get(0).split("_") - try{ - val runNumber = nameExtension.get(1) - val modelNumber = nameExtension.get(2) - print('''«runNumber»;«modelNumber»''') - } catch(Exception e) { - print('''«file.name»;0''') - } - - val parent = file.parent - val workspace = new FileSystemWorkspace(parent,"") - val model = workspace.readModel(EObject,file.name) - - val engine = ViatraQueryEngine.on(new EMFScope(model)) - val objectCode = model.eResource.calculateObjectCode - - val pattern2Hash = new HashMap - for(pattern : wfPatterns) { - val matcher = pattern.getMatcher(engine) - val matches = matcher.allMatches - val hash = matches.getMatchSetDescriptor(objectCode) - pattern2Hash.put(pattern,hash) - print(''';«matcher.countMatches»;«hash»''') - } - var mutantsKilled = 0 - for(mutant : wfPatterns.filter[query2Reference.keySet.contains(it)]) { - val equals = pattern2Hash.get(mutant) == pattern2Hash.get(query2Reference.get(mutant)) - print(''';''') - if(equals) { - print('0') - } else { - print('1') - mutantsKilled++ - } - } - //print(''';«mutantsKilled»''') - println() - } - - def static Map calculateObjectCode(Resource resource) { - val res = new HashMap - val iterator = resource.allContents - var index = 1 - while(iterator.hasNext) { - res.put(iterator.next,index++) - } - return res - } - - def static getMatchSetDescriptor(Collection matchSet, Map objectCode) { - val set = new TreeSet(new ArrayComparator) - for(match: matchSet) { - val size = match.parameterNames.size - val idArray = new ArrayList(size) - for(i:0..> { - - override compare(List arg0, List arg1) { - if(arg0.size === arg1.size) { - for(i : 0.. nameToType + val Map> nameToRelation + + protected new(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { + nameToType = ImmutableMap.copyOf(ecore2Logic.allClassesInScope(trace).toMap[name].mapValues [ eClass | + ecore2Logic.TypeofEClass(trace, eClass) + ]) + nameToRelation = ImmutableMap.copyOf(ecore2Logic.allReferencesInScope(trace).groupBy[EContainingClass.name]. + mapValues [ references | + ImmutableMap.copyOf(references.toMap[name].mapValues [ reference | + ecore2Logic.relationOfReference(trace, reference) + ]) + ]) + } + + protected def getType(String name) { + nameToType.get(name) + } + + protected def relation(String typeName, String relationName) { + nameToRelation.get(typeName).get(relationName) + } + + protected static def int countMatches(ViatraQueryMatcher matcher, PartialInterpretation p) { + val match = matcher.newEmptyMatch + match.set(0, p.problem) + match.set(1, p) + matcher.countMatches(match) + } + + protected static def int getCount(ViatraQueryMatcher matcher, PartialInterpretation p) { + val match = matcher.newEmptyMatch + match.set(0, p.problem) + match.set(1, p) + val realMatch = matcher.getOneArbitraryMatch(match) + if (realMatch.present) { + realMatch.get.get(2) as Integer + } else { + 0 + } + } +} 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 34f3c267..54724226 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 @@ -4,18 +4,23 @@ import functionalarchitecture.FunctionalarchitecturePackage import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Ecore import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.FileSystem import hu.bme.mit.inf.dslreasoner.domains.alloyexamples.Filesystem.FilesystemPackage +import hu.bme.mit.inf.dslreasoner.domains.satellite.queries.internal.SatelliteQueriesAll import hu.bme.mit.inf.dslreasoner.domains.transima.fam.FamPatterns import hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.YakindummPackage +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic +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.ModelGenerationMethodBasedGlobalConstraint import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace import java.util.Collection import java.util.HashMap import java.util.LinkedHashMap import java.util.List +import java.util.Map import java.util.Set import org.eclipse.emf.ecore.EAttribute import org.eclipse.emf.ecore.EClass @@ -24,60 +29,83 @@ import org.eclipse.emf.ecore.EEnumLiteral import org.eclipse.emf.ecore.EObject import org.eclipse.emf.ecore.EReference import org.eclipse.emf.ecore.EcorePackage +import org.eclipse.xtend.lib.annotations.Data import org.eclipse.xtext.xbase.lib.Functions.Function1 -import hu.bme.mit.inf.dslreasoner.domains.transima.fam.Type -import hu.bme.mit.inf.dslreasoner.domains.transima.fam.Model +import satellite.SatellitePackage + +@Data +class TypeQuantiles { + double low + double high +} abstract class MetamodelLoader { protected val ReasonerWorkspace workspace + new(ReasonerWorkspace workspace) { this.workspace = workspace - } + } + def EcoreMetamodelDescriptor loadMetamodel() + def Set getRelevantTypes(EcoreMetamodelDescriptor descriptor) + def Set getRelevantReferences(EcoreMetamodelDescriptor descriptor) + def ViatraQuerySetDescriptor loadQueries(EcoreMetamodelDescriptor metamodel) + def List loadPartialModel() - - def List> additionalConstraints() - - def filterByNames(Iterable collection, Function1 nameExtractor, Collection requiredNames) { + + def List> additionalConstraints() + + def Map getTypeQuantiles() { + emptyMap + } + + def List getHints(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { + emptyList + } + + def filterByNames(Iterable collection, Function1 nameExtractor, + Collection requiredNames) { val res = collection.filter[requiredNames.contains(nameExtractor.apply(it))] if(res.size != requiredNames.size) throw new IllegalArgumentException return res.toSet } } -class FAMLoader extends MetamodelLoader{ - +class FAMLoader extends MetamodelLoader { + new(ReasonerWorkspace workspace) { super(workspace) } - + override loadMetamodel() { val package = FunctionalarchitecturePackage.eINSTANCE val List classes = package.EClassifiers.filter(EClass).toList val List enums = package.EClassifiers.filter(EEnum).toList val List literals = enums.map[ELiterals].flatten.toList - val List references = classes.map[EReferences].flatten.toList + val List references = classes.map[EReferences].flatten.filter[name != "type" && name != "model"]. + toList val List attributes = classes.map[EAttributes].flatten.toList - return new EcoreMetamodelDescriptor(classes,#{},false,enums,literals,references,attributes) + return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) } - - override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { - return descriptor.classes.filterByNames([it.name],#["FunctionalElement"]) + + override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { + return descriptor.classes.filterByNames([it.name], #["FunctionalElement"]) } + override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { - return descriptor.references.filterByNames([it.name],#["subElements"]) + return descriptor.references.filterByNames([it.name], #["subElements"]) } - + override loadQueries(EcoreMetamodelDescriptor metamodel) { val i = FamPatterns.instance val patterns = i.specifications.toList - val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet + val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet val derivedFeatures = new LinkedHashMap - derivedFeatures.put(Type.instance,metamodel.attributes.filter[it.name == "type"].head) - derivedFeatures.put(Model.instance,metamodel.references.filter[it.name == "model"].head) +// derivedFeatures.put(Type.instance,metamodel.attributes.filter[it.name == "type"].head) +// derivedFeatures.put(Model.instance,metamodel.references.filter[it.name == "model"].head) val res = new ViatraQuerySetDescriptor( patterns, wfPatterns, @@ -85,65 +113,67 @@ class FAMLoader extends MetamodelLoader{ ) return res } + override loadPartialModel() { - this.workspace.readModel(EObject,"FAM.xmi").eResource.allContents.toList + this.workspace.readModel(EObject, "FAM.xmi").eResource.allContents.toList } - + override additionalConstraints() { #[] } } -class YakinduLoader extends MetamodelLoader{ - +class YakinduLoader extends MetamodelLoader { + var useSynchronization = true; - var useComplexStates = false; - public static val patternsWithSynchronization = #[ - "synchHasNoOutgoing", "synchHasNoIncoming", "SynchronizedIncomingInSameRegion", "notSynchronizingStates", - "hasMultipleOutgoingTrainsition", "hasMultipleIncomingTrainsition", "SynchronizedRegionsAreNotSiblings", - "SynchronizedRegionDoesNotHaveMultipleRegions", "synchThree", "twoSynch","noSynch2","synch","noSynch4","noSynch3","noSynch"] - public static val patternsWithComplexStates =#["outgoingFromExit","outgoingFromFinal","choiceHasNoOutgoing","choiceHasNoIncoming"] + var useComplexStates = false; + public static val patternsWithSynchronization = #["synchHasNoOutgoing", "synchHasNoIncoming", + "SynchronizedIncomingInSameRegion", "SynchronizedIncomingInSameRegionHelper1", + "SynchronizedIncomingInSameRegionHelper2", "notSynchronizingStates", "hasMultipleOutgoingTrainsition", + "hasMultipleIncomingTrainsition", "SynchronizedRegionsAreNotSiblings", + "SynchronizedRegionsAreNotSiblingsHelper1", "SynchronizedRegionsAreNotSiblingsHelper2", + "SynchronizedRegionDoesNotHaveMultipleRegions", "synchThree", "twoSynch", "noSynch2", "synch", "noSynch4", + "noSynch3", "noSynch"] + public static val patternsWithComplexStates = #["outgoingFromExit", "outgoingFromFinal", "choiceHasNoOutgoing", + "choiceHasNoIncoming"] + new(ReasonerWorkspace workspace) { super(workspace) YakindummPackage.eINSTANCE.eClass } - + def setUseSynchronization(boolean useSynchronization) { this.useSynchronization = useSynchronization } + def setUseComplexStates(boolean useComplexStates) { this.useComplexStates = useComplexStates } - + override loadMetamodel() { val useSynchInThisLoad = this.useSynchronization val useComplexStates = this.useComplexStates - + val package = YakindummPackage.eINSTANCE - val List classes = package.EClassifiers.filter(EClass) - .filter[useSynchInThisLoad || (it.name != "Synchronization")] - .filter[useComplexStates || (it.name != "Choice" && it.name != "Exit" && it.name != "FinalState")] - .toList + val List classes = package.EClassifiers.filter(EClass).filter [ + useSynchInThisLoad || (it.name != "Synchronization") + ].filter[useComplexStates || (it.name != "Choice" && it.name != "Exit" && it.name != "FinalState")].toList val List enums = package.EClassifiers.filter(EEnum).toList val List literals = enums.map[ELiterals].flatten.toList val List references = classes.map[EReferences].flatten.toList val List attributes = classes.map[EAttributes].flatten.toList - return new EcoreMetamodelDescriptor(classes,#{},false,enums,literals,references,attributes) + return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) } + override loadQueries(EcoreMetamodelDescriptor metamodel) { val useSynchInThisLoad = this.useSynchronization - + val i = Patterns.instance - val patterns = i.specifications - .filter[spec | - useSynchInThisLoad || - !patternsWithSynchronization.exists[spec.fullyQualifiedName.endsWith(it)] - ] - .filter[spec | - useComplexStates || - !patternsWithComplexStates.exists[spec.fullyQualifiedName.endsWith(it)] - ] - .toList - val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name== "Constraint"]].toSet + val patterns = i.specifications.filter [ spec | + useSynchInThisLoad || !patternsWithSynchronization.exists[spec.fullyQualifiedName.endsWith(it)] + ].filter [ spec | + useComplexStates || !patternsWithComplexStates.exists[spec.fullyQualifiedName.endsWith(it)] + ].toList + val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet val derivedFeatures = new LinkedHashMap val res = new ViatraQuerySetDescriptor( patterns, @@ -152,53 +182,71 @@ class YakinduLoader extends MetamodelLoader{ ) return res } + override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { - descriptor.classes.filterByNames([it.name],#["Vertex","Transition","Synchronization"]) + descriptor.classes.filterByNames([it.name], #["Vertex", "Transition", "Synchronization"]) } - + override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { - descriptor.references.filterByNames([it.name],#["source","target"]) + descriptor.references.filterByNames([it.name], #["source", "target"]) } - + override loadPartialModel() { - this.workspace.readModel(EObject,"Yakindu.xmi").eResource.allContents.toList + this.workspace.readModel(EObject, "Yakindu.xmi").eResource.allContents.toList } - - override additionalConstraints() { //#[] - #[[method | new SGraphInconsistencyDetector(method)]] + + override additionalConstraints() { // #[] + #[[method|new SGraphInconsistencyDetector(method)]] + } + + override getTypeQuantiles() { + #{ + "Choice" -> new TypeQuantiles(0.118279569892473, 0.154020979020979), + "Entry" -> new TypeQuantiles(0.0283018867924528, 0.0620167525773196), + "Exit" -> new TypeQuantiles(0, 0), + "FinalState" -> new TypeQuantiles(0, 0), + "Region" -> new TypeQuantiles(0.0294117647058824, 0.0633258678611422), + "State" -> new TypeQuantiles(0.132023636740618, 0.175925925925926), +// "Statechart" -> new TypeQuantiles(0.00961538461538462, 0.010752688172043), + "Transition" -> new TypeQuantiles(0.581632653061224, 0.645161290322581) + } + } + + override getHints(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { + #[new SGraphHint(ecore2Logic, trace)] } } -class FileSystemLoader extends MetamodelLoader{ - +class FileSystemLoader extends MetamodelLoader { + new(ReasonerWorkspace workspace) { super(workspace) } - + override loadMetamodel() { val package = FilesystemPackage.eINSTANCE val List classes = package.EClassifiers.filter(EClass).toList val List enums = package.EClassifiers.filter(EEnum).toList val List literals = enums.map[ELiterals].flatten.toList - val List references = classes.map[EReferences].flatten.toList + val List references = classes.map[EReferences].flatten.filter[name != "live"].toList val List attributes = classes.map[EAttributes].flatten.toList - return new EcoreMetamodelDescriptor(classes,#{},false,enums,literals,references,attributes) + return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) } - + override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { return null } - + override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { null } - + override loadQueries(EcoreMetamodelDescriptor metamodel) { val patternGroup = FileSystem.instance val patterns = patternGroup.specifications.toList val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet val derivedFeatures = new HashMap - derivedFeatures.put(patternGroup.live,metamodel.references.filter[it.name == "live"].head) +// derivedFeatures.put(patternGroup.live,metamodel.references.filter[it.name == "live"].head) return new ViatraQuerySetDescriptor( patterns, wfPatterns, @@ -206,41 +254,46 @@ class FileSystemLoader extends MetamodelLoader{ ) } - + override loadPartialModel() { - this.workspace.readModel(EObject,"fs.xmi").eResource.allContents.toList + this.workspace.readModel(EObject, "fs.xmi").eResource.allContents.toList } - + override additionalConstraints() { - #[[method | new FileSystemInconsistencyDetector(method)]] + #[[method|new FileSystemInconsistencyDetector(method)]] } - + } class EcoreLoader extends MetamodelLoader { - + new(ReasonerWorkspace workspace) { super(workspace) } - + override loadMetamodel() { val package = EcorePackage.eINSTANCE - val List classes = package.EClassifiers.filter(EClass).filter[it.name!="EFactory"].toList + val List classes = package.EClassifiers.filter(EClass).filter [ + it.name != "EFactory" && it.name != "EObject" && it.name != "EResource" + ].toList val List enums = package.EClassifiers.filter(EEnum).toList val List literals = enums.map[ELiterals].flatten.toList - val List references = classes.map[EReferences].flatten.filter[it.name!="eFactoryInstance"].filter[!it.derived].toList - val List attributes = #[] //classes.map[EAttributes].flatten.toList - return new EcoreMetamodelDescriptor(classes,#{},false,enums,literals,references,attributes) + val List references = classes.map[EReferences].flatten.filter [ + it.name != "eFactoryInstance" && it.name != "contents" && it.name != "references" && + it.name != "eGenericType" && it.name != "eGenericSuperTypes" + ].filter[!it.derived].toList + val List attributes = #[] // classes.map[EAttributes].flatten.toList + return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) } - + override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { return null } - + override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { null } - + override loadQueries(EcoreMetamodelDescriptor metamodel) { val patternGroup = Ecore.instance val patterns = patternGroup.specifications.toList @@ -253,13 +306,92 @@ class EcoreLoader extends MetamodelLoader { ) } - + override loadPartialModel() { - this.workspace.readModel(EObject,"ecore.xmi").eResource.allContents.toList + this.workspace.readModel(EObject, "ecore.xmi").eResource.allContents.toList } - + override additionalConstraints() { #[] } + + override getTypeQuantiles() { + #{ + "EAnnotation" -> new TypeQuantiles(0, 0), + "EAttribute" -> new TypeQuantiles(0.14, 0.300943396226415), + "EClass" -> new TypeQuantiles(0.224014336917563, 0.372881355932203), + "EDataType" -> new TypeQuantiles(0, 0), + "EEnum" -> new TypeQuantiles(0, 0.0275208638045255), + "EEnumLiteral" -> new TypeQuantiles(0, 0.105204907665065), + "EGenericType" -> new TypeQuantiles(0, 0), + "EOperation" -> new TypeQuantiles(0, 0), + "EPackage" -> new TypeQuantiles(0.0119047619047619, 0.0192307692307692), + "EParameter" -> new TypeQuantiles(0, 0), + "EReference" -> new TypeQuantiles(0.217599234815878, 0.406779661016949), + "EStringToStringMapEntry" -> new TypeQuantiles(0, 0), + "ETypeParameter" -> new TypeQuantiles(0, 0) + } + } + +} + +class SatelliteLoader extends MetamodelLoader { + + new(ReasonerWorkspace workspace) { + super(workspace) + } + + override loadMetamodel() { + val package = SatellitePackage.eINSTANCE + val List classes = package.EClassifiers.filter(EClass).toList + val List enums = package.EClassifiers.filter(EEnum).toList + val List literals = enums.map[ELiterals].flatten.toList + val List references = classes.map[EReferences].flatten.toList + val List attributes = classes.map[EAttributes].flatten.toList + return new EcoreMetamodelDescriptor(classes, #{}, false, enums, literals, references, attributes) + } + + override getRelevantTypes(EcoreMetamodelDescriptor descriptor) { + null + } + + override getRelevantReferences(EcoreMetamodelDescriptor descriptor) { + null + } + + override loadQueries(EcoreMetamodelDescriptor metamodel) { + val i = SatelliteQueriesAll.instance + val patterns = i.specifications.toList + val wfPatterns = patterns.filter[it.allAnnotations.exists[it.name == "Constraint"]].toSet + val derivedFeatures = new LinkedHashMap + val res = new ViatraQuerySetDescriptor( + patterns, + wfPatterns, + derivedFeatures + ) + return res + } + + override loadPartialModel() { + this.workspace.readModel(EObject, "satellite.xmi").eResource.allContents.toList + } + + override additionalConstraints() { #[] } + + override getHints(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { + #[new SatelliteHint(ecore2Logic, trace)] + } + + override getTypeQuantiles() { + #{ + "CubeSat3U" -> new TypeQuantiles(0.1, 0.25), + "CubeSat6U" -> new TypeQuantiles(0, 0.25), + "SmallSat" -> new TypeQuantiles(0, 0.15), + "UHFCommSubsystem" -> new TypeQuantiles(0.08, 0.25), + "XCommSubsystem" -> new TypeQuantiles(0.08, 0.25), + "KaCommSubsystem" -> new TypeQuantiles(0, 0.1), + "InterferometryPayload" -> new TypeQuantiles(0.15, 0.25) + } + } -} \ No newline at end of file +} diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend new file mode 100644 index 00000000..97ce4ee6 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SGraphHint.xtend @@ -0,0 +1,46 @@ +package hu.bme.mit.inf.dslreasoner.run + +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator + +class SGraphHint extends Ecore2LogicTraceBasedHint { + new(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { + super(ecore2Logic, trace) + } + + override getAdditionalPatterns(extension PatternGenerator patternGenerator) { + "" + } + + override createConstraintUpdater(LinearTypeExpressionBuilderFactory it) { + val newEntriesWithoutRegionCount = createBuilder.add(1, "Entry".type).add(-1, "Region".type).build + val newStatesWithoutRegionCount = createBuilder.add(1, "State".type).add(-1, "Region".type).build + val newTransitionWithoutNeedsOutgoingCount = createBuilder.add(1, "Transition".type).add(-1, "Entry".type). + add(-1, "Choice".type).build + val newTransitionWithoutNeedsIncomingCount = createBuilder.add(1, "Transition".type).add(-1, "Choice".type). + build + + val regionsWithoutEntryMatcher = createMatcher( + "unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_partialsnapshot_mavo_yakindu_noEntryInRegion") + val regionsWithoutStateMatcher = createMatcher( + "unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_partialsnapshot_mavo_yakindu_noStateInRegion") + val entryHasNoOutgoingMatcher = createMatcher( + "unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_partialsnapshot_mavo_yakindu_noOutgoingTransitionFromEntry") + val choiceHasNoOutgoingMatcher = createMatcher( + "unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_partialsnapshot_mavo_yakindu_choiceHasNoOutgoing") + val choiceHasNoIncomingMatcher = createMatcher( + "unfinishedBy_pattern_hu_bme_mit_inf_dslreasoner_partialsnapshot_mavo_yakindu_choiceHasNoIncoming") + val transitionWithoutTargetMatcher = createMatcher("unfinishedLowerMultiplicity_target_reference_Transition") + + return [ p | + newEntriesWithoutRegionCount.assertEqualsTo(regionsWithoutEntryMatcher.countMatches(p)) + newStatesWithoutRegionCount.tightenLowerBound(regionsWithoutStateMatcher.countMatches(p)) + newTransitionWithoutNeedsOutgoingCount.tightenLowerBound( + entryHasNoOutgoingMatcher.countMatches(p) + choiceHasNoOutgoingMatcher.countMatches(p)) + newTransitionWithoutNeedsIncomingCount.tightenLowerBound( + choiceHasNoIncomingMatcher.countMatches(p) - transitionWithoutTargetMatcher.getCount(p)) + ] + } +} diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend new file mode 100644 index 00000000..e95c0c64 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/SatelliteHint.xtend @@ -0,0 +1,86 @@ +package hu.bme.mit.inf.dslreasoner.run + +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic +import hu.bme.mit.inf.dslreasoner.ecore2logic.Ecore2Logic_Trace +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.Modality +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.LinearTypeExpressionBuilderFactory +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.patterns.PatternGenerator + +class SatelliteHint extends Ecore2LogicTraceBasedHint { + static val INTERFEROMETY_PAYLOAD = "hint_interferometryPayload" + static val REMAINING_CONTENTS_KA_COMM_SUBSYSTEM = "hint_kaCommSubsystem" + static val HINT_SPACECRAFT_UHF_POSSIBLE_LINK = "hint_spacecraftWithUhfPossibleLink" + static val HINT_SPACECRAFT_UHF_ONLY_NO_LINK = "hint_spacecraftUhfOnlyNoLink" + + new(Ecore2Logic ecore2Logic, Ecore2Logic_Trace trace) { + super(ecore2Logic, trace) + } + + override getAdditionalPatterns(PatternGenerator it) ''' + pattern «INTERFEROMETY_PAYLOAD»(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement) { + find interpretation(problem, interpretation); + find mustExist(problem, interpretation, object); + «typeIndexer.referInstanceOf("InterferometryPayload".type, Modality.MUST, "object")» + } + + private pattern «REMAINING_CONTENTS_KA_COMM_SUBSYSTEM»_helper(problem:LogicProblem, interpretation:PartialInterpretation, object:DefinedElement, remainingContents:java Integer) { + find remainingContents_commSubsystem_reference_CommunicatingElement_helper(problem, interpretation, object, remainingContents); + «typeIndexer.referInstanceOf("SmallSat".type, Modality.MUST, "object")» + } + + pattern «REMAINING_CONTENTS_KA_COMM_SUBSYSTEM»(problem:LogicProblem, interpretation:PartialInterpretation, remainingContents:java Integer) { + find interpretation(problem, interpretation); + remainingContents == sum find «REMAINING_CONTENTS_KA_COMM_SUBSYSTEM»_helper(problem, interpretation, _, #_); + } + + private pattern hint_spacecraftNotUhfOnly(problem:LogicProblem, interpretation:PartialInterpretation, spacecraft:DefinedElement) { + find interpretation(problem, interpretation); + find mustExist(problem, interpretation, spacecraft); + «typeIndexer.referInstanceOf("Spacecraft".type, Modality.MUST, "spacecraft")» + «relationDeclarationIndexer.referRelation("CommunicatingElement".relation("commSubsystem"), "spacecraft", "comm", Modality.MAY)» + neg «typeIndexer.referInstanceOf("UHFCommSubsystem".type, Modality.MUST, "comm")» + } + + private pattern hint_spacecraftWithUhf(problem:LogicProblem, interpretation:PartialInterpretation, spacecraft:DefinedElement) { + find interpretation(problem, interpretation); + find mustExist(problem, interpretation, spacecraft); + «typeIndexer.referInstanceOf("Spacecraft".type, Modality.MUST, "spacecraft")» + «relationDeclarationIndexer.referRelation("CommunicatingElement".relation("commSubsystem"), "spacecraft", "comm", Modality.MUST)» + «typeIndexer.referInstanceOf("UHFCommSubsystem".type, Modality.MUST, "comm")» + } + + pattern «HINT_SPACECRAFT_UHF_POSSIBLE_LINK»(problem:LogicProblem, interpretation:PartialInterpretation) { + find hint_spacecraftWithUhf(problem, interpretation, spacecraft); + find hint_spacecraftNotUhfOnly(problem, interpretation, spacecraft); + } + + pattern «HINT_SPACECRAFT_UHF_ONLY_NO_LINK»(problem:LogicProblem, interpretation:PartialInterpretation) { + find interpretation(problem, interpretation); + find mustExist(problem, interpretation, spacecraft); + «typeIndexer.referInstanceOf("Spacecraft".type, Modality.MUST, "spacecraft")» + neg find hint_spacecraftNotUhfOnly(problem, interpretation, spacecraft); + find currentInRelation_pattern_hu_bme_mit_inf_dslreasoner_domains_satellite_queries_noLinkToGroundStation(problem, interpretation, spacecraft); + } + ''' + + override createConstraintUpdater(LinearTypeExpressionBuilderFactory it) { + val interferometryPayloadCount = createBuilder.add(1, "InterferometryPayload".type).build + val kaCommSubsystemWithoutSmallSatCount = createBuilder.add(1, "KaCommSubsystem".type).add(-2, "SmallSat".type). + build + val uhfCommSubsystemCount = createBuilder.add(1, "UHFCommSubsystem".type).build + + val interferometryPayloadMatcher = createMatcher(INTERFEROMETY_PAYLOAD) + val kaCommSubsystemRemainingContentsMatcher = createMatcher(REMAINING_CONTENTS_KA_COMM_SUBSYSTEM) + val uhfPossibleLinkMatcher = createMatcher(HINT_SPACECRAFT_UHF_POSSIBLE_LINK) + val uhfNoLinkMatcher = createMatcher(HINT_SPACECRAFT_UHF_ONLY_NO_LINK) + + return [ p | + interferometryPayloadCount.tightenLowerBound(2 - interferometryPayloadMatcher.countMatches(p)) + kaCommSubsystemWithoutSmallSatCount.tightenUpperBound(kaCommSubsystemRemainingContentsMatcher.getCount(p)) + if (uhfPossibleLinkMatcher.countMatches(p) == 0 && uhfNoLinkMatcher.countMatches(p) >= 1) { + uhfCommSubsystemCount.tightenLowerBound(1) + } + ] + } + +} diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/TypeDistributionCalculator.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/TypeDistributionCalculator.xtend new file mode 100644 index 00000000..e2d6e6ca --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/TypeDistributionCalculator.xtend @@ -0,0 +1,35 @@ +package hu.bme.mit.inf.dslreasoner.run + +import hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.YakindummPackage +import java.io.File +import org.eclipse.emf.common.util.URI +import org.eclipse.emf.ecore.EPackage +import org.eclipse.emf.ecore.EcorePackage +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl + +class TypeDistributionCalculator { + public static def void main(String[] args) { + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl) + EPackage.Registry.INSTANCE.put(EcorePackage.eNS_URI, EcorePackage.eINSTANCE) + EPackage.Registry.INSTANCE.put(YakindummPackage.eNS_URI, YakindummPackage.eINSTANCE) + + println("model,className,count") + val directory = new File(args.get(0)) + for (file : directory.listFiles) { + val modelName = file.name + val resourceSet = new ResourceSetImpl + val resource = resourceSet.getResource(URI.createFileURI(file.absolutePath), true) + val objectsByTypeName = resource.allContents.filter [ obj | + val featureName = obj.eContainingFeature?.name + // Filter out "derived containment" references in Ecore. + // See https://stackoverflow.com/a/46340165 + featureName != "eGenericType" && featureName != "eGenericSuperTypes" + ].groupBy[eClass.name] + for (pair : objectsByTypeName.entrySet) { + println('''«modelName»,«pair.key»,«pair.value.size»''') + } + } + } +} diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScript.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScript.xtend new file mode 100644 index 00000000..5abff962 --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScript.xtend @@ -0,0 +1,70 @@ +package hu.bme.mit.inf.dslreasoner.run.script + +import java.util.List +import org.eclipse.xtend.lib.annotations.Accessors + +@Accessors +class MeasurementScript { + String inputPath + String outputPath + int timeout + boolean saveModels + boolean saveTemporaryFiles + int warmupIterations + int iterations + Domain domain + Scope scope + List sizes + Solver solver + ScopePropagator scopePropagator + ScopeConstraints propagatedConstraints + PolyhedronSolver polyhedronSolver + ScopeHeuristic scopeHeuristic + + def toCsvHeader() { + '''«domain»,«scope»,«solver»,«scopePropagator ?: "NULL"»,«propagatedConstraints ?: "NULL"»,«polyhedronSolver ?: "NULL"»''' + } +} + +enum Domain { + fs, + ecore, + Yakindu, + FAM, + satellite +} + +enum Scope { + none, + quantiles +} + +enum Solver { + ViatraSolver, + AlloySolver +} + +enum ScopePropagator { + none, + basic, + polyhedral +} + +enum ScopeConstraints { + none, + typeHierarchy, + relations, + hints +} + +enum PolyhedronSolver { + Z3Integer, + Z3Real, + Cbc, + Clp +} + +enum ScopeHeuristic { + basic, + polyhedral +} diff --git a/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScriptRunner.xtend b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScriptRunner.xtend new file mode 100644 index 00000000..48e750cb --- /dev/null +++ b/Tests/hu.bme.mit.inf.dslreasoner.run/src/hu/bme/mit/inf/dslreasoner/run/script/MeasurementScriptRunner.xtend @@ -0,0 +1,351 @@ +package hu.bme.mit.inf.dslreasoner.run.script + +import com.google.gson.Gson +import hu.bme.mit.inf.dslreasoner.ecore2logic.EClassMapper +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.logic.model.builder.DocumentationLevel +import hu.bme.mit.inf.dslreasoner.logic.model.builder.TypeScopes +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.DefinedElement +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.IntLiteral +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.RealLiteral +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.StringLiteral +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.Type +import hu.bme.mit.inf.dslreasoner.logic.model.logiclanguage.TypeDefinition +import hu.bme.mit.inf.dslreasoner.logic.model.logicproblem.LogicProblem +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.IntStatisticEntry +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.logic.model.logicresult.RealStatisticEntry +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.Statistics +import hu.bme.mit.inf.dslreasoner.logic.model.logicresult.StringStatisticEntry +import hu.bme.mit.inf.dslreasoner.logic2ecore.Logic2Ecore +import hu.bme.mit.inf.dslreasoner.run.EcoreLoader +import hu.bme.mit.inf.dslreasoner.run.FAMLoader +import hu.bme.mit.inf.dslreasoner.run.FileSystemLoader +import hu.bme.mit.inf.dslreasoner.run.MetamodelLoader +import hu.bme.mit.inf.dslreasoner.run.SatelliteLoader +import hu.bme.mit.inf.dslreasoner.run.YakinduLoader +import hu.bme.mit.inf.dslreasoner.util.CollectionsUtil +import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2Logic +import hu.bme.mit.inf.dslreasoner.viatra2logic.Viatra2LogicConfiguration +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedralScopePropagatorConstraints +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.PolyhedralScopePropagatorSolver +import hu.bme.mit.inf.dslreasoner.viatrasolver.logic2viatra.cardinality.ScopePropagatorStrategy +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretation2logic.InstanceModel2Logic +import hu.bme.mit.inf.dslreasoner.viatrasolver.partialinterpretationlanguage.partial2logicannotations.PartialModelRelation2Assertion +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasoner +import hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner.ViatraReasonerConfiguration +import hu.bme.mit.inf.dslreasoner.workspace.FileSystemWorkspace +import hu.bme.mit.inf.dslreasoner.workspace.ReasonerWorkspace +import java.io.FileReader +import java.util.HashMap +import java.util.HashSet +import java.util.Map +import java.util.Set +import org.eclipse.emf.ecore.EObject +import org.eclipse.emf.ecore.resource.Resource +import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl +import org.eclipse.viatra.query.patternlanguage.emf.EMFPatternLanguageStandaloneSetup +import org.eclipse.viatra.query.runtime.api.ViatraQueryEngineOptions +import org.eclipse.viatra.query.runtime.rete.matcher.ReteBackendFactory +import org.eclipse.xtend.lib.annotations.Data + +class MeasurementScriptRunner { + static val MODEL_SIZE_GAP = 0 + static val SCOPE_PROPAGATOR_TIMEOUT = 10 + static val USEC_TO_MSEC = 1000000 + + static extension val LogicresultFactory = LogicresultFactory.eINSTANCE + + val MeasurementScript script + val ReasonerWorkspace inputWorkspace + val ReasonerWorkspace outputWorkspace + val MetamodelLoader metamodelLoader + + new(MeasurementScript script) { + this.script = script + inputWorkspace = new FileSystemWorkspace(script.inputPath + "/", "") + outputWorkspace = new FileSystemWorkspace(script.outputPath + + "/", '''«script.domain»_«script.solver»_«script.scope»_«script.scopePropagator ?: "na"»_«script.propagatedConstraints ?: "na"»_«script.polyhedronSolver ?: "na"»_''') + metamodelLoader = switch (script.domain) { + case fs: new FileSystemLoader(inputWorkspace) + case ecore: new EcoreLoader(inputWorkspace) + case Yakindu: new YakinduLoader(inputWorkspace) => [useSynchronization = false; useComplexStates = true] + case FAM: new FAMLoader(inputWorkspace) + case satellite: new SatelliteLoader(inputWorkspace) + default: throw new IllegalArgumentException("Unsupported domain: " + script.domain) + } + } + + def run() { + if (script.sizes.empty) { + return + } + val start = System.currentTimeMillis + val warmupSize = script.sizes.head + for (var int i = 0; i < script.warmupIterations; i++) { + System.err.println('''Warmup «i + 1»/«script.warmupIterations»...''') + runExperiment(warmupSize) + } + val warmupEnd = System.currentTimeMillis + System.err.println('''Warmup completed in «(warmupEnd - start) / 1000» seconds''') + for (size : script.sizes) { + var int failures = 0 + for (var int i = 0; i < script.iterations; i++) { + System.err.println("Running GC...") + runGc() + System.err.println('''Iteration «i + 1»/«script.iterations» of size «size»...''') + val startTime = System.currentTimeMillis + val result = runExperiment(size) + val headerPrefix = '''«script.toCsvHeader»,«size»,«i + 1»,«result.resultName»''' + println('''«headerPrefix»,startTime,«startTime»''') + println('''«headerPrefix»,logic2SolverTransformationTime,«result.statistics.transformationTime»''') + println('''«headerPrefix»,solverTime,«result.statistics.solverTime»''') + for (statistic : result.statistics.entries) { + val valueString = switch (statistic) { + IntStatisticEntry: statistic.value.toString + RealStatisticEntry: statistic.value.toString + StringStatisticEntry: statistic.value.toString + default: statistic.toString + } + println('''«headerPrefix»,«statistic.name»,«valueString»''') + } + if (script.saveModels && result.model !== null) { + outputWorkspace.writeModel(result.model, '''«size»_«i + 1».xmi''') + } + if (result.resultName === "InsuficientResourcesResultImpl") { + failures++ + } + System.out.flush + } + if (failures == script.iterations) { + System.err.println("All measurements failed") + return + } + } + val end = System.currentTimeMillis + System.err.println('''Measurement completed in «(end - start) / 1000» seconds''') + } + + private static def void runGc() { + System.gc + Thread.sleep(100) + System.gc + Thread.sleep(100) + System.gc + Thread.sleep(800) + } + + private def runExperiment(int modelSize) { + if (script.solver != Solver.ViatraSolver) { + throw new IllegalArgumentException("Only VIATRA-Generator is supported") + } + val config = new ViatraReasonerConfiguration + config.solutionScope.numberOfRequiredSolutions = 1 + config.scopePropagatorStrategy = switch (script.scopePropagator) { + case none: + ScopePropagatorStrategy.None + case basic: + switch (script.propagatedConstraints) { + case none: + ScopePropagatorStrategy.Basic + case typeHierarchy: + ScopePropagatorStrategy.BasicTypeHierarchy + case relations, + case hints: + throw new IllegalArgumentException( + "Basic scope propagator does not support relational and hint constraints") + default: + throw new IllegalArgumentException("Unknown scope constraints: " + script.propagatedConstraints) + } + case polyhedral: { + val constraints = switch (script.propagatedConstraints) { + case none: + throw new IllegalArgumentException( + "Polyhedral scope propagator needs at least type hierarchy constraints") + case typeHierarchy: + PolyhedralScopePropagatorConstraints.TypeHierarchy + case relations, + case hints: + PolyhedralScopePropagatorConstraints.Relational + default: + throw new IllegalArgumentException("Unknown scope constraints: " + script.propagatedConstraints) + } + val polyhedronSolver = switch (script.polyhedronSolver) { + case Z3Integer: PolyhedralScopePropagatorSolver.Z3Integer + case Z3Real: PolyhedralScopePropagatorSolver.Z3Real + case Cbc: PolyhedralScopePropagatorSolver.Cbc + case Clp: PolyhedralScopePropagatorSolver.Clp + default: throw new IllegalArgumentException("Unknown polyhedron solver: " + script.polyhedronSolver) + } + val updateHeuristic = script.scopeHeuristic != ScopeHeuristic.basic + new ScopePropagatorStrategy.Polyhedral(constraints, polyhedronSolver, updateHeuristic, + SCOPE_PROPAGATOR_TIMEOUT) + } + default: + throw new IllegalArgumentException("Unknown scope propagator: " + script.scopePropagator) + } + config.runtimeLimit = script.timeout + config.documentationLevel = if(script.saveTemporaryFiles) DocumentationLevel.NORMAL else DocumentationLevel.NONE + config.debugConfiguration.partialInterpretatioVisualiser = null + config.searchSpaceConstraints.additionalGlobalConstraints += metamodelLoader.additionalConstraints + + val modelLoadingStart = System.nanoTime + val metamodelDescriptor = metamodelLoader.loadMetamodel + val partialModelDescriptor = metamodelLoader.loadPartialModel + val queryDescriptor = metamodelLoader.loadQueries(metamodelDescriptor) + val modelLoadingTime = System.nanoTime - modelLoadingStart + + val domain2LogicTransformationStart = System.nanoTime + val Ecore2Logic ecore2Logic = new Ecore2Logic + val Viatra2Logic viatra2Logic = new Viatra2Logic(ecore2Logic) + val InstanceModel2Logic instanceModel2Logic = new InstanceModel2Logic + var modelGeneration = ecore2Logic.transformMetamodel(metamodelDescriptor, new Ecore2LogicConfiguration()) + var problem = modelGeneration.output + problem = instanceModel2Logic.transform( + modelGeneration, + partialModelDescriptor + ).output + problem = viatra2Logic.transformQueries( + queryDescriptor, + modelGeneration, + new Viatra2LogicConfiguration + ).output + initializeScope(config, modelSize, problem, ecore2Logic, modelGeneration.trace) + if (script.propagatedConstraints == ScopeConstraints.hints) { + config.hints = metamodelLoader.getHints(ecore2Logic, modelGeneration.trace) + } + val domain2LogicTransformationTime = System.nanoTime - domain2LogicTransformationStart + + if (config.documentationLevel != DocumentationLevel.NONE) { + outputWorkspace.writeModel(problem, "initial.logicproblem") + } + + val solver = new ViatraReasoner + val result = solver.solve(problem, config, outputWorkspace) + val statistics = result.statistics + statistics.entries += createIntStatisticEntry => [ + name = "modelLoadingTime" + value = (modelLoadingTime / USEC_TO_MSEC) as int + ] + statistics.entries += createIntStatisticEntry => [ + name = "domain2LogicTransformationTime" + value = (domain2LogicTransformationTime / USEC_TO_MSEC) as int + ] + var EObject modelResult = null + if (result instanceof ModelResult) { + val intepretations = solver.getInterpretations(result) + if (intepretations.size != 1) { + throw new IllegalStateException("Expected 1 interpretation, got " + intepretations.size) + } + var resultTransformationStart = System.nanoTime + val logic2Ecore = new Logic2Ecore(ecore2Logic) + modelResult = logic2Ecore.transformInterpretation(intepretations.head, modelGeneration.trace) + val resultTransformationTime = System.nanoTime - resultTransformationStart + statistics.entries += createIntStatisticEntry => [ + name = "ecore2LogicTransformationTime" + value = (resultTransformationTime / USEC_TO_MSEC) as int + ] + } + + new ExperimentResult(result.class.simpleName, statistics, modelResult) + } + + private def initializeScope(ViatraReasonerConfiguration config, int modelSize, LogicProblem problem, + EClassMapper eClassMapper, Ecore2Logic_Trace trace) { + val knownElements = initializeKnownElements(problem, config.typeScopes) + if (modelSize < 0) { + config.typeScopes.minNewElements = 0 + config.typeScopes.maxNewElements = TypeScopes.Unlimited + } else { + val numberOfKnownElements = knownElements.values.flatten.toSet.size + val newElementCount = modelSize - numberOfKnownElements + config.typeScopes.minNewElements = newElementCount + config.typeScopes.maxNewElements = newElementCount + MODEL_SIZE_GAP + } + switch (script.scope) { + case none: + return + case quantiles: { + val quantiles = metamodelLoader.typeQuantiles + for (eClassInScope : eClassMapper.allClassesInScope(trace)) { + val quantile = quantiles.get(eClassInScope.name) + if (quantile !== null) { + val type = eClassMapper.TypeofEClass(trace, eClassInScope) + val knownInstances = knownElements.get(type) + val currentCount = if(knownInstances === null) 0 else knownInstances.size + val lowCount = Math.floor(modelSize * quantile.low) as int + val highCount = Math.ceil((modelSize + MODEL_SIZE_GAP) * quantile.high) as int + config.typeScopes.minNewElementsByType.put(type, lowCount - currentCount) + config.typeScopes.maxNewElementsByType.put(type, highCount - currentCount) + } + } + } + default: + throw new IllegalArgumentException("Unknown scope: " + script.scope) + } + } + + /* + * Copied from hu.bme.mit.inf.dslreasoner.application.execution.ScopeLoader.initialiseknownElements(LogicProblem, TypeScopes) + */ + private static def initializeKnownElements(LogicProblem p, TypeScopes s) { + val Map> res = new HashMap + + // 1. fill map with every types + for (t : p.types) { + res.put(t, new HashSet) + } + + // 2. fill map with every objects + for (definedType : p.types.filter(TypeDefinition)) { + val supertypes = CollectionsUtil.transitiveClosureStar(definedType)[supertypes] + for (supertype : supertypes) { + for (element : definedType.elements) { + res.get(supertype).add(element) + } + } + } + val partialModelContents = p.annotations.filter(PartialModelRelation2Assertion).map[target].toList.map [ + eAllContents.toIterable + ].flatten.toList + s.knownIntegers += partialModelContents.filter(IntLiteral).map[it.value] + s.knownReals += partialModelContents.filter(RealLiteral).map[it.value] + s.knownStrings += partialModelContents.filter(StringLiteral).map[it.value] + + res + } + + public static def void main(String[] args) { + if (args.length != 1) { + System.err.println("Missing measurement script name.") + System.exit(-1) + } + EMFPatternLanguageStandaloneSetup.doSetup + ViatraQueryEngineOptions.setSystemDefaultBackends(ReteBackendFactory.INSTANCE, ReteBackendFactory.INSTANCE, + ReteBackendFactory.INSTANCE) + Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put("*", new XMIResourceFactoryImpl) + val config = readConfig(args.get(0)) + val runnner = new MeasurementScriptRunner(config) + runnner.run() + } + + static def readConfig(String scriptPath) { + val gson = new Gson + val reader = new FileReader(scriptPath) + try { + gson.fromJson(reader, MeasurementScript) + } finally { + reader.close + } + } + + @Data + private static class ExperimentResult { + String resultName + Statistics statistics + EObject model + } +} -- cgit v1.2.3-54-g00ecf From d46494bb753225652f48e42f47411297693a03ab Mon Sep 17 00:00:00 2001 From: Kristóf Marussy Date: Tue, 29 Oct 2019 16:40:23 +0100 Subject: Remove MDEOptimiser dependency --- .../META-INF/MANIFEST.MF | 15 +----- .../dslreasoner/domains/cps/queries/Allocate.java | 21 ++++++-- .../AllocationWithoutResourceRequirement.java | 21 ++++++-- .../domains/cps/queries/AverageFreeHddMetric.java | 18 +++++-- .../cps/queries/AverageFreeMemoryMetric.java | 18 +++++-- .../domains/cps/queries/CostMetric.java | 18 +++++-- .../dslreasoner/domains/cps/queries/CpsCost.java | 21 ++++++-- .../domains/cps/queries/CreateHostInstance.java | 18 +++++-- .../domains/cps/queries/GuidanceObjective.java | 18 +++++-- .../queries/InstanceDoesNotSatisfyRequirement.java | 21 ++++++-- .../domains/cps/queries/NotEnoughAvailableHdd.java | 18 +++++-- .../cps/queries/NotEnoughAvailableMemory.java | 18 +++++-- .../cps/queries/RedundantInstancesOnSameHost.java | 18 +++++-- .../domains/cps/queries/RemoveHostInstance.java | 18 +++++-- .../cps/queries/RequirementNotSatisfied.java | 18 +++++-- .../domains/cps/queries/ResourceRequirement.java | 24 ++++++--- .../domains/cps/queries/UnallocateAppInstance.java | 18 +++++-- .../domains/cps/queries/internal/AvailableHdd.java | 4 +- .../cps/queries/internal/AvailableMemory.java | 4 +- .../cps/queries/internal/CpsApplications.java | 4 +- .../domains/cps/queries/internal/CpsHosts.java | 4 +- .../cps/queries/internal/FreeHddPercentage.java | 4 +- .../cps/queries/internal/FreeMemoryPercentage.java | 4 +- .../cps/queries/internal/HddRequirement.java | 4 +- .../cps/queries/internal/HostInstanceCost.java | 4 +- .../cps/queries/internal/MemoryRequirement.java | 4 +- .../cps/queries/internal/NoHostToAllocateTo.java | 4 +- .../cps/queries/internal/RequiredAppInstances.java | 4 +- .../cps/queries/internal/SatisfyingInstance.java | 4 +- .../domains/cps/queries/internal/TotalHdd.java | 4 +- .../domains/cps/queries/internal/TotalMemory.java | 4 +- .../queries/internal/UnallocatedAppInstance.java | 4 +- .../domains/cps/mdeo/CpsMdeOptimiserMain.xtend | 57 ---------------------- .../mdeo/NonRedundantAllocationsConstraint.xtend | 29 ----------- .../mdeo/NotAllocatedAppInstancesConstraint.xtend | 24 --------- .../mdeo/NotSatisfiedRequirementsConstraint.xtend | 27 ---------- .../domains/cps/mdeo/ResourceUtilizationUtil.xtend | 31 ------------ .../cps/mdeo/TooLowAverageHddConstraint.xtend | 33 ------------- .../cps/mdeo/TooLowAverageMemoryConstraint.xtend | 33 ------------- .../cps/mdeo/TotalCostFitnessFunction.xtend | 23 --------- .../cps/mdeo/UnavailableHddConstraint.xtend | 27 ---------- .../cps/mdeo/UnavailableMemoryConstraint.xtend | 27 ---------- .../mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt | 43 ---------------- 43 files changed, 267 insertions(+), 468 deletions(-) delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.xtend delete mode 100644 Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt (limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf') diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF index e13a18cf..275a988a 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/META-INF/MANIFEST.MF @@ -23,20 +23,7 @@ Require-Bundle: org.eclipse.viatra.addon.querybasedfeatures.runtime, org.eclipse.viatra.dse, org.eclipse.viatra.dse.genetic, hu.bme.mit.inf.dslreasoner.viatrasolver.reasoner;bundle-version="1.0.0", - org.eclipse.emf.ecore.xmi;bundle-version="2.15.0", - uk.ac.kcl.inf.mdeoptimiser.libraries.core;bundle-version="1.0.0", - uk.ac.kcl.inf.mdeoptimiser.interfaces.cli;bundle-version="1.0.0", - org.eclipse.emf.henshin.interpreter;bundle-version="1.5.0", - uk.ac.kcl.inf.mdeoptimiser.libraries.rulegen;bundle-version="1.0.0", - org.sidiff.common;bundle-version="1.0.0", - org.sidiff.common.emf;bundle-version="1.0.0", - org.sidiff.common.emf.extensions;bundle-version="1.0.0", - org.moeaframework;bundle-version="2.13.0", - org.apache.commons.math3;bundle-version="3.6.1", - org.apache.commons.lang3;bundle-version="3.8.1", - com.google.inject;bundle-version="3.0.0", - org.sidiff.common.henshin;bundle-version="1.0.0", - org.sidiff.serge;bundle-version="1.0.0" + org.eclipse.emf.ecore.xmi;bundle-version="2.15.0" Import-Package: org.apache.log4j Automatic-Module-Name: hu.bme.mit.inf.dslreasoner.domains.cps Bundle-ActivationPolicy: lazy diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/Allocate.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/Allocate.java index 830dc8a0..1fc70124 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/Allocate.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/Allocate.java @@ -105,9 +105,20 @@ public final class Allocate extends BaseGeneratedEMFQuerySpecification) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link Allocate} 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.cps.queries.Allocate (visibility: PUBLIC, simpleName: Allocate, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.Allocate, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link Allocate#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AllocationWithoutResourceRequirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AllocationWithoutResourceRequirement.java index 6da5f76d..b49fee74 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AllocationWithoutResourceRequirement.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AllocationWithoutResourceRequirement.java @@ -88,9 +88,20 @@ public final class AllocationWithoutResourceRequirement extends BaseGeneratedEMF @Override public Object get(final String parameterName) { - if ("Host".equals(parameterName)) return this.fHost; - if ("App".equals(parameterName)) return this.fApp; - return null; + switch(parameterName) { + case "Host": return this.fHost; + case "App": return this.fApp; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fHost; + case 1: return this.fApp; + default: return null; + } } public HostInstance getHost() { @@ -623,9 +634,9 @@ public final class AllocationWithoutResourceRequirement extends BaseGeneratedEMF } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AllocationWithoutResourceRequirement (visibility: PUBLIC, simpleName: AllocationWithoutResourceRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AllocationWithoutResourceRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link AllocationWithoutResourceRequirement} 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.cps.queries.AllocationWithoutResourceRequirement (visibility: PUBLIC, simpleName: AllocationWithoutResourceRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AllocationWithoutResourceRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link AllocationWithoutResourceRequirement#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeHddMetric.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeHddMetric.java index bc38b60b..607854bf 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeHddMetric.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeHddMetric.java @@ -79,8 +79,18 @@ public final class AverageFreeHddMetric extends BaseGeneratedEMFQuerySpecificati @Override public Object get(final String parameterName) { - if ("Average".equals(parameterName)) return this.fAverage; - return null; + switch(parameterName) { + case "Average": return this.fAverage; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fAverage; + default: return null; + } } public Double getAverage() { @@ -468,9 +478,9 @@ public final class AverageFreeHddMetric extends BaseGeneratedEMFQuerySpecificati } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeHddMetric (visibility: PUBLIC, simpleName: AverageFreeHddMetric, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeHddMetric, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link AverageFreeHddMetric} 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.cps.queries.AverageFreeHddMetric (visibility: PUBLIC, simpleName: AverageFreeHddMetric, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeHddMetric, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link AverageFreeHddMetric#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeMemoryMetric.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeMemoryMetric.java index 98974ea5..627a5f89 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeMemoryMetric.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/AverageFreeMemoryMetric.java @@ -83,8 +83,18 @@ public final class AverageFreeMemoryMetric extends BaseGeneratedEMFQuerySpecific @Override public Object get(final String parameterName) { - if ("Average".equals(parameterName)) return this.fAverage; - return null; + switch(parameterName) { + case "Average": return this.fAverage; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fAverage; + default: return null; + } } public Double getAverage() { @@ -476,9 +486,9 @@ public final class AverageFreeMemoryMetric extends BaseGeneratedEMFQuerySpecific } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeMemoryMetric (visibility: PUBLIC, simpleName: AverageFreeMemoryMetric, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeMemoryMetric, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link AverageFreeMemoryMetric} 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.cps.queries.AverageFreeMemoryMetric (visibility: PUBLIC, simpleName: AverageFreeMemoryMetric, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.AverageFreeMemoryMetric, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link AverageFreeMemoryMetric#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CostMetric.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CostMetric.java index bf886ec0..eff44f0a 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CostMetric.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CostMetric.java @@ -79,8 +79,18 @@ public final class CostMetric extends BaseGeneratedEMFQuerySpecification) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link CostMetric} 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.cps.queries.CostMetric (visibility: PUBLIC, simpleName: CostMetric, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CostMetric, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link CostMetric#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsCost.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsCost.java index fc90ef12..1cf09b0d 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsCost.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CpsCost.java @@ -91,9 +91,20 @@ public final class CpsCost extends BaseGeneratedEMFQuerySpecification) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link CpsCost} 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.cps.queries.CpsCost (visibility: PUBLIC, simpleName: CpsCost, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CpsCost, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link CpsCost#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java index f475c9e9..04036e11 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/CreateHostInstance.java @@ -80,8 +80,18 @@ public final class CreateHostInstance extends BaseGeneratedEMFQuerySpecification @Override public Object get(final String parameterName) { - if ("HostType".equals(parameterName)) return this.fHostType; - return null; + switch(parameterName) { + case "HostType": return this.fHostType; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fHostType; + default: return null; + } } public HostType getHostType() { @@ -468,9 +478,9 @@ public final class CreateHostInstance extends BaseGeneratedEMFQuerySpecification } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance (visibility: PUBLIC, simpleName: CreateHostInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link CreateHostInstance} 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.cps.queries.CreateHostInstance (visibility: PUBLIC, simpleName: CreateHostInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.CreateHostInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link CreateHostInstance#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/GuidanceObjective.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/GuidanceObjective.java index cfed0c4b..1ed6c9cc 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/GuidanceObjective.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/GuidanceObjective.java @@ -86,8 +86,18 @@ public final class GuidanceObjective extends BaseGeneratedEMFQuerySpecification< @Override public Object get(final String parameterName) { - if ("Value".equals(parameterName)) return this.fValue; - return null; + switch(parameterName) { + case "Value": return this.fValue; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fValue; + default: return null; + } } public Integer getValue() { @@ -476,9 +486,9 @@ public final class GuidanceObjective extends BaseGeneratedEMFQuerySpecification< } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.GuidanceObjective (visibility: PUBLIC, simpleName: GuidanceObjective, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.GuidanceObjective, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link GuidanceObjective} 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.cps.queries.GuidanceObjective (visibility: PUBLIC, simpleName: GuidanceObjective, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.GuidanceObjective, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link GuidanceObjective#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/InstanceDoesNotSatisfyRequirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/InstanceDoesNotSatisfyRequirement.java index 14deb337..932501ff 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/InstanceDoesNotSatisfyRequirement.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/InstanceDoesNotSatisfyRequirement.java @@ -88,9 +88,20 @@ public final class InstanceDoesNotSatisfyRequirement extends BaseGeneratedEMFQue @Override public Object get(final String parameterName) { - if ("Req".equals(parameterName)) return this.fReq; - if ("App".equals(parameterName)) return this.fApp; - return null; + switch(parameterName) { + case "Req": return this.fReq; + case "App": return this.fApp; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fReq; + case 1: return this.fApp; + default: return null; + } } public Requirement getReq() { @@ -623,9 +634,9 @@ public final class InstanceDoesNotSatisfyRequirement extends BaseGeneratedEMFQue } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.InstanceDoesNotSatisfyRequirement (visibility: PUBLIC, simpleName: InstanceDoesNotSatisfyRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.InstanceDoesNotSatisfyRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link InstanceDoesNotSatisfyRequirement} 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.cps.queries.InstanceDoesNotSatisfyRequirement (visibility: PUBLIC, simpleName: InstanceDoesNotSatisfyRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.InstanceDoesNotSatisfyRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link InstanceDoesNotSatisfyRequirement#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableHdd.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableHdd.java index 0c0d57a6..4077c103 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableHdd.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableHdd.java @@ -85,8 +85,18 @@ public final class NotEnoughAvailableHdd extends BaseGeneratedEMFQuerySpecificat @Override public Object get(final String parameterName) { - if ("Host".equals(parameterName)) return this.fHost; - return null; + switch(parameterName) { + case "Host": return this.fHost; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fHost; + default: return null; + } } public HostInstance getHost() { @@ -475,9 +485,9 @@ public final class NotEnoughAvailableHdd extends BaseGeneratedEMFQuerySpecificat } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableHdd (visibility: PUBLIC, simpleName: NotEnoughAvailableHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link NotEnoughAvailableHdd} 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.cps.queries.NotEnoughAvailableHdd (visibility: PUBLIC, simpleName: NotEnoughAvailableHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link NotEnoughAvailableHdd#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableMemory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableMemory.java index 9f091a95..6e52bee8 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableMemory.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/NotEnoughAvailableMemory.java @@ -85,8 +85,18 @@ public final class NotEnoughAvailableMemory extends BaseGeneratedEMFQuerySpecifi @Override public Object get(final String parameterName) { - if ("Host".equals(parameterName)) return this.fHost; - return null; + switch(parameterName) { + case "Host": return this.fHost; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fHost; + default: return null; + } } public HostInstance getHost() { @@ -475,9 +485,9 @@ public final class NotEnoughAvailableMemory extends BaseGeneratedEMFQuerySpecifi } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableMemory (visibility: PUBLIC, simpleName: NotEnoughAvailableMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link NotEnoughAvailableMemory} 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.cps.queries.NotEnoughAvailableMemory (visibility: PUBLIC, simpleName: NotEnoughAvailableMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.NotEnoughAvailableMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link NotEnoughAvailableMemory#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RedundantInstancesOnSameHost.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RedundantInstancesOnSameHost.java index bbb55158..2a40ac57 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RedundantInstancesOnSameHost.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RedundantInstancesOnSameHost.java @@ -86,8 +86,18 @@ public final class RedundantInstancesOnSameHost extends BaseGeneratedEMFQuerySpe @Override public Object get(final String parameterName) { - if ("Req".equals(parameterName)) return this.fReq; - return null; + switch(parameterName) { + case "Req": return this.fReq; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fReq; + default: return null; + } } public Requirement getReq() { @@ -479,9 +489,9 @@ public final class RedundantInstancesOnSameHost extends BaseGeneratedEMFQuerySpe } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RedundantInstancesOnSameHost (visibility: PUBLIC, simpleName: RedundantInstancesOnSameHost, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RedundantInstancesOnSameHost, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link RedundantInstancesOnSameHost} 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.cps.queries.RedundantInstancesOnSameHost (visibility: PUBLIC, simpleName: RedundantInstancesOnSameHost, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RedundantInstancesOnSameHost, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link RedundantInstancesOnSameHost#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RemoveHostInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RemoveHostInstance.java index 1141e898..ed3c903c 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RemoveHostInstance.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RemoveHostInstance.java @@ -79,8 +79,18 @@ public final class RemoveHostInstance extends BaseGeneratedEMFQuerySpecification @Override public Object get(final String parameterName) { - if ("HostInstance".equals(parameterName)) return this.fHostInstance; - return null; + switch(parameterName) { + case "HostInstance": return this.fHostInstance; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fHostInstance; + default: return null; + } } public HostInstance getHostInstance() { @@ -466,9 +476,9 @@ public final class RemoveHostInstance extends BaseGeneratedEMFQuerySpecification } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RemoveHostInstance (visibility: PUBLIC, simpleName: RemoveHostInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RemoveHostInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link RemoveHostInstance} 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.cps.queries.RemoveHostInstance (visibility: PUBLIC, simpleName: RemoveHostInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RemoveHostInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link RemoveHostInstance#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RequirementNotSatisfied.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RequirementNotSatisfied.java index 04066c50..eaceec5f 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RequirementNotSatisfied.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/RequirementNotSatisfied.java @@ -90,8 +90,18 @@ public final class RequirementNotSatisfied extends BaseGeneratedEMFQuerySpecific @Override public Object get(final String parameterName) { - if ("Req".equals(parameterName)) return this.fReq; - return null; + switch(parameterName) { + case "Req": return this.fReq; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fReq; + default: return null; + } } public Requirement getReq() { @@ -481,9 +491,9 @@ public final class RequirementNotSatisfied extends BaseGeneratedEMFQuerySpecific } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RequirementNotSatisfied (visibility: PUBLIC, simpleName: RequirementNotSatisfied, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RequirementNotSatisfied, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link RequirementNotSatisfied} 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.cps.queries.RequirementNotSatisfied (visibility: PUBLIC, simpleName: RequirementNotSatisfied, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.RequirementNotSatisfied, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link RequirementNotSatisfied#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/ResourceRequirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/ResourceRequirement.java index db7710f5..23b578ea 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/ResourceRequirement.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/ResourceRequirement.java @@ -87,10 +87,22 @@ public final class ResourceRequirement extends BaseGeneratedEMFQuerySpecificatio @Override public Object get(final String parameterName) { - if ("Host".equals(parameterName)) return this.fHost; - if ("App".equals(parameterName)) return this.fApp; - if ("Req".equals(parameterName)) return this.fReq; - return null; + switch(parameterName) { + case "Host": return this.fHost; + case "App": return this.fApp; + case "Req": return this.fReq; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fHost; + case 1: return this.fApp; + case 2: return this.fReq; + default: return null; + } } public HostInstance getHost() { @@ -721,9 +733,9 @@ public final class ResourceRequirement extends BaseGeneratedEMFQuerySpecificatio } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement (visibility: PUBLIC, simpleName: ResourceRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link ResourceRequirement} 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.cps.queries.ResourceRequirement (visibility: PUBLIC, simpleName: ResourceRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.ResourceRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link ResourceRequirement#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/UnallocateAppInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/UnallocateAppInstance.java index ccc0ba22..9f3d74b6 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/UnallocateAppInstance.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/UnallocateAppInstance.java @@ -77,8 +77,18 @@ public final class UnallocateAppInstance extends BaseGeneratedEMFQuerySpecificat @Override public Object get(final String parameterName) { - if ("App".equals(parameterName)) return this.fApp; - return null; + switch(parameterName) { + case "App": return this.fApp; + default: return null; + } + } + + @Override + public Object get(final int index) { + switch(index) { + case 0: return this.fApp; + default: return null; + } } public ApplicationInstance getApp() { @@ -464,9 +474,9 @@ public final class UnallocateAppInstance extends BaseGeneratedEMFQuerySpecificat } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.UnallocateAppInstance (visibility: PUBLIC, simpleName: UnallocateAppInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.UnallocateAppInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link UnallocateAppInstance} 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.cps.queries.UnallocateAppInstance (visibility: PUBLIC, simpleName: UnallocateAppInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.UnallocateAppInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link UnallocateAppInstance#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableHdd.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableHdd.java index 7d07b83a..8a150288 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableHdd.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableHdd.java @@ -68,9 +68,9 @@ public final class AvailableHdd extends BaseGeneratedEMFQuerySpecificationWithGe } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableHdd (visibility: PUBLIC, simpleName: AvailableHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link AvailableHdd} 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.cps.queries.internal.AvailableHdd (visibility: PUBLIC, simpleName: AvailableHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link AvailableHdd#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableMemory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableMemory.java index b06544d5..c89872e6 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableMemory.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/AvailableMemory.java @@ -68,9 +68,9 @@ public final class AvailableMemory extends BaseGeneratedEMFQuerySpecificationWit } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableMemory (visibility: PUBLIC, simpleName: AvailableMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link AvailableMemory} 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.cps.queries.internal.AvailableMemory (visibility: PUBLIC, simpleName: AvailableMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.AvailableMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link AvailableMemory#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsApplications.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsApplications.java index 23867558..fe115086 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsApplications.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsApplications.java @@ -57,9 +57,9 @@ public final class CpsApplications extends BaseGeneratedEMFQuerySpecificationWit } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsApplications (visibility: PUBLIC, simpleName: CpsApplications, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsApplications, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link CpsApplications} 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.cps.queries.internal.CpsApplications (visibility: PUBLIC, simpleName: CpsApplications, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsApplications, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link CpsApplications#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsHosts.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsHosts.java index e55bddff..cea8c097 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsHosts.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/CpsHosts.java @@ -57,9 +57,9 @@ public final class CpsHosts extends BaseGeneratedEMFQuerySpecificationWithGeneri } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsHosts (visibility: PUBLIC, simpleName: CpsHosts, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsHosts, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link CpsHosts} 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.cps.queries.internal.CpsHosts (visibility: PUBLIC, simpleName: CpsHosts, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.CpsHosts, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link CpsHosts#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeHddPercentage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeHddPercentage.java index c24f46a1..ed5c9cda 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeHddPercentage.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeHddPercentage.java @@ -66,9 +66,9 @@ public final class FreeHddPercentage extends BaseGeneratedEMFQuerySpecificationW } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.FreeHddPercentage (visibility: PUBLIC, simpleName: FreeHddPercentage, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.FreeHddPercentage, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link FreeHddPercentage} 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.cps.queries.internal.FreeHddPercentage (visibility: PUBLIC, simpleName: FreeHddPercentage, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.FreeHddPercentage, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link FreeHddPercentage#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeMemoryPercentage.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeMemoryPercentage.java index c2bb2bb3..b5923ba9 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeMemoryPercentage.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/FreeMemoryPercentage.java @@ -66,9 +66,9 @@ public final class FreeMemoryPercentage extends BaseGeneratedEMFQuerySpecificati } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.FreeMemoryPercentage (visibility: PUBLIC, simpleName: FreeMemoryPercentage, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.FreeMemoryPercentage, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link FreeMemoryPercentage} 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.cps.queries.internal.FreeMemoryPercentage (visibility: PUBLIC, simpleName: FreeMemoryPercentage, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.FreeMemoryPercentage, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link FreeMemoryPercentage#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HddRequirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HddRequirement.java index 68448930..4e6a2d10 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HddRequirement.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HddRequirement.java @@ -62,9 +62,9 @@ public final class HddRequirement extends BaseGeneratedEMFQuerySpecificationWith } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.HddRequirement (visibility: PUBLIC, simpleName: HddRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.HddRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link HddRequirement} 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.cps.queries.internal.HddRequirement (visibility: PUBLIC, simpleName: HddRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.HddRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link HddRequirement#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HostInstanceCost.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HostInstanceCost.java index db7f7021..429817ce 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HostInstanceCost.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/HostInstanceCost.java @@ -62,9 +62,9 @@ public final class HostInstanceCost extends BaseGeneratedEMFQuerySpecificationWi } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.HostInstanceCost (visibility: PUBLIC, simpleName: HostInstanceCost, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.HostInstanceCost, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link HostInstanceCost} 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.cps.queries.internal.HostInstanceCost (visibility: PUBLIC, simpleName: HostInstanceCost, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.HostInstanceCost, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link HostInstanceCost#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/MemoryRequirement.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/MemoryRequirement.java index d15f9bfa..98924467 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/MemoryRequirement.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/MemoryRequirement.java @@ -62,9 +62,9 @@ public final class MemoryRequirement extends BaseGeneratedEMFQuerySpecificationW } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.MemoryRequirement (visibility: PUBLIC, simpleName: MemoryRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.MemoryRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link MemoryRequirement} 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.cps.queries.internal.MemoryRequirement (visibility: PUBLIC, simpleName: MemoryRequirement, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.MemoryRequirement, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link MemoryRequirement#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/NoHostToAllocateTo.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/NoHostToAllocateTo.java index 50597805..155ed09b 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/NoHostToAllocateTo.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/NoHostToAllocateTo.java @@ -60,9 +60,9 @@ public final class NoHostToAllocateTo extends BaseGeneratedEMFQuerySpecification } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.NoHostToAllocateTo (visibility: PUBLIC, simpleName: NoHostToAllocateTo, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.NoHostToAllocateTo, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link NoHostToAllocateTo} 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.cps.queries.internal.NoHostToAllocateTo (visibility: PUBLIC, simpleName: NoHostToAllocateTo, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.NoHostToAllocateTo, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link NoHostToAllocateTo#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/RequiredAppInstances.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/RequiredAppInstances.java index dc76cbde..ffce9148 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/RequiredAppInstances.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/RequiredAppInstances.java @@ -68,9 +68,9 @@ public final class RequiredAppInstances extends BaseGeneratedEMFQuerySpecificati } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.RequiredAppInstances (visibility: PUBLIC, simpleName: RequiredAppInstances, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.RequiredAppInstances, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link RequiredAppInstances} 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.cps.queries.internal.RequiredAppInstances (visibility: PUBLIC, simpleName: RequiredAppInstances, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.RequiredAppInstances, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link RequiredAppInstances#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/SatisfyingInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/SatisfyingInstance.java index 4285101c..dea68f94 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/SatisfyingInstance.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/SatisfyingInstance.java @@ -59,9 +59,9 @@ public final class SatisfyingInstance extends BaseGeneratedEMFQuerySpecification } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.SatisfyingInstance (visibility: PUBLIC, simpleName: SatisfyingInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.SatisfyingInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link SatisfyingInstance} 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.cps.queries.internal.SatisfyingInstance (visibility: PUBLIC, simpleName: SatisfyingInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.SatisfyingInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link SatisfyingInstance#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalHdd.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalHdd.java index f250f76d..efa13033 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalHdd.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalHdd.java @@ -59,9 +59,9 @@ public final class TotalHdd extends BaseGeneratedEMFQuerySpecificationWithGeneri } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalHdd (visibility: PUBLIC, simpleName: TotalHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link TotalHdd} 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.cps.queries.internal.TotalHdd (visibility: PUBLIC, simpleName: TotalHdd, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalHdd, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link TotalHdd#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalMemory.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalMemory.java index aecd97e2..2fe3e741 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalMemory.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/TotalMemory.java @@ -59,9 +59,9 @@ public final class TotalMemory extends BaseGeneratedEMFQuerySpecificationWithGen } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalMemory (visibility: PUBLIC, simpleName: TotalMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link TotalMemory} 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.cps.queries.internal.TotalMemory (visibility: PUBLIC, simpleName: TotalMemory, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.TotalMemory, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link TotalMemory#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/UnallocatedAppInstance.java b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/UnallocatedAppInstance.java index a20b534c..66b315f4 100644 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/UnallocatedAppInstance.java +++ b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src-gen/hu/bme/mit/inf/dslreasoner/domains/cps/queries/internal/UnallocatedAppInstance.java @@ -59,9 +59,9 @@ public final class UnallocatedAppInstance extends BaseGeneratedEMFQuerySpecifica } /** - * Inner class allowing the singleton instance of {@link JvmGenericType: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.UnallocatedAppInstance (visibility: PUBLIC, simpleName: UnallocatedAppInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.UnallocatedAppInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)} to be created + * Inner class allowing the singleton instance of {@link UnallocatedAppInstance} 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.cps.queries.internal.UnallocatedAppInstance (visibility: PUBLIC, simpleName: UnallocatedAppInstance, identifier: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal.UnallocatedAppInstance, deprecated: ) (abstract: false, static: false, final: true, packageName: hu.bme.mit.inf.dslreasoner.domains.cps.queries.internal) (interface: false, strictFloatingPoint: false, anonymous: false)#instance()}. + * but rather at the first call to {@link UnallocatedAppInstance#instance()}. * *

    This workaround is required e.g. to support recursion. * diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend deleted file mode 100644 index 4a4b7a87..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/CpsMdeOptimiserMain.xtend +++ /dev/null @@ -1,57 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo - -import hu.bme.mit.inf.dslreasoner.domains.cps.CpsPackage -import hu.bme.mit.inf.dslreasoner.domains.cps.generator.CpsGenerator -import java.io.BufferedReader -import java.io.BufferedWriter -import java.io.FileReader -import java.io.FileWriter -import java.util.Map -import org.eclipse.emf.common.util.URI -import org.eclipse.emf.ecore.EPackage -import org.eclipse.emf.ecore.resource.Resource -import org.eclipse.emf.ecore.xmi.impl.XMIResourceFactoryImpl -import uk.ac.kcl.inf.mdeoptimiser.interfaces.cli.Run - -class CpsMdeOptimiserMain { - static val PROJECT_PATH = "." - static val PROBLEM_PATH = "model/problem.xmi" - static val MOPT_PATH = "src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt" - - private new() { - new IllegalStateException("This is a static utility class and should not be instantiated directly.") - } - - public static def void main(String[] args) { - Resource.Factory.Registry.INSTANCE.extensionToFactoryMap.put(Resource.Factory.Registry.DEFAULT_EXTENSION, - new XMIResourceFactoryImpl) - EPackage.Registry.INSTANCE.put(CpsPackage.eNS_URI, CpsPackage.eINSTANCE) - val generator = new CpsGenerator(1, 4, 1) - val problem = generator.generateCpsProblem - problem.eResource.URI = URI.createFileURI(PROBLEM_PATH) - problem.eResource.save(emptyMap) - fixupHenshinModel("model/cps.henshin", "model/cps_fixup.henshin", #{"cps.ecore" -> CpsPackage.eNS_URI}) - Run.main(#["-p", PROJECT_PATH, "-m", MOPT_PATH]) - } - - private def static void fixupHenshinModel(String originalPath, String outputPath, Map remapMap) { - val reader = new BufferedReader(new FileReader(originalPath)) - try { - val writer = new BufferedWriter(new FileWriter(outputPath)) - try { - var String line - while ((line = reader.readLine) !== null) { - for (entry : remapMap.entrySet) { - line = line.replace(entry.key, entry.value) - } - writer.write(line) - writer.write("\n") - } - } finally { - writer.close - } - } finally { - reader.close - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.xtend deleted file mode 100644 index 1a9286b3..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NonRedundantAllocationsConstraint.xtend +++ /dev/null @@ -1,29 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo - -import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution -import com.google.common.collect.HashMultiset - -class NonRedundantAllocationsConstraint implements IGuidanceFunction { - override getName() { - "NonRedundantAllocations" - } - - override computeFitness(Solution solution) { - val cps = solution.model as CyberPhysicalSystem - var int cost = 0 - for (hostType : cps.hostTypes) { - for (host : hostType.instances) { - val bins = HashMultiset.create - for (app : host.applications) { - bins.add(app.requirement) - } - for (entry : bins.entrySet) { - cost += entry.count - 1 - } - } - } - cost - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.xtend deleted file mode 100644 index 663aa26c..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotAllocatedAppInstancesConstraint.xtend +++ /dev/null @@ -1,24 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo - -import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution - -class NotAllocatedAppInstancesConstraint implements IGuidanceFunction { - override getName() { - "NotAllocatedAppInstances" - } - - override computeFitness(Solution solution) { - val cps = solution.model as CyberPhysicalSystem - var int cost = 0 - for (appType : cps.applicationTypes) { - for (app : appType.instances) { - if (app.allocatedTo === null || !appType.requirements.exists[hostType == app.allocatedTo.type]) { - cost++ - } - } - } - cost - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.xtend deleted file mode 100644 index e44381ec..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/NotSatisfiedRequirementsConstraint.xtend +++ /dev/null @@ -1,27 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo - -import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution - -class NotSatisfiedRequirementsConstraint implements IGuidanceFunction { - override getName() { - "NotSatisfiedRequirements" - } - - override computeFitness(Solution solution) { - val cps = solution.model as CyberPhysicalSystem - var int cost = 0 - for (request : cps.requests) { - for (requirement : request.requirements) { - cost += Math.abs(requirement.count - requirement.instances.size) - for (app : requirement.instances) { - if (app.type != requirement.type) { - cost++ - } - } - } - } - cost - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.xtend deleted file mode 100644 index fc1d666f..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/ResourceUtilizationUtil.xtend +++ /dev/null @@ -1,31 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo - -import hu.bme.mit.inf.dslreasoner.domains.cps.HostInstance - -class ResourceUtilizationUtil { - private new() { - new IllegalStateException("This is a static utility class and should not be instantiated directly.") - } - - static def getMemoryUtilization(HostInstance host) { - var int utilization = 0 - for (app : host.applications) { - val req = app.type.requirements.findFirst[hostType == host.type] - if (req !== null) { - utilization += req.requiredMemory - } - } - utilization - } - - static def getHddUtilization(HostInstance host) { - var int utilization = 0 - for (app : host.applications) { - val req = app.type.requirements.findFirst[hostType == host.type] - if (req !== null) { - utilization += req.requiredHdd - } - } - utilization - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.xtend deleted file mode 100644 index 85cc8115..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageHddConstraint.xtend +++ /dev/null @@ -1,33 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo - -import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution - -class TooLowAverageHddConstraint implements IGuidanceFunction { - static val THRESHOLD = 0.25 - - override getName() { - "TooLowAverageHdd" - } - - override computeFitness(Solution solution) { - val cps = solution.model as CyberPhysicalSystem - var double sumUtilization - var int numHosts - for (hostType : cps.hostTypes) { - numHosts += hostType.instances.size - for (host : hostType.instances) { - val utilization = ResourceUtilizationUtil.getHddUtilization(host) - sumUtilization += (utilization as double) / hostType.defaultHdd - } - } - val averageUtilization = sumUtilization / numHosts - val difference = THRESHOLD - averageUtilization - if (difference > 0) { - difference - } else { - 0 - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.xtend deleted file mode 100644 index e9b47d4c..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TooLowAverageMemoryConstraint.xtend +++ /dev/null @@ -1,33 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo - -import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution - -class TooLowAverageMemoryConstraint implements IGuidanceFunction { - static val THRESHOLD = 0.25 - - override getName() { - "TooLowAverageMemory" - } - - override computeFitness(Solution solution) { - val cps = solution.model as CyberPhysicalSystem - var double sumUtilization - var int numHosts - for (hostType : cps.hostTypes) { - numHosts += hostType.instances.size - for (host : hostType.instances) { - val utilization = ResourceUtilizationUtil.getMemoryUtilization(host) - sumUtilization += (utilization as double) / hostType.defaultMemory - } - } - val averageUtilization = sumUtilization / numHosts - val difference = THRESHOLD - averageUtilization - if (difference > 0) { - difference - } else { - 0 - } - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.xtend deleted file mode 100644 index af65e442..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/TotalCostFitnessFunction.xtend +++ /dev/null @@ -1,23 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo - -import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution - -class TotalCostFitnessFunction implements IGuidanceFunction { - override getName() { - "TotalCost" - } - - override computeFitness(Solution solution) { - val cps = solution.model as CyberPhysicalSystem - var int cost = 0 - for (appType : cps.applicationTypes) { - cost += 5 * appType.instances.size - } - for (hostType : cps.hostTypes) { - cost += hostType.cost * hostType.instances.size - } - cost - } -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.xtend deleted file mode 100644 index 08450f45..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableHddConstraint.xtend +++ /dev/null @@ -1,27 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo - -import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution - -class UnavailableHddConstraint implements IGuidanceFunction { - override getName() { - "UnavailableHdd" - } - - override computeFitness(Solution solution) { - val cps = solution.model as CyberPhysicalSystem - var int cost = 0 - for (hostType : cps.hostTypes) { - for (host : hostType.instances) { - val utilization = ResourceUtilizationUtil.getHddUtilization(host) - val difference = utilization - hostType.defaultHdd - if (difference > 0) { - cost += difference - } - } - } - cost - } - -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.xtend b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.xtend deleted file mode 100644 index e46d59a6..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/UnavailableMemoryConstraint.xtend +++ /dev/null @@ -1,27 +0,0 @@ -package hu.bme.mit.inf.dslreasoner.domains.cps.mdeo - -import hu.bme.mit.inf.dslreasoner.domains.cps.CyberPhysicalSystem -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.IGuidanceFunction -import uk.ac.kcl.inf.mdeoptimiser.libraries.core.optimisation.interpreter.guidance.Solution - -class UnavailableMemoryConstraint implements IGuidanceFunction { - override getName() { - "UnavailableMemory" - } - - override computeFitness(Solution solution) { - val cps = solution.model as CyberPhysicalSystem - var int cost = 0 - for (hostType : cps.hostTypes) { - for (host : hostType.instances) { - val utilization = ResourceUtilizationUtil.getMemoryUtilization(host) - val difference = utilization - hostType.defaultMemory - if (difference > 0) { - cost += difference - } - } - } - cost - } - -} diff --git a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt b/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt deleted file mode 100644 index 67fe7508..00000000 --- a/Domains/hu.bme.mit.inf.dslreasoner.domains.cps/src/hu/bme/mit/inf/dslreasoner/domains/cps/mdeo/cps.mopt +++ /dev/null @@ -1,43 +0,0 @@ -problem { - basepath - metamodel - model -} - -goal { - objective TotalCost minimise java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.TotalCostFitnessFunction" } - constraint NotSatisfiedRequriements java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.NotSatisfiedRequirementsConstraint" } - constraint NotAllocatedAppInstances java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.NotAllocatedAppInstancesConstraint" } - constraint NonRedundantAllocations java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.NonRedundantAllocationsConstraint" } - constraint UnavailableMemory java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.UnavailableMemoryConstraint" } - constraint UnavailableHdd java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.UnavailableHddConstraint" } - constraint TooLowAverageMemory java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.TooLowAverageMemoryConstraint" } - constraint TooLowAverageHdd java { "hu.bme.mit.inf.dslreasoner.domains.cps.mdeo.TooLowAverageHddConstraint" } -} - -search { -// mutate using unit "createAppInstance" -// mutate using unit "deleteAppInstance" -// mutate using unit "createHostInstance" -// mutate using unit "deleteHostInstance" -// mutate using unit "allocate" -// mutate using unit "unallocate" -// mutate using unit "reallocate" - mutate { "ApplicationInstance" } - mutate { "HostInstance" } -} - -solver { - optimisation provider moea algorithm NSGAII { - variation: mutation - population: 25 - mutation.step: 3 - mutation.strategy: random - } - - termination { - time: 120 - } - - batches 1 -} -- cgit v1.2.3-54-g00ecf