From cb1adaabe4f78a30937a93abdcc2dfddd65e6f99 Mon Sep 17 00:00:00 2001 From: Cliff Click Date: Thu, 5 Sep 2024 09:40:02 -0700 Subject: Updates README More on Types, pushed out Arrays one more chapter --- chapter04/README.md | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'chapter04/README.md') diff --git a/chapter04/README.md b/chapter04/README.md index 1f300937..e1b28d3f 100644 --- a/chapter04/README.md +++ b/chapter04/README.md @@ -53,15 +53,19 @@ Start node. In [Chapter 2](../chapter02/README.md) we introduced the Type System. -We annotate Nodes with Types. - -The Type annotation serves two purposes: +We have annotated Nodes with Types and the Type annotation serves two purposes: * It defines the set of operations allowed on the Node, and * it defines the set of values the Node takes on. -The type itself is identified by the Java class sub-typing relationship; all -types are subtypes of the class `Type`. +We mentioned in [Chapter 2](../chapter02/README.md) that the set of values +associated with a Type at a specific Node can be conveniently represented as a +[lattice](https://en.wikipedia.org/wiki/Lattice_(order)). + +The type itself is identified by the Java class `Type` and subtypes. The type +implementation uses Java classes as convenient to deal with a Types' internal +structure - but the Java classes have no relation to a Type's place in the +lattice. In this chapter we extend the Type hierarchy as follows: @@ -73,10 +77,7 @@ Type +-- TypeTuple (New - represents multi-valued result) ``` -We mentioned in [Chapter 2](../chapter02/README.md) that the set of values associated with a Type at a specific Node -can be conveniently represented as a "lattice". - -Our enhanced Lattice looks like this. +Our enhanced Lattice looks like this: ![Lattice](./docs/lattice.svg) -- cgit v1.2.3