views:

49

answers:

1

I want to write a ruby wrapper swi-prolog. Can anyone please tell me how to proceed with writing one?

I would appreciate if anyone please explain me what steps need to be considered while attempting to write this sort.

+1  A: 

You can look at this post by Mauricio Fernandez:

http://eigenclass.org/hiki.rb?tiny+prolog+in+ruby

When you are done with that, there's a follow-up article with ideas on how to make things more Rubyish by Jamis Buck:

http://weblog.jamisbuck.org/2006/10/28/prolog-in-ruby

Edit: I also found PySwip which is a GPL Python - SWI-Prolog bridge. Even though it's not Ruby, it probably gives you some good ideas about how to tackle the problem.

Michael Kohl
I appreciate your effort in giving me the links. But can you please explain me how this procedure works?
JPro
Added another link to a Python-Prolog bridge. Reading the source should give you an idea about how to do something similar in Ruby.
Michael Kohl