REVIEWS COURTESY OF ZXSR

Micro-PROLOG
by Logic Programming Associates Ltd
Sinclair Research Ltd
1983
Sinclair User Issue 23, Feb 1984   page(s) 109

SPECTRUM LANGUAGE JOINS THE FAMILY

John Gilbert assesses a new package.

The Micro-Prolog language package from Sinclair Research has arrived at the appropriate time to give a new direction to the software market.

The term Micro-Prolog is short for microcomputer programming in logic and the language is one of a new generation which could be termed, under certain circumstances, artificially intelligent. That means that the computer will appear to give intelligent answers to questions which it is asked.

From that description of intelligence you should be able to see that MicroProlog is nothing like Basic. In Basic you would write a series of commands which you would then expect the computer to execute in a sequence. MicroProlog, however, expects a series of rules, rather like those built into a database. The rules can relate to each other or be entirely separate.

The language will provide answers to any questions you might pose to the computer which relate to the rules you have entered into the language database. Even though it is capable of artificial intelligence, the language will not be able to answer your questions if it has no rule to deal with them. Neither can it make assumptions or draw conclusions without those rules.

To aid the construction of your programs there are several utilities in the package. One is called Simple and it will convert the base language into a language which a beginner can use. It does so by adding command words to the database which will make the task of programming easier for the user.

Prolog programs are loaded in a different way from those written in Basic on the Spectrum. The computer will load software in blocks and the block numbers will be displayed for each, along with the message 'BLOCK OK' or a read error which will break the loading process.

Once Simple has been entered you will be ready to write some rules. You could, for instance, build some rules about a family and the relationships in it.

The family could include Clive, Mary, Robert and Rebecca. If the computer is to answer questions about those people it must first have a set of rules to which it can refer. They would include Robert is the brother of Mary, Clive and Rebecca; and Mary is the sister of Clive, Robert and Rebecca. Those rules would be entered for each of the family members.

The rules have to be converted to a form of understanding of the language. Robert is the brother of Clive would be translated into add (Robert brother-of Clive). The middle name is the relationship between Robert and Clive and must consist of one word, hence the hyphen.

It is also possible to qualify a data name such as that of a member of a family with several tags which would identify it further when the database is interrogated. To do so we can use a statement which consists of one data name and one relation name. You may want the language to know that Robert is male or that Rebecca is female. To do that you would type add (Robert male) and add (Rebecca female).

To query the database you can use several commands, including 'is' and 'which'. The 'is' command is used to test if a statement is true or false. We could ask the question 'Is Mary the sister of Rebecca?' The computer could then give a YES or NO answer. It will give a NO answer in two cases - if the statement is false or if the statement rule does not exist in the database.

The other query command is 'which' and that is more flexible. It will allow you to find the relationship between one item in the database and another. With the 'which' command you need to know only one of the items. For instance, if you want to know who is Rebecca's sister you would use the form which (x:x sister-of Rebecca). The x specifies the unknown quantity, as in algebra, and in this case it refers to a sister Rebecca might have.

When that command is entered you should have the name of Rebecca's sister, followed by the statement 'no more answers'. That means that, using the rules it has obtained from you, the computer has found the corresponding relations in the 'sister-of' category.

Data structures such as those can be built with any kind of relationships. To fit Micro-Prolog into the definition of a language you have to stretch that definition slightly to include databases and programs which store lists of data which can be accessed depending on the user's needs. The difference is that MacroProlog is more adaptable to the needs of the user than a normal database written in Basic or machine code.

Although the language seems to be specialized it has several uses, two of which are the creation of databases which can be used by almost anybody and also the creation of educational teaching tools.

In the utilities line the Prolog language has been used to build a model of the London Underground system. The various stations in the network were fed into the computer and the best, and quickest, possible routes between stations were found.

Micro-Prolog can also be useful in the classroom. The database can be programmed with information about a subject and the student can interrogate the database and not have to think about is happening in the computer.

The final test of software is whether it improves or advances the use of a computer and this package certainly does so. The only criticism is its price, £24.95, which will deter some people buying what is an example of good software.

Despite the price, Micro-Prolog will prove that the Spectrum can be used for serious purposes and that the computer has a good future in schools and other institutions.

Sinclair Research. Stanhope Road, Camberley, Surrey GU15 3PS.


REVIEW BY: John Gilbert

Gilbert Factor8/10
Transcript by Chris Bourne

ZX Computing Issue 13, Jun 1984   page(s) 137

PARLEZ-VOUS MICRO-PROLOG?

Our reviewer has taken a look at an up and coming language from Sinclair.

Although I enjoy learning and exploring new computer languages, when I saw the Sinclair Micro-PROLOG package I was a little worried to say the least at the size of the manual and its complexity.

Still thinking that I had let myself in for a pretty stiff little number, I dived into the introductory manual which is much thinner and aimed toward your average Speccy user. After three pages of how to switch your computer on and how to load a program, I finally found out about the SIMPLE language. SIMPLE is a program which changes the way you use Micro-PROLOG so that it is not too confusing at first. I was quite impressed, I managed to follow what the manual was telling me without becoming hopelessly lost.

PROLOG itself is a logically-structured language; that is, it is no where near as messy as BASIC, but then it is not as easy to grasp as BASIC. Consider the Micro-PROLOG line:

which (x : x larger London)

Taking this line step by step, first we have the command 'which'. This is asking Micro-PROLOG a question. The question is contained within the brackets and is in the form 'output format:argument'. In the example above I am dealing with cities and am looking for all the cities 'larger' than London. The word 'larger' in itself doesn't mean anything to Micro-PROLOG, what it is doing is just looking through its database and finding any places where a city has been specified as larger than London.

The large green manual which accompanied the cassette was far beyond me. I found I could use the program quite well enough just by following the small booklet.

The main use of MicroPROLOG is obviously 'do-it-yourself' database. Tailoring the filing system to your own requirements is very simple. Once you have a knowledge of Micro-PROLOG, you can create a database far better than any commercially available because you know exactly what you want from the system. Table 1 shows the commands available and their syntax.

The loading and saving operations are similar to that of the BBC in that they load in blocks and it is very slow. It is quite reliable though, and the programs you write are not likely to be too large anyway.

Micro-PROLOG was written by Logic Programming Associates Ltd, and is available from most high street stores under the Sinclair label priced at £24.95.


Blurb: Table 1. Commands and Syntax add (argument) list description is (argument) This will produce a YES or NO response which (output format: argument) This wil produce all objects, etc, which fit the argument. delete description This takes out single arguments kill description This takes out whole blocks save program name load program name

Transcript by Chris Bourne

All information in this page is provided by ZXSR instead of ZXDB