25 research outputs found
Algorithms and Implementation
In the past few years Tabling has emerged as a powerful logic programming model.
The integration of concurrent features into the implementation of Tabling systems is
demanded by need to use recently developed tabling applications within distributed
systems, where a process has to respond concurrently to several requests. The support
for sharing of tables among the concurrent threads of a Tabling process is a desirable
feature, to allow one of Tabling’s virtues, the re-use of computations by other threads
and to allow efficient usage of available memory. However, the incremental completion
of tables which are evaluated concurrently is not a trivial problem.
In this dissertation we describe the integration of concurrency mechanisms, by the
way of multi-threading, in a state of the art Tabling and Prolog system, XSB. We begin
by reviewing the main concepts for a formal description of tabled computations,
called SLG resolution and for the implementation of Tabling under the SLG-WAM, the
abstract machine supported by XSB. We describe the different scheduling strategies
provided by XSB and introduce some new properties of local scheduling, a scheduling
strategy for SLG resolution.
We proceed to describe our implementation work by describing the process of integrating
multi-threading in a Prolog system supporting Tabling, without addressing
the problem of shared tables. We describe the trade-offs and implementation decisions
involved.
We then describe an optimistic algorithm for the concurrent sharing of completed
tables, Shared Completed Tables, which allows the sharing of tables without incurring
in deadlocks, under local scheduling. This method relies on the execution properties
of local scheduling and includes full support for negation. We provide a theoretical
framework and discuss the implementation’s correctness and complexity.
After that, we describe amethod for the sharing of tables among threads that allows
parallelism in the computation of inter-dependent subgoals, which we name Concurrent
Completion. We informally argue for the correctness of Concurrent Completion.
We give detailed performance measurements of the multi-threaded XSB systems
over a variety of machines and operating systems, for both the Shared Completed Tables
and the Concurrent Completion implementations. We focus our measurements inthe overhead over the sequential engine and the scalability of the system.
We finish with a comparison of XSB with other multi-threaded Prolog systems and we compare our approach to concurrent tabling with parallel and distributed methods for the evaluation of tabling. Finally, we identify future research directions
On applying Or-Parallelism and Tabling to logic programs
Dissertação de Doutoramento em Ciência de Computadores apresentada à Faculdade de Ciências da Universidade do Port
Extending the Finite Domain Solver of GNU Prolog
International audienceThis paper describes three significant extensions for the Finite Domain solver of GNU Prolog. First, the solver now supports negative integers. Second, the solver detects and prevents integer overflows from occurring. Third, the internal representation of sparse domains has been redesigned to overcome its current limitations. The preliminary performance evaluation shows a limited slowdown factor with respect to the initial solver. This factor is widely counterbalanced by the new possibilities and the robustness of the solver. Furthermore these results are preliminary and we propose some directions to limit this overhead
On Fast Large-Scale Program Analysis in Datalog
Designing and crafting a static program analysis is challenging due to the complexity of the task at hand. Among the challenges are modelling the semantics of the input language, finding suitable abstractions for the analysis, and handwriting efficient code for the analysis in a traditional imperative language such as C++. Hence, the development of static program analysis tools is costly in terms of development time and resources for real world languages. To overcome, or at least alleviate the costs of developing a static program analysis, Datalog has been proposed as a domain specific language (DSL).With Datalog, a designer expresses a static program analysis in the form of a logical specification. While a domain specific language approach aids in the ease of development of program analyses, it is commonly accepted that such an approach has worse runtime performance than handcrafted static analysis tools. In this work, we introduce a new program synthesis methodology for Datalog specifications to produce highly efficient monolithic C++ analyzers. The synthesis technique requires the re-interpretation of the semi-naïve evaluation as a scaffolding for translation using partial evaluation. To achieve high-performance, we employ staged compilation techniques and specialize the underlying relational data structures for a given Datalog specification. Experimentation on benchmarks for large-scale program analysis validates the superior performance of our approach over available Datalog tools and demonstrates our competitiveness with state-of-the-art handcrafted tools