Tracker: Feature Requests

9 Jmlc should compile used and out-of-date files - ID: 964403
Last Update: Settings changed ( leavens )

The JML compiler, jmlc, doesn't automatically compile
files that are not compiled but are used by other files
that are explicitly asked to be compiled. It would be
nice if the JML compiler acted in the same way as the
Java compiler with respect to compiling files that are
used which are out of date with respect to their class
files. This would enable the JML compiler to act as a
drop-in replacement for javac.

Richard Mitchell suggested this enhancement. It would
probably benefit new users.


Gary T. Leavens ( leavens ) - 2004-06-01 16:59

9

Open

None

Nobody/Anonymous

jmlrac (i.e., the jmlc tool)

user reported

Public


Comments ( 3 )

Date: 2007-02-26 01:40
Sender: leavensSourceForge.net DonorProject Admin


Another pitfall caused by this bug is that the jtest script that we have
doesn't work as one might expect. Suppose one has a class C that
implements an interface I. Then executing

jtest C.java
jmlrac C

doesn't test C properly, because the interface I, where some
specifications may be found, is not compiled with jmlc, but instead by
javac, which does get compile I, since it is out of date.


Date: 2007-01-26 02:34
Sender: leavensSourceForge.net DonorProject Admin


Franco Luque also reported this problem. He wrote in response to Yoonsik
Cheon's clarification:

> It looks like that Provider.java wasn't compiled with jmlc. Try
> jmlc Client.java Provider.java
> and see whether you have the same symptom; you have to list all the
source
> code files as arguments to jmlc.

So that was the problem... I am using NetBeans and my "compile-single"
ant target was correctly compiling with JMLC the selected class, but
was compiling without JMLRAC all its dependencies and overwrinitg the
previously JMLC compiled versions. That was because i was not telling
JMLC where to find the already compiled classes (via the classpath).

Now its fixed, so that it does not overwrite already compiled classes,
but it still compiles without JMLRAC those dependencies that were not
previously compiled. This is on purpose, isn't it? Why?


Date: 2005-08-11 19:18
Sender: leavensSourceForge.net DonorProject Admin

Logged In: YES
user_id=633675

I would also add the following comment from another user (W.
Craig Trader) on the JML interest list:

One of the biggest problems with JMLC (either with or
without Ant) is the lack of internal dependency checking.
JMLC will always recompile a class, even if none of the
source dependencies for that class have changed. This
results in significant delays when you change one class in a
project that is composed of hundreds of classes.



Attached File

No Files Currently Attached

Changes ( 6 )

Field Old Value Date By
priority 8 2007-02-26 16:42 leavens
priority 7 2007-02-26 01:40 leavens
priority 6 2007-01-26 02:34 leavens
priority 7 2006-05-18 22:08 leavens
assigned_to cheon 2006-05-18 22:08 leavens
priority 5 2005-08-11 19:18 leavens