Download presentation

Presentation is loading. Please wait.

Published byTrinity Davis Modified over 3 years ago

1
FUSE04 - Barcelona - 1 - 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 - 2 - 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 - 3 - 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))

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google