Project Title - "Using Java To Implement The DeltaBlue Algorithm"

Background

Constraints describe relations that should be satisfied and provide a useful tool for programming languages (such as Smalltalk), user interface toolkits (such as ThingLab), interactive simulation packages, algorithm animation etc.

The set of all constraints (whether required or preferential) is called a "constraint hierachy". Each constraint consists of a predicate (to test whether or not a constraint is satisfied), an strength (to represent the order of priority over which constraints can be relaxed) and a set of methods (to make the constraint hold). The greatest strength is called the required strength as each of the corresponding constraints must be satisfied.

Naturally, it is essential that these constraints are solved as efficiently as possible, whilst still maintaining 100% correctness. In many applications only minor changes are made to the constraint hierachy between successive solutions calculated by the constraint solver. This is particularly apparent in user interface toolkits. In these situations it is therefore best to use a constraint solver optimised for incremental changes in the constraint hierachy, rather than a solver which calculates from scratch every time.

The DeltaBlue algorithm is such an incremental constraint solver (based on the Blue algorithm) which minimizes the cost of finding a new solution after each change by exploiting its knowledge of the last solution. The DeltaBlue algorithm uses three categories of data: the constraints in the hierachy, the constrained variables, and the current solution (also known as the plan). Each variable is assigned a "walkabout strength" which may well change as the constraint hierachy changes. This allows the algorithm to predict the effect of adding a given constraint and hence is why it is so efficient at solving an incrementally changing hierachy.

Implementing the DeltaBlue algorithm in the Java programming language will enable anyone with access to a Java Virtual Machine to utilise this powerful constraint solving algorithm in their applications or algorithms. Combining the power of DeltaBlue with Java has the potential to result in an incredibly useful and highly accessible tool.

General Open Questions

There are a few questions which could be asked either before or after embarking on the project. Beforehand, it is important to be sure that the end product will be useful to a sufficient number of end users - i.e. the project must be worthwhile. So, one question to ask is what types of applications will this Java program be most relevant to? Also, the question of whether Java is the correct language to implement the algorithm, should be asked.

While writing the Java program, there should be more indication of whether the final product will be efficient enough. Is it going to be fast enough? Is it going to be small enough? (size is important on the web!)

Another question, the answer to which should also become more obvious later on, is which are the best applications to write to demonstrate the DeltaBlue implementation? One or two applications (depending on how much time is available and how large the first application is) will be written, but a final decision on what they are (or, it is) will be made at a later date.

Proposed Method Of Study

The plan is to build the DeltaBlue algorithm from the outside inwards and then to write one or two applications which demonstrate its use. Begin by getting the program to accept the four entry points: add variable, add constraint, remove constraint, and remove variable. Also, the ability to output a (mock) solution (if there is one) to the calling procedure, will be set up. Next, the four entry points will be implemented one at a time in the same order as given above. At some point it will be necessary to handle the task of filtering through the constraint strengths within the current plan generated by the algorithm.

Draft Timetable

Here is a very rough timetable for how the project will be tackled

May- Learn Java and Latex! and do some more detailed background reading of the DeltaBlue algorithm.
June- Implement the DeltaBlue algorithm in Java.
July- Write application(s) to demonstrate its use.
August- Formally write up the project.
 
5th September 1997- Hand in the final dissertation!

The End

Mark Carter (Exeter College)