Skip to content
Snippets Groups Projects
Commit f453e241 authored by Fabian Brosig's avatar Fabian Brosig
Browse files

fixed ocl constraints

AtMostOneBlackBoxBehaviorPerProvidedService
AtMostOneCoarseGrainedBehaviorPerProvidedService
AtMostOneFineGrainedBehaviorPerProvidedService

git-svn-id: https://se1.informatik.uni-wuerzburg.de/usvn/svn/code/DMM/trunk@16333 9e42b895-fcda-4063-8a3b-11be15eb1bbd
parent 85171cf4
No related branches found
No related tags found
No related merge requests found
Showing with 15 additions and 9 deletions
......@@ -20,7 +20,7 @@
<details key="constraints" value="AtMostOneBlackBoxBehaviorPerProvidedService"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="AtMostOneBlackBoxBehaviorPerProvidedService" value="&#xA;&#x9;&#x9;&#x9;self.blackBoxBehavior->isUnique(bbb1 : servicebehavior_0::BlackBoxBehavior | bbb1.describedSignature)"/>
<details key="AtMostOneBlackBoxBehaviorPerProvidedService" value="&#xA;&#x9;&#x9;&#x9;not self.blackBoxBehavior->isEmpty() implies &#xA;&#x9;&#x9;&#x9;self.blackBoxBehavior->isUnique(bbb1 : servicebehavior_0::BlackBoxBehavior | bbb1.describedSignature)"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="interfaceProvidingRoles"
ordered="false" upperBound="-1" eType="#//InterfaceProvidingRole" containment="true"
......@@ -41,7 +41,7 @@
<details key="constraints" value="AtMostOneCoarseGrainedBehaviorPerProvidedService"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="AtMostOneCoarseGrainedBehaviorPerProvidedService" value="&#xA;&#x9;&#x9;&#x9;self.coarseGrainedBehavior->isUnique(cgb1 : servicebehavior_0::CoarseGrainedBehavior | cgb1.describedSignature)"/>
<details key="AtMostOneCoarseGrainedBehaviorPerProvidedService" value="&#xA;&#x9;&#x9;&#x9;not self.coarseGrainedBehavior->isEmpty() implies &#xA;&#x9;&#x9;&#x9;self.coarseGrainedBehavior->isUnique(cgb1 : servicebehavior_0::CoarseGrainedBehavior | cgb1.describedSignature)"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="coarseGrainedBehavior"
ordered="false" upperBound="-1" eType="ecore:EClass servicebehavior.ecore#//CoarseGrainedBehavior"
......@@ -154,7 +154,7 @@
<details key="constraints" value="AtMostOneFineGrainedBehaviorPerProvidedService ReferencedSignatureMustBelongToInterfaceReferencedByInterfaceProvidingRole"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="AtMostOneFineGrainedBehaviorPerProvidedService" value="&#xA;&#x9;&#x9;&#x9;self.fineGrainedBehavior->isUnique(fgb1 : servicebehavior_0::FineGrainedBehavior | fgb1.describedSignature)"/>
<details key="AtMostOneFineGrainedBehaviorPerProvidedService" value="&#xA;&#x9;&#x9;&#x9;not self.fineGrainedBehavior->isEmpty() implies &#xA;&#x9;&#x9;&#x9;self.fineGrainedBehavior->isUnique(fgb1 : servicebehavior_0::FineGrainedBehavior | fgb1.describedSignature)"/>
<details key="ReferencedSignatureMustBelongToInterfaceReferencedByInterfaceProvidingRole"
value="&#xA;&#x9;&#x9;&#x9;self.fineGrainedBehavior->forAll(fgb1 : servicebehavior_0::FineGrainedBehavior | self.interfaceProvidingRoles->exists(p | p.interface = fgb1.describedSignature.interface))"/>
</eAnnotations>
......
......@@ -14,6 +14,7 @@ package repository : repository = 'http://www.descartes-research.net/metamodel/r
property interfaceProvidingRoles#interfaceProvidingEntity : InterfaceProvidingRole[0..*] { composes };
property blackBoxBehavior : servicebehavior_0::BlackBoxBehavior[*] { composes };
invariant AtMostOneBlackBoxBehaviorPerProvidedService:
not self.blackBoxBehavior->isEmpty() implies
self.blackBoxBehavior->isUnique(bbb1 : servicebehavior_0::BlackBoxBehavior | bbb1.describedSignature);
}
abstract class InterfaceRequiringEntity extends core_0::Entity
......@@ -25,6 +26,7 @@ package repository : repository = 'http://www.descartes-research.net/metamodel/r
property coarseGrainedBehavior : servicebehavior_0::CoarseGrainedBehavior[*] { composes };
property relationships#surroundingEntity : parameterdependency_0::Relationship[*];
invariant AtMostOneCoarseGrainedBehaviorPerProvidedService:
not self.coarseGrainedBehavior->isEmpty() implies
self.coarseGrainedBehavior->isUnique(cgb1 : servicebehavior_0::CoarseGrainedBehavior | cgb1.describedSignature);
}
class Import
......@@ -119,6 +121,7 @@ package repository : repository = 'http://www.descartes-research.net/metamodel/r
property semaphores : Semaphore[*] { composes };
property fineGrainedBehavior : servicebehavior_0::FineGrainedBehavior[*] { composes };
invariant AtMostOneFineGrainedBehaviorPerProvidedService:
not self.fineGrainedBehavior->isEmpty() implies
self.fineGrainedBehavior->isUnique(fgb1 : servicebehavior_0::FineGrainedBehavior | fgb1.describedSignature);
invariant ReferencedSignatureMustBelongToInterfaceReferencedByInterfaceProvidingRole:
self.fineGrainedBehavior->forAll(fgb1 : servicebehavior_0::FineGrainedBehavior | self.interfaceProvidingRoles->exists(p | p.interface = fgb1.describedSignature.interface));
......
......@@ -22,7 +22,7 @@ import org.eclipse.emf.common.util.EList;
*
* @see edu.kit.ipd.descartes.mm.applicationlevel.repository.RepositoryPackage#getBasicComponent()
* @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='AtMostOneFineGrainedBehaviorPerProvidedService ReferencedSignatureMustBelongToInterfaceReferencedByInterfaceProvidingRole'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot AtMostOneFineGrainedBehaviorPerProvidedService='\n\t\t\tself.fineGrainedBehavior->isUnique(fgb1 : servicebehavior_0::FineGrainedBehavior | fgb1.describedSignature)' ReferencedSignatureMustBelongToInterfaceReferencedByInterfaceProvidingRole='\n\t\t\tself.fineGrainedBehavior->forAll(fgb1 : servicebehavior_0::FineGrainedBehavior | self.interfaceProvidingRoles->exists(p | p.interface = fgb1.describedSignature.interface))'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot AtMostOneFineGrainedBehaviorPerProvidedService='\n\t\t\tnot self.fineGrainedBehavior->isEmpty() implies \n\t\t\tself.fineGrainedBehavior->isUnique(fgb1 : servicebehavior_0::FineGrainedBehavior | fgb1.describedSignature)' ReferencedSignatureMustBelongToInterfaceReferencedByInterfaceProvidingRole='\n\t\t\tself.fineGrainedBehavior->forAll(fgb1 : servicebehavior_0::FineGrainedBehavior | self.interfaceProvidingRoles->exists(p | p.interface = fgb1.describedSignature.interface))'"
* @generated
*/
public interface BasicComponent extends RepositoryComponent {
......
......@@ -25,7 +25,7 @@ import org.eclipse.emf.common.util.EList;
* @see edu.kit.ipd.descartes.mm.applicationlevel.repository.RepositoryPackage#getInterfaceProvidingEntity()
* @model abstract="true"
* annotation="http://www.eclipse.org/emf/2002/Ecore constraints='AtMostOneBlackBoxBehaviorPerProvidedService'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot AtMostOneBlackBoxBehaviorPerProvidedService='\n\t\t\tself.blackBoxBehavior->isUnique(bbb1 : servicebehavior_0::BlackBoxBehavior | bbb1.describedSignature)'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot AtMostOneBlackBoxBehaviorPerProvidedService='\n\t\t\tnot self.blackBoxBehavior->isEmpty() implies \n\t\t\tself.blackBoxBehavior->isUnique(bbb1 : servicebehavior_0::BlackBoxBehavior | bbb1.describedSignature)'"
* @generated
*/
public interface InterfaceProvidingEntity extends Entity {
......
......@@ -25,7 +25,7 @@ import org.eclipse.emf.common.util.EList;
* @see edu.kit.ipd.descartes.mm.applicationlevel.repository.RepositoryPackage#getInterfaceProvidingRequiringEntity()
* @model abstract="true"
* annotation="http://www.eclipse.org/emf/2002/Ecore constraints='AtMostOneCoarseGrainedBehaviorPerProvidedService'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot AtMostOneCoarseGrainedBehaviorPerProvidedService='\n\t\t\tself.coarseGrainedBehavior->isUnique(cgb1 : servicebehavior_0::CoarseGrainedBehavior | cgb1.describedSignature)'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot AtMostOneCoarseGrainedBehaviorPerProvidedService='\n\t\t\tnot self.coarseGrainedBehavior->isEmpty() implies \n\t\t\tself.coarseGrainedBehavior->isUnique(cgb1 : servicebehavior_0::CoarseGrainedBehavior | cgb1.describedSignature)'"
* @generated
*/
public interface InterfaceProvidingRequiringEntity extends InterfaceProvidingEntity, InterfaceRequiringEntity {
......
......@@ -1563,13 +1563,13 @@ public class RepositoryPackageImpl extends EPackageImpl implements RepositoryPac
(interfaceProvidingEntityEClass,
source,
new String[] {
"AtMostOneBlackBoxBehaviorPerProvidedService", "\n\t\t\tself.blackBoxBehavior->isUnique(bbb1 : servicebehavior_0::BlackBoxBehavior | bbb1.describedSignature)"
"AtMostOneBlackBoxBehaviorPerProvidedService", "\n\t\t\tnot self.blackBoxBehavior->isEmpty() implies \n\t\t\tself.blackBoxBehavior->isUnique(bbb1 : servicebehavior_0::BlackBoxBehavior | bbb1.describedSignature)"
});
addAnnotation
(interfaceProvidingRequiringEntityEClass,
source,
new String[] {
"AtMostOneCoarseGrainedBehaviorPerProvidedService", "\n\t\t\tself.coarseGrainedBehavior->isUnique(cgb1 : servicebehavior_0::CoarseGrainedBehavior | cgb1.describedSignature)"
"AtMostOneCoarseGrainedBehaviorPerProvidedService", "\n\t\t\tnot self.coarseGrainedBehavior->isEmpty() implies \n\t\t\tself.coarseGrainedBehavior->isUnique(cgb1 : servicebehavior_0::CoarseGrainedBehavior | cgb1.describedSignature)"
});
addAnnotation
(composedStructureEClass,
......@@ -1601,7 +1601,7 @@ public class RepositoryPackageImpl extends EPackageImpl implements RepositoryPac
(basicComponentEClass,
source,
new String[] {
"AtMostOneFineGrainedBehaviorPerProvidedService", "\n\t\t\tself.fineGrainedBehavior->isUnique(fgb1 : servicebehavior_0::FineGrainedBehavior | fgb1.describedSignature)",
"AtMostOneFineGrainedBehaviorPerProvidedService", "\n\t\t\tnot self.fineGrainedBehavior->isEmpty() implies \n\t\t\tself.fineGrainedBehavior->isUnique(fgb1 : servicebehavior_0::FineGrainedBehavior | fgb1.describedSignature)",
"ReferencedSignatureMustBelongToInterfaceReferencedByInterfaceProvidingRole", "\n\t\t\tself.fineGrainedBehavior->forAll(fgb1 : servicebehavior_0::FineGrainedBehavior | self.interfaceProvidingRoles->exists(p | p.interface = fgb1.describedSignature.interface))"
});
addAnnotation
......
......@@ -209,6 +209,7 @@ public class RepositoryValidator extends EObjectValidator {
* @generated
*/
protected static final String INTERFACE_PROVIDING_ENTITY__AT_MOST_ONE_BLACK_BOX_BEHAVIOR_PER_PROVIDED_SERVICE__EEXPRESSION = "\n" +
"\t\t\tnot self.blackBoxBehavior->isEmpty() implies \n" +
"\t\t\tself.blackBoxBehavior->isUnique(bbb1 : servicebehavior_0::BlackBoxBehavior | bbb1.describedSignature)";
/**
......@@ -279,6 +280,7 @@ public class RepositoryValidator extends EObjectValidator {
* @generated
*/
protected static final String INTERFACE_PROVIDING_REQUIRING_ENTITY__AT_MOST_ONE_COARSE_GRAINED_BEHAVIOR_PER_PROVIDED_SERVICE__EEXPRESSION = "\n" +
"\t\t\tnot self.coarseGrainedBehavior->isEmpty() implies \n" +
"\t\t\tself.coarseGrainedBehavior->isUnique(cgb1 : servicebehavior_0::CoarseGrainedBehavior | cgb1.describedSignature)";
/**
......@@ -702,6 +704,7 @@ public class RepositoryValidator extends EObjectValidator {
* @generated
*/
protected static final String BASIC_COMPONENT__AT_MOST_ONE_FINE_GRAINED_BEHAVIOR_PER_PROVIDED_SERVICE__EEXPRESSION = "\n" +
"\t\t\tnot self.fineGrainedBehavior->isEmpty() implies \n" +
"\t\t\tself.fineGrainedBehavior->isUnique(fgb1 : servicebehavior_0::FineGrainedBehavior | fgb1.describedSignature)";
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment