Consolidated discussion of syntax and semantics for constraints

17 views
Skip to first unread message

Timothy Lethbridge

unread,
Mar 27, 2012, 11:54:51 AM3/27/12
to Umple Development Discussions
Hi,

I have consolidated the recent discussion on constratints into the wiki
page

http://code.google.com/p/umple/wiki/OCLConstraints

Luna should be able to start with the testcases and grammar at least.

- Tim

Timothy C. Lethbridge, PhD, P.Eng., I.S.P., CSDP
Professor of Software Engineering and Computer Science
/ Professeur Titulaire de gᅵnie logiciel et d'informatique
Facultᅵ de genie / Faculty of Engineering
University of Ottawa / Universitᅵ d'Ottawa
Tel: 613-562-5800x6685 Fax: 613-562-5664 Mobile: 613-252-1850
http://www.eecs.uottawa.ca/~tcl

Andrew Forward

unread,
Mar 27, 2012, 12:09:30 PM3/27/12
to umpl...@googlegroups.com

To confirm, the following two constraints are equivalent

[a > 0] [a < 3000]
[a > 0 && a < 3000]
For clarify, I think we should either remote the "minimumAge" attribute, or use it below in age > 10 (and make it age > minimumAge).  Finally, I would make the less than (<) a less or equal (<=) and and the (>) a (>=) to avoid semantic confusion (i.e. the minimum voting age is 18, so the contraint would be [a >=  18]

class Student {
   
Integer age;
    immutable
Integer minimumAge = 16;
    immutable
Integer maximumAge = 120;
   
Integer studyYear;
   
Boolean isMature;
   
[minAge: age > 10]
   
[maxAge: age < maximumAge]
}





On Tue, Mar 27, 2012 at 11:54 AM, Timothy Lethbridge <t...@eecs.uottawa.ca> wrote:
Hi,

I have consolidated the recent discussion on constratints into the wiki page

http://code.google.com/p/umple/wiki/OCLConstraints

Luna should be able to start with the testcases and grammar at least.

- Tim

Timothy C. Lethbridge, PhD, P.Eng., I.S.P., CSDP
Professor of Software Engineering and Computer Science
/ Professeur Titulaire de génie logiciel et d'informatique
Faculté de genie / Faculty of Engineering
University of Ottawa / Université d'Ottawa


--
You received this message because you are subscribed to the Google Groups "Umple-Dev" group.
To post to this group, send an email to umpl...@googlegroups.com.
To unsubscribe from this group, send email to umple-dev+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/umple-dev?hl=en-GB.




--
aforward

Timothy Lethbridge

unread,
Mar 27, 2012, 1:10:10 PM3/27/12
to umpl...@googlegroups.com
Fixed

- Tim

> / Professeur Titulaire de g�nie logiciel et d'informatique
> Facult� de genie / Faculty of Engineering
> University of Ottawa / Universit� d'Ottawa


> Tel: 613-562-5800x6685 � Fax: 613-562-5664 � �Mobile:
> 613-252-1850
> http://www.eecs.uottawa.ca/~tcl
>
> --
> You received this message because you are subscribed to the
> Google Groups "Umple-Dev" group.
> To post to this group, send an email to
> umpl...@googlegroups.com.
> To unsubscribe from this group, send email to

> umple-dev+...@googlegroups.com.


> For more options, visit this group at
> http://groups.google.com/group/umple-dev?hl=en-GB.
>
>
>
>
> --
> aforward
>

> --
> You received this message because you are subscribed to the Google Groups
> "Umple-Dev" group.
> To post to this group, send an email to umpl...@googlegroups.com.
> To unsubscribe from this group, send email to

> umple-dev+...@googlegroups.com.


> For more options, visit this group at
> http://groups.google.com/group/umple-dev?hl=en-GB.
>
>

Timothy C. Lethbridge, PhD, P.Eng., I.S.P., CSDP
Professor of Software Engineering and Computer Science

/ Professeur Titulaire de g�nie logiciel et d'informatique
Facult� de genie / Faculty of Engineering
University of Ottawa / Universit� d'Ottawa

Reply all
Reply to author
Forward
0 new messages