Android and Prolog


I have built an expert system in Prolog. Is there a way I can incorporate the Prolog code into my Android application so that the application takes arguments passes them to the Prolog expert system, and the expert system returns the answer to the Android application?

1/20/2011 10:07:38 PM

Accepted Answer

I've done something similar to this a long time ago.

It wasn't related to Android, but it was agnostic to that.

I used sockets to communicate with Prolog. Prolog would read the input, do its job and return the answer. The other application (in my experience) was using C++ and OpenGL, and it worked very well.

Using sockets in Android shouldn't be your problem. Unfortunately this was many years ago, and I don't believe I have the Prolog's source code to show you how to do it, but one option is: use sockets :)

Good luck! (I will try to find that source code, but I don't expect to find it!)

1/20/2011 10:10:21 PM

Try if your prolog code compiles (and runs correctly ) with any of the JVM based prolog compilers:

If it does then you're in luck. It will most probably run on Android.

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow