"Jeff Kenton" <jkenton(_at_)datapower(_dot_)com> wrote in message
news:3EE8719E(_dot_)8010106(_at_)datapower(_dot_)com(_dot_)(_dot_)(_dot_)
Dimitre Novatchev wrote:
One *cannot know* if a program will terminate -- unless this property
has a
strict proof.
This is known as The Halting Problem. The following link has a nice
description of it:
http://www.wikipedia.org/wiki/Halting_problem
Yes, that's nice
On the other hand, the original poster had a program that he knew halted.
All he wanted was some instrumentation to count loop iterations and measure
timing.
To be exact, the OP wrote:
"Does anyone know of a program that will evaluate an xsl:for-each loop to
tell the number of computations the loop is doing? Or the speed of the
algorithm (ie O(n log n) ...)."
My answer adresses his last sentence -- claims like "this algorithm has a
O(n log n) complexity" always have to be proven.
This proof will necessarily include a correctness proof -- hence the halting
problem was also mentioned.
=====
Cheers,
Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list