Special purpose languages for behavioural experiments

Special purpose languages for behavioural experiments

Int. J. Man-Machine Studies (1981) 14, 317-339 Special purpose languages for behavioural experiments DAVID HAI.E Department of Psychology, Queen's U...

2MB Sizes 0 Downloads 76 Views

Int. J. Man-Machine Studies (1981) 14, 317-339

Special purpose languages for behavioural experiments DAVID HAI.E

Department of Psychology, Queen's University, Belfast Many special purpose computer languages have been written by psychologists to aid their experimentation. This paper examines some of these languages and considers why they were written, how they were implemented, what special features they offered, and why few have been "acceptable" enough to achieve widespread use. Languages were written to allow process input/output for the experiment, accurate timing, appropriate data structures, asynchronous data storage, operational conveniences such as multiple subject experimentation, conversational or concurrent program development, and suitability for novice users. Widespread use has eluded most languages because of implementation on idiosyncratic hardware, limitations in the language, and too much "single author dependence" giving lack of documentation, support and hence acceptability. It is argued that advances in low cost hardware, with the inevitable spread of computer controlled experimentation particularly amongst novices, and use of modern software development tools, might make the development of new special purpose languages more cost/effective. Alternatively, psychologists should make use of realtime languages developed outside psychology but augmented for easy use by psychologists. To ensure acceptability such languages must not only solve experimental problems but also have good "support".

1. Introduction Psychologists (and m a n y others) who acquire and then attempt to use laboratory computers often concentrate on hardware to the exclusion of software. H a r d w a r e is concrete and tangible--it can be seen and shown off--while software is intangible and unseen until it animates the hardware. Researchers will cheerfully commit large amounts of m o n e y for hardware yet complain at some much smaller costs for software. A consequence of this attitude is often a r a m p a n t acquisition of hardware without much prior consideration of what is likely to be the m a j o r cost in a computer based laboratory: the production, documentation and maintenance of application and system software. Such costs can be particularly high when appropriate high level languages are not used. Unfortunately, there is little advice available on the selection and use of problem solving software tools for psychological laboratory work. Early texts by Green (1963) and Uttai (1968) say little on high level languages while more recent texts by Apter & Westby (1973) and Weiss (1973) are more topic oriented. There are no modern, practically oriented, texts on the use of computers in the behavioural laboratory and general texts on laboratory computing almost universally advocate assembler programming. For example, in the total of over 1000 pages in texts by Brignell & Rhodes (1975), C o o p e r (1977) and Finkel (1975) only a bare two pages are devoted to high level l a n g u a g e s - - a n d these evidence little enthusiasm! Brignell & Rhodes (1975, p. 103) say, "Languages like C O R A L and E X T E N D E D F O R T R A N will no doubt become important as the degree of procedural complexity in laboratory calculation 317 0020-7373/81/030317 + 21502.00/0

9 1981 Academic Press Inc. (London) Limited

318

D. HALE

increases, but at present assembler language provides the best approach", and, likewise, Finkel (1975, p. 378), " . . . in spite of the advantages of FORTRAN programming most work is written in assembler languages". Given such attitudes in relatively recent texts written by "computer professionals", it is perhaps not surprising that in the decade-and-a-half since the first reports of computer use in psychology laboratories (e.g. Cooperband, 1966; Miller, Bregman & Norman, 1965) psychologists have expended countless man-years of effort developing (using Sammett's, 1969, distinctions) dozens of programming aids such as real time process control augmentations of existing assembler or high level languages and problem solving aids in the form of "new" high level languages and operating systems tailored to specific experimental paradigms. Some of these languages are reviewed by Barrett (1973), Wood, Sette & Weiss (1975) and in Weiss (1973), who concentrate on the features offered by only some of the languages. They do not consider the many reasons for developing such aids, the range of implementations, and why few have achieved widespread acceptability and use. This paper attempts such an overview and asks what lessons can be learned to guide future choice and development of software systems for the behavioural laboratory.

2. Why have psychologists "done it themselves"? Undoubtedly the earliest languages (for example, Simon, 1967) were developed because there were no manufacturer supported high level languages available--and almost anything was better than the tedium of assembler programming, particularly for the student and novice user. Even when manufacturer supported high level languages were available they often lacked vital facilities; for example both FORTRAN and FOCAL could not easily handle text strings, and all early languages lacked process control facilities for device control and timing. Many writers have lamented the lack of manufacturer interest in providing languages suited to behavioural experimentation. McLean (1969, p. 323) s a y s " . . , it is rare that a language devoted exclusively to process control is supplied.., the size of the market has been such as to discourage such attempts by manufacturers", while Pinkus & Gregg (1973, p. 165) lament that they have " . . . not seen a concerted effort by manufacturers, or user groups, to develop and standardize a programming language designed for the wide variety of experimental paradigms and tasks which characterise modern psychology". Basically, psychologists needed a language which allowed them to run experiments. This required process input/output with the connection and control of experimental equipment using digital, analog, textual and graphic events. Such events needed to be controlled and measured in strict real time involving the control of event durations, the measurement of elapsed time and the repetitive timing of events. Frequently many events and times might occur simultaneously and asynchronously posing problems of concurrency and task scheduling. Some experiments required a solution to the continuous data problem where large amounts of (typically) analog data must be acquired and stored without gaps appearing in the stored data. Many workers required data structures appropriate to their paradigm--~trings, lists, counters, histograms or commands which seemed more natural to the programmer's mode of thought--a trivial example being the ability to say INCREMENT X rather than X = X + 1. Many systems also emphasized a variety of operational conveniences. Until recently the high cost of

LANGUAGES FOR BEHAVIOURAL

EXPERIMENTS

319

even a small computer reinforced efforts to maximize machine use by timesharing many simultaneous subjects. For similar reasons some systems allowed concurrent program development while experimentation continued. Many systems allowed interactive or conversational program development removing the need for a series of edit, compile and load cycles. Some emphasized human factors by using languages which purportedly matched the way in which experimenters conceptualized experiments but also to make easily readable programs and programming languages particularly suited to novices. Some languages have been implemented so as to make it very easy to "re-invent the wheel" by allowing relatively easy modification or expansion to suit changing applications. Lastly, it is possible that at least one language was written as a commercial venture in order to make money!

3. Summary of approaches It is hardly possible to comment on languages developed by psychologists without saying something about the languages. Yet any such summary may read to some as a rather turgid obsessional list. The less patient reader might wish to skip this section entirely and proceed to section 4. In the space available it is not possible to give a detailed summary of each language. Rather, brief comments will be made and the interested reader referred to the original authors' papers. Programming aids are distinguished from problem solving tools which are then further divided into those which offer only relatively restricted features, those which are more capable and which usually have some resemblance to existing languages, and those which offer problem specific solutions. 3.1. P R O G R A M M I N G

AIDS

Programming aids are built upon existing software tools and merely assist the programmer in the generation of computer code while offering little conceptual aid to problem solving. The majority of present day psychology laboratory programming is still done using such aids. At the lowest, unaided level, hand coding of simple programs for "single board/prototyping" microcomputers has been used (see Hale, 1978). Still common is assembler programming which is used when no other aids are available or when maximally efficient programs are required. However, assembler programming is hard to learn, even harder to perform skilfully, produces programs which are hard to understand and modify, and which cannot be easily transported to other systems. Many workers have augmented assembler languages with subroutine calls for common operations such as process input/output, timing and data storage. Some of the relatively few published examples include Kaplan's (1976) FRIVLOS (an acronym for "First Rate Improved Verbal Learning Operating System") and PACER (Henry, 1976a, b) although Henry (1976b, p. 508) would view his routines not merely as assembler augmentations but as providing the run-time routines for a high level control language which has yet to be written. When does an augmented assembler become a high level language? The difficulty of distinction is shown with Getty's (1975) PEPL "Psychology Experiment Programming Language" which modified the 4k PDP8 assembler to accept new symbols acting

320

D. HALE

as high level commands. Interestingly, PEPL was one of the few languages (PACER is another) to allow multi-tasking and parallel processing. The most popular approach has been to augment existing high level languages. Conversational languages have been particularly popular vehicles with new commands added to FOCAL by Siegel (1972), Link (1975) and Mullen (1976). New functions have been added to minicomputer BASICs by Casteilan (1975) and Howard (1979), and many workers have recently begun to augment microcomputer BASICs (for example, see McLean, 1978; Perera, 1978; Price, 1979; Thompson, 1979, amongst others). The most widely available compiled language FORTRAN has been augmented with unpublished CALLs and functions by many workers. Those few publishing include Fitzhugh (1974), Lesgold & Fitzhugh (1977), Lewis, Osgood & Hebert (1973) and Taylor (1972). Even the C language has not escaped attention with Proudfoot (1978) adding procedures to C and a little assembler code to UNIX to allow cognitive experimentation. There are many advantages in such "quick and dirty" augmentations of an existing language. All the existing facilities of the base language are available. Thus BASIC is popular because of its wide availability, interactive program development and debugging environment, string variables with easy manipulation, easy program and data filing etc. FOCAL has been a popular base because the inherent plasticity of its table driven interpreter and availability of source code made the addition of new commands fairly easy. FORTRAN is universally available and, like BASIC, is widely taught with a vast supporting literature and some relevant existing software base. The limitations of the augmentation approach are discussed by Poison (1978) who concludes (p. 145) that the resulting language "lacks coherence" and is "badly human engineered". Despite such reservations the approach is likely to remain popular. 3.2. P R O B L E M SOLVING TOOLS

Most of the following languages were written specifically for behavioural science applications and, with differing degrees of success, aid psychologists in solving their particular problems.

3.2.1. Restricted languages with little family resemblance With the exception of Burkhardt's (1976) NOVA based EMPP most of these languages were written for stand alone PDP8s. Only SP-12 (Pitz, 1975) and TIICIE (Church, 1973) ran on LINCtape based PDP12 systems, the remainder used paper tape. Two similar languages are SIMPLE and HECL which used a restricted set of single letter commands followed by arguments. SIMPLE (Aaronson & Brauth, 1972; Aaronson & Grupsmith, 1978; Aaronson, Grupsmith & Ohman, 1975) was implemented on an 8k PDP8 with digital interface and display. User commands were drawn from a basic set of 14 single letters which were followed by an argument. The commands were chosen to o f f e r " . . , methodological chunks for many types of human information processing experiments" (Aaronson & Grupsmith, 1978, p. 763). The SIMPLE interpreter allowed fairly naive users to develop programs interactively within restricted paradigms of visual and auditory cognition. H E C L (Doll, 1972) was a semi-interpretive system with a preprocessor to turn source code into an interpretable form. The language had 12 single letter commands followed by arguments selecting values from predefined lists which specify possible trial parameters. Figure 1 lists basic HECL instructions. Facilities were available to select randomly and display a new stimulus, an old stimulus

LANGUAGES FOR BEHAVIOURAL

EXPERIMENTS

321

Branch to the/th instruction with probability m; otherwise go to next instruction D l rn Create a data record of size m bytes E l rn Erase positions l through m of the chronological memory F klm n Provide feedback about the last response by jumping ahead to next instruction as specified by k I m n I l m Randomly select and execute a time interval from among positions l through m in the list of time intervals Jump to /th instruction m - 1 times; then go on to next instruction. J l m (m = 0 gives unconditional jump to l, l = 0 ends the experiment) Modify the /th item in the list of instructions; k gives the operation M kl m (O = substitute, 1 = add, 2 = subtract) and m is the argument Randomly select and display a "new" stimulus from among positions l N k*l m through m in the list of stimuli. "New" means that the stimulus does not appear in chronological memory 0 k*l m Randomly sample and display an "old" stimulus from among positions l through m in chronological memory R l m Wait up to l milliseconds for m response characters (i = 0 waits for indefinite time) S k*l m Randomly select and display a stimulus from among positions l through m in the list of stimuli X l n Execute user supplied routine Note: the letters k, l, m and n represent numbers in an actual program. The k in N, O and S instructions specifies the position of the stimulus display (k = 0 means the upper row of display tubes, k = 3 means the lower row). B

!

m

FIG. 1. H E C L "instruction set".

or just any stimulus. It was also possible to select r a n d o m l y and then wait for a time interval, erase parts of a data record, b r a n c h with specified probability, wait for a specified n u m b e r of response characters for a specified time, save a data record, j u m p and do conditional jumps. PSYCLE (Creelman, 1971) again used a 4k P D P 8 with digital interface to three subject b o o t h s to control psychoacoustics experiments using a p r o g r a m m a b l e function generator, electronic switches, variable attenuators, noise generators, f e e d b a c k lights and response switches. T h e basic p a r a d i g m involved the presentation of a specified auditory event for a specified time and then recording the responses and response times of multiple subjects. A simple c o m m a n d language was used in which each line started with a time followed by a list of events that were to start at the beginning of that time and continue for its duration. Results were saved in m e m o r y and printed at the end of trials. T I I C I E ( D y c k m a n & Church, 1972; Church, 1973) used a rather similar simple c o m m a n d language on an 8k P D P 1 2 to run up to six rat boxes simultaneously. T I I C I E ' s operating system was m o r e c o m p l e x and the e x p e r i m e n t e r could m o n i t o r the progress of the e x p e r i m e n t by examining counters etc while the e x p e r i m e n t is in progress. D a t a could also be continuously saved o n t o L I N C t a p e for later analysis. SNAP (Simon, 1967, 1973) was the only language specifically designed for psychophysiological w o r k and was i m p l e m e n t e d on a s t a n d - a l o n e 4k P D P 8 with analog interface and display. It was a simple single user interpreter where a p r o g r a m can contain a m a x i m u m of 89 c o m m a n d s . E a c h c o m m a n d consists of five characters which perform: eleven m a t h e m a t i c a l functions, print output, display a point on the screen or a

322

D. HALE

whole table, simple conditionals, table lookup and manipulation and machine code subroutines. With such a simple language it was possible to program, for example, a pulse interval histogram with display of the histogram in only eleven instructions as shown in Fig. 2. 10

11 12 13 14 15 16 17 18 19 20

RUBTB U=T+Z Y--AN1 BM12Y I=T-U I=I*K GITBC C=C+D PITBC DISTB BZllZ

Clear table Set U equal to time of last pulse Look for positive pulse If no pulse go back to 12 Interval equals time of new pulse minus time of last pulse Scale to between 1 and 100 Get value of C from table place I Increase C Put new C into table place I Display the table Branch back to 11

FIG. 2. SNAP program for pulse interval histogram and display.

HEPS (Schneider & Scholz, 1973) used a stand-alone 4k PDP8 with a F O R T R A N subset ( R E A D , W R I T E , F O R M A T , IF, DO, G O ) and an A R I T H M E T I C instruction for the four basic integer arithmetic operations. S E T was used for constant initialization and C A L L s for all process routines. As these C A L L s were made to arbitrary numbers specifying the actual m e m o r y location of the service routine a H E P S program was very opaque and benefits little from its supposed derivation from F O R T R A N . The sample of code shown in Fig. 3 illustrates the unreadability of HEPS. SP-12 (Pitz, 1975) was an interpreter for the P D P 1 2 allowing single subject cognitive or h u m a n p e r f o r m a n c e experimentation. It used single c o m m a n d words for control of all P D P 1 2 peripherals (relays, sense lines, analog input, display). A fairly wide range of

210 220 230 240 245 25O 255 260 265 27O 28O 285 288 3oo 3o5 31o 320 330 333

CALL 86(40)'GET UNIFORM RANDOM NO. FROM 0-2047 40=40-I 9'SUBTRACT 1024 FROM IT IF(40)260,260,240'BRANCH PROB..5 TO 260 A RSET=ZERO'SET REZP. INDICATOR TO IOS SET CALL 91 ( s lOSITIVE S ~ A STIM+I 'STORE POS. SET STIM TO BE PRF~ENTED GOTO 280 A RSET=I 5 'SET REZIONSE INDICATOR TO NEG. SET CAIL 91 (s NEGATIVE SET A STIM=I O'STORE NEG STIM SET TO BE PRESENTED WRITE 13, IS'PRI~ A rim{ FEED TO WARN sLrmrmT CALL 78(300,s .5 SECONDS XIT 'WAIT WRITE 1 3 , S T I M ' P R ] ~ THE STIMULUS CALL 78(400,s WAIT FOR RESPONSE UP 2 SEC. CALL 95 'INITIALIZE LATENCY C 0 1 ~ T I O N INTERVAL READ 12,14'WAIT FOR INPUT CALL 969X,X)'GET LATENCY CALL 78(0,~0)'TURN O ~ 2 SEC. WAIT FOR m~SP

FIG. 3. HEPS segment for part of Sternberg memory scanning paradigm.

LANGUAGES

FOR

BEHAVIOURAL

EXPERIMENTS

323

general programming was possible though all used "non-standard" commands--for example P U T performs arithmetic. EMPP (Burkhardt, 1976) was an "Extensible MultiProgramming system for experimental Psychology" and used a 16k disk based N O V A to control eight independent stations each with refreshed graphics display and digital interface. The compiler, which was written in F O R T R A N , converted source program to about 25 macro calls and it is claimed (as its name implies) to be easy to extend the language by adding new macros to the system. There were global and local variables which would be either scalar or vector with both single and double precision integers plus strings. EMPP otfered normal arithmetic, logical operations, permutations of lists and string manipulations and could process binary and octal as well as decimal integers.

3.2.2. More capable languages Two capable languages, A P C O L and GEPS, had little resemblance to existing high level languages. A P C O L (Gregg, 1973; Pinkus & Gregg, 1973) was implemented on a 16k Honeywell D D P - 1 1 6 with disk operating system and timeshare hardware. It ran seven experimental rooms each with digital interface, display and Teletype where subjects could be run simultaneously on cognitive tasks. A P C O L was implemented both as an interactive compiler working on a line-by-line basis and as a cross compiler allowing program development on an IBM mainframe. It was developed to be a "natural" language by asking psychologists how they conceptualized their experiments. The language produced is certainly very readable, as is shown in Fig. 4, even if this has been achieved through increased verbosity. It offered many interesting features including lists and list manipulation commands, randomization for integers within specified ranges, permutations of events and random sampling with or without replacement. Uniquely, it had commands to allow an experiment to interact with a simultaneous simulation running on an IBM mainframe. GEPS (Kieras, 1973; Halff, Scholtz & Walker, 1975) was a " G e n e r a l Experiment Programming System" implemented on a IBM 1800 to run multiple subjects on cognitive tasks using displays and response buttons. The sophisticated hardware allowed concurrent experimentation and program development. The language was supposedly F O R T R A N like but the resemblance is faint. Halff et al. (1975) suggested GEPS more as a way of easily implementing new language elements as the system consisted largely of macro instructions. Many workers have decided that a process control language is best built on the foundation of an existing language.Such a family resemblance gives the new language both the strengths and weaknesses of the original. F O R T R A N and A L G O L have been popular bases but F O C A L and POP-2 havealso been used. Two languages, P S Y C H O L and E C L have used an A L G O L base. PSYCHOL (McLean, 1969, 1973) was deliberately based on A L G O L as a "superior language" and ran on the Carnegie-Mellon Honeywell D D P - 1 1 6 which later hosted APCOL. It was designed to run up to eight simultaneous experimental booths mainly for cognitive experiments. It had lists which could contain integers, strings or tasks which provided an ordering of portions of executable program that could be executed in order, randomized or manipulated as other list items. Historic variables retained information for a specified interval within the program and were implemented as circular push down lists. Event declarations specified points of the program where output was required. Relative timing was available within the program by associating labels with the time at which

324

D. HALE

OI00 0200 O4OO O5OO O6OO O7OO O8OO

O9OO IOOO 1100 1200

'SA~PLE APCOL EXPERIMENT FOR STERNBFRG'S (1966) 'EXPERIMENT VARYING SET SIZE FROM I TO 6 READ 10 NUMBERS INTO LIST STD~.LIST STORE 0 IN TRIAL.NO TRIAL: PERMUTE LIST STIM.LIST GENERATE A RANDOM NUMBER FROM ] TO 6 RECORD LIST.N SIZE !

2600 2700 28OO

BEGIN LOOP OUTPUT DO I FROM I TO SIZE Sk~T,ECT ITH ITEM I FROM LIST STIM.LIST DISPLAY LIST.C ITH AT 20 10 WAIT 12OO MS ~ID IDOP OUTPUT BLANK AIL GENERATE A RANDOM NUMBER NRAND FROM I TO 100 IF ~qAND GT 50 GOTO NOT.IN.SET 'PROBE IN SET STORE I IN INSET GOTO INSET. REaP G ~ q A T E A RANDOM NUMBER PROBE FROM I TO SIZE 'PROBE NOT: IN S E T NOT. IN.SET STORE 0 IN INSET STORE SIZE+I IN PROBE INSET.RESP: GENERATE A RANDOM NUMBER NRAND FROM I TO 2 STORE NRAND*I 6 IN IN. SET. RESP WAIT 2000 MS

29OO 3OOO

SHOW RESPONSE: SET BIT IN.SET.RESP FOR 1000 MS

13oo 1400

15oo 16oo 1700 1800

1900 2OOO 2100 2200

23OO 2400

25OO

31oo 3200 3300 3400

35OO 3600 3700 3800 3900 4000 4100 4200 4300 4400 4500 4600 4700

48OO 4900

5OOO 5100 52OO 53OO 5400

55OO 56OO

!

WAIT 20o ~s SELECT TEST ITEM PROBE FROM LIST STIM.LIST DISPLAY LIST.C TEST AT 20 10 TI~ START WAIT 5000 MS OR FOR ANY RESPONSE RESP T I M ~ END REACTION.TIME BLANK ALL IF IN.SET.RESP NE RESP GOT0 EISE IN INSET EQ 1 GOTO CORRECT GOTO WRONG ELSE: IF INSET EQ 0 GOT0 CORRECT GOT0 WRONG CORRECT: DISPLAY 'CORRECT' AT 17 12 RECORD 'CORRECT ' GOT0 WAIT WRONG: DISPLAY 'INCORRECT' AT 16 10 RECORD 'WRONG ' WAIT: WAIT 2000 MS BLANK ALL RECORD LiST.N RESP RECORD LIST.N REACTION TIME STORE TRIAL.N0+! IN TRIAL.NO IF TRIAL.NO LT NTRIALS GOT0 TRIAL !

DISPLAY 'END OF EXPERIMENT' AT 12,12 DONE FIG. 4. APCOL program for Sternberg memory scanning paradigm.

LANGUAGES

FOR

BEHAVIOURAL

EXPERIMENTS

325

control passes the label. Thus execution was suspended, after label X when the instruction label X + 100 MSECS was found, for 100 milliseconds. Similarly one could use instructions such as WAIT UNTIL L A B E L + 2 SECS or perform an UNTIL L A BEL + N MSECS DO. In many ways PSYCHOL offered a richness of data structure and timing facilities absent from other languages so it is curious that Carnegie-Mellon abandoned PSYCHOL in favour of APCOL. E C L (briefly reviewed by Barrett, 1973) used an A L G O L subset augmented for multiple animal experimentation on an Eiliott 4130 with 32k of memory and disk system. ECL lacked A L G O L features like general purpose arrays but added RECORDS to store data in ways convenient to animal experimenters, TABLES which contain lists of integers and comprehensive timing and digital input/output facilities. PROSS, PLE and 8TRAN used a F O R T R A N base. P R O S S (Scholz, 1972, 1973) used a 32k word IBM 1800 with disk and timeshare hardware. To a FORTRAN like subset were added facilities such as INCREMENT, DECREMENT, complex IFs, DO WHILE, interprogram communication, and array manipulations via MOVE and ZERO within specified ranges. PROSS was deliberately designed to ease mancomputer communication by asking experimenters how they would most conveniently express their experimental design to a computer. PROSS was designed to offer readable source statements and (Scholz, 1973, p. 245) " . . . to present experimental procedures as an ordered sequence of discrete operations, spaced appropriately in time by the introduction of delays whose termination was either response contingent or time contingent". P L E (Palmer, MacLeod & Loftus, 1978) was implemented on a 24k NOVA with disk and Tektronix 604 displays with up to eight stations for "programmed tachistoscopic" work. PLE was deliberately F O R T R A N like and had affinity with EMMP but with better branching facilities including an IF T H E N ELSE DONE. It used formatted I / O to control displays using a WRITESCOPE instruction, strings could be concatenated and subtracted, vectors permuted and logical operations performed. 8 T R A N (Wallsten, 1972; Jones, Johnson & Young, 1973) was developed as a FORTRAN IV superset for a 16k OS/8 PDP8. It included PL/1 type features including: fixed length bit strings, fixed or variable length character strings, and pointers. It also had unformatted I/O, character manipulation and easy data filing. A timeshared operating system allowed eight independent subjects performing mainly concept formation tasks. S P E X (Draper, 1973) was a "Speech Experimental system" using a FOCAL-12 superset on a 12k disk based PDP12 driving a FO N E MA speech synthesiser. It offered powerful commands for editing parameter files to drive the synthesiser and allowed, within a basically very slow interpreter, real time speech synthesis, adaptive modification of parameters and collection of responses from multiple subjects (though all subjects received the same sounds). Experiments were programmed interactively in FOCAL and the whole system was excellently human engineered for a very specific research paradigm. A POP-2 base was used for G L U E (Green & Guest, 1974) which was a tongue-incheek acronym for "Generalised Language for Universal Experimentation", although the published description gives little idea of the real power of G L U E or even a whiff of what a G L U E program or programming actually involves. It was implemented originally on a paper tape based M O D U L A R 1 though a disk version made it more viable. A NOVA version was developed yet appears to have remained unused. Its POP-2

326

D. HALE

likeness made G L U E useful for complex linguistic experiments including evaluation of programming language constructs. Its writers offered G L U E as a relatively easy way to implement any language which could then be easily augmented.

3.2.3. Problem specific languages Many languages attempted to relieve the reluctant programmer of much of the technical tedium of programming by allowing a notation which was close to the way in which the problem was conceived. Dillon, Dumontier, Bezanson & Brennan (1978) (quoting Leavenworth, 1974) classify such languages, which concentrate on what rather than how, as very high level languages. Within psychology, those based on state notation are classic examples of this approach and less well known are languages based upon presentation of lists of stimuli. Similarly, application oriented languages for computer aided instruction or interviewing could be used for experimentation. State notation languages (see Leslie, 1981) relate to a method by which, animal researchers in particular conceptualize their problems. An experiment is conceived as a series of discrete states each specifying a particular stimulus set. Transitions between states occur under specific conditions: (1) when a specified time has elapsed, (2) when specific responses occur and (3) when some computed value, such as an appropriate number of trials, is achieved. The three state notation languages were initially developed on PDP8 computers but at least t w o - - A C T and S K E D - - a r e now available on more modern machines. All have some degree of "commercial" support and all have achieved some wide popularity. A C T (Millenson, 1970, 1971, 1973, 1975; Mickey, 1976, amongst many other papers) is the popular " A u t o m a t e d Contingency Translator". It was originally written for the PDP8 and while variants apparently exist for the PDP11 and PDP9 its normal implementation is on a paper tape based N O V A of 16k or more. Program editing has to be done off line and though an interactive compiler allows on line entry of programs such programs are not available again unless keyed onto paper tape. Augmentations in the U.S.A. allow experimental data to be dumped to disk (Marriott & Voigtman, 1976) and it is reported that the A C T - N system available in the U.K. may soon allow program loading and data dumping on disk. A C T is purchased as a commercial system with special digital interfacing to allow multiple subjects to be run in remote locations. An interactive compiler and run time interpreter allow concurrent program development while running independent subjects on multiple experiments. It is also possible to examine and modify variables while a program is running. Its main use has been in animal operant work and its limited ability to dump data continuously !s restrictive for activity analysis. It has no text, analog or graphic facilities, allows no machine code user routines, and, at least with A C T - N is very hard to modify. It provides real parallelism whereby independent events and times can be scheduled within the same program and, if required, states can be nested or run in parallel. It offers a restricted BASIC subset for computation but this is not synchronized to real time processing. SKED (Snapper, 1974; Snapper & Kadden, 1973; Gilbert & Rice, 1978) is a non-commercial, user group supported, state notation language originally available for stand-alone PDP8s or those with OS/8 though recently a N O V A real time disk operating system version has become available (Gilbert & Rice, 1979). SKED has a very active user group which supports and documents software, sells hardware at "cost" (though with the full documentation available it is relatively easy to configure SKED to

LANGUAGES

FOR

BEHAVIOURAL

EXPERIMENTS

327

your own hardware), and organises the development of " S u p e r - S K E D s " for subsequent sale at low cost. As with ACT, S K E D allows multiple stations and simultaneous experiments. Programs are again written in a state notation and while original versions of S K E D offered little more than glorified racks of modules, more recent versions have some computational ability and can also perform program and data filing to disk. One great advantage of S K E D over A C T is the ability to add machine code functions for operations not available in the standard language. SCA T (Stadler, 1969; Poison & Campbell, 1972; Poison, 1973) is unique in being a commercial venture. It was originally written for the PDP8 but also ran on the Xerox Sigma 3 and IBM 1800. It uses state notation and special interfacing to allow multiple remote simultaneous subjects. SCAT offers each station program the use of 10 constants, 10 timers, 10 histograms and one variably dimensioned list. The user can program arithmetical functions and dynamically examine program results while the program is running. Two languages which allow presentation of verbal/textual material in experiments are A P P L E and " D I L L O N " . Both were intended to be used by non-programmers. APPLE (Onifer, Hirshkowitz & Swinney, 1978) used an O S / 8 12k PDP8e with x/y scope for the display of text, digital input and a computer controlled tape recorder. It was designed for standard cognitive tasks involving visual or auditory presentation of textual material for controlled times and the recording of subjects' responses and response latencies. The system was not programmed in the conventional sense since it worked as a list driven procedural interpreter. The user first created a file containing, say, all the text strings required for display. The system then had a dialogue with the user to set up run time parameters---display times, types of fixed or random inter stimulus intervals, valid responses, form of data storage, etc. The system was written in assembler to allow non-expert users access to a powerful "programmed tachistoscope" to run a limited but popular set of paradigms. "DILLON" (Dillon etal., 1978) is an arbitrary name given here to the system which, almost uniquely, did not have an acronym bestowed upon it by its creators. So, for easy reference, we will refer to it by the name of its first author. D I L L O N uses a 32k word RDOS N O V A with digital input/output and self scan panels for the display of textual material to a single subject. Its authors argue for the use of a very high level language to help those who know nothing about computing, but do know how to design experiments, to get on with the experiment design and then run it on the computer. It uses a very limited command repertoire where each command incorporates all the information required to specify some complex operation. For example, they do not just DISPLAY information, they display some information, on some display device, at some location, for some duration, and it may or may not be wished to blank the display on response, sense a response to the display, store the response and the latency, terminate the command when the response occurs, start timing from the first or last item displayed. All of the above could be specified in a single command. D I L L O N uses 20 such "basic" commands in the form of the command name then a series of parameters on a single line. Many experiments can be done with only six commands: DECISION, DISPLAY, D R I V E (digital output), S U B R O U T I N E , W A I T and WRITE. The authors claim that the major obstacle for naive users is mastery of the N O V A text editor and R D O S operating system. D I L L O N also enjoys some very good "job aids" and user oriented documentation.

328

D. HALF.

Several systems developed for specific applications may form models for very high level application oriented "languages" suitable for non-programmers. C A N - 4 (Churchill, Naess & Oliver, 1971; Durell, 1972) stands for "Completely Arbitrary Name (Version 4)" which is a CAI system with good facilities for the display of text, scoring, editing and timing of responses, computing feedback, user subroutines and performance files. It is argued that such facilities may be useful to cognitive psychologists-particularly those who do not wish to master a proper programming language. Examples are quoted for the use of CAN-4 in concept formation and rule learning experiments. A VIE) (Scholz & Snow, 1978) is another CAI system designed to allow "naive" users easily to prepare lessons via a fully prompted author system. Another example of specific application software is F R A M E (Angle & Carroll, 1979) which facilitates computer based "interviewing" via the easy generation and storage of multiple-choice type items. It uses seven interview and two file commands and is implemented on a PDP11/40 RSTS system. The authors comment that such a small command set is easily mastered yet permits complex multiple-choice interviews.

4. Comparisons and comments From the multitude of possible comparisons it is proposed to discuss only experimental paradigms, processors, timesharing, parallelism, family resemblance, human factors, and special facilities. 4.1. P A R A D I G M S

Some psychological paradigms are served by single languages. SNAP supported psychophysiology with its need for analog input and easy display of graphical data. SPEX enabled speech synthesis and easy editing of complex parameter files for digital control of a speech synthesizer. PSYCLE ran psychoacoustics experiments through digital control of tone generation. GLUE supported cognitive experiments using complex linguistic material. It is not surprising to find only one language with GLUE's capabilities as relatively little computer based psychological experimentation has been done in such areas. However, given the popularity and equipment dependence of psychophysiology, speech and psychoacoustics, it is surprising that more special languages have not been reported. More popular have been languages for animal experimentation, both operant and activity analysis. This area has traditionally been dependent upon equipment such as relay or solid state logic modules, counters, cumulative recorders and event recorders. Though data in animal paradigms have almost always been relatively simple discrete digital eventswith many animals performing relatively simple and slow tasks, there is often a need to control and measure multiple overlapping events and times. Five languages have been specifically designed for such work: ACT, SKED, SCAT, ECL and TIICIE. Interestingly, three of these, ACT, SCAT and SKED, have received widespread use. By far the most popular paradigmatic area is cognitive psychology which is supported by almost all the remaining languages. A typical cognitive experiment involves the presentation of textual (and, much less frequently, graphic) material on a display screen and then recording the response made by the subject and its latency. SIMPLE, PLE, DILLON, APPLE, EMPP, APCOL and the others were mainly directed towards such

LANGUAGES

FOR

BEHAVIOURAL

EXPERIMENTS

329

work. The facilities needed are relatively simple: ability to handle text strings, display text on a screen and time responses accurately. A limited degree of parallelism is needed whereby display duration, response monitoring, and response timing can occur concurrently. 4.2. PROCESSORS Until recently the most basic obstacle to portability of process control language software has been incompatibility between different processors. Sidowski (1972) counted over 50 different types of minicomputers which could be used for experimentation. Today the situation is little better given the range of microprocessors now available. It is unfortunate that some of the most interesting languages were written for fairly unpopular, now obsolete, or idiosyncratic processors. Many used machines which even today would seem powerful with multiprogramming hardware. For example, PSYCHOL and A P C O L used the Honeywell D D P 116, G L U E used a M O D U L A R 1, GEPS and PROSS used the IBM 1800, and E C L used the Elliott 4130. SP-12, TIICIE, and SPEX used the PDP12 for which no compatible product is now available. Many of the languages developed for the first generally available minicomputer, the PDP8, are very primitive, for example: A P P L E , H E C L , HEPS, PEPL, PSYCLE, SIMPLE, SNAP, and it would not be worth the cost and effort of implementing them today even though the PDP8 is still available. Some PDP8 languages, ACT, S K E D or SCAT, are still viable although it would be better to run A C T or S K E D in their N O V A versions. NOVAs are well provided with languages--ACT, D I L L O N , EMPP, PLE and SKED. It is surprising that few languages have been reported for the PDP11 as it is by far the most common machine in laboratories. Today A V I D and F R A M E run on PDP1 ls and it is possible that versions of ACT, 8 T R A N (11TRAN ?) and ECL may exist. 4.3. TIMESHARING Timesharing is normally a property of the operating system rather than the language (however, see P L E and EMPP) but many of these languages are integrated with their own timeshared operating system which usually allow multiple subjects to be run on independent experiments. Such a facility was obviously necessary given the very high cost of early computer hardware. The ability to run multiple subjects, particularly animals, also economizes on experimenter time. Many languages offer such timesharing including all the languages for animal work and many designed for cognitive experiments: A P C O L , 8 T R A N , EMPP, GEPS, PEPL, P L E and PROSS. SPEX and PSYCLE allowed multiple subjects even though each subject received the same stimulus material. 4.4. PARALLELISM In most process control it is necessary to program independent events which can occur in parallel: i.e. multiple overlapping time intervals, response timing, recording of data, and communication with the operator. Some paradigms, particularly involving animal operant work, must have parallelism and all the state notation languages include it as a basic feature. Most other languages only include parallelism in relation to delay and response timing. Thus P S Y C H O L allowed one to A W A I T responses F O R times SECS and then recover the results of the response via R E S P O N S E INTO x and L A T E N C Y INTO y. D I L L O N and SP-12 allow a series of commands to be executed automatically

330

D. HALE

for a specified TIME. Interestingly, PEPL, one of the simplest languages (Getty, 1975, p. 12), allowed parallel processes which are executed at the end of a specified T I M E O U T or when specified response events are E N A B L E D . Execution of such tasks was ended with an E N D T A S K statement. Care needs to be taken, however, with parallel processing, as problems can arise when multiple events occur together and have to be queued with some decision made over their priority. An example of related problems is the inability of A C T to synchronise a computation with real time processing--it is not easy, say, to give feedback based upon computations of a subject's past performance. Frequently it is possible to simulate parallel processing in a strictly serial program. Providing a counting clock is available it is possible repeatedly to poll inputs, check time delays, etc. and so give an impression of parallel processing. 4.5. FAMILY RESEMBLANCE Many of these languages do not resemble common computer languages. Of those that do there are ditterent reasons for choosing one base language over others. PSYCHOL was specifically based upon A L G O L as a "superior language" (McI.ean, 1969, p. 323) as was ECL. PROSS, P L E and others resembled F O R T R A N largely to make learning easier for those who already knew F O R T R A N . SPEX was based upon F O C A L purely because F O C A L was available in an easily modified form, with source code, on the PDP12 available at the time. F O C A L was not attractive as a language but rather as a convenient implementation vehicle. G L U E was written to resemble POP-2 as GLUE was required to allow easy experimentation using linguistic material. What are the best criteria for choosing a base language--other than pragmatic ones of availability as with SPEX? Should one choose the most commonly used base language to maximize transfer between the two, when the most common languages (such as F O R T R A N and BASIC in many of its recent augmentations on microcomputers) may not be "best" as programming languages? Or should one choose, as with PSYCHOL, a " g o o d " language accepting that the major problem is learning any language for the first time with subsequent language learning being much easier? Alternatively, if one needs specific features, such as G L U E , the choice of base language may be obvious. 4.6. HUMAN FACTORS Some languages were designed to facilitate m a n - c o m p u t e r communication by enabling researchers to specify the solution to their problems in a form most closely resembling the conceptualization of their problems. This approach has taken the "imposed" state notation form of A C T and S K E D or has involved asking researchers how they would prefer to specify their problems. PROSS and A P C O L are examples of this approach. Some languages have emphasized readability, with A P C O L as the prime example. Many languages were designed to facilitate computer use by novices. There are, however, vast differences in what constitutes novice learning. Thus, Aaronson & Grupsmith (1978, p. 763) state that S I M P L E i s " . . , so simple that even a new user with no computer background can get a program running in less than a week". Schneider & Scholz (1973, p. 173) are slightly less ambitious for H E P S which is, " . . . constructed so that a person familiar with computers should learn to use it in about a week". However, Simon (1967, p. 83) is supremely confident that with SNAP: " . . . a useful subset of the language should require less than one hour of instruction". Other writers bemoaned the difficulties of novices learning existing languages. Thus, Pitz (1975, p. 42) says that

LANGUAGES

FOR

BEHAVIOURAL

EXPERIMENTS

331

SP-12 " . . . had to be m.uch easier to learn than assembler as students find it hard to devote time to P D P 8 / L I N C 8 codes". While Pinkus & Gregg (1973, p. 165) regret that " . . . the Computer Controlled Psychological Laboratory has not lived up to e x p e c t a t i o n s . . , there is a language b a r r i e r . . , what is needed is a high level language and operating system to satisfy general user requirements in a human factors way". Dillon et al. (1978, p. 315) s a y " . . , we cannot expect the occasional or one-time user to learn and remember the differences between object and source codes, between constants and variables, local and g l o b a l . . , etc . . . . we have attempted to design a language that is meaningful and easy to use for the psychologist who knows no programming language and nothing about computers but who does know how to design e x p e r i m e n t s . . . ". Discussion of novices raises questions about for which user group any language is intended. The true novice is an occasional user who knows nothing about computers, and does not want to know, yet who desires easy implementation of computer based experiments. Presumably he must be content to develop experiments only within the capabilities of any novice language. Ideally any novice language should have greater capabilities to allow more complex non-paradigmatic research. In contrast the experienced researcher wishes to implement unique and often difficult experiments. Clearly he would be greatly restricted by a "novice language" unless such a language was a restricted subset of a much more powerful or extensible system. Such experienced workers will also tolerate less friendly systems and a greater learning requirement. Finally, it must be said that it is often an unfriendly programming e n v i r o n m e n t - - t h e difficulty of learning a complex operating system, editor, etc.--which deters potential users. Any "friendly" language must be embedded in an equally friendly programming environment. 4.7. FACILITIES PROVIDED Only brief mention will be made of some of the specialfeatures thought necessary to aid psychological experimentation. Any process control language must offer timing. For delays P S Y C H O L uniquely used label relative timing whereby a W A I T U N T I L label + time would delay at the specified label for the appropriate time. Most languages offered a W A I T time UNITS for a basic delay, while a W A I T K will delay until an appropriate response occurs or in a W A I T R T , until either the delay time has elapsed or a response occurred. Some degree of parallelism was often present such that response monitoring and elapsed time measurement are enabled via an A L L O W or P E R M I T and then a time delay can occur during which a response and response time could be automatically collected. Elapsed timing could also be performed via T I M E R S T A R T and T I M E R E N D commands. Often an incrementing time value was available in variables C L O C K or TIME. Repeated timing was possible in some languages: PSYC H O L allowed an U N T I L label § time D O and D I L L O N used a T I M E command for delays and repeated subroutine execution. Digital input and output was available where, for example, T U R N ON would output specified bits and O U T P U T would set an entire 8, 12 or 16 bit register. Many languages did not have a specific instruction to input or poll digital input values into a variable. Rather they A L L O W and then P R O H I B I T responses to be acquired by the system or can D E F I N E valid responses. There were a great number of display control instructions to perform obvious operations, E R A S E or B L A N K to clear, POSITION, SIZE, etc. to set parameters, D I S P L A Y T E X T to add to

332

D HALE

the display, R E F R E S H to maintain or start a display, E R A S E P A R T S to delete items selectively, D R A W to display a set of array values in sequence and a related DISTB to display table values. Interestingly, there were few instructions for vector plotting and graphics. For analog input there were commands which specify input on a particular channel. Some languages offer new data structures. Unique again was P S Y C H O L with LISTS which were ordered sets of integers, strings or even tasks. These lists could be accessed in order or permuted by other commands. P S Y C H O L also used HISTORIC variables which retain information for a specified period. Many languages used C O U N T E R S , H I S T O G R A M S , R E C O R D S or T A B L E S to offer scalar or vector variables in a way immediately familiar to non computer oriented psychologists. Most experiments involved some random generation and a command to allow the generation of a random integer between specified upper and lower limits. Some languages allowed the automatic permutation of elements in a list while a few allowed sampling of items from a list either with or without replacement. Some languages allowed branching to be performed with a specified probability. A very few languages offered explicit parallelism commands. Both E M P P and P L E used F O R K and JOIN to allow one program to segment and control separate subjects using local rather than global variables. PEPL could E N A B L E response and T I M E O U T delay initiated tasks and could D I S A B L E or C A N C E L them. The state languages have both an implicit and explicit parallelism. Data storage was sometimes done with a R E C O R D statement while terminal communication has been done with a R E C E I V E and SEND rather than the more common R E A D or W R I T E . Arithmetic operations were often available in different forms, thus one could I N C R E M E N T or D E C R E M E N T variables by one, P U T was sometimes used to perform arithmetic and various forms of string concatenation or search were provided.

5. Conclusions Evidence from recent surveys of computer use in British psychology departments (Hale, 1977; MacRae, 1980) suggests that few of these languages have achieved widespread use outside their authors laboratories. Wood et aI. (1975) agree that most languages only achieve such local success which may not survive the departure of the author. Why is there local success and widespread failure? Many languages used obsolete and eccentric hardware, so, whatever the attractions of the languages which used them, nobody today would revive an IBM 1800, D D P 116, M O D U L A R 1 or PDP 9. Languages for such machines may have been re-implemented on modern hardware but there are no published reports. Many languages are relatively primitive attempts to avoid assembler programming or overcome limitations in early high level languages and as such are not worth the effort of transporting to another site or re-implementing on modern hardware. Added to these limitations of portability and utility are other problems of documentation, publicity, support and acceptability. Wood et al. (1975) summarize this problem as one of "single author d e p e n d e n c y " - - t h e language writer and perhaps his students and colleagues use the language but when the writer leaves all use stops. This may be because only the writer was interested in that particular research paradigm, but more likely it is because there is insufficient documentation to allow continued support of the system. Documentation is often called the "castor oil of

LANGUAGES

FOR

BEttAVIOURAL

EXPERIMENTS

333

programming' '--it is good for you but you hate taking it--and, of course, problems over documentation are not unique to psychology. However, for it to be portable there must be both documentation and publicity for the language. Unfortunately, there is little incentive within psychology for writers to document and publicize a special purpose language properly. Unlike other sciences, psychologists seem not to value such methodological contributions. Articles, particularly if reporting progress in "alien" techniques like computing, just do not have much academic status. There is no British journal (with the possible exception of the International Journal of Man-Machine Studies) which would happily publish many of the papers quoted here. If it were not for Behaviour Research Methods and Instrumentation there would possibly not be any published accounts of these languages. In addition, while a language author might produce sufficient user documentation he is unlikely to write implementation instructions. Without these the effort of transporting most languages to another installation would be very great. It is also completely impossible for the language writer alone to offer any adequate support to a wide.user community on a non-commercial basis. If excellent documentation is not available then such support is vital. These problems give a lack of acceptability to almost any software not developed within the user's own laboratory. Having painted this bleak picture it is worth asking why only the state notation languages have proved popular. A C T - N is a good example as it has a dozen or more installations in the U.K. and other A C T variants are widely used elsewhere. Yet by many absolute criteria A C T is a poor system. It is limited to experiments needing only digital input and output, has a restricted timing accuracy (unless one drastically reduces the number of simultaneous experiments), is quite poor at data throughput due to a limitation of paper tape output and internal buffer size, has very restricted numerical and data processing which cannot easily be synchronized to the real time experiment, has a poor program development environment requiring off line paper tape program editing, offers no DOS support for either program or data files, has no capability for user extension, modification or even the use of machine code routines, and has relatively poor documentation. Perversely many of these restrictions are, in fact, strong arguments in ACT-N's favour! It has to be purchased as a complete commercial system so there are no problems of system choice or integration. It is a cost-effective solution to experimental paradigms which could only otherwise be solved by the purchase of other sorts of less capable relay or logic equipment. It would be quite hard to automate similar procedures using assembler code and other high level languages such as real-time F O R T R A N need a more costly disk based operating system and would still involve a considerable development effort. A C T uses the N O V A computer which is popular (with all that implies in terms of service, etc.) and reasonably priced. There is sufficient documentation to allow its use but if that is not enough there is a large user community, in good communication as they are all working in the same area, so advice is available from somebody. The very unalterableness of A C T - N is an attraction to workers who just want to get on with their research rather than become amateur computer scientists. It is likely that there are enough problems which A C T can solve to ensure its relatively unmodified use for many years. Some similar argument could be developed for S K E D though it is essentially non-commercial, is user group supported, has good documentation, is expandable, can use a disk operating system, and is available on other processors! Perhaps success rests on several bases: cost effectiveness

334

D. HALE

as a replacement for other equipment, degree of general and specific support, complete system integration without much user effort, and perhaps paradigm specificity.

6. The future Does the past hold any lessons for the future of real time software for psychologists? We need something which at least provides the features and facilities of earlier languages, but which will, of course, run on much cheaper present and[uture hardware. Cheapness will mean a widespread availability of computing power and a consequent increase in the importance of "sympathetic" systems tailored for novices. Cheapness implies a lesser need for software to timeshare multiple subjects. Also more competent hardware devices, particularly in telecommunications, displays and arithmetic processors can remove hardware limitations inherent in most previous systems. An instructive introduction to the future was made by Poison (1978) who posed a dilemma for anyone proposing to develop process control software specific to a fairly limited area like psychology. He cites programming aids, typically augmentations of existing high level languages, as being cheap to develop yet having bad human engineering. Their use can require a detailed knowledge of the operating system, hardware, etc. They can also degenerate into a series of CALLs and just do not form a coherent language. He compares such programming aids with the problem solving tools offered by the special purpose psychological languages. He says (p. 145); "Such languages are incredibly expensive to develop. Writing a compiler, operating system and subroutine library, and other support subsystems for stimulus preparation and data analysis and then documenting the complete system can involve 2 to 5 man,years or more of effort. Can these costs be justified for the limited clientele served by a given system?" Polson's solution is to suggest "well designed service routines" to an existing language which implement "meaningful elements that occur in various paradigms" with "much attention given to the various calling sequences so that there are regularities in the structure of calling sequences across different service routines". Poison could be mistaken as his calculation of cost-effectiveness of a language is too limited and does not mention developments then current in software portability and general purpose real time languages. Given modern software development techniques, cheap hardware and the potential use of a language in many installations it might be very cost-effective to develop new languages. Alternatively, existing real time languages might be more easily tailored to psychological use, using well designed service routines, than by trying this with existing non real time languages. As discussed earlier, hardware advances can remove many limitations previously imposed on software. Software can hand many tasks over to more capable hardware (why write a floating point package when a cheap chip will do the job?). Lower costs will mean more widespread use and to ensure such use needs "sympathetic" user oriented software. If a software system could achieve widespread use the benefit (or "effectiveness") could be very great. Modern software development tools, such as high level languages like BCPL and C for writing other high level languages, can greatly reduce the cost of developing and maintaining new software. Such tools can also help in making software more portable across apparently incompatible hardware. It is indeed a problem to rewrite a language for a new processor and/or link it to a different operating system. One solution is to move all the software, including the operating system to the new processor. UNIX is the classic example of this approach where a vast assemblage of' software is apparently

LANGUAGES

FOR

BEHAVIOURAL

EXPERIMENTS

335

moved in much less than 1 man-year. A smaller scale example is UCSD Pascal which is now available on most microprocessors. Such transport still requires a nucleus of machine dependent code--with UCSD Pascal this involves a p-code interpreter and low level device drivers. However, the effort involved in this is minimal compared with Polson's 5 man-years. Often such interpreted code is slow which could pose problems for real time work. There is a hardware solution to this problem where, with UCSD Pascal for example, a special microprocessor has been built which actually executes the p-code as its instruction set, removing most speed penalties. An extension of this idea is the use of advanced microprocessors with custom instruction sets to emulate any other processor. If such new instruction sets can be loaded at run time then many problems of incompatibility between software for different processors vanish. It might even become economically feasible to emulate some of the obsolete machines mentioned earlier and actually run interesting!anguages such as P S Y C H O L or A P C O L ! Without assuming such an extreme possibility, cheap hardware certainly removes most need to consider retrofitting a new language to existing hardware as it would almost certainly be cheaper to require the potential user of new software to go out and buy the hardware on which to run the software. Another factor in developing new languages is modern knowledge about the cognitive interface--human engineering of m a n - c o m p u t e r dialogues. We now have much information [see the review in the report of Hale, Green & Henry (1981) or articles by Green (1980) and Jackson (1980)] on what are " g o o d " features of a programming language, what makes a friendly and productive program development and running environment, and what are the special needs of users with different skill levels. Consideration of such factors could result in a better and more acceptable language. It might also reduce the chance of early obsolescence. An alternative, but related possibility, is to use real time languages developed outside psychology (Henry, 1981). However, psychologists (and other academics) have made little use of languages such as C O R A L or R T L / 2 so there is little sense in advocating their adoption now when modern real time languages like M O D U L A (an example of its use is given by Runciman, 1981) and Ada are available. While these latter offer elegant solutions to problems of parallelism (concurrency) and possibly machine independence they do not offer complete solutions to other requirements seen in our review of psychologists' languages. These requirements include interactive development and debugging, concurrent development and program running, systems for novices or naive users, readable programs and easily extensible languages. Perhaps the attraction of a language like M O D U L A is as a good base for developing modules tailored for specific paradigms and user groups. We have concluded that to be cost-effective a psychological laboratory language must achieve other than local use. Such acceptability not only requires a useful language but also requires that it be publicized, offer good documentation and enjoy some continuous support. Clearly, none of these can easily be supported by any one individual or department. There could be a case for consortium of departments and research units, a commercial effort, or, ideally, a benevolent research council to give continuing support to such an effort. Thanks are given to Roger Henry, Thomas Green and Brian Greer without whom this paper might be even more turgid. This work was supported by a Social Science Research Council Grant on "Psychology Laboratory Computing".

336

D. HALE

References AARONSON, D. & BRAUTH, S. (1972). SIMPLE guidelines for developing a computer-based laboratory. Behaviour Research Methods and Instrumentation, 4(5), 257-264. AARONSON, D. & GRUPSMITH, E. (1978). The SIMPLE T-scope. Behaviour Research Methods and Instrumentation, 10(6), 761-763. AARONSON, D., GRUPSMITH, n. d~ OHMAN, D. (1975). SIMPLE control and measurement of auditory events. Behaviour Research Methods and Instrumentation, 7(2), 125-130. ANGLE, H. V. & CARROLL, J. (1979). A computer interview language: Programming the on-iine interactive computer. Behaviour Research Methods and Instrumentation, 11(3), 379-383. APTER, M. J. & WESTBY, G. (Eds) (1973). The Computer in Psychology. New York: Wiley. BARRETT, G. (1973). Computer languages for experimental control. In (Apter, M. J. & Westby, G., Eds) The Computer in Psychology. New York: Wiley. BRIGNELL, J. & RHODES, G. (1975). Laboratory On-Line Computing. London: Intertext. BURKHARDT, K. J., JR (1976). EMPP: An extensible multiprogramming system for experimental psychology. Behauiour Research Methods and Instrumentation, 8(2), 239-244. CASTELLAN, N. J., JR (1975). The modern minicomputer in laboratory automation. American Psychologist, 30(3), 205-211. CHURCH, R. M. (1973). Seven types of data from computer-controlled experiments. Behaviour Research Methods and Instrumentation, 5(2), 122-123. CHURCHILL,S., NAESS, L. & OLIVER, W. P. (1971 ). CAN-4, an advanced author language for CAI, computer based testing and psychological experimentation: PDP-9 implementation. Behaviour Research Methods and Instrumentation, 3(2), 95-99. COOPER, J. W. ( 1977 ). The Mini-Computer in the Laboratory: With Examples Using the PDPl l. New York: Wiley. COOPERBAND, A. S. (1966). The use of a computer in conducting psychological experiments. Behavioural Science, 11,207-211. CREELMAN, D. D. (1971). Rapid response and flexible experimental control with a small on-line computer: PSYCLE. Behaviour Research Methods and Instrumentation, 3(5), 265-267. DILLON, R. F., DUMONTIER, L. R., BEZANSON, W. R. & BRENNAN, R. (1978). A high-level language for control of psychology experiments. Behaviour Research Methods and Instrumentation, 10(2), 315-324. DOLL, T. J. (1972). A 4-k computer language for experimentation with human subjects. Behaviour Research Methods and Instrumentation, 4(1), 27-31. DRAPER, G. (1973). SPEX: A system to run speech perception experiments. Proceedings 9th DECUS Europe Seminar. Maynard, Massachusetts: Digital Equipment Users Society. DURELL, A. B. (1972). Painless computer-controlled experimentation. Behaviour Research Methods and Instrumentation, 4(3), 165-166. DYCKMAN, H. L. & CHURCH, R. M. (1972). The TIICIE system for interactive control of independent experiments. Computers in the Psychology Laboratory, Vol. II. Maynard, Mass.: Digital Equipment Corporation. FINKEL, J. (1975). Computer-Aided Experimentation: Interfacing to Minicomputers. New York: Wiley. FITZHUGH, R. J. (1974). Laboratory control with a medium scale time-sharing system. Behaviour Research Methods and Instrumentation, 6(2), 131-137. GE1-TY, D. J. (1975). The PEPL system for control of experiments by a PDP-8 computer. Behaviour Research Methods and Instrumentation, 7(2), 131-136. GILBERT, S. G. & RICE, D. (1978). NOVA SKED: A behavioural notation language for Data General minicomputers. Behaviour Research Methods and Instrumentation, 10, 705-709. GILBERT, S. G. & RICE, D. (1979). NOVA SKED II: A behavioural notation language utilizing the Data General Coporation real-time disk operating system. Behaviour Research Methods and Instrumentation, 11(1), 71-73. GREEN, B. F., JR (1963). Digital Computer in Research. New York: McGraw-Hill. GREEN, T. G. R. (1980). Programming as a Cognitive Activity. In (Smith, H. T. & Green, T. G. R., Eds) Human Interaction with Computers. London: Academic Press.

LANGUAGES FOR BEHAVIOURAI. EXPERIMENTS

337

GREEN, T. R. G. & GUEST, D. J. (1974). An easily-implemented language for computer control of complex experiments. International Journal of Man-Machine Studies, 6, 335-359. GREGG, L. W. (1973). APCOL: An example. BehaviourResearch Methods and Instrumentation, $(2), 248. HALE, D. J. (1977). Computer use in British psychology departments. Bulletin of the British Psychological Society, 30, 410-413. HALE, D. J. (1978). Low-cost laboratory computing: microcomputers in British psychology departments. Behaviour Research Methods and Instrumentation, 10(4), 585-593. HALE, D. J., GREEN, T. G. R. & HENRY, R. B. (1981). Psychology Laboratory Computing. London: Social Science Research Council. HALFF, H. M., SCHOLZ, K. W. & WAI.KER, J. n . (1975). An extension of Kieras' general experiment programming system. Behaviour Research Methods and Instrumentation, 7(5), 464--470. HENRY, R. B. (1976a). Implementation of experimental designs and storage of results in the PACER system of on-line control. Behaviour Research Methods and Instrumentation, 8(3), 292-298. HENRY, R. B. (1976b). Implementations of experimental procedures in the PACER system of on-line control. Behaviour Research Methods and Instrumentation, 8(6), 508-512. HENRY, R. B. (1981). Real-time programming languages. International Journal of ManMachine Studies, 14, 355-369. HOWARD, J. H. JR (1979). A multipurpose laboratory package for OS/8 BASIC. Behaviour Research Methods and Instrumentation, 11(4), 437--444. JACKSON, M. A. (1980). The design and use of conventional programming languages. In (Smith, H. T. & Green, T. G. R., Eds) Human Interaction with Computers. London: Academic Press. JONES, L. V., JOHNSON, E. S. & YOUNG, F. W. (1973). Computer control of experiments in problem solving. In (Weiss, B., Ed.) Digital Computers in the Behavioural Laboratory. New York: Appleton-Century-Crofts. KAPLAN, H. L. (1976). Some debugging strategies for assembler-based minicomputer operating systems. Behaviour Research Methods and b~strumentation, $(2), 170-173. KIERAS, D. (1973). A general experiment programming system for the IBM 1800. Behaviour Research Methods and b~strumentation, $(2), 235-239. LEAVENWORTH, B. (Ed.) (1974). Proceedings of a Symposium on Very High-level Languages, Vol. 9. Association for Computing Machinery, Special Interest Group on Programming Languages Notices, p. 4. LESGOLD, A. M. & FITZI--IUGH,R. J. (1977). An on-line psychology laboratory for teaching and research. Behaviour Research Methods and Instrumentation. 8(2), 184-188. LESLIE, J. C. ( 1981). State notation programming languages in psychology. International Journal of Man-Machine Studies, 14, 341-354. LEWIS, J. E., OSGOOD, G. W. & HEBERT, J. J. (1973). PLEIADES: Real-time-sharing control in the behavioural laboratory. Behaviour Research Methods and Instrumentation, 5(4), 365-370. LINK, S. W. (1975). 4k laboratory FOCAL. Behaviour Research Methods and Instrumentation, 7(2), 137-142. MACRAE, A. W. (1980). Computer Use in British Psychology. Survey Report, British Psychological Society, l.eicester. MARRIOTT, J. G. & VOIGTMAN, R. E. (1976). An enhancement to ACT: A stand-alone disk driver compatible with RDOS..Behaviour Research Methods and Instrumentation, 8(2), 249-251. MCLEAN, R. S. (1969). PSYCHOL: A computer language for experimentation. Behaviour Research Methods and Instrumentation, 1(8), 323-328. MCLEAN, R. S. (1973). A PSYCHOL example. Behaviour Research Methods and Instrumentation, 5(2), 240-241. MCLEAN, R. S. (1978). Lrsing personal computers for experimental control. BehaviourResearch Methods and Instrumentation, 10(4), 468-473.

338

D. r~ALE

MICKEY, C. T. (1976). A brief history and comparison of several variants of the ACT (automated contingency translator) language. Behavioui' Research Methods and Instrumentation, 8(2), 252-256. MILLENSON, J. R. (1970). Language and list structure of a compiler for experimental control. Computer Journal, 13, 340-343. MILLENSON, J. R. (.1971). A programming language for on-line control of psychological experiments. Behavioural Science, 16, 248-256. MILLENSON, J. R. (1973). On-line sequential control of experiments by an automated contingency translator. In (Weiss, B., Ed.) Digital Computers in the Behavioural Laboratory, New York: Appleton-Century-Crofts. MILLENSON, J. R. (1975). System developments in the ACT language: Towards machine independence. Behaviour Research Methods and Instrumentation, 7(2), 165-173. MILLER, G. A., BREGMAN, A. S. & NORMAN, D. A. (1965). The computer as a general purpose device for the control of psychological experiments. In (Stacy, R. W. & Waxman, B., Eds) Computers in Biomedical Research, Vol. 1. New York: Academic Press. MULLEN, S. (1976). FOCLAB: A language for computer controlled psychology research. Behaviour Research Methods and Instrumentation, 8(2), 229-232. ONIFER, W., HIRSHKOWITZ, M. & SWINNEY, D. (1978). A miniprocessor PDP8/e-based system for investigations of on-line language processing: Automated program for psycholinguistics experiments (APPLE). Behaviour Research Methods and Instrumentation, 10(2), 307-308. PALMER, J. C., MACLEOD, C. M. & LOFTUS, G. R. (1978). PLE: A high-level multiprogramming language for psychology. Behaviour Research Methods and Instrumentation, 10(6), 764-772. PERERA, T. B. (1978). A versatile microcomputer based multiple-field tachistoscope. Behaviour Research Methods and Instrumentation, 10(4), 546-547. PINKUS, A. L. & GREGG, L. W. (1973). APCOL: A programming system for computercontrolled psychology laboratories. Behaviour Research Methods and Instrumentation, 5(2), 165-172. PITZ, G. F. (1975). Building a programming language for a small computer: Reinventing the wheel. Behaviour Research Methods and Instrumentation, 7(1), 42-46. POLSON, P. G. (1973). SCAT: Design criteria and software. Behaviour Research Methods and Instrumentation, 5(2), 241-244. POLSON, P. G. (1978). Microprocessors: Their impact on real-time computing in psychology. Behaviour Research Methods and Instrumentation, 10(2), 139-147. POLSON, P. G. & Campbell, G. D. (1972). EXTENDED SCAT. Behavioural Science, 17, 558-565. PRICE, J. M. (1979). Software timing for 6500 series microcomputers. Behaviour Research Methods and Instrumentation, 11(6), 568-571. PROUDFOOT, R. G. (1978). YEPS: Running real-time experiments on a timesharing system. Behaviour Research Methods and Instrumentation, 10(2), 291-296. RUNCIMAN, C. (1981). MODULA and a vision laboratory. International Journal of ManMachine Studies, 14, 371-386. SAMMETT, J. E. (1969). Programming Languages: History and Fundamentals. Englewood Cliffs, New Jersey: Prentice-Hall. SCHNEIDER, W. 8r SCHOLZ, K. W. (1973). Requirements for minicomputer operating systems for human experimentation and an implementation on a 4K PDP-8 computer. Behaviour Research Methods and Instrumentation, 5(2), 173-177. SCHOLZ, K. W. (1972). Computerized process control in behavioural science research. Behaviour Research Methods and Instrumentation, 4(4), 203-208. SCHOLZ, K. W. (1973 ). PROSS: A process control programming language. Beha viour Research Methods and Instrumentation, 5(2), 245-247. SCHOLZ, K. W. & SNOW, L. H. (1978). AVID: An intelligent CAI system for small computers. Behaviour Research Methods and Instrumentation, 10(2), 300-306. SIDOWSKI, J. n. (1972). Various uses of minicomputers in psychology. Behaviour Research Methods and Instrumentation, 4, 43-50.

LANGUAGES FOR BEHAVIOURAL EXPERIMENTS

339

SIEGEL, W. (1972). Combining FOCAL and assembly language. Behaviour Research Methods and Instrumentation, 4(2), 105-106.

SIMON, W. (1967). SNAP: An interpretive real-time computer language for biology. Medical and Biological Engineering, 6, 83-85. SIMON, W. (1973). Advanced techniques for the small computer. In (Weiss, B., Ed.) Digital Computers in the Behavioural Laboratory. New York: Appleton-Century-Crofts. SNAPPER, m. G. (1974). Alternative versions of SKED: Current systems and future plans. Behaviour Research Methods and Instrumentation, 6, 171-173. SNAPPER, m. G. & KADDEN, R. M. (1973). Time-sharing in a small computer based on a behavioural notation system. In (Weiss, B., Ed.) Digital Computers in the Behavioural Laboratory. New York: Appleton-Century-Crofts. STADLER, S. J. (1969). On the varieties of computer experience. Behaviour Research Methods and Instrumentation, 1(7), 267-269. TAYLOR, R. L. (1972). COGLAB: A computer system designed for human research. Behaviour Research Methods and Instrumentation, 4(2), 94-95. THOMPSON, G. C. (1979). Behavioural programming with the APPLE II microcomputer. Behaviour Research Methods and Instrumentation, 11(6), 585-588. UTTAL, W. R. (1968). Real-time Computers: Techniques and Applications in the Psychological Sciences. New York: Harper and Row. WALLSTEN, T. S. (1972). 8TRAN language and the PDP-8 facility at the L. L. Thurstone Psychometric Laboratory. BehaviourResearch Methods andlnstrumentation, 4(2), 107-108. WEISS, B. (Ed.) (1973). DigitalComputers in theBehaviouralLaboratory. New York: AppletonCentury-Crofts. WOOD, R. W., SE'ITE, W. F. & WEISS, B. W. (1975). Interfacing the experimenter to the computer: Languages for psychologists. American Psychologist, 30(3), 230-238.