Re: [Jastadd] Testing JastAddJ

From: Na, Hyunik <hina_at_kaist.ac.kr>
Date: Fri, 25 Nov 2011 11:50:28 +0900

Hello Jesper,


>
> From: jastadd-bounces_at_cs.lth.se [mailto:jastadd-bounces_at_cs.lth.se] On
> Behalf Of Jesper Oqvist
> Sent: Thursday, November 24, 2011 8:32 PM
> To: jastadd_at_cs.lth.se
> Subject: Re: [Jastadd] Testing JastAddJ
>
>
> Hello Hyunik,
> I could not see which version of JastAddJ this is. Could you please
> provide either the svn revision number or the name the release?
>

Typing "svn info" on my local JastAddJ directory gives the following messages.

[hina_at_hyunikLinux JastAddJ]$ svn info
Path: .
URL: http://svn.cs.lth.se/svn/jastadd-oxford/projects/trunk/JastAddJ
Repository Root: http://svn.cs.lth.se/svn/jastadd-oxford/projects
Repository UUID: 40514614-586c-40e6-bf05-bf7e477dc3e6
Revision: 9151
Node Kind: directory
Schedule: normal
Last Changed Author: jesper
Last Changed Rev: 9149
Last Changed Date: 2011-09-25 04:17:28 +0900 (Sun, 25 Sep 2011)


> Regarding the error messages I think the that first one might have been
> fixed in a later (possibly unreleased) version of JastAddJ.

I checked out the latest version today (Rev. 9178) to try again with the latest version.
But, this time, building JastAddJ fails (while building Java7FrontEnd).

-=-=-=

[hina_at_hyunikLinux Java7Frontend]$ pwd
/home/hina/temp/JastAddJ/Java7Frontend
[hina_at_hyunikLinux Java7Frontend]$ svn info
Path: .
URL: http://svn.cs.lth.se/svn/jastadd-oxford/projects/trunk/JastAddJ/Java7Frontend
Repository Root: http://svn.cs.lth.se/svn/jastadd-oxford/projects
Repository UUID: 40514614-586c-40e6-bf05-bf7e477dc3e6
Revision: 9178
Node Kind: directory
Schedule: normal
Last Changed Author: jesper
Last Changed Rev: 9178
Last Changed Date: 2011-11-23 17:31:37 +0900 (Wed, 23 Nov 2011)

[hina_at_hyunikLinux Java7Frontend]$ ant
Buildfile: /home/hina/temp/JastAddJ/Java7Frontend/build.xml

scanner:

BUILD FAILED
/home/hina/temp/JastAddJ/Java7Frontend/build.xml:145: java.lang.NoSuchMethodError: java_cup.runtime.lr_parser.getSymbolFactory()Ljava_cup/runtime/SymbolFactory;
        at JFlex.CUP$LexParse$actions.CUP$LexParse$do_action(LexParse.java:1703)
        at JFlex.LexParse.do_action(LexParse.java:408)
        at java_cup.runtime.lr_parser.parse(lr_parser.java:569)
        at JFlex.Main.generate(Main.java:73)
        at JFlex.anttask.JFlexTask.execute(JFlexTask.java:71)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:390)
        at org.apache.tools.ant.Target.performTasks(Target.java:411)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1360)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1329)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1212)
        at org.apache.tools.ant.Main.runBuild(Main.java:801)
        at org.apache.tools.ant.Main.startAnt(Main.java:218)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)

Total time: 1 second
[hina_at_hyunikLinux Java7Frontend]$

-=-=-=

Should I update my JDK to JDK7 (current version is 1.6.0) ?



> I have compiled JDK7 with JastAddJ, and I do not get this error message.
>

This is a very good news for me because I need to build the whole Java class library with JastAddJ
(and with my future extension of JastAddJ), because my work includes adding compiler-synthesized
methods for each class (including those classes in the library).

Did you build the whole library or some part of it?
(In the OOPSLA `06 paper "The JastAdd Extensible Java Compiler", the authors say that
 they compiled two packages java.lang and java.util of JDK 1.4.2 and 1.5. )
What is your source for the JDK? Is it OpenJDK?

Could you please provide a "recipe" to build a working rt.jar etc from
some available .java source files using JastAddJ?

> I have seen the second error message. I solved that by removing all
> *.class files and compiling all *.java files at once using the _at_<file>
> option to provide the list of *.java files. I do not know if there is an
> error in the bytecode generation, or only the bytecode parsing of JastAddJ.
> I added a ticket for this error when I noticed it and continued without
> more investigation.
>

I tried the test again according to your comment
(though I'm not sure about what you mean by "removing all *.class files".
 I just cleaned up my ./build directory.)

Then I encountered a new type of error

-=-=-=

[hina_at_hyunikLinux byjastadd]$ find . -name *.java > java_files
[hina_at_hyunikLinux byjastadd]$ java -Xms1024M -Xmx1024M -cp /home/hina/install/JastAddJ/Java1.5Backend JavaCompiler -bootclasspath .:./build:/home/hina/myWork/research/openjdk-1.6.0.0.hina/build/linux-i586/classes -extdirs . -classpath . -d build @java_files

... ( <-- many warnings about deprecated things)
Errors:
./com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.java:502:
  Semantic Error: method does not override a method from its superclass
./com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.java:536:
  Semantic Error: method does not override a method from its superclass
./com/sun/java/swing/plaf/nimbus/NimbusLookAndFeel.java:607:
  Semantic Error: method does not override a method from its superclass

-=-=-=

Because I couldn't build the latest version of JastAddJ, the test was done with the revision 9149.
I'll try to build the latest version and test again.

> /Jesper
>

Thank you.

-- Hyunik
Received on Fri Nov 25 2011 - 03:50:22 CET

This archive was generated by hypermail 2.3.0 : Wed Apr 16 2014 - 17:19:06 CEST