OU blog

Personal Blogs

neil

prolog

Visible to anyone in the world

This week, alongside exam nonsense, I needed to clear rooms so that the floorers could get at...well, the floor.

This involved moving cupboards, cupboards full of books and assorted other crap. Often you have to empty stuff out of the, said, cupboards as they are far too heavy to move in their loaded state

One of these rooms was the head [or curriculum leader, or whatever they are called now] of computing's. So I had a look at the books. There were many about Prolog.

We'll leave aside the oddness of why these books were there, but it got me thinking. Prolog is a declerative language, I want to do M366, it probably makes sense to learn it now. So I stole a book.

[June will be OK with this, she's a mate who knows my tendancies around books that interest me.]

So I downloaded an, I'm not sure, implimentation, interpreter, compiler...? Anyhoo a something.

I wrote my first programme today. What did I notice?

I need a different mind-set to the one I usually have, you have to let go in a different way.

It was my attempt at defining a recursive [I want to say function but I probably mean...] predicate that really brought home the differences between Prolog and the usual way I do things. In Prolog you need to write two functions, that have the same signature, and both get called. This is mad!

Which means that it is something that I should be doing.

I've puzzled for some time over the bit of the book which explains why this has to be, still at sea.

Permalink Add your comment
Share post

Comments

neil

New comment

predicate, proposition, neil
Tom Capey

New comment

I must relearn Prolog sometime. I learnt it before I knew anything about any other languages, or even what computers were! I was a linguist in those days, and the only other programming I did was writing keyboard macros for the VED editor (I think this was in the Poplog environment).

My proudest moment was getting a program to return the single word yes after 24 hours. And I did a nice model of a categorial grammar that nearly worked. I was actually looking at my copy of Gazdar and Mellish a couple of days ago. I'll have to download a Prolog from somewhere and try it out again.

neil

New comment

I downloaded it here. I'll give you a copy of the book that I'm using at the M381 tutorial.

arb

nellie

Tom Capey

Downloading...

I can bring a couple of books along as wel.  Clocksin and Mellish, Gazdar and Mellish, and a couple of others (one of them's my brother's but he was just too willing to get rid of it!).