University of Leicester

cms

RESEARCH STUDENT — John Whitington 

G1 Ken Edwards Building
School of Computing and Mathematical Sciences,
University of Leicester,
University Road,
Leicester,
LE1 7RH.

E: jw642@le.ac.uk

I am a PhD student under Dr Tom Ridge. My research concerns functional programming languages.

Papers

John Whitington and Tom Ridge Direct Interpretation of Functional Programs for Debugging EPTCS, 2019 [PDF]

We make another assault on the longstanding problem of debugging. After exploring why debuggers are not used as widely as one might expect, especially in functional programming environments, we define the characteristics of a debugger which make it usable and thus widely used. We present initial work towards a new debugger for OCaml which operates by direct interpretation of the program source, allowing the printing out of individual steps of the program's evaluation. We present OCamli, a standalone interpreter, and propose a mechanism by which the interpreter could be integrated into compiled executables, allowing part of a program to be interpreted in the same fashion as OCamli whilst the rest of the program runs natively. We show how such a mechanism might create a source-level debugging system that has the characteristics of a usable debugger (such as being independent of its environment) and so may eventually be expected to be suitable for widespread adoption.

John Whitington and Tom Ridge Visualizing the Evaluation of Functional Programs for Debugging SLATE '17, 2017 [PDF]

In this position paper, we present a prototype of a visualizer for functional programs. Such programs, whose evaluation model is the reduction of an expression to a value through repeated application of rewriting rules, and which tend to make little or no use of mutable state, are amenable to visualization in the same fashion as simple mathematical expressions, with which every schoolchild is familiar. We show how such visualizations may be produced for the strict functional language OCaml, by direct interpretation of the abstract syntax tree and appropriate pretty-printing. We describe (and begin to address) the challenges of presenting such program traces in limited space and of identifying their essential elements, so that our methods will one day be practical for more than toy programs. We consider the problems posed by the parts of modern functional programming which are not purely functional such as mutable state, input/output and exceptions. We describe initial work on the use of such visualizations to address the problem of program debugging, which is our ultimate aim.

John Whitington Two Dimensional Hidden Surface Removal with Frame-to-frame Coherence Spring Conference on Computer Graphics, 31st Proceedings, pp 151-158. 2015 [ACM Digital Library] [PDF]

We describe a hidden surface removal algorithm for two-dimensional layered scenes built from arbitrary primitives, particularly suited to interaction and animation in rich scenes (for example, in illustration). The method makes use of a set-based raster representation to implement a front-to-back rendering model which analyses and dramatically reduces the amount of rasterization and composition required to render a scene. The method is extended to add frame-to-frame coherence analysis and caching for interactive or animated scenes. A powerful system of primitive-combiners called filters is described, which preserves the efficiencies of the algorithm in highly complicated scenes. The set representation is extended to solve the problem of correlated mattes, leading to an efficient solution for high quality antialiasing. A prototype implementation has been prepared.

Other Articles

John Whitington OCamli: Interpreted OCaml OCaml'17 Workshop, Oxford, 2017 [PDF Poster] [PDF Extended Abstract]

We present a proof-of-concept tool, ocamli, which runs ordinary OCaml programs by direct interpretation of the abstract syntax tree, taking advantage of compiler-libs for everything other than the actual evaluation. While this method of execution of an OCaml program is, clearly, rather slow, it has a number of intriguing advantages for teaching and debugging.

Books

Haskell from the Very Beginning Coherent Press (2019) [Amazon] [Website]

In Haskell from the Very Beginning John Whitington takes a no-prerequisites approach to teaching the basics of a modern general-purpose programming language. Each small, self-contained chapter introduces a new topic, building until the reader can write quite substantial programs. There are plenty of questions and, crucially, worked answers and hints. Haskell from the Very Beginning will appeal both to new programmers, and to experienced programmers eager to explore functional languages such as Haskell. It is suitable both for formal use within an undergraduate or graduate curriculum, and for the interested amateur.

A Machine Made this Book: Ten Sketches of Computer Science Coherent Press (2016) [Amazon] [Website]

Back Cover: How do we decide where to put ink on a page to draw letters and pictures? How can computers represent all the world’s languages and writing systems? What exactly is a computer program, what and how does it calculate, and how can we build one? Can we compress information to make it easier to store and quicker to transmit? How do newspapers print photographs with grey tones using just black ink and white paper? How are paragraphs laid out automatically on a page and split across multiple pages? In A Machine Made this Book, using examples from the publishing industry, John Whitington introduces the fascinating discipline of Computer Science to the uninitiated.

More OCaml: Algorithms, Methods & Diversions Coherent Press (2014) [Amazon] [Website]

Back Cover: In More OCaml John Whitington takes a meandering tour of functional programming with OCaml, introducing various language features and describing some classic algorithms. The book ends with a large worked example dealing with the production of PDF files. There are questions for each chapter together with worked answers and hints. More OCaml will appeal both to existing OCaml programmers who wish to brush up their skills, and to experienced programmers eager to explore functional languages such as OCaml. It is hoped that each reader will find something new, or see an old thing in a new light. For the more casual reader, or those who are used to a different functional language, a summary of basic OCaml is provided at the front of the book.

OCaml from the Very Beginning Coherent Press (2013) [Amazon] [Website]

Back Cover: In OCaml from the Very Beginning John Whitington takes a no-prerequisites approach to teaching a modern general-purpose programming language. Each small, self-contained chapter introduces a new topic, building until the reader can write quite substantial programs. There are plenty of questions and, crucially, worked answers and hints. OCaml from the Very Beginning will appeal both to new programmers, and experienced programmers eager to explore functional languages such as OCaml. It is suitable both for formal use within an undergraduate or graduate curriculum, and for the interested amateur.

PDF Explained O'Reilly Media (2012) [Amazon] [O'Reilly]

Back Cover: At last, here’s an approachable introduction to the widely used Portable Document Format. PDFs are everywhere, both online and in printed form, but few people take advantage of the useful features or grasp the nuances of this format. This concise book provides a hands-on tour of the world’s leading page-description language for programmers, power users, and professionals in the search, electronic publishing, and printing industries. Illustrated with lots of examples, this book is the documentation you need to fully understand PDF.

Software

See Github for a full list.

Author: John Whitington (jw642@le.ac.uk).
© University of Leicester 7th October 2019. Last modified: 7th October 2019, 17:23:13
CMS Web Maintainer. Any opinions expressed on this page are those of the author.