Prolog Pengines as the possibly best API?

Hi everyone.

I would like to use TerminusDB from Prolog. While there is an alpha of WOQL client for prolog on github, it’s kinda an exercise in futility. Prolog on the server, prolog on the client, encoding/decoding into javascript on both sides, losing nice properties such as unification & backtracking.

Enter Pengines (Pengines). Pengines (AFAIU) provide on-demand, possibly remote, sandboxed prolog sessions (you get to choose what to expose), retaining backtracking & unification across process boundaries, and they deal with normal prolog terms.

Either Prolog API or WOQL AST would work as interface. This approach would, IMO, give the best client possible.

Thoughts ?

1 Like

PS: With Prolog in the browser (ie. Tau Prolog, SWI Prolog WASM and Ciao Prolog WASM), Prolog/Terminus/Pengines could be very interesting combo.

Definitely this would be awesome and worth exploring. We haven’t really done it, not not because it isn’t a good idea, but because there are very few prolog users, so it seems like it would be a fair bit of work, unless one had a specific application in mind that could leverage it.

If you’re interested in forging ahead with it, we’re happy to give advice!

TLDR: “Would someone write it for me, pretty please, with a Prolog on the top ?”

I’m “probably” not the one to make it happen (without a lot of mentoring - I’m, let’s say, beginner+ in Prolog, with zero knowledge of Pengines internals).

I’m willing to help to test it, iron out bugs, extend it, but for whatever’s sake, don’t let me design it :wink:

But I’ve cross-posted (Prolog/Terminus/Pengines - Discussion - SWI-Prolog) to SWI-Prolog forums to try to get some attention, and perhaps someone will get interested.

1 Like