Re: ocl conformance test



Date view Thread view Subject view Author view Attachment view

From: Steffen Zschaler (sz9@inf.tu-dresden.de)
Date: Thu 12 Feb 2004 - 14:23:45 GMT


Hi,

Stefan Haustein schrieb:

> Steffen Zschaler wrote:
> > This seems to be putting the barrier pretty low. Any OCL tool will need
> > to be able to access UML models in some manner.
>
> Moreover, there are tests that make sense even without a model, and if 
> a tool does not provide support for reading the XMI file, one can 
> still rebuild the model that is required to run the tests manually.... 
> The first tests could be designed to verify that the model is 
> constructed as expected... 

agreed.

>
>
> I tried a few very simple tests that do not require a model and 
> immediately ran into some unexpected problems:
>
> - It seems there is no literal expression "OclUndefined". I am using 
> "Set{true}->any(false)" now to get a "boolean" undefined, but perhaps 
> there is a nicer solution? 

What tool did you try them with? OclUndefined is only defined from OCL 
2.0 onwards, so any tool still supporting only OCL 1.x will not 
understand it. I am not sure that your replacement will indeed evaluate 
to OclUndefined.

>
>
> - Does "OclUndefined = OclUndefined" evaluate to true or to 
> OclUndefined (as in SQL)? 

OclUndefined. To test for undefinedness use X.oclIsUndefined().

Regards,

Steffen Zschaler

-- 
Dipl.-Inf. Steffen Zschaler
Research Assistant

Dresden University of Technology
Department of Computer Science

Phone +49 351 463 38555
Fax   +49 351 463 38459
Email Steffen.Zschaler@inf.tu-dresden.de

Date view Thread view Subject view Author view Attachment view