Android and Prolog

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

+6
android prolog
source share
4 answers

I did something like this a long time ago.

It was not Android related, but it was agnostic.

I used sockets to communicate with Prolog. The prologue will read input, do its job and return a response. Another application (in my experience) used C ++ and OpenGL , and it worked very well.

Using sockets in Android should not be your problem. Unfortunately, this was many years ago, and I do not believe that I have the Prolog source code to show you how to do this, but one option: use sockets :)

Good luck (I will try to find this source code, but I do not expect to find it!)

+3
source share

Try it if your prolog code is compiled (and works correctly) with any of the JVM-based Proog compilers: http://www.is-research.de/info/vmlanguages/tag/prolog/

If so, you're in luck. Most likely, it will work on Android.

+8
source share

There are the following differences between the regular Java platform and the Android platform:

  • Virtual Machine: Although the Dalvik machine can run Java 1.5, it does not support all the libraries that are normally available in the standard version of Java. We found, for example, that Dalvik does not have javax.management. *. On the other hand, Dalvik has some advantages that the standard version of Java does not have, for example, android.os.SystemClock.

  • User Interface:. The Android platform is equipped with its own widget set and window manager. It also has a package deployment system. On the other hand, the standard version of Java offers the Swing widget set, the AWT widget set. There is also a SWT widget installed as an available third-party product. The standard version fits into the OS window manager and does not require package deployment.

For Jekejeke Prolog, we recently made a fork in our development at both levels. Starting from version 0.9.3, the interpreter is available in the version for the standard version of Java and in the version for Android. Starting from version 0.9.5, the Runtime Library also has a console, and it can be installed directly from:

Google play
Amazone appstore
Apps for Samsung

The interpreter has a software interface. You can closely integrate it with your application. You can even associate your application with intrereter, as it has a distribution license. The supported Prolog language is exactly the same for the standard version of Java and for Android. Multithreading is also supported on both platforms. You can download the embedded .zip for your own development from the Jekejeke Website .

Best wishes

+7
source share

We used tuProlog and ported the porting process to Android. Take a look at the talk page, where you can look at the resources we used and see what we encountered ....

+3
source share

All Articles