Documentation

Articles

Fall-Through by Default for Switch Statements?

The switch statement has a long history, and most languages support it or something similar.  In my experience, I found it to be very useful — both for conciseness, and also improving performance.  With the recent release of Java 7, you can finally switch over strings.

In Whiley, the syntax for switch statements currently . . . → Read More: Fall-Through by Default for Switch Statements?

Whiley v0.3.10 Released!

Well, it’s been a tough slog.  But, finally, we have a new release of Whiley!!  The main thing that’s improved over the past few weeks is the underlying type implementation.  This was causing problems before, as programs which should type-check were failing and vice-versa.  To resolve this, the type system has been reimplemented from . . . → Read More: Whiley v0.3.10 Released!

The Whiley Automata Library (WYAUTL)

As part of the upcoming v0.3.10 release of Whiley, I’ve invested considerable effort reimplementing the type system.  This was necessary because, whilst my old implementation generally worked, writing larger programs exposed a lot of issues.  The most interesting aspect of this process is the development of a general-purpose library for representing and manipulating tree . . . → Read More: The Whiley Automata Library (WYAUTL)

Namespaces in Whiley

With the upcoming v0.3.10 release of Whiley, the way import statements are interpreted has changed in a fairly significant manner.  The primary purpose of this is to give better support for namespaces. The following illustrates what’s changed:

import whiley.lang.Math bool check(int x, int y): return max(x,y) == x

Previously, the above code would compile . . . → Read More: Namespaces in Whiley

Simplification vs Minimisation of Types in Whiley

Recently, I’ve been trying to harden up the implementation of Whiley’s type system. The reason for this is fairly straightforward: bugs in the code often prevent me from compiling correct programs!

In thinking about how to restructure the algorithms I’m using, I realised its important to distinguish simplification from minimisation.  I’ve talked about minimisation . . . → Read More: Simplification vs Minimisation of Types in Whiley

A Subtyping Gotcha

An interesting issue with the following piece of code has recently come to my attention:

define Queue as process { [int] items } int Queue::get(): item = this.items[0] this.items = this.items[1..] return item void Queue::put(int item): this.items = this.items + [item] Queue ::Queue(): // following line should be invalid return spawn { items: [] . . . → Read More: A Subtyping Gotcha

Whiley v0.3.9 Released!

So, it’s that time again for another update of the Whiley compiler. Perhaps the most interesting update is that constraints are back! Admitedly, only runtime checking of constraints is back; and, there are quite a few problems with it. But, it’s a step in the right direction, and I’m pretty excited about it.

I’ve . . . → Read More: Whiley v0.3.9 Released!

Whiley v0.3.8 Released!

Now that teaching has started up again, development has slowed a little. This release is primarily a bug fix release. The benchmarks and examples now all compile again, which is great! I’ve also significantly increased the number of micro benchmarks, as I’m gear up for some performance testing …

ChangeLog

The main changes since . . . → Read More: Whiley v0.3.8 Released!

A Semantic Interpretation of Types in Whiley

An interesting and intuitive way of thinking about a type system is using a semantic interpretation.  Typically, a set-theoretic model is used where a type T is a subtype of S iff every element in the set described by T is in the set described by S.

The Semantic Model

The starting point is . . . → Read More: A Semantic Interpretation of Types in Whiley

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.

Syntax

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