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

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