Re: modeling link creation



Date view Thread view Subject view Author view

Mike Brough (m.d.brough@cs.keele.ac.uk)
Fri, 14 Jan 2000 16:17:41 +0000


(This is my first comment to this group, so excuse any ignorance, particularly of previous discussions). My comment relates to the modelling paradigm (model view types etc.) and the possible relevance of an 'action language' for complete enactment of UML models, before implementation. Object sequence diagrams, collaboration diagrams, constraints, ... are all different views of some underlying object model (an 'internal model'). Each shows different features (strictly types of feature, selected by both type and extent) of the underlying model. There are a range of such view types that could be used, to review different types of model/system feature or characteristic. The 'standard' views are the ones that people have found most useful - so (for example), 'class' diagrams are used to review categories and the types of link, specialisation, ... between them. But that is not to say these are the only view types one might construct. We could, for example, use and old-fashioned entity-event table (though maybe we should call it a class/association-event table) with CRUD entries (create, read, update, delete) entries to show the associations that might be created. Many modellers would leave the modelling at that (i.e. only model types and the possible associations that can be set out between types). But your question asked more specifically about when the instances would be created, which class instances they would link (I guess), and when. This can (though I am not an expert) be modelled in OCL (though I guess the post-condition must be 'exists', not creates - I am sure John meant that). But the most obvious way one might consider individual instance creation (of classes or associations) is by a prescriptive action language, as is being currently being developed by some OMG subgroups, such as those at Projtech and Rockwell. Such an action language would (my own interpretation) provide a virtual machine for unambiguous enactment of UML models. This could be used and modelled as imperative (prescriptive) description of what should be done or used to provide richer predicate-type tests in OCL. But we should note that: 1. Not all people want to be able to develop completely enactable models before the delivered software ('ugh' - it may not be software) 2. The choice of virtual machine/model view type (collaboration diagram, sequence diagram, action code, ...) should be separated from a) the virtual machine; (b) the syntax used. 3. Different views (of different types) should filter and translate the same underlying object model. They should provide complementary insights, rather than competing specifications. Mike Brough (Keele) John Daniels wrote: > Gonzalo, > > In the UML notation guide section on Collaboration Diagrams it says: > ----snip---- > A collection of standard constraints may be used to show whether an Object > or a Link is created or destroyed during the execution: > > > As it says, you can annotate a collaboration diagram to show what you > want. Since sequence diagrams are supposed to be semantically equivalent I > guess you can do it with those, too, but I'm not sure how. > > Alternatively (or as well), the creation of a link is something you might > specify in a post-condition of an operation, using OCL. > > --John > > ========================================================================= > John Daniels > Syntropy Limited > > -------- Original Message -------- > > Hello, > > My name is Gonzalo Genova from Carlos III University of Madrid, Spain, and I > have recently registered to pUML list. > > My question may seem very simple, but I have seen it neither clearly > explained nor well resolved in the official UML documentation. It may also > happen that I have not understood some basic principle, and the question > turns to be irrelevant, as someone has already told me. I will try to be > very brief, although if someone is interested, I can delve into the > argument. > > Here comes the question: How do you model the creation of a link between two > object instances? (understanding "link" as "instance of an association", not > as the association itself; once the system is running, the associations do > not change, but the links do, they may appear and disappear). Using the > .... (deleted) > > There may be other conceptual problems concerning the UML metamodel > regarding link creation and destruction, but I leave them for those really > interested. > > Thanks, > Gonzalo > > To remove yourself from this list please mail puml-list-request@cs.york.ac.uk > with a message containing the word "unsubscribe". >


Date view Thread view Subject view Author view