[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Re: xsl:for-each evaluator?

Subject: Re: Re: xsl:for-each evaluator?
From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx>
Date: Wed, 11 Jun 2003 23:12:41 +0200
integral logx
"Jeff Kenton" <jkenton@xxxxxxxxxxxxx> wrote in message
news:3EE79057.1020506@xxxxxxxxxxxxxxxx
> Dimitre Novatchev wrote:
> > In case you were asking about the time it would take to evaluate the
> > xsl:for-each, the answer is that this in general is impossible to
predict -- 
> > there is a theorem in the theory of Algorithms (about universal
functions, I
> > think), which states that in general it is impossible if a computation
is
> > going to terminate.
> >
>
> Well, theory is a wonderful thing, but in this case the original poster
knew it was going to terminate.  All he wanted was a way to count the passes
through the loop and a way to measure how long it took.
>
> Some things are easier in the real world than in theory.


One *cannot know* if a program will terminate -- unless this property has a
strict proof.

Do you know with 100% certainty that a program has no bugs? Even if it is
proven that a program is correct, the termination condition may still depend
on the data -- e.g. calculating an integral in an interval, where there is a
point on which the function is not well defined -- e.g. Integral(logX)(0,1)
is non-terminating, but Integral(logX)(eps, 1) where eps is sufficiently
close to zero is terminating and may "take forever" to terminate.

Or the very simple case, when the code is an endless recursion -- then the
evaluation of xsl:for-each will not terminate but will itself be terminated.

I repeat what I was saying -- it is not known what piece of code would be
put in the body of the xsl:for-each instruction. In case the original
question asks how to measure the time it takes to evaluate this xsl:for-each
instruction, the answer is that generally this is impossible, because there
might be some very long computation inside the body of xsl:for-each, which
could take indefinitely long.


=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL




 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.