SLogo

Logo is a computer programming language designed to teach programming to children. It is a user-friendly, interpreted language, designed with a "low floor, high ceiling"; in other words, the designers of Logo intended for the language to allow novice programmers to get started quickly writing programs but also wanted the language to be powerful and extensive for more advanced users.

In the early days, Logo was used to control a simple physical robot, called a turtle. Users could issue commands such as FORWARD 50 to make the turtle advance 50 steps, or RIGHT 90 to make it turn ninety degrees. The turtle robot carried a pen, so users could produce drawings on paper, such as the one shown to the left, by controlling the turtle and its pen. The turtle, which has since moved on to the computer screen, has become one of the most familiar and important parts of the Logo language. For the complete history see here.

As a dialect of LISP, Logo is a complex and powerful language. For this project you will design and implement a much simplified version of Logo. "Simple Logo", or SLogo, should retain the features most commonly used by beginning users so that it can be used to provide an introduction to computer programming.

Basic Specifications

You should form teams of two or three to design an integrated development environment, IDE, that allows a SLogo programmer to accomplish the following tasks:

At its heart, SLogo consists of a basic turtle graphics package and support for a set of commands allowing the user to control the turtle and the pen using basic programming constructs such as conditionals, loops, and procedures. When a user launches the SLogo IDE from the command line, it should bring up a command window and a turtle graphics window. The interpreter will need to receive, parse, and execute commands from the window, reporting any errors it encounters along the way (and not crashing!), and displaying the results of the commands in the graphics window.

Some example SLogo programs are available online.

Extensions

In the early days, Logo was run on small, slow machines and thus its environments were given only limited capabilities. Additionally, there was only a single turtle drawn as a triangle in only one display window to show the turtle's actions. In modern times, Logo has been used to run simulations with thousands of turtles and also to make animations. Your job in extending the basic program is to bring your logo environment from the seventies into the new millennium (and beyond?). Thus, you should design your program to easily allow the following extensions.

Some basic enhancements to your IDE will make it nicer to use (in order of increasing difficulty):

In order to allow the user to run simulations or create games, you should allow the user to create as many turtles as they want. By default, there are an infinite number of turtles hidden at the home position. So, if you show the second turtle it should appear at home, unless the user has moved it first, then shown it. To do this, you will need to add the following:

It is already reasonably easy for the user to make simple animations using SLogo because the user can create multiple turtles, set the turtle's appearance to something other than a triangle, zoom in, and animate the turtle's actions. To further facilitate quality animations, you should add the following:

Finally, you can improve the environment for programming by including the extensions below:

Deliverables

  1. A one to two page description of the packages and classes you envision as part of implementing SLogo (a picture could be extremely helpful here). Your design description should especially discuss how you plan to separate the graphical interface from the interpreter and how you plan to let them communicate when necessary. 
  2. A one to two page description of your graphical user interface, including, if necessary, drawn "screen shots" of how you plan to lay out your interface and how you plan to connect the interface to the rest of the program.
  3. A detailed description, about a page, of how your program will handle the following use case: "The user starts the program, types 'fd 50' in the command window, and sees the turtle move in the display window leaving a trail." It should be clear from this description which objects are responsible for completing each part of the task.

Resources

For background and more complete information about logo consult these links:

Comments?