Re: allInstances at pre



Re: allInstances at pre

From: Steffen Zschaler ^lt;sz9@inf.tu-dresden.de>
Date: Thu 12 May 2005 - 09:15:12 BST
Message-ID: <42831090.7050102@inf.tu-dresden.de>
Dear all,

Andreas Awenius wrote:
<snip />

> That leaves the original posters question open:
>
>How can I express, that no instance was destroyed during the execution of an
>operation and only one instance was added?
>  
>
Why would you want to express something like this? In fact, in any 
system that doesn't work strictly sequentially, an assertion like this 
might not even be correct, because users may be deleted by invocations 
of deleteUser executing concurrently. To express that a new user was 
created simply use a reference to the new object (for example using a 
call to User.allInstances()->exists()) and assert that it is oclIsNew().

Just my 2c,

Steffen

-- 
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.steffen-zschaler.de.vu/

--
See the Special Track on Component Models for Dependable Systems at this
year's EUROMICRO conference: http://www.win.tue.nl/~mchaudro/CMDS2005/
Received on Thu May 12 09:15:18 2005