Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Multiple contexts: ERROR in (classifierContextDeclCS): (Variable name already used: (self))
Multiple contexts: ERROR in (classifierContextDeclCS): (Variable name already used: (self)) [message #9488] Wed, 28 February 2007 18:30 Go to next message
Markus Bauer is currently offline Markus Bauer
Messages: 11
Registered: July 2009
Junior Member
Hello,

I am trying to make my first OCL constraints using MDT OCL 1.1M5.

But when I parse the following OCL file:

package emof
context Package
inv inv_true: true
context Class
inv inv_false: false
endpackage


I get the following exception:

Exception in thread "main" org.eclipse.ocl.SemanticException: ERROR in
(classifierContextDeclCS): (Variable name already used: (self))
at org.eclipse.ocl.internal.parser.OCLParser.ERR(OCLParser.java :590)
at org.eclipse.ocl.internal.parser.OCLParser.ERROR(OCLParser.ja va:599)
at
org.eclipse.ocl.internal.parser.OCLParser.genVariableDeclara tion(OCLParser.java:627)
at
org.eclipse.ocl.internal.parser.OCLParser.classifierContextD eclCS(OCLParser.java:1509)
at
org.eclipse.ocl.internal.parser.OCLParser.contextDeclCS(OCLP arser.java:1058)
at
org.eclipse.ocl.internal.parser.OCLParser.packageDeclaration CS(OCLParser.java:1035)
at
org.eclipse.ocl.internal.parser.OCLParser.parsePackageDeclar ationCS(OCLParser.java:765)
at org.eclipse.ocl.OCL.parse(OCL.java:243)
at validation.OclValidator.loadOclConstraints(OclValidator.java :194)
at tests.validation.Test.main(Test.java:59)


Is it not possible to define multiple contexts in a package? What am I
doing wrong here?

Thanks,
Markus
Re: Multiple contexts: ERROR in (classifierContextDeclCS): (Variable name already used: (self)) [message #11313 is a reply to message #9488] Mon, 12 March 2007 16:31 Go to previous messageGo to next message
Eclipse User
Originally posted by: cdamus.ca.ibm.com

Hi, Markus,

This definitely looks like a bug, as this kind of package declaration with
multiple classifier contexts is supposed to work. Would you mind raising a
bug for this problem?

https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT& version=1.0.1&component=OCL&bug_severity=normal& form_name=enter_bug

Thanks,

Christian


Markus Bauer wrote:

> Hello,
>
> I am trying to make my first OCL constraints using MDT OCL 1.1M5.
>
> But when I parse the following OCL file:
>
> package emof
> context Package
> inv inv_true: true
> context Class
> inv inv_false: false
> endpackage
>
>
> I get the following exception:
>
> Exception in thread "main" org.eclipse.ocl.SemanticException: ERROR in
> (classifierContextDeclCS): (Variable name already used: (self))
> at org.eclipse.ocl.internal.parser.OCLParser.ERR(OCLParser.java :590)
> at org.eclipse.ocl.internal.parser.OCLParser.ERROR(OCLParser.ja va:599)
> at
>
org.eclipse.ocl.internal.parser.OCLParser.genVariableDeclara tion(OCLParser.java:627)
> at
>
org.eclipse.ocl.internal.parser.OCLParser.classifierContextD eclCS(OCLParser.java:1509)
> at
>
org.eclipse.ocl.internal.parser.OCLParser.contextDeclCS(OCLP arser.java:1058)
> at
>
org.eclipse.ocl.internal.parser.OCLParser.packageDeclaration CS(OCLParser.java:1035)
> at
>
org.eclipse.ocl.internal.parser.OCLParser.parsePackageDeclar ationCS(OCLParser.java:765)
> at org.eclipse.ocl.OCL.parse(OCL.java:243)
> at validation.OclValidator.loadOclConstraints(OclValidator.java :194)
> at tests.validation.Test.main(Test.java:59)
>
>
> Is it not possible to define multiple contexts in a package? What am I
> doing wrong here?
>
> Thanks,
> Markus
Re: Multiple contexts: ERROR in (classifierContextDeclCS): (Variable name already used: (self)) [message #11351 is a reply to message #11313] Tue, 13 March 2007 10:18 Go to previous message
Eclipse User
Originally posted by: cdamus.ca.ibm.com

Actually, since this is a rather severe problem, I have gone ahead and
raised a bug for it: https://bugs.eclipse.org/bugs/show_bug.cgi?id=177133

Christian


Christian W. Damus wrote:

>
> Hi, Markus,
>
> This definitely looks like a bug, as this kind of package declaration with
> multiple classifier contexts is supposed to work. Would you mind raising
> a bug for this problem?
>
>
https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT& version=1.0.1&component=OCL&bug_severity=normal& form_name=enter_bug
>
> Thanks,
>
> Christian

<snip>
Previous Topic:problem whit the emft ocl plugin
Next Topic:LoopExp abstractness
Goto Forum:
  


Current Time: Thu Aug 28 05:17:33 EDT 2014

Powered by FUDForum. Page generated in 0.12524 seconds