Re: Typechecking union types

"Thomas Christensen" <>
28 Jul 2006 18:55:09 -0400

          From comp.compilers

Related articles
Typechecking union types (Thomas Christensen) (2006-06-27)
Re: Typechecking union types (Curtis W) (2006-07-05)
Re: Typechecking union types (Hans-Peter Diettrich) (2006-07-05)
Re: Typechecking union types (2006-07-05)
Re: Typechecking union types (Thomas Christensen) (2006-07-28)
| List of all articles for this month |

From: "Thomas Christensen" <>
Newsgroups: comp.compilers
Date: 28 Jul 2006 18:55:09 -0400
Organization: Compilers Central
References: 06-06-072
Keywords: types
Posted-Date: 28 Jul 2006 18:55:09 EDT

Hi again,

Thanks for your answers, sorry for the delay.

The language to be typechecked is VDM++, an object-oriented formal
specification language.
See for details.

The language is used for modelling and as such is not required to
be executable. It supports a range of "broad" datatypes such as
unions, sets and set comprehensions, injective maps and map
comprehension as well as type invariants.

The union types and the static invariants add additional undecidability.

For example we may define a variable to be of a union type:

        x : nat | bool

Which is the union of booleans and the natural numbers.
This leads to problems when typechecking the expression

        x + 1

The expression will be type correct if x is a natural number, and
type incorrect if x is a boolean.

Type invariants can be added:

        Nat5 = nat
        inv n == n > 4

The type Nat5 then represents the natural numbers greater than 4.

The current approach in the available tools is to generate proof
obligations which the user must manually discharge.

What I am looking for is pointers to articles, books and research on
typechecking various "difficult" constructs, such as union types and

Thomas Christensen

"Thomas Christensen" <> wrote in message
> Hi,
> For my master thesis, I need to get up to speed
> on the current state of the art within the somewhat
> narrow field of typechecking union types.
> Can anyone point me to some good starting points, books,
> papers, articles. I have Benjamin Pierce's book, "Types and Programming
> Languages" and am currently ploughing my way through that.
> What I need is some background on the various problems/issues related
> specifically to union types.
> Regards
> Thomas Christensen

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.