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

Re: XQuery types was Re: Yet another plea for XUpd


Re:  XQuery types was Re:  Yet another plea   for XUpd
Michael Kay wrote:

> > Please prove this assertion untrue. XML type systems (especially with
> > W3C XML Schema) are based on constraints. Constraints are runtime
> > issues....
>
> There's a misunderstanding here. No static analysis of any program can
> classify programs unambiguously as correct or incorrect; if that were the
> case it would never be necessary to execute a program. The purpose of
static
> checking is to reject as many incorrect programs as possible before
> executing them.

Exactly. Generally, if a logical analysis yields "false" for the entire
range of input, there is no need to "run" the program against any input e.g.

for all ?x (?x and not ?x)

since this is "false" for all things, there is no need to test individual
things i.e. run the program.

> ... An interesting design choice is the extent to which we
> reject the programs that might or might not be correct, depending on the
> input data. Typically we solve this by distinguishing structural
> constraints, which can be checked statically, from value-based
constraints,
> which can't: but it's a fuzzy boundary.
>

The value based constraints need to be expressed against variables in the
program, for example, when operations are carried out against constants, any
decent compiler can easily factor these out i.e. "execute" the program
against the constant values. The formalism behind such analysis is discussed
as an "Abstract State Machine" see http://www.eecs.umich.edu/gasm/
As you say, the degree to which a compiler performs such optimizations is a
design choice.

Jonathan


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.