TraversalJ Syntax


Subject: TraversalJ Syntax
From: Pengcheng Wu (wupc@ccs.neu.edu)
Date: Thu Feb 27 2003 - 14:23:32 EST


I would like to clarify again the syntax of strategy and traversal
declaration. There should be no ':' between 'strategy' or 'traversal'
and the strategy or traversal variable names. So the example presented
in the project specification file:

  aspect Example {
    declare strategy AtoB: from A to B;
    declare strategy AtoBSkipTail: intersect(AtoB, skipTail);
    declare strategy AtoBviaTelephone: intersect(AtoB,from *
    via Telephone to *);
    declare traversal: trav1: AtoBSkipTail;
    declare traversal: trav2: intersect(AtoBviaTelephone,
     from A to C);
    declare strategy: skipTail:
     from * bypassing -> *,tail,* to *;
  }

is _incorrect_! The correct one should be:

   aspect Example {
    declare strategy AtoB: from A to B;
    declare strategy AtoBSkipTail: intersect(AtoB, skipTail);
    declare strategy AtoBviaTelephone: intersect(AtoB,from *
    via Telephone to *);
    //one ':' removed
    declare traversal trav1: AtoBSkipTail;
    //one ':' removed
    declare traversal trav2: intersect(AtoBviaTelephone,
     from A to C);
    //one ':' removed
    declare strategy skipTail:
     from * bypassing -> *,tail,* to *;
  }

You should generate one jave file for each traversal declaration. For
example, in the above particular example, you should generate trav1.java
for traversal trav1 and trav2.java for traversal trav2.

--Pengcheng Wu



This archive was generated by hypermail 2b28 : Thu Feb 27 2003 - 14:23:35 EST