Type and Behaviour Analysis

This system implements and visualises a Type and Behaviour Analysis for a non-trivial subset of CML; it is based on the theory developed in [1].

[1] Torben Amtoft & Flemming Nielson & Hanne Riis Nielson: Type and Effect Systems: Behaviours for Concurrency; to be published by Imperial College Press. Click here for an early version (DAIMI PB-529, October 1997).

Click here to start the analyser.


Input

A program written in the variant of CML described here. The main restriction compared to the full CML is that You can choose whether to enter the source program from a file or from keyboard.

Method

The default action of the system is to
  1. translate the source program into an "equivalent" expression e belonging to a small subset of CML, called "NN-CML" (described here).
  2. analyse this e, using (an extension of) algorithm W as described in [1], Chapter 4.
You can choose to suppress phase 2, if you want to see how your program is translated.

Output

If no parse/type error is reported, the system produces such that
C,A |- e : t & b
([1], the Soundness Theorem 4.29), where |- is the typing judgement ([1], Fig. 2.8).

In addition, types and behaviours contain region information. Thus one can tell in which region a channel is allocated and in which region an input/output action is performed. A region is a set of labels, where a unique label is assigned to each syntactic channel construct.

Postprocessing

After the main part of the analysis has finished, producing t, b, and C, the result can be examined, post-processed, and subsequently displayed, in various ways:

The system is experimental; please send comments to tamtoft@daimi.au.dk.

Click here for a system working directly on NN-CML programs.

The system is implemented in Moscow ML by Torben Amtoft; the parsing of CML and the translation into NN-CML was originally written by Kirsten L. S. Gasser.

The interface is heavily inspired by the system for Control Flow Analysis, implemented by Kirsten L. S. Gasser, Sharmila R. Lassen and Hanne Riis Nielson, which borrows ideas from Peter Sestoft.