Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Create Influence Diagram from OCL Statement
Create Influence Diagram from OCL Statement [message #690401] Wed, 29 June 2011 13:25 Go to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

Is there any help available in Eclipe for creating influence diagram or determining the objects beings influenced from a OCL statement

Warmest Regards,
Re: Create Influence Diagram from OCL Statement [message #690644 is a reply to message #690401] Wed, 29 June 2011 21:42 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

You may find the Impact Analyzer available as part of the Indigo release
OCL Examples and Editors helpful. There is some documentation in the OCL
Documentation.

Regards

Ed Willink


On 29/06/2011 15:25, forums-noreply@eclipse.org wrote:
> Hi,
>
> Is there any help available in Eclipe for creating influence diagram
> or determining the objects beings influenced from a OCL statement
>
> Warmest Regards,
Re: Create Influence Diagram from OCL Statement [message #691407 is a reply to message #690644] Fri, 01 July 2011 11:53 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

Thanks!

I have tried to look ImpactAnalyzer but i have not found much information except one page description.
It also says that it can not work for derived properties. Can you please tell me where to find examples for ImpactAnalyzer?

Warmest Regards,
Re: Create Influence Diagram from OCL Statement [message #691417 is a reply to message #691407] Fri, 01 July 2011 12:15 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The OCL Documentatation shipped with Helios provides much more. On a
good day this is also available at
http://help.eclipse.org/indigo/topic/org.eclipse.ocl.doc/help/ProgrammersGuide.html;
but it's a 500 at the moment.

http://gres.uoc.edu/OCL2011/pubs/ocl2011_submission_2.pdf provides more
details.

Support for derived properties just made it into the Indigo release. Can
you please point out where the obsolete documentation was.

For more comprehensive examples you may want to look at the very
extensive Impact Analyzer JUnit tests available from CVS.

Regards

Ed Willink

On 01/07/2011 13:53, forums-noreply@eclipse.org wrote:
> Hi,
>
> Thanks!
> I have tried to look ImpactAnalyzer but i have not found much
> information except one page description.
> It also says that it can not work for derived properties. Can you
> please tell me where to find examples for ImpactAnalyzer?
>
> Warmest Regards,
Re: Create Influence Diagram from OCL Statement [message #691440 is a reply to message #691417] Fri, 01 July 2011 13:07 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

Thanks!

http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.ocl.doc%2Fhelp%2FProgrammersGuide.html

this is the link where it says derived properties are not handled yet.

Warmest Regards,
Re: Create Influence Diagram from OCL Statement [message #691451 is a reply to message #691440] Fri, 01 July 2011 13:32 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Thanks. https://bugs.eclipse.org/bugs/show_bug.cgi?id=350938.

On 01/07/2011 15:07, forums-noreply@eclipse.org wrote:
> Hi,
>
> Thanks!
>
> http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.ocl.doc%2Fhelp%2FProgrammersGuide.html
>
>
> this is the link where it says derived properties are not handled yet.
>
> Warmest Regards,
>
Re: Create Influence Diagram from OCL Statement [message #691474 is a reply to message #691451] Fri, 01 July 2011 14:20 Go to previous messageGo to next message
ModelGeek Mising name is currently offline ModelGeek Mising nameFriend
Messages: 550
Registered: June 2011
Senior Member
Hi,

I have one confusion from the documentation page, below is the chunk of code from documentation page.

final OCLExpression e = ...;
final ImpactAnalyzer impactAnalyzer = ImpactAnalyzerFactory.INSTANCE.createImpactAnalyzer(
e, // the expression to re-evaluate incrementally
false, // whether to re-evaluate when new context objects appear
OCLFactory.INSTANCE);

here OCLExpression is org.eclipse.ocl.ecore.OCLExpression and normally it is used for AbtractVisitor class

and org.eclipse.ocl.expressions.OCLExpression is another class which is used to parse OCL statements like

OCL<?, EClassifier, EOperation, ?, ?, ?, ?, ?, ?, Constraint, EClass, EObject> ocl;
ocl = OCL.newInstance(EcoreEnvironmentFactory.INSTANCE);
OCLHelper<EClassifier, EOperation, ?, Constraint> helper = ocl.createOCLHelper();
helper.setContext(eClass);
OCLExpression<EClassifier> query = helper.createQuery(attribute.getpOCLStatement());



Why impact analyzer is using org.eclipse.ocl.ecore.OCLExpression and do this mean i have to extend AbstractVisitor or some other to get object of org.eclipse.ocl.ecore.OCLExpression ?

how can i get org.eclipse.ocl.ecore.OCLExpression object?

please help

Warmest Regards
Re: Create Influence Diagram from OCL Statement [message #691490 is a reply to message #691474] Fri, 01 July 2011 15:00 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Yes. These templates are very confusing, which is why a prototype new
approach with no templates is available in the examples plugins
awaiting promotion in the Juno release.

org.eclipse.ocl.ecore.OCLExpression extends
org.eclipse.ocl.OCLExpression<EClassifier>

and

org.eclipse.ocl.uml.OCLExpression extends
org.eclipse.ocl.OCLExpression<Classifier>

so the templated classes give shared Ecore/UML functionality. Only one
of the two can be imported, the
other must be explicitly qualified.

I recommend always importing the untemplated versions and qualifying the
templated ones. Most of the
time you can use the untemplated classes, and I suspect that half of
your quoted example can be simplified in this way.
Unfortunately return values from shared functionality do not return
untemplated classes; you can safely cast them.

Regards

Ed Willink

On 01/07/2011 16:20, forums-noreply@eclipse.org wrote:
> Hi,
>
> I have one confusion from the documentation page, below is the chunk
> of code from documentation page.
> final OCLExpression e = ...;
> final ImpactAnalyzer impactAnalyzer =
> ImpactAnalyzerFactory.INSTANCE.createImpactAnalyzer(
> e, // the expression to re-evaluate incrementally
> false, // whether to re-evaluate when new context objects appear
> OCLFactory.INSTANCE);
>
> here OCLExpression is org.eclipse.ocl.ecore.OCLExpression and normally
> it is used for AbtractVisitor class
>
> and org.eclipse.ocl.expressions.OCLExpression is another class which
> is used to parse OCL statements like
>
> OCL<?, EClassifier, EOperation, ?, ?, ?, ?, ?, ?, Constraint, EClass,
> EObject> ocl;
> ocl = OCL.newInstance(EcoreEnvironmentFactory.INSTANCE);
> OCLHelper<EClassifier, EOperation, ?, Constraint> helper =
> ocl.createOCLHelper();
> helper.setContext(eClass);
> OCLExpression<EClassifier> query =
> helper.createQuery(attribute.getpOCLStatement());
>
>
>
> Why impact analyzer is using org.eclipse.ocl.ecore.OCLExpression and
> do this mean i have to extend AbstractVisitor or some other to get
> object of org.eclipse.ocl.ecore.OCLExpression ?
>
> how can i get org.eclipse.ocl.ecore.OCLExpression object?
>
> please help
>
> Warmest Regards
>
Previous Topic:Attribute with derived value
Next Topic:Code generation programatically
Goto Forum:
  


Current Time: Thu Mar 28 12:53:25 GMT 2024

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

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

Back to the top