Final Project: SLogo
Quick links to Deliverables | Docs | Our development statistics
Specifications
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.
As a team, you are to design and implement an Integrated
Development Environment, or IDE, for a simplified version of Logo, or
SLogo, that focuses on allowing users to write and manage programs to
draw such pictures. Specifically, the user should be able to
accomplish the following tasks:
- Enter commands to the turtle interactively
(basic commands). This is the
read-eval-print loop used in Python, Scheme, Lisp, Smalltalk
and other language IDEs. The user should be able to type any Logo
expression, press some key/mouse button and have the expression
evaluated. This should be doable on a per expression
basis. The environment in which the user enters commands is called
a workspace. Your IDE should support multiple workspaces
with cut/paste between them.
- Read a file of valid SLogo subroutines/variables and have these
definitions added to the set of valid SLogo commands that can be
entered in the read-eval-print loop. Thus the user can develop a
library of subroutines, save these, and then reload these
subroutines later.
- Save SLogo subroutines/variables to a file so that these
definitions can be read in (see previous requirement). You do not need
to save the entire workspace, but should be able to save the user's
definitions in a workspace.
- Display the results of the turtle executing commands. The turtle
should be driven via commands entered in the workspace and optionally
by buttons or other user controls. The IDE should support feedback so
that the user is always aware of the turtle's position, heading, or
other parameters affected by the environment. The turtle data can be
toggled off/on if it affects performance but should be accessible if
the user wants to know turtle information. Note, the turtle starts in
the center of the display, which is considered (0, 0).
- Display errors that may result from the user's commands
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. Extend your basic design to bring your SLogo environment
from the seventies into the new millennium (and beyond?). Thus, your
design should easily allow the following extensions.
Some basic enhancements to your IDE will make it nicer to use (in
order of increasing difficulty):
- allow the user to specify an image to use for the turtle instead
of the default image
- allow the user to change the properties of the turtle's pen (at
least up/down, its thickness, and color) graphically
- allow the user to choose the turtle's image from a set of images
(initially a default set, but the user could add to the set)
- display the current defined variable names and their values
- display the current user defined procedures
- allow the user to change the properties of the pen's trail
(i.e., solid, dashed, double, etc.) graphically
- allow the user to zoom in or out within the display (this should
not change the dimensions of the turtle's world, just the user's view
of it)
- allow the user to resize the environment arbitrarily
- allow the user to undo/redo the last action(s) done in the
IDE
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:
- add some commands to the logo grammar
(extended command
descriptions)
- think about how some of your controls will work for many turtles
(for example, the pen property setter)
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 could add the following:
- allow the user to set a background image for the turtle's
display
- allow the user to add sound
- allow the user to show a second, canonical display of the
action, i.e., an unzoomed display in which all of the turtles are
visible and viewed simply as triangles
- allow the user to start, stop, reset, and single step the
turtles performing a set of SLogo commands
- allow the user to reset the display back to some previous time
and replay from there
Finally, you can improve the environment for programming by
including the extensions below:
- allow more complex control structures
- allow local variables and parameters to procedures
- allow recursion
- allow infix mathematical and relational expressions
- allow variable number of parameters to procedures where appropriate
- add list processing functions and lists, stacks, queues, and
random access arrays
- add a debugger (a small step if you have completed the animation
and variable viewing extensions above)
Resources
For background and more complete information about Logo consult these
links:
Our SLogo Links
Documentation for (somewhat) current code:
Statistics about development:
Deliverables
This project is worth 20% of your course grade.
- Preparation: analysis of given code, planning (8%) -
Individual
Preparation Assignment Specification,
due Monday, Nov 18
- Preliminary functionality (30%) - Team
Due Monday, Dec 2 This program should
implement the basics of the turtle graphics package, recognize a
basic logo program, and move the turtle based on those
commands. At a minimum, you must be able to move a turtle 'fd
50'. More credit will be given to a project that gets this basic
program working very well rather than trying to implement parts of
all of the specifications partially.
The team will demo this program in class on Monday.
- Intermediate functionality (12%) - Team
Due Friday, December 6
You should have a working demo of at least 5 commands. You will also demonstrate that you have worked on your code in
some other way, e.g., showing improvement in the GUI, creating a system of
JUnit tests, etc. You will have decided on the three extensions to the
project.
- Final functionality (35%) - Team
Implement required specification as well as three extension.
Due date: Determined by team, no later than
Dec 13, 5 p.m. (end of exams).
Should include documentation of extensions and how to use.
- Post-mortem (15%) - Individual
Analysis
Specification, Due Date: Dec 13, 5 p.m. (end of
exams).