|
[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
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! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








