Documentation

Articles

Termination of Flow Typing in Whiley

Whiley uses flow typing to give it the look-and-feel of a dynamically typed language (see this page for more on flow typing).  In short, flow typing means that variables can have different types at different program points.  For example:

define Node as { int data, Tree left, Tree right } define Tree as null . . . → Read More: Termination of Flow Typing in Whiley

Test to Code Ratio

I’ve just been watching the following talk over on InfoQ: Software Quality — You know it when you see it.  Thanks to Craig over at SoftViz for pointing me to it.  The talk is quite interesting, with the focus being primarily around using innovative visualizations of software to gauge quality.

But, that’s not what . . . → Read More: Test to Code Ratio

Type Aliasing in Java?

A problem I often encounter in Java is that I want to say “these two things are the same”, but Java won’t let me. Suppose I want to maintain an int[] array which is always sorted in my program. So, whenever I get one of these things, I can rely on it being sorted. Here’s . . . → Read More: Type Aliasing in Java?

A Problem of Decoupling?

Recently, I’ve been working on improving the core framework that underpins the Whiley compiler.  This provides a platform for reading/writing files of specified content in a structured fashion.  Like Java, Whiley provides a hierarchical namespace in which names live and can be imported by others.  Let’s consider a simple example:

package zlib.core import Console . . . → Read More: A Problem of Decoupling?

Whiley v0.3.13 Released!

Well, it’s been almost two months in the making, but here’s the next release of Whiley.  Quite of lot of changes, although there remain significant issues to resolve — particularly with the front-end.

ChangeLog Fixed outstanding problem with list and set types related to type tests.  More specifically, on the negative branch of a . . . → Read More: Whiley v0.3.13 Released!

Efficient Value Semantics for Whiley

The latest release of the Whiley compiler (v0.3.12) includes an optimisation for passing compound structures (e.g. lists, sets and records) by value.  This is really important because all compound structures in Whiley have value semantics, meaning they are always passed by value.  In fact, Whiley does not support references or pointers as found in . . . → Read More: Efficient Value Semantics for Whiley

Whiley v0.3.12 Released!

Well, crikey, what a long time since the last release.  Things haven’t changed a whole lot, apart from various bug fixes.  Probably the most interesting update is the inclusion of reference counting of compound structures to enable in-place updates and prevent unnecessary cloning.  This leads to some nice performance improvements.  Quite a bit of . . . → Read More: Whiley v0.3.12 Released!

Whiley v0.3.11 Released!

As usual, it’s been a surprising amount of effort … but the next release of Whiley is available!  It’s been quite a long time since the last update, but then quite a lot has improved.  Unfortunately, I did find a fairly serious problem with my type system, which means I’ve got to go back . . . → Read More: Whiley v0.3.11 Released!

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!

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