Attribute grammars for unranked trees as a query language for structured documents

被引:8
作者
Neven, F [1 ]
机构
[1] Limburgs Univ Ctr, Dept WNI, Infolab, B-3590 Diepenbeek, Belgium
关键词
attribute grammars; unranked trees; XML; monadic second-order logic; expressiveness; complexity;
D O I
10.1016/j.jcss.2004.10.008
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Document specification languages, like for instance XML, model documents using extended context-free grammars. These differ from standard context-free grammars in that they allow arbitrary regular expressions on the right-hand side of productions. To query such documents, we introduce a new form of attribute grammars (extended AGs) that work directly over extended context-free grammars rather than over standard context-free grammars. Viewed as a query language, extended AGs are particularly relevant as they can take into account the inherent order of the children of a node in a document. We show that non-circularity remains decidable in EXPTIME and establish the complexity of the non-emptiness and equivalence problem of extended AGs to be complete for EXPTIME. As an application we show that the Region Algebra expressions can be efficiently translated into extended AGs. This translation drastically improves the known upper bound on the complexity of the emptiness and equivalence test for Region Algebra expressions from non-elementary to EXPTIME. Finally, we characterize the expressiveness of extended AGs in terms of monadic second-order logic. (C) 2004 Elsevier Inc. All rights reserved.
引用
收藏
页码:221 / 257
页数:37
相关论文
共 55 条
[1]   A logical view of structured files [J].
Abiteboul, S ;
Cluet, S ;
Milo, T .
VLDB JOURNAL, 1998, 7 (02) :96-114
[2]  
Abiteboul S., 1999, DATA WEB RELATIONS S
[3]   Normal form algorithms for extended context-free grammars [J].
Albert, J ;
Giammarresi, D ;
Wood, D .
THEORETICAL COMPUTER SCIENCE, 2001, 267 (1-2) :35-47
[4]  
BAEZAYATES R, 1996, ACM SIGMOD RECORD, V25, P67
[5]  
BAEZAYATES RA, 1999, MODERN INFORMATION R
[6]  
Beeri C, 1999, LECT NOTES COMPUT SC, V1540, P296
[7]  
Bloem R, 1997, LECT NOTES COMPUT SC, V1261, P144
[8]   A comparison of tree transductions defined by monadic second order logic and by attribute grammars [J].
Bloem, R ;
Engelfriet, J .
JOURNAL OF COMPUTER AND SYSTEM SCIENCES, 2000, 61 (01) :1-50
[9]  
Blum M., 1967, SWAT FOCS, P155, DOI [DOI 10.1109/FOCS.1967.6, 10.1109/FOCS.1967.6]
[10]  
BOCHMANN G, 1976, PUBLICATION U MONTRE, V195