about summary refs log tree commit diff stats
path: root/040brace.cc
Commit message (Collapse)AuthorAgeFilesLines
* 4466Kartik Agaram2018-08-031-6/+6
| | | | Why the heck was I using ints for OPEN/CLOSED in the first place?!
* 4223Kartik K. Agaram2018-03-141-2/+1
|
* 3987Kartik K. Agaram2017-09-011-2/+2
|
* 3811Kartik K. Agaram2017-04-041-1/+1
|
* 3810Kartik K. Agaram2017-04-041-5/+5
| | | | | | | Stop naming 'jump' instructions in their errors since they're so often rewritten from 'break' or 'loop' instructions. Thanks Lakshman Swaminathan for running into this issue.
* 3742 - move instruction.old_name to a later layerKartik K. Agaram2017-02-061-15/+16
| | | | | | The drawback of this is that we forget to initialize old_name when we create instructions out of whole cloth in a few places. But this problem already existed..
* 3657 - better error messageKartik K. Agaram2016-11-101-3/+5
| | | | Thanks Ella Couch for reporting this.
* 3561Kartik K. Agaram2016-10-221-1/+1
|
* 3549Kartik K. Agaram2016-10-221-2/+2
| | | | | | | | | | | | | | | | | | More consistent definitions for jump targets and waypoints. 1. A label is a word starting with something other than a letter or digit or '$'. 2. A waypoint is a label that starts with '<' and ends with '>'. It has no restrictions. A recipe can define any number of waypoints, and recipes can have duplicate waypoints. 3. The special labels '{' and '}' can also be duplicated any number of times in a recipe. The only constraint on them is that they have to balance in any recipe. Every '{' must be followed by a matching '}'. 4. All other labels are 'jump targets'. You can't have duplicate jump targets in a recipe; that would make jumps ambiguous.
* 3522Kartik K. Agaram2016-10-191-3/+3
|
* 3520Kartik K. Agaram2016-10-181-1/+0
| | | | | | | | Drop a few debug prints. Hopefully now we need never duplicate trace statements and can instead just dump them to screen. I'll soon need the ability to selectively dump traces for a specific label.
* 3381Kartik K. Agaram2016-09-171-3/+3
|
* 3380Kartik K. Agaram2016-09-171-46/+46
| | | | | One more place we were missing expanding type abbreviations: inside container definitions.
* 3083Kartik K. Agaram2016-07-011-1/+1
|
* 2990Kartik K. Agaram2016-05-201-5/+5
| | | | | | | | | | Standardize quotes around reagents in error messages. I'm still sure there's issues. For example, the messages when type-checking 'copy'. I'm not putting quotes around them because in layer 60 I end up creating dilated reagents, and then it's a bit much to have quotes and (two kinds of) brackets. But I'm sure I'm doing that somewhere..
* 2931 - be explicit about making copiesKartik K. Agaram2016-05-061-1/+1
|
* 2874Kartik K. Agaram2016-04-271-20/+20
| | | | | | Be more consistent that 'return' is the name of the instruction, and 'reply' just a synonym. Maybe I should take it out. It wouldn't affect the recipe/ingredient terminology while I teach..
* 2873 - fix a bug in converting conditional returnsKartik K. Agaram2016-04-271-0/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was an interaction between two transforms. The first turned: return-if ... into: jump-unless ..., 1:offset # skip next instruction return ... The second added an unconditional return at the end of the recipe if it didn't already exist (so that functions always end with a return). However, it was getting confused by the return instructions generated above, which look unconditional but sometimes get skipped. To fix this, conditional returns are now transformed into this: { break-unless ... return ... } Since the final instruction is now no longer a reply (but rather the '}' label), the second transform triggers and adds the unconditional return after it. This commit removes the final place marked 'BUG:' in the codebase yesterday (see commit 2870).
* 2773 - switch to 'int'Kartik K. Agaram2016-03-131-8/+8
| | | | This should eradicate the issue of 2771.
* 2735 - define recipes using 'def'Kartik K. Agaram2016-03-081-17/+17
| | | | | | | | | | | | I'm dropping all mention of 'recipe' terminology from the Readme. That way I hope to avoid further bike-shedding discussions while I very slowly decide on the right terminology with my students. I could be smarter in my error messages and use 'recipe' when code uses it and 'function' otherwise. But what about other words like ingredient? It would all add complexity that I'm not yet sure is worthwhile. But I do want separate experiences for veteran programmers reading about Mu on github and for people learning programming using Mu.
* 2712Kartik K. Agaram2016-02-261-4/+4
|
* 2701 - turn some warnings into errorsKartik K. Agaram2016-02-251-1/+1
| | | | | | | I really have only one warning left: when somebody redefines a function. I think I'm going to just turn that into an error as well and drop the notion of warnings altogether. Anytime we find something wrong we stop running the program. This is a place where hygiene is justified.
* 2685Kartik K. Agaram2016-02-221-1/+1
|
* 2681 - drop reagent types from reagent propertiesKartik K. Agaram2016-02-211-1/+0
| | | | | | | | | | | | | | | | | All my attempts at staging this change failed with this humongous commit that took all day and involved debugging three monstrous bugs. Two of the bugs had to do with forgetting to check the type name in the implementation of shape-shifting recipes. Bug #2 in particular would cause core tests in layer 59 to fail -- only when I loaded up edit/! It got me to just hack directly on mu.cc until I figured out the cause (snapshot saved in mu.cc.modified). The problem turned out to be that I accidentally saved a type ingredient in the Type table during specialization. Now I know that that can be very bad. I've checked the traces for any stray type numbers (rather than names). I also found what might be a bug from last November (labeled TODO), but we'll verify after this commit.
* 2677Kartik K. Agaram2016-02-201-1/+1
| | | | Include type names in the type tree. Though we aren't using them yet.
* 2494Kartik K. Agaram2015-11-281-1/+1
| | | | | Some more structure to transforms, and flattening of dependencies between them.
* 2397Kartik K. Agaram2015-11-081-0/+1
| | | | | Fix that stray issue with a better phase ordering. Another thing I'm not testing.
* 2383 - new concern: idempotence of transformsKartik K. Agaram2015-11-061-1/+1
| | | | | I'd not paid any attention to it so far, but I need to do so from now on.
* 2382Kartik K. Agaram2015-11-061-0/+1
| | | | Starting to leave commented out prints again out of desperation.
* 2377 - stop using operator[] in mapKartik K. Agaram2015-11-061-16/+16
| | | | | | | | | | | | | | | | I'm still seeing all sorts of failures in turning on layer 11 of edit/, so I'm backing away and nailing down every culprit I run into. First up: stop accidentally inserting empty objects into maps during lookups. Commands run: $ sed -i 's/\(Recipe_ordinal\|Recipe\|Type_ordinal\|Type\|Memory\)\[\([^]]*\)\] = \(.*\);/put(\1, \2, \3);/' 0[1-9]* $ vi 075scenario_console.cc # manually fix up Memory[Memory[CONSOLE]] $ sed -i 's/\(Memory\)\[\([^]]*\)\]/get_or_insert(\1, \2)/' 0[1-9]* $ sed -i 's/\(Recipe_ordinal\|Type_ordinal\)\[\([^]]*\)\]/get(\1, \2)/' 0[1-9]* $ sed -i 's/\(Recipe\|Type\)\[\([^]]*\)\]/get(\1, \2)/' 0[1-9]* Now mu dies pretty quickly because of all the places I try to lookup a missing value.
* 2372Kartik K. Agaram2015-11-051-0/+4
|
* 2360Kartik K. Agaram2015-11-041-3/+35
| | | | | | | | | More flailing around trying to come up with the right phase ordering. I've tried to narrow down each transform's constraints wrt transforms in previous layers. One issue that keeps biting me is the Type map containing empty records because of stray [] operations. That's gotta be important.
* 2358 - starting to tackle the phase ordering problemKartik K. Agaram2015-11-041-3/+2
| | | | | | | A new externality is starting to make its presence felt. Until I sort this out it's going to be hard to finish making duplex-list generic.
* 2349Kartik K. Agaram2015-11-021-19/+0
|
* 2348Kartik K. Agaram2015-11-021-5/+5
|
* 2321 - more preparations for static dispatchKartik K. Agaram2015-10-291-29/+22
| | | | | Deduce operation id from name during transform rather than load, so that earlier transforms have a chance to modify the name.
* 2311Kartik K. Agaram2015-10-291-55/+55
|
* 2277 - reagents now have a tree of typesKartik K. Agaram2015-10-251-1/+1
|
* 2258 - separate warnings from errorsKartik K. Agaram2015-10-061-10/+10
| | | | | | | At the lowest level I'm reluctantly starting to see the need for errors that stop the program in its tracks. Only way to avoid memory corruption and security issues. But beyond that core I still want to be as lenient as possible at higher levels of abstraction.
* 2226 - standardize warning formatKartik K. Agaram2015-10-011-2/+2
| | | | | | | | Always show recipe name where error occurred. But don't show internal 'interactive' name for sandboxes, that's just confusing. What started out as warnings are now ossifying into errors that halt all execution. Is this how things went with C and Unix as well?
* 2199 - stop printing numbers in scientific notationKartik K. Agaram2015-09-141-3/+3
| | | | | | | | | | | Turns out the default format for printing floating point numbers is neither 'scientific' nor 'fixed' even though those are the only two options offered. Reading the C++ standard I found out that the default (modulo locale changes) is basically the same as the printf "%g" format. And "%g" is basically the shorter of: a) %f with trailing zeros trimmed b) %e So we'll just do %f and trim trailing zeros.
* 2137Kartik K. Agaram2015-09-031-1/+0
|
* 2095Kartik K. Agaram2015-08-281-2/+0
| | | | | | | | | | | | Finally terminate the experiment of keeping debug prints around. I'm also going to give up on maintaining counts. What we really need is two kinds of tracing: a) For tests, just the domain-specific facts, organized by labels. b) For debugging, just transient dumps to stdout. b) only works if stdout is clean by default. Hmm, I think this means 'stash' should be the transient kind of trace.
* 2075Kartik K. Agaram2015-08-241-0/+16
| | | | Thanks Caleb Couch for bugfixes 2072-2075.
* 2043Kartik K. Agaram2015-08-201-1/+1
| | | | | Traces were changing based on whether I was loading a .mu file with 'main' or not.
* 1962Kartik K. Agaram2015-08-091-2/+2
| | | | Standardize test names.
* 1868 - start using naked literals everywhereKartik K. Agaram2015-07-281-38/+38
| | | | First step to reducing typing burden. Next step: inferring types.
* 1847Kartik K. Agaram2015-07-251-2/+2
|
* 1844 - explicitly end each trace lineKartik K. Agaram2015-07-251-11/+11
| | | | | | | | | More verbose, but it saves trouble when debugging; there's never something you thought should be traced but just never came out the other end. Also got rid of fatal errors entirely. Everything's a warning now, and code after a warning isn't guaranteed to run.
* 1837Kartik K. Agaram2015-07-241-4/+4
| | | | | | Don't die on unbalanced '{'. I won't bother adding more tests for warnings. Suffice it to say that we need to gradually eliminate all asserts that check for illegal mu code.
kkartik.com> 2017-06-15 10:45:03 -0700 committer Kartik K. Agaram <vc@akkartik.com> 2017-06-15 10:45:03 -0700 3907 - standardize test failure messages' href='/akkartik/mu/commit/082scenario_screen.cc?h=hlt&id=3e31f29a5ba176c4a5016d1b2a936e84a6473a71'>3e31f29a ^
dddc384c ^
3f41cca6 ^

e80fd05f ^
b24eb476 ^
8c2d96a9 ^
f46db248 ^
795f5244 ^

8cdfed6a ^


f10584ab ^
795f5244 ^
1326a4ec ^
3e31f29a ^


4cb5b567 ^
1326a4ec ^


1326a4ec ^
5f98a10c ^
f46db248 ^
f7b31a14 ^
f46db248 ^



f10584ab ^
f46db248 ^
795f5244 ^
f46db248 ^

4814bf94 ^

3e31f29a ^


4cb5b567 ^
de49fb42 ^

3f41cca6 ^
3e31f29a ^
dddc384c ^
3f41cca6 ^

f46db248 ^

3f41cca6 ^
3e31f29a ^
3f41cca6 ^

f46db248 ^

3e31f29a ^




6e21584e ^
f46db248 ^



1b76245c ^
f46db248 ^






























de49fb42 ^

8e41a2b8 ^



795f5244 ^
166e3c0d ^



8e41a2b8 ^







23d3a022 ^


















e80fd05f ^
97e2700e ^
e80fd05f ^
6c96a437 ^
795f5244 ^

7b7aa5f6 ^

1326a4ec ^
8e41a2b8 ^
97e2700e ^
8e41a2b8 ^

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458