Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Need your help on a student assignment .
Need your help on a student assignment . [message #1739839] Thu, 04 August 2016 21:55 Go to next message
Guillaume Beaudry is currently offline Guillaume BeaudryFriend
Messages: 1
Registered: August 2016
Junior Member
Need your help with this assignment. My university teacher gave us this practice exam and the answers.

Still i think he made a mistake in the photo i uploaded in the post.
index.php/fa/26694/0/

The exercise was to write an expression that described each graph.

I think he use the "lead to" symbol in a wrong way.

I believe the answer should be:

A[] ( (P and Q) => A<>W ) or (P and Q) --> W

and

E<> (P => A<> Q)

Is he correct or is my own answer ok ?

Thanks
  • Attachment: OCL.png
    (Size: 45.43KB, Downloaded 151 times)
Re: Need your help on a student assignment . [message #1740079 is a reply to message #1739839] Tue, 09 August 2016 05:55 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 6033
Registered: July 2009
Senior Member
Hi

You don't provide the question and so the notation is meaningless and
the answer is very moot.

OCL has no =>, -->, or [] operators, so I suggest that you post your
question on a more appropriate forum.

In OCL, you would at least need a metamodel to express the edge
relationship, or to justify use of oclContainer() to navigate to parent.

An OCL expression for one characteristic might be something like

Q::allInstances()->closure(oclContainer())-exists(oclIsKindOf(P))

Regards

Ed Willink



On 09/08/2016 03:59, Guillaume Beaudry wrote:
> Need your help with this assignment. My university teacher gave us this practice exam and the answers.
>
> Still i think he made a mistake in the photo i uploaded in the post.
>
>
> The exercise was to write an expression that described each graph.
>
> I think he use the "lead to" symbol in a wrong way.
>
> I believe the answer should be:
>
> A[] ( (P and Q) => A<>W ) or (P and Q) --> W
>
> and
>
> E<> (P => A<> Q)
>
> Is he correct or is my own answer ok ?
>
> Thanks
>


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
Previous Topic:Quick fix for OCLinEcore
Next Topic:OCL Evaluation
Goto Forum:
  


Current Time: Wed Sep 19 01:54:09 GMT 2018

Powered by FUDForum. Page generated in 0.01853 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top