Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350980

Summary: Missing Collection min/max/sum operations
Product: [Modeling] Acceleo Reporter: Ed Willink <ed>
Component: CoreAssignee: Project Inbox <acceleo-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: laurent.goubet, stephane.begaudeau
Version: 3.0.0   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Ed Willink CLA 2011-07-02 01:45:00 EDT
Collection min/max/sum are not documented

Attempting to use min gives

Cannot find operation (min()) for the type (Bag(Integer)) Cannot find operation (min()) for the type (Bag(Integer))
Comment 1 Laurent Goubet CLA 2011-07-18 05:10:41 EDT
IIRC, MDT/OCL does not define min/max for any collection kind. sum should work though (again, if memory serves). Should I raise a bug against MDT/OCL for the implementation of min and max, or will these be added by your work on the pivot?
Comment 2 Ed Willink CLA 2011-07-18 05:28:48 EDT
You're right. Collection max/min are only in the examples.pivot plugins.

You could raise a Bugzilla, since Axel is trying to upgrade the mature code too.
Comment 3 Laurent Goubet CLA 2011-07-18 05:45:06 EDT
Ed,

I'll raise a bug against MDT/OCL once I've taken a look at the OCL specification. IIRC, Collection->min() and Collection->max() only appeared in the latest version, but I can't find these documents for now (I am not even sure that these two operation were parts of my "big" unit test suite for the OCL library when I wrote it).
Comment 4 Ed Willink CLA 2011-07-18 12:54:25 EDT
(In reply to comment #3)
> (I am not even
> sure that these two operation were parts of my "big" unit test suite for the
> OCL library when I wrote it).

It's a long time ago now. Maybe I wrote the Collection:max/min tests for the pivot model.

You may be interested in http://www.linkedin.com/e/ovovn5-gq9gj8yq-6s/vaq/61300541/3007822/45589251/view_disc/ which references a 990 test conformance suite that I would like to elevate for both Eclipse OCL testing and OMG conformance specification.
Comment 5 Ed Willink CLA 2012-05-20 05:09:28 EDT
min/max/sum are in OCL 3.2.0M7
Comment 6 Stephane Begaudeau CLA 2012-05-21 04:27:02 EDT
The Acceleo documentation for Acceleo 3.3 has been updated to reflect this change.
Comment 7 Laurent Goubet CLA 2015-05-27 08:54:34 EDT
Closing resolved bugs