Re: allInstances at pre

Re: allInstances at pre

From: Steffen Zschaler ^lt;>
Date: Thu 12 May 2005 - 09:15:12 BST
Message-ID: <>
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,


Dipl.-Inf. Steffen Zschaler
Research Assistant

Technische Universitšt Dresden
Department of Computer Science

Phone +49 351 463 38555
Fax   +49 351 463 38459

See the Special Track on Component Models for Dependable Systems at this
year's EUROMICRO conference:
Received on Thu May 12 09:15:18 2005