Tabled evaluation has been proved an effective method to improve several aspects of goal-oriented... more Tabled evaluation has been proved an effective method to improve several aspects of goal-oriented query evaluation, including termination and complexity. Several "native" implementations of tabled evaluation have been developed which offer good performance, but many of them require significant changes to the underlying Prolog implementation, including the compiler and the abstract machine. Approaches based on program transformation, which tend to minimize changes to both the Prolog compiler and the abstract machine, have also been proposed, but they often result in lower efficiency. We explore some techniques aimed at combining the best of these worlds, i.e., developing an extensible implementation which requires minimal modifications to the compiler and the abstract machine, and with reasonably good performance. Our preliminary experiments indicate promising results.
We describe the MyYapDB, a deductive database system coupling the Yap Prolog compiler and the MyS... more We describe the MyYapDB, a deductive database system coupling the Yap Prolog compiler and the MySQL DBMS. We use our OPTYap extension of the Yap compiler, which is the first available system that can exploit parallelism from tabled logic programs. We describe the major features of the system, give a simplified description of the implementation and present a performance comparison of using static facts or accessing the facts as MySQL tuples for a simple example.
Resumo 9 Résumé 11 List of Tables 19 List of Figures 1.2. THESIS OUTLINE 29 with current versions... more Resumo 9 Résumé 11 List of Tables 19 List of Figures 1.2. THESIS OUTLINE 29 with current versions of XSB. Furthermore, the results show that OPTYap maintains YapOr's speedups for parallel execution of non-tabled programs, and that there are tabled applications that can achieve very high performance through parallelism. In our study we gathered detailed statistics on the execution of each benchmark program to help us in understanding and explaining some of the parallel execution results. Ultimately, this thesis aims at substantiating our belief that tabling and parallelism can together contribute to increasing the range of applications for Logic Programming. 1.2 Thesis Outline The thesis is structured in nine major chapters that, in some way, reflect the different phases of the work. We provide a brief description of each chapter next. Chapter 1: Introduction. Is this chapter. Chapter 2: Logic Programming, Parallelism and Tabling. Provides a brief introduction to the concepts of logic programming, parallel logic programming, and tabling, focusing on Prolog, or-parallelism, SLG resolution, and abstract machines for standard Prolog and tabling, namely the WAM and the SLG-WAM. Chapter 3: YapOr: The Or-Parallel Engine. Presents the design and implementation of the YapOr Prolog system. It introduces the general concepts of the environment copying model, and then describes the major implementation issues to extend the Yap Prolog system to support the model. Most of YapOr's development was prior to the present work. Chapter 4: Yap Tab: The Sequential Tabling Engine. First, it briefly describes the fundamental aspects of the SLG-WAM abstract machine, and then details YapTab's implementation. This includes discussing the motivation and major contributions of the YapTab design, and presenting the main data areas, data structures and algorithms to extend the Yap Prolog system to support sequential tabling. YapTab has been designed and implemented from scratch and its development was the first step towards the current or-parallel tabling system. Chapter 5: Parallel Tabling. In this chapter we propose two new computational models, OPT and TOP, to efficiently implement the parallel evaluation of tabled CHAPTER 1. INTRODUCTION logic programs. Initially, we describe related work to get an overall view of alternative approaches to parallel tabling. Next, we introduce and detail the fundamental aspects underlying the new computational models, and then we discuss their advantages and disadvantages. At last, we focus on the OPT computational model in order to discuss its implementation framework. Chapter 6: OPTYap: The Or-Parallel Tabling Engine. Presents the implementation details for the OPTYap engine. We start by presenting an overall view of the main issues involved in the implementation of the or-parallel tabling engine and then we introduce and detail the new data areas, data structures and algorithms used to implement it. Chapter 7: Speculative Work. Discusses the problems arising with speculative computations and introduces the mechanisms used in YapOr and OPTYap to deal with them. Initially, we introduce the cut semantics and its particular behavior within or-parallel systems. Next, we present the cut scheme implemented in YapOr and then discuss speculative tabling execution and present the support currently implemented in OPTYap. Chapter 8: Performance Analysis. In this chapter we assess the efficiency of the or-parallel tabling implementation by presenting a detailed performance analysis. We start by reporting an overall view of the overheads of supporting the several Yap extensions: YapOr, YapTab and OPTYap. Next we compare OPTYap's performance with that of YapOr on a similar set of non-tabled programs. Then we use a set of tabled programs to measure the sequential behavior of YapTab, OPTYap and XSB, and to assess OPTYap's performance when running the tabled programs in parallel. At last, we study the impact of using different locking schemes to deal with concurrent accesses to the table space data structures. Chapter 9: Concluding Remarks. Discusses the research, summarizes the contributions and suggests directions for further work. Chapters 4, 6 and 7 include pseudo-code for some important procedures. In order to allow an easier understanding of the algorithms being presented in such procedures, the code corresponding to potential optimizations or synchronizations is never included, unless its inclusion was essential for the description. The Prolog code for the set of benchmarks used in Chapter 8 is included, at the end of the thesis, as Appendix A.
Uploads
Papers by Ricardo Rocha