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
---
.../domains/cps/impl/CpsPackageImpl.java | 124 +--------------------
.../domains/cps/impl/CyberPhysicalSystemImpl.java | 57 ----------
.../domains/cps/impl/HostInstanceImpl.java | 105 -----------------
3 files changed, 1 insertion(+), 285 deletions(-)
(limited to 'Domains/hu.bme.mit.inf.dslreasoner.domains.cps/ecore-gen/hu/bme/mit/inf/dslreasoner/domains/cps/impl')
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();
}
--
cgit v1.2.3-70-g09d2