@@ -76,10 +76,10 @@ If you built using CMake on Unix, you should be able to run the
76
76
Find or write a moderately-interesting C program; we'll call it ` main.c ` .
77
77
Run the following commands:
78
78
79
- goto-gcc -o main.goto main.c
79
+ goto-gcc -o main.gb main.c
80
80
cc -o main.exe main.c
81
81
82
- Invoke ` ./main.goto ` and ` ./main.exe ` and observe that they run identically.
82
+ Invoke ` ./main.gb ` and ` ./main.exe ` and observe that they run identically.
83
83
The version that was compiled with ` goto-gcc ` is larger, though:
84
84
85
85
du -hs *.{goto,exe}
@@ -95,7 +95,7 @@ is (informally) called a *goto-program*.
95
95
` goto-instrument ` is a Swiss army knife for viewing goto-programs and
96
96
performing single program analyses on them. Run the following command:
97
97
98
- goto-instrument --show-goto-functions main.goto
98
+ goto-instrument --show-goto-functions main.gb
99
99
100
100
Many of the instructions in the goto-program intermediate representation
101
101
are similar to their C counterparts. ` if ` and ` goto ` statements replace
@@ -105,7 +105,7 @@ Find or write a small C program (2 or 3 functions, each containing a few
105
105
varied statements). Compile it using ` goto-gcc ` as above into an object
106
106
file called ` main ` . You can write the diagram to a file and then view it:
107
107
108
- goto-instrument --dot main.goto | tail -n +2 | dot -Tpng > main.png
108
+ goto-instrument --dot main.gb | tail -n +2 | dot -Tpng > main.png
109
109
open main.png
110
110
111
111
(the invocation of ` tail ` is used to filter out the first line of
@@ -143,7 +143,7 @@ At some point in that function, there will be a long sequence of `if` statements
143
143
** Task:** Add a ` --greet ` switch to ` goto-instrument ` , taking an optional
144
144
argument, with the following behaviour:
145
145
146
- $ goto-instrument --greet main.goto
146
+ $ goto-instrument --greet main.gb
147
147
hello, world!
148
148
$ goto-instrument --greet Leperina main
149
149
hello, Leperina!
0 commit comments