object

linda

Linda tuple-space implementation for process communication. Provides a server that acts as a shared blackboard where clients can write (out/1-2), read (rd/1-2), and remove (in/1-2) tuples. Uses threaded engines for the server implementation and the sockets library for network communication.

Availability:
logtalk_load(linda(loader))
Author: Paulo Moura
Version: 2:0:0
Date: 2026-03-27
Compilation flags:
static, context_switching_calls, threaded
Imports:
Remarks:
  • Supported backends: SWI-Prolog, Trealla Prolog, and XVM (requires both multi-threading and sockets support).

  • Linda operations: The basic operations are out/1-2 (write tuple), in/1-2 (remove tuple, blocking), rd/1-2 (read tuple, blocking), in_noblock/1-2 (remove tuple, non-blocking), and rd_noblock/1-2 (read tuple, non-blocking).

  • Tuple matching: Tuples are matched using unification.

  • Blocking behavior: The in/1-2 and rd/1-2 predicates block until a matching tuple is available. The in_noblock/1-2 and rd_noblock/1-2 predicates fail immediately if no matching tuple is found.

  • Multiple clients: Multiple clients can connect to the same server. A tuple removed by the in/1-2 or in_noblock/1-2 predicates is only removed for one client.

  • Multiple servers: A client can connect to multiple servers. The first server it connects to, uses by default the blackboard alias.

  • API compatibility: The API is inspired by the SICStus Prolog Linda library.

  • Network communication: Uses TCP sockets for client-server communication, allowing processes to run on different machines.

Public predicates

(no local declarations; see entity ancestors if any)

Protected predicates

(no local declarations; see entity ancestors if any)

Private predicates

(no local declarations; see entity ancestors if any)

Operators

(none)