Skip to content

Commit 1103480

Browse files
committed
Address @tautschnig's comments.
1 parent 63347d5 commit 1103480

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

doc/architectural/background-concepts.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ three important analysis methods and some commonly used terms.
1111
\section representations_section Representations
1212

1313
One of the first questions we should be considering is how we represent programs
14-
in such a way that we can easily analyze and reason them.
14+
in such a way that we can easily analyze and reason about them.
1515

1616
As it turns out, the best way to do this is to use a variety of
1717
different representations, each representing a different level of
@@ -81,12 +81,12 @@ The key data structure that stores the result of this step is known as an
8181
(cf. [Wikipedia](https://en.wikipedia.org/wiki/Abstract_syntax_tree)).
8282
ASTs are still relatively
8383
close to the source code, and represent the structure of the source code
84-
while abstracting away from irrelevant details, e.g., dropping
84+
while abstracting away from syntactic details, e.g., dropping
8585
parentheses, semicolons and braces as long as those are only used for
8686
grouping.
8787
8888
Considering the example of the C program given above, we first notice
89-
that the program describes (in C terms) a single *compilation unit*,
89+
that the program describes (in C terms) a single *translation unit*,
9090
consisting of four top-level *declarations* (the two function forward
9191
declarations of `atoi` and `printf`, and the function definitions of
9292
`factorial` and `main`). Let us start considering the specification of
@@ -112,9 +112,9 @@ it has a child node initiating a parameter list, and there is a node in
112112
the parameter list for each parameter, giving its type and name, if a
113113
name is given.
114114
115-
More interestingly, we can represent the structure of the `factorial`
115+
Extending this idea, we can represent the structure of the `factorial`
116116
function using ASTs. The idea here is that the code itself has a
117-
hierarchical structure. In the case of C, this start with the block
117+
hierarchical structure. In the case of C, this starts with the block
118118
structure of the code: At the top, we start with a block of code, having
119119
three children, each being a ''statement'' node:
120120
1. `unsigned long fac = 1`

0 commit comments

Comments
 (0)