[furcas-discussion] Reference Re-Evaluation Algorithm
Uhl, Axel
axel.uhl at sap.com
Wed Feb 16 09:21:24 CET 2011
Well, fine then, I'll just set the result for the method deciding whether or not to update the tokens to always false for now.
Best,
-- Axel
> -----Original Message-----
> From: furcas-discussion-bounces at lists.furcas.org [mailto:furcas-
> discussion-bounces at lists.furcas.org] On Behalf Of Stephan Erb
> Sent: Tuesday, February 15, 2011 11:53 PM
> To: furcas-discussion at lists.furcas.org
> Subject: Re: [furcas-discussion] Reference Re-Evaluation Algorithm
>
> Hey all,
>
> I have to revert an earlier statement of mine: The IA should NOT update
> token values. It may only perform updates which do not directly affect
> the textual representation (e.g., it may adapt the referecedElements).
>
> My current understanding implies that it has to be the editor that
> calls
> the ShortPrettyPrinter, as I cannot think of another sane
> synchronization model for background parsing. I will elaborate all my
> current findings (and their implementation) on our next meeting
>
> Kind Regards,
> Stephan
>
>
> On Sun, 2011-02-06 at 23:09 +0100, Stephan Erb wrote:
> > Hey everybody,
> >
> > here the result of our last whiteboard session:
> >
> > > Create a collect expression only consisting of lookupScope and
> referenceBy. (It does not contain ?, prefix or postfix).
> > > Register the IA on this expression
> > > Register the IA on the lookupScope expression
> > >
> > > If the IA triggers for one of these two registrations, then:
> > >
> > > Filter the affected elements. Only those may remain for which a
> TB is
> > > documenting that the above triggered expression may be executed.
> > > (See IAExpressionInvalidationChangeListener in the MOIN code
> base)
> > >
> > > For all remaining effected elements and their associated document
> nodes:
> > >
> > > Determine if the given reference is bound. Probably this
> works by inspecting
> > > the 'referrencedModelElements'. The context element at hand
> may be visible
> > > in several textual views. If at least one of these
> documents that the reference is bound
> > > then we consider this to be true. Views indicating
> otherwise are considered to be stale.
> > >
> > > evaluate the lookupScope
> > >
> > > If bound and the bound element is still in the current
> lookup scope then:
> > >
> > > Update all corresponding token values. The tokens are
> set to
> > > the evaluation result of referenceBy on the bound
> element.
> > > Prefix and postfix are substracted. If prefix and
> postfix do not match
> > > the given name then the bound reference will be
> unset.
> > >
> > > else if bound but the bound element is no longer in the
> lookup scope then:
> > >
> > > Retrieve the name of the previously bound element
> (overruling the
> > < respective token value). Use this name to perform a
> fresh lookup
> > > using lookupScope, referenceBy, prefix and postfix.
> Set the reference
> > > based on the result or break it, if nothing was
> found.
> > >
> > > else if not bound:
> > >
> > > Perform a fresh lookup. The lookup is performed with
> the current token value
> > > at hand, using lookupScope, referenceBy, prefix and
> postfix. Set the reference
> > > based on the result or break it, if nothing was
> found.
> > >
> >
> > Tasks:
> >
> > * Axel will implement a ModelUpdater using to the given
> algorithm.
> > * Sebastian will write several test cases:
> > * Tests covering all branches of the algorithm.
> > * A testcase where the model is constructed in memory.
> We
> > will use it to test the algorithm if no TB model is
> > available.
> > * A set of testcases operating on the text level:
> > search/replace in the TB model with a subsequent call
> of
> > the incremental parser.
> >
> >
> > Happy Hacking!
> > Stephan
> >
> > PS: Thomas, we might need your help with all this textblocks magic
> (e.g.
> > find out if a reference is still bound). Expect some questions on the
> > mailing list rather soon :-)
> >
> >
> >
> >
> >
> > _______________________________________________
> > Furcas-discussion mailing list
> > Furcas-discussion at lists.furcas.org
> > http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion
>
>
> _______________________________________________
> Furcas-discussion mailing list
> Furcas-discussion at lists.furcas.org
> http://lists.furcas.org/cgi-bin/mailman/listinfo/furcas-discussion
More information about the Furcas-discussion
mailing list