Generics of a Higher Kind

Authors: Adriaan Moors, Frank Piessens, and Martin Odersky

Abstract:
With Java 5 and C# 2.0, first-order parametric polymorphism was introduced in mainstream object-oriented programming languages under the name of generics. Although the first-order variant of generics is very useful, it also imposes some restrictions: it is possible to abstract over a type, but the resulting type constructor cannot be abstracted over. This can lead to code duplication. We removed this restriction in Scala, by allowing type constructors as type parameters and abstract type members. This paper presents the design and implementation of the resulting type constructor polymorphism. Furthermore, we study how this feature interacts with existing object-oriented constructs, and show how it makes the language more expressive.

POPL, San Francisco

01/08/2008 - 00:00
01/13/2008 - 23:59
Etc/GMT+2

I'll be attending the COQ tutorial, the main conference, as well as presenting my paper at FOOL. I'll stick around until the 21st, if anyone wants to catch up.

Assignment: extending the STLC

The assignment for the project has been released.

Good luck!

assignment | provided source

Parsing in Scala

Today we looked at how combinator parsing can be implemented in Scala and how to use this approach to write a parser for the untyped lambda calculus.

Implementing Variable Binding in Scala

Date: Oct 24 2007
Topic: Scala for TAPL’ers 2
The second session covered the implementation of our library for variable binding. Implementing substitution and evaluation then becomes pretty straightforward.

Related documents:
Slides| code

Introduction to Scala: abstract syntax and substitution

Date: Oct 17 2007
Topic: Scala for TAPL’ers
In this part of the class, we'll get to know Scala in order to use it to implement (some of) the theory of programming languages.

The first session will cover some of the functional programming aspects of Scala, such as functions and pattern matching. We'll see how FP&OO can be combined to encapsulate variable binding in a library. Implementing substitution and evaluation then becomes pretty straightforward.

Related documents:

Safe Type-level Abstraction in Scala

Authors: Adriaan Moors, Frank Piessens, and Martin Odersky

Abstract:
Most formal accounts of object-oriented languages have focussed on type soundness: the safety that type checking provides with respect to term-level computation and abstractions. However, with type-level abstraction mechanisms becoming increasingly more sophisticated, bringing this guarantee to the level of types has become quite pressing. We call this property kind soundness and demonstrate that nuObj does not provide it: well-formed types may apply type-level abstractions to unexpected type arguments. We present Scalina, a purely object-oriented calculus that employs the same abstraction mechanisms at the type level as well as at the kind level. Soundness for both levels can thus be proven by essentially the same arguments. Kind soundness finally allows designers of type-level abstractions to join their term-level colleagues in relying on the compiler to catch deficiencies before they are discovered by their clients.

Frescala: freshness, binding and how to avoid capture

Well, three times really is a charm. This afternoon I undertook a third attempt at porting Cheney’s FreshLib v0.1 to Scala, and finally got it to work! This means I can finally claim the name “Frescala”!

FreshLib is a Haskell library for dealing with variable binding as in FreshML. In his Functional Pearl, Cheney describes the main concepts behind it, and then demonstrates how v0.1’s boilerplate can be scrapped using Lämmel and Peyton-Jones’s Scrap-Your-Boilerplate approach.

Code-follows-Type Programming in Scala

This article introduces Scala programmers to what I call “Code-follows-Type Programming” (CfT). CfT’s goal is scrapping repetitive code (“boilerplate”) that is fully described by the structure of types. As our “killer app”, we’ll implement a serialisation function that can turn data of any (representable) type into a list of bits.

Painful Drupal upgrade...

Ugh.. I just spent two hours fixing my drupal-managed content.. had to manually paste the stories from an SQL dump as the upgrade from 4.6.8 to 5.1 didn't work... (And of course I didn't backup *before* upgrading, no, that would've been too clever)

Sorry about the lost users&comments, ... I've tried to recreate as much as possible, and will update more this weekend, but some things will stay forever lost.

Ah, the irony.. this was supposed to increase my productivity... Anyway, I'm getting ready to publish more content on DGP and type-level computation.

Syndicate content