ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <>
Subject RE: Configure->Template->Build
Date Wed, 06 Jun 2001 11:14:34 GMT
> From: Peter Donald []
> At 04:35 PM 6/5/01 +0100, Jose Alberto Fernandez wrote:
> >> >As a parameterized module, <projectref> does not suffer from
> >> that. Since the
> >> >referenced project needs to be a valid <project> it can
> be verified
> >> >syntactically, semantically and in most cases it can be
> >> executed on its own.
> >> >You cannot do that with templates except for very few, and I
> >> would say
> >> >un-interesting, cases.
> >>
> >> false.
> >
> >Can you give any argument? Are you saying that what I say
> about <projectref>
> >is not true?
> yep. Can only validate by running. Long time property of ant.

Well, you can certiantly validate the syntax witout running.
"ant -projecthelp" will do it. But even if you need to execute (to take into
account dynamic typedefs and such), you can actually run the refered project

	ant -Dxxx -Dyyy ....

or you can have default values predefined for testing.

> > or that you can validate the correctness of templates for
> all inputs?
> almost impossible to prove correctness. People learnt this long ago.

Since I am talking of syntactic validity and not execution correctness
(which I have made clear in my previous e-mails, by the way) I stand by my
position. The fact is you can say very little about the correctness of
templates (i.e, the syntactic validity of the output produced after
expansion). But you seem to be too blinded to recognize it. And too willing
to insult others with different points of view.

> >You are the one calling our proposal "dynamic templating" I
> have never call
> >it that. So, since I do not think they are the same thing,
> and you do. I
> >think you will have to show us the isomorphism between the two.
> >
> >Either dynamic or static, my comments about templates stand
> and since I am
> >making clear what I think are the diferences and advantages
> of <projectref>
> >against templating in general, I think I am making clear
> that the two are
> >not the same.
> read, think, learn. Go back and actual make an effort to
> understand why the
> approach is wrong. Alternatively try to build a large scale
> project with
> both methods. Without any practical experience or learning
> from people who
> have had practical experience I can't see how you can expect
> anyone to take
> your "opinion" seriously.

I have to agree with Stefan comments on this point. We have asked you for
examples, since you considered yourself the guru of the complex builds. But
we have gotten nothing. About my opinions being taken seriously, well I
could say the same thing to you, but I prefer to keep the discussion at a
higher level.

> >As I said, a projectref by definition has to be a well
> formed <project> that
> >can be validated (using ANT). Once validated, you can reuse
> it without any
> >concern with respect to some bad input creating a badly
> formed project.
> So what you are saying is that *if* you can validate the file (ie by
> running presumably) and validate all it's inputs (again by
> runnning it)
> then it will run. riiiight.

I guess you have never taken a course in Theory of Computer Science and
such. Then you may understand what I am talking about. The principles I am
applying are the same ones that have produce strongly types languages as the
basis of modern computing languages.
You want to have and manipulate well defined strongly typed objects (in this
case <projects>) as oppose to loosely typed entities like those produced by
macro expansion (i.e., general templates).

> >Instantiations of <projectref> can only pass values (either
> properties or
> >types) the project doing the instantiation will only be
> valid if properties
> >are well defined and all typedef values follow the syntax of
> the type. This
> >can also be validated.
> So can most programming elements. I once saw an example of Z
> specification
> (validation/correcness proving language for PLs) that took
> something like
> 30 pages for a hal-page c program. Accept it that there is
> not a hope in
> hell of ant "validating" anything like you suggest.

There is a big difference between execution correctness, which I have not
being talking about, and program validity: whether the program makes sense.
You may not understand the difference because most modern programming
languages do not allow you to write invalid programs. That is what compiler
are suppose to fenced against. The fact that programs in Java can be proved
not only valid but safe (i.e., can be verified by the JVM verifier) is due
to the fact that the language was defined with very strong typing at its
core. And the JVM does this analysis everytime a class is loaded, even
though you do not see 30 or 50 pages of profs comming out on the side.

> >If I add more levels of <projectref> these rules apply the
> same way. If you
> >modified one of the included projects, as long as you do not
> change types
> >used in instantiations or rename target used ourside, you
> only need to check
> >the validity of the modified project to guarantee that any
> calling project
> >will continue to be valid.
> >
> >I doubt you can make the same claim for any valid XSLT, Velocity, or
> >whatever other template paradigm you may want to use.
> XSLT can offer similar features. You would know that if you knew XSLT.

I know XSLT. I have written XSLT, and no, in general XSLT does not give you
any guarantees. Can you write XSLT templates that follow these principles?
yes you can. Can you write templates that do not? yes you can. Can you
diferentiate one from the other by inspection of the templates, in general I
doubt it.

> >> Spagettis is what this produces - as thread of
> >> execution travels between each project constantly changing frames,
> >> terrorizing anyone who has to read it and try to understand
> >> the values of
> >> things without executing it.
> >
> >You mean just like what happens during method invocations in modern
> >programming languages? Did not know people got terrorized about that.
> er. You mean programming languages that have polymorphic
> representations?

No, I meant like applying "s/project/CLASS/" in your statement above:

"Spagettis is what this produces - as thread of
execution travels between each CLASS constantly changing frames,
terrorizing anyone who has to read it and try to understand
the values of things without executing it."

When a class calls methods in another we have exactly the same thing. The
class is instantiated with certain parameters, the caller invokes methods on
the class which causes a change in the execution frame. Variables and values
are now reffered by new names, in the new frame, values are modified in the
instance variables. Haven't heard of any good programmer being terrorized
about it. Now it the only thing you know if Visual Basic I may understand
their terror.

Jose Alberto

View raw message