summaryrefslogtreecommitdiff
path: root/chapter04
diff options
context:
space:
mode:
authorDibyendu Majumdar <dibyendumajumdar@users.noreply.github.com>2023-10-26 19:49:45 +0100
committerGitHub <noreply@github.com>2023-10-26 19:49:45 +0100
commited7e01a7bf7b038a38d975358e85fb3d281b47bb (patch)
tree14d3077969dd3627a0a9d4c14c2d7d95008a4020 /chapter04
parent10ed01188f78e3fad4b257a0241f9a89e2fdb405 (diff)
downloadSimple-ed7e01a7bf7b038a38d975358e85fb3d281b47bb.tar.gz
Simple-ed7e01a7bf7b038a38d975358e85fb3d281b47bb.zip
Add a description of proj nodes (#11)
* Add a description of proj nodes * Add a description of proj nodes
Diffstat (limited to 'chapter04')
-rw-r--r--chapter04/README.md13
-rw-r--r--chapter04/docs/projnode.pngbin0 -> 6061 bytes
2 files changed, 13 insertions, 0 deletions
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
--- /dev/null
+++ b/chapter04/docs/projnode.png
Binary files differ