Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New abstract change propagation analysis #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions edu.kit.ipd.sdq.kamp4aps.aps/model/aPS.ecore
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,14 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PowerWiring" eSuperTypes="#//StructureRepository/Structure"/>
<eClassifiers xsi:type="ecore:EClass" name="LogicalWiring" eSuperTypes="#//StructureRepository/Structure"/>
<eClassifiers xsi:type="ecore:EClass" name="Stamp" eSuperTypes="#//StructureRepository/Structure">
<eStructuralFeatures xsi:type="ecore:EReference" name="stampingCylinder" lowerBound="1"
eType="#//ComponentRepository/MonostableCylinder"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="slidingCylinder" lowerBound="1"
eType="#//ComponentRepository/BistableCylinder"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="sensors" upperBound="-1"
eType="#//ComponentRepository/Sensor"/>
</eClassifiers>
</eSubpackages>
<eSubpackages name="ModuleRepository" nsURI="edu.kit.ipd.sdq.kaps.xppu.modulerepository"
nsPrefix="ModuleRepository">
Expand Down
8 changes: 8 additions & 0 deletions edu.kit.ipd.sdq.kamp4aps.aps/model/xPPU.ecore
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,14 @@
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PowerWiring" eSuperTypes="#//StructureRepository/Structure"/>
<eClassifiers xsi:type="ecore:EClass" name="LogicalWiring" eSuperTypes="#//StructureRepository/Structure"/>
<eClassifiers xsi:type="ecore:EClass" name="Stamp" eSuperTypes="#//StructureRepository/Structure">
<eStructuralFeatures xsi:type="ecore:EReference" name="stampingCylinder" lowerBound="1"
eType="#//ComponentRepository/MonostableCylinder"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="slidingCylinder" lowerBound="1"
eType="#//ComponentRepository/BistableCylinder"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="sensors" upperBound="-1"
eType="#//ComponentRepository/Sensor"/>
</eClassifiers>
</eSubpackages>
<eSubpackages name="ModuleRepository" nsURI="edu.kit.ipd.sdq.kaps.xppu.modulerepository"
nsPrefix="ModuleRepository">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
/**
*/
package edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository;

import edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository.BistableCylinder;
import edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository.MonostableCylinder;
import edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository.Sensor;

import org.eclipse.emf.common.util.EList;

/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Stamp</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.Stamp#getStampingCylinder <em>Stamping Cylinder</em>}</li>
* <li>{@link edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.Stamp#getSlidingCylinder <em>Sliding Cylinder</em>}</li>
* <li>{@link edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.Stamp#getSensors <em>Sensors</em>}</li>
* </ul>
*
* @see edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.StructureRepositoryPackage#getStamp()
* @model
* @generated
*/
public interface Stamp extends Structure {
/**
* Returns the value of the '<em><b>Stamping Cylinder</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Stamping Cylinder</em>' reference.
* @see #setStampingCylinder(MonostableCylinder)
* @see edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.StructureRepositoryPackage#getStamp_StampingCylinder()
* @model required="true"
* @generated
*/
MonostableCylinder getStampingCylinder();

/**
* Sets the value of the '{@link edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.Stamp#getStampingCylinder <em>Stamping Cylinder</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Stamping Cylinder</em>' reference.
* @see #getStampingCylinder()
* @generated
*/
void setStampingCylinder(MonostableCylinder value);

/**
* Returns the value of the '<em><b>Sliding Cylinder</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Sliding Cylinder</em>' reference.
* @see #setSlidingCylinder(BistableCylinder)
* @see edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.StructureRepositoryPackage#getStamp_SlidingCylinder()
* @model required="true"
* @generated
*/
BistableCylinder getSlidingCylinder();

/**
* Sets the value of the '{@link edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.Stamp#getSlidingCylinder <em>Sliding Cylinder</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Sliding Cylinder</em>' reference.
* @see #getSlidingCylinder()
* @generated
*/
void setSlidingCylinder(BistableCylinder value);

/**
* Returns the value of the '<em><b>Sensors</b></em>' reference list.
* The list contents are of type {@link edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository.Sensor}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the value of the '<em>Sensors</em>' reference list.
* @see edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.StructureRepositoryPackage#getStamp_Sensors()
* @model
* @generated
*/
EList<Sensor> getSensors();

} // Stamp
Original file line number Diff line number Diff line change
@@ -0,0 +1,265 @@
/**
*/
package edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.impl;

import edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository.BistableCylinder;
import edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository.MonostableCylinder;
import edu.kit.ipd.sdq.kamp4aps.model.aPS.ComponentRepository.Sensor;

import edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.Stamp;
import edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.StructureRepositoryPackage;

import java.util.Collection;

import org.eclipse.emf.common.notify.Notification;

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.util.EObjectResolvingEList;

/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Stamp</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.impl.StampImpl#getStampingCylinder <em>Stamping Cylinder</em>}</li>
* <li>{@link edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.impl.StampImpl#getSlidingCylinder <em>Sliding Cylinder</em>}</li>
* <li>{@link edu.kit.ipd.sdq.kamp4aps.model.aPS.StructureRepository.impl.StampImpl#getSensors <em>Sensors</em>}</li>
* </ul>
*
* @generated
*/
public class StampImpl extends StructureImpl implements Stamp {
/**
* The cached value of the '{@link #getStampingCylinder() <em>Stamping Cylinder</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getStampingCylinder()
* @generated
* @ordered
*/
protected MonostableCylinder stampingCylinder;

/**
* The cached value of the '{@link #getSlidingCylinder() <em>Sliding Cylinder</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSlidingCylinder()
* @generated
* @ordered
*/
protected BistableCylinder slidingCylinder;

/**
* The cached value of the '{@link #getSensors() <em>Sensors</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getSensors()
* @generated
* @ordered
*/
protected EList<Sensor> sensors;

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected StampImpl() {
super();
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return StructureRepositoryPackage.Literals.STAMP;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public MonostableCylinder getStampingCylinder() {
if (stampingCylinder != null && stampingCylinder.eIsProxy()) {
InternalEObject oldStampingCylinder = (InternalEObject)stampingCylinder;
stampingCylinder = (MonostableCylinder)eResolveProxy(oldStampingCylinder);
if (stampingCylinder != oldStampingCylinder) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, StructureRepositoryPackage.STAMP__STAMPING_CYLINDER, oldStampingCylinder, stampingCylinder));
}
}
return stampingCylinder;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MonostableCylinder basicGetStampingCylinder() {
return stampingCylinder;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setStampingCylinder(MonostableCylinder newStampingCylinder) {
MonostableCylinder oldStampingCylinder = stampingCylinder;
stampingCylinder = newStampingCylinder;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, StructureRepositoryPackage.STAMP__STAMPING_CYLINDER, oldStampingCylinder, stampingCylinder));
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public BistableCylinder getSlidingCylinder() {
if (slidingCylinder != null && slidingCylinder.eIsProxy()) {
InternalEObject oldSlidingCylinder = (InternalEObject)slidingCylinder;
slidingCylinder = (BistableCylinder)eResolveProxy(oldSlidingCylinder);
if (slidingCylinder != oldSlidingCylinder) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, StructureRepositoryPackage.STAMP__SLIDING_CYLINDER, oldSlidingCylinder, slidingCylinder));
}
}
return slidingCylinder;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BistableCylinder basicGetSlidingCylinder() {
return slidingCylinder;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setSlidingCylinder(BistableCylinder newSlidingCylinder) {
BistableCylinder oldSlidingCylinder = slidingCylinder;
slidingCylinder = newSlidingCylinder;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, StructureRepositoryPackage.STAMP__SLIDING_CYLINDER, oldSlidingCylinder, slidingCylinder));
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EList<Sensor> getSensors() {
if (sensors == null) {
sensors = new EObjectResolvingEList<Sensor>(Sensor.class, this, StructureRepositoryPackage.STAMP__SENSORS);
}
return sensors;
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case StructureRepositoryPackage.STAMP__STAMPING_CYLINDER:
if (resolve) return getStampingCylinder();
return basicGetStampingCylinder();
case StructureRepositoryPackage.STAMP__SLIDING_CYLINDER:
if (resolve) return getSlidingCylinder();
return basicGetSlidingCylinder();
case StructureRepositoryPackage.STAMP__SENSORS:
return getSensors();
}
return super.eGet(featureID, resolve, coreType);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case StructureRepositoryPackage.STAMP__STAMPING_CYLINDER:
setStampingCylinder((MonostableCylinder)newValue);
return;
case StructureRepositoryPackage.STAMP__SLIDING_CYLINDER:
setSlidingCylinder((BistableCylinder)newValue);
return;
case StructureRepositoryPackage.STAMP__SENSORS:
getSensors().clear();
getSensors().addAll((Collection<? extends Sensor>)newValue);
return;
}
super.eSet(featureID, newValue);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case StructureRepositoryPackage.STAMP__STAMPING_CYLINDER:
setStampingCylinder((MonostableCylinder)null);
return;
case StructureRepositoryPackage.STAMP__SLIDING_CYLINDER:
setSlidingCylinder((BistableCylinder)null);
return;
case StructureRepositoryPackage.STAMP__SENSORS:
getSensors().clear();
return;
}
super.eUnset(featureID);
}

/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case StructureRepositoryPackage.STAMP__STAMPING_CYLINDER:
return stampingCylinder != null;
case StructureRepositoryPackage.STAMP__SLIDING_CYLINDER:
return slidingCylinder != null;
case StructureRepositoryPackage.STAMP__SENSORS:
return sensors != null && !sensors.isEmpty();
}
return super.eIsSet(featureID);
}

} //StampImpl
Loading