Re: Time in OCL



Re: Time in OCL

From: Steffen Zschaler ^lt;sz9@inf.tu-dresden.de>
Date: Fri 28 Oct 2005 - 16:43:37 BST
Message-ID: <43624729.7000205@inf.tu-dresden.de>
Well, in fact if you do this, you could specify time() by using the same 
trick that Abadi/Lamport applied in

    Martín Abadi and Leslie Lamport. /An old-fashioned recipe for real
    time./ ACM ToPLaS, 16(5):1543-1571, September 1994.

The idea here is that the important thing about time is that a) it never 
runs backward, and b) it eventually grows beyond all bounds. Because 
there is no support for temporal specifications in OCL, the second part 
can probably not be expressed, but Abadi/Lamport also argue that for 
most specifications the first condition is quite sufficient. And that 
one can be expressed using OCL and an additional attribute in Time to 
store the last result delivered by time().

Best wishes,

Steffen

Richard Mitchell wrote:

>Hi Irfan,
>
>You could introduce one or more classes to model the concept of time, just
>as you introduce classes for other concepts in your problem domain.
>
>For example, a class Time might offer a query time(), which models the idea
>of asking the current time. Of course, the query time() won't have an OCL
>specification :-)
>
>Best wishes,
>-- Richard
>
>- - - - - - - - - - - - - - - - - - - - - - - - - - - -
>Richard Mitchell
>
>InferData Ltd
>3D: Domain-Driven Development
>Consulting, Training, Mentoring
>
>richard@inferdata.com
>www.inferdata.com
>
>"By itself, logic says nothing about anything ..."
>
>
>  
>
>>-----Original Message-----
>>From: puml-list-request@cs.york.ac.uk
>>[mailto:puml-list-request@cs.york.ac.uk] On Behalf Of Irfan Hamid
>>Sent: 28 October 2005 13:00
>>To: puml-list@cs.york.ac.uk
>>Subject: Time in OCL
>>
>>Hi,
>>
>>Is there a way to use time expressions in OCL? Like in the
>>postcondition
>>can I use an expression such as
>>
>>time@pre or time( )@pre
>>
>>I need this to be able to express real-time constraints on operations.
>>
>>Regards,
>>Irfan.
>>
>>--
>>Doctoral candidate
>>Department of Computer Science and Networks
>>Ecole Nationale Superieure des Telecommunications
>>46, rue Barrault, Paris 75013
>>Web: http://www.infres.enst.fr/~hamid
>>Phone: +33 (0)1 45 81 75 79
>>
>>
>>
>>
>>
>>To remove yourself from this list please mail
>>puml-list-request@cs.york.ac.uk
>>with a message containing the word "unsubscribe".
>>
>>    
>>
>
>
>
>
>
>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.steffen-zschaler.de.vu/
Received on Fri Oct 28 16:43:47 2005