Presentation is loading. Please wait.

Presentation is loading. Please wait.

FUSE04 - Barcelona - 1 - Adaptation scenario: Adding a port BasicDiary addRDV(Rdv) removeRDV(Rdv) getRDVs() isFree(Rdv) lizDiary apply Any addRDV(Rdv)

Similar presentations


Presentation on theme: "FUSE04 - Barcelona - 1 - Adaptation scenario: Adding a port BasicDiary addRDV(Rdv) removeRDV(Rdv) getRDVs() isFree(Rdv) lizDiary apply Any addRDV(Rdv)"— Presentation transcript:

1 FUSE04 - Barcelona Adaptation scenario: Adding a port BasicDiary addRDV(Rdv) removeRDV(Rdv) getRDVs() isFree(Rdv) lizDiary apply Any addRDV(Rdv) removeRDV(Rdv) getRDVs() isFree(Rdv) printError(Str) BasicDiary+ Pattern errorManagement(Any aComponent) { newPort aComponent.printError(Str s) ->... } Pattern rule

2 FUSE04 - Barcelona Adaptation scenario: Changing port behavior BasicDiary addRDV(Rdv) removeRDV(Rdv) getRDVs() isFree(Rdv) printError(Str) johnDiary addRDV(Rdv) removeRDV(Rdv) getRDVs() isFree(Rdv) lizDiary BasicDiary+ Pattern notification(NotifyingDiary a1, NotifiedDiary a2) { a1.addRdv(Rdv r) -> if (a2.isFree(r)) then a1.addRdv(r) // a2.addRdv(r) else a1.addRdv(r); a2.printError(«diary not synchronized») endif } apply NotifyingDiary addRDV(Rdv) NotifiedDiary addRDV(Rdv) isFree(Rdv) printError(Str) apply addRDV(Rdv) removeRDV(Rdv) getRDVs() isFree(Rdv) BasicDiary (NotifiedDiary, printError(Str)) (NotifiedDiary, isFree(RDV)) (NotifiedDiary, addRDV(RDV))

3 FUSE04 - Barcelona Adaptation scenario: Removing a port BasicDiary johnDiary lizDiary addRDV(Rdv) removeRDV(Rdv) getRDVs() isFree(Rdv) addRDV(Rdv) isFree(Rdv) printError(Str)... BasicDiary+ unapply errorManagement (NotifiedDiary, addRDV(Rdv)) (NotifiedDiary, isFree(RDV)) (NotifiedDiary, printError(Str)) addRDV(Rdv) isFree(Rdv) printError(Str)... ! printError is required by johnDiary (NotifiedDiary, addRDV(Rdv)) (NotifiedDiary, isFree(RDV)) (NotifiedDiary, printError(Str))


Download ppt "FUSE04 - Barcelona - 1 - Adaptation scenario: Adding a port BasicDiary addRDV(Rdv) removeRDV(Rdv) getRDVs() isFree(Rdv) lizDiary apply Any addRDV(Rdv)"

Similar presentations


Ads by Google