| T. Chen, I. V. Ramakrishnan, and R. Ramesh. Multistage indexing algorithms for speeding prolog execution. Software - Practice and Experience, 24(12):1097--1119, 1994. |
....over a two pass operation can be substantial. 4.3. 1 Tries for Check Insert Operations Tries were originally invented to index strings, but given a fixed order of term traversal, they can be used to index terms as well, a point that has been made before in the literature (see, as one example, [11]) Example 4.3.2 provides an example of using a trie to index terms. Example 4.3.2 Suppose we are given the following fragment of a chemical database: 1) methoxymethanol(c(1) h(3) 2) methoxymethanol(c(1) h(4) 3) methoxymethanol(c(1) h(5) 4) methoxymethanol(o(2) c(1) 5) ....
T. Chen, I.V. Ramakrishnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In Proc. of the Int'l Conf. and Symp. on Logic Programming, pages 639--653, 1992.
....two should be self explanatory. Atoms are simply symbols that represent themselves. Prolog terms (trees) are constituted of integers, floats, atoms and other trees. A list in Prolog is written with square brackets and with its elements separated by commas. For example the following are lists: [1,2,3] [aa,bbb,d] 2,b] or,not, 2,b] The first is a list of integers, the second a list of atoms, the third is the empty list consisting of no elements, and the fourth is a list containing four elements, the first and last being themselves lists. So let s now write a program in a made up procedural ....
....of the list: member(X, X L] member(X, Y L] member(X,L) The first clause says that X is a member of a list whose head is X, an unexceptional statement. The second clause X is a member of a list if X is a member of the tail of the list. Example executions of member are: member(2,[1,2,3]) yes member(2, 1,3,4] no member(X, 1,2,3] X = 1; X = 2; X = 3; no Notice that we can use member to generate all the elements of a list. Aside: If you tried to compile this member program exactly as it is written here, you noticed that the XSB compiler issued some ....
[Article contains additional citation context not shown here]
T. Chen, I.V. Ramakrishnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In Proc. of the Int'l Conf. and Symp. on Logic Programming, pages 639--653, 1992.
....indexing is a novel technique which uses a sequence of folding and unfolding operations to construct a non deterministic indexing automaton at compile time. Transformational indexing, which will be discussed fully in a separate paper, compares quite favorably with techniques such as [1], while at the same time being much simpler to implement. Example 4.2 Consider the predicate p(g(a) f(X) p(g(a) f(a) p(g(b) f(1) p(g(X) Y) when compiled with transformational indexing. Given a mode p( Transformational indexing factors out the g 1 structure before indexing on its ....
T. Chen, I.V. Ramakrishnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In Proc. of the Int'l Conf. and Symp. on Logic Programming, pages 639--653, 1992.
....aid in prioritizing and implementing these optimizations. A few of the more pertinent areas are: ffl Improving indexing. This is important not only for clauses as in Prolog, but for SLG calls and answers as well. The XSB development team is presently working on this, using ideas based partly on [1]. Put succinctly, the idea is to model indexing automata as code transformation. The accepting states of these automata are program clauses (tabled or not) which can be precisely indexed and which contain a minimalamount of head unification. The latter condition is important since minimizing head ....
T. Chen, I.V. Ramakirshnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In Proc. of the Int'l Conf. and Symp. on Logic Programming, pages 639--653, 1992.
....from results in Prolog implementation, about an order of magnitude speedup appears to be possible for the SLG WAM. A few of the more important aspects are: ffl Improve indexing, especially for SLG calls and answers. The XSB development team is presently working on this, using ideas based on [2]. ffl Make better use of mode information, both static, and when it is dynamically obtained (for instance, detection of ground subterms in answer clauses can reduce copying) ffl Introduce bottom up rewriting techniques into the compiler to transform inefficient programs into programs more ....
T. Chen, I.V. Ramakrishnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In Proc. of the Joint Int'l Conf. and Symp. on Logic Programming, pages 639--653. ACM, 1992.
....its declarative language features, XSB offers flexible indexing along with efficient I O mechanisms to link XSB with a modifiable backing store. XSB offers hash based (WAM style) indexing on alternate arguments of a tuple or on combinations of arguments. It also implements first string indexing [1], a variant of path based indexing, which stores parts of clauses in a discrimination network. For I O, XSB offers fast dynamic compilation along with linking and unlinking of dynamic code. Version 1.3 of XSB has been tested on over a dozen hardware and operating system platforms 2 and on ....
....uses only the outer functor symbol of a given argument. For static (or compiled) user predicates, the compiler accepts a directive that indicates the field on which a hash index is to be constructed. As an alternative to hash based indexing, XSB offers first string indexing for static predicates [1]. First string indexing works by navigating a trie constructed at compile time. Tries are used as a means of discriminating strings of symbols. First string indexing constructs a string from the preorder traversal of the heads of a predicate, where the traversal terminates as soon as a variable is ....
T. Chen, I.V. Ramakrishnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In Proceedings of the Joint International Conference and Symposium on Logic Programming, pages 639--653. MIT Press, 1992.
.... limitations we must assume a knowledge of the WAM[1] 2 Tries for Check Insert Operations Tries were originally invented to index strings, but given a fixed order of term traversal, they can be used to index terms as well, a point that has been made before in the literature (see, as one example, [3]) Example 2.1 provides an example of indexing terms using a trie. Example 2.1 Suppose we are given the following fragment of a chemical database: 1) methoxymethanol(c(1) h(3) 2) methoxymethanol(c(1) h(4) 3) methoxymethanol(c(1) h(5) 4) methoxymethanol(o(2) c(1) 5) ....
T. Chen, I.V. Ramakirshnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In Proc. of the Int'l Conf. and Symp. on Logic Programming, pages 639--653, 1992.
....to its declarative language features, XSB offers flexible indexing along with efficient IO mechanisms to link XSB with a changeable backing store. XSB offers hash based (WAM style) indexing on alternate arguments of a tuple or on combinations of arguments. It also implements first string indexing [1], a variant of path based indexing, which stores parts of clauses in a discrimination network. For IO, XSB offers fast dynamic compilation along with linking and unlinking of dynamic code. Version 1.4 of XSB has been tested on over a dozen hardware and operating system platforms 2 and on ....
....problem for database applications: only one index is allowed per predicate, and that index can be on only one argument. XSB removes these limitations in two ways, through extensions of hash based (Prolog style) indexing, and through the introduction of more sophisticated first string indexing[1]. It should be mentioned in passing that the user is not required to understand indexing at a low level. However, like a number of database systems, XSB does provide methods for intervention when default behavior requires tuning. Hash based indexing is the standard for Prolog. Prolog indexes on ....
T. Chen, I.V. Ramakirshnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In Proceedings of the Joint International Conference and Symposium on Logic Programming, pages 639--653. ACM, 1992.
....for win 1 on Complete Binary Tree built on findall 3. Also, while XSB allows indexing on alternate arguments and on joint arguments for dynamic predicates, the indexing is on the first level of the prescribed arguments. Work is presently being done to support more supple indexing, based on [2]. 4 Breakdown of SLG WAM Instructions We hope that the previous sections have demonstrated the speed of SLG in XSB. We now turn our attention to analyzing XSB s instruction set, to account for why it is so fast, and try to lay the groundwork for future improvements. This section presents some ....
....the engine. This not only includes the factoring mentioned above, but also existential query detection [9] as well as new methods specifically designed for XSB. ffl Improve indexing, especially for SLG calls and answers. The XSB development team is presently working on this, using ideas based on [2]. ffl Make better use of mode information, both when it is statically declared or inferred, and when it is dynamicly obtained (for instance, not copying arguments ground for a call into a return for that call) ffl Improve the SLG WAM engine by either coding parts of it in assembly code as ....
T. Chen, I.V. Ramakirshnan, and R. Ramesh. Multistage indexing algorithms for speeding prolog execution. In Proceedings of the Joint International Conference and Symposium on Logic Programming, pages 639--653. ACM, 1992.
....of predicates used in that rule. With an appropriate indexing scheme, these conditions can be tested, and the unsuccessful branches can be pruned, thus reducing backtracking. Such testing and clause selection can be performed efficiently using powerful indexing techniques developed recently[CRR92, RRW90], enabling determinate programs to be evaluated without the overhead of backtracking. The main contributions of the present work are ffl a general method to identify determinacy. ffl a uniform analysis that reveals the interaction between top down and bottom up information needed to detect ....
....(X1 = X1 = 2 = X1 = j ] 5 From Determinacy to Determinism In order to realize the practical benefits from the detected determinacy it is crucial to discriminate among the clauses of a predicate based on the clause conditions. Techniques have been recently developed [HM89, RRW90, CRR92] that can index clause heads based on all the information appearing in the head. We can therefore build a discrimination net based on these techniques. It should be noted that these conditions may involve testing variables and terms that are not ground. For instance, a clause may have (X = as ....
Ta Chen, I. V. Ramakrishnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In Logic Programming: Proceedings of the Joint International Conference and Symposium, pages 639--653, 1992.
....capital letters (possibly subscripted) denote variables. We use the terms call and subgoal interchangeably, as well as the terms answer and return. The trie data structure was originally invented to index dictionaries [8] and has since been generalized (as discrimination nets) to index terms (see [2] for use of tries in indexing logic programs and [1, 5, 10, 17] for automated theorem proving and term rewriting) We will use a variant of the discrimination net in [1] as the data structure for tabling calls and returns. We refer to it as the tabling trie. The essential idea underlying a ....
T. Chen, I. V. Ramakrishnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In K. Apt, editor, Proceedings of the Joint International Conference and Symposium on Logic Programming, pages 639-- 653, Washington, USA, 1992. The MIT Press.
....capital letters (possibly subscripted) denote variables. We use the terms call and subgoal interchangeably, as well as the terms answer and return. The trie data structure was originally invented to index dictionaries [7] and has since been generalized (as discrimination nets) to index terms (see [2] for use of tries in indexing logic programs and [1, 6, 8, 10, 15, 19] for automated theorem proving 4 and term rewriting) We will use a variant of the discrimination net in [1] as the data structure for tabling calls and their answers. We refer to it as the tabling trie. The essential idea ....
T. Chen, I. V. Ramakrishnan, and R. Ramesh. Multistage Indexing Algorithms for Speeding Prolog Execution. Software Practice and Experience, 24(12):1097--1119, Dec. 1994.
....letters (possibly subscripted) denote variables. We use the terms call and subgoal interchangeably, as well as the terms answer and return. The trie data structure was originally invented to index dictionaries [10] and has since been generalized (as discrimination nets) to index terms (see [2] for use of tries in indexing logic programs 2 The system runs under most UNIX platforms, as well as under DOS and Microsoft Windows. and [1, 6, 12] for automated theorem proving and term rewriting) We will use a variant of the discrimination net in [1] as the data structure for tabling calls ....
T. Chen, I. V. Ramakrishnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In K. Apt, editor, Proceedings of the Joint International Conference and Symposium on Logic Programming, pages 639--653, Washington, USA, 1992. The MIT Press.
....of clause heads with a goal can be enhanced by sharing unification operations not only in the indexing phase but also in the unification phase. Although techniques for sharing tests needed for computing match sets have been extensively researched (such as indexing techniques for logic programming [Chen et al. 1992; Hans 1992; Hickey and Mudambi 1989; Palmer and Naish 1991; Ramesh et al. 1990; Zhou 1993] pattern matching for functional and term rewriting systems [Sekar et al. 1992] and decision trees for concurrent logic languages [Kliger and Shapiro 1991; Tick and Korsloot 1994] optimizing the sharing ....
....has been little explored. Extant indexing techniques in logic programming, on completing indexing, unify each clause head in the match set separately with the goal. That is, execution after indexing is not optimized. Even rescanning parts already seen during indexing is seldom avoided (see Chen et al. 1992] and Hans [1992] since in general this requires either large indexing structures (e.g. the switching tree of Hickey and Mudambi [1989] or elaborate information to be maintained and manipulated at run time. In any case, since each clause head is unified separately with the goal, the other ....
[Article contains additional citation context not shown here]
Chen, T., Ramakrishnan, I. V., and Ramesh, R. 1992. Multistage indexing algorithms for speeding Prolog execution. In Joint International Conference and Symposium on Logic Programming. MIT Press, Cambridge, Mass., 639--653.
....goal can be considerably enhanced by sharing the unification operations not only in the indexing but also in the unification phase. Although techniques for sharing tests needed for computing match sets have been extensively researched (such as indexing techniques for logic programming, e.g. see [8, 1, 7, 4, 5, 13]; pattern matching for functional and term rewriting systems e.g. see [10] and decision trees for concurrent logic languages e.g. 6, 11] optimizing the sharing of unification operations has not been explored. Extant indexing techniques in logic programming, on completing indexing, unify each ....
....operations has not been explored. Extant indexing techniques in logic programming, on completing indexing, unify each clause head in the match set separately with the goal. That is, execution after indexing is not optimized. Even rescanning parts already seen during indexing is seldom avoided (see [1, 4]) since in general this requires either large indexing structures (e.g. the switching tree of [5] or elaborate information to be maintained and manipulated at run time. In any case since each clause head is unified separately with the goal, the other problem of sharing substitutions still ....
[Article contains additional citation context not shown here]
T. Chen, I. V. Ramakrishnan, and R. Ramesh. Multistage indexing algorithms for speeding Prolog execution. In Joint International Conference/Symposium on Logic Programming, pages 639--653, 1992.
No context found.
T. Chen, I. V. Ramakrishnan, and R. Ramesh. Multistage indexing algorithms for speeding prolog execution. Software - Practice and Experience, 24(12):1097--1119, 1994.
Online articles have much greater impact More about CiteSeer.IST Add search form to your site Submit documents Feedback
CiteSeer.IST - Copyright Penn State and NEC