Re: Polymorphic UML sequence diagrams



Re: Polymorphic UML sequence diagrams

From: Andrea Baruzzo <andrea.baruzzo_at_gmail.com>
Date: Wed, 18 Oct 2006 18:09:44 +0200
Message-ID: <5db912070610180909y3add60c9x96dfc2b958b9841e@mail.gmail.com>
Hi Robert,
please to meet you again after MoDELS06! :-)

On 10/18/06, Robert France <france@cs.colostate.edu> wrote:
> Not sure what you mean by a "polymorphic ... scenario". Can you give a
> more descriptive example? Do you want the lifelines to be roles that can
> be played by different instances (not necessarily of the same class)?
>
> Or are you trying to model program-level polymorphic calls?
This one. I try to describe a general scenario in which an indefinite
number of instances of derived classes execute the same method
(without mention explicity all of them in a sequence diagram as single
instances).  Consider the classical example concerning a list of 25
geometrical objects. I want to show a scenario in which, *for each of
them*, I play the method draw().

My hidden goal is to reason about the compliance of a such scenario
with respect to the Liskov substituibility principle, provided the OCL
specifications for the Shape hierarchy classes. (Shape is only an
example). It is possible to reason about this issue even only at
textual level, considering the class diagram for class definitions,
and the OCL specifications as class contracts. But considering that
LSP describes (indirectly) a dynamic scenario, I would expect to see
also some sort of sequence diagrams to describe this situation, so I
am reasoning about the sequence diagram's expressive power.


Andrea

-- 
__________________________________________________________
Dr. Andrea Baruzzo
Laboratorio di Intelligenza Artificiale
Room SSSH, 2nd floor, Stecca Sud
UniversitÓ degli Studi di Udine,
Via delle Scienze 206, 33100 Udine
homepage: www.dimi.uniud.it/~baruzzo
Office: +39 0432 558435
___________________________________________________________
Received on Wed 18 Oct 2006 - 17:09:47 BST