Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Family SCUML = {

property type typeInterface = enum {offert, requise};


property type service = set {string};

port type InterfaceUMl = {

property interface_T : typeInterface;


property methode : service;

component type compUML = {

rule regle2= invariant Forall p:port in self.ports| declaresType(p,InterfaceUMl);


}

connector type conUML = {


role R1 = {rule regle3 =invariant size(self.attachedports)==1 and forall p:InterfaceUMl in
self.attachedports | p.typeInterface == requise;};

role R2 = {rule regle4 = invariant size(self.attachedports)==1 and forall p:InterfaceUMl in


self.attachedports | p.typeInterface == offert;};

rule regle21 =invariant size(self.roles)==2;


}

rule regle2= invariant Forall c:connector in self.connectors | size(c.roles)==2; //regle


generale

design analysis valideMatching(Ireq : InterfaceUML ,Ioff: InterfaceUML) :boolean =


isSubset(Ioff.methode ,Ioff.methode);

rule c-system = invariant (forall comp: compUML in self.components | forall Ireq:


typeInterface in comp.ports | Ireq.typeInterface == requise -> size(Ireq.attachedports)==1)
and ( forall con: conUML in self.connectors | forall Ireq: InterfaceUML in
con.R1.attachedports| exists Ioff : InterfaceUML in con.R2.attachedports|
valideMatching(Ireq ,Ioff)
);
}
import families/Family1.acme;

System System4 : SCUML = new SCUML extended with {

Component Client : CompUML = new CompUML extended with {


Port I2 : InterfaceUML = new InterfaceUML extended with {

Property Interface_T = offerte;

Property methode = {"solde","retirer"};

}
Component Server : CompUML = new CompUML extended with {
Port I1 : InterfaceUML = new InterfaceUML extended with {

Property Interface_T = Requise;

Property methode = {"solde","retirer","deposer"};

}
Connector RPC : ConVML = new ConVML extended with {
Role R1 = {

}
Role R2 = {

}
Attachment Client.I2 to RPC.R1;
Attachment Server.I1 to RPC.R2;
}

You might also like