LOGO Language Analysis



Jon A. Preston



1. Introduction



LOGO is the name for a philosophy of education and a continually evolving family of programming languages that aid in its realization.



- Harold Abelson [9]



Beyond the philosophical and educational underpinnings, LOGO is a computer language developed in 1966 "designed for and dedicated to education" [2] in the form of a "baby LISP." LOGO is an interactive, interpreted language that has been used extensively in education and has evolved considerably over the last 30 years.



This paper presents the historical background and the goals of LOGO. A discussion of the people that contributed to the original version of LOGO is included, and the evolution of the language is addressed; sample LOGO programs that compare the 30 years of LOGO evolution are also included.





2. Historical background



The first LOGO interpreter was written by Dr. Bobrow at Bolt Beranek and Newman, Inc. (BBN) on a PDP-1 in 1966 [13]. The mid to late 60s saw a growth in programming languages and major concept developments. Most computation was still done by batch processing, and interactive programming languages such as BASIC and RPG were only a few years old. Object-oriented programming was developing in the form of Simula. LISP had been around for eight years, but pure functional languages such as ISWIM were just emerging [3].



Computer time-sharing was also a new concept; BBN demonstrated the first successful computer time-sharing in 1964 [2]. Feurzeig commented that this time-sharing allowed the possibility of distributed computing in education, prompting an educational focus for the development of LOGO.



BBN was also actively involved in artificial intelligence work during the 60s. They collaborated with M.I.T.'s researchers such as Marvin Minsky. Their AI research projects included natural language understanding, pattern recognition, and computer-aided instruction.



Magnetic tape was the common storage device of the time, and BBN's preliminary LOGO manual gives instructions on how to save LOGO procedures from drum files to magnetic tape using a SDS-940 "time-sharing executive." [4]



In a time when computer cycles were expensive and programmers were cheap, the concept of designing a programming language for education and schools was fairly innovative. About ten years after the original LOGO interpreter was written, the microcomputer revolution began and offered affordable computing power to the masses. LOGO was no longer constrained to PDP-10s and other minicomputers; LOGO could sit on desktop machines in classrooms and homes everywhere.





3. The Goals



According to Feurzeig, the requirements for the original BBN '67 LOGO were:



1. Third-graders should be able to use it for simple tasks with very little preparation.



2. Its structure should embody mathematically important concepts with minimal interference from programming conventions.



3. It should permit the expression of mathematically rich nonnumerical as well as numerical algorithms. [2]



The BBN LOGO design team saw problems in existing languages. Most languages of the time did not support nonnumerical computation well and did not have good interaction (debugging and editing) features. As a result, the team designed the system to be highly interactive and supportive of interpreted programming. Part of the original LOGO specification was that it had to have file support because the system had to allow students to build on previous work, ie. save their files and extend their procedures later [13].



It is evident from the original design goals that the language was created to support learning. But LOGO was not created to merely teach programming skills; rather, it was designed with the loftier goals of helping teach metacognitive skills and problem solving, and to allow students to learn in a constructivist manner by creating exciting projects with the computer [12].



Some of the key features of the LOGO language are modularity, extensibility, interactivity, and flexibility. These design features are closely related to the educational goals of the language [9]. Because if these features, LOGO is a language that has "no threshold, no limit" so that young students can quickly learn how to use it and experienced programmers can make use of its advanced features to build complex programs [5].





4. The conception



Wallace Feurzeig joined BBN in 1962 as part of the newly formed AI department. This department was working on research in cognitive science and instructional research, so Feurzeig's interest in teaching and computer-assisted instruction (CAI) fit in well.



The concept of a programming language devoted to students and learning came out of research work in time-sharing systems in classrooms done to help children learn mathematics. This research was done using the TELCOMP language in 1965-66, supported by the U.S. Office of Education. The research team consisted of Wallace Feurzeig, Daniel Bobrow (one of the first AI graduated from M.I.T.), Richard Grant, and Cynthia Solomon, all from BBN, and Seymour Papert from M.I.T. [11].



According to Feurzeig, the initial design of LOGO was developed in 1966 by Papert, Bobrow, and Feurzeig. Papert was responsible for the functional specifications, and Bobrow was responsible for the design and first implementation [2]. Feurzeig gave LOGO its name to stress the fact that the language is a symbolic rather than quantitative [11].



The preliminary version of BBN '67 LOGO consisted of 20 commands and 14 built-in functions and did not contain any turtle commands. The first official released BBN version of LOGO added the turtle commands; this version contained 38 commands, 45 operations (built-in functions), and 12 reserved names (words) [13].



Because it was designed to be an "baby" version of LISP, LOGO is heavily influenced by LISP; in fact the original PDP-1 BBN LOGO was written in LISP, and LISP s-expressions could be executed within the LOGO environment using the LISP command. Michael Levin, who worked on the original implementation of LISP, helped with the design of the second version of LOGO (the DEC PDP-1 1968 LOGO) [2]. LISP-like concepts such as garbage collection, recursion, and symbolic manipulation are central to LOGO [13].



The original single user version of LOGO could be run on a 12-bit or 16-bit computer with 24k bytes of memory and some form of file storage [13]. And the definition for the LOGO system was made publicly available in the late 60s by BBN.



The first version of LOGO was tested in sixth and seventh grade students at Hanscom Field School in Lincoln, Massachusetts in July of 1967. From September of 1968 to November of 1969, a new version of LOGO was used in a teaching mathematics to elementary and secondary students. This year-long research project was supported by the National Science Foundation [2].



The concept of the turtle in LOGO was introduced by Seymour Papert's Logo Laboratory group at M.I.T. in 1971, and most future LOGO developments in the 1970s occurred at M.I.T.





5. M.I.T.'s and Papert's contribution



Seymour Papert studied under Jean Piaget in Geneva, Switzerland for five years before coming to M.I.T.'s AI group in 1964. Piaget is the founder of constructivism, a theory of education that claims children learn best by doing; he saw children as builders of their own intellectual structures, and he saw children as epistemologists [11]. Papert was heavily influenced by Piaget's theories of child cognition.



Papert's interest were in child development, learning and the nature of thinking. He realized that computers and computation was "by far the richest known source of" constructivist activities which could "give children unprecedented power to invent and carry out exciting projects" [12].



Upon coming to M.I.T., Papert worked with Marvin Minsky and John McCarthy, the founders of M.I.T.'s Artificial Intelligence group, joining his cognition and child development background with computer AI. Papert began to hypothesize that as children teach computers how to think (in the way of programming the computer), they explore how the themselves think [11]. He claimed that the best way to learn is to teach someone (or something, in the case of programming) the material. Thus a language that made it easy for children to program a computer should provide immense learning opportunities.

Although Papert did contribute to the original LOGO as a consultant to BBN in the late 1960s, he is probably best know for the turtle addition to LOGO in 1971 and his book Mindstorms in 1980. I was surprised to find that the original LOGO did not have the turtle, and this is a common misconception. Since the original BBN LOGO was not widely used outside research projects in the late 1960s, M.I.T.'s turtle LOGO was the first widely distributed and used version of the language.



At first, the LOGO turtle was a hardware device that was connected to a computer. Students would place the turtle on a large piece of paper and then execute turtle commands such as LEFT, RIGHT, FORWARD, and BACK to draw on the paper. In 1977 a company called Terrapin Software even produced these hardware turtles commercially. Later the turtle was a sprite on the graphical computer screen that could draw lines and pictures using the same turtle commands that directed the hardware turtles [9].



Mindstorms catapulted the use of LOGO to new levels by inspiring teachers to think about their students as children with limitless potential. Mindstorms discussed how LOGO could be used in classrooms and explained Papert's pedagogical theories and how computers could help students learn. Because microcomputers were becoming cheap, it was feasible to place computers in classrooms; schools were gaining computers such as the TI 99/4 and Apple II that could run LOGO, and a flurry of LOGO activity occurred in the schools during the 1980s.



In addition to Papert, there were others at the M.I.T. Logo Lab that made significant contributions in the early years of LOGO. Jeanne Bamberger added the musical routines. Cynthia Solomon was the first to develop teacher training for using LOGO in the classroom. Ron Lebel was in charge of the systems programming for LOGO. And numerous professors and graduate students participated in seminars and contributed to LOGO at M.I.T.





6. Evolution



Focus of LOGO use, research and development shifted from BBN in the 1970s with the opening of the Logo Laboratory at M.I.T. LOGO was not widely used outside of local schools near M.I.T., Edinburgh, and Tasmania until the late 1970s. After the publication of Mindstorms in 1980 numerous versions of LOGO were produced to supply home and school computers. The language was widely supported by Apple, Atari, IBM, and TI. Atari even created the Atari Cambridge Research Center that was directed by Cynthia Solomon, the woman who headed up the teacher training program for using LOGO in classrooms [9].



Arcade-style computers such as the Commodore supported LOGO, and since these computers tended to be more game oriented, the LOGO programs written on these systems tended to have "game"-like qualities.



By the mid-80s, there were three major categories of LOGO systems. The Logo Computer Systems, Inc. produced Apple LOGO, Apple LOGO II, Atari LOGO, and IBM LOGO, and programs written in these LCSI dialects of LOGO were all platform independent. Another flavor of LOGO, closely compatible with LCSI LOGO was the MIT LOGO; these versions ran on the Commodore, the Apple, and the IBM PC and were sold under the Krell and Terrapin title. The third category of LOGO systems were produced by the LISP Company and were significantly different from other LOGO implementations; these systems more closely resembled LISP. While other LOGO systems existed, some were not "fully LOGO" compatible with the then-standard LCSI and MIT LOGO systems [6].



There has been work done to modify LOGO to examine various educational research questions. Brian Silverman and Michael Temple introduced error into LOGO by creating "Fuzzy LOGO," a dialect of LOGO that does not always produce the desired results. Fuzzy LOGO's right, left, forward, and back commands had a "random error up to ten percent," such that a forward 100 command could result in the turtle moving between 90 and 110 turtle units [8].



Other developments in LOGO include LogoWriter, LEGO Logo. LogoWriter was a version of LOGO that appeared in 1985 from LCSI that contained word processing and multiple turtles. LEGO Logo took a more hardware-oriented approach and allowed lights and motors placed in LEGO bricks to be placed together and controlled via their version of LOGO.





7. LOGO Today



MicroWorlds LOGO was introduced in 1993 by LCSI. MicroWorlds added multimedia support in an effort to keep up with other "flashier" Mac and Widows educational software. The most important new feature of MicroWorlds LOGO was the addition of multi-tasking and parallel processing; now multiple turtles can act independently [9].



Even more recently, StarLogo is a new version of LOGO written by an M.I.T. team that allows massively parallel computation; with thousands of turtles, StarLogo's aim is to allow exploration of subtle interactions between entities in "decentralized environments" and "emergent behaviors" [9]. Mitchel Resnick, the PhD advisor of Amy Bruckman, led this StarLogo team.



LOGO support is going strong with users around the world. Educational research using LOGO is ongoing, and there are still many conferences devoted to LOGO. Eurologo is one such international conference which began in Dublin in 1987 and meets once every two years [7]. In searching the Web for LOGO related sites, I found that there is a very strong interest in LOGO and its uses in education in South America.



Today, there are hundreds of LOGO implementations that span almost every computer platform available. From the Mac to Windows and DOS, LOGO is a language that is readily available. Figure 1 shows a sample screen shot from MSWLogo, a popular and free version of LOGO for Windows.



The LOGO Foundation, created in 1991 and located in New York, maintains a Web repository of past papers and pages describing LOGO with links to LOGO information and implementations. Even Georgia Tech's CoC faculty are represented in the LOGO Foundation's repository; I was interested to find a paper written by Mark Guzdial concerning his use of music in LOGO to teach young students in 1991 [10].





8. A sample BBN '67 LOGO program



This sample program is taken from an original technical memorandum produced by BBN in August of 1967 [4]. This program demonstrated the use of line numbers, function calls, printing to the terminal, and variable scoping rules in a preliminary version of BBN LOGO. The authors of this document acknowledge that there were "pedagogically important revisions" that were being made to the language at the time this paper was published; notice that there are no turtle commands in this program, because the turtle commands did not exist yet. The turtle commands were added shortly after the publication of the paper which contained this sample program.



to t1

5 print "function t1 entered"

10 make "A" "this is A from t1"

20 make "B" "this is B from t1"

30 print /A

40 print /B

50 do t2

55 print "just returned from t2"

60 print /A

70 print /B



to t2

10 print "function t2 entered"

20 print /A

30 print /B

40 make "A" "this is a new A from t2"

50 print /A



And a sample output of execution is (indention for clarity):



-> do t1

function t1 entered

this is A from t1

this is B from t1

function t2 entered

this is A from t1

this is B from t1

this is a new A from t2

just returned from t2

this is a new A from t2

this is B from t1

->



Thus we see that variables are global within function calls. The local command can be used to make a variable local to a function. If we modify function t2 by adding line 35 as the following:



to t2

10 print "function t2 entered"

20 print /A

30 print /B

35 local "A"

40 make "A" "this is a new A from t2"

50 print /A



then we get the following output (notice that the variable A is no longer globally modified):



-> do t1

function t1 entered

this is A from t1

this is B from t1

function t2 entered

this is A from t1

this is B from t1

this is a new A from t2

just returned from t2

this is A from t1

this is B from t1

->







9. A sample MSWLOGO program



The following example is taken from the sample files that are packaged with MSWLogo version 6.2. This program displays 3-dimensional cubes, polycubes, grid cubes, and other geometric shapes. Notice the use of window message boxes and the 3-dimensional coordinate system which uses the down and up commands. Figure 2 shows the output of one of the procedure calls, polycube.



to do-it-all

turnon3d

messagebox [] [Square] cs

square

wait 60

messagebox [] [Cube] cs cube

wait 60

messagebox [] [Poly Cube] cs polycube

wait 60

messagebox [] [Cube of Cubes] cs

cubeofcubes

end



to square

repeat 4 [fd 100 rt 90]

end



to cube

repeat 4 [square fd 100 down 90]

end



to polycube

repeat 36 [cube fd 100 down 10]

end



to cubeofcubes

for [x 1 300 100] ~

[

for [y 1 300 100] ~

[

for [z 1 300 100] ~

[

pu setxyz :x :y :z pd

cube

]

]

]

end



to turnon3d

; This can be a library procedure

perspective

setturtle -1

setxyz 500 500 500

setturtle 0

end



The new command SETXYZ :X :Y :Z allows the programmer to position the turtle in absolute coordinates, a "feature" that will be commented on in the next section.





10. Comments on Language Features



One of the original critiques of the early versions of turtle-based LOGO was that the language did not allow programmers to do anything significantly different from its contemporary language BASIC. Papert argues in Mindstorms [9] that a program written in LOGO as



to square

repeat 4 [fd 100 rt 90]



could be written in BASIC as



10 PLOT (0,0)

20 PLOT(100,0)

30 PLOT(100,100)

40 PLOT(0,100)

50 PLOT(0,0)

60 END



but then the generalization of the module (or procedure) is lost. In order to regain the generalization, one would have to pass the "starting position" as parameters X and Y and then the BASIC module becomes



10 PLOT (x,y)

20 PLOT(x+100,y)

30 PLOT(x+100,y+100)

40 PLOT(x,y+100)

50 PLOT(x,y)

60 END



Thus the generality of modules written in LOGO are inherently reusable given that all turtle commands are relative to the current position.



The MSWLOGO example in section 9 shows the absolute positioning command SETXYZ :X :Y :Z. It is safe to assume that this type of command has evolved into the LOGO language but is not in accord with the original intentions. It is understandable that such commands allow powerful screen manipulations, but it does remove some of the reusability built into the original turtle-LOGO language.



As stated earlier, expendability is another key language feature of LOGO. Since it was designed to allow on-going constructivist learning and development of children, users had to be able to create and expand procedures. In fact, file I/O was one of the original design criteria in the preliminary BBN LOGO because users had to be able to load old work they had previously done and modify, reuse, and enhance their procedures.



Modularity was also a feature of LOGO. Since users should be able to create small building blocks of a program and put them together as needed, LOGO is highly influenced by the concept of modules and modularity. In addition, recursion and local parameters and variables are central to LISP, and thus to LOGO.





11. Conclusion



Claims about the educational merit of computers and software in schools vary from complete success to utter failure. LOGO's original intention was to support learning programming, problem solving, and metacognative skills development in young students, and there has been research that proclaims the success of LOGO as an educational tool and research that decries the claims of such success [1].



But certainly the LOGO language has lived up to at least one of its original claims: to have a "low threshold and no ceiling." With today's LOGO implementations programmers can create multimedia, networked, and even 3-D modeling applications; but the language is also simple enough to be used in third and fourth grade classrooms.



LOGO helped shape educational programming languages with a user-centered design; the language appeared at a critical time when the programmers' time was becoming more valuable than the computers' cycles. And Piaget's constructivist, learner-centered theories are evident in LOGO as a language that allows the user to learn about programming by controlling the computer in an interactive and supportive system.



From its innovative conception at BBN and M.I.T. to its current parallel-turtle, highly-graphical incarnation, LOGO is a language that has grown and adapted to the needs of its users throughout its 30-year history. LOGO is widely used around the world, and promises to be a language of choice in education and research communities for many years.



Bibliography



1. Chang, M. LOGO Research in General and Special Education. Teaching and Learning in LOGO-based Environments: Proceedings of the Eurologo '89 Conference. IOS, Amsterdam. 1990. 34-44.



2. Feurzeig, W. The LOGO Lineage. Digital Deli. Workman Publishing Company, New York, NY. 1984.



3. Fischer & Grodzinsky. The Anatomy of Programming Languages. Prentice-Hall, Upper Saddle River, NJ. 1993.



4. Frazier, F. The LOGO System: Preliminary Manual. Cambridge, MA. BBN. 1967.



5. Friendly, M. Advanced LOGO: a Language for Learning. LEA Publishers, Hillsdale, NJ. 1988.



6. Harvey, B. Computer Science LOGO Style: Intermediate Programming. Volume 1. The MIT Press, Cambridge, MA. 1985.



7. http://caesar.elte.hu/~eurologo/



8. http://cher.media.mit.edu/pub/logo/literature/Fuzzy_Logo.txt



9. http://el.www.media.mit.edu/groups/logo-foundation/Logo/Logo.html



10. http://el.www.media.mit.edu/groups/logo-foundation/Publications/Teaching_Progr.html



11. Papert, S. Mindstorms: Children, Computers, and Powerful Ideas. Basic Books. New York, NY. 1980.



12. Tayla, Robert (editor). The Computer in the School. Teacher College Press, Columbia University, NY. 1980.



13. Weiner, W. et al. The LOGO Processor: A Guide for System Programmers. Volume 4. Cambridge, MA. Bolt Beranek and Newman, Inc.