Re: product types in OCL 2.0



Date view Thread view Subject view Author view Attachment view

From: Jos Warmer (J.Warmer@klasse.nl)
Date: Mon 24 Feb 2003 - 14:24:01 GMT


Gerrit,

that is the correct one.

Jos


At 07:38 AM 2/24/2003 +0000, you wrote:
>Hi,
>Sorry, the introduction of the Cartesian Product operator has escaped
>me, my printed copy is still V1.5. I picked up a copy of the Version
>1.6 OCL 2.0 at
>http://cgi.omg.org/cgi-bin/doc?ad/2003-01-07 (hope that this is the
>current one).
>
>I can see a problem with this construct, it is ambiguous how
>k-fold products for k>2 are defined.
>
>For example
>a->product(b) : Set(Tuple{A,B})
>
>is clear, but what about a->product(b)->product(c) ?
>It might be read (1) as the Cartesian Product of three sets,
>in which case the type might be:
>a->product(b)->product(c) : Set(Tuple{A,B,C})
>
>But the same expression can also be interpreted as (2) the product of a
>binary Cartesian Product (AxB) with a set of class C elements:
>a->product(b)->product(c) : Set( Tuple{Tuple{A,B},C} )
>
>If as an example the 'x' operator from maths is used:
>--the first case can be written  as  A x B x C
>--the second case can be written as (A xB) x C
>which is less ambiguous.
>
>Possibly such preference rules could be incorporated into the
>definition?
>
>With kind regards
>Gerrit
>  --- Jos Warmer <J.Warmer@klasse.nl> wrote: > Hi there,
> >
> > In section 6.5.1, page 6-10, the operation 'product()' is defined on
> > Collection, resulting the carthesian product.
> > You can write:
> >
> >
> > collection->product(otherCollection)
> >
>
>=====
>--
>Gerrit Renker                     Research Assistant
>Constraints Group                 Computing Technologies Centre
>The Robert Gordon University      Aberdeen AB25 1HG
>
>__________________________________________________
>Do You Yahoo!?
>Everything you'll ever need on one web page
>from News and Sport to Email and Music Charts
>http://uk.my.yahoo.com
>
>
>
>To remove yourself from this list please mail puml-list-request@cs.york.ac.uk
>with a message containing the word "unsubscribe".


_____________________________________________________
Klasse Objecten         tel     : +31 (0)35 6037646
Chalonhof 153           fax     : +31 (0)35 6037647
3762 CT Soest           email   : J.Warmer@klasse.nl
The Netherlands         internet: http://www.klasse.nl

Date view Thread view Subject view Author view Attachment view