Lecture 6 Notes

This closely matches the algorithms as presented in

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: essary in order to use this library. The DJ library includes a powerful language of traversal specifications and methods, including the possibility of precomputing the FIRST sets; see [3]. An introduction to DJ, with emphasis on its reflective properties, may be found in [13]. 8 Related Work The concept of automated traversal generation using succinct representation was introduced in [15] and is extensively treated in [8], where it is the key idea of Adaptive Programming (AP). Our most complex language of traversal specifications, called strategy graphs, is introduced in [10] together with an efficient implementation. This paper provides a self-contained description of the semantics and algorithms for Adaptive Programming in a few pages. Instead of refering to paths in the class diagram as [10] does, the basic meaning is defined directly in terms of object graphs. By dealing directly with the search algorithm in the object graph, it avoids the complications of the traversal histories of [15]. In the context of object-oriented databases, traversals are heavily used. Some automation of traversals was suggested in [12, 16, 11, 7, 5]. Roughly speaking, the idea in these papers is to traverse to a target without specifying the full path leading to it. Most of this work concerns what we call minimal R-paths; however the primary concern is how to complete the abbreviation when it is ambiguous, some- 12 times using heuristics. DJ takes advantage of reflection to complete its queries. Mendelzon and Wood [?] show the computational intractability of finding actual paths in an object graph, even without the presence of inheritance. We avoid this difficulty because we are searching only for potential paths and accept the possibility of traversing nodes that are not actually on a path to the target class. The XPath [2] language is used to specify sets of elements in XML documents. XPath uses a succinct notation somewhat like ours; for example, the XPath expression refers to the set of all -objects reachable from the -object. The semantics of an XPath expression is an unordered set of objects. This closely matches the algorithms as presented in section 5, although our implementation in DJ also captures the paths by allowing visitors to be called on all objects in those paths. ¦ ¤ ¦ ¸¸ E¤ The Visitor design pattern is discussed in many software-engineering works (e.g., [4]). While this approach identifies and isolates the task of traversal, no mechanism to automate the task and make it adaptive was previously proposed, except in [8, 10]. 9 Conclusions and Future Work We have presented a semantics for a declarative specification of object-graph traversals. Our organization sepa...
View Full Document

Ask a homework question - tutors are online