Hi all,
This is my first message in this forum, and since I am not a central figure in the Prolog community, I should probably begin with a brief introduction.
My name is Torbjörn Lager. I am professor emeritus of general and computational linguistics at the University of Gothenburg. I have worked with computational linguistics, dialogue systems, web technologies, and related matters for many years. I have also had a long-standing interest in Prolog, although I have always been somewhat of an outsider to the main Prolog and logic programming communities. (Unfortunately, Chalmers here in Gothenburg is a FP stronghold, with little interest in LP.)
For almost fifteen years, on and off, I have been working on a book-length project called The Prolog Trinity ecosystem. The project is perhaps best described as a book of ideas, but it is not only that. It also comes with a fairly extensive online demonstrator and links to GitHub repositories containing prototype implementations. The current draft is about 350 pages long and introduces a proposal for three closely related things: Web Prolog, Prolog agents, and the Prolog Web.
In the book, these three together form what I call the Prolog Trinity ecosystem: Web Prolog as a profile of Prolog for web-based interaction, Prolog agents as logic-programmable actors, and the Prolog Web as a possible distributed environment in which such agents and nodes can interact.
The central technical idea is that Prolog could be given a web-facing profile that combines ordinary Prolog-style querying with Erlang-inspired concurrency and distribution. In such a setting, different Prolog systems could potentially communicate over the Web using a common interaction model, without requiring one Prolog system to become the Prolog system.
So one part of the proposal is a concurrent interface, inspired by Erlang, where Prolog actors have mailboxes, process identifiers, private clause databases, and communicate by message passing. These actors may live on different nodes, and the intention is that local and remote interaction should be made as uniform as is reasonably possible.
Another part is a sequential interface, where a node can query another node through something like rpc/2-3, with ordinary Prolog backtracking exposed across HTTP. In this view, backtracking can be understood as a form of pagination: a remote query may produce a stream of answers, but these answers can be requested incrementally by the client.
A third part is the broader architectural idea: a Prolog Web consisting of Prolog nodes that expose logic-driven services, can be queried by browsers and other web clients, and may host longer-lived Prolog agents. The idea is not that the Prolog Web should replace the existing Web, or the Semantic Web, but that it could become a small logic-oriented layer within the wider Web ecosystem.
To some extent, the project can also be read as a reaction to the discussions around the future of Prolog, including the 2022 article Fifty Years of Prolog and Beyond. I found that article valuable, but I also felt that Prolog needs more explicit long-range visions: not only better libraries, better tooling, and better portability, but also bolder architectural stories about what Prolog might become in a web-native, agent-oriented, AI-saturated world.
During the last five years, after retiring from my position at the University of Gothenburg, the project has grown from a rather speculative manuscript into something more concrete. For a long time I did not think I would be able to finish anything worth showing to others, but thanks in part to LLMs — mostly Claude, but also ChatGPT — I now believe I have something reasonably presentable.
The project homepage is here:
https://trinity.elfenbenstornet.se/
From there, one can find the book draft, a fairly comprehensive online demonstrator, and links to the relevant repositories.
I would be very grateful for thoughts, comments, criticism, or suggestions — especially from the perspective of Prolog implementers and experienced Prolog programmers.
I do not present this as finished work, and certainly not as the future of Prolog. It is a proposal, a prototype, and a provocation. But I hope it may be interesting to people who care about Prolog’s future — especially those who think that Prolog still has something important to contribute to the Web, to symbolic AI, and to the next generation of intelligent systems.
Best regards,
Torbjörn