[abc-users] precedence conflict with the abc.ja.tm extension

From: Kazunori Kawauchi <kazu_at_graco.c.u-tokyo.ac.jp>
Date: Wed, 27 May 2009 12:38:08 +0900

Dear all,

I get a "precedence conflict" error on compiling my program with abc.ja.tm
extension:

Application.java:5: Pieces of advice from
aspect tracematches.SafeOutput (.../tracematches/SafeOutput.java, line 16)
and aspect tracematches.SafeOutput (.../tracematches/SafeOutput.java, line 16)
and aspect tracematches.SafeOutput (.../tracematches/SafeOutput.java, line 16)
and aspect tracematches.SafeOutput (.../tracematches/SafeOutput.java, line 18)
and aspect tracematches.SafeOutput (.../tracematches/SafeOutput.java, line 25)
and aspect tracematches.SafeOutput (.../tracematches/SafeOutput.java, line 25)
and aspect tracematches.SafeOutput (.../tracematches/SafeOutput.java, line 26)
are in precedence conflict, and all apply here
  String data = new String("O'reilly");

But, any precedence conflict error isn't reported on compiling the same program
with abc.tm extension.

Could you tell me the cause of the difference? Is there any bug on abc.ja.tm
extension?

Regards,

Kazunori Kawauchi
kazu_at_graco.c.u-tokyo.ac.jp
http://www.graco.c.u-tokyo.ac.jp/~kazu/

----
Sample program I wrote:
<<app/Application.java>>
package app;
public class Application {
  static public void main(String[] args){
    String data = new String("O'reilly");
    data = data.toUpperCase();
    output(data);
  }
  static void output(String d) {
    System.out.println("SELECT * from bookdb where publisher='" + d + "';");
  }
}
<<tracematches/SafeOutput.java>>
package tracematches;
import app.*;
aspect SafeOutput {
  pointcut generate() :
        (call(String.new(..)))
        ;
  pointcut process(String from) :
        (call(String String.toUpperCase()) && target(from))
        ;
  pointcut use(String queryarg) :
        call(void Application.output(String)) && args(queryarg)
        ;
  tracematch (String d) {
    sym gen after returning(d) : generate();
    sym proc before : process(d);
    gen proc {
      System.out.println("DEBUG: after advice: " + d);
    }
  }
  void tracematch (String d) {
    sym proc after : process(String);
    sym use around(d) : use(d);
    proc use {
      proceed(d.replaceAll("'", "''"));
    }
  }
}
Received on Wed May 27 2009 - 04:38:41 BST

This archive was generated by hypermail 2.2.0 : Wed May 27 2009 - 11:40:13 BST