4 research outputs found
Abstraction for web programming
This thesis considers several instances of abstraction that arose in the design and implementation
of the web programming language Links. The first concerns user interfaces, specified
using HTML forms. We wish to construct forms from existing form fragments without introducing
dependencies on the implementation details of those fragments. Surprisingly, many
existing web systems do not support this simple scenario. We present a library which captures
the essence of form abstraction, and extend it with more practical facilities, such as validation
of the HTML a program produces and of the input a user submits.
An important part of our library is a simple semantics, given as the composition of three
primitive “idioms”, an interface to computation introduced by McBride and Paterson. In order
to justify this approach we present a comparison of idioms with the related notions of monads
and arrows, refining the informal claims in the literature.
Our library forms part of the Links framework for stateless web interactions. We describe a
related aspect of this system, a preprocessor that derives generic instances of functions, which
we use to serialise server state between client requests. The abstraction in this case involves
the shape of datatypes: the serialisation operation is specified independently of the particular
types involved.
Our final instance of abstraction involves abstract types. Functional programming languages
typically offer one of two styles of abstract type: the abstraction boundary may be
drawn using a private data constructor, or using a type signature. We show that there is a pair
of semantics-preserving translations between these two styles. In the light of this, we revisit
the decision of the Haskell designers to offer the constructor style, and define a library that
supports signature-style definitions in Haskell by translation into the constructor style
Abstract Machines for Dynamic Computation
Laboratory for Foundations of Computer ScienceIn this thesis we address the challenges associated with the provision of dynamic software architectures. These are systems in which programs are constructed from separately compiled units with a facility for the replacement of these units at runtime. Typical examples of applications which will benefit from this dynamic approach are long-lived systems in which downtime is highly undesirable, for example, web-servers, database engines, and equipment controllers. In addition, dynamic software architectures are also gaining popularity with the recent advent of wide-area Internet applications, where it is often impractical to compile a program in its entirety or begin execution in a single step.
Our approach to dynamic software architectures differs from earlier attempts in that we guarantee the safety of the replacement operation. This is done by founding our techniques on the rigour of strong typing. In the first half of the thesis we take an existing static software architecture with strong typing facilities and modular program construction, namely the Standard ML platform, and equip it with facilities for separate-compilation and code-replacement of modules. The resulting dynamic software architecture, which we call Dynamic ML, ensures the safety of replacement through an effective use of state-of-the-art advances in the fields of types in compilation and abstract machines.
In the latter half of the thesis we extend Dynamic ML with a facility for distributed execution and adapt our code-replacement model accordingly. This will permit the construction of larger dynamic architectures, for example, across a distributed network of workstations. We also perform a mechanical verification of the distributed algorithm by model checking, to gain further confidence in the correctness of our approach. At the end of the thesis we outline an implementation of our techniques for the Java language, demonstrating the portability of our approach