Articles

Thinking about Recursive Constrained Types in Whiley

Whiley supports so-called [[algebraic data type|Algebraic Data Types]] for constructing tree-like data structures.  For example, an expression tree might be defined like so:

define ADD as 1 define SUB as 2 define MUL as 3 define DIV as 4 define binop as {ADD,SUB,MUL,DIV} define expr as int | (binop op, expr lhs, expr rhs) . . . → Read More: Thinking about Recursive Constrained Types in Whiley

Whiley v0.2.9 Released!

Well, here’s version 0.2.9.   This includes numerous bug fixes, and several major feature updates:

Support for recursive algebraic datatypes Improved support for type testing, particularly of recursive types Syntax of function declarations has changed slightly to use where instead of requires + ensures.  See this post for more on why.

However, there remains a . . . → Read More: Whiley v0.2.9 Released!

Thinking about Pre- and Post-Conditions in Whiley

The notion of [[precondition|pre-]] and [[postcondition|post-conditions]] is well understood in the context of software verification.  However, Whiley deviates from the norm by combining them into a single condition.  The following illustrates a simple Whiley function:

int f(int x) where x > $ && $ > 0: return x-1

Here, $ represents the return value.  . . . → Read More: Thinking about Pre- and Post-Conditions in Whiley

Language Designers … who wait?

Someone recently pointed me to the Rust programming language which has some very nice features, although it’s still in early stage development.  In particular, the system statically prevents [[pointer (computing)#null pointer|null pointer errors]], and does not permit [[dangling pointer|dangling pointers]].  The language FAQ also claims the “ability to define complex invariants that hold over . . . → Read More: Language Designers … who wait?

On Object-Oriented Programming

There’s an interesting interview with [[Ralph Johnson]] and [[Joe Armstrong (programming)|Joe Armstrong]] over at QCon.  They’re talking generally about whether OOP has been successful, and reflecting on the last few decades.

A few things from the interview caught my eye.  Ralph talks about a fundamental mistake made by the designers of [[SmallTalk]].  In SmallTalk, . . . → Read More: On Object-Oriented Programming

Whiley v0.2.8 Released!

Here is the latest update for the Whiley-to-Java Compiler.  It now weighs in at around 47KLOC, spread over 272 classes.  There are 379+ distinct test inputs, which give rise to around 615 actual JUnit tests.  Anyway, the list of improvements includes:

Fixed numerous outstanding bugs Improved reporting of syntax errors Added list append Added . . . → Read More: Whiley v0.2.8 Released!

Finding Bugs in the Real World

There’s a really interesting article over on CACM about static analysis in the real world.  Here’s the Link.

The article is a report from experiences gained in the commercialisation of a tool by Coverity which uses [[static code analysis]] to find bugs.  The tool applies a set of relatively straight-forward rules to identify problems . . . → Read More: Finding Bugs in the Real World

Kiwi Language Creator Acknowledged!

Dominion Post Article on Ross Ihaka

The Dom Post ran a short article over the weekend on kiwi Ross Ihaka, about the R programming language which he created along with Robert Gentleman at the University of Auckland.  The R programming language is used by numerous companies across the world, primarily for performing statistical calculations.  Here’s the article:

. . . → Read More: Kiwi Language Creator Acknowledged!