Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Projects in 2002/2003
[go: Go Back, main page]

The University of York, Dept. of Computer Science, PLASMA, Olaf Chitil

Olaf Chitil's projects 2003-2004

OC/0 - Self-defined project

I would be happy to discuss your ideas of a project with you. E-mail me (olaf@cs.york.ac.uk) or come along to room CS203J.

My areas of interest are programming and programming languages, in particular functional programming languages. I am interested in semantics and theoretical foundations of programming languages, links between the functional and object-oriented paradigm, type theory, program transformation, compiler construction, programming tools, and how to program effectively. For example, you could develop a library or a tool that assists the programmer, implement a small programming language, or the more mathematically inclined could formalise some aspects of a programming language.

OC/1 An x86 Backend with Register Allocation for the C- Compiler

In the practicals of the third year module CGO - Code Generation and Optimisation - a compiler for the language C-, basically a subset of C, is developed. This compiler generates code for a simple machine, the TM machine, for which a simulator exists. For simplicity, the C- compiler only generates rather inefficient code that hardly uses the registers of the TM machine. However, in the lectures an algorithm for allocating machine registers for storing temporary variables and the preceding liveness analysis are discussed.

In this project you implement a new backend for the C- compiler that performs liveness analysis and register allocation. Also the new backend shall produce assembly code for the x86 processor architecture, so that it can be run without a simulator. Because this backend shall be used for teaching in the CGO module in the future, the implementation should be concise and well documented and there should be options for displaying information of various intermediate phases. If time permits, you could also consider how the assembly output can be enriched so that a standard debugger such as gdb enables source code debugging of C- programs.

The implementation is in C, as the rest of the compiler is implemented in C. You are expected to either take or have taken the CGO module in the third year.

References:

OC/2 Animation of Garbage Collection Algorithms for Teaching

Logical and functional programming language have always been based on automatic garbage collection and in recent years this method of memory management for dynamic data structures has also been adopted by more and more imperative programming languages. There exist a number of standard garbage collection algorithms with different features.

The aim of this project is to develop software that simulates and graphically animates several garbage collection algorithms for the purpose of teaching these algorithms. The animation should stress the similarities and differences of the algorithms. The software should be modular so that an implementation of the animation of a new algorithm could mostly reuse existing modules.

The implementation language is your choice. The animation should run under both Linux and Windows.

References:

OC/3 Hat-Anim

Hat is a collection of tools for tracing programs written in Haskell. Source programs are transformed into self-tracing versions; when they run, in addition to performing their normal work, programs record details of their computation in a file-based data structure, the trace. After the computation is over, the trace can be examined using various tools designed to help programmers locate faults, or simply to discover how the program works.

Because the trace file is written sequentially, it also records in which order expressions are evaluated by the computation. None of the current viewing tools makes use of this information. The aim of this project is the development of a new tool for visualising the evaluation process by showing an animation.

Inspiration may be gained from the tool GHood and an early version of the tool Hood (both unconnected with Hat). They animate Haskell computations, but they cannot show many intermediate steps of a computation and they rely on source code annotations. Also further features that enable concentrating on a particular part of a computation are desirable.

The project requires understanding of the evaluation of lazy functional programs, but the tool may be implemented in another language than Haskell.

References:

OC/4 Type-Explorer

The type system of typed functional programming languages such as Haskell has two nice properties: First, the types of functions and variables need not be declared in the program; the compiler can automatically infer the types. Second, polymorphic types allow a function to have several types. For example, the function length that determines the length of a list works on lists of any type such as lists of booleans or lists of integers.

The downside of the type system's flexibility is that from a type error message for an ill-typed program it is often hard to deduce and understand the actual cause of the error. I have recently proposed a new method for helping the programmer to understand type errors. I built a simple prototype of a tool that enables the programmer to explore the types of arbitrary subexpressions of a program. The tool uses a type inference algorithm that is different from the usually employed one.

The aim of this project is to develop an improved tool that can read in a program of a subset of Haskell (without classes) and provides a nice user interface for exploring its types.

The project requires understanding of the Haskell type system (without classes), but the tool may be implemented in another language than Haskell.

References:

OC/5 Haskell to Clean Translation

Haskell and Clean are two quite similar lazy functional programming languages. Haskell is basically a subset of Clean, except for many syntactical differences. The Clean compiler is renowned for producing very efficient code.

The aim of the project is to make the Clean compiler usable for Haskell programmers. A translator from Haskell to Clean is to be built. Its main component could be the Haskell parser of the nhc98 compiler, which is maintained in the department. Furthermore, the standard libraries of Haskell have to be translated into Clean; parts of these libraries are written in Haskell, parts are primitive and have to be implemented using the standard libraries of Clean. The main part of the evaluation of the Haskell to Clean translator should be a comparison of efficiency with several direct Haskell implementations.

The project requires programming in Haskell and some Clean. Hence you should take or have taken the optional module FUN - Functional Programming - in the third year.

References:

OC/6 An Application in Cayenne

Cayenne is a small experimental functional programming language with a very powerful type system. In Cayenne value expressions and type expressions can be mixed quite freely. The type system allows to encode predicate logic at the type level, allowing types to be used as specifications of programs. For example, types can express that a pop function can only be applied to non-empty stacks, that the result of a sorting function is indeed a sorted list, or that a function that takes two elements of a type and yields a boolean is a partial order, that is, is reflexive, anti-symmetric and transitive. The mixture of types and expressions also leads to a simplification of the language in that no separate module system is needed, because modules are the same thing as records. The power of the type system comes at a cost: type checking of Cayenne is undecidable. Hence the type checker may answer that it is unable to establish if a given program is correctly typed.

You write a small to medium sized program in Cayenne in which you try to express as many properties as possible in the type system. The program implements a simple bibliographic database for different types of publications and their publishers. The database keeps all data in main memory and provides insertion, modification and deletion operations and various search facilities. Alongside the implementation you evaluate the usefulness of Cayenne for practical programming by determining which kind of properties are easy to express, where there are problems, and you collect some practical advice on writing Cayenne programs.

Because Cayenne is a lazy Haskell-like functional language, you should take or have taken the optional module FUN - Functional Programming - in the third year.

References:

OC/7 Interactive Web Pages for haskell.org

haskell.org is the web site for the lazy functional programming language Haskell. It collects various kinds of information related to Haskell: libraries and tools, applications, books and papers, use in teaching, people associated with Haskell etc.

Currently all new or updated information reaches the editors of this web site (John Peterson at Yale University and me) by email and news. We then edit the pages by hand. In this project you should develop software and modify the pages so that part of the presented information can be added, updated and removed through web forms by users. Mechanisms to prevent misuse of this feature have to be implemented. It must be possible to easily make a backup of the current contents. The system should be flexible so that web pages can be restructured without loss of information. Editorial comments should be permitted in most places of web pages. Simplicity of use and administration is a central requirement. Note that the aim of the project is not to produce a "flashy" web site; the pages should be accessible to everyone with nearly any web browser.

Because the web site is for the language Haskell, obviously the software should be developed in Haskell. Hence you should take or have taken the optional module FUN - Functional Programming. The Web Authoring System Haskell (WASH) will provide a suitable basis.

References:

OC/8 - A pretty printing library

Pretty printing is the task of converting tree structured data into text, such that the indentation of lines reflects the tree structure. Furthermore, to minimise the number of lines of the text, substructures are put on a single line as far as possible within a given line-width limit. Here is the result of pretty printing an expression within a width of 35 characters:
if True
   then if True then True else True
   else
      if False 
         then False 
         else False
Pretty printing algorithms are not trivial, because the layout of a subtree does not only depend on its form but also on its context, the remaining tree. Hence it is sensible to use a pretty printing library that implements the functionality common to a large class of pretty printers. A pretty printing library provides functions for easily defining a pretty printer for any specific tree data structure (e.g. the abstract syntax tree of a compiler). In this project a pretty printing library shall be developed in and for a programming language of your choice. It shall be based on a well-known pretty printing algorithm. The main aims are: References:

OC/9 - Static Garbage Collection (student defined)

While a garbage collector reduces programming effort and increases the reliability of memory-based operations, it incurs time (and space) overhead. This in particular, because the run-time environment must determine which objects are no longer reachable. Many allocations are made only for short, statically-known periods (cf. creating and dropping Strings in Java). In some languages the run-time stack can be used to quickly provide memory for such uses, whereas a fully garbage collected system must still make at run-time decisions for which all the required information is available at compile time.

The aim of the project is to study static garbage collection. This term covers a number of memory management methods that perform an analysis of either source or object code (e.g. escape analysis, region analysis) to locate for a large number of memory allocation points the program point from which on the memory will no longer be used and hence the memory can be reclaimed.

In the project a tool will be implemented to perform such an analysis and to insert appropriate allocation and deallocation instructions in the program. Furthermore, an existing run-time system will be modified to support the new memory management instructions. Evaluation will include measurement of the effectiveness of the analysis (amount of memory managed by the new instructions instead of the general garbage collector) and measurement of the performance of the new run-time system compared to the old one.

It is planned to use the Java Virtual Machine as experimentation environment. The analysis will work on Java byte code instructions.

References:


Olaf Chitil; Last Update: 21 February 2003