new toy


Last week, after doing a lot of searching about a commercial Prolog implementation, I decided to go along and purchase WIN-PROLOG from LPA. On Tuesday the CD-ROM was delivered to my mailbox and I had the chance of trying out some stuff to get accustomed to the environment. Pretty impressive documentation, even if you have never written a line of Prolog before! It reminds me of the days that I was reading the DEC manuals.


16 Responses to “new toy”

  1. cosmix Says:

    And why exactly did you have to have a commercial Prolog implementation? That is, why wouldn’t an open source/free one do?

  2. adamo Says:

    I was expecting this question. For the project that I am implementing I had the following choices:

    1- Write my own Prolog interpeter. Given no time constraints, this would have been my chosen path. And because performance was not an issue, I would start from the Prolog interpreter from Kamin‘s book and Tim Budd’s variations.

    2- Start with Small Prolog (for which I have blogged about in the past).

    3- Use CLP(R) (Not a free implementation but one I have agreed to its license and acquired its source 10+ years ago).

    4- Use a free implementation. But which one? Most would go with SWI-Prolog (which by the way has CLP(R) implemented), I maybe would have gone with XSB (I had emailed D. Warren and he had sent me a hard copy of his WAM paper sometime around 1995). However, all (free) Prolog implementations have evolved over the years into big enough systems. I do not have the time to fiddle with their internals this time as I did 10+ years ago.

    5- Use a non free, but free of charge, implementation like Visual Prolog Personal Edition. I was not comfortable with this choice, although I would love to see the source code for PIE (Prolog Inference Engine) that comes with the examples.

    6- Use a professional environment that the University has paid for: Sicstus. For over a year it proved impossible to locate the license master.

    7- Pay for what I need. Given the costs of the professional environments, choices narrowed down to: BinProlog, Visual Prolog, Amzi! Prolog and WIN-PROLOG. So which one? I asked someone whose opinion I trust and went with WIN-PROLOG. Add to the fact that InFlow is written mostly in WIN-PROLOG. I had the opportunity to exchange email with its author at another occasion.

    I do not regret my choice. I talked a lot with the people at LPA, and since I am currently a MSc student they made me a considerable price cut for their programmer’s edition (no standalone executables) plus support. The sales person I was talking with had even been involved with the stuff that I am to implement when he was a graduate student himself.

    But even with all the above, why not a free edition you may still ask, right? We sometimes invest in time and others in money. With a family with three children (2.5 years old the oldest) plus work, time I do not have. So I invested in money. I could have chosen BinProlog or Amzi! which are relatively cheap for my pocket. Instead I went along and payed 1/4 of my base monthly salary (that was the price I got from LPA for being a student) which still is considerable for my family’s economics. So summarizing this is what I’ve got:

    – One of the best Prolog systems for Windows.
    – Support from people who understand what you are talking about.
    – Excellent documentation.
    – A lightweight IDE (I hate Eclipse but this is just personal taste).
    – A monetary investment that is more pressing than my (moving) deadline.

    LPA got a customer for life.

  3. foteinoula Says:


  4. (devil’s advocate speaking) So, should we generalize this as “given no money constrains, go for proprietary software; it will save you time”?

    • adamo Says:

      Overgeneralizations suck. However there are software vendors, like LPA, that deserve what they charge for.

      But even for larger vendors, eg. Oracle and Microsoft, I can think of cases where in fact I would recommend their software stack (I have yet to see software that really beats Exchange, provided that you need Exchange for example).

      • Yes, I was partly joking.

        But, then, if you look at the Munich Municipality example, independence from private vendors was picked out as the major benefit, despite costs in time and money temporarily rising.

        Of course, this example does not compare to your situation.

        And now that I see it, it was not an overgeneralization, but rather a false statement. It should have been:

        “Given time constrains, go for proprietary software, although it will cost your more money wise”

        • adamo Says:

          We run a mixed shop: Lots of OSS software, a proprietary database vendor and inhouse software. If there is one thing that I have learned it is:

          People give you vendor independence, not the kind of software that you are using.

          Otherwise you are doomed to either vendor or consultant lock-in, regardless of the kind of software used. Currently, our DBA is orders of magnitude better than the consultants that have visited us from the proprietary database vendor. This guarantees our independence.

          It is just that sometimes with source code available you do not have to wait for the vendor to implement a particular feature. But even this requires skill.

          Interesting topics you pose. They deserve a blog post of their own.

  5. george Says:

    Υπάρχουν και χειρότερα, εγώ ανακάλυψα την APL και έγινα 12 χρονών πάλι! :p ( http://dyalog.co.uk )

    • adamo Says:

      APL; Είχα παίξει (== hello world!) παλαιότερα με τη J – είχα διαβάσει για αυτή στο Dr. Dobbs. Φαντάζομαι η Dyalog APL έχει “απαλλαγεί” από το ειδικό character set;

      • george Says:

        Όχι, το χρησιμοποιεί ακόμη δίνοντας σου και ορισμένες ευκολίες απο το GUI. Δεν θα έλεγα πως το μεγαλύτερο πρόβλημα είναι η χρήση του ειδικού charset. Η J δεν μου άρεσε και τόσο – για τον λόγω του οτι χρησιμοποιει ASCII, μοιαζει σαν την ξάδερφη της brainf*ck παρά APL.
        Είναι καλύτερο να δεις την APL σαν ένα περιβάλλον που μπορείς να κάνεις υπολογισμούς και transformations στα δεδομένα σου σχεδον με μαγικό τρόπο, παρά σαν μια “νορμαλ” γλώσσα προγραμματισμού. Αν και έχουν προσθετηθεί API για DLL, δίκτυο, γραφικά, κλπ – το notation κάπως χαλάει σε αυτές τις περιπτώσεις και μοιάζει σαν χακιά.

        Δες αυτό : http://www.youtube.com/watch?v=a9xAKttWgP4

  6. omadeon Says:

    This is great!
    LPA Prolog is also great.

    The only thing missing is CLP/Constraints (forgot to tell you this, but… )

    I am delighted NOT to be the only LPA user in Greece.

    (“Un-pistevable” good news) -hehe

  7. cosmix Says:

    WIN-Prolog is a good Prolog (it’s actually great as far as I can tell from the little i’ve used it). That wasn’t being in question at any point.

    It’s just that there are many options, many of which are free (and excellent) and your post didn’t really make any of the reasons for choosing it over the alternatives clear; your follow-up comments did.

    I’m not privy to the specifics of your project; personally, I wouldn’t have based my solution to a platform-specific Prolog, let alone one that’s dependent on Windows.

    Chances are SWI would have probably sufficed; the internals are not that bad and you get excellent support (for a free/open source project). It runs on many platforms and it’s free, which helps in cases when the project may survive longer than you expect.

    I would have also looked at ECLiPSe (but then again I am somewhat partial to it). I haven’t used it for many years (well before it ‘left’ IC-Parc), but back then it was solid, if a bit esoteric in parts. I’m sure it’s better nowadays. Cisco acquired the rights and open sourced a few years ago after IC-PARC closed.

    • adamo Says:

      I understand that the real blog post is hidden in the comments. Sometimes I am better as a reacting writer :)

      As far as Windows goes, I simply am not trying to be mean to my supervisor. He (still) codes and his platform of choice is Windows.

      ECLiPSe? Now that is a name I have not seen in years and http://www.crosscoreoptimization.com does not seem reachable from my corner of the Net :(

      • cosmix Says:

        I’m sure your supervisor can use a cross-platform Prolog just fine; plus you’d have the option to just move your project to superior platforms if and when he graduated to the better computing platforms out there; but, hey, I’m cool with Win-Prolog if you are. =)

        I just wanted to make it clear that I thought there are pretty decent cross-platform options out there and I find vendor lock-in extremely unwise, unless there are extremely good reasons for it.

        For ECLiPSe, check out http://eclipse-clp.org
        CrossCore Optimization was only distributing it [for about a year if I’m not mistaken]; ECLiPSe was sold to Cisco after IC-Parc closed [in 2005?] and it was open-sourced in 2006.


  8. george Says:


    Μιας και ήρθε η ώρα και εγώ λόγω ανωτέρας ακαδημαικής βίας να ασχοληθώ με Προλογκ, με το που κατέβασα τον SWI-Prolog interpreter βρέθηκα στα καπάκια με την εξής ερώτηση:

    Γιατί π.χ. ένα απλό fact όπως:


    χτυπάει ERROR: toplevel: Undefined procedure: male/1 (DWIM could not correct goal) ? Απο ότι διάβασα χρειάζεται να ορίσεις γενικώς τα facts σου σε ένα arxeio.pl, μετά μέσα απο τον interpreter να το κάνεις “consult” με [arxeio.pl] και ΤΟΤΕ είσαι ικανός να κάνεις ερωτήματα/computations χρησιμοποιώντας όμως _μόνο_ αυτά τα facts.

    Είχα την εντύπωση πως η Prolog έχει κανονικό interpeter, δηλαδή να μπορείς να ορίσεις και να κάνεις ερωτήματα για πράγματα κατευθείαν και όχι να πρέπει να πηγαίνεις μέσω Λαμίας.

    Μου διαφεύει κάτι; Γκρινιάζω δίχως λόγο; Υπάρχει αυτό που λέω;

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: