about summary refs log tree commit diff stats
Commit message (Collapse)AuthorAgeFilesLines
* 2424Kartik K. Agaram2015-11-102-16/+6
|
* 2423 - describe shape-shifting in html docsKartik K. Agaram2015-11-1085-4094/+7173
|
* 2422 - a bugfix from the last lessonKartik K. Agaram2015-11-101-1/+59
| | | | Thanks Caleb Couch. This one's been on my list for 2 weeks.
* 2421 - 'generic' => 'shape-shifting'Kartik K. Agaram2015-11-103-28/+28
| | | | More evocative, less jargony.
* 2420Kartik K. Agaram2015-11-101-1/+0
|
* 2419Kartik K. Agaram2015-11-102-67/+67
|
* 2418 - start raising errors on generic callsKartik K. Agaram2015-11-102-19/+38
|
* 2417 - support mutable ingredients in headersKartik K. Agaram2015-11-107-52/+96
| | | | | | If a name repeats between ingredients, we raise an error. If a name repeats across ingredients and products, every call should share the same name across the corresponding ingredients and products.
* 2416Kartik K. Agaram2015-11-101-1/+1
|
* 2415 - backfill test for 2396Kartik K. Agaram2015-11-091-0/+15
| | | | This is the last one I can think of.
* 2414 - clear memory leaksKartik K. Agaram2015-11-091-4/+26
|
* 2413 - another backfilled test for 2391Kartik K. Agaram2015-11-094-0/+40
| | | | This time for the support for 'new' that was added in 2393.
* 2412 - backfill test for 2391Kartik K. Agaram2015-11-091-1/+18
| | | | Tiny patch for such a large change, but we do what we can.
* 2411 - backfill test for 2400Kartik K. Agaram2015-11-091-0/+11
|
* 2410Kartik K. Agaram2015-11-091-2/+0
|
* 2409 - stabilize tracesKartik K. Agaram2015-11-091-1/+0
|
* 2407 - bugfix: parsing recipe headersKartik K. Agaram2015-11-092-3/+29
|
* 2406Kartik K. Agaram2015-11-088-80/+49
| | | | | One new issue: the traces for all tests are perturbed by the .mu files we choose to load.
* 2405Kartik K. Agaram2015-11-082-23/+25
|
* 2404 - ah, finally a useful assertionKartik K. Agaram2015-11-083-10/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | And it caught a bug: I mean to always update type names and types in sync. The last month or so I've been getting reluctantly but inexorably converted to the need and value of a type system. First I thought I just need a minimal but rigorous type system to avoid memory corruption and security issues. Now I think I also want it to be expressive enough to be able to express what data different phases in a compiler read and write, and to be able to designate specific fields as 'fully computed' so that we can statically check that phases wait until their data is available. The phase-ordering problem in a compiler is perhaps the canary in the coal-mine for a more general problem: even small changes can dramatically explode the state space if they violate assumptions previously held about the domain. My understanding of when type pointers are null and not null is immeasurably more nuanced today than it was a week ago, but I didn't need the nuance until I introduced generic functions. That initial draft of a hundred lines bumped me up to a much larger state space. How to make it more obvious when something happens that is akin to discovering a new continent, or finding oneself teleported to Jupiter? Assumptions can be implicit or explicit. Perhaps a delete of an assertion should be estimated at 1000 LoC of complexity?
* 2403 - experiment: documenting non-assertionsKartik K. Agaram2015-11-082-2/+2
| | | | | | | Is that like a Maybe type in a type system? No it's more, it captures the wistful longing of several hours spent trying to make an assertion true. Not even by moving my phases relating to the types around could I make this assertion true.
* 2402Kartik K. Agaram2015-11-081-2/+2
|
* 2401Kartik K. Agaram2015-11-082-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I tried to not populate the type at an early stage, and to pull out the type computations for all reagents into a separate transform grouped with but before the other type deduction transforms. But it seemed less readable to not mention types at all in layer 10. So we'll stick with our current approach, but try to be disciplined about grouping all the type transforms together, so that we can reason about whether a pass belongs before or after type deduction. (Doesn't seem rigorous enough for the name 'type inference'.) In particular, static dispatch and specialization of generics (resolve_ambiguous_calls) needs to happen after all type inference has completed, so that the only missing types are the generic type ingredients. In general I've been living in constant fear of the phase-ordering problem. No matter how many tests I write, I can't be sure that there isn't some corner case where my phases will be proven to be in a sub-optimal ordering. When I build the mu compiler in mu I'll want to also use the ability to perform static analyses in mu programs using mu userland capabilities. That would allow me to be sure that no phase writes to some field of reagent after some other purely checking phase reads it. Then all you have to do is be disciplined about not doing checking in mutating phases (which we currently aren't; hello check_or_set_invalid_types). Hmm, but I think this line of thought gives me some confidence now that I'm ok so far. The only field of reagents being modified after parsing/initialization is the type. So all I care about is whether each transform happens before or after all types are available. If I later start writing other fields or properties then I'll need to perform similar analysis for them, and it might get complicated enough to need a state diagram where partially filled out properties inhabit separate states from completely inferred properties.
* 2400 - eliminate last few warningsKartik K. Agaram2015-11-084-14/+21
|
* 2399 - consistent debug_string vocabularyKartik K. Agaram2015-11-0810-87/+83
|
* 2398Kartik K. Agaram2015-11-081-2/+2
|
* 2397Kartik K. Agaram2015-11-085-3/+25
| | | | | Fix that stray issue with a better phase ordering. Another thing I'm not testing.
* 2396 - edit working again!!Kartik K. Agaram2015-11-084-27/+55
| | | | | | | | | | | Still some spurious warnings. This was an insane experience building out generics. Time to reflect. Where did I go wrong? How did I end up writing no tests? Let's take some time and go over the last 50 commits with a fine-tooth comb. Generics seems to be the feature that has moved mu from a VM project to a compiler project.
* 2395 - type ingredients can map to trees of typesKartik K. Agaram2015-11-071-1/+3
|
* 2394 - clean up outputKartik K. Agaram2015-11-074-22/+1
|
* 2393 - redo 2391Kartik K. Agaram2015-11-079-61/+166
| | | | | | | | | | | Got that idea to work with a special-case for 'new'. Requires parsing new's first ingredient, performing the replacement, and then turning it back into a string. I didn't want to replace NEW with ALLOCATE right here, because then it messes with my invariant that transform should never see a naked ALLOCATE. Layer 11 still not working, but everything else is. Let's clean up before we diagnose the new breakage.
* 2392 - undo 2391Kartik K. Agaram2015-11-079-133/+61
| | | | Yup, type ingredients were taking size 1 by default.
* 2391Kartik K. Agaram2015-11-079-59/+133
| | | | | | | | | | | | | No, my idea was abortive. My new plan was to run no transforms for generic recipes, and instead only run them on concrete specializations as they're created. The trouble with this approach is that new contains a type specification in its ingredient which apparently needed to be transformed into an allocate before specialization. But no, how was that working? How was new computing size based on type ingredients? It might have been wrong all along.
* 2390 - undo 2389Kartik K. Agaram2015-11-073-9/+3
| | | | Ooh, I think I see a solution.
* 2389Kartik K. Agaram2015-11-073-3/+9
| | | | | | | | Now we're back to trying to rerunning idempotent transforms on specialized recipes. Still doesn't work, but at least we don't see different results depending on whether the trace is enabled inside the test or right at the start. That got fixed by the more disciplined insertion into maps, looks like.
* 2388 - final layer of edit/ loaded successfullyKartik K. Agaram2015-11-074-41/+62
|
* 2387 - edit/ passing except that final undo layerKartik K. Agaram2015-11-071-0/+2
|
* 2386 - core tests passing againKartik K. Agaram2015-11-072-2/+3
| | | | Layer 1 of edit/ is introducing spurious types, though.
* 2385 - tests passing until layer 58Kartik K. Agaram2015-11-071-2/+7
|
* 2384 - tests pass until layer 54Kartik K. Agaram2015-11-072-1/+4
|
* 2383 - new concern: idempotence of transformsKartik K. Agaram2015-11-0612-14/+14
| | | | | I'd not paid any attention to it so far, but I need to do so from now on.
* 2382Kartik K. Agaram2015-11-0613-13/+68
| | | | Starting to leave commented out prints again out of desperation.
* 2381Kartik K. Agaram2015-11-062-4/+14
|
* 2380 - done loading mu codeKartik K. Agaram2015-11-066-23/+27
| | | | | | | | New assertions still failing during tests. This whole implementation of generic recipes is like an extended spike. I don't have nearly enough tests. Ideally I'd have confidence in generics once layer 59 passed its tests.
* 2379 - further improvements to map operationsKartik K. Agaram2015-11-0619-51/+56
| | | | | | | Commands run: $ sed -i 's/\([^. (]*\)\.find(\([^)]*\)) != [^.]*\.end()/contains_key(\1, \2)/g' 0[^0]*cc $ sed -i 's/\([^. (]*\)\.find(\([^)]*\)) == [^.]*\.end()/!contains_key(\1, \2)/g' 0[^0]*cc
* 2378Kartik K. Agaram2015-11-066-12/+12
| | | | | | Now we're starting to run up against the misbehavior introduced by generics: Type tries to insert rows for type ingredients. That is a no-no.
* 2377 - stop using operator[] in mapKartik K. Agaram2015-11-0645-575/+593
| | | | | | | | | | | | | | | | 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.
* 2376Kartik K. Agaram2015-11-051-7/+7
|
* 2375 - layer 9 doneKartik K. Agaram2015-11-051-6/+5
|
* 2374 - now edit works until layer 8Kartik K. Agaram2015-11-055-83/+73
|