CompSci 308
Fall 2019
Advanced Software Design and Implementation

SLogo

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

Logo is a computer programming language designed to teach programming to children. It is a user-friendly, interpreted language (like Python rather than Java), 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 addition to being used to build such sophisticated programs as a compiler, Logo has also caused people to think differently about how to teach geometry, social science, and especially programming.

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 writing programs on the computer that were downloaded to the robot. 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, so much so, that most modern languages and platforms have an implementation of it. For the complete history see here.

As a dialect of Lisp, Logo is a powerful language. Although most of its complexity (and power) come from other elements than those that control the turtle, it is still amazing how expressive and compact it can be. For this project you will 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.

Specifications

In teams, write a Java program using OpenJFX that provides an integrated development environment, IDE, that supports users to write SLogo programs. Unlike IDEs such as IntelliJ, which are designed around files that represent a complete program, SLogo users should be able to command the turtle interactively on a per instruction basis. This is the read-eval-print loop used in environments for interpreted languages such as Python, Lisp, Smalltalk, and now Java (even the command-line shell could be considered such an environment). Thus your IDE should focus on helping users to experiment with and manage expressions, building up complex expressions from previously entered ones and keeping the visual representation of the turtle appropriately updated.

At its heart, the "back end" supports understanding a set of commands to control the turtle and its pen using basic programming constructs such as conditionals, loops, and procedures. The "front end" should, at the very least, include a command window and a turtle graphics window as well as other tools for supporting experimenting with commands. These two sides combine to receive, parse, and execute commands from the user, reporting any errors encountered along the way (and not crashing!) or displaying the results of the commands in the graphics window.

SLogo differs slightly from the original Logo language to make it easier to parse (your project must be able to properly run these example programs that show this simplified syntax).

Design Goals

Thinking deliberately about each class' public methods as an Application Programming Interface, or API, for others on your team can really improve how you approach the task of programming and design because it changes your perspective from simply trying to support specific features to trying provide a service that others can use but also extend. One way to view an API is as a contract to provide a service and, once such a contract is in place, developers are enticed to use the API because they know they can rely on its stability. In general, APIs are minimal but complete; powerful; consistent; hard to misuse; easy to extend; and lead others to write readable code well designed code.

The design of the APIs is arguably the most critical part of designing a program, because it affects the design of other components dependent on them. For this project, focus on organizing your program as a collection of interconnected abstract services that work together.

This assignment provides a context to begin thinking about larger scale design issues:

Additionally, the overall program should still be clearly divided into packages that clearly separate the Model from the View as well as a Controller if determined necessary by the team.

Individual Responsibilities when Working as a Team

This is a large project, and it requires steady, consistent, work — only if you put in the time each week will you see measurable progress and not have to pull "heroic" all-nighters near the end.

Although this is a team project, everyone has the following individual responsibilities to the team:

Unfortunately, conflicts are likely to occur so please let the course staff know as soon as possible — even if it has happened just once or twice since it is better to deal with the situation early rather than having a big disaster at the end when little can be done to get back on track.

Deliverables

In order to encourage you to think about code flexibility, this project will be released in stages.

Resources

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

Or view these videos

Here is an in browser Logo environment.