1 1 Thank you, Hello, Joint work with …
3 2 XQuery (3.0) looks like that: 2 functions …
4 Path expressions to navigate
5 List comprehension syntax
9 3 Pros and Cons of XQuery
11 4 CDuce : Syntax similar to OCaml
12 Patterns (in part. XML constructs with tag, attributs, list of children)
13 Types! (with constructors, intersections, …)
14 List comprehension too.
16 5 Pros and Cons of CDuce
18 6 This work (support for path navigation, using zippers …) Can be used to typecheck XQuery programs
19 I'm gonna focus on 1 in this talk
22 Allows to encode regular expression types
28 10 CDuce patterns ( Unify typecase and value case, capture variables, destructors, alternation, intersection)
29 Semantics is to return a set of bindings
30 CDuce patterns are typed very precisely
32 11 Patterns examples : like types but with capture variables
34 So we have this nice functional languages, how to navigate (with upward axes)
38 13 Example of zippers and basic operations
40 14 Zipper types recursive too, which allows to write reg exps.
42 15 Already we can check complex conditions
44 16 Operators & Accumulators
46 17 Some operators, we'll see why we want them to be built-in
48 18 Simplified, pattern matching semantics. Only a few rules.
50 19 Typing patterns with accumulators need approximation
52 20 Typing patterns with accumulators using accumulators
56 22 Encoding XPath Downward
58 Child applied to some document (root, unfold regular expression and try alternatives)
59 Returns this binding, with zippers inside!
60 descendant-or-self (recursively apply child). We update zippers
66 Parent : current node is e
67 First walk up and check that it's someone's left child
68 Then walk backwards to skip the previous siblings
69 Then finaly capture the parent