CSP - language based on c C A R Hoare
Communicatingsequentialprocesses Prentice-Hall, Englewood Cliffs, N J, USA (April 1985) £27.95 pp 256
Communicatingsequentialprocesses is an exposition of the author's programming language (csP) based on concurrency and communication. 'The main objective of (the author's) research into communicating processes has been to find the simplest possible mathematical theory with the following desirable properties. (1) It should describe a wide range of interesting computer applications, from vending machines, through process control and discrete event simulation, to shared-resource operating systems. (2) It should be capable of efficient implementation on a variety of conventional and novel computer architectures, from time-sharing computers through multiprocessors to networks of communicating microprocessors. (3) It should provide clear assistance to the programmer in his tasks of specification, design, implementation, verification and validation of complex computer systems.' (p 223). In chapter 7 Professor Hoare justifies his solution by comparison with the main languages which address the same problems, OCCAM and Milner's ccs in particular. From a programming viewpoint csP generally handles concurrency and communication in a more satisfactory manner than either OCCAM or CCS; but if one wishes to write mainly sequential programs the comparison is less favourable, ADA and PASCALPLUSbeing preferable. However, the ease with which the dining philosopher's problem is solved and an operating system is designed (chapter 6) shows that many of the author's objectives have been achieved. The csP language is
512
mr
y and c
destined to be more significant than either OCCAM or CCS. The current book continues the high quality of earlier books in Prentice-Hall's Computer Science series. It is aimed at the professional, postgraduate or good undergraduate computer scientist without any prerequisite theoretical knowledge. Explanations of the definitions of virtually all the constructs are comprehensive and well illustrated. At no point is Professor Hoare too theoretical. There are many exam pies and these are continually developed or recast. One of my two major criticisms of the book is that there are no exercises to complement the language description in the clearly pedagogical style of the book. These would be essential for anyone wishing to learn the many different symbols well enough to benefit fully from the whole book. The other major flaw in this gem is that the main text contains no formal definitions of any of the symbols of csP. What the author does do is to give a number of 'laws' which the symbols satisfy. Some of these, when combined, yield the definition of the given symbol with the other laws as deducible theorems, but there is no indication of which law might produce the definition. Moreover, on one or two occasions laws are stated without all the necessary restrictions, sacrificing accuracy for readability.
Following up something you've just seen?
Please mention
Microprocessors and Microsystems
tien
The tormai definitions are deliberately relegated to sections entitled 'Mathematical theory'. The author and many others will consider this an advantage, t would much rather have seen them integrated with the informal descriptions because their juxtaposition might lead to a deeper understanding. This is most necessary for the nondeterministic aspects in chapter 3 where the difference between, for example, the internal and external choice operators F] and IZ] is very hard to describe without a precise definition at hand Typographical and other obvious errors are very few in numbers: in the first three chapters an inaccuracy h~ taw L5 on page 57 and the omission of a few brackets on page 131 are hardly worth mentioning. Every so often the author includes a section entitled 'Implementation' in which a L~S~:'definition of each construct is given. This further clarifies the c.~i~ language, can be omitted easily when reading individual chapters and presumably, when coalesced~ will provide an implementation of much of csP. The first couple of chapters are essentially just standard formal language theory re-expressed It would have been nice for more knowledgeable readers to have been given pointers to an appropriate starting point, even though the author is aiming at a general readership. Parallelism comes into the chapters on the deterministic theory. The hard work comes with the nondeterministic choice symbols treated in chapter 3, where the sequence of actions which a process may perform are found to bc insufficient to fully specify a process. Chapter 4 introduces commum ~ cation on channels between processes. Here piping, similar to that in Unix, is defined. This enables a particularly beautiful solution to be given to the problem of reformatting a sequence of lines of up to 80 characters into tightly packed lines of 1 25 characters each° In ,~ (( o n t J n u e d opposste, ~
microprocessors and microsystem..
SDK-85 provides ideas for microprocessor 'practicals' Borivoie Furht and Himanshu Parikh
Microprocessor interfacing and communication using the Intel SDK85 Prentice-Hall Reston, Englewood Cliffs, NJ, USA (April 1986) £31.00 pp 499 Intended primarily as a textbook for university students at all levels in electrical engineering and computer science, and assuming a basic knowledge of microprocessors, assembly language, flow charts and circuit diagrams, this book describes a number of fully tested microprocessor experiments. Sufficient detail is given so that a person competent in the practical aspects of microprocessors could reproduce similar experiments if desired. The book is based on the Intel SDK-85 single-board microcomputer, which includes on 8085 8-bit microprocessor, 256byte of static RAM, a 2 kbyte ROM-based monitor and simple I/O and timer facilities. A hex keypad and a one-line display are also provided. The SDK-85 includes a prototyping area, but this is not suitable for solderless breadboarding. The book recommends the use of the EXB-85 microcomputer experiment breadboard in conjunction with the SDK-85. ]-he first two chapters give an introduction to the SDK-85 and its use; the rest of the text covers 12 Hoare
(continued) conventional programming language it is usually necessary to favour input or output by having the outermost loop iterating over the characters of its lines or to have a possibly infinite buffer in which to store all of the text after unformatting it. Successful termination, interrupts, checkpoints and the most important aspects of conventional sequential programming (assignment etc.) are described in chapter 5. They are used in chapter 6 to construct an operating
4ol 10 no 9 november 1986
different projects (one per chapter) gradually increasing in complexity and ranging from the design of a slot machine to a microprocessorcontrolled robot arm. Around a third of the book is dedicated to appendices, consisting mainly of data sheets. These are normally available free from the manufacturers so I hope that they have not substantially increased the price of the book (although I suspect that they probably have). There is a fairly good index at the end of the book, although it does not include main entries under 'microprocessor' or 'interfacing'! In general each project introduces the student to an aspect of microprocessor-based design (e.g. interrupts, data communication etc.). The projects and concepts they introduce are simply and well explained. Full assembler program listings, with a reasonable number of comments, are included. Flowcharts are used to explain overall program structure; most of these fit onto one page and are thus quite easy to follow, but one is split onto four pages and is an admirable example of why flowcharts should only be used in the simplest of cases. Circuit and other diagrams are also included as required. For each project, from one to four experiments are described. Additional questions and problems are included at the end of each chapter. Some system; this is the main example given in the book to adequately justify CSP. The examples given are so varied -- including airline booking systems and networks -- and hardware is currently developing so quickly that it is hard to envisage a computer scientist not needing to know about concurrency and communication. This book is a good introduction to a language that can be used to think clearly in, and solve problems in, these areas.
projects require external (such as a robot arm
hardware or extra
peripheral chips on the breadboard) whilst others are self contained. Programs for the projects can be developed on a mainframe computer such as a Vax, or even on a microcomputer with the necessary crossassembler, and downloaded into the SDK-85. The ideal alternative would be to use a microprocessor development system, although this may not be available because of the added expense. For the book to be used by university students, it must also appear in paperback form (if it has not already done so). A version of the book without the program listings could be more suitable for students since then they could attempt to write the programs from scratch themselves if desired. In its present form the book would only really be directly suitable for student use if the SDK-85, or at least an 8080- or 8085based microcomputer, were used for the experiments. Otherwise its main use will be by university staff organizing microprocessor-based 'practicals'. In this context it would make a very good 'ideas' book whatever its price. I would recommend it for this purpose even if, as is likely, the SDK-85 itself is not to be used in the practicals. The projects could equally well be undertaken on a 16-bit system if required. The book claims to be a suitable textbook for a newly proposed course on interfacing and communication in the IEEE Curriculum of Computer Engineering and Science. This may be an important incentive for the use of the book in the USA. It also claims to be useful for engineers and programmers in industry and hobbyists who use microprocessors. It could be used by a keen hobbyist wanting to learn without tutoring, but it is unlikely to get more than a browse from the majority of industrial readers. Jonathan Bowen
C D Walter
UMIST, Manchester, Ul<
( )xford University Computin~ Laboratory, UK
513