This preview shows page 1. Sign up to view the full content.
Unformatted text preview: essary in order to use this library.
The DJ library includes a powerful language of traversal speciﬁcations and
methods, including the possibility of precomputing the FIRST sets; see . An
introduction to DJ, with emphasis on its reﬂective properties, may be found in
. 8 Related Work The concept of automated traversal generation using succinct representation was
introduced in  and is extensively treated in , where it is the key idea of
Adaptive Programming (AP). Our most complex language of traversal speciﬁcations, called strategy graphs, is introduced in  together with an efﬁcient 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  does, the basic meaning is deﬁned 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 .
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 reﬂection to complete its queries.
Mendelzon and Wood [?] show the computational intractability of ﬁnding actual paths in an object graph, even without the presence of inheritance. We avoid
this difﬁculty 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  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
¦ ¤ ¦ ¸¸
E¤ The Visitor design pattern is discussed in many software-engineering works
(e.g., ). While this approach identiﬁes 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 speciﬁcation of object-graph traversals. Our organization sepa...
View Full Document
- Fall '09