12 comments

[ 3.2 ms ] story [ 30.7 ms ] thread
Anyone interested in calling Prolog from an imperative programming language might be interested in this 1995 paper:

https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&d...

Wow, this is pretty awesome. Does anyone know if there are any languages that implement this?
(comment deleted)
I think it would be easier to embed Shen in a language. By implementating the kernel language KLamba, you get Shen, which includes a Prolog.
How about (creating) a Prolog interpreter which consumes and outputs JSON?

Then use #SheBang to make any such prolog-file interpreted by that interpreter to return JSON to the caller. Then it could be integrated to ANY program written in any language which uses the Unix shell-calling conventionss.

this is certainly a very useful idea. the Rego datalog language leans on this pretty heavily, although its emphasis is on access policy more than general transforms.

ddlog is another datalog variant that supports this, but I believe you need to specify the schema as a rust type