I want to use Prolog with PHP. Is it possible?
+3
A:
There are always the exec-familiy functions to execute/spawn another process.
VolkerK
2009-08-19 09:26:17
+1
A:
Most Prologs allow for prolog code to be compiled into a binary. You could try calling this binary from within PHP using some kind of process call as already mentioned.
humble coffee
2009-08-20 01:25:35
+1
A:
As suggested above, you can execute a Prolog interpreter or binary. However, most Prolog implementations also export a C api that can be used to call the Prolog interpreter. You could create a small PHP module to start an interpreter and execute queries. For instance, the Sicstus documentation describes using Prolog from C in detail:
Daniel de Kok
2009-09-28 22:24:02