From the hub, written by: "Paulo Moura"

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...

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...

Multifile predicates: dos and don'ts

This post is external to PrologHub

Multifile predicates are a standard Logtalk and Prolog feature. The name multifile originates from being able to define a predicate in multiple files. Multifile predicates are declared ...

DCGs provide a threading state abstraction: don't break it

This post is external to PrologHub

Definite Clause Grammars (DCGs) provide a useful threading state abstraction with countless applications in Logtalk and Prolog programming. But programmers sometimes break this abstraction without realizing it and for no benefit. This usually happens when ...