Mobile Prolog

What is MProlog?

To put it simple, MProlog is both an interpreter of the PROLOG language written in C# and a .NET Compact Framework PocketPC front-end.

How did this project started?

MProlog was first born as a port of WProlog to C#. Because I was always fond to the paradigm behind logic programming, and having just bought Dennis Sasha’s book Dr. Ecco’s Cyberpuzzles, I figured that it would be awesome to solve these puzzles with Prolog and my PocketPC (sitting in front of a computer is not very inspiring).

Unfortunatly, I didn’t found any free PROLOG interpreter that ran under Windows Mobile 2003 (or without a commercial virtual machine). The solution was quite obvious: I had to write one of my own. Problem was: were to start? Writting a language interpreter, expecially when you don’t know every detail of the language, is not a trivial task. Having this in mind, I searched the Internet for small, open-sourced implementations. WProlog and XProlog were two obvious choices, with the late being an very good extension of the first.

But Winnikoff’s original implementation in JAVA was much simpler to read and understand. It is a remarkable work of a single person that, while having several limitations compared to the standard (many solved in XProlog by Jean Vaucher), it provided a unhacked and smaller basis to work upon.

So MProlog was born after some hours of hacking JAVA source code, and quickly wrapping it around a simple user interface for Windows Mobile devices. Done! We can now have a Prolog system in our pockets all the time…

What are MProlog’s current limitations?

Basically all the limitations WProlog has, since I haven’t added any new functionality so far. This includes, but not limited to, lack of the cut (!) predicate, lack of arithmetic, lack of tracing/debugging capabilities and lack of assertions to rule data-base. All this limitations are intended to be solved in the near-future, as soon as I finish refactoring the code to be more object-oriented and .NET styled.

How much does it cost?

Nothing. It is completely free. MProlog is released under the GNU General Public Licence. This also means that the source code is freely available for you to modify and contribute to the project.

How do I install it in my device?

First you need to have .NET Compact Framework installed in your PocketPC. If you happen to have a Windows Mobile 2003 or later version, then it would already be pre-installed in the ROM. If not, then you need to get it from Microsoft’s Website. After that, you can download the latest CAB file, put it under any folder of your choice in the device, and run it.

How do I compile the source-code?

The source code is provided as a Visual Studio .NET 2003 Solution. Simply just load it up under Visual Studio (you must be able to compile code for Portable Devices if you want to play with the PocketPC front-end). I haven’t yet tested the main interpreter with MONO, though I hope to do it in the future.

Screenshots


Screenshot of MobileProlog 0.1b code editor

MobileProlog 0.1b console

Changelog and Downloads

7 Jan 2005: First release to the public. Binaries and source-code.