Re: InOut Variables (Operations' Semantics)



Date view Thread view Subject view Author view Attachment view

From: Steffen Zschaler (sz9@inf.tu-dresden.de)
Date: Thu 27 Jan 2005 - 07:16:42 GMT


Dear Percy,

This is rather simple: For inout parameters there are no constraints, 
because they can have a value on entry, but can also be modified by the 
operation. So, there's nothing you could put in the semantics about 
them. The specific modifications that may happen are exactly what you 
would use OCL to describe.

The attributes of a class are not inout variables, because the in/out 
kind only applies to parameters of operations. Attributes are not 
parameters.

Best regards,

Steffen

Percy Pari Salas schrieb:

> Dear all,
>
> I have a doubt about semantics of operations in OCL. In the 
> specification they said the variables of a operation are represented 
> as a set PARAMSop, and  there exist a function  kind : PARAMS -> 
> {in,out,inout,return}. They explain in the semantics that:
> - Input parameters may not be modified,  kind(p) = in implies value(p) 
> = value(p@pre)
> - Output parameters are undefined on entry, ...
> But they do not mention anything about the inout variables ... 
> kind(p)=inout implies ????????
> The question is if there is any default behaviour that must be 
> considered when nothing is explicitly writen in the OCL specification. 
> Anyone knows?
> Also, typically the attributes of a class must be inout variables, I'm 
> right? ...
>
> Very thanks for your help,
>
>
>  Percy Pari Salas
> UNU-IIST Fellow
> Macau SAR - China
>
>
>
>
>
> To remove yourself from this list please mail 
> puml-list-request@cs.york.ac.uk
> with a message containing the word "unsubscribe".


-- 
Dipl.-Inf. Steffen Zschaler
Research Assistant

Technische Universitšt Dresden
Department of Computer Science

Phone +49 351 463 38555
Fax   +49 351 463 38459
Email Steffen.Zschaler@inf.tu-dresden.de
WWW   http://www.inf.tu-dresden.de/~sz9

Date view Thread view Subject view Author view Attachment view