Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » [OCLInEcore] Cannot find operation
[OCLInEcore] Cannot find operation [message #794209] Thu, 09 February 2012 02:44 Go to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi,
I have defined a operation with an argument in my ecore file, and when I call that operation in my eol file (to create a Metric rule in the gmfmap) this error occur:

!ENTRY Kaos.diagram 4 0 2012-02-09 02:36:23.408
!MESSAGE Expression problem:Cannot find operation (Test(Integer)) for the type (KAOS)body:self.Test(1)
!STACK 0
org.eclipse.ocl.SemanticException: Cannot find operation (Test(Integer)) for the type (KAOS)
at org.eclipse.ocl.util.OCLUtil.checkForErrors(OCLUtil.java:352)
at org.eclipse.ocl.util.OCLUtil.checkForErrors(OCLUtil.java:322)
at org.eclipse.ocl.internal.helper.HelperUtil.checkForErrors(HelperUtil.java:518)
at org.eclipse.ocl.internal.helper.HelperUtil.parseQuery(HelperUtil.java:165)
at org.eclipse.ocl.internal.helper.OCLHelperImpl.createQuery(OCLHelperImpl.java:176)
at org.eclipse.ocl.ecore.OCLHelperImpl.createQuery(OCLHelperImpl.java:90)
at KAOSStandard.diagram.expressions.KAOSStandardOCLFactory$Expression.<init>(KAOSStandardOCLFactory.java:113)
at KAOSStandard.diagram.expressions.KAOSStandardOCLFactory.getExpression(KAOSStandardOCLFactory.java:73)
at KAOSStandard.diagram.expressions.KAOSStandardOCLFactory.getExpression(KAOSStandardOCLFactory.java:57)
at KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calcNLG(KAOSStandardMetricProvider.java:346)
at KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calculateSemanticElementMetrics(KAOSStandardMetricProvider.java:147)
at KAOSStandard.diagram.providers.KAOSStandardMetricProvider$1.run(KAOSStandardMetricProvider.java:122)
at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
at KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calculateMetrics(KAOSStandardMetricProvider.java:116)
at KAOSStandard.diagram.providers.KAOSStandardMetricProvider$ResultView.setInput(KAOSStandardMetricProvider.java:386)
at KAOSStandard.diagram.providers.KAOSStandardMetricProvider$ResultView.createPartControl(KAOSStandardMetricProvider.java:482)
at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:534)
at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:662)
at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:570)
at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981)
at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2714)
at org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:3023)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:3004)
at org.eclipse.ui.internal.WorkbenchWindow$20.runWithException(WorkbenchWindow.java:2290)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3938)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3615)
at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3938)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3615)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

I've tried removing the argument from the operation and, with no arguments the operation is found. Does anyone know what may cause this problem? Thanks in advance.

Best regards,
Re: [OCLInEcore] Cannot find operation [message #794357 is a reply to message #794209] Thu, 09 February 2012 07:29 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

You are using an interesting mix of technologies and yiour description
does not make it clear quite what is happening.

EOL is an Epsilon file and to the best of my knowledge uses an
independent implementation of an OCL-like language.

OCLinEcore supports editing of embedded OCL within Ecore; the editor
uses the new Pivot model; the subsequent usage may use either
traditional Ecore or Pivot model implementation depending what version
you have installed and/or what delegate execption point mappings you have.

GMF tooling, I think uses QVTo which uses the traditional Ecore OCL
implementation.

org.eclipse.ocl.util.OCLUtil is part of the traditional Ecore OCL
implementation so it would appear to be a straightforward missing
operation detected by the traditional Ecore OCL parser. As indicated by
the message KAOS::Test(Integer) would appear to be missing, and since
removing the argument works it seems KAOS::Test() is present.

It is probably a simple typo in your embedded OCL; In Helios, OCLinEcore
only did syntax checking; In Indigo there is semantic checking; you need
Juno for full validation. But I've outline the possibilities above since
I'm not really sure what your tooling is and where Epsilon fits in.

Regards

Ed Willink




On 09/02/2012 02:44, Patricia Espada wrote:
> Hi,
> I have defined a operation with an argument in my ecore file, and when
> I call that operation in my eol file (to create a Metric rule in the
> gmfmap) this error occur:
>
> !ENTRY Kaos.diagram 4 0 2012-02-09 02:36:23.408
> !MESSAGE Expression problem:Cannot find operation (Test(Integer)) for
> the type (KAOS)body:self.Test(1)
> !STACK 0
> org.eclipse.ocl.SemanticException: Cannot find operation
> (Test(Integer)) for the type (KAOS)
> at org.eclipse.ocl.util.OCLUtil.checkForErrors(OCLUtil.java:352)
> at org.eclipse.ocl.util.OCLUtil.checkForErrors(OCLUtil.java:322)
> at
> org.eclipse.ocl.internal.helper.HelperUtil.checkForErrors(HelperUtil.java:518)
> at
> org.eclipse.ocl.internal.helper.HelperUtil.parseQuery(HelperUtil.java:165)
> at
> org.eclipse.ocl.internal.helper.OCLHelperImpl.createQuery(OCLHelperImpl.java:176)
> at
> org.eclipse.ocl.ecore.OCLHelperImpl.createQuery(OCLHelperImpl.java:90)
> at
> KAOSStandard.diagram.expressions.KAOSStandardOCLFactory$Expression.<init>(KAOSStandardOCLFactory.java:113)
> at
> KAOSStandard.diagram.expressions.KAOSStandardOCLFactory.getExpression(KAOSStandardOCLFactory.java:73)
> at
> KAOSStandard.diagram.expressions.KAOSStandardOCLFactory.getExpression(KAOSStandardOCLFactory.java:57)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calcNLG(KAOSStandardMetricProvider.java:346)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calculateSemanticElementMetrics(KAOSStandardMetricProvider.java:147)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider$1.run(KAOSStandardMetricProvider.java:122)
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calculateMetrics(KAOSStandardMetricProvider.java:116)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider$ResultView.setInput(KAOSStandardMetricProvider.java:386)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider$ResultView.createPartControl(KAOSStandardMetricProvider.java:482)
> at
> org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
> at
> org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
> at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:534)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
> at
> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
> at
> org.eclipse.ui.internal.PartStack.createControl(PartStack.java:662)
> at
> org.eclipse.ui.internal.PartStack.createControl(PartStack.java:570)
> at
> org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
> at
> org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
> at
> org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981)
> at
> org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2714)
> at
> org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:3023)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at
> org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:3004)
> at
> org.eclipse.ui.internal.WorkbenchWindow$20.runWithException(WorkbenchWindow.java:2290)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3938)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3615)
> at
> org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
> at
> org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3938)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3615)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
>
> I've tried removing the argument from the operation and, with no
> arguments the operation is found. Does anyone know what may cause this
> problem? Thanks in advance.
>
> Best regards,
Re: [OCLInEcore] Cannot find operation [message #794643 is a reply to message #794357] Thu, 09 February 2012 14:33 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi,
I use the eol file to automatic create Metric Rules in the gmfmap. Actually to this problem I think the use of the eol file is not important, if instead of declaring the Metric Rule in the eol file I manually create it in the gmfmap the same error occur.
The operations in my emf file are stated like this (it's from the emf file that i generate the gmf editor)

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="i + 1")
  !ordered op Integer Test(!ordered Integer[1] i);

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="1")
  !ordered op Integer Test1();


If the problem is the incompatibility between the OCL used by the GMF Tooling and the OCLInEcore maybe by changing from the Pivot to the Traditional OCL could resolve this.

Edward Willink wrote on Thu, 09 February 2012 02:29

OCLinEcore supports editing of embedded OCL within Ecore; the editor
uses the new Pivot model; the subsequent usage may use either
traditional Ecore or Pivot model implementation depending what version
you have installed and/or what delegate execption point mappings you have.

So is it possible to change from Pivot to traditional OCL? If so, do you know how to do that?

Meanwhile I have installed the Juno eclipse but the same error happen. I'm using Eclipse Version: Indigo Service Release 1 Build id: 20110916-0149, GMF Tooling 2.4.1.201111211005, Epsilon 0.9.1.201110062346, Emfatic 0.3.0.200810132307.

Best regards,

[Updated on: Thu, 09 February 2012 14:45]

Report message to a moderator

Re: [OCLInEcore] Cannot find operation [message #794765 is a reply to message #794643] Thu, 09 February 2012 17:18 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Patricia

Thanks. I thought you'd given me enough details to understand what seems
wrong, but actually I'm confused.

@"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="i + 1")
!ordered op void Test(!ordered EBigInteger[1] i);

is not in a language that I recognise. Is it Emfatic?

It would appear that there is doubt as to whether "1" is an EBigInteger.
I would expect the Pivot to be better here since it is fully polymorphic
between Integer/Long/BigInteger, whereas the Ecore support for
BigInteger is a bit selective.

You can easily change Pivot to non-Pivot by changing
http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot
to
http://www.eclipse.org/emf/2002/Ecore/OCL.

If you have the SDK loaded you could instead modify the delegate
registration extension points and so avoid editing files.

Regards

Ed Willink

On 09/02/2012 14:33, Patricia Espada wrote:
> Hi,
> I use the eol file to automatic create Metric Rules in the gmfmap.
> Actually to this problem I think the use of the eol file is not
> important, if instead of declaring the Metric Rule in the eol file I
> manually create it in the gmfmap the same error occur.
> The operations in my emf file are stated like this (it's from the emf
> file that i generate the gmf editor)
>
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="i + 1")
> !ordered op void Test(!ordered EBigInteger[1] i);
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="1")
> !ordered op void Test();
>
>
> If the problem is the incompatibility between the OCL used by the GMF
> Tooling and the OCLInEcore maybe by changing from the Pivot to the
> Traditional OCL could resolve this.
>
> Edward Willink wrote on Thu, 09 February 2012 02:29
>> OCLinEcore supports editing of embedded OCL within Ecore; the editor
>> uses the new Pivot model; the subsequent usage may use either
>> traditional Ecore or Pivot model implementation depending what
>> version you have installed and/or what delegate execption point
>> mappings you have.
>
> So is it possible to change from Pivot to traditional OCL? If so, do
> you know how to do that?
>
> Meanwhile I have installed the Juno eclipse but the same error happen.
> I'm using Eclipse Version: Indigo Service Release 1 Build id:
> 20110916-0149, GMF Tooling 2.4.1.201111211005, Epsilon
> 0.9.1.201110062346, Emfatic 0.3.0.200810132307.
>
> Best regards,
Re: [OCLInEcore] Cannot find operation [message #794823 is a reply to message #794765] Thu, 09 February 2012 18:39 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I've endeavoured to check this and it works fine with the pivot model.
Your error is actually coming from a non-pivot parse. Have you tried
EInt or EInteger rather than EBigInteger?

Please post your EMF file.

Regards

Ed Willink


On 09/02/2012 17:18, Ed Willink wrote:
> Hi Patricia
>
> Thanks. I thought you'd given me enough details to understand what
> seems wrong, but actually I'm confused.
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="i + 1")
> !ordered op void Test(!ordered EBigInteger[1] i);
>
> is not in a language that I recognise. Is it Emfatic?
>
> It would appear that there is doubt as to whether "1" is an
> EBigInteger. I would expect the Pivot to be better here since it is
> fully polymorphic between Integer/Long/BigInteger, whereas the Ecore
> support for BigInteger is a bit selective.
>
> You can easily change Pivot to non-Pivot by changing
> http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot
> to
> http://www.eclipse.org/emf/2002/Ecore/OCL.
>
> If you have the SDK loaded you could instead modify the delegate
> registration extension points and so avoid editing files.
>
> Regards
>
> Ed Willink
>
> On 09/02/2012 14:33, Patricia Espada wrote:
>> Hi,
>> I use the eol file to automatic create Metric Rules in the gmfmap.
>> Actually to this problem I think the use of the eol file is not
>> important, if instead of declaring the Metric Rule in the eol file I
>> manually create it in the gmfmap the same error occur.
>> The operations in my emf file are stated like this (it's from the emf
>> file that i generate the gmf editor)
>>
>>
>> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="i + 1")
>> !ordered op void Test(!ordered EBigInteger[1] i);
>>
>> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="1")
>> !ordered op void Test();
>>
>>
>> If the problem is the incompatibility between the OCL used by the GMF
>> Tooling and the OCLInEcore maybe by changing from the Pivot to the
>> Traditional OCL could resolve this.
>>
>> Edward Willink wrote on Thu, 09 February 2012 02:29
>>> OCLinEcore supports editing of embedded OCL within Ecore; the editor
>>> uses the new Pivot model; the subsequent usage may use either
>>> traditional Ecore or Pivot model implementation depending what
>>> version you have installed and/or what delegate execption point
>>> mappings you have.
>>
>> So is it possible to change from Pivot to traditional OCL? If so, do
>> you know how to do that?
>>
>> Meanwhile I have installed the Juno eclipse but the same error
>> happen. I'm using Eclipse Version: Indigo Service Release 1 Build id:
>> 20110916-0149, GMF Tooling 2.4.1.201111211005, Epsilon
>> 0.9.1.201110062346, Emfatic 0.3.0.200810132307.
>>
>> Best regards,
>
Re: [OCLInEcore] Cannot find operation [message #794869 is a reply to message #794823] Thu, 09 February 2012 20:13 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi,

I've tried changing from Pivot to the Tradition OCL and nothing changed, as the same for using EInt or Integer (it seems the emfatic doesn't recognize EInteger) instead of EBigInteger. Here is my EMF file:

@gmf(foo="bar")
@Ecore(invocationDelegates="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", settingDelegates="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot", validationDelegates="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot")
@namespace(uri="kaos", prefix="kaos")
package KAOSStandard;

@gmf.diagram(foo="bar")
class KAOS {

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="i + 1")
  !ordered op Integer Test(!ordered Integer[1] i);

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="1")
  !ordered op Integer Test1();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG())->size()")
  !ordered op Integer NLG();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG() and n.oclAsType(Goal).GNA() > 0)->size()")
  !ordered op Integer NLGWA();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLGWA() / self.NLG()", pre_nlgGZ="self.NLG() > 0")
  !ordered op Double PLGWA();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG() and n.oclAsType(Goal).GNO() > 0)->size()")
  !ordered op Integer NLGWO();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLGWO() / self.NLG()", pre_nlgGZ="self.NLG() > 0")
  !ordered op Double PLGWO();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Obstacle) and n.oclAsType(Obstacle).ILO())->size()")
  !ordered op Integer NLO();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Obstacle) and n.oclAsType(Obstacle).ILO() and n.oclAsType(Obstacle).OS()->size() > 0)->size()")
  !ordered op Integer NLOWS();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLOWS() / self.NLO()", pre_nloGZ="self.NLO() > 0")
  !ordered op Double PLOWS();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG() and n.oclAsType(Goal).GNOp() > 0)->size()")
  !ordered op Integer NLGWOp();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLGWOp() / self.NLG()", pre_nlgGZ="self.NLG() > 0")
  !ordered op Double PLGWOp();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(OperationNode))->size()")
  !ordered op Integer NOp();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(OperationNode) and n.oclAsType(OperationNode).OpNA() > 0)->size()")
  !ordered op Integer NOpWA();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NOpWA() / self.NOp()", pre_nopGZ="self.NLG() > 0")
  !ordered op Double POpWA();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Agent))->iterate(n : Nodes ; min : Integer = - 1 | let aux : Integer = n.oclAsType(Agent).ANLG() in if min = - 1 then aux else min.min(aux) endif)")
  !ordered op Integer MinNLGWA();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Agent))->iterate(n : Nodes ; max : Integer = - 1 | let aux : Integer = n.oclAsType(Agent).ANLG() in if max = - 1 then aux else max.max(aux) endif)")
  !ordered op Integer MaxNLGWA();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Agent))->size()")
  !ordered op Integer NA();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLGWA() / self.NA()", pre_naGZ="self.NA() > 0")
  !ordered op Double AveNLGWA();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG())->iterate(n : Nodes ; min : Integer = - 1 | let aux : Integer = n.oclAsType(Goal).GNO() in if min = - 1 then aux else min.min(aux) endif)")
  !ordered op Integer MinNOWLG();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG())->iterate(n : Nodes ; max : Integer = - 1 | let aux : Integer = n.oclAsType(Goal).GNO() in if max = - 1 then aux else max.max(aux) endif)")
  !ordered op Integer MaxNOWLG();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasLinks->select(l : Links | l.oclIsKindOf(ConcernsLink))->collect(oclAsType(ConcernsLink).concernedByGoal)->select(g : Goal | g.ILG())->size()")
  !ordered op Integer NLGC();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLGC() / self.NLG()", pre_nlgGZ="self.NLG() > 0")
  !ordered op Double AveNOWLG();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let s : Set(Nodes) = Set{} in s->union(s1)->union(s2)")
  !ordered op Nodes[*] union(!ordered Goal[*] s1, !ordered Nodes[*] s2);

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let visit : Set(Nodes) = visited->including(g.oclAsType(Nodes)) in if g.ILG() then let obsts : Set(Obstacle) = g.goalHasObstacle->collect(obstacle)->asSet() in if obsts->notEmpty() then obsts->collect(o : Obstacle | NDR(o.oclAsType(Nodes), visit, dist->including(last + 1), last + 1))->asSet() else dist endif else union(g.goalIsAndRef->collect(andRefToOtherGoal)->union(g.goalIsOrRef->collect(orRefToOtherGoal))->asSet(), g.goalHasObstacle->collect(obstacle)->asSet())->collect(n : Nodes | NDR(n, visit, dist->including(last + 1), last + 1))->asSet() endif")
  !ordered op Integer[*] GDR(!ordered Goal[1] g, !ordered Nodes[*] visited, !ordered Integer[*] dist, !ordered Integer[1] last);

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let visit : Set(Nodes) = visited->including(o.oclAsType(Nodes)) in if o.ILO() then let goals : Set(Goal) = o.OS() in if goals->notEmpty() then goals->collect(g : Goal | NDR(g.oclAsType(Nodes), visit, dist->including(last + 1), last + 1))->asSet() else dist endif else o.OR()->collect(o : Obstacle | NDR(o.oclAsType(Nodes), visit, dist->including(last + 1), last + 1))->asSet() endif")
  !ordered op Integer[*] ODR(!ordered Obstacle[1] o, !ordered Nodes[*] visited, !ordered Integer[*] dist, !ordered Integer[1] last);

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="if visited->one(aux : Nodes | aux = n) then dist else if n.oclIsKindOf(Goal) then self.GDR(n.oclAsType(Goal), visited, dist, last) else if n.oclIsKindOf(Obstacle) then self.ODR(n.oclAsType(Obstacle), visited, dist, last) else dist endif endif endif")
  !ordered op Integer[*] NDR(!ordered Nodes[1] n, !ordered Nodes[*] visited, !ordered Integer[*] dist, !ordered Integer[1] last);

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NDR(self.root.oclAsType(Nodes), Set{}, Set{0}, 0)->iterate(i : Integer ; maxD : Integer = - 1 | if maxD = - 1 then i else maxD.max(i) endif)")
  !ordered op Integer MD();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.root.GSG()->size()")
  !ordered op Integer RNSG();
  val CompartmentNode[*] hasCompartmentNode;
  val Nodes[*] hasNodes;
  val Links[*] hasLinks;
  ref Goal[1] root;
}

abstract class CompartmentNode {
  attr String name;
}

@gmf.node(label="name", border.color="0,0,255", size="200,100", border.width="2", tool.description="Create new GoalCompartmentNode for inserting Goals, Requirements and Expectations in the diagram")
class GoalCompartmentNode extends CompartmentNode {

  @gmf.compartment(layout="free")
  val Goal[*] compHasGoals;
}

@gmf.node(label="name", border.color="0,100,0", size="200,100", border.width="2", tool.description="Create new SoftgoalCompartmentNode for inserting Softgoals in the diagram")
class SoftgoalCompartmentNode extends CompartmentNode {

  @gmf.compartment(layout="free")
  val Softgoal[*] softgoalCompHasSoftgoals;
}

@gmf.node(label="name", border.color="255,165,0", size="200,100", border.width="2", tool.description="Create new ObstacleCompartmentNode for inserting Obstacles in the diagram")
class ObstacleCompartmentNode extends CompartmentNode {

  @gmf.compartment(layout="free")
  val Obstacle[*] obstCompNodeHasObstacle;
}

@gmf.node(label="name", border.color="148,0,211", size="200,100", border.width="2", tool.description="Create new DomainPropertiesCompartmentNode for inserting Domain Invariants and Domain Hipothesis in the diagram")
class DomainPropertiesCompartmentNode extends CompartmentNode {

  @gmf.compartment(layout="free")
  val DomainProperties[*] domProCompNodeHasDomProp;
}

@gmf.node(label="name", border.color="255,105,180", size="200,100", border.width="2", tool.description="Create new AgentCompartmentNode for inserting System Agents and Environment Agents in the diagram")
class AgentCompartmentNode extends CompartmentNode {

  @gmf.compartment(layout="free")
  val Agent[*] agentCompHasAgent;
}

@gmf.node(label="name", border.color="165,42,42", size="200,100", border.width="2", tool.description="Create new ObjectCompartmentNode for creating Entities and Events in the diagram")
class ObjectCompartmentNode extends CompartmentNode {

  @gmf.compartment(layout="free")
  ref Object[*] objCompHasObjects;
}

@gmf.node(label="name", size="200,100", border.width="2", tool.description="Create new OperationCompartmentNode for inserting Operations in the diagram")
class OperationCompartmentNode extends CompartmentNode {

  @gmf.compartment(layout="free")
  ref OperationNode[*] hasOperationNodes;
}

@gmf.node(label="name", label.placement="external")
abstract class Nodes {
  attr String name;
  attr String TransformationSource;
  attr String IstarActorContainer;
}

@gmf.node(color="0,191,255", border.color="0,191,255", size="80,50", figure="polygon", polygon.x="30 70 50 10", polygon.y="10 10 40 40", tool.description="Create new Goal")
class Goal extends Nodes {

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.goalIsAndRef->isEmpty() and self.goalIsOrRef->isEmpty()")
  !ordered op boolean[1] ILG();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let agents : Set(Agent) = self.GA() in if bool then agents else agents->union(self.otherGoalIsOrRef->collect(orRefToGoal)->union(self.otherGoalIsAndRef->collect(andRefToGoal))->collect(g : Goal | g.GIA(false))->asSet()) endif")
  !ordered op Agent[*] GIA(!ordered Boolean[1] bool);

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="if self.oclIsKindOf(Expectation) then self.oclAsType(Expectation).EA() else if self.oclIsKindOf(Requirement) then self.oclAsType(Requirement).RA() else Set{} endif endif")
  !ordered op Agent[*] GA();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.GA()->union(self.GIA(true))->size()")
  !ordered op Integer GNA();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.goalConcerns->collect(concernsObject)->size()")
  !ordered op Integer GNO();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.goalToOperatLink->collect(operatLinkToOperationNode)->size()")
  !ordered op Integer GNOp();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let goals : Set(Goal) = self.goalIsOrRef->collect(orRefToOtherGoal)->union(self.goalIsAndRef->collect(andRefToOtherGoal))->asSet() in goals->select(g : Goal | g.ILG())->union(goals->select(g : Goal | not g.ILG())->collect(g : Goal | g.GLG()))->asSet()")
  !ordered op Goal[*] GLG();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let goals : Set(Goal) = self.goalIsOrRef->collect(orRefToOtherGoal)->union(self.goalIsAndRef->collect(andRefToOtherGoal))->asSet()->union(self.goalHasObstacle->collect(obstacle)->iterate(o : Obstacle ; aux : Set(Goal) = Set{} | aux->union(o.OS()))) in if goals->isEmpty() then Set{} else goals->collect(g : Goal | goals->union(g.GSG()))->asSet() endif")
  !ordered op Goal[*] GSG();
  attr String formalDef;
  attr String informalDef;
  ref OrRefinement[*]#orRefToGoal goalIsOrRef;
  ref OrRefinement[*]#orRefToOtherGoal otherGoalIsOrRef;
  ref AndRefinement[*]#andRefToGoal goalIsAndRef;
  ref AndRefinement[*]#andRefToOtherGoal otherGoalIsAndRef;
  ref ObstructionLink[*]#obstacleToGoal goalHasObstacle;
  ref SolutionLink[*]#obstacleHasSolution solutionIsGoal;
  ref OperationalizationLink[*]#operatLinkToGoal goalToOperatLink;
  ref ConcernsLink[*]#concernedByGoal goalConcerns;
  ref DomainPropLink[*]#DomPropLinkToGoal goalHasDomProp;
}

@gmf.node(color="0,191,255", border.color="0,0,0", border.width="2", size="80,50", figure="polygon", polygon.x="30 70 50 10", polygon.y="10 10 40 40", tool.description="Create new Requirement")
class Requirement extends Goal {

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.ReqToAgentReqLink->collect(ReqToAgentLink)->asSet()")
  !ordered op Agent[*] RA();
  ref AgentReqLink[+]#agentReqLinkToReq ReqToAgentReqLink;
}

@gmf.node(color="255,215,0", border.color="255,215,0", size="80,50", figure="polygon", polygon.x="30 70 50 10", polygon.y="10 10 40 40", tool.description="Create new Expectation")
class Expectation extends Goal {

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.expToAgentExpLink->collect(expLinkToAgent)->asSet()")
  !ordered op Agent[*] EA();
  ref AgentExpLink[+]#agentExpLinkToExp expToAgentExpLink;
}

@gmf.node(color="50,205,50", border.color="50,205,50", size="40,40", figure="ellipse", tool.description="Create new Softgoal")
class Softgoal extends Goal {
}

@gmf.node(color="255,140,0", border.color="255,140,0", size="80,50", figure="polygon", polygon.x="10 50 70 30", polygon.y="10 10 40 40", tool.description="Create new Obstacle")
class Obstacle extends Nodes {

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.obstIsParent->isEmpty()")
  !ordered op boolean[1] ILO();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.obstIsRefinement->collect(obstToObstRef)->asSet()")
  !ordered op Obstacle[*] OP();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.obstIsParent->collect(obstRefToObst)->asSet()")
  !ordered op Obstacle[*] OR();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let s : Set(Goal) = self.solution->collect(obstacleHasSolution)->asSet() in if visited->one(o : Obstacle | o = self) then s else self.OR()->iterate(o : Obstacle ; aux : Set(Goal) = s | aux->union(OBS(visited->including(self)))) endif")
  !ordered op Goal[*] OBS(!ordered Obstacle[*] visited);

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let s : Set(Goal) = self.solution->collect(obstacleHasSolution)->asSet() in if visited->one(o : Obstacle | o = self) then s else self.OP()->iterate(o : Obstacle ; aux : Set(Goal) = s | aux->union(OAS(visited->including(self)))) endif")
  !ordered op Goal[*] OAS(!ordered Obstacle[*] visited);

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.OBS(Set{})->union(self.OAS(Set{}))")
  !ordered op Goal[*] OS();
  ref ObstructionLink[*]#obstacle obstacleObstruction;
  ref SolutionLink[*]#obstacleSolution solution;
  ref ObstacleRefinement[*]#obstRefToObst obstIsRefinement;
  ref ObstacleRefinement[*]#obstToObstRef obstIsParent;
}

abstract class DomainProperties extends Nodes {
  attr String formalDef;
  attr String informalDef;
  ref DomainPropLink[+]#goalToDomProp domPropToGoal;
}

@gmf.node(color="221,160,221", border.color="221,160,221", size="80,50", figure="polygon", polygon.x="10 40 70 70 10", polygon.y="20 10 20 40 40", tool.description="Create new DomainInvariant")
class DomainInvariant extends DomainProperties {
}

@gmf.node(color="147,112,219", border.color="147,112,219", size="80,50", figure="polygon", polygon.x="10 40 70 70 10", polygon.y="20 10 20 40 40", tool.description="Create new DomainHyphothesis")
class DomainHyphothesis extends DomainProperties {
}

abstract class Object extends Nodes {
  attr String informalDef;
  ref InheritanceLink[*]#inhLinkToObject objToInhLink;
  ref InheritanceLink[*]#inhLinkToOtherObj otherObjToInhLink;
  ref AggregationLink[*]#aggLinkToObject objToAggLink;
  ref AggregationLink[*]#aggLinkToOtherObject otherObjToAggLink;
  ref CardinalityLink[*]#cardLinkToObject objToCardLink;
  ref CardinalityLink[*]#cardLinkToOtherObject otherObjToCardLink;
  ref MonitorsLink[*]#monLinkToObject objIsMonitored;
  ref ControlsLink[*]#contLinkToObject objIsControlled;
  ref ConcernsLink[*]#concernsObject objectIsConcerned;
}

abstract class Agent extends Object {

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="if self.oclIsKindOf(EnvironmentAgent) then self.oclAsType(EnvironmentAgent).EAG() else if self.oclIsKindOf(SystemAgent) then self.oclAsType(SystemAgent).SAG() else Set{} endif endif")
  !ordered op Goal[*] AG();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.AG()->select(g : Goal | not g.ILG())->collect(g : Goal | g.GLG())->asSet()")
  !ordered op Goal[*] AIG();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.AG()->union(self.AIG())->select(g : Goal | g.ILG())")
  !ordered op Goal[*] ALG();

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.ALG()->size()")
  !ordered op Integer ANLG();
  ref MonitorsLink[*]#monLinkToAgent agentMonitors;
  ref ControlsLink[*]#contLinkToAgent agentControls;
  ref PerformsLink[*]#perLinkToAgent agentPerforms;
}

@gmf.node(color="255,160,122", border.color="255,160,122", size="80,50", figure="polygon", polygon.x="10 20 60 70 60 20", polygon.y="25 40 40 25 10 10", tool.description="Create new SystemAgent")
class SystemAgent extends Agent {

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.agentToReqLink->collect(agentReqLinkToReq)->asSet()")
  !ordered op Goal[*] SAG();
  ref AgentReqLink[+]#ReqToAgentLink agentToReqLink;
}

@gmf.node(color="255,182,193", border.color="255,182,193", size="80,50", figure="polygon", polygon.x="10 20 60 70 60 20", polygon.y="25 40 40 25 10 10", tool.description="Create new EnvironmentAgent")
class EnvironmentAgent extends Agent {

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.agentToExpLink->collect(agentExpLinkToExp)->asSet()")
  !ordered op Goal[*] EAG();
  ref AgentExpLink[+]#expLinkToAgent agentToExpLink;
}

@gmf.node(color="189,183,107", border.color="189,183,107", size="80,50", figure="polygon", polygon.x="10 10 60 70 60", polygon.y="10 40 40 25 10", tool.description="Create new Event")
class Event extends Object {
  attr int frequency;
}

@gmf.node(color="143,188,143", border.color="143,188,143", size="60,30", figure="rectangle", tool.description="Create new Entity")
class Entity extends Object {
}

@gmf.link(label="name", source="relationConnObject", target="objectIsConnByRelation", color="255,127,80", target.decoration="arrow", width="2", tool.description="Create new Relationship between two Objects")
class Relationship extends Object {
  ref Object[1] relationConnObject;
  ref Object[1] objectIsConnByRelation;
}

@gmf.node(color="211,211,211", border.color="211,211,211", size="60,30", figure="ellipse", tool.description="Create new OperationNode")
class OperationNode extends Nodes {

  @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.operationIsPerformed->collect(perLinkToAgent)->size()")
  !ordered op Integer OpNA();
  ref OperationalizationLink[*]#operatLinkToOperationNode operationNodeToOperatLink;
  ref PerformsLink[*]#perLinkToOperationNode operationIsPerformed;
}

abstract class Links {
  attr String TransformationSource;
  attr String name;
  attr String Source;
  attr String Target;
}

@Ecore(constraints="linkToHimself")
@gmf.link(source="orRefToGoal", target="orRefToOtherGoal", color="0,0,255", target.decoration="arrow", width="2", style="dash", tool.description="Create new OrRefinement between Goal, Requirement or Expectation")
@"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="orRefToGoal <> orRefToOtherGoal", linkToHimself$message="'Goal ' + orRefToGoal.name + ' can not be a refinement of himself.'")
class OrRefinement extends Links {
  ref Goal[1]#goalIsOrRef orRefToGoal;
  ref Goal[1]#otherGoalIsOrRef orRefToOtherGoal;
}

@Ecore(constraints="linkToHimself")
@gmf.link(source="andRefToGoal", target="andRefToOtherGoal", color="0,0,255", target.decoration="arrow", width="2", tool.description="Create new AndRefinement between Goal, Requirement or Expectation")
@"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="andRefToGoal <> andRefToOtherGoal", linkToHimself$message="'Goal ' + andRefToGoal.name + ' can not be a refinement of himself.'")
class AndRefinement extends Links {
  ref Goal[1]#goalIsAndRef andRefToGoal;
  ref Goal[1]#otherGoalIsAndRef andRefToOtherGoal;
}

@Ecore(constraints="linkToHimself")
@gmf.link(source="obstRefToObst", target="obstToObstRef", color="255,140,0", target.decoration="arrow", width="2", tool.description="Create new ObstacleRefinement between Obstacles")
@"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="obstRefToObst <> obstToObstRef", linkToHimself$message="'Obstacle ' + obstRefToObst.name + ' can not be a refinement of himself.'")
class ObstacleRefinement extends Links {
  ref Obstacle[1]#obstIsRefinement obstRefToObst;
  ref Obstacle[1]#obstIsParent obstToObstRef;
}

@gmf.link(source="obstacle", target="obstacleToGoal", color="255,165,0", target.decoration="arrow", width="2", tool.description="Create new ObstructionLink between an Obstacle and a Goal, Requirement or Expectation")
class ObstructionLink extends Links {
  ref Obstacle[1]#obstacleObstruction obstacle;
  ref Goal[1]#goalHasObstacle obstacleToGoal;
}

@gmf.link(source="obstacleHasSolution", target="obstacleSolution", color="0,139,0", target.decoration="arrow", width="2", tool.description="Create new SolutionLink between an Obstacle and a Goal, Requirement or Expectation")
class SolutionLink extends Links {
  ref Goal[1]#solutionIsGoal obstacleHasSolution;
  ref Obstacle[1]#solution obstacleSolution;
}

@gmf.link(label="label", source="operatLinkToGoal", target="operatLinkToOperationNode", color="105,105,105", target.decoration="arrow", width="2", tool.description="Create new OperationalizationLink between an Operation and a Goal")
class OperationalizationLink extends Links {
  readonly attr String[1] label = "Operationalization";
  ref Goal[1]#goalToOperatLink operatLinkToGoal;
  ref OperationNode[1]#operationNodeToOperatLink operatLinkToOperationNode;
}

@gmf.link(label="label", source="concernedByGoal", target="concernsObject", color="205,133,63", target.decoration="arrow", width="2", tool.description="Create new ConcernsLink between a Goal, Requirement or Expectation and an Object")
class ConcernsLink extends Links {
  readonly attr String[1] label = "Concerns";
  ref Goal[1]#goalConcerns concernedByGoal;
  ref Object[1]#objectIsConcerned concernsObject;
}

@gmf.link(source="DomPropLinkToGoal", target="goalToDomProp", color="148,0,211", target.decoration="arrow", width="2", tool.description="Create new DomainPropLink between Goal, Requirement or Expectation and Domain Invariant or Domain Hipothesis")
class DomainPropLink extends Links {
  ref Goal[1]#goalHasDomProp DomPropLinkToGoal;
  ref DomainProperties[1]#domPropToGoal goalToDomProp;
}

@gmf.link(source="ReqToAgentLink", target="agentReqLinkToReq", color="233,150,122", target.decoration="arrow", width="2", tool.description="Create new AgentReqLink for connecting a System Agent to a Requirement")
class AgentReqLink extends Links {
  ref SystemAgent[1]#agentToReqLink ReqToAgentLink;
  ref Requirement[1]#ReqToAgentReqLink agentReqLinkToReq;
}

@gmf.link(source="expLinkToAgent", target="agentExpLinkToExp", color="176,48,96", target.decoration="arrow", width="2", tool.description="Create new AgentExpLink for connecting an Environment Agent to an Expectation")
class AgentExpLink extends Links {
  ref EnvironmentAgent[1]#agentToExpLink expLinkToAgent;
  ref Expectation[1]#expToAgentExpLink agentExpLinkToExp;
}

@Ecore(constraints="linkToHimself")
@gmf.link(source="inhLinkToObject", target="inhLinkToOtherObj", target.decoration="closedarrow", width="2", tool.description="Create new InheritanceLink between Entities")
@"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="inhLinkToObject <> inhLinkToOtherObj", linkToHimself$message="'Object ' + inhLinkToObject.name + ' can not be a refinement of himself.'")
class InheritanceLink extends Links {
  ref Object[1]#objToInhLink inhLinkToObject;
  ref Object[1]#otherObjToInhLink inhLinkToOtherObj;
}

@Ecore(constraints="linkToHimself")
@gmf.link(source="aggLinkToObject", target="aggLinkToOtherObject", target.decoration="filledrhomb", width="2", tool.description="Create new AggregationLink between Entities")
@"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="aggLinkToObject <> aggLinkToOtherObject", linkToHimself$message="'Object ' + aggLinkToObject.name + ' can not be a refinement of himself.'")
class AggregationLink extends Links {
  ref Object[1]#objToAggLink aggLinkToObject;
  ref Object[1]#otherObjToAggLink aggLinkToOtherObject;
}

@gmf.link(source="cardLinkToObject", target="cardLinkToOtherObject", width="2", tool.description="Create new CardinalityLink between Entities")
class CardinalityLink extends Links {
  attr String[1] firstEnd;
  attr String[1] secondEnd;
  ref Object[1]#objToCardLink cardLinkToObject;
  ref Object[1]#otherObjToCardLink cardLinkToOtherObject;
}

@gmf.link(label="label", source="monLinkToAgent", target="monLinkToObject", color="102,205,170", target.decoration="arrow", width="2", tool.description="Create new MonitorsLink between an Object and an Agent")
class MonitorsLink extends Links {
  readonly attr String[1] label = "Monitors";
  ref Agent[1]#agentMonitors monLinkToAgent;
  ref Object[1]#objIsMonitored monLinkToObject;
}

@gmf.link(label="label", source="contLinkToAgent", target="contLinkToObject", color="34,139,34", target.decoration="arrow", width="2", tool.description="Create new ControlsLink between an Object and an Agent")
class ControlsLink extends Links {
  readonly attr String[1] label = "Controls";
  ref Agent[1]#agentControls contLinkToAgent;
  ref Object[1]#objIsControlled contLinkToObject;
}

@gmf.link(label="label", source="perLinkToAgent", target="perLinkToOperationNode", color="0,0,0", target.decoration="arrow", width="2", tool.description="Create new PerformsLink between an Agent and an Operation")
class PerformsLink extends Links {
  readonly attr String[1] label = "Performs";
  ref Agent[1]#agentPerforms perLinkToAgent;
  ref OperationNode[1]#operationIsPerformed perLinkToOperationNode;
}

@Ecore(constraints="linkToHimself")
@gmf.link(label="label", source="conflictBtwnGoals", target="goalHasConflict", color="205,0,0", source.decoration="arrow", target.decoration="arrow", width="2", style="dash", tool.description="Create new Conflict between Goals")
@"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="conflictBtwnGoals <> goalHasConflict", linkToHimself$message="'Goal ' + conflictBtwnGoals.name + ' can not be a refinement of himself.'")
class Conflict extends Links {
  readonly attr String[1] label = "Conflict";
  ref Goal[1] conflictBtwnGoals;
  ref Goal[1] goalHasConflict;
}



and there is the error log:

!ENTRY Kaos.diagram 4 0 2012-02-09 20:11:22.221
!MESSAGE Expression problem:Cannot find operation (Test(Integer)) for the type (KAOS)body:self.Test(1)
!STACK 0
org.eclipse.ocl.SemanticException: Cannot find operation (Test(Integer)) for the type (KAOS)
	at org.eclipse.ocl.util.OCLUtil.checkForErrors(OCLUtil.java:352)
	at org.eclipse.ocl.util.OCLUtil.checkForErrors(OCLUtil.java:322)
	at org.eclipse.ocl.internal.helper.HelperUtil.checkForErrors(HelperUtil.java:518)
	at org.eclipse.ocl.internal.helper.HelperUtil.parseQuery(HelperUtil.java:165)
	at org.eclipse.ocl.internal.helper.OCLHelperImpl.createQuery(OCLHelperImpl.java:176)
	at org.eclipse.ocl.ecore.OCLHelperImpl.createQuery(OCLHelperImpl.java:90)
	at KAOSStandard.diagram.expressions.KAOSStandardOCLFactory$Expression.<init>(KAOSStandardOCLFactory.java:114)
	at KAOSStandard.diagram.expressions.KAOSStandardOCLFactory.getExpression(KAOSStandardOCLFactory.java:74)
	at KAOSStandard.diagram.expressions.KAOSStandardOCLFactory.getExpression(KAOSStandardOCLFactory.java:58)
	at KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calcTest1(KAOSStandardMetricProvider.java:359)
	at KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calculateSemanticElementMetrics(KAOSStandardMetricProvider.java:148)
	at KAOSStandard.diagram.providers.KAOSStandardMetricProvider$1.run(KAOSStandardMetricProvider.java:122)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
	at KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calculateMetrics(KAOSStandardMetricProvider.java:116)
	at KAOSStandard.diagram.providers.KAOSStandardMetricProvider$ResultView.setInput(KAOSStandardMetricProvider.java:414)
	at KAOSStandard.diagram.providers.KAOSStandardMetricProvider$ResultView.createPartControl(KAOSStandardMetricProvider.java:510)
	at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
	at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:534)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
	at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:662)
	at org.eclipse.ui.internal.PartStack.createControl(PartStack.java:570)
	at org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
	at org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
	at org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981)
	at org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2714)
	at org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:3023)
	at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
	at org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:3004)
	at org.eclipse.ui.internal.WorkbenchWindow$20.runWithException(WorkbenchWindow.java:2290)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3938)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3615)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
	at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3938)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3615)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
	at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1386)


Best regards,
Re: [OCLInEcore] Cannot find operation [message #794874 is a reply to message #794869] Thu, 09 February 2012 20:17 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Patricia

I'm afraid that is not an Ecore file. An Ecore File is an XMI file.
Please post the Ecore file.

Regards

Ed Willink

On 09/02/2012 20:13, Patricia Espada wrote:
> Hi,
>
> I've tried changing from Pivot to the Tradition OCL and nothing
> changed, as the same for using EInt or Integer (it seems the emfatic
> doesn't recognize EInteger) instead of EBigInteger. Here is my EMF file:
>
> @gmf(foo="bar")
> @Ecore(invocationDelegates="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
> settingDelegates="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
> validationDelegates="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot")
> @namespace(uri="kaos", prefix="kaos")
> package KAOSStandard;
>
> @gmf.diagram(foo="bar")
> class KAOS {
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="i + 1")
> !ordered op Integer Test(!ordered Integer[1] i);
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="1")
> !ordered op Integer Test1();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG())->size()")
> !ordered op Integer NLG();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG() and
> n.oclAsType(Goal).GNA() > 0)->size()")
> !ordered op Integer NLGWA();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLGWA()
> / self.NLG()", pre_nlgGZ="self.NLG() > 0")
> !ordered op Double PLGWA();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG() and
> n.oclAsType(Goal).GNO() > 0)->size()")
> !ordered op Integer NLGWO();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLGWO()
> / self.NLG()", pre_nlgGZ="self.NLG() > 0")
> !ordered op Double PLGWO();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(Obstacle) and
> n.oclAsType(Obstacle).ILO())->size()")
> !ordered op Integer NLO();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(Obstacle) and n.oclAsType(Obstacle).ILO() and
> n.oclAsType(Obstacle).OS()->size() > 0)->size()")
> !ordered op Integer NLOWS();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLOWS()
> / self.NLO()", pre_nloGZ="self.NLO() > 0")
> !ordered op Double PLOWS();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG() and
> n.oclAsType(Goal).GNOp() > 0)->size()")
> !ordered op Integer NLGWOp();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLGWOp() /
> self.NLG()", pre_nlgGZ="self.NLG() > 0")
> !ordered op Double PLGWOp();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(OperationNode))->size()")
> !ordered op Integer NOp();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(OperationNode) and
> n.oclAsType(OperationNode).OpNA() > 0)->size()")
> !ordered op Integer NOpWA();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NOpWA()
> / self.NOp()", pre_nopGZ="self.NLG() > 0")
> !ordered op Double POpWA();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(Agent))->iterate(n : Nodes ; min : Integer = -
> 1 | let aux : Integer = n.oclAsType(Agent).ANLG() in if min = - 1 then
> aux else min.min(aux) endif)")
> !ordered op Integer MinNLGWA();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(Agent))->iterate(n : Nodes ; max : Integer = -
> 1 | let aux : Integer = n.oclAsType(Agent).ANLG() in if max = - 1 then
> aux else max.max(aux) endif)")
> !ordered op Integer MaxNLGWA();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(Agent))->size()")
> !ordered op Integer NA();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLGWA()
> / self.NA()", pre_naGZ="self.NA() > 0")
> !ordered op Double AveNLGWA();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG())->iterate(n
> : Nodes ; min : Integer = - 1 | let aux : Integer =
> n.oclAsType(Goal).GNO() in if min = - 1 then aux else min.min(aux)
> endif)")
> !ordered op Integer MinNOWLG();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasNodes->select(n
> : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG())->iterate(n
> : Nodes ; max : Integer = - 1 | let aux : Integer =
> n.oclAsType(Goal).GNO() in if max = - 1 then aux else max.max(aux)
> endif)")
> !ordered op Integer MaxNOWLG();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.hasLinks->select(l
> : Links |
> l.oclIsKindOf(ConcernsLink))->collect(oclAsType(ConcernsLink).concernedByGoal)->select(g
> : Goal | g.ILG())->size()")
> !ordered op Integer NLGC();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NLGC()
> / self.NLG()", pre_nlgGZ="self.NLG() > 0")
> !ordered op Double AveNOWLG();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let s :
> Set(Nodes) = Set{} in s->union(s1)->union(s2)")
> !ordered op Nodes[*] union(!ordered Goal[*] s1, !ordered Nodes[*] s2);
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let visit :
> Set(Nodes) = visited->including(g.oclAsType(Nodes)) in if g.ILG() then
> let obsts : Set(Obstacle) =
> g.goalHasObstacle->collect(obstacle)->asSet() in if obsts->notEmpty()
> then obsts->collect(o : Obstacle | NDR(o.oclAsType(Nodes), visit,
> dist->including(last + 1), last + 1))->asSet() else dist endif else
> union(g.goalIsAndRef->collect(andRefToOtherGoal)->union(g.goalIsOrRef->collect(orRefToOtherGoal))->asSet(),
> g.goalHasObstacle->collect(obstacle)->asSet())->collect(n : Nodes |
> NDR(n, visit, dist->including(last + 1), last + 1))->asSet() endif")
> !ordered op Integer[*] GDR(!ordered Goal[1] g, !ordered Nodes[*]
> visited, !ordered Integer[*] dist, !ordered Integer[1] last);
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let visit :
> Set(Nodes) = visited->including(o.oclAsType(Nodes)) in if o.ILO() then
> let goals : Set(Goal) = o.OS() in if goals->notEmpty() then
> goals->collect(g : Goal | NDR(g.oclAsType(Nodes), visit,
> dist->including(last + 1), last + 1))->asSet() else dist endif else
> o.OR()->collect(o : Obstacle | NDR(o.oclAsType(Nodes), visit,
> dist->including(last + 1), last + 1))->asSet() endif")
> !ordered op Integer[*] ODR(!ordered Obstacle[1] o, !ordered Nodes[*]
> visited, !ordered Integer[*] dist, !ordered Integer[1] last);
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="if
> visited->one(aux : Nodes | aux = n) then dist else if
> n.oclIsKindOf(Goal) then self.GDR(n.oclAsType(Goal), visited, dist,
> last) else if n.oclIsKindOf(Obstacle) then
> self.ODR(n.oclAsType(Obstacle), visited, dist, last) else dist endif
> endif endif")
> !ordered op Integer[*] NDR(!ordered Nodes[1] n, !ordered Nodes[*]
> visited, !ordered Integer[*] dist, !ordered Integer[1] last);
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.NDR(self.root.oclAsType(Nodes),
> Set{}, Set{0}, 0)->iterate(i : Integer ; maxD : Integer = - 1 | if
> maxD = - 1 then i else maxD.max(i) endif)")
> !ordered op Integer MD();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.root.GSG()->size()")
>
> !ordered op Integer RNSG();
> val CompartmentNode[*] hasCompartmentNode;
> val Nodes[*] hasNodes;
> val Links[*] hasLinks;
> ref Goal[1] root;
> }
>
> abstract class CompartmentNode {
> attr String name;
> }
>
> @gmf.node(label="name", border.color="0,0,255", size="200,100",
> border.width="2", tool.description="Create new GoalCompartmentNode for
> inserting Goals, Requirements and Expectations in the diagram")
> class GoalCompartmentNode extends CompartmentNode {
>
> @gmf.compartment(layout="free")
> val Goal[*] compHasGoals;
> }
>
> @gmf.node(label="name", border.color="0,100,0", size="200,100",
> border.width="2", tool.description="Create new SoftgoalCompartmentNode
> for inserting Softgoals in the diagram")
> class SoftgoalCompartmentNode extends CompartmentNode {
>
> @gmf.compartment(layout="free")
> val Softgoal[*] softgoalCompHasSoftgoals;
> }
>
> @gmf.node(label="name", border.color="255,165,0", size="200,100",
> border.width="2", tool.description="Create new ObstacleCompartmentNode
> for inserting Obstacles in the diagram")
> class ObstacleCompartmentNode extends CompartmentNode {
>
> @gmf.compartment(layout="free")
> val Obstacle[*] obstCompNodeHasObstacle;
> }
>
> @gmf.node(label="name", border.color="148,0,211", size="200,100",
> border.width="2", tool.description="Create new
> DomainPropertiesCompartmentNode for inserting Domain Invariants and
> Domain Hipothesis in the diagram")
> class DomainPropertiesCompartmentNode extends CompartmentNode {
>
> @gmf.compartment(layout="free")
> val DomainProperties[*] domProCompNodeHasDomProp;
> }
>
> @gmf.node(label="name", border.color="255,105,180", size="200,100",
> border.width="2", tool.description="Create new AgentCompartmentNode
> for inserting System Agents and Environment Agents in the diagram")
> class AgentCompartmentNode extends CompartmentNode {
>
> @gmf.compartment(layout="free")
> val Agent[*] agentCompHasAgent;
> }
>
> @gmf.node(label="name", border.color="165,42,42", size="200,100",
> border.width="2", tool.description="Create new ObjectCompartmentNode
> for creating Entities and Events in the diagram")
> class ObjectCompartmentNode extends CompartmentNode {
>
> @gmf.compartment(layout="free")
> ref Object[*] objCompHasObjects;
> }
>
> @gmf.node(label="name", size="200,100", border.width="2",
> tool.description="Create new OperationCompartmentNode for inserting
> Operations in the diagram")
> class OperationCompartmentNode extends CompartmentNode {
>
> @gmf.compartment(layout="free")
> ref OperationNode[*] hasOperationNodes;
> }
>
> @gmf.node(label="name", label.placement="external")
> abstract class Nodes {
> attr String name;
> attr String TransformationSource;
> attr String IstarActorContainer;
> }
>
> @gmf.node(color="0,191,255", border.color="0,191,255", size="80,50",
> figure="polygon", polygon.x="30 70 50 10", polygon.y="10 10 40 40",
> tool.description="Create new Goal")
> class Goal extends Nodes {
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.goalIsAndRef->isEmpty()
> and self.goalIsOrRef->isEmpty()")
> !ordered op boolean[1] ILG();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let agents :
> Set(Agent) = self.GA() in if bool then agents else
> agents->union(self.otherGoalIsOrRef->collect(orRefToGoal)->union(self.otherGoalIsAndRef->collect(andRefToGoal))->collect(g
> : Goal | g.GIA(false))->asSet()) endif")
> !ordered op Agent[*] GIA(!ordered Boolean[1] bool);
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="if
> self.oclIsKindOf(Expectation) then self.oclAsType(Expectation).EA()
> else if self.oclIsKindOf(Requirement) then
> self.oclAsType(Requirement).RA() else Set{} endif endif")
> !ordered op Agent[*] GA();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.GA()->union(self.GIA(true))->size()")
>
> !ordered op Integer GNA();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.goalConcerns->collect(concernsObject)->size()")
>
> !ordered op Integer GNO();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.goalToOperatLink->collect(operatLinkToOperationNode)->size()")
>
> !ordered op Integer GNOp();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let goals :
> Set(Goal) =
> self.goalIsOrRef->collect(orRefToOtherGoal)->union(self.goalIsAndRef->collect(andRefToOtherGoal))->asSet()
> in goals->select(g : Goal | g.ILG())->union(goals->select(g : Goal |
> not g.ILG())->collect(g : Goal | g.GLG()))->asSet()")
> !ordered op Goal[*] GLG();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let goals :
> Set(Goal) =
> self.goalIsOrRef->collect(orRefToOtherGoal)->union(self.goalIsAndRef->collect(andRefToOtherGoal))->asSet()->union(self.goalHasObstacle->collect(obstacle)->iterate(o
> : Obstacle ; aux : Set(Goal) = Set{} | aux->union(o.OS()))) in if
> goals->isEmpty() then Set{} else goals->collect(g : Goal |
> goals->union(g.GSG()))->asSet() endif")
> !ordered op Goal[*] GSG();
> attr String formalDef;
> attr String informalDef;
> ref OrRefinement[*]#orRefToGoal goalIsOrRef;
> ref OrRefinement[*]#orRefToOtherGoal otherGoalIsOrRef;
> ref AndRefinement[*]#andRefToGoal goalIsAndRef;
> ref AndRefinement[*]#andRefToOtherGoal otherGoalIsAndRef;
> ref ObstructionLink[*]#obstacleToGoal goalHasObstacle;
> ref SolutionLink[*]#obstacleHasSolution solutionIsGoal;
> ref OperationalizationLink[*]#operatLinkToGoal goalToOperatLink;
> ref ConcernsLink[*]#concernedByGoal goalConcerns;
> ref DomainPropLink[*]#DomPropLinkToGoal goalHasDomProp;
> }
>
> @gmf.node(color="0,191,255", border.color="0,0,0", border.width="2",
> size="80,50", figure="polygon", polygon.x="30 70 50 10", polygon.y="10
> 10 40 40", tool.description="Create new Requirement")
> class Requirement extends Goal {
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.ReqToAgentReqLink->collect(ReqToAgentLink)->asSet()")
>
> !ordered op Agent[*] RA();
> ref AgentReqLink[+]#agentReqLinkToReq ReqToAgentReqLink;
> }
>
> @gmf.node(color="255,215,0", border.color="255,215,0", size="80,50",
> figure="polygon", polygon.x="30 70 50 10", polygon.y="10 10 40 40",
> tool.description="Create new Expectation")
> class Expectation extends Goal {
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.expToAgentExpLink->collect(expLinkToAgent)->asSet()")
>
> !ordered op Agent[*] EA();
> ref AgentExpLink[+]#agentExpLinkToExp expToAgentExpLink;
> }
>
> @gmf.node(color="50,205,50", border.color="50,205,50", size="40,40",
> figure="ellipse", tool.description="Create new Softgoal")
> class Softgoal extends Goal {
> }
>
> @gmf.node(color="255,140,0", border.color="255,140,0", size="80,50",
> figure="polygon", polygon.x="10 50 70 30", polygon.y="10 10 40 40",
> tool.description="Create new Obstacle")
> class Obstacle extends Nodes {
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.obstIsParent->isEmpty()")
>
> !ordered op boolean[1] ILO();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.obstIsRefinement->collect(obstToObstRef)->asSet()")
>
> !ordered op Obstacle[*] OP();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.obstIsParent->collect(obstRefToObst)->asSet()")
>
> !ordered op Obstacle[*] OR();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let s :
> Set(Goal) = self.solution->collect(obstacleHasSolution)->asSet() in if
> visited->one(o : Obstacle | o = self) then s else self.OR()->iterate(o
> : Obstacle ; aux : Set(Goal) = s |
> aux->union(OBS(visited->including(self)))) endif")
> !ordered op Goal[*] OBS(!ordered Obstacle[*] visited);
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="let s :
> Set(Goal) = self.solution->collect(obstacleHasSolution)->asSet() in if
> visited->one(o : Obstacle | o = self) then s else self.OP()->iterate(o
> : Obstacle ; aux : Set(Goal) = s |
> aux->union(OAS(visited->including(self)))) endif")
> !ordered op Goal[*] OAS(!ordered Obstacle[*] visited);
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.OBS(Set{})->union(self.OAS(Set{}))")
>
> !ordered op Goal[*] OS();
> ref ObstructionLink[*]#obstacle obstacleObstruction;
> ref SolutionLink[*]#obstacleSolution solution;
> ref ObstacleRefinement[*]#obstRefToObst obstIsRefinement;
> ref ObstacleRefinement[*]#obstToObstRef obstIsParent;
> }
>
> abstract class DomainProperties extends Nodes {
> attr String formalDef;
> attr String informalDef;
> ref DomainPropLink[+]#goalToDomProp domPropToGoal;
> }
>
> @gmf.node(color="221,160,221", border.color="221,160,221",
> size="80,50", figure="polygon", polygon.x="10 40 70 70 10",
> polygon.y="20 10 20 40 40", tool.description="Create new
> DomainInvariant")
> class DomainInvariant extends DomainProperties {
> }
>
> @gmf.node(color="147,112,219", border.color="147,112,219",
> size="80,50", figure="polygon", polygon.x="10 40 70 70 10",
> polygon.y="20 10 20 40 40", tool.description="Create new
> DomainHyphothesis")
> class DomainHyphothesis extends DomainProperties {
> }
>
> abstract class Object extends Nodes {
> attr String informalDef;
> ref InheritanceLink[*]#inhLinkToObject objToInhLink;
> ref InheritanceLink[*]#inhLinkToOtherObj otherObjToInhLink;
> ref AggregationLink[*]#aggLinkToObject objToAggLink;
> ref AggregationLink[*]#aggLinkToOtherObject otherObjToAggLink;
> ref CardinalityLink[*]#cardLinkToObject objToCardLink;
> ref CardinalityLink[*]#cardLinkToOtherObject otherObjToCardLink;
> ref MonitorsLink[*]#monLinkToObject objIsMonitored;
> ref ControlsLink[*]#contLinkToObject objIsControlled;
> ref ConcernsLink[*]#concernsObject objectIsConcerned;
> }
>
> abstract class Agent extends Object {
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="if
> self.oclIsKindOf(EnvironmentAgent) then
> self.oclAsType(EnvironmentAgent).EAG() else if
> self.oclIsKindOf(SystemAgent) then self.oclAsType(SystemAgent).SAG()
> else Set{} endif endif")
> !ordered op Goal[*] AG();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.AG()->select(g
> : Goal | not g.ILG())->collect(g : Goal | g.GLG())->asSet()")
> !ordered op Goal[*] AIG();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.AG()->union(self.AIG())->select(g
> : Goal | g.ILG())")
> !ordered op Goal[*] ALG();
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.ALG()->size()")
>
> !ordered op Integer ANLG();
> ref MonitorsLink[*]#monLinkToAgent agentMonitors;
> ref ControlsLink[*]#contLinkToAgent agentControls;
> ref PerformsLink[*]#perLinkToAgent agentPerforms;
> }
>
> @gmf.node(color="255,160,122", border.color="255,160,122",
> size="80,50", figure="polygon", polygon.x="10 20 60 70 60 20",
> polygon.y="25 40 40 25 10 10", tool.description="Create new SystemAgent")
> class SystemAgent extends Agent {
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.agentToReqLink->collect(agentReqLinkToReq)->asSet()")
>
> !ordered op Goal[*] SAG();
> ref AgentReqLink[+]#ReqToAgentLink agentToReqLink;
> }
>
> @gmf.node(color="255,182,193", border.color="255,182,193",
> size="80,50", figure="polygon", polygon.x="10 20 60 70 60 20",
> polygon.y="25 40 40 25 10 10", tool.description="Create new
> EnvironmentAgent")
> class EnvironmentAgent extends Agent {
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.agentToExpLink->collect(agentExpLinkToExp)->asSet()")
>
> !ordered op Goal[*] EAG();
> ref AgentExpLink[+]#expLinkToAgent agentToExpLink;
> }
>
> @gmf.node(color="189,183,107", border.color="189,183,107",
> size="80,50", figure="polygon", polygon.x="10 10 60 70 60",
> polygon.y="10 40 40 25 10", tool.description="Create new Event")
> class Event extends Object {
> attr int frequency;
> }
>
> @gmf.node(color="143,188,143", border.color="143,188,143",
> size="60,30", figure="rectangle", tool.description="Create new Entity")
> class Entity extends Object {
> }
>
> @gmf.link(label="name", source="relationConnObject",
> target="objectIsConnByRelation", color="255,127,80",
> target.decoration="arrow", width="2", tool.description="Create new
> Relationship between two Objects")
> class Relationship extends Object {
> ref Object[1] relationConnObject;
> ref Object[1] objectIsConnByRelation;
> }
>
> @gmf.node(color="211,211,211", border.color="211,211,211",
> size="60,30", figure="ellipse", tool.description="Create new
> OperationNode")
> class OperationNode extends Nodes {
>
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(body="self.operationIsPerformed->collect(perLinkToAgent)->size()")
>
> !ordered op Integer OpNA();
> ref OperationalizationLink[*]#operatLinkToOperationNode
> operationNodeToOperatLink;
> ref PerformsLink[*]#perLinkToOperationNode operationIsPerformed;
> }
>
> abstract class Links {
> attr String TransformationSource;
> attr String name;
> attr String Source;
> attr String Target;
> }
>
> @Ecore(constraints="linkToHimself")
> @gmf.link(source="orRefToGoal", target="orRefToOtherGoal",
> color="0,0,255", target.decoration="arrow", width="2", style="dash",
> tool.description="Create new OrRefinement between Goal, Requirement or
> Expectation")
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="orRefToGoal
> <> orRefToOtherGoal", linkToHimself$message="'Goal ' +
> orRefToGoal.name + ' can not be a refinement of himself.'")
> class OrRefinement extends Links {
> ref Goal[1]#goalIsOrRef orRefToGoal;
> ref Goal[1]#otherGoalIsOrRef orRefToOtherGoal;
> }
>
> @Ecore(constraints="linkToHimself")
> @gmf.link(source="andRefToGoal", target="andRefToOtherGoal",
> color="0,0,255", target.decoration="arrow", width="2",
> tool.description="Create new AndRefinement between Goal, Requirement
> or Expectation")
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="andRefToGoal
> <> andRefToOtherGoal", linkToHimself$message="'Goal ' +
> andRefToGoal.name + ' can not be a refinement of himself.'")
> class AndRefinement extends Links {
> ref Goal[1]#goalIsAndRef andRefToGoal;
> ref Goal[1]#otherGoalIsAndRef andRefToOtherGoal;
> }
>
> @Ecore(constraints="linkToHimself")
> @gmf.link(source="obstRefToObst", target="obstToObstRef",
> color="255,140,0", target.decoration="arrow", width="2",
> tool.description="Create new ObstacleRefinement between Obstacles")
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="obstRefToObst
> <> obstToObstRef", linkToHimself$message="'Obstacle ' +
> obstRefToObst.name + ' can not be a refinement of himself.'")
> class ObstacleRefinement extends Links {
> ref Obstacle[1]#obstIsRefinement obstRefToObst;
> ref Obstacle[1]#obstIsParent obstToObstRef;
> }
>
> @gmf.link(source="obstacle", target="obstacleToGoal",
> color="255,165,0", target.decoration="arrow", width="2",
> tool.description="Create new ObstructionLink between an Obstacle and a
> Goal, Requirement or Expectation")
> class ObstructionLink extends Links {
> ref Obstacle[1]#obstacleObstruction obstacle;
> ref Goal[1]#goalHasObstacle obstacleToGoal;
> }
>
> @gmf.link(source="obstacleHasSolution", target="obstacleSolution",
> color="0,139,0", target.decoration="arrow", width="2",
> tool.description="Create new SolutionLink between an Obstacle and a
> Goal, Requirement or Expectation")
> class SolutionLink extends Links {
> ref Goal[1]#solutionIsGoal obstacleHasSolution;
> ref Obstacle[1]#solution obstacleSolution;
> }
>
> @gmf.link(label="label", source="operatLinkToGoal",
> target="operatLinkToOperationNode", color="105,105,105",
> target.decoration="arrow", width="2", tool.description="Create new
> OperationalizationLink between an Operation and a Goal")
> class OperationalizationLink extends Links {
> readonly attr String[1] label = "Operationalization";
> ref Goal[1]#goalToOperatLink operatLinkToGoal;
> ref OperationNode[1]#operationNodeToOperatLink
> operatLinkToOperationNode;
> }
>
> @gmf.link(label="label", source="concernedByGoal",
> target="concernsObject", color="205,133,63",
> target.decoration="arrow", width="2", tool.description="Create new
> ConcernsLink between a Goal, Requirement or Expectation and an Object")
> class ConcernsLink extends Links {
> readonly attr String[1] label = "Concerns";
> ref Goal[1]#goalConcerns concernedByGoal;
> ref Object[1]#objectIsConcerned concernsObject;
> }
>
> @gmf.link(source="DomPropLinkToGoal", target="goalToDomProp",
> color="148,0,211", target.decoration="arrow", width="2",
> tool.description="Create new DomainPropLink between Goal, Requirement
> or Expectation and Domain Invariant or Domain Hipothesis")
> class DomainPropLink extends Links {
> ref Goal[1]#goalHasDomProp DomPropLinkToGoal;
> ref DomainProperties[1]#domPropToGoal goalToDomProp;
> }
>
> @gmf.link(source="ReqToAgentLink", target="agentReqLinkToReq",
> color="233,150,122", target.decoration="arrow", width="2",
> tool.description="Create new AgentReqLink for connecting a System
> Agent to a Requirement")
> class AgentReqLink extends Links {
> ref SystemAgent[1]#agentToReqLink ReqToAgentLink;
> ref Requirement[1]#ReqToAgentReqLink agentReqLinkToReq;
> }
>
> @gmf.link(source="expLinkToAgent", target="agentExpLinkToExp",
> color="176,48,96", target.decoration="arrow", width="2",
> tool.description="Create new AgentExpLink for connecting an
> Environment Agent to an Expectation")
> class AgentExpLink extends Links {
> ref EnvironmentAgent[1]#agentToExpLink expLinkToAgent;
> ref Expectation[1]#expToAgentExpLink agentExpLinkToExp;
> }
>
> @Ecore(constraints="linkToHimself")
> @gmf.link(source="inhLinkToObject", target="inhLinkToOtherObj",
> target.decoration="closedarrow", width="2", tool.description="Create
> new InheritanceLink between Entities")
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="inhLinkToObject
> <> inhLinkToOtherObj", linkToHimself$message="'Object ' +
> inhLinkToObject.name + ' can not be a refinement of himself.'")
> class InheritanceLink extends Links {
> ref Object[1]#objToInhLink inhLinkToObject;
> ref Object[1]#otherObjToInhLink inhLinkToOtherObj;
> }
>
> @Ecore(constraints="linkToHimself")
> @gmf.link(source="aggLinkToObject", target="aggLinkToOtherObject",
> target.decoration="filledrhomb", width="2", tool.description="Create
> new AggregationLink between Entities")
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="aggLinkToObject
> <> aggLinkToOtherObject", linkToHimself$message="'Object ' +
> aggLinkToObject.name + ' can not be a refinement of himself.'")
> class AggregationLink extends Links {
> ref Object[1]#objToAggLink aggLinkToObject;
> ref Object[1]#otherObjToAggLink aggLinkToOtherObject;
> }
>
> @gmf.link(source="cardLinkToObject", target="cardLinkToOtherObject",
> width="2", tool.description="Create new CardinalityLink between
> Entities")
> class CardinalityLink extends Links {
> attr String[1] firstEnd;
> attr String[1] secondEnd;
> ref Object[1]#objToCardLink cardLinkToObject;
> ref Object[1]#otherObjToCardLink cardLinkToOtherObject;
> }
>
> @gmf.link(label="label", source="monLinkToAgent",
> target="monLinkToObject", color="102,205,170",
> target.decoration="arrow", width="2", tool.description="Create new
> MonitorsLink between an Object and an Agent")
> class MonitorsLink extends Links {
> readonly attr String[1] label = "Monitors";
> ref Agent[1]#agentMonitors monLinkToAgent;
> ref Object[1]#objIsMonitored monLinkToObject;
> }
>
> @gmf.link(label="label", source="contLinkToAgent",
> target="contLinkToObject", color="34,139,34",
> target.decoration="arrow", width="2", tool.description="Create new
> ControlsLink between an Object and an Agent")
> class ControlsLink extends Links {
> readonly attr String[1] label = "Controls";
> ref Agent[1]#agentControls contLinkToAgent;
> ref Object[1]#objIsControlled contLinkToObject;
> }
>
> @gmf.link(label="label", source="perLinkToAgent",
> target="perLinkToOperationNode", color="0,0,0",
> target.decoration="arrow", width="2", tool.description="Create new
> PerformsLink between an Agent and an Operation")
> class PerformsLink extends Links {
> readonly attr String[1] label = "Performs";
> ref Agent[1]#agentPerforms perLinkToAgent;
> ref OperationNode[1]#operationIsPerformed perLinkToOperationNode;
> }
>
> @Ecore(constraints="linkToHimself")
> @gmf.link(label="label", source="conflictBtwnGoals",
> target="goalHasConflict", color="205,0,0", source.decoration="arrow",
> target.decoration="arrow", width="2", style="dash",
> tool.description="Create new Conflict between Goals")
> @"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"(linkToHimself="conflictBtwnGoals
> <> goalHasConflict", linkToHimself$message="'Goal ' +
> conflictBtwnGoals.name + ' can not be a refinement of himself.'")
> class Conflict extends Links {
> readonly attr String[1] label = "Conflict";
> ref Goal[1] conflictBtwnGoals;
> ref Goal[1] goalHasConflict;
> }
>
>
>
> and there is the error log:
>
> !ENTRY Kaos.diagram 4 0 2012-02-09 20:11:22.221
> !MESSAGE Expression problem:Cannot find operation (Test(Integer)) for
> the type (KAOS)body:self.Test(1)
> !STACK 0
> org.eclipse.ocl.SemanticException: Cannot find operation
> (Test(Integer)) for the type (KAOS)
> at org.eclipse.ocl.util.OCLUtil.checkForErrors(OCLUtil.java:352)
> at org.eclipse.ocl.util.OCLUtil.checkForErrors(OCLUtil.java:322)
> at
> org.eclipse.ocl.internal.helper.HelperUtil.checkForErrors(HelperUtil.java:518)
> at
> org.eclipse.ocl.internal.helper.HelperUtil.parseQuery(HelperUtil.java:165)
> at
> org.eclipse.ocl.internal.helper.OCLHelperImpl.createQuery(OCLHelperImpl.java:176)
> at
> org.eclipse.ocl.ecore.OCLHelperImpl.createQuery(OCLHelperImpl.java:90)
> at
> KAOSStandard.diagram.expressions.KAOSStandardOCLFactory$Expression.<init>(KAOSStandardOCLFactory.java:114)
> at
> KAOSStandard.diagram.expressions.KAOSStandardOCLFactory.getExpression(KAOSStandardOCLFactory.java:74)
> at
> KAOSStandard.diagram.expressions.KAOSStandardOCLFactory.getExpression(KAOSStandardOCLFactory.java:58)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calcTest1(KAOSStandardMetricProvider.java:359)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calculateSemanticElementMetrics(KAOSStandardMetricProvider.java:148)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider$1.run(KAOSStandardMetricProvider.java:122)
> at
> org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider.calculateMetrics(KAOSStandardMetricProvider.java:116)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider$ResultView.setInput(KAOSStandardMetricProvider.java:414)
> at
> KAOSStandard.diagram.providers.KAOSStandardMetricProvider$ResultView.createPartControl(KAOSStandardMetricProvider.java:510)
> at
> org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:375)
> at
> org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:229)
> at
> org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
> at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:313)
> at org.eclipse.ui.internal.ViewPane.setVisible(ViewPane.java:534)
> at
> org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
> at
> org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
> at
> org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
> at
> org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
> at
> org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1245)
> at
> org.eclipse.ui.internal.PartStack.createControl(PartStack.java:662)
> at
> org.eclipse.ui.internal.PartStack.createControl(PartStack.java:570)
> at
> org.eclipse.ui.internal.PartSashContainer.createControl(PartSashContainer.java:568)
> at
> org.eclipse.ui.internal.PerspectiveHelper.activate(PerspectiveHelper.java:272)
> at
> org.eclipse.ui.internal.Perspective.onActivate(Perspective.java:981)
> at
> org.eclipse.ui.internal.WorkbenchPage.onActivate(WorkbenchPage.java:2714)
> at
> org.eclipse.ui.internal.WorkbenchWindow$27.run(WorkbenchWindow.java:3023)
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
> at
> org.eclipse.ui.internal.WorkbenchWindow.setActivePage(WorkbenchWindow.java:3004)
> at
> org.eclipse.ui.internal.WorkbenchWindow$20.runWithException(WorkbenchWindow.java:2290)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3938)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3615)
> at
> org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
> at
> org.eclipse.ui.internal.Workbench$33.runWithException(Workbench.java:1595)
> at
> org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3938)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3615)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
> at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
> at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
>
> Best regards,
Re: [OCLInEcore] Cannot find operation [message #794897 is a reply to message #794874] Thu, 09 February 2012 20:54 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi,
I'm sorry I though you said EMF file. Here it is the Ecore file:

<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="KAOSStandard"
    nsURI="kaos" nsPrefix="kaos">
  <eAnnotations source="gmf">
    <details key="foo" value="bar"/>
  </eAnnotations>
  <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
    <details key="invocationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
    <details key="settingDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
    <details key="validationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
  </eAnnotations>
  <eClassifiers xsi:type="ecore:EClass" name="KAOS">
    <eAnnotations source="gmf.diagram">
      <details key="foo" value="bar"/>
    </eAnnotations>
    <eOperations name="Test" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="i + 1"/>
      </eAnnotations>
      <eParameters name="i" ordered="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
    </eOperations>
    <eOperations name="Test1" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="1"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="NLG" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG())->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="NLGWA" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG() and n.oclAsType(Goal).GNA() > 0)->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="PLGWA" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.NLGWA() / self.NLG()"/>
        <details key="pre_nlgGZ" value="self.NLG() > 0"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="NLGWO" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG() and n.oclAsType(Goal).GNO() > 0)->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="PLGWO" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.NLGWO() / self.NLG()"/>
        <details key="pre_nlgGZ" value="self.NLG() > 0"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="NLO" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Obstacle) and n.oclAsType(Obstacle).ILO())->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="NLOWS" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Obstacle) and n.oclAsType(Obstacle).ILO() and n.oclAsType(Obstacle).OS()->size() > 0)->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="PLOWS" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.NLOWS() / self.NLO()"/>
        <details key="pre_nloGZ" value="self.NLO() > 0"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="NLGWOp" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG() and n.oclAsType(Goal).GNOp() > 0)->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="PLGWOp" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.NLGWOp() / self.NLG()"/>
        <details key="pre_nlgGZ" value="self.NLG() > 0"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="NOp" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(OperationNode))->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="NOpWA" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(OperationNode) and n.oclAsType(OperationNode).OpNA() > 0)->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="POpWA" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.NOpWA() / self.NOp()"/>
        <details key="pre_nopGZ" value="self.NLG() > 0"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="MinNLGWA" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Agent))->iterate(n : Nodes ; min : Integer = - 1 | let aux : Integer = n.oclAsType(Agent).ANLG() in if min = - 1 then aux else min.min(aux) endif)"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="MaxNLGWA" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Agent))->iterate(n : Nodes ; max : Integer = - 1 | let aux : Integer = n.oclAsType(Agent).ANLG() in if max = - 1 then aux else max.max(aux) endif)"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="NA" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Agent))->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="AveNLGWA" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.NLGWA() / self.NA()"/>
        <details key="pre_naGZ" value="self.NA() > 0"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="MinNOWLG" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG())->iterate(n : Nodes ; min : Integer = - 1 | let aux : Integer = n.oclAsType(Goal).GNO() in if min = - 1 then aux else min.min(aux) endif)"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="MaxNOWLG" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasNodes->select(n : Nodes | n.oclIsKindOf(Goal) and n.oclAsType(Goal).ILG())->iterate(n : Nodes ; max : Integer = - 1 | let aux : Integer = n.oclAsType(Goal).GNO() in if max = - 1 then aux else max.max(aux) endif)"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="NLGC" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.hasLinks->select(l : Links | l.oclIsKindOf(ConcernsLink))->collect(oclAsType(ConcernsLink).concernedByGoal)->select(g : Goal | g.ILG())->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="AveNOWLG" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EDoubleObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.NLGC() / self.NLG()"/>
        <details key="pre_nlgGZ" value="self.NLG() > 0"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="union" ordered="false" upperBound="-1" eType="#//Nodes">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="let s : Set(Nodes) = Set{} in s->union(s1)->union(s2)"/>
      </eAnnotations>
      <eParameters name="s1" ordered="false" upperBound="-1" eType="#//Goal"/>
      <eParameters name="s2" ordered="false" upperBound="-1" eType="#//Nodes"/>
    </eOperations>
    <eOperations name="GDR" ordered="false" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="let visit : Set(Nodes) = visited->including(g.oclAsType(Nodes)) in if g.ILG() then let obsts : Set(Obstacle) = g.goalHasObstacle->collect(obstacle)->asSet() in if obsts->notEmpty() then obsts->collect(o : Obstacle | NDR(o.oclAsType(Nodes), visit, dist->including(last + 1), last + 1))->asSet() else dist endif else union(g.goalIsAndRef->collect(andRefToOtherGoal)->union(g.goalIsOrRef->collect(orRefToOtherGoal))->asSet(), g.goalHasObstacle->collect(obstacle)->asSet())->collect(n : Nodes | NDR(n, visit, dist->including(last + 1), last + 1))->asSet() endif"/>
      </eAnnotations>
      <eParameters name="g" ordered="false" lowerBound="1" eType="#//Goal"/>
      <eParameters name="visited" ordered="false" upperBound="-1" eType="#//Nodes"/>
      <eParameters name="dist" ordered="false" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
      <eParameters name="last" ordered="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
    </eOperations>
    <eOperations name="ODR" ordered="false" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="let visit : Set(Nodes) = visited->including(o.oclAsType(Nodes)) in if o.ILO() then let goals : Set(Goal) = o.OS() in if goals->notEmpty() then goals->collect(g : Goal | NDR(g.oclAsType(Nodes), visit, dist->including(last + 1), last + 1))->asSet() else dist endif else o.OR()->collect(o : Obstacle | NDR(o.oclAsType(Nodes), visit, dist->including(last + 1), last + 1))->asSet() endif"/>
      </eAnnotations>
      <eParameters name="o" ordered="false" lowerBound="1" eType="#//Obstacle"/>
      <eParameters name="visited" ordered="false" upperBound="-1" eType="#//Nodes"/>
      <eParameters name="dist" ordered="false" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
      <eParameters name="last" ordered="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
    </eOperations>
    <eOperations name="NDR" ordered="false" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="if visited->one(aux : Nodes | aux = n) then dist else if n.oclIsKindOf(Goal) then self.GDR(n.oclAsType(Goal), visited, dist, last) else if n.oclIsKindOf(Obstacle) then self.ODR(n.oclAsType(Obstacle), visited, dist, last) else dist endif endif endif"/>
      </eAnnotations>
      <eParameters name="n" ordered="false" lowerBound="1" eType="#//Nodes"/>
      <eParameters name="visited" ordered="false" upperBound="-1" eType="#//Nodes"/>
      <eParameters name="dist" ordered="false" upperBound="-1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
      <eParameters name="last" ordered="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject"/>
    </eOperations>
    <eOperations name="MD" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.NDR(self.root.oclAsType(Nodes), Set{}, Set{0}, 0)->iterate(i : Integer ; maxD : Integer = - 1 | if maxD = - 1 then i else maxD.max(i) endif)"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="RNSG" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.root.GSG()->size()"/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="hasCompartmentNode" upperBound="-1"
        eType="#//CompartmentNode" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="hasNodes" upperBound="-1"
        eType="#//Nodes" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="hasLinks" upperBound="-1"
        eType="#//Links" containment="true"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="root" lowerBound="1" eType="#//Goal"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="CompartmentNode" abstract="true">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="GoalCompartmentNode" eSuperTypes="#//CompartmentNode">
    <eAnnotations source="gmf.node">
      <details key="label" value="name"/>
      <details key="border.color" value="0,0,255"/>
      <details key="size" value="200,100"/>
      <details key="border.width" value="2"/>
      <details key="tool.description" value="Create new GoalCompartmentNode for inserting Goals, Requirements and Expectations in the diagram"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="compHasGoals" upperBound="-1"
        eType="#//Goal" containment="true">
      <eAnnotations source="gmf.compartment">
        <details key="layout" value="free"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="SoftgoalCompartmentNode" eSuperTypes="#//CompartmentNode">
    <eAnnotations source="gmf.node">
      <details key="label" value="name"/>
      <details key="border.color" value="0,100,0"/>
      <details key="size" value="200,100"/>
      <details key="border.width" value="2"/>
      <details key="tool.description" value="Create new SoftgoalCompartmentNode for inserting Softgoals in the diagram"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="softgoalCompHasSoftgoals"
        upperBound="-1" eType="#//Softgoal" containment="true">
      <eAnnotations source="gmf.compartment">
        <details key="layout" value="free"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ObstacleCompartmentNode" eSuperTypes="#//CompartmentNode">
    <eAnnotations source="gmf.node">
      <details key="label" value="name"/>
      <details key="border.color" value="255,165,0"/>
      <details key="size" value="200,100"/>
      <details key="border.width" value="2"/>
      <details key="tool.description" value="Create new ObstacleCompartmentNode for inserting Obstacles in the diagram"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="obstCompNodeHasObstacle"
        upperBound="-1" eType="#//Obstacle" containment="true">
      <eAnnotations source="gmf.compartment">
        <details key="layout" value="free"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="DomainPropertiesCompartmentNode" eSuperTypes="#//CompartmentNode">
    <eAnnotations source="gmf.node">
      <details key="label" value="name"/>
      <details key="border.color" value="148,0,211"/>
      <details key="size" value="200,100"/>
      <details key="border.width" value="2"/>
      <details key="tool.description" value="Create new DomainPropertiesCompartmentNode for inserting Domain Invariants and Domain Hipothesis in the diagram"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="domProCompNodeHasDomProp"
        upperBound="-1" eType="#//DomainProperties" containment="true">
      <eAnnotations source="gmf.compartment">
        <details key="layout" value="free"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="AgentCompartmentNode" eSuperTypes="#//CompartmentNode">
    <eAnnotations source="gmf.node">
      <details key="label" value="name"/>
      <details key="border.color" value="255,105,180"/>
      <details key="size" value="200,100"/>
      <details key="border.width" value="2"/>
      <details key="tool.description" value="Create new AgentCompartmentNode for inserting System Agents and Environment Agents in the diagram"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="agentCompHasAgent" upperBound="-1"
        eType="#//Agent" containment="true">
      <eAnnotations source="gmf.compartment">
        <details key="layout" value="free"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ObjectCompartmentNode" eSuperTypes="#//CompartmentNode">
    <eAnnotations source="gmf.node">
      <details key="label" value="name"/>
      <details key="border.color" value="165,42,42"/>
      <details key="size" value="200,100"/>
      <details key="border.width" value="2"/>
      <details key="tool.description" value="Create new ObjectCompartmentNode for creating Entities and Events in the diagram"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="objCompHasObjects" upperBound="-1"
        eType="#//Object">
      <eAnnotations source="gmf.compartment">
        <details key="layout" value="free"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="OperationCompartmentNode" eSuperTypes="#//CompartmentNode">
    <eAnnotations source="gmf.node">
      <details key="label" value="name"/>
      <details key="size" value="200,100"/>
      <details key="border.width" value="2"/>
      <details key="tool.description" value="Create new OperationCompartmentNode for inserting Operations in the diagram"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="hasOperationNodes" upperBound="-1"
        eType="#//OperationNode">
      <eAnnotations source="gmf.compartment">
        <details key="layout" value="free"/>
      </eAnnotations>
    </eStructuralFeatures>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Nodes" abstract="true">
    <eAnnotations source="gmf.node">
      <details key="label" value="name"/>
      <details key="label.placement" value="external"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="TransformationSource" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="IstarActorContainer" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Goal" eSuperTypes="#//Nodes">
    <eAnnotations source="gmf.node">
      <details key="color" value="0,191,255"/>
      <details key="border.color" value="0,191,255"/>
      <details key="size" value="80,50"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="30 70 50 10"/>
      <details key="polygon.y" value="10 10 40 40"/>
      <details key="tool.description" value="Create new Goal"/>
    </eAnnotations>
    <eOperations name="ILG" ordered="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.goalIsAndRef->isEmpty() and self.goalIsOrRef->isEmpty()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="GIA" ordered="false" upperBound="-1" eType="#//Agent">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="let agents : Set(Agent) = self.GA() in if bool then agents else agents->union(self.otherGoalIsOrRef->collect(orRefToGoal)->union(self.otherGoalIsAndRef->collect(andRefToGoal))->collect(g : Goal | g.GIA(false))->asSet()) endif"/>
      </eAnnotations>
      <eParameters name="bool" ordered="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBooleanObject"/>
    </eOperations>
    <eOperations name="GA" ordered="false" upperBound="-1" eType="#//Agent">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="if self.oclIsKindOf(Expectation) then self.oclAsType(Expectation).EA() else if self.oclIsKindOf(Requirement) then self.oclAsType(Requirement).RA() else Set{} endif endif"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="GNA" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.GA()->union(self.GIA(true))->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="GNO" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.goalConcerns->collect(concernsObject)->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="GNOp" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.goalToOperatLink->collect(operatLinkToOperationNode)->size()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="GLG" ordered="false" upperBound="-1" eType="#//Goal">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="let goals : Set(Goal) = self.goalIsOrRef->collect(orRefToOtherGoal)->union(self.goalIsAndRef->collect(andRefToOtherGoal))->asSet() in goals->select(g : Goal | g.ILG())->union(goals->select(g : Goal | not g.ILG())->collect(g : Goal | g.GLG()))->asSet()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="GSG" ordered="false" upperBound="-1" eType="#//Goal">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="let goals : Set(Goal) = self.goalIsOrRef->collect(orRefToOtherGoal)->union(self.goalIsAndRef->collect(andRefToOtherGoal))->asSet()->union(self.goalHasObstacle->collect(obstacle)->iterate(o : Obstacle ; aux : Set(Goal) = Set{} | aux->union(o.OS()))) in if goals->isEmpty() then Set{} else goals->collect(g : Goal | goals->union(g.GSG()))->asSet() endif"/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="formalDef" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="informalDef" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="goalIsOrRef" upperBound="-1"
        eType="#//OrRefinement" eOpposite="#//OrRefinement/orRefToGoal"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="otherGoalIsOrRef" upperBound="-1"
        eType="#//OrRefinement" eOpposite="#//OrRefinement/orRefToOtherGoal"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="goalIsAndRef" upperBound="-1"
        eType="#//AndRefinement" eOpposite="#//AndRefinement/andRefToGoal"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="otherGoalIsAndRef" upperBound="-1"
        eType="#//AndRefinement" eOpposite="#//AndRefinement/andRefToOtherGoal"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="goalHasObstacle" upperBound="-1"
        eType="#//ObstructionLink" eOpposite="#//ObstructionLink/obstacleToGoal"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="solutionIsGoal" upperBound="-1"
        eType="#//SolutionLink" eOpposite="#//SolutionLink/obstacleHasSolution"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="goalToOperatLink" upperBound="-1"
        eType="#//OperationalizationLink" eOpposite="#//OperationalizationLink/operatLinkToGoal"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="goalConcerns" upperBound="-1"
        eType="#//ConcernsLink" eOpposite="#//ConcernsLink/concernedByGoal"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="goalHasDomProp" upperBound="-1"
        eType="#//DomainPropLink" eOpposite="#//DomainPropLink/DomPropLinkToGoal"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Requirement" eSuperTypes="#//Goal">
    <eAnnotations source="gmf.node">
      <details key="color" value="0,191,255"/>
      <details key="border.color" value="0,0,0"/>
      <details key="border.width" value="2"/>
      <details key="size" value="80,50"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="30 70 50 10"/>
      <details key="polygon.y" value="10 10 40 40"/>
      <details key="tool.description" value="Create new Requirement"/>
    </eAnnotations>
    <eOperations name="RA" ordered="false" upperBound="-1" eType="#//Agent">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.ReqToAgentReqLink->collect(ReqToAgentLink)->asSet()"/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="ReqToAgentReqLink" lowerBound="1"
        upperBound="-1" eType="#//AgentReqLink" eOpposite="#//AgentReqLink/agentReqLinkToReq"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Expectation" eSuperTypes="#//Goal">
    <eAnnotations source="gmf.node">
      <details key="color" value="255,215,0"/>
      <details key="border.color" value="255,215,0"/>
      <details key="size" value="80,50"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="30 70 50 10"/>
      <details key="polygon.y" value="10 10 40 40"/>
      <details key="tool.description" value="Create new Expectation"/>
    </eAnnotations>
    <eOperations name="EA" ordered="false" upperBound="-1" eType="#//Agent">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.expToAgentExpLink->collect(expLinkToAgent)->asSet()"/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="expToAgentExpLink" lowerBound="1"
        upperBound="-1" eType="#//AgentExpLink" eOpposite="#//AgentExpLink/agentExpLinkToExp"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Softgoal" eSuperTypes="#//Goal">
    <eAnnotations source="gmf.node">
      <details key="color" value="50,205,50"/>
      <details key="border.color" value="50,205,50"/>
      <details key="size" value="40,40"/>
      <details key="figure" value="ellipse"/>
      <details key="tool.description" value="Create new Softgoal"/>
    </eAnnotations>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Obstacle" eSuperTypes="#//Nodes">
    <eAnnotations source="gmf.node">
      <details key="color" value="255,140,0"/>
      <details key="border.color" value="255,140,0"/>
      <details key="size" value="80,50"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="10 50 70 30"/>
      <details key="polygon.y" value="10 10 40 40"/>
      <details key="tool.description" value="Create new Obstacle"/>
    </eAnnotations>
    <eOperations name="ILO" ordered="false" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.obstIsParent->isEmpty()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="OP" ordered="false" upperBound="-1" eType="#//Obstacle">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.obstIsRefinement->collect(obstToObstRef)->asSet()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="OR" ordered="false" upperBound="-1" eType="#//Obstacle">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.obstIsParent->collect(obstRefToObst)->asSet()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="OBS" ordered="false" upperBound="-1" eType="#//Goal">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="let s : Set(Goal) = self.solution->collect(obstacleHasSolution)->asSet() in if visited->one(o : Obstacle | o = self) then s else self.OR()->iterate(o : Obstacle ; aux : Set(Goal) = s | aux->union(OBS(visited->including(self)))) endif"/>
      </eAnnotations>
      <eParameters name="visited" ordered="false" upperBound="-1" eType="#//Obstacle"/>
    </eOperations>
    <eOperations name="OAS" ordered="false" upperBound="-1" eType="#//Goal">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="let s : Set(Goal) = self.solution->collect(obstacleHasSolution)->asSet() in if visited->one(o : Obstacle | o = self) then s else self.OP()->iterate(o : Obstacle ; aux : Set(Goal) = s | aux->union(OAS(visited->including(self)))) endif"/>
      </eAnnotations>
      <eParameters name="visited" ordered="false" upperBound="-1" eType="#//Obstacle"/>
    </eOperations>
    <eOperations name="OS" ordered="false" upperBound="-1" eType="#//Goal">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.OBS(Set{})->union(self.OAS(Set{}))"/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="obstacleObstruction" upperBound="-1"
        eType="#//ObstructionLink" eOpposite="#//ObstructionLink/obstacle"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="solution" upperBound="-1"
        eType="#//SolutionLink" eOpposite="#//SolutionLink/obstacleSolution"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="obstIsRefinement" upperBound="-1"
        eType="#//ObstacleRefinement" eOpposite="#//ObstacleRefinement/obstRefToObst"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="obstIsParent" upperBound="-1"
        eType="#//ObstacleRefinement" eOpposite="#//ObstacleRefinement/obstToObstRef"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="DomainProperties" abstract="true" eSuperTypes="#//Nodes">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="formalDef" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="informalDef" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="domPropToGoal" lowerBound="1"
        upperBound="-1" eType="#//DomainPropLink" eOpposite="#//DomainPropLink/goalToDomProp"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="DomainInvariant" eSuperTypes="#//DomainProperties">
    <eAnnotations source="gmf.node">
      <details key="color" value="221,160,221"/>
      <details key="border.color" value="221,160,221"/>
      <details key="size" value="80,50"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="10 40 70 70 10"/>
      <details key="polygon.y" value="20 10 20 40 40"/>
      <details key="tool.description" value="Create new DomainInvariant"/>
    </eAnnotations>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="DomainHyphothesis" eSuperTypes="#//DomainProperties">
    <eAnnotations source="gmf.node">
      <details key="color" value="147,112,219"/>
      <details key="border.color" value="147,112,219"/>
      <details key="size" value="80,50"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="10 40 70 70 10"/>
      <details key="polygon.y" value="20 10 20 40 40"/>
      <details key="tool.description" value="Create new DomainHyphothesis"/>
    </eAnnotations>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Object" abstract="true" eSuperTypes="#//Nodes">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="informalDef" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="objToInhLink" upperBound="-1"
        eType="#//InheritanceLink" eOpposite="#//InheritanceLink/inhLinkToObject"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="otherObjToInhLink" upperBound="-1"
        eType="#//InheritanceLink" eOpposite="#//InheritanceLink/inhLinkToOtherObj"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="objToAggLink" upperBound="-1"
        eType="#//AggregationLink" eOpposite="#//AggregationLink/aggLinkToObject"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="otherObjToAggLink" upperBound="-1"
        eType="#//AggregationLink" eOpposite="#//AggregationLink/aggLinkToOtherObject"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="objToCardLink" upperBound="-1"
        eType="#//CardinalityLink" eOpposite="#//CardinalityLink/cardLinkToObject"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="otherObjToCardLink" upperBound="-1"
        eType="#//CardinalityLink" eOpposite="#//CardinalityLink/cardLinkToOtherObject"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="objIsMonitored" upperBound="-1"
        eType="#//MonitorsLink" eOpposite="#//MonitorsLink/monLinkToObject"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="objIsControlled" upperBound="-1"
        eType="#//ControlsLink" eOpposite="#//ControlsLink/contLinkToObject"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="objectIsConcerned" upperBound="-1"
        eType="#//ConcernsLink" eOpposite="#//ConcernsLink/concernsObject"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Agent" abstract="true" eSuperTypes="#//Object">
    <eOperations name="AG" ordered="false" upperBound="-1" eType="#//Goal">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="if self.oclIsKindOf(EnvironmentAgent) then self.oclAsType(EnvironmentAgent).EAG() else if self.oclIsKindOf(SystemAgent) then self.oclAsType(SystemAgent).SAG() else Set{} endif endif"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="AIG" ordered="false" upperBound="-1" eType="#//Goal">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.AG()->select(g : Goal | not g.ILG())->collect(g : Goal | g.GLG())->asSet()"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="ALG" ordered="false" upperBound="-1" eType="#//Goal">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.AG()->union(self.AIG())->select(g : Goal | g.ILG())"/>
      </eAnnotations>
    </eOperations>
    <eOperations name="ANLG" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.ALG()->size()"/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="agentMonitors" upperBound="-1"
        eType="#//MonitorsLink" eOpposite="#//MonitorsLink/monLinkToAgent"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="agentControls" upperBound="-1"
        eType="#//ControlsLink" eOpposite="#//ControlsLink/contLinkToAgent"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="agentPerforms" upperBound="-1"
        eType="#//PerformsLink" eOpposite="#//PerformsLink/perLinkToAgent"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="SystemAgent" eSuperTypes="#//Agent">
    <eAnnotations source="gmf.node">
      <details key="color" value="255,160,122"/>
      <details key="border.color" value="255,160,122"/>
      <details key="size" value="80,50"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="10 20 60 70 60 20"/>
      <details key="polygon.y" value="25 40 40 25 10 10"/>
      <details key="tool.description" value="Create new SystemAgent"/>
    </eAnnotations>
    <eOperations name="SAG" ordered="false" upperBound="-1" eType="#//Goal">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.agentToReqLink->collect(agentReqLinkToReq)->asSet()"/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="agentToReqLink" lowerBound="1"
        upperBound="-1" eType="#//AgentReqLink" eOpposite="#//AgentReqLink/ReqToAgentLink"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="EnvironmentAgent" eSuperTypes="#//Agent">
    <eAnnotations source="gmf.node">
      <details key="color" value="255,182,193"/>
      <details key="border.color" value="255,182,193"/>
      <details key="size" value="80,50"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="10 20 60 70 60 20"/>
      <details key="polygon.y" value="25 40 40 25 10 10"/>
      <details key="tool.description" value="Create new EnvironmentAgent"/>
    </eAnnotations>
    <eOperations name="EAG" ordered="false" upperBound="-1" eType="#//Goal">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.agentToExpLink->collect(agentExpLinkToExp)->asSet()"/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="agentToExpLink" lowerBound="1"
        upperBound="-1" eType="#//AgentExpLink" eOpposite="#//AgentExpLink/expLinkToAgent"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Event" eSuperTypes="#//Object">
    <eAnnotations source="gmf.node">
      <details key="color" value="189,183,107"/>
      <details key="border.color" value="189,183,107"/>
      <details key="size" value="80,50"/>
      <details key="figure" value="polygon"/>
      <details key="polygon.x" value="10 10 60 70 60"/>
      <details key="polygon.y" value="10 40 40 25 10"/>
      <details key="tool.description" value="Create new Event"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="frequency" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Entity" eSuperTypes="#//Object">
    <eAnnotations source="gmf.node">
      <details key="color" value="143,188,143"/>
      <details key="border.color" value="143,188,143"/>
      <details key="size" value="60,30"/>
      <details key="figure" value="rectangle"/>
      <details key="tool.description" value="Create new Entity"/>
    </eAnnotations>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Relationship" eSuperTypes="#//Object">
    <eAnnotations source="gmf.link">
      <details key="label" value="name"/>
      <details key="source" value="relationConnObject"/>
      <details key="target" value="objectIsConnByRelation"/>
      <details key="color" value="255,127,80"/>
      <details key="target.decoration" value="arrow"/>
      <details key="width" value="2"/>
      <details key="tool.description" value="Create new Relationship between two Objects"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="relationConnObject" lowerBound="1"
        eType="#//Object"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="objectIsConnByRelation"
        lowerBound="1" eType="#//Object"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="OperationNode" eSuperTypes="#//Nodes">
    <eAnnotations source="gmf.node">
      <details key="color" value="211,211,211"/>
      <details key="border.color" value="211,211,211"/>
      <details key="size" value="60,30"/>
      <details key="figure" value="ellipse"/>
      <details key="tool.description" value="Create new OperationNode"/>
    </eAnnotations>
    <eOperations name="OpNA" ordered="false" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EIntegerObject">
      <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
        <details key="body" value="self.operationIsPerformed->collect(perLinkToAgent)->size()"/>
      </eAnnotations>
    </eOperations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="operationNodeToOperatLink"
        upperBound="-1" eType="#//OperationalizationLink" eOpposite="#//OperationalizationLink/operatLinkToOperationNode"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="operationIsPerformed" upperBound="-1"
        eType="#//PerformsLink" eOpposite="#//PerformsLink/perLinkToOperationNode"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="Links" abstract="true">
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="TransformationSource" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Source" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
    <eStructuralFeatures xsi:type="ecore:EAttribute" name="Target" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="OrRefinement" eSuperTypes="#//Links">
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
      <details key="constraints" value="linkToHimself"/>
    </eAnnotations>
    <eAnnotations source="gmf.link">
      <details key="source" value="orRefToGoal"/>
      <details key="target" value="orRefToOtherGoal"/>
      <details key="color" value="0,0,255"/>
      <details key="target.decoration" value="arrow"/>
      <details key="width" value="2"/>
      <details key="style" value="dash"/>
      <details key="tool.description" value="Create new OrRefinement between Goal, Requirement or Expectation"/>
    </eAnnotations>
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
      <details key="linkToHimself" value="orRefToGoal &lt;> orRefToOtherGoal"/>
      <details key="linkToHimself$message" value="'Goal ' + orRefToGoal.name + ' can not be a refinement of himself.'"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="orRefToGoal" lowerBound="1"
        eType="#//Goal" eOpposite="#//Goal/goalIsOrRef"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="orRefToOtherGoal" lowerBound="1"
        eType="#//Goal" eOpposite="#//Goal/otherGoalIsOrRef"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="AndRefinement" eSuperTypes="#//Links">
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
      <details key="constraints" value="linkToHimself"/>
    </eAnnotations>
    <eAnnotations source="gmf.link">
      <details key="source" value="andRefToGoal"/>
      <details key="target" value="andRefToOtherGoal"/>
      <details key="color" value="0,0,255"/>
      <details key="target.decoration" value="arrow"/>
      <details key="width" value="2"/>
      <details key="tool.description" value="Create new AndRefinement between Goal, Requirement or Expectation"/>
    </eAnnotations>
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
      <details key="linkToHimself" value="andRefToGoal &lt;> andRefToOtherGoal"/>
      <details key="linkToHimself$message" value="'Goal ' + andRefToGoal.name + ' can not be a refinement of himself.'"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="andRefToGoal" lowerBound="1"
        eType="#//Goal" eOpposite="#//Goal/goalIsAndRef"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="andRefToOtherGoal" lowerBound="1"
        eType="#//Goal" eOpposite="#//Goal/otherGoalIsAndRef"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ObstacleRefinement" eSuperTypes="#//Links">
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
      <details key="constraints" value="linkToHimself"/>
    </eAnnotations>
    <eAnnotations source="gmf.link">
      <details key="source" value="obstRefToObst"/>
      <details key="target" value="obstToObstRef"/>
      <details key="color" value="255,140,0"/>
      <details key="target.decoration" value="arrow"/>
      <details key="width" value="2"/>
      <details key="tool.description" value="Create new ObstacleRefinement between Obstacles"/>
    </eAnnotations>
    <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
      <details key="linkToHimself" value="obstRefToObst &lt;> obstToObstRef"/>
      <details key="linkToHimself$message" value="'Obstacle ' + obstRefToObst.name + ' can not be a refinement of himself.'"/>
    </eAnnotations>
    <eStructuralFeatures xsi:type="ecore:EReference" name="obstRefToObst" lowerBound="1"
        eType="#//Obstacle" eOpposite="#//Obstacle/obstIsRefinement"/>
    <eStructuralFeatures xsi:type="ecore:EReference" name="obstToObstRef" lowerBound="1"
        eType="#//Obstacle" eOpposite="#//Obstacle/obstIsParent"/>
  </eClassifiers>
  <eClassifiers xsi:type="ecore:EClass" name="ObstructionLink" eSuperTypes="#//Links">
    <eAnn


[Updated on: Thu, 09 February 2012 23:07]

Report message to a moderator

Re: [OCLInEcore] Cannot find operation [message #795481 is a reply to message #794897] Fri, 10 February 2012 14:15 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I suggest attaching the file rather than pasting it in line. Perhaps
raise a Bugzilla and attach it to the Bugzilla.

This may avoid the line length limit that truncated your file. It also
avoids mail tools improving the file at line wraps, http references etc.

Regards

Ed Willink

On 09/02/2012 20:54, Patricia Espada wrote:
> Hi,
> I'm sorry I though you said EMF file. Here it is the Ecore file:
>
> <eStructuralFeatures xsi:type="ecore:EReference" name="obstRefToObst"
> lowerBound="1"
> eType="#//Obstacle" eOpposite="#//Obstacle/obstIsRefinement"/>
> <eStructuralFeatures xsi:type="ecore:EReference" name="obstToObstRef"
> lowerBound="1"
> eType="#//Obstacle" eOpposite="#//Obstacle/obstIsParent"/>
> </eClassifiers>
> <eClassifiers xsi:type="ecore:EClass" name="ObstructionLink"
> eSuperTypes="#//Links">
> <eAnn
Re: [OCLInEcore] Cannot find operation [message #795564 is a reply to message #795481] Fri, 10 February 2012 16:03 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi,
You're right, I didn't notice. I don't know exactly how to work with bugzilla, so I just attach the file. Hope this time it's ok.
  • Attachment: KAOS.ecore
    (Size: 61.79KB, Downloaded 287 times)
Re: [OCLInEcore] Cannot find operation [message #795977 is a reply to message #795564] Sat, 11 February 2012 07:05 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Patricia

Thanks. Your attachment gives me a reproducible problem; in the OCL
Console, the non-pivot version works and the pivot version doesn't.
This problem https://bugs.eclipse.org/bugs/show_bug.cgi?id=360072 for
which the fix just missed Indigo SR1. It's in SR2 which is currently at
RC3 and reaches General Availability on 24-Feb.

You can install an OCL SR2 RC3 update by downloading
http://www.eclipse.org/modeling/download.php?file=/modeling/mdt/ocl/downloads/drops/3.1.0/M201202060606/mdt-ocl-Update-3.1.2RC3.zip
and then dropping it on Install New Software or update from
http://download.eclipse.org/modeling/mdt/ocl/updates/maintenance.

However your earlier messages had signatures involving EBigInteger which
are not in your attached KAOS.ecore, and your original stack trace
suggested a parsing rather than evaluation failure. So I'm not sure if
there is another problem or not.

Anyway Bug 360072 was specifically about Pivot/non-Pivot delegate
co-existence so hopefully it fixes your original problem too.

Regards

Ed Willink


On 10/02/2012 16:03, Patricia Espada wrote:
> Hi,
> You're right, I didn't notice. I don't know exactly how to work with bugzilla, so I just attach the file. Hope this time it's ok.
Re: [OCLInEcore] Cannot find operation [message #796161 is a reply to message #795564] Sat, 11 February 2012 14:18 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi,
I'm already using OCL SR2 RC3. And in fact if I simply create a Dynamic Instance and run OCL Console, the operations that I defined in the ecore are not available (this probably should work? taking into account this tutorial http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.ocl.doc%2Fhelp%2FTutorials.html in the "Helper Features and Operations" section).
Should I try the OCL SR2 RC3 in the Eclipse Juno? Maybe is there a problem in the Indigo version.

In https://bugs.eclipse.org/bugs/show_bug.cgi?id=360072 they say that if we change from OCL/Pivot to OCL it all works fine. I've tried that and it still doesn't work.
Could this be a incompatibility between plugins that is messing with this?! When you've tried my example you use a new eclipse installation?

Best regards,
Re: [OCLInEcore] Cannot find operation [message #796257 is a reply to message #796161] Sat, 11 February 2012 18:04 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

I was using an Indigo SR1 version to reproduce your problem, and
verified with SR2 RC3 that the problem went away. However it was not a
fresh SR1, so it may have evolved since I created it.

If you still have a problem, I recommend installing the Eclipse Modeling
SR2 RC3 EPP from
http://www.eclipse.org/downloads/index-developer.php?release=indigo.

The basic EPP should have OCL (but no examples). You do not need the
examples to execute the 'Pivot' delegate URI on the non-Pivot evaluator.

With a fresh install and clear instructions on how you reproduce the
problems, maybe I can too.

I was just evaluating Test1() in the OCL Console to reproduce the bug
fixed in 360072.

Regards

Ed Willink



On 11/02/2012 14:18, Patricia Espada wrote:
> Hi,
> I'm already using OCL SR2 RC3. And in fact if I simply create a
> Dynamic Instance and run OCL Console, the operations that I defined in
> the ecore are not available (this probably should work? taking into
> account this tutorial
> http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.ocl.doc%2Fhelp%2FTutorials.html
> in the "Helper Features and Operations" section).
> Should I try the OCL SR2 RC3 in the Eclipse Juno? Maybe is there a
> problem in the Indigo version.
>
> In https://bugs.eclipse.org/bugs/show_bug.cgi?id=360072 they say that
> if we change from OCL/Pivot to OCL it all works fine. I've tried that
> and it still doesn't work.
> Could this be a incompatibility between plugins that is messing with
> this?! When you've tried my example you use a new eclipse installation?
>
> Best regards,
Re: [OCLInEcore] Cannot find operation [message #797642 is a reply to message #796257] Mon, 13 February 2012 18:40 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi,
I've installed the Eclipse Modeling SR2 RC3 EPP from the link you've send me, and add the GMF plugin, Emfatic and Epsilon interim version. Now I can call the operations I had defined in the ecore in the OCLConsole. The problem now is when I try to create the GMF editor I get new error's:

Description	Resource	Path	Location	Type
T_KAOS_ecore__KAOSStandard__Goal cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
IP_OrRefinement_orRefToGoal cannot be resolved	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
valueFactory cannot be resolved	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
The constructor ExecutorOperation(String, EcoreExecutorType, int, KAOSBodies._union_body_, EcoreExecutorType, EcoreExecutorType) is undefined	KAOSStandardTables.java	/Test/src/KAOSStandard	line 486	Java Problem
P_Nodes_name cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
valueFactory cannot be resolved	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
_EIntegerObject cannot be resolved or is not a field	KAOSStandardTables.java	/Test/src/KAOSStandard	line 483	Java Problem
S_Goal_ cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
S_Goal_ cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
standardLibrary cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
O_String__add_ cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
standardLibrary cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
P_OrRefinement_orRefToGoal cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
_EIntegerObject cannot be resolved or is not a field	KAOSStandardTables.java	/Test/src/KAOSStandard	line 429	Java Problem
T_KAOS_ecore__KAOSStandard__Goal cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
P_Conflict_conflictBtwnGoals cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
_EBooleanObject cannot be resolved or is not a field	KAOSStandardTables.java	/Test/src/KAOSStandard	line 407	Java Problem
IP_Nodes_name cannot be resolved	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
T_String cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
_EIntegerObject cannot be resolved or is not a field	KAOSStandardTables.java	/Test/src/KAOSStandard	line 468	Java Problem
IP_Nodes_name cannot be resolved	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
P_Nodes_name cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
_EIntegerObject cannot be resolved or is not a field	KAOSStandardTables.java	/Test/src/KAOSStandard	line 445	Java Problem
T_String cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
O_String__add_ cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
T_String cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
S__can_not___ cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
IP_Conflict_conflictBtwnGoals cannot be resolved	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
T_String cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
S_Goal_ cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
valueFactory cannot be resolved	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 79	Java Problem
standardLibrary cannot be resolved to a variable	OrRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
valueFactory cannot be resolved	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 79	Java Problem
S_Goal_ cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
T_String cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
O_String__add_ cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
S__can_not___ cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
T_String cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
O_String__add_ cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
standardLibrary cannot be resolved to a variable	ConflictBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
_TT cannot be resolved or is not a field	KAOSImpl.java	/Test/src/KAOSStandard/impl	line 253	Java Problem
IP_ObstacleRefinement_obstRefToObst cannot be resolved	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
T_KAOS_ecore__KAOSStandard__Obstacle cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
valueFactory cannot be resolved	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
S_Obstacle___ cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
standardLibrary cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
O_String__add_ cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
P_ObstacleRefinement_obstRefToObst cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
IP_Nodes_name cannot be resolved	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
T_String cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
P_Nodes_name cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
T_String cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
O_String__add_ cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
S__can_not___ cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
S_Obstacle___ cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
T_String cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
standardLibrary cannot be resolved to a variable	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
valueFactory cannot be resolved	ObstacleRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 79	Java Problem
standardLibrary cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
S_Object_ cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
T_String cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
O_String__add_ cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
valueFactory cannot be resolved	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 79	Java Problem
S_Object_ cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
O_String__add_ cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
standardLibrary cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
IP_InheritanceLink_inhLinkToObject cannot be resolved	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
P_InheritanceLink_inhLinkToObject cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
T_KAOS_ecore__KAOSStandard__Object cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
T_String cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
IP_Nodes_name cannot be resolved	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
valueFactory cannot be resolved	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
P_Nodes_name cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
T_String cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
S__can_not___ cannot be resolved to a variable	InheritanceLinkBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
S_Object_ cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
valueFactory cannot be resolved	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
P_Nodes_name cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
T_String cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
IP_Nodes_name cannot be resolved	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
P_AggregationLink_aggLinkToObject cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
T_KAOS_ecore__KAOSStandard__Object cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
IP_AggregationLink_aggLinkToObject cannot be resolved	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
T_String cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
O_String__add_ cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
standardLibrary cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
valueFactory cannot be resolved	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 79	Java Problem
S_Object_ cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
T_String cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
O_String__add_ cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
standardLibrary cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
AbstractOperation cannot be resolved to a type	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 1236	Java Problem
The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...) in the type LibraryOperation is not applicable for the arguments (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value, IntegerValue)	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 570	Java Problem
The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...) in the type LibraryOperation is not applicable for the arguments (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value, Value)	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 490	Java Problem
The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...) in the type LibraryOperation is not applicable for the arguments (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value, Value)	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 345	Java Problem
AbstractOperation cannot be resolved to a type	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 178	Java Problem
The import AbstractTernaryOperation cannot be resolved	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 13	Java Problem
The import AbstractOperation cannot be resolved	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 12	Java Problem
valueFactory cannot be resolved	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 79	Java Problem
standardLibrary cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
O_String__add_ cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 80	Java Problem
T_String cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
standardLibrary cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
O_String__add_ cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 77	Java Problem
T_String cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
S_Goal_ cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 78	Java Problem
The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...) in the type LibraryOperation is not applicable for the arguments (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value, Value)	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 2518	Java Problem
AbstractTernaryOperation cannot be resolved to a type	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 2944	Java Problem
The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...) in the type LibraryOperation is not applicable for the arguments (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value, Value)	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 1323	Java Problem
S__can_not___ cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...) in the type LibraryOperation is not applicable for the arguments (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value, Value)	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 1343	Java Problem
AbstractOperation cannot be resolved to a type	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 2337	Java Problem
The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...) in the type LibraryOperation is not applicable for the arguments (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value, Value)	KAOSBodies.java	/Test/src/KAOSStandard/bodies	line 2453	Java Problem
S__can_not___ cannot be resolved to a variable	AggregationLinkBodies.java	/Test/src/KAOSStandard/bodies	line 81	Java Problem
P_Nodes_name cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
T_String cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
S_Goal_ cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
valueFactory cannot be resolved	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 76	Java Problem
T_KAOS_ecore__KAOSStandard__Goal cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
IP_AndRefinement_andRefToGoal cannot be resolved	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem
IP_Nodes_name cannot be resolved	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 74	Java Problem
P_AndRefinement_andRefToGoal cannot be resolved to a variable	AndRefinementBodies.java	/Test/src/KAOSStandard/bodies	line 72	Java Problem

With this I cannot see if in this installation the GMF editor accepts the call of operations with arguments in the Metric Rule.

Because I couldn't figure the solution to the above problem, I've tried with a brand new installation of the Eclipse Indigo SR1 3.7.1. There a add the GMF plugin, OCL SR2 RC3 (from the link you send me), Emfatic, and Epsilon interim version. In this new installation I manage to get the operations working in the OCLConsole. With that working I generate the GMF editor and add a Metric Rule that calls the Test operation. I run a new eclipse instance and when ask to show the metrics (in Edit->Metrics) the same error is throw: Cannot find operation (Test(Integer)) for the type (KAOS). I've tried change from OCL/Pivot to OCL but I didn't work either.

Best regards,
Re: [OCLInEcore] Cannot find operation [message #797649 is a reply to message #797642] Mon, 13 February 2012 18:49 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The Bodies are produced by the new direct OCL to Java code generator.

We don't want this extra confusion while debugging your current problem
so insert

<genAnnotations source="http://www.eclipse.org/OCL/GenModel">
<details key="Use Delegates" value="true"/>
</genAnnotations>

just before

<foreignModel>...</foreignModel>
<genPackages prefix="...

to disable it in your genmodel. Then re-genmodel, and for good measure
delete the "bodies" package, and ...Tables.java file.

Regards

Ed


On 13/02/2012 18:41, Patricia Espada wrote:
> Hi,
> I've installed the Eclipse Modeling SR2 RC3 EPP from the link you've
> send me, and add the GMF plugin, Emfatic and Epsilon interim version.
> Now I can call the operations I had defined in the ecore in the
> OCLConsole. The problem now is when I try to create the GMF editor I
> get new error's:
>
> Description Resource Path Location Type
> T_KAOS_ecore__KAOSStandard__Goal cannot be resolved to a variable
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 72
> Java Problem
> IP_OrRefinement_orRefToGoal cannot be resolved
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 72
> Java Problem
> valueFactory cannot be resolved OrRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 76 Java Problem
> The constructor ExecutorOperation(String, EcoreExecutorType, int,
> KAOSBodies._union_body_, EcoreExecutorType, EcoreExecutorType) is
> undefined KAOSStandardTables.java /Test/src/KAOSStandard line
> 486 Java Problem
> P_Nodes_name cannot be resolved to a variable
> ConflictBodies.java /Test/src/KAOSStandard/bodies line 74
> Java Problem
> valueFactory cannot be resolved ConflictBodies.java
> /Test/src/KAOSStandard/bodies line 76 Java Problem
> _EIntegerObject cannot be resolved or is not a field
> KAOSStandardTables.java /Test/src/KAOSStandard line 483 Java
> Problem
> S_Goal_ cannot be resolved to a variable OrRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 76 Java Problem
> S_Goal_ cannot be resolved to a variable ConflictBodies.java
> /Test/src/KAOSStandard/bodies line 76 Java Problem
> standardLibrary cannot be resolved to a variable
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 77
> Java Problem
> O_String__add_ cannot be resolved to a variable
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 77
> Java Problem
> standardLibrary cannot be resolved to a variable
> ConflictBodies.java /Test/src/KAOSStandard/bodies line 77
> Java Problem
> P_OrRefinement_orRefToGoal cannot be resolved to a variable
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 72
> Java Problem
> _EIntegerObject cannot be resolved or is not a field
> KAOSStandardTables.java /Test/src/KAOSStandard line 429 Java
> Problem
> T_KAOS_ecore__KAOSStandard__Goal cannot be resolved to a variable
> ConflictBodies.java /Test/src/KAOSStandard/bodies line 72
> Java Problem
> P_Conflict_conflictBtwnGoals cannot be resolved to a variable
> ConflictBodies.java /Test/src/KAOSStandard/bodies line 72
> Java Problem
> _EBooleanObject cannot be resolved or is not a field
> KAOSStandardTables.java /Test/src/KAOSStandard line 407 Java
> Problem
> IP_Nodes_name cannot be resolved OrRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 74 Java Problem
> T_String cannot be resolved to a variable
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 74
> Java Problem
> _EIntegerObject cannot be resolved or is not a field
> KAOSStandardTables.java /Test/src/KAOSStandard line 468 Java
> Problem
> IP_Nodes_name cannot be resolved ConflictBodies.java
> /Test/src/KAOSStandard/bodies line 74 Java Problem
> P_Nodes_name cannot be resolved to a variable
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 74
> Java Problem
> _EIntegerObject cannot be resolved or is not a field
> KAOSStandardTables.java /Test/src/KAOSStandard line 445 Java
> Problem
> T_String cannot be resolved to a variable ConflictBodies.java
> /Test/src/KAOSStandard/bodies line 74 Java Problem
> O_String__add_ cannot be resolved to a variable
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 80
> Java Problem
> T_String cannot be resolved to a variable
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 81
> Java Problem
> S__can_not___ cannot be resolved to a variable
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 81
> Java Problem
> IP_Conflict_conflictBtwnGoals cannot be resolved
> ConflictBodies.java /Test/src/KAOSStandard/bodies line 72
> Java Problem
> T_String cannot be resolved to a variable
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 78
> Java Problem
> S_Goal_ cannot be resolved to a variable OrRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 78 Java Problem
> valueFactory cannot be resolved OrRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 79 Java Problem
> standardLibrary cannot be resolved to a variable
> OrRefinementBodies.java /Test/src/KAOSStandard/bodies line 80
> Java Problem
> valueFactory cannot be resolved ConflictBodies.java
> /Test/src/KAOSStandard/bodies line 79 Java Problem
> S_Goal_ cannot be resolved to a variable ConflictBodies.java
> /Test/src/KAOSStandard/bodies line 78 Java Problem
> T_String cannot be resolved to a variable ConflictBodies.java
> /Test/src/KAOSStandard/bodies line 78 Java Problem
> O_String__add_ cannot be resolved to a variable
> ConflictBodies.java /Test/src/KAOSStandard/bodies line 77
> Java Problem
> S__can_not___ cannot be resolved to a variable
> ConflictBodies.java /Test/src/KAOSStandard/bodies line 81
> Java Problem
> T_String cannot be resolved to a variable ConflictBodies.java
> /Test/src/KAOSStandard/bodies line 81 Java Problem
> O_String__add_ cannot be resolved to a variable
> ConflictBodies.java /Test/src/KAOSStandard/bodies line 80
> Java Problem
> standardLibrary cannot be resolved to a variable
> ConflictBodies.java /Test/src/KAOSStandard/bodies line 80
> Java Problem
> _TT cannot be resolved or is not a field KAOSImpl.java
> /Test/src/KAOSStandard/impl line 253 Java Problem
> IP_ObstacleRefinement_obstRefToObst cannot be resolved
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 72 Java Problem
> T_KAOS_ecore__KAOSStandard__Obstacle cannot be resolved to a
> variable ObstacleRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 72 Java Problem
> valueFactory cannot be resolved ObstacleRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 76 Java Problem
> S_Obstacle___ cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 76 Java Problem
> standardLibrary cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 77 Java Problem
> O_String__add_ cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 77 Java Problem
> P_ObstacleRefinement_obstRefToObst cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 72 Java Problem
> IP_Nodes_name cannot be resolved ObstacleRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 74 Java Problem
> T_String cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 74 Java Problem
> P_Nodes_name cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 74 Java Problem
> T_String cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 81 Java Problem
> O_String__add_ cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 80 Java Problem
> S__can_not___ cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 81 Java Problem
> S_Obstacle___ cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 78 Java Problem
> T_String cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 78 Java Problem
> standardLibrary cannot be resolved to a variable
> ObstacleRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 80 Java Problem
> valueFactory cannot be resolved ObstacleRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 79 Java Problem
> standardLibrary cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 77 Java Problem
> S_Object_ cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 76 Java Problem
> T_String cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 78 Java Problem
> O_String__add_ cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 77 Java Problem
> valueFactory cannot be resolved InheritanceLinkBodies.java
> /Test/src/KAOSStandard/bodies line 79 Java Problem
> S_Object_ cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 78 Java Problem
> O_String__add_ cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 80 Java Problem
> standardLibrary cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 80 Java Problem
> IP_InheritanceLink_inhLinkToObject cannot be resolved
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 72 Java Problem
> P_InheritanceLink_inhLinkToObject cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 72 Java Problem
> T_KAOS_ecore__KAOSStandard__Object cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 72 Java Problem
> T_String cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 74 Java Problem
> IP_Nodes_name cannot be resolved InheritanceLinkBodies.java
> /Test/src/KAOSStandard/bodies line 74 Java Problem
> valueFactory cannot be resolved InheritanceLinkBodies.java
> /Test/src/KAOSStandard/bodies line 76 Java Problem
> P_Nodes_name cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 74 Java Problem
> T_String cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 81 Java Problem
> S__can_not___ cannot be resolved to a variable
> InheritanceLinkBodies.java /Test/src/KAOSStandard/bodies line
> 81 Java Problem
> S_Object_ cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 76 Java Problem
> valueFactory cannot be resolved AggregationLinkBodies.java
> /Test/src/KAOSStandard/bodies line 76 Java Problem
> P_Nodes_name cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 74 Java Problem
> T_String cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 74 Java Problem
> IP_Nodes_name cannot be resolved AggregationLinkBodies.java
> /Test/src/KAOSStandard/bodies line 74 Java Problem
> P_AggregationLink_aggLinkToObject cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 72 Java Problem
> T_KAOS_ecore__KAOSStandard__Object cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 72 Java Problem
> IP_AggregationLink_aggLinkToObject cannot be resolved
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 72 Java Problem
> T_String cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 81 Java Problem
> O_String__add_ cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 80 Java Problem
> standardLibrary cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 80 Java Problem
> valueFactory cannot be resolved AggregationLinkBodies.java
> /Test/src/KAOSStandard/bodies line 79 Java Problem
> S_Object_ cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 78 Java Problem
> T_String cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 78 Java Problem
> O_String__add_ cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 77 Java Problem
> standardLibrary cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 77 Java Problem
> AbstractOperation cannot be resolved to a type KAOSBodies.java
> /Test/src/KAOSStandard/bodies line 1236 Java Problem
> The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...)
> in the type LibraryOperation is not applicable for the arguments
> (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value,
> IntegerValue) KAOSBodies.java /Test/src/KAOSStandard/bodies
> line 570 Java Problem
> The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...)
> in the type LibraryOperation is not applicable for the arguments
> (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value,
> Value) KAOSBodies.java /Test/src/KAOSStandard/bodies line
> 490 Java Problem
> The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...)
> in the type LibraryOperation is not applicable for the arguments
> (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value,
> Value) KAOSBodies.java /Test/src/KAOSStandard/bodies line
> 345 Java Problem
> AbstractOperation cannot be resolved to a type KAOSBodies.java
> /Test/src/KAOSStandard/bodies line 178 Java Problem
> The import AbstractTernaryOperation cannot be resolved
> KAOSBodies.java /Test/src/KAOSStandard/bodies line 13 Java
> Problem
> The import AbstractOperation cannot be resolved KAOSBodies.java
> /Test/src/KAOSStandard/bodies line 12 Java Problem
> valueFactory cannot be resolved AndRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 79 Java Problem
> standardLibrary cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 80 Java Problem
> O_String__add_ cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 80 Java Problem
> T_String cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 81 Java Problem
> standardLibrary cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 77 Java Problem
> O_String__add_ cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 77 Java Problem
> T_String cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 78 Java Problem
> S_Goal_ cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 78 Java Problem
> The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...)
> in the type LibraryOperation is not applicable for the arguments
> (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value,
> Value) KAOSBodies.java /Test/src/KAOSStandard/bodies line
> 2518 Java Problem
> AbstractTernaryOperation cannot be resolved to a type
> KAOSBodies.java /Test/src/KAOSStandard/bodies line 2944 Java
> Problem
> The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...)
> in the type LibraryOperation is not applicable for the arguments
> (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value,
> Value) KAOSBodies.java /Test/src/KAOSStandard/bodies line
> 1323 Java Problem
> S__can_not___ cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 81 Java Problem
> The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...)
> in the type LibraryOperation is not applicable for the arguments
> (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value,
> Value) KAOSBodies.java /Test/src/KAOSStandard/bodies line
> 1343 Java Problem
> AbstractOperation cannot be resolved to a type KAOSBodies.java
> /Test/src/KAOSStandard/bodies line 2337 Java Problem
> The method evaluate(DomainEvaluator, DomainCallExp, Value, Value...)
> in the type LibraryOperation is not applicable for the arguments
> (DomainEvaluator, DomainCollectionType, Value, Value, Value, Value,
> Value) KAOSBodies.java /Test/src/KAOSStandard/bodies line
> 2453 Java Problem
> S__can_not___ cannot be resolved to a variable
> AggregationLinkBodies.java /Test/src/KAOSStandard/bodies line
> 81 Java Problem
> P_Nodes_name cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 74 Java Problem
> T_String cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 74 Java Problem
> S_Goal_ cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 76 Java Problem
> valueFactory cannot be resolved AndRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 76 Java Problem
> T_KAOS_ecore__KAOSStandard__Goal cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 72 Java Problem
> IP_AndRefinement_andRefToGoal cannot be resolved
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 72 Java Problem
> IP_Nodes_name cannot be resolved AndRefinementBodies.java
> /Test/src/KAOSStandard/bodies line 74 Java Problem
> P_AndRefinement_andRefToGoal cannot be resolved to a variable
> AndRefinementBodies.java /Test/src/KAOSStandard/bodies line
> 72 Java Problem
>
> With this I cannot see if in this installation the GMF editor accepts
> the call of operations with arguments in the Metric Rule.
>
> Because I couldn't figure the solution to the above problem, I've
> tried with a brand new installation of the Eclipse Indigo SR1 3.7.1.
> There a add the GMF plugin, OCL SR2 RC3 (from the link you send me),
> Emfatic, and Epsilon interim version. In this new installation I
> manage to get the operations working in the OCLConsole. With that
> working I generate the GMF editor and add a Metric Rule that calls the
> Test operation. I run a new eclipse instance and when ask to show the
> metrics (in Edit->Metrics) the same error is throw: Cannot find
> operation (Test(Integer)) for the type (KAOS). I've tried change from
> OCL/Pivot to OCL but I didn't work either.
>
> Best regards,
Re: [OCLInEcore] Cannot find operation [message #799235 is a reply to message #797649] Wed, 15 February 2012 16:31 Go to previous messageGo to next message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi,
Thank you Edward, that worked, now the metrics work just fine in the GMF editor. On the other hand, when I run a new eclipse instance with the GMF editor, these errors are throw:

java.lang.Exception: fill(MToolBar container, IContributionManager manager) with rogue contribution manager: org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.AbstractContributionItemProvider$PluginMenuManager@1d64969
	at org.eclipse.ui.internal.CoolBarToTrimManager.fill(CoolBarToTrimManager.java:628)
	at org.eclipse.ui.internal.CoolBarToTrimManager.update(CoolBarToTrimManager.java:599)
	at org.eclipse.ui.internal.WorkbenchWindow.updateActionBars(WorkbenchWindow.java:1784)
	at org.eclipse.ui.internal.WWinActionBars.updateActionBars(WWinActionBars.java:113)
	at org.eclipse.ui.SubActionBars.updateActionBars(SubActionBars.java:611)
	at org.eclipse.ui.internal.e4.compatibility.ActionBars.updateActionBars(ActionBars.java:113)
	at org.eclipse.ui.navigator.NavigatorActionService.fillActionBars(NavigatorActionService.java:266)
	at org.eclipse.ui.navigator.CommonNavigatorManager$2.run(CommonNavigatorManager.java:92)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
	at org.eclipse.ui.navigator.CommonNavigatorManager$UpdateActionBarsJob.runInUIThread(CommonNavigatorManager.java:87)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3945)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3622)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:999)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:893)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:85)
	at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:579)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:534)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:352)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1409)


Do you know why this is happening?

Best regards,
Re: [OCLInEcore] Cannot find operation [message #799260 is a reply to message #799235] Wed, 15 February 2012 17:03 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi Patricia

At last you're past the OCL issues. I'm afraid your new problem has no
hint of any OCL routines; it looks to be all GUI related, so I cannot
offer much help.

I notice a few "e4" packages; so you're probably using 4.2M5 rather than
3.8M5. Generally the e4 compatibility is extremely good, but just
possibly you've found a problem that needs attention.

The GMT tooling team has come back to life so you might see if they can
help.

Regards

Ed Willink

On 15/02/2012 16:31, Patricia Espada wrote:
> Hi,
> Thank you Edward, that worked, now the metrics work just fine in the
> GMF editor. On the other hand, when I run a new eclipse instance with
> the GMF editor, these errors are throw:
>
>
> java.lang.Exception: fill(MToolBar container, IContributionManager
> manager) with rogue contribution manager:
> org.eclipse.gmf.runtime.common.ui.services.action.contributionitem.AbstractContributionItemProvider$PluginMenuManager@1d64969
> at
> org.eclipse.ui.internal.CoolBarToTrimManager.fill(CoolBarToTrimManager.java:628)
> at
> org.eclipse.ui.internal.CoolBarToTrimManager.update(CoolBarToTrimManager.java:599)
> at
> org.eclipse.ui.internal.WorkbenchWindow.updateActionBars(WorkbenchWindow.java:1784)
> at
> org.eclipse.ui.internal.WWinActionBars.updateActionBars(WWinActionBars.java:113)
> at
> org.eclipse.ui.SubActionBars.updateActionBars(SubActionBars.java:611)
> at
> org.eclipse.ui.internal.e4.compatibility.ActionBars.updateActionBars(ActionBars.java:113)
> at
> org.eclipse.ui.navigator.NavigatorActionService.fillActionBars(NavigatorActionService.java:266)
> at
> org.eclipse.ui.navigator.CommonNavigatorManager$2.run(CommonNavigatorManager.java:92)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
> at
> org.eclipse.ui.navigator.CommonNavigatorManager$UpdateActionBarsJob.runInUIThread(CommonNavigatorManager.java:87)
> at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:95)
> at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
> at
> org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
> at
> org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3945)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3622)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:999)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at
> org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:893)
> at
> org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:85)
> at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:579)
> at
> org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:534)
> at
> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
> at
> org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:352)
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:624)
> at org.eclipse.equinox.launcher.Main.basicRun(Main.java:579)
> at org.eclipse.equinox.launcher.Main.run(Main.java:1433)
> at org.eclipse.equinox.launcher.Main.main(Main.java:1409)
>
>
> Do you know why this is happening?
>
> Best regards,
Re: [OCLInEcore] Cannot find operation [message #799308 is a reply to message #799260] Wed, 15 February 2012 18:21 Go to previous message
Patricia Espada is currently offline Patricia EspadaFriend
Messages: 47
Registered: November 2011
Member
Hi,
I will put this problem in the GMF forum then. Thank you for your help.

Best regards,
Previous Topic:Problem with Xtext based OCL and accessing inherited properties
Next Topic:simple problem from a beginner (Solved)
Goto Forum:
  


Current Time: Fri Apr 19 11:15:24 GMT 2024

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

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

Back to the top