Subject: FW: New part two application...
From: Karl Lieberherr (lieber@ccs.neu.edu)
Date: Mon Dec 09 2002 - 14:42:20 EST
Paul Freeman and Pengcheng Wu have been working hard to find
an alternative project to apply the class form LoD checker.
They found the AP library to work with the class form LoD checker.
The AP libarary can be found at:
http://www.ccs.neu.edu/home/lieber/com3205/f02/solutions/com3205/fianl%20exa
m%20part2%20test%20project/
Please follow the instructions that Paul gives to run the program.
The program you check for LoD violations is documented at
(this is only for context and not required for the exam)
http://www.ccs.neu.edu/research/demeter/AP-Library/
which is the core library for various aspect-oriented tools.
When I wrote the exam I did not not expect to run into all those
complications! :-)
-- Karl
PS. Enclosed is the workaround discussion.
-----Original Message-----
From: Paul Freeman [mailto:pfreeman@ccs.neu.edu]
Sent: Monday, December 09, 2002 1:01 PM
To: Karl Lieberherr
Cc: Pengcheng Wu; freeberm@earthlink.net
Subject: New part two application...
Hi Karl -
I packaged up the ap library along with a couple of test files and
instructions on how to run the application into a folder in the
solutions directory. The students will not be able to use the object
form checker I had written for class as the AspectJ compiler is throwing
some odd errors. I tried to fix it as Pengcheng described below, but
replacing the aspectjrt.jar file with the older version had no effect,
and replacing the aspectjtools.jar file with the older version caused
errors. Using the class form checker with the plugin works quite well
though. There are quite a few errors until you limit the scope of what
is considered stable (all stable and global preferred modifications
are valid in the Class form checker as well due to the changes that I made).
One custom pointcut will remove all errors unfortunately, but it is
still a good illustration none the less.
I didn't want to announce the change to the whole class until you OK'd
it. This seems like the best solution.
The package can be found at:
http://www.ccs.neu.edu/home/lieber/com3205/f02/solutions/com3205/fianl%20exa
m%20part2%20test%20project/
Paul
Pengcheng Wu wrote:
>Paul,
>
>I don't have the comiler errors you reported, but I happen to know how
>to solve it. If you use ajc 1.0.4(which is available at
>/proj/demsys/demjava/packages/aspectj1.0.4/), the compiler error will
>probably go
>away. I don't know why ajc 1.0.6 reports such kinds of compiler errors to
>your solution.
>
>I have tried both two versions of object form checker I have, they all
>successfully compile with memory option to be 512M. But when running, both
>of them end with a stack overflow exception. I tried a whole morning but
>was unable to figure out why. It seems ajc is confused with the 'percflow'
>thing and gets an infinite loop or sth like that.
>
>--Pengcheng
>
>On Mon, 9 Dec 2002, Paul Freeman wrote:
>
>>It works to compile and run the AP lib with Pengcheng's class form
>>checker which is used in my solution. But when I attempt to compile
>>with the object form checker (my solution) at the point the AspectJ
>>compiler begins "lifting local classes" errors are thrown regarding
>>referencing local variables. Interestingly, these variables are inside
>>the constructors to TraversalGraph. Here are the errors.
>>
>>Kind Status Priority Description Resource In Folder
>>Location
>>Error local variable B is referenced from inside inner
>>class; needs to be declared final TraversalGraph.java
>>apLib/edu/neu/ccs/demeter/aplib line 49
>>Error local variable G is referenced from inside inner
>>class; needs to be declared final TraversalGraph.java
>>apLib/edu/neu/ccs/demeter/aplib line 49
>>Error local variable N is referenced from inside inner
>>class; needs to be declared final TraversalGraph.java
>>apLib/edu/neu/ccs/demeter/aplib line 49
>>Error local variable S is referenced from inside inner
>>class; needs to be declared final TraversalGraph.java
>>apLib/edu/neu/ccs/demeter/aplib line 49
>>Error local variable G is referenced from inside inner
>>class; needs to be declared final TraversalGraph.java
>>apLib/edu/neu/ccs/demeter/aplib line 84
>>Error local variable S is referenced from inside inner
>>class; needs to be declared final TraversalGraph.java
>>apLib/edu/neu/ccs/demeter/aplib line 84
>>Error local variable debug is referenced from inside inner
>>class; needs to be declared final TraversalGraph.java
>>apLib/edu/neu/ccs/demeter/aplib line 97
>>Error local variable G is referenced from inside inner
>>class; needs to be declared final TraversalGraph.java
>>apLib/edu/neu/ccs/demeter/aplib line 97
>>Error local variable S is referenced from inside inner
>>class; needs to be declared final TraversalGraph.java
>>apLib/edu/neu/ccs/demeter/aplib line 97
>>
>>I tried to compile the dj library at the same location and received
>>similar errors. The class form does work however. I was unable to
>>completely run it though as I wasn't able to find a suitable
>>StrategyGraph file to be used as input. Pengcheng, could you direct me
>>to a CD and SG file that will work as test input? I can package all of
>>this up and place it in the solutions directory with instructions when I
>>verify that it works.
>>
>>Paul
>>
>>
>>Pengcheng Wu wrote:
>>
>>>It is at
>>>
>>> /proj/demsys/demjava/src/aplib/
>>>
>>>--Pengcheng
>>>
>>>On Mon, 9 Dec 2002, Paul Freeman wrote:
>>>
>>>>I can't seem to find the source java code for the AP library. I could
>>>>only find the packaged class files at:
>>>>http://ftp.ccs.neu.edu/pub/research/demeter/DemeterJava/
>>>>
>>>>could you please send me their url.
>>>>
>>>>Paul
>>>>
>>>>
>>>>Karl Lieberherr wrote:
>>>>
>>>>>please can you check whether it works to check the AP Library
>>>>>for old violations.
>>>>>
>>>>>-- Karl
>>>>>
>>>>>>From pfreeman@ccs.neu.edu Mon Dec 9 00:09:03 2002
>>>>>
>>>>>>Delivered-To: lieber@ccs.neu.edu
>>>>>>Date: Mon, 09 Dec 2002 00:05:34 -0500
>>>>>>From: Paul Freeman <pfreeman@ccs.neu.edu>
>>>>>>User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:0.9.4.1)
Gecko/20020508 Netscape6/6.2.3
>>>>>>X-Accept-Language: en-us
>>>>>>MIME-Version: 1.0
>>>>>>To: lieber@ccs.neu.edu
>>>>>>Cc: Pengcheng Wu <wupc@ccs.neu.edu>,
>>>>>> David Lorenz <lorenz@ccs.neu.edu>,
>>>>>> Therapon Skotiniotis <skotthe@ccs.neu.edu>
>>>>>>Subject: Re: FW: Checking the Checker Plugin...
>>>>>>Content-Transfer-Encoding: 7bit
>>>>>>X-Spam-Status: No, hits=1.0 required=5.0
>>>>>> tests=AWL,EMAIL_ATTRIBUTION,MAILTO_TO_SPAM_ADDR,OUTLOOK_FW_MSG,
>>>>>> QUOTED_EMAIL_TEXT,RCVD_IN_MULTIHOP_DSBL,
>>>>>> RCVD_IN_OSIRUSOFT_COM,RCVD_IN_UNCONFIRMED_DSBL,REFERENCES,
>>>>>> SPAM_PHRASE_01_02,USER_AGENT,USER_AGENT_MOZILLA_UA,
>>>>>> X_ACCEPT_LANG,X_OSIRU_DUL,X_OSIRU_DUL_FH
>>>>>> version=2.43
>>>>>>X-Spam-Level: *
>>>>>>
>>>>>>Hi Karl -
>>>>>>
>>>>>>Passing the vmargs as Ed suggested works to increase the memory and
>>>>>>compile the checker plugin... but there are other issues unfortunately
>>>>>>in checking the plugin itself. It doesn't seem to work to run the
>>>>>>checked plugin in the runtime workbench, I imagine since there is a
>>>>>>conflict with the installed plugin and the plugin we are testing. It
>>>>>>also seems to be quite difficult to export the files as a jar once
they
>>>>>>have been compiled with the checker plugin (it may be an AspectJ
plugin
>>>>>>bug or it is something that my plugin is doing to the classpath.) I
>>>>>>receive an error when attempting to export the file stating that all
of
>>>>>>the .java files are either not on the classpath or are inaccessible.
>>>>>>This is strange since I am specifically only exporting the class
files.
>>>>>>I have tried jar-ing the appropriate files from the command line, but
I
>>>>>>must not be doing it correctly as when run, the IDE complains that it
>>>>>>cannot find the classes it needs. Again strange since the structure
>>>>>>seems to be correct when I unpack the jar again... although the
manifest
>>>>>>is empty. In either case, considering some of the problems students
>>>>>>were having with their own plugins, I don't think it would be a good
>>>>>>idea to have them jar their files from the command prompt.
>>>>>>
>>>>>>If there is another application with a main method that could be
tested,
>>>>>>that might be best. Or it could be treated like a manual calculation
>>>>>>similar to parts 2b, 2c, etc.
>>>>>>
>>>>>>Paul
>>>>>>
>>>>>>
>>>>>>Karl Lieberherr wrote:
>>>>>>
>>>>>>>Pengcheng:
>>>>>>>
>>>>>>>Does Ed's solution work?
>>>>>>>
>>>>>>>Have you tried checking the LoD for the AP Library, DJ or DemeterJ?
>>>>>>>Did that work? Please can you try the AP Library if you have not done
so?
>>>>>>>This is urgent for my Software Engineering class.
>>>>>>>
>>>>>>>-- Karl
>>>>>>>
>>>>>>>-----Original Message-----
>>>>>>>From: Edward P. Hom [mailto:ehom@ccs.neu.edu]
>>>>>>>Sent: Sunday, December 08, 2002 4:23 PM
>>>>>>>To: freeberm@earthlink.net
>>>>>>>Cc: Dr. Karl J. Lieberherr; com3205@ccs.neu.edu
>>>>>>>Subject: Re: Checking the Checker Plugin...
>>>>>>>
>>>>>>>
>>>>>>>Paul,
>>>>>>> Have you tried making a shortcut to Eclipse and specifying -vmargs?
>>>>>>>the syntax is:
>>>>>>>
>>>>>>>eclipse.exe [platform options] [-vmargs [JVM args]]
>>>>>>>
>>>>>>>so, for instance, you might have:
>>>>>>>eclipse.exe -vmargs -Xmx512M
>>>>>>>to run Eclipse with maximum Java heap size of 512MB.
>>>>>>>
>>>>>>>go here for more information:
>>>>>>>http://www.eclipse.org/documentation/html/plugins/org.eclipse.platfor
m.doc.u
>>>>>>>ser/doc/tasks/running_eclipse.htm
>>>>>>>
>>>>>>>-Edward Hom
>>>>>>>ehom@ccs.neu.edu
>>>>>>>
>>>>>>>On Sun, 8 Dec 2002, Paul Freeman wrote:
>>>>>>>
>>>>>>>>Hi Karl -
>>>>>>>>
>>>>>>>>Some of the students pointed out that there is no main method which
the
>>>>>>>>checker should start and stop around. I think I am able to modify
the
>>>>>>>>checker to work around this, but another issue came up when I tried
to
>>>>>>>>do this.
>>>>>>>>
>>>>>>>>I had mentioned in class that the AspectJ compiler had given me "out
of
>>>>>>>>memory" errors when I tried to compile a larger program with the
checker
>>>>>>>>attached. I get the same error when trying to compile the plugin
with
>>>>>>>>the checker attached. There is a setting in the batch file (and
shell
>>>>>>>>script for unix) that allows you to increase the memory allotted to
the
>>>>>>>>AspectJ compiler when it starts from the command line, but the
Eclipse
>>>>>>>>environment does not use either of those files to start the AJ
compiler
>>>>>>>>thread. In order to fix this there would need to be a similar file
used
>>>>>>>>to start Eclipse itself, and there does not appear to be. At least
on
>>>>>>>>my windows installation, Eclipse is started from an executable not a
>>>>>>>>batch file.
>>>>>>>>
>>>>>>>>The other option would be to compile the plugin with the checker
>>>>>>>>attached from the command prompt, but again due to the wonders of
>>>>>>>>windows, that seems to be impossible due to the large number of
>>>>>>>>libraries which are required to be attached to the classpath. On my
>>>>>>>>machine I have not been able to create a compile statement which
does
>>>>>>>>not throw an "out of environment space" error due to the size of the
>>>>>>>>classpath variable I am trying to pass as an argument. Even if this
>>>>>>>>option did work, I think it might be a bit awkward to have the rest
of
>>>>>>>>the class perform without causing a lot of problems.
>>>>>>>>
>>>>>>>>Is there another smaller program that we might be able to be
examined
>>>>>>>>with the plugin? One that hopefully will not throw "out of memory
>>>>>>>>errors" from Eclipse?
>>>>>>>>
>>>>>>>>Or perhaps there is another question that could be asked for that
part
>>>>>>>>of the final.
>>>>>>>>
>>>>>>>>Paul
>>>>>>>>
>>>>>>>>
>>>
>>
>
>
This archive was generated by hypermail 2b28 : Mon Dec 09 2002 - 14:39:11 EST