views:

2810

answers:

8

Does anyone know of a nice (and preferably free) way to integrate Prolog and C#?

Im looking to create a Prolog dll or similar to call from my managed code, and retrieve an answer once all the processing has been complete. Im looking for it to be predominantly one sided (c# calls Prolog).

I have seen this question which talks about Prologs real world usage but I was wondering if anyone had either any experience with c# & Prolog? or a nice tutorial/article?

+2  A: 

Perhaps P# will be useful for you

OnesimusUnbound
+5  A: 

You can take a look at Yield Prolog.

Yield Prolog uses yield keyword in C# (and Python, and JavaScript) and custom Variable class to simulate Prolog machine. This way, you get a Prolog API in your favourite language. You don't need to connect your main language with P# or similiar projects.

zuber
+7  A: 

Prolog.NET. I've tried both P# and Prolog.NET, but both of them have their weak points.

supermedo
+1  A: 

It's not free, but Sicstus Prolog allows connection to C# and Java

This is the Prolog implementation we use at our company, and it is very fast and useful.

Torbjörn Josefsson
I have used Sicstus in the past and found it to be a very good product. I wasn't aware that it can connect with c#, the only problem now it the rather large licence fee!
TK
A: 

You can use ECLiPSe Prolog. i have integrated it with VC8. it would be better to use VC8 instead of C#.

Archie
A: 

SWI-Prolog interface to C#

+1  A: 

C#Prolog, available from SourceForge (Prolog interpreter written in C#)

James Reynolds
Here is the link: http://sourceforge.net/projects/cs-prolog/
ThomasH
A: 

If deployment with a full prolog implementation is not a problem you can use SWI-Prolog and talk to it via XPCE and sockets.

mdm