TEACH POPCOURSE10 - Using online information
Contents
Online information in Poplog
As we have seen, the Poplog system provides us with access to the POP-11
language. POP-11 is a high-level language a small subset of which has
been described in the previous POPCOURSE files. In addition to providing
POP-11, Poplog also provides the languages Lisp, Prolog and Standard
ML. Thus, the Poplog programmer is confronted with various ways of
implementing a particular program.
Remembering all the different commands and conventions for all the
different languages is an impossible task. To get around this problem
Poplog provides an extensive `online' information facility, i.e., an
information service that you can get at via Poplog itself. This covers
POP-11, the Poplog system in general, the various languages it supports
and a host of other things. The intention is that the facility should be
accessed by the Poplog user as and when information is needed. It is
certainly not intended that the user should read all the information in
one go. To make effective use of the information sources you need to
develop certain skills. This file teaches those skills and also
introduces some of the basic concepts around which the information is
organized.
The four basic types of file: HELP, TEACH, REF and DOC
All information in Poplog is presented in files that you read using the
Poplog editor (Ved). There are four basic types of file. There are
`HELP' files. These typically provide fairly brief information relating
to a concrete feature or aspect of Poplog or one of its programming
languages. Then there are `TEACH' files. (The POPCOURSE series of
files---of which this is one---are all TEACH files.) TEACH files aim to
provide a tutorial-style introduction to a relatively abstract topic. In
addition to TEACH and HELP files there are also REF and DOC files. These
are like reference manuals. REF files are oriented towards the online
user. DOC files are primarily intended to be printed out. For our
purposes, it is the HELP and TEACH files that are of most interest since
they contain the sort of information likely to be of relevance to a
novice Poplog user.
All categories of information can be accessed by giving the name of the
relevant category as a command. Thus to access a HELP file you give the
command `help' followed by the name of the file you want to look at. To
access a TEACH file you give the command `teach' followed by the
relevant name. And so on. Poplog has a mechanism for creating HELP files
on the fly for any word in any of the languages it supports. Thus, you
can give the `help' command with the name of any POP-11 command and get
some information.
WARNING: When reading HELP files and TEACH files it is important to
remember that Poplog has been under development at Sussex and elsewhere
for over ten years. Many people have made contributions to the teaching
environment (i.e., the collection of TEACH files). Some of these are now
out of date or inconsistent in some way. However, they still may be of
use as a source of information. It is thus very important to be aware of
this problem and not to be dumbfounded by inconsistent, incorrect or out
of date information.
Getting started
For each category of file there is an `index' file that lists all the
files in the category. You can look at this file by giving an `index'
command; e.g. `help index' or `teach index'. If you find the number of
files in the index overwhelming you can look at an overview file by
giving a `files' command like `help helpfiles' or `teach teachfiles'.
Information files may contain cross-references to other files. By
convention, a cross-reference to some particular file is written in
upper-case and preceded with either its category (HELP, TEACH, REF or
DOC) or an asterisk, or both. A typical example of a cross-reference
would be
HELP * STRINGS
though you might also see
HELP STRINGS
and
* STRINGS
Remember that to access this file you give the command `help strings'.
You do not include the asterisk in the command.
When you see a cross-reference you may want to follow it up. An easy way
to do this involves placing the cursor just before the relevant
file-name and hitting the GETSYSFILE key (this is `ESC h' on most
keyboards). This key should take you into the relevant file. You can
jump to the next (previous) cross-reference by hitting the NEXTHELP
(PREVIOUSHELP) key, if your keyboard has one.
The catch-22 of the information system
The catch-22 of online information systems is that to find out something
about a particular topic you have to already know something about that
topic, namely what its information file is called. If you do not know
this then you cannot construct a command to call up the information
file.
Poplog provides a command that can sometimes get you out of this
dilemma. This is called `helpfor'. When you use this, you include an
argument which is just the name of the topic or issue that you are
interested in. The command then scans through the documentation for all
file-names that have the relevant topic as a substring. Once this list
has been compiled, the command takes you into a file that lists explicit
cross-references to the relevant files. Thus if you give the command
`helpfor strings' you will end up in a files that contains at least the
following cross-references.
HELP POP_LONGSTRINGS
HELP STRINGS
REF * STRINGS
To get a sensible response out of `helpfor' you may have to execute it
several times. A sensible strategy is to try it out with increasingly
short substrings of the topic you are interested in. For example,
imagine you want to get some information on the `matcher'. The first
command you try is `helpfor matcher'. This produces no information
whatsoever. Next you might try `helpfor match'. This produces a list of
several files. If you get nowhere with substrings of a particular label
try to think of an alternative label for the topic you are interested
in.
Getting help on Ved commands
Poplog contains online help for all built-in `words' (procedure names,
variables etc.) If you give a command like
help *
you will be taken into the relevant place in a file that deals with the
multiplication operator.
If you want help on a Ved command you should remember to append ved_
to the front of the command, since this gives the name of the procedure
that actually implements the command. Thus if you want help on the `smr'
command you should give the command `help ved_smr'.
Using `indexify' in conjunction with `g'
If you find yourself working in a file that has no index, you can use
the command `indexify' to construct one. Once you have executed
`indexify', the `g' command will work as usual.
Searching the sources
Poplog is implemented using a dialect of POP-11. For some purposes it
can be helpful to see exactly how a particular built-in procedure or
command is implemented. If your Poplog system has the source-files
contained within it, you can search for the sourcefile containing the
definition of a particular procedure by using the `sourcefile' command.
For example, to inspect the definition of `member' you would do
`sourcefile member'.
Switching between different files
When using the online information files you may end up with a large
number of files open at once. The FILESELECT facility provides an easy
way of jumping between files. To use it, you hit the FILESELECT key (or
sequence of keys). Poplog then shows a list of filenames with numbers.
You then type the number of the file you want and Poplog takes you into
the relevant file. See HELP VEDFILESELECT for more information.
Information on recent additions to the Poplog system
Poplog is still under development. For news on the latest additions to
the system give the command `help news'.
Literature sources for POP-11
The Poplog online information files are not the only further
source of information on POP-11. There are also a number of books that
provide useful information. The main reference text for POP-11 is still
Barrett, R., Ramsay, A. and Sloman, A. (1985). POP-11: A
PRACTICAL LANGUAGE FOR ARTIFICIAL INTELLIGENCE PROGRAMMING.
Chichester: Ellis Horwood.
There is now an extensive user guide for Ved (available at Sussex from
Berry Harper, 4C2).
McIntyre, D., VED USER GUIDE (2nd Edition).
A more limited and elementary text on POP-11 is
Burton, M. and Shadbolt, N. (1987). POP-11: PROGRAMMING FOR
ARTIFICIAL INTELLIGENCE. Addison-Wesley.
For those with slightly more experience on the computer-science side of
things there is
Laventhol, J. (1987). PROGRAMMING IN POP-11. Oxford: Blackwell
Scientific Publications.
A book that provides information on a number of large, POP-11
implementations of AI techniques is
Ramsay, A. and Barrett, R. (1987). AI IN PRACTICE: EXAMPLES IN
POP-11. Chichester: Ellis Horwood.
There is also a little information on POP-11 in
Yazdani, M. and Narayanan, A. (1984). ARTIFICIAL INTELLIGENCE:
HUMAN EFFECTS. Chichester: Ellis Horwood.
An interesting BYTE article that praises the worthiness of POP-11 as a
programming language is
Pountain, D. (1988). POP goes the macintosh. BYTE, 285-292.
A text (still forthcoming at the present time) that also presents POP-11
based material is
Thornton, C. and du Boulay, B. (1992). ARTIFICIAL
INTELLIGENCE THROUGH SEARCH. Intellect Press.
Exercises
To gain some familiarity with the online information system, you should
complete the following exercises. Copy them into a file of your own and
then edit in your answers under the questions. If possible get your
tutor or a friend to check your answers.
- Which online files in Poplog deal explicitly with `documentation'?
- In one of the files dealing with `documentation' there is some
information that explains the mechanism for accessing a cross-reference
to a particular section of a file. How does this mechanism work?
- Which file does the command `help +' put you into?
- What is the TEACH file called that deals with `discrimination
nets'?
- List all the possible ways of loading a file.
- Which method of returning values (from procedure calls) is used in
the examples in `TEACH TOWER'?
- How many cross-references to other files are there in this file?
- What is the meaning of `SHOWLIB'?
- How many files are there that deal with topics whose names contain
the substring `data'.
- Describe all the shortcut methods that exist for copying a range
of text from one file to another.
- How does the documentation describe the difference between the
`copylist' procedure and the `copytree' procedure.
- What happens if you hit the GETSYSFILE key when the cursor is at
the beginning of `HELP' in `HELP FOREACH'? What does this tell you about
the behaviour of this key-function?
- Which files does `TEACH LMR' assume you have already read?
- Some TEACH files have indexes included and some do not. Suggest a
plausible explanation for this inconsistency.
- Is there a built-in POP-11 command that can be used to find out
the current time? What sort of value does this procedure return? What
online files contain the most useful information about this type of
value?
- Identify three files, each of which uses a different convention
for describing how to issue a command (i.e., a ved command). Describe
the differences between the conventions.
- What is `TEACH PARPAR' really all about?
Moving on
If you have completed all the exercises satisfactorily you are now ready
to move on to TEACH POPCOURSE11. This deals with advanced POP-11
programming. If you are not interested in POP-11 you might like to skip
on to TEACH POPCOURSE13, which gives some pointers to other features of
Poplog.
Page created on: Fri Apr 26 09:35:01 BST 2002
Feedback to Chris Thornton
hits this year