Found 51 bookmarks
Newest
Indexing dif/2
Indexing dif/2

Many Prolog programs are unnecessarily impure because of inadequate means to express syntactic inequality. While the frequently provided built-in dif/2 is able to correctly describe expected answers, its direct use in programs often leads to overly complex and inefficient definitions — mainly due to the lack of adequate indexing mechanisms. We propose to overcome these problems by using a new predicate that subsumes both equality and inequality via reification. Code complexity is reduced with a monotonic, higher-order if-then-else construct based on call/N. For comparable correct uses of impure definitions, our approach is as determinate and similarly efficient as its impure counterparts.

·up.raindrop.io·
Indexing dif/2
Portability of Prolog programs: theory and case-studies
Portability of Prolog programs: theory and case-studies
(Non-)portability of Prolog programs is widely considered as an important factor in the lack of acceptance of the language. Since 1995, the core of the language is covered by the ISO standard 13211-1. Since 2007, YAP and SWI-Prolog have established a basic compatibility framework. This article describes and evaluates this framework. The aim of the framework is running the same code on both systems rather than migrating an application. We show that today, the portability within the family of Edinburgh/Quintus derived Prolog implementations is good enough to allow for maintaining portable real-world applications.
·up.raindrop.io·
Portability of Prolog programs: theory and case-studies
Lambdas in ISO Prolog
Lambdas in ISO Prolog

Higher order programming is possible in Prolog. There is no need to extend the language for that. See Richard O'Keefe's arguments in comp.lang.prolog more than ten years ago. What is missing are lambda expressions.

We present a very simple implementation of lambda expressions in ISO Prolog that fits into the existing conventions for higher order predicates based on call/N. No syntax or compiler extension is needed.

·up.raindrop.io·
Lambdas in ISO Prolog
The birth of Prolog
The birth of Prolog
The programming language, Prolog, was born of a project aimed not at producing a programming language but at processing natural languages; in this case, French. The project gave rise to a preliminary version of Prolog at the end of 1971 and a more definitive version at the end of 1972. This article gives the history of this project and describes in detail the preliminary and then the final versions of Prolog. The authors also felt it appropriate to describe the Q-systems since it was a language which played a prominent part in Prolog’s genesis.
·up.raindrop.io·
The birth of Prolog
Applying Constraint Programming to Minimal Lottery Designs
Applying Constraint Programming to Minimal Lottery Designs
We develop and deploy a set of constraints for the purpose of calculating minimal sizes of lottery designs. Specifically, we find the minimum number of tickets of size six which are needed to match at least two balls on any draw of size six, whenever there are at most 70 balls.
·up.raindrop.io·
Applying Constraint Programming to Minimal Lottery Designs
Comparison of Prolog implementations
Comparison of Prolog implementations
The following Comparison of Prolog implementations provides a reference for the relative feature sets and performance of different implementations of the Prolog computer programming language. A comprehensive discussion of the most significant Prolog systems is presented in an article published in the 50-years of Prolog anniversary issue of the journal Theory and Practice of Logic Programming (TPLP).[1]
·en.wikipedia.org·
Comparison of Prolog implementations