Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » OCL » Start/End position
Start/End position [message #1752524] Tue, 24 January 2017 17:39 Go to next message
Edouard R. Batot is currently offline Edouard R. BatotFriend
Messages: 100
Registered: March 2015
Senior Member
Hi everybody,

The documentation Javadoc of OCL is sometimes fuzzy. Example :
Quote:
If the meaning of the 'Property Start [End] Position' attribute isn't clear, there really should be more of a description here...


Does anybody know more about the start/end positions ?

I'm also looking for a set of constraints (with the corresponding metamodel) that covers - at best - the potential calls of the org.eclipse.ocl.utilities.AbstractVisitor<T, C, O, P, EL, PM, S, COA, SSA, CT>.
Is there any bench available for testing ?

Thanks you, et bonne journée !
Edouard
Re: Start/End position [message #1752559 is a reply to message #1752524] Wed, 25 January 2017 07:15 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Searching the code suggests that you are referring to CallExp.propertyStart, which I had long since forgotten about. When an IMP editor was under development the CSNode position support was enhanced/debugged to support reverse traversal from problem to source position. This enhancement was no doubt hampered by legacy issues hence the referenced relic.

There are many JUnit tests. Use your Java debugger / search tools.

All of this code is much improved in the new code by the use of Xtext which provides a more coherent CS to text model. The new Visitors cover all classes rather than just some and do not require struggling with long parameter lists.

If you are really determined to pursue work with the classic/mature/obsolete code base you will have to learn to search the code yourself. Search for callers of set/getPropertyStart. There is also documentation to read.

Regards

Ed Willink

Re: Start/End position [message #1752645 is a reply to message #1752559] Wed, 25 January 2017 17:39 Go to previous messageGo to next message
Edouard R. Batot is currently offline Edouard R. BatotFriend
Messages: 100
Registered: March 2015
Senior Member
Quote:
If you are really determined to pursue work with the classic/mature/obsolete code base you will have to learn to search the code yourself. Search for callers of set/getPropertyStart. There is also documentation to read.

I found the code, and the setter/getter, and the documentation. This is exactly what brought me here to ask the question I ask.

Not to mention that the "If the meaning of the 'XXX' attribute isn't clear, there really should be more of a description here..." appears in many other places in the documentation. There really should be more of a description - authors admit.

I know there's a lack of consideration of artefact documentation. I know there's no funding to invest in it or to hire competent documentalists (this is a much broader topic).

Even though, there is no reason for such patriarchist formulation.

Thanks for your help, I'll be back soon.
Edouard

PS : attached is a reminder of the work to be done in the field I'm pointing out :
"The Problems with Eclipse Modeling Tools: A Topic Analysis of Eclipse Forums" by Kahani et al. published in Models2016 conference's proceedings.
http://research.cs.queensu.ca/~cordy/Papers/KBDC_MODELS16_Problems.pdf

[Updated on: Wed, 25 January 2017 17:40]

Report message to a moderator

Re: Start/End position [message #1752649 is a reply to message #1752645] Wed, 25 January 2017 18:58 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The "If the meaning of the 'XXX' attribute isn't clear" is the EMF default when no GenModel documentation EAnnotation is provided. You will find that the new model for the Pivot-based OCL is auto-derived from UML and so has many comments that are shared automatically with the UML 2.5 specification. They contribute to hovertext in the OCL editors.

Regards

Ed Willink
Re: Start/End position [message #1759359 is a reply to message #1752649] Mon, 10 April 2017 13:15 Go to previous messageGo to next message
Edouard R. Batot is currently offline Edouard R. BatotFriend
Messages: 100
Registered: March 2015
Senior Member
Quote:
Searching the code suggests that you are referring to CallExp.propertyStart, which I had long since forgotten about. When an IMP editor was under development the CSNode position support was enhanced/debugged to support reverse traversal from problem to source position. This enhancement was no doubt hampered by legacy issues hence the referenced relic.

In a nutshell, when I create OperationCallExp (par exemple) is their any risks that leaving "[property][Start/End]position" to "-1" ?
Merci.
Re: Start/End position [message #1759360 is a reply to message #1759359] Mon, 10 April 2017 13:22 Go to previous messageGo to next message
Edouard R. Batot is currently offline Edouard R. BatotFriend
Messages: 100
Registered: March 2015
Senior Member
PS : does this have any relation with the fact that modifying OCL AST tree directly makes its "toString" method obsolete ?
When I do change the tree, I can apply it with the new semantics, but it is shown with the old syntax. (I answered this by re-doing my own visualisator)

(When I get time to write it, I'll rise a bug with everything explained - for the ones who don't understand such conceptual description).
Re: Start/End position [message #1759391 is a reply to message #1759360] Tue, 11 April 2017 08:08 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you are working with old code, you are probably becoming more familiar with it than I am. I can only suggest that you search for all uses of a "-1" start/end to see what consequences there might be. In principle it would seem that a secondary characteristic (such as text layout) should not impair primary functionalities (such as syntax checking/evaluation), which probably opens the way for a bug report...

I have no idea what you mean by modifying the OCL AST, or rather I have at least three ideas and do not have time to answer every inconsistent possibility.

Regards

Ed Willink

Re: Start/End position [message #1759422 is a reply to message #1759391] Tue, 11 April 2017 15:06 Go to previous messageGo to next message
Edouard R. Batot is currently offline Edouard R. BatotFriend
Messages: 100
Registered: March 2015
Senior Member
Ed Willink wrote on Tue, 11 April 2017 08:08
I have no idea what you mean by modifying the OCL AST


I mean taking the PropertyCallExp and other VariableExp, OperationCallExp etc. apart, changing their respective fields (I love Ecore eSetters), copying sources and referredOeration and referredVariable, and punshing the new versions back into other OCL programs.
We call it OCL Co-Evolution (following a metamodel evolution).


Re: Start/End position [message #1759423 is a reply to message #1759422] Tue, 11 April 2017 15:10 Go to previous messageGo to next message
Edouard R. Batot is currently offline Edouard R. BatotFriend
Messages: 100
Registered: March 2015
Senior Member
Quote:
In principle it would seem that a secondary characteristic (such as text layout) should not impair primary functionalities (such as syntax checking/evaluation),

this is true - and secondary characteristic can be rebuilt easily. I only wanted to mention the inconsistency between what the toString displays and what it really is behind (in the old version I use at least)
Re: Start/End position [message #1759425 is a reply to message #1759423] Tue, 11 April 2017 15:36 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

If you modify elements in the AST you must take care ensure that all references and containments remain consistent. For the Pivot OCL2Java, I found that the OCL AST was unhelpful for rewriting since I didn't want to corrupt the original. There is therefore an intermediate CG model on which destructive rewrites are performed.

The Classic OCL toString() has not changed much. If you search the old Bugzillas you will find that I dissuaded Christian from promoting it to be a bit more like a pretty printer. It is a debug utility. It therefore formats in a simple left-to-right fashion. I have no idea what you mean by going obsolete. I don't think that there any caches that you should have invalidated.

Regards

Ed Willink
Re: Start/End position [message #1759435 is a reply to message #1759425] Tue, 11 April 2017 16:34 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

The EOperations in the Classic OCL are all a bit hard. (The PIvot OCL has a regular Standard Library Package/Class/Operation etc.)

Your best bet is to set a breakpoint to see how the parser finds an example test operation, such as subSequence. Or follow the SUB_SEQUENCE /SUB_SEQUENCE_NAME references. Beware; there are two libraries, one statically built and one dynamically built; very easy to get confused.

Regards

Ed Willink
Re: Start/End position [message #1759442 is a reply to message #1759435] Tue, 11 April 2017 17:47 Go to previous messageGo to next message
Edouard R. Batot is currently offline Edouard R. BatotFriend
Messages: 100
Registered: March 2015
Senior Member
Quote:
Your best bet is to set a breakpoint to see how the parser finds an example test operation, such as subSequence. Or follow the SUB_SEQUENCE /SUB_SEQUENCE_NAME references. Beware; there are two libraries, one statically built and one dynamically built; very easy to get confused.

Yes, that's exactly where I am - and I am very confused Smile
It's a pretty windy thread of instructions to follow - a thorny serpentine !

And so, I wonder why is that so hard to instantiate operations ?
What does an Operation carry that need so much work being done before it works ?
just asking..

(Now I understand your mentionning of that post in the other one. Operation creation differing from Start/End point, I thought it'd be better to separate them.)
Re: Start/End position [message #1759444 is a reply to message #1759442] Tue, 11 April 2017 17:53 Go to previous messageGo to next message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Basically, as I pointed out earlier, if you persist in ignoring the progress that the Pivot OCL makes in providing coherent modeling and extensibility, you must fight to provide alternative solutions to what is already solved.

Regards

Ed Willink
Re: Start/End position [message #1759448 is a reply to message #1759444] Tue, 11 April 2017 18:03 Go to previous messageGo to next message
Edouard R. Batot is currently offline Edouard R. BatotFriend
Messages: 100
Registered: March 2015
Senior Member
And as pointed out earlier, changing technology in a project is not that easy as to say it (evaluating the impact of such change is challenging in itself, you must know that too).

Thanks for your answers though, it's helping a lot !
Re: Start/End position [message #1759449 is a reply to message #1759448] Tue, 11 April 2017 18:18 Go to previous message
Ed Willink is currently offline Ed WillinkFriend
Messages: 7655
Registered: July 2009
Senior Member
Hi

Sure, but there comes a time when you have to sit back and review the problems ahead. You're going to keep hitting them. in the next two weeks changing is a loser, but in the next two years changing is probably a winner.

Regards

Ed Willink
Previous Topic:Programmatical creation
Next Topic:An Error when loading and OCL File for verification
Goto Forum:
  


Current Time: Fri Mar 29 10:10:09 GMT 2024

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

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

Back to the top