17 research outputs found
WAM extensions for implementing higher order logic languages
Σε δημοσίευσή τους, οι Χαραλαμπίδης κ.ά. παρουσιάζουν μία εκδοχή της Prolog η οποία βασίζεται σε λογική υψηλότερης τάξης με Extensional Semantics (HOPES). Μία από τις προτάσεις της δημοσίευσης για περαιτέρω έρευνα είναι η δημιουργία μίας τροποποιημένης εκδοχής της WAM, ικανής να εκτελέσει τη HOPES. Μία τέτοια υλοποίηση περιγράφεται στην εργασία αυτή.In their publication, Charalambidis et al. propose a Higher-order version of Prolog with Extensional Semantics (HOPES). One of the suggestions in the paper for further research is to create a modification for WAM capable of running HOPES. Such an implementation is described in this thesis
A feasibility Study: The Succinct Solver v2.0, XSB Prolog v2.6, and Flow-Logic Based Program Analysis for Carmel
Number: SECSAFE-IMM-008-1.0 Classification: Internal Abstract. We perform a direct comparison of the Succinct Solver v2.0 and XSB Prolog v2.6 based on experiments with Control Flow Analyses of scalable Discretionary Ambient programs and Carmel programs. To facilitate this comparison we expand ALFP clauses accepted by the Succinct Solver into more general Normal clauses accepted by both solvers and run the experiments for all three possible combinations of input and solver. This allows the solvers to be tested on even ground and enables the reuse of existing analyses and their corresponding ALFP constraint generators. The performance of the Succinct Solver is at worst a small constant factor worse than XSB Prolog. In optimum cases the Succinct Solver outperforms XSB Prolog by having
Beyond depth-first strategies: improving tabled logic programs through alternative scheduling
Journal ArticleTabled evaluation ensures termination for programs with finite models by keeping track of which subgoals have been called. Given several variant subgoals in an evaluation, only the fi rst one encountered will use program-clause resolution; the rest will resolve with the answers generated by the first subgoal. This use of answer resolution prevents infi nite looping that sometimes happens in SLD. Because answers that are produced in one path of the computation may be consumed, asynchronously, in others, tabling systems face an important scheduling choice not present in traditional top-down evaluation: when to schedule answer resolution. This paper investigates alternate scheduling strategies for tabling in a WAM implementation, the SLG-WAM. The original SLG-WAM had a simple mechanism for scheduling answer resolution that was expensive in terms of trailing and choice-point creation. We propose here a more sophisticated scheduling strategy, batched scheduling, which reduces the overheads of these operations and provides dramatic space reduction as well as speedups for many programs. We also propose a second strategy, local scheduling, which has applications to nonmonotonic reasoning, and when combined with answer subsumption, can arbitrarily improve the performance of some programs
A Constraint-based Mathematical Modeling Library in Prolog with Answer Constraint Semantics
Constraint logic programming emerged in the late 80's as a highly declarative
class of programming languages based on first-order logic and theories with
decidable constraint languages, thereby subsuming Prolog restricted to equality
constraints over the Herbrand's term domain. This approach has proven extremely
successfull in solving combinatorial problems in the industry which quickly led
to the development of a variety of constraint solving libraries in standard
programming languages. Later came the design of a purely declarative front-end
constraint-based modeling language, MiniZinc, independent of the constraint
solvers, in order to compare their performances and create model benchmarks.
Beyond that purpose, the use of a high-level modeling language such as MiniZinc
to develop complete applications, or to teach constraint programming, is
limited by the impossibility to program search strategies, or new constraint
solvers, in a modeling language, as well as by the absence of an integrated
development environment for both levels of constraint-based modeling and
constraint solving. In this paper, we propose to solve those issues by taking
Prolog with its constraint solving libraries, as a unified relation-based
modeling and programming language. We present a Prolog library for high-level
constraint-based mathematical modeling, inspired by MiniZinc, using subscripted
variables (arrays) in addition to lists and terms, quantifiers and iterators in
addition to recursion, together with a patch of constraint libraries in order
to allow array functional notations in constraints. We show that this approach
does not come with a significant computation time overhead, and presents
several advantages in terms of the possibility of focussing on mathematical
modeling, getting answer constraints in addition to ground solutions,
programming search or constraint solvers if needed, and debugging models within
a unique modeling and programming environment
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