The State of Whiley

The aim of this post is simply to list the main outstanding issues with the design and implementation of Whiley.  This is primarily for my own purposes, in order to help me focus my efforts and to ensure I don’t forget something important.


Deciding upon the language syntax is obviously the highest priority . . . → Read More: The State of Whiley

Implicit Coercions in Whiley

The issue of [[Type conversion|implicit coercions]] in Whiley is proving to be a particularly thorny issue.  The following motivates why (I think) coercions make sense:

real f(int x, real y): return x + y real g(int x, int y): return f(x,y)

I believe the above should compile without error.  However, this requires an implicit . . . → Read More: Implicit Coercions in Whiley

Regular Tree Automata

In my quest to understand the theory of recursive types in more detail, the notion of regular tree languages and [[Tree automaton|Tree Automata]] has cropped up.  These have been used, amongst other things, for describing [[XML schema|XML schemas]].  They are also useful for describing recursive types as well!

A nice example of a regular . . . → Read More: Regular Tree Automata

On the Duality of Types: the Ideals versus the Reals

I’ve been working hard over the last few weeks on the next release of Whiley, which should be out soon.  However, I’ve got myself into a little bit of a pickle over the type system (again).  I want the type system to be simple and easy to use, but at the same time efficient . . . → Read More: On the Duality of Types: the Ideals versus the Reals

Design by Contract is Most Requested Feature?

Thanks to Alex Potanin for pointing this out to me … it seems that [[Design by Contract]] is the most requested enhancement to the Java language.  You can find the list of the top 25 RFEs here.  A nice quote from the feature description:

I find it a shame that all the requests for . . . → Read More: Design by Contract is Most Requested Feature?

Implementing Structural Types


Over the last few months, I’ve been working on the type system underpinning Whiley.  A key feature is the use of [[Structural type system|structural typing]], rather than [[nominal typing]], and I’ve blogged about this quite a bit already (see [1][2][3][4]).  Over the weekend, I finally found time to work through all my thoughts . . . → Read More: Implementing Structural Types

Minimising Recursive Data Types

Following on from my previous post about structural subtyping with recursive types, a related problem is that of minimising recursive types. Consider this (somewhat artificial) example:

define InnerList as null | { int data, OuterList next } define OuterList as null | { int data, InnerList next } int sum(OuterList list): if list ~= . . . → Read More: Minimising Recursive Data Types

A Problem with Structural Subtyping and Recusive Types

One problem causing me a headache is how to implement [[Structural type system|structural subtyping]] for [[recursive data type|recursive types]] (which I first blogged about here). The following example illustrates the basic idea:

define Link as { int data, LinkedList next } define LinkedList as null | Link LinkedList f(Link list): return list

This is . . . → Read More: A Problem with Structural Subtyping and Recusive Types

The Case Against Structural Subtyping … ?

My previous post on structural subtyping generated quite a few comments over on reddit.  There were a lot of mixed opinions as to the pros and cons of having a [[structural type system]] instead of a [[Nominal typing|nominal type system]]. To help me digest and ponder it all, I thought I’d discuss the main . . . → Read More: The Case Against Structural Subtyping … ?

One Approach to Efficient Structural Subtyping

An interesting challenge with [[Structural type system|structural subtyping]] is that of efficient implementation.  In particular, without care, it may be impossible to determine a static offset for each field in a structure at runtime, meaning every field access will require a dictionary lookup.  In this post, I’ll review the problem and  outline one alternative . . . → Read More: One Approach to Efficient Structural Subtyping