From ed7e01a7bf7b038a38d975358e85fb3d281b47bb Mon Sep 17 00:00:00 2001 From: Dibyendu Majumdar Date: Thu, 26 Oct 2023 19:49:45 +0100 Subject: Add a description of proj nodes (#11) * Add a description of proj nodes * Add a description of proj nodes --- chapter04/README.md | 13 +++++++++++++ chapter04/docs/projnode.png | Bin 0 -> 6061 bytes 2 files changed, 13 insertions(+) create mode 100644 chapter04/docs/projnode.png (limited to 'chapter04') diff --git a/chapter04/README.md b/chapter04/README.md index 03bfe58b..7e8a8eea 100644 --- a/chapter04/README.md +++ b/chapter04/README.md @@ -34,6 +34,19 @@ Below is our list of Nodes from [Chapter 3](../chapter03/README.md): | Div | Data | Divide a value by another | Two data nodes, values are divided, order matters | Result of the division | | UnaryMinus | Data | Negate a value | One data node, value is negated | Result of the unary minus | +## Projection Nodes + +We add projection nodes that are used to extract a specific tuple member from a multi-valued node. +Each projection node contains an index of the field to extract from its input node. +Projection nodes allow us to maintain labeled use-def edges as simple Node references. + +In the visuals, projection nodes are shown as rectangular boxes inside the node to which they are attached. + +![ProjNode](./docs/projnode.png) + +In the visual above, the projection nodes have been tagged by the names associated with the outputs of the +Start node. + ## Changes to Type System In [Chapter 2](../chapter02/README.md) we introduced the Type System. Here is a summary of key points: diff --git a/chapter04/docs/projnode.png b/chapter04/docs/projnode.png new file mode 100644 index 00000000..bf7493f2 Binary files /dev/null and b/chapter04/docs/projnode.png differ -- cgit v1.2.3