Re: ocl conformance test



Date view Thread view Subject view Author view Attachment view

From: Stefan Haustein (haustein@kimo.cs.uni-dortmund.de)
Date: Thu 12 Feb 2004 - 14:04:18 GMT


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...

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?

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

- I had some difficulties figuring out the difference of IntegerLiteralExpCS and 
RealLiteralExpCS in the 2.0 spec.

The tests I have created so far (a very short list, but it's a starting 
point...) are available at:

http://kobjects.org/ocltest/model-independent.xml

Best regards,
Stefan Haustein




> The two standard approaches would be either
 > by accessing some kind of model repository or
> by reading in XMI files.In the latter case the ability to read in XMI 
> files is implicitly given, while in the former case most UML 
> repositories support filling the repository from an XMI file. So, I 
> think its a pretty low barrier already to be able to read in XMI files. 
> As for the second XML file: Its structure is so simple, that it should 
> be possible to write a parser in very little time.
> 
> Regards,
> 
> Steffen Zschaler
> 
> Jrn Guy S schrieb:
> 
>> I agree, but your approach tacitly assumes that tools will be able to 
>> read XMI-Files and (moreover) extract the statements from them. IMO 
>> this is rather the exception than the rule.
>>
>> Regards, JGS
>>
>> -----Original Message-----
>> From:    puml-list-request@cs.york.ac.uk 
>> [mailto:puml-list-request@cs.york.ac.uk] On Behalf Of Stefan Haustein
>> Sent:    Wednesday, February 11, 2004 2:46 PM
>> To:    puml-list@cs.york.ac.uk
>> Subject:    Re: ocl conformance test
>>
>> Jrn Guy S wrote:
>>  
>>
>>> Of course you are right in that a conformance test suite would 
>>> greatly improve quality   
>>
>> > and comparability among parsers/interpreters for OCL. The impediment 
>> here is that currently
>> > no standardized interface to OCL parsers/interpreters is available, 
>> so no automatic compliance
>> > testing can be performed. I have initiated an effort to develop such 
>> interface following UML2003,
>> > but as of now there is almost no progress. IMHO, as long as there is 
>> no such interface,
>> > comparability OCL parsers will not be achievable and thus 
>> implementation of such parsers
>> > remains a scientific niche activity that does not yield reusable 
>> components. If you would like
>> > to invest your time in a standardization effort, the results would 
>> probably make a great difference.
>>
>> Hi Jrn,
>>
>> as a starting point, why have not an XMI file describing a simple 
>> class and object diagram and an XML file with a set of test expressions:
>>
>> <oclTest model="Test.xmi">
>>  <group name="Collection">
>>   <group name="Sets">
>>    <test>
>>     <expression>Set{3,2,2,1}</expression>
>>     <result>Set{1,2,3}</result>
>>    </test>
>>    <test>
>>     <expression>Set{3,2,1}-&gt;select(x|x>1)</expression>
>>     <result>Set{2,3}</result>
>>    </test>
>>   </group>
>>  </group>
>> </ocltest>
>>
>> Support for this kind of tests is probably simple to implement on top 
>> of existing OCL tools. This would allow some shared basic tests 
>> without a standardized interface to the OCL parsers/interpreters,and I 
>> think it would be at least more useful than "nothing"?
>>
>> Best regards,
>> Stefan Haustein
>>
>>
>>
>>
>>
>>
>>
>>
>> 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".
>>
>>  
>>
> 

Date view Thread view Subject view Author view Attachment view