Automatic mode inference for logic programs
Journal of Logic Programming
Statistical profile estimation in database systems
ACM Computing Surveys (CSUR)
Static inference of modes and data dependencies in logic programs
ACM Transactions on Programming Languages and Systems (TOPLAS)
Warren's abstract machine: a tutorial reconstruction
Warren's abstract machine: a tutorial reconstruction
POPL '77 Proceedings of the 4th ACM SIGACT-SIGPLAN symposium on Principles of programming languages
An optimised semantic web query language implementation in prolog
ICLP'05 Proceedings of the 21st international conference on Logic Programming
Hi-index | 0.00 |
The efficiency of query execution in Prolog depends on the order in which subgoals are stated. Optimizing a query consists of reducing the number of alternatives to be explored by finding a more efficient order for the evaluation of subgoals. Query reordering can be particularly important when the code is generated by a translator, such as the GraphLog translator, one of the tools in 4Thought, a collection of software design tools and methods for assisting software designers.Finding better orderings for the subgoals is easier if estimates of the evaluation costs for the individual subgoals are available. The total cost for a particular ordering can be estimated as the sum of the individual costs of the subgoals, where the cost of each subgoal will depend on the degree of instantiation of its arguments as well as on characteristics of the underlying database.A model of execution for Prolog that can be used to determine estimates of execution costs for any possible query is desirable. This model may be related to the costs of primitive operations that occur during query execution, such as variable unification, backtracking, etc. Thus, the problem is reduced to that of finding the expected number of these basic operations that are performed in the evaluation of a given subgoal. We can easily estimate these quantities in the simple case of a query retrieval. All we need is accurate knowledge of the database profile.