Skip to main content Accessibility help
×
Hostname: page-component-848d4c4894-x5gtn Total loading time: 0 Render date: 2024-06-10T02:28:07.951Z Has data issue: false hasContentIssue false

13 - Logic-based queries

from PART II - ADVANCED TOPICS

Published online by Cambridge University Press:  05 July 2014

Haruo Hosoya
Affiliation:
University of Tokyo
Get access

Summary

In this chapter we present the third approach to subtree extraction, namely, firstorder (predicate) logic, and its extension, monadic second-order logic (MSO). An advantage of using logic-based queries is that this allows a direct way of expressing retrieval conditions. That is, we do not need to specify the structure of a whole tree (as for patterns in Chapter 5) nor to navigate around the tree (as for path expressions in Chapter 12); we simply need to specify the logical relationships among relevant nodes. Furthermore MSO can express any regular queries, that is, it is at least as powerful as marking tree automata (and thus patterns). However, MSO can express no more than regular queries; indeed, any MSO formula can be translated to a marking tree automaton (Chapter 6). It does mean, however, that we can use efficient on-the-fly algorithms (Chapter 8).

First-order logic

When we consider a logical framework, we usually think of models on which logic formulas are interpreted. In our setting, the models are XML documents; for simplicity, we consider here the binary tree format. Then we can talk about whether a given (binary) tree satisfies a given logic formula.

Type
Chapter
Information
Foundations of XML Processing
The Tree-Automata Approach
, pp. 161 - 175
Publisher: Cambridge University Press
Print publication year: 2010

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

  • Logic-based queries
  • Haruo Hosoya, University of Tokyo
  • Book: Foundations of XML Processing
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9780511762093.014
Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

  • Logic-based queries
  • Haruo Hosoya, University of Tokyo
  • Book: Foundations of XML Processing
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9780511762093.014
Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

  • Logic-based queries
  • Haruo Hosoya, University of Tokyo
  • Book: Foundations of XML Processing
  • Online publication: 05 July 2014
  • Chapter DOI: https://doi.org/10.1017/CBO9780511762093.014
Available formats
×