5,582 research outputs found

    Divided we stand: Parallel distributed stack memory management

    Get PDF
    We present an overview of the stack-based memory management techniques that we used in our non-deterministic and-parallel Prolog systems: &-Prolog and DASWAM. We believe that the problems associated with non-deterministic and-parallel systems are more general than those encountered in or-parallel and deterministic and-parallel systems, which can be seen as subsets of this more general case. We develop on the previously proposed "marker scheme", lifting some of the restrictions associated with the selection of goals while keeping (virtual) memory consumption down. We also review some of the other problems associated with the stack-based management scheme, such as handling of forward and backward execution, cut, and roll-backs

    A history-based scheme for accelerating Prolog interpretation

    Get PDF
    An algorithm for improving the performance of a Prolog interpreter is introduced. The algorithm, unlike the intelligent backtracking schemes which improve the performance by avoiding redundant redos, avoids redundant calls. The algorithm identifies the redundant calls by maintaining a history of the program execution. The algorithm can be used in conjunction with an intelligent backtracking scheme for a further speed-up of the programs

    On the Efficiency of Optimising Shallow Backtracking in Prolog

    Get PDF
    The cost of backtracking has been identified as one of the bottlenecks in achieving peak performance in compiled Prolog programs. Much of the backtracking in Prolog programs is shallow, i.e. is caused by unification failures in the head of a clause when there are more alternatives for the same procedure, and so special treatment of this form of backtracking has been proposed as a significant optimisation. This paper describes a modified WAM which optimises shallow backtracking. Four different implementation approaches are compared. A number of benchmark results are presented, measuring the relative tradeoffs between compilation time, code size, and run time. The results show that the speedup gained by this optimisation can be significant

    Forty hours of declarative programming: Teaching Prolog at the Junior College Utrecht

    Full text link
    This paper documents our experience using declarative languages to give secondary school students a first taste of Computer Science. The course aims to teach students a bit about programming in Prolog, but also exposes them to important Computer Science concepts, such as unification or searching strategies. Using Haskell's Snap Framework in combination with our own NanoProlog library, we have developed a web application to teach this course.Comment: In Proceedings TFPIE 2012, arXiv:1301.465

    Formulas as Programs

    Get PDF
    We provide here a computational interpretation of first-order logic based on a constructive interpretation of satisfiability w.r.t. a fixed but arbitrary interpretation. In this approach the formulas themselves are programs. This contrasts with the so-called formulas as types approach in which the proofs of the formulas are typed terms that can be taken as programs. This view of computing is inspired by logic programming and constraint logic programming but differs from them in a number of crucial aspects. Formulas as programs is argued to yield a realistic approach to programming that has been realized in the implemented programming language ALMA-0 (Apt et al.) that combines the advantages of imperative and logic programming. The work here reported can also be used to reason about the correctness of non-recursive ALMA-0 programs that do not include destructive assignment.Comment: 34 pages, appears in: The Logic Programming Paradigm: a 25 Years Perspective, K.R. Apt, V. Marek, M. Truszczynski and D.S. Warren (eds), Springer-Verlag, Artificial Intelligence Serie
    • …
    corecore