Articles

Actor Syntax in Whiley

Recently, I’ve been doing some work on the syntax for [[Actor model|Actors]] in Whiley. After some deliberation, I’ve decided to go with explicit syntax for both synchronous and asynchronous message sends. This means any message can be sent either synchronously or asynchronously. Obviously, sending asynchronously is preferable. However, in cases where a return value . . . → Read More: Actor Syntax in Whiley

Function Pointer Syntax for Whiley

One of the next big issues needing to be addressed is the syntax for [[function pointers|function and method pointers]].  The syntax I’m thinking of is close to that used in C and C++ (see e.g. here and here).  My initial idea results in something like this:

define MyComparator as { int compareTo(MyRecord,MyRecord) }

This . . . → Read More: Function Pointer Syntax for Whiley

Field Resolution in Whiley

An interesting issue has arisen as a result of my recent decision to move away from a declared-type model.  The issue is essentially about [[Scope (programming)|scope resolution]] of fields and local variables.   For example, consider the following:

define MyProc as process { int f } void MyProc::m(int x): f = x

Now, m(int) is . . . → Read More: Field Resolution in Whiley

Whiley gets a While Loop!

Finally, in the upcoming release of Whiley, I have added support for both while and for loops — which is about time.  Here’s an example:

define nat as int where $ >= 0 nat sum([nat] list): r=0 i=0 while i < |list| where r >= 0: r = r + list[i] i = i . . . → Read More: Whiley gets a While Loop!

On Flow-Sensitive Types in Whiley

In the ensuing months since the previous release of Whiley, I have been working away on a major rewrite of the compiler. This is now almost ready, at last! One of the “executive decisions” I made recently, was to move away from a declared variable model to a completely [[Data-flow analysis|flow-sensitive]] typing model. To . . . → Read More: On Flow-Sensitive Types in Whiley