Re: Can OCL assist in describing Design Pattern?



Date view Thread view Subject view Author view

Shunxiang Yang (ysx@process.buaa.edu.cn)
Wed, 3 Jan 2001 01:23:07 +0800


Thank you for your patience and great advice! Thank you! "These OCL constraints are schematic:" By 'schematic', did you mean that the CASE tool can not analyze the constraints user added using OCL in the project, thus users have to maitain the model (or project) according to the OCL descriptions by hand? Or can your tool analyzes the OCL descriptions and can do many auto-maitenance of the model (or project)? How to analyze OCL? "> In our experience, OCL is not ideal, but worked well enough. A major > problem was the somewhat unclear semantics of the reflection mechanisms in > OCL that allow to access UML models. " Can you describe these sentences in detail? For example, how dose OCL work(well enough) in your CASE tool? What does "somewhat unclear semantics of the reflection mechanisms in OCL that allow to access UML models. " mean? " A more abstract description of patterns would > be very welcome." Great! Agree with you! I'm eager for the English version of your 2 papers. And I hope we can discuss this topic in more detail, if you have time. Thanks again! I do appreciate your help! Best regards, yours, Yang Shunxiang ----- Original Message ----- From: Reiner Haehnle <reiner@cs.chalmers.se> To: <puml-list@cs.york.ac.uk> Cc: Thomas Baar <baar@ira.uka.de>; Peter H. Schmitt <pschmitt@ira.uka.de> Sent: Tuesday, January 02, 2001 6:15 PM Subject: Re: Can OCL assist in describing Design Pattern? > On Thu, 28 Dec 2000, Shunxiang Yang wrote: > > : Is there any feasible way to describe Design Pattern both with ease and accuracy? I have an idea, but I do not know whether it's feasible or not. Here it is: > : 1. model the design patterns using UML. > : 2. add necessary description for the constraints in Design Patterns uing OCL or something like this. This is necessary because UML model is far from enough to describe a design pattern. > : 3. record these 2 in a pattern lib. > : 4. user can select a 'pattern' from the pattern lib, and when CASE tool trying to instantiate a design pattern, it refer both to the UML model and the OCL description. > > I am involved in a project where we try to build an integrated tool for OO > development, modeling and verification (The KeY tool, > i12www.ira.uka.de/~key). A central problem is to assist users that have > not necessarily much of a formal background to come up with requirements > expressed in a formal language. One of the ideas we had (and partly > implemented) is based on Patterns and OCL: we attach OCL constraints to > classes and methods in design patterns that express typical requirements > associated with each pattern. These OCL constraints are schematic: when > the user applies (that is, instantiates or modifies) the pattern, he > obtains appropriately modified OCL constraints as well. The paper is here: > http://i12www.ira.uka.de/~key/doc/2000/baarsattlerea00.ps.gz > > @InProceedings{BHSS00, > author = {Thomas Baar and Reiner H\"ahnle and Theo Sattler and > Peter H. Schmitt}, > title = {{E}ntwurfsmustergesteuerte {E}rzeugung von > {OCL}-{C}on\-straints}, > booktitle = {Informatik 2000, 30.\ Jahrestagung der Gesellschaft f\"ur Infomatik}, > editor = {K. Mehlhorn and G. Snelting}, > month = sep, > pages = {389--404}, > publisher = {Springer}, > isbn_issn = "3-540-67880-8", > year = {2000}, > } > > Unfortunately, it is in German, but we are working on a fuller version in > English. > > : But there're some problems: > : 1. Is there any extension of UML that support design pattern description? > : 2. Is OCL ideal for this task? Or just a subset of it is enough? How > : to apply OCL description to the UML model of design pattern? for > : example, how to describe Abstract Factory in GoF pattern book? > > In our experience, OCL is not ideal, but worked well enough. A major > problem was the somewhat unclear semantics of the reflection mechanisms in > OCL that allow to access UML models. In fact, this prompted us to come up > with our own Metamodel of the OCL type system: > http://i12www.ira.uka.de/~key/doc/2000/baarhaehnle00.ps.gz > > @InProceedings{BaarHaehnle00, > author = {Thomas Baar and Reiner H\"{a}hnle}, > title = {An Integrated Metamodel for {OCL} Types}, > editor = {R. France}, > year = {2000}, > booktitle = "OOPSLA 2000 Workshop Refactoring the UML: In Search of > the Core, Minneapolis, Minnesota, USA", > month = oct > } > > : 3. Is there any way to use OCL visually? > : 4. Is there any other way to realize the goal I described above? > : > : I put forward this question in order to get the solution for this > : problem: Currently, the CASE tools supporting design patterns are hard > : to extend. For example, togetherJ is a nice UML tool supporting Design > : pattern. But to add new patterns to the pattern lib, users have to > : program in java. If togetherJ can support the way I described above, it > : will be much more convinient for users to add his/her new patterns to > : the pattern lib, and reuse them later. > > Yes, this would be nice. We implemented some of our constraints in the > Together Pattern Library and it took some programming effort in Java. In > addition, CASE tool vendors often change their APIs (this happened between > Together version 3 and 4). A more abstract description of patterns would > be very welcome. > > Best Wishes > > Reiner > > > -- > ( Reiner H"ahnle Phone: +46-31-772-1061 ) > ) Associate Professor Email: reiner@cs.chalmers.se ( > ( Chalmers University of `Nichts, ) > ) Technology Niemand, ( > ( Department of Computing Science Nirgends, ) > ) 412 96 Gothenburg, Sweden Nie' ( > ( http://www.cs.chalmers.se/~reiner -- Arno Schmidt ) > > > > > > 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