Hi Jon,
Yes, that is the intended semantics: see
http://abc.comlab.ox.ac.uk/papers#oopsla2005
which spells out that semantics.
Conceptually, at each event (before/after joinpoint), every suffix of
the computation trace (restricted to the declared symbols) is matched
against the pattern. So if you the trace "save save save", a match
is found.
Best wishes,
-Oege
On Wed, 10 Sep 2008, Jon Oldevik wrote:
> Hi,
> I have a question about the matching semantics that tracematch supports.
>
> given a really a tracematch, e.g. the simple one given below, which is
> matching two subsequent calls to save: When two 'save' are detected, the
> tracematch gives a match. However, when a third 'save' is detected, a new
> match is given (rather than waiting for a fourth).
>
> Is this the intended semantics of tracematches?
>
> public aspect MatchTwoSaves {
> pointcut save(Editor e): target(e) && call (* Editor.save(..))
>
> tracematch (Editor e) {
> sym save after returning: save(e);
> save save {
> // we got a save+save match, now do something with it
> }
> }
> }
>
> Best regards,
> Jon Oldevik
>
Received on Thu Sep 11 2008 - 10:13:00 BST
This archive was generated by hypermail 2.2.0 : Thu Sep 11 2008 - 10:30:12 BST