XQuery and Static Typing: Tackling the Problem of Backward Axes

Pierre Genevès 1 Nils Gesbert 1
1 TYREX - Types and Reasoning for the Web
Inria Grenoble - Rhône-Alpes, LIG - Laboratoire d'Informatique de Grenoble
Abstract : XQuery is a functional language dedicated to XML data querying and manipulation. As opposed to other W3C-standardized languages for XML (e.g. XSLT), it has been intended to feature strong static typing. Currently, however, some expressions of the language cannot be statically typed with any precision. We argue that this is due to a discrepancy between the semantics of the language and its type algebra: namely, the values of the language are (possibly inner) tree nodes, which may have siblings and ancestors in the data. The types on the other hand are regular tree types, as usual in the XML world: they describe sets of trees. The type associated to a node then corresponds to the subtree whose root is that node and contains no information about the rest of the data. This makes navigation expressions using `backward axes,' which return e.g. the siblings of a node, impossible to type. We discuss how to handle this discrepancy by improving the type system. We describe a logic-based language of extended types able to represent inner tree nodes and show how it can dramatically increase the precision of typing for navigation expressions. We describe how inclusion between these extended types and the classical regular tree types can be decided, allowing a hybrid system combining both type languages. The result is a net increase in precision of typing.
Type de document :
Communication dans un congrès
ICFP (International Conference on Functional Programming), Aug 2015, Vancouver, Canada. ACM SIGPLAN International Conference on Functional Programming, <http://icfpconference.org/icfp2015/>. <10.1145/2784731.2784746>
Liste complète des métadonnées

https://hal.inria.fr/hal-01082635
Contributeur : Tyrex Equipe <>
Soumis le : jeudi 29 décembre 2016 - 12:02:47
Dernière modification le : jeudi 5 janvier 2017 - 01:16:52
Document(s) archivé(s) le : lundi 20 mars 2017 - 20:40:58

Fichier

icfp2015.pdf
Fichiers produits par l'(les) auteur(s)

Identifiants

Collections

Citation

Pierre Genevès, Nils Gesbert. XQuery and Static Typing: Tackling the Problem of Backward Axes. ICFP (International Conference on Functional Programming), Aug 2015, Vancouver, Canada. ACM SIGPLAN International Conference on Functional Programming, <http://icfpconference.org/icfp2015/>. <10.1145/2784731.2784746>. <hal-01082635v3>

Partager

Métriques

Consultations de
la notice

66

Téléchargements du document

61