Integrating Prolog with C# [closed]
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this questionDoes 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?
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.
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.
C#Prolog, available from SourceForge (Prolog interpreter written in C#)
If your prolog is swi-prolog, you have two choices. The older, and essentially deprecated, version is http://www.swi-prolog.org/contrib/CSharp.html
The newer, much better one is swicli. http://www.swi-prolog.org/contrib/NetMono.html
Perhaps P# will be useful for you
You can use ECLiPSe Prolog. i have integrated it with VC8. it would be better to use VC8 instead of C#.
If deployment with a full prolog implementation is not a problem you can use SWI-Prolog and talk to it via XPCE and sockets.
精彩评论