[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

XQuery static typing algorithms?

Per Bothner per at bothner.com
Mon Nov 24 07:29:49 PST 2008


  XQuery static typing algorithms?
Thanks to both Jens Teubner and Bas de Bakker for your suggestions!

Jens Teubner wrote:
> My personal impression is that, if you want to be standards-compliant, the
> best way to start is to literally implement all the judgments in the W3C
> Formal Semantics.

In general that is good advice, but when it comes to subtyping, then
the Formal Semantics doesn't provide judgements that are implementable,
as far as I can tell:

8.3.2 Subtyping (<:)

...

Note

The above definition, although complete and precise, does not give a 
simple means to compute subtyping. Notably the definition above refers 
to values, which are not available at static type checking time.

The structural component of the [XPath/XQuery] type system can be 
modeled by regular expressions. Regular expressions can be implemented 
by means of finite state automata. Computing subtyping between two types 
can then be done by computing if inclusion holds between their 
corresponding finite state automata.

Finite state automata and how to compute operations on those automata, 
such as inclusion, emptiness or intersection, have been extensively 
studied and documented in the literature. The interested reader can 
consult the relevant literature on tree grammars, for instance 
[Languages], or [TATA].
-- 
	--Per Bothner
http://x-query.com/mailman/listinfo/talk   http://per.bothner.com/


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-2007 All Rights Reserved.