Quantcast
Channel: Typing – Whiley
Browsing latest articles
Browse All 23 View Live

More on Flow-Sensitive Typing

The idea behind flow-sensitive typing in Whiley is to give a statically typed language the look-and-feel of a [[Dynamic programming language|dynamically typed language]] (as much as possible).  The...

View Article



A Problem on Typing vs Verification

Whiley uses a flow-sensitive type system, and a verification engine to enable [[Extended static checking]]. My desire in designing these two subsystems is to keep them completely isolated. In...

View Article

Why not use Structural Subtyping?

Modern programming languages generally use what is known as a [[Nominal typing|Nominal type system]].  This means types are associated with explicit names and subtyping relationships are explicit in...

View Article

Image may be NSFW.
Clik here to view.

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...

View Article

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...

View Article


Image may be NSFW.
Clik here to view.

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...

View Article

Image may be NSFW.
Clik here to view.

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...

View Article

Image may be NSFW.
Clik here to view.

Implementing Structural Types

Introduction 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...

View Article


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...

View Article


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...

View Article

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...

View Article

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...

View Article

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...

View Article


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...

View Article

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..]...

View Article


Image may be NSFW.
Clik here to view.

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...

View Article

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...

View Article


Flow Typing for References in Whiley

The Whiley language splits into a fully functional “core” and an imperative “outer layer”.  References and objects do not exist within the functional core.  However, they can exist within the...

View Article

Groovy 2.0 uses Flow Typing!

Groovy 2.0 has just been released, and it contains something rather interesting … optional flow typing!  For those who don’t know much about the language, Groovy is a JVM-based dynamically typed...

View Article

Image may be NSFW.
Clik here to view.

Formalising Flow Typing with Union, Intersection and Negation Types

The Whiley language takes an unusual approaching to static typing called flow typing.  This helps to give Whiley the look-and-feel of a dynamically typed language.  The key idea behind flow typing is...

View Article

Iso-Recursive versus Equi-Recursive Types

An important component of the Whiley language is the use of recursive data types.  Whilst these are similar to the algebraic data types found in languages like Haskell, they are also more powerful...

View Article


Understanding why Union Types are useful

The Whiley programming language uses union types as a way of combining types together.  Here’s a simple example to illustrate: null|int indexOf(string str, char c): for i in 0..|str|: if str[i] == c:...

View Article


On Memory Management and Rust

Rust is definitely one of the more interesting new programming language I’ve come across recently. Memory management is definitely Rust’s “thing”, and the language wants to have its cake and eat it (so...

View Article
Browsing latest articles
Browse All 23 View Live




Latest Images