From the hub, in category: "Development Practices"

Modules are objects

This post is external to PrologHub

Prolog modules are objects. This statement may surprise you. From past experience, it will also annoy some Prolog practitioners. It is not the case that the creators of Prolog module systems intended to create an object-oriented extension to Prolog. But what modules are is a function of their characteristics, not a function of their design.


Predicate semantics

This post is external to PrologHub

Logtalk inherits but also extends and improves Prolog predicate semantics to provide clear and uniform closed world semantics, support protocols, provide consistent meta-predicate semantics, prevent misusing of multifile predicates, and prevent a number of hacks based on predicate directives that would break encapsulation. This post discusses...


Functional Prolog: Map, Filter and Reduce

Prolog programs have both logical and procedural meanings. In this post we'll take a look at procedural ideas more commonly associated with functional programming than Prolog, namely: map, filter and reduce (foldl and foldr). We'll code them and then query them.


Tips on planning, documenting, and testing a SWI-Prolog project

In the process of developing a fairly large SWI-Prolog project, I've developed some experience at using PlDoc — which actually goes beyond being an automated documentation system, doubling as an integrated development environment — and PlUnit, which I'll share here.


A Prolog Language Server

This post is external to PrologHub

Announcing my Prolog LSP implementation and discussing how it was implemented


Easily QuickCheck your predicates

This post is external to PrologHub

Logtalk lgtunit testing tool includes a QuickCheck implementation supporting property-based testing of plain Prolog, Prolog module, and Logtalk code. The tool is portable and can be used with all Logtalk supported Prolog compilers. The QuickCheck implementation provides ...


Failure-driven loops: when and how

This post is external to PrologHub

Failure is a big part of logic programming success! (always wanted to write this :-)

Predicates are often required to perform repetitive operations. For example, assume a table of...