RE: OCL 2.0 finalizatioon



Date view Thread view Subject view Author view Attachment view

From: Herman Balsters (h.balsters@bdk.rug.nl)
Date: Thu 06 Nov 2003 - 14:41:17 GMT


Dear Jrn, 

In updating objects (and tuples), one is often only interested in the mutation of a small 
subset of the attribute values of the object in question  (the values of the remaining 
attributes stay the same). Such an update could be expressed as a postcondition 
associated to some operation. Without some kind of syntactical facility (e.g. 
allAttributes) such an update is a lengthy (and boring) exercise. I have used 
allAttributes for this purpose, but I can imagine that some other language facility might 
be better (in order to keep clear of the language-metalanguage mess it can create). For 
example, an expression like  self except (a1=e1, a2=e2, , an=en) (which is not 
OCL-syntax) could indicate that an object is updated to  e1, .., en  for that subset of 
attributes {a1, , an} of the whole set of attributes (say, A); the attribute values for  A-
{a1, .., an} then remains the same.

Is there some agreement on the desirability of such a language facility?

Herman Balsters


On 3 Nov 2003 at 19:36, Jrn Guy S wrote:

> Dear Herman,
> 
> As far as I recall that operation was introduced as a "macro-like" definition in the UML 1.x semantic chapter to reduce the clutter in writing WFRs. In UML 1.5 (03-03-01.pdf) you find its definition on p.114 to be:
> 
> [4] The operation allAttributes results in a Set containing all Attributes of the Classifier itself and
> all its inherited Attributes.
> allAttributes : set(Attribute);
> allAttributes = self.allFeatures->select(f | f.oclIsKindOf(Attribute))
> 
> It is also present in the CWM metamodel (p.95) and I assume it will be present in UML 2.0 (somewhere). I suppose you could introduce that operation in any MOF-based Profile, if you need it.
> 
> Is that information helpful? Or do you expect the operation to be available on the M2 level (i.e. model, not metamodel)? If so, I think such a "reflection feature" could be the source of great complexity...
> 
> Regards,
> Jrn Guy S
> 
> Dipl.-Inform. Jrn Guy S            | CIS - Sekr. EN7
> phone / fax : +49(30) 314-23553/21601 | TU Berlin, Fak IV
> phone (secretary) : +49(30) 314-23555 | Einsteinufer 17
> mailto:jgsuess@cs.tu-berlin.de        | D-10587 BERLIN / GERMANY
>  
> 
> -----Original Message-----
> From:	Herman Balsters [mailto:h.balsters@bdk.rug.nl]
> Sent:	Monday, November 03, 2003 4:01 PM
> To:	Jrn Guy S; jgsuess@cs.tu-berlin.de
> Cc:	Puml-List
> Subject:	RE: OCL 2.0 finalizatioon
> 
> Dear Jrn,
> 
> Thank you for your quick reply.
> 
> Let me think about your idea to coordinate (part of) the effort regarding 
> this issue on basic revisions of OCL 2.0 at a later stage next year.  
> Perhaps I might be interested.
> 
> I do have a minor point. In pre-OCL 2.0 versions, there was an 
> operator called  "allAttributes": this operator (to be applied to class 
> objects) returns the set of attributes of that object. (This operator 
> should also be applicable to tuples as well, by the way.) Now the 
> strange thing has happened that this most useful operator has 
> vanished in OCL 2.0  I propose that it be re-introduced.
> 
> That's it.
> 
> Kind regards,
> 
> Herman
> 
> 
> 
> 
> 
> On 3 Nov 2003 at 15:41, Jrn Guy S wrote:
> 
> > Dear Herman,
> > 
> > The task of the current FTF is only to correct minor flaws in the specification as is. Basic revision and changes will be undertaken in a further round expected in the middle of next year. Nobody has yet volunteered to collect items for that stage of revision, but he or she would probably be 
> greatly welcomed. In my opinion this would help to infuse the OMG process with some of the basic research done in this field. I already have issues to this end and will add yours to be handed to however picks up at that point. How do you feel about coordinating this effort?
> > 
> > To keep up: We use the Precise UML Mailing list for discussion, you can see the previous activity at
> > 
> > http://www.cs.york.ac.uk/puml/puml-list-archive/
> >  
> > 
> > Kind regards,
> > 
> > Jrn Guy S
> > 
> > Dipl.-Inform. Jrn Guy S            | CIS - Sekr. EN7
> > phone / fax : +49(30) 314-23553/21601 | TU Berlin, Fak IV
> > phone (secretary) : +49(30) 314-23555 | Einsteinufer 17
> > mailto:jgsuess@cs.tu-berlin.de        | D-10587 BERLIN / GERMANY
> >  
> > 
> > 
> > -----Original Message-----
> > From:	Herman Balsters [mailto:h.balsters@bdk.rug.nl]
> > Sent:	Monday, November 03, 2003 3:18 PM
> > To:	jgsuess@cs.tu-berlin.de
> > Subject:	OCL 2.0 finalizatioon
> > 
> > Dear Jorg,
> > 
> > I heard from Sten Loecher that you are the contact person for 
> > proposals for finalizing OCL 2.0 
> > 
> > I did not attend the OCL workshop, but I did give a presentation at the 
> > UML conference.
> > 
> > I have a proposal for ammending OCL 2.0.
> > 
> > In my paper  "Modeling Database Views with Derived Classes in the 
> > UML/OCL-framework" of this years UML conference (see proc. pp. 
> > 295-309) I investigated the issue of expressibility of OCL 2.0 w.r.t. to 
> > the query langauge SQL.  I have demonstrated in that paper that OCL 
> > 2.0 is not as expressive as SQL (as opposed to common belief), and 
> > that OCL needs an additional "tuplejoin" operator to achieve the 
> > desired result.
> > 
> > To whom do I have to address this issue? If you need more details on 
> > the actual ammendment, I can provide them (they are also in my 
> > paper).
> > 
> > Beste regards,
> > 
> > Herman Balsters
> > 
> > dr. H. Balsters
> > Faculty of Business Science
> > University of Groningen
> > The Netherlands
> > 
> > 
> 
> dr. H. Balsters
> Faculty of Business Science
> University of Groningen
> The Netherlands
> 
> 

dr. H. Balsters
Faculty of Business Science
University of Groningen
The Netherlands

Date view Thread view Subject view Author view Attachment view