Re: product types in OCL 2.0



Date view Thread view Subject view Author view Attachment view

From: Gerrit Renker (gerrit_renker@yahoo.co.uk)
Date: Mon 24 Feb 2003 - 14:02:46 GMT


Hi Herman,

yes you are right about the brackets -- my fault. Both sections 2.4.7
and 4.3.2 explicitly state that built-in precedences can be changed via
the use of brackets.

But even worse - you have thus proven that there is no possibility to
construct sets of k-tuples for k>2. 

I think no one will question that  a->(prod(b)->prod(c)) is
syntactically incorrect.

Given such restrictions, does it not make much more sense to use a
predicate _x_:Set(Tuple{_,_}) which can be chained without such
complexities, such that 
AxBx....xX is indeed Set(Tuple{a,b,...,x}).

thanks
Gerrit

 --- Herman Balsters wrote: 
> Gerrit,
> 
> I don't think that there is any ambiguity in the definition of 
> 
> a->prod(b)->prod(c)
> 
> The only way that you can read it is
> 
> (a->prod(b))->prod(c)  ( = (AxB)xC )
> 
> because
> 
> a->(prod(b)->prod(c))
> 
> is syntactically not correct. Also, if you wish to represent
> 
> Ax(BxC)  then this can be done by
> 
> a->prod(b->prod(c))
> 
> Do you agree?
> 
> -herman
> 

=====
--
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

Date view Thread view Subject view Author view Attachment view