A.I. programming in Prolog and Assembler

September 22, 2007

LPA Win-Prolog: A professional Prolog compiler with unique features

In early 2001, I had the pleasure of working closely together with a friendly bunch of people, the creators of LPA Win-Prolog, for a a period of a few months: This company, who made LPA Win-Prolog is “Logic Programming Associates“, a group of dedicated developers and computer scientists led by Brian Steel, who also happens to be a musician and an orchestra conductor. A long time ago (in the eighties) Brian Steel had caused quite a stir in the so-called “home computer” industry, by writing the first Prolog compiler that could run on a ZX Spectrum, a machine with only 48Kb of RAM and a Z80 8-bit processor. At that embryonic stage of the computer industry’s evolution, it was considered impossible to cram a working Prolog compiler in only so little RAM and in such a slow computer. However, Brian Steel was also an Assembly Language programmer (just like me -although long before my time). He still writes very efficient Assembly Language code (today for Intel Pentiums – 32-bit and 64-bit code) which empowers today’s LPA compiler with a tremendous speed, compared to its rivals. Brian also thought deeply about the best way to implement certain commonly needed operations (such as string search) and so he set out to improve the ISO-prolog-compatible LPA compiler with special and unique instructions that increase its speed and efficiency even more (e.g. the multi-faceted predicate “find/3“).

Well, I am still using LPA Win-Prolog, ever since that happy period of a few months I spent in the UK, back in 2001, as an employee of LPA Ltd. In fact, I was forced to return to Greece because of a bad accident (a broken tendon in a foot), otherwise I’d rather stay in the UK and work with LPA… forever! BTW, Brian Steel is also -like me- a winter swimmer, in the English sea (in Cornwall) making it even more apealling for me -at the time- to… follow his example. 🙂

The latest versions of LPA Prolog (version 4.6 is the one I use at the moment) are full of extra goodies, such as a coloured syntax editor, a nice dialog editor (for the visual design of menus, windows, dialog boxes, etc), and so on. (Not to mention several good extra packages, included in the compiler, such as Flex, Datamite, Proweb, Chimaira Agents, and so on; you can read all about them in LPA Prolog’s site, here).

My only complaint is that (at the moment) the LPA package does not include a Constraints programming extension, (such as CLP, CLP/fd, CHR, etc). However, I plan to adapt some open source code for such extensions and include it inside LPA Prolog, in the near future. Unless -of course- this innovative company has already embarked on a similar project, adding to their compiler Constraints handling extensions. Finally, the very latest (recently announced) next version of LPA Prolog includes something very special, which is useful to musically inclined programmers and hobbyists: A midi interface!

I was probably among those people who first proposed to Brian Steel -back in 2001- that a midi interface would prove to be very popular, as well as a way to expand LPA’s customer base even further. At the time (2001), most of their customers were academics, universities and serious professional people. Today (2007) my guess is that their clients begin to be also musically oriented hobbyists and computer-literate composers. I -for one- (as a composer and remixer) can’t wait to get my hands on this new version of their compiler, since it’s the best way to experiment with L-systems for computer music generation, Prolog-based grammars for parsing and analysing existing MIDI music pieces, and so on.

However, now that the MIDI music Logic Programming client-base of LPA Prolog is beginniing to grow, the issue of Constraints extensions can no longer be neglected. Some of the best work in musical Artificial Intelligence is already using Constraints programming methods.

In this blog, I hope to write quite often about programming projects and experiments with LPA Win-Prolog, including my own (public domain) source-code. In addition, you can browse some professional projects implemented with LPA Prolog in recent years (2001-2005), in my source-code and programming projects’ page.

Finally, there are some rather unusual web-pages I wrote a few years ago, with tips and free code to combine LPA Win-Prolog, with… one of its rivals (PDC/Visual Prolog). At the time, it became evident that it was perfectly possible to combine the best features of both these professional compilers, so the title of the main web-page about this work was “A tale of Two Prologs“.


  1. […] Ένας επαγγελματικός PROLOG Compiler, που δέχεται Ελληνικές εντολές και… μουσική (MIDI) Published September 22nd, 2007 prolog , ΔΗΜΙΟΥΡΓΙΚΟΤΗΤΑ , Πληροφορική Το νέο άρθρο στο άλλο μου blog παρουσιάζει (στα αγγλικά) τον μεταγλωττιστή LPA Win-Prolog, που δέχεται ελληνικές εντολές 100% (μέσα στον ίδιο τον κώδικα), και επίσης τον μοναδικό που έχει και μουσικό MIDI interface! Όσοι πιστοί (χομπίστες, πληροφορικοί, μουσικοί) προσέλθετε, το άρθρο είναι ΕΔΩ. […]

    Pingback by Ένας επαγγελματικός PROLOG Compiler, που δέχεται Ελληνικές εντολές και… μουσική (MIDI) « OMADEON — September 22, 2007 @ 7:01 pm

  2. […] Although DreamProver is still at the “alpha stage”, I decided to publish a preliminary first report about its features and capabilities, to a large extent already working, to a lesser extent requiring some debugging and minor extensions, before final release. I am doing this for the benefit (and amusement) of a friendly innovative company: “Logic Programming Associates Ltd”, where I worked for a short pleasant period of a few weeks, some years ago (in 2001). LPA are the creators of the LPA Win-Prolog compiler. I hope that LPA continues a long tradition of innovative success through the latest version of their compiler, which also has MIDI music xapabilities (featured in a recent posting, here). […]

    Pingback by DreamProver: A visual theorem prover for “Multiple Form Logic” (etc.) in LPA Win-Prolog 4.6 « A.I. programming in Prolog and Assembler — October 14, 2007 @ 11:49 pm

  3. Oh, and did not know about it. Thanks for the information …

    Comment by Andy — December 20, 2007 @ 1:33 am

  4. Hi there, I stumbled upon your blog via Bing while researching free midi music and your post caught my interest.

    Comment by Fabian Przekop — February 7, 2010 @ 12:48 pm

  5. I don’tknow much about ASB yet, but I think it beautiful. I plan on learning to program in it about 2 years. Thanks for sharing your personal experience as well the programming tips.

    Comment by ThePioneer — May 9, 2011 @ 4:50 am

  6. I am a student at London South Bank University and this is the topic of my project. Can the cost of commercially available Prolog software be justified for commercial development projects: A case study to compare shareware and freeware Prolog to that of commercially available products. Can users/suppliers please take some time and answer the questionnaire and/or leave some opinions. Thank you.
    The questionnaire is at: https://docs.google.com/spreadsheet/viewform?formkey=dHJVVkFyRk1qMFJsRTdJQTlBaWYzNEE6MQ

    Comment by Jacob — April 28, 2012 @ 8:17 pm

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create a free website or blog at WordPress.com.

%d bloggers like this: