about summary refs log tree commit diff stats
path: root/050scenario.cc
Commit message (Collapse)AuthorAgeFilesLines
* 3273Kartik K. Agaram2016-08-281-0/+1
| | | | | | | | | | | Undo 3272. The trouble with creating a new section for constants is that there's no good place to order it since constants can be initialized using globals as well as vice versa. And I don't want to add constraints disallowing either side. Instead, a new plan: always declare constants in the Globals section using 'extern const' rather than just 'const', since otherwise constants implicitly have internal linkage (http://stackoverflow.com/questions/14894698/why-does-extern-const-int-n-not-work-as-expected)
* 3252Kartik K. Agaram2016-08-251-1/+1
|
* 3247Kartik K. Agaram2016-08-251-4/+4
|
* 3188Kartik K. Agaram2016-08-141-2/+2
|
* 3177Kartik K. Agaram2016-08-131-1/+2
| | | | Systematize all the newlines while displaying test progress.
* 3176Kartik K. Agaram2016-08-131-7/+9
| | | | Don't print the header for 'Mu tests' if there are no Mu tests to run.
* 3175Kartik K. Agaram2016-08-131-1/+0
|
* 3172Kartik K. Agaram2016-08-121-4/+0
| | | | Fix CI.
* 3170 - multiple --options at the commandlineKartik K. Agaram2016-08-121-1/+8
| | | | | | | | The mu commandline now has four parts: options, commands (of which we only have one so far: 'test'), files/directories and ingredients to pass to 'main'. That cleans up the hacky ordering constraint we had earlier. I've also cleaned up the usage message.
* 3169Kartik K. Agaram2016-08-121-15/+19
| | | | | Fix a bug with --test-only-app: the "App tests" header was only printing after some app tests had run.
* 3161Kartik K. Agaram2016-08-091-5/+0
| | | | | | | | | Toss out Scenario_names. It's only checking if we load duplicate scenarios, and we have independent checks for *running* duplicate scenarios. This has the salubrious effect of also allowing lessons to contain regular text scenarios interspersed with their recipes.
* 3137Kartik K. Agaram2016-07-221-0/+9
| | | | | | | | | | | | | | | | | | Complicated logic to not run core tests. I only want to disable core tests if: a) I'm changing CFLAGS on the commandline (usually to disable optimizations, causing tests to run slower in a debug cycle) b) I'm not printing a help message (either with just 'mu' or 'mu --help') c) I'm loading other files besides just the core. Under these circumstances I only want to run tests in the files explicitly loaded at the commandline. This is all pretty hairy, in spite of my attempts to document it in four different places. I might end up taking it all out the first time I need to run core tests under all these conditions.
* 3126Kartik K. Agaram2016-07-221-4/+1
|
* 3122Kartik K. Agaram2016-07-221-16/+4
| | | | More accurate count of failing tests.
* 3120Kartik K. Agaram2016-07-211-1/+1
| | | | | | | | Always show instruction before any transforms in error messages. This is likely going to make some errors unclear because they *need* to show the original instruction. But if we don't have tests for those situations did they ever really work?
* 3118Kartik K. Agaram2016-07-211-2/+2
| | | | | Failures in scenarios should consistently trigger the summary message showing number of failed tests.
* 3115Kartik K. Agaram2016-07-201-10/+10
| | | | Fix CI.
* 3114Kartik K. Agaram2016-07-201-2/+8
| | | | Better error messages on missing traces in Mu scenarios.
* 3108Kartik K. Agaram2016-07-101-1/+3
|
* 3101 - purge .traces/ dir from repo historyKartik K. Agaram2016-07-051-5/+5
| | | | | | | | | | | | | | | | | | | | | I'd been toying with this idea for some time now given how large the repo had been growing. The final straw was noticing that people cloning the repo were having to wait *5 minutes*! That's not good, particularly for a project with 'tiny' in its description. After purging .traces/ clone time drops to 7 seconds in my tests. Major issue: some commits refer to .traces/ but don't really change anything there. That could get confusing :/ Minor issues: a) I've linked inside commits on GitHub like a half-dozen times online or over email. Those links are now liable to eventually break. (I seem to recall GitHub keeps them around as long as they get used at least once every 60 days, or something like that.) b) Numbering of commits is messed up because some commits only had changes to the .traces/ sub-directory.
* 3022Kartik K. Agaram2016-05-271-8/+74
| | | | Clean up 3020.
* 2990Kartik K. Agaram2016-05-201-16/+16
| | | | | | | | | | 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..
* 2987Kartik K. Agaram2016-05-201-0/+699
|
* 2971Kartik K. Agaram2016-05-171-699/+0
| | | | | | Long-overdue reorganization to support general 'dilated' reagents up front. This also allows me to move tests that are really about unrelated layers out of layers dealing with parsing.
* 2965 - update refcounts when copying containersKartik K. Agaram2016-05-151-3/+3
| | | | | | This is hopefully quite thorough. I handle nested containers, as well as exclusive containers that might contain addresses only when the tag has a specific value.
* 2924Kartik K. Agaram2016-05-051-1/+4
|
* 2864 - replace all address:shared with just addressKartik K. Agaram2016-04-241-2/+2
| | | | | | | Now that we no longer have non-shared addresses, we can just always track refcounts for all addresses. Phew!
* 2848Kartik K. Agaram2016-04-201-0/+1
| | | | | | Turns out one of my chessboard tests has been silently deadlocking and therefore not actually checking its results since at least commit 1620 last June.
* 2803Kartik K. Agaram2016-03-211-3/+3
| | | | | Show more thorough information about instructions in the trace, but keep the original form in error messages.
* 2773 - switch to 'int'Kartik K. Agaram2016-03-131-14/+14
| | | | This should eradicate the issue of 2771.
* 2735 - define recipes using 'def'Kartik K. Agaram2016-03-081-18/+18
| | | | | | | | | | | | 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-18/+18
|
* 2709Kartik K. Agaram2016-02-251-2/+1
| | | | | Only Hide_errors when strictly necessary. In other places let test failures directly show the unexpected error.
* 2707Kartik K. Agaram2016-02-251-5/+0
|
* 2704 - eradicate all mention of warnings from coreKartik K. Agaram2016-02-251-5/+4
|
* 2703Kartik K. Agaram2016-02-251-1/+1
|
* 2702Kartik K. Agaram2016-02-251-3/+3
|
* 2700 - fail tests on unexpected errors or warningsKartik K. Agaram2016-02-251-0/+5
|
* 2698Kartik K. Agaram2016-02-241-1/+36
|
* 2685Kartik K. Agaram2016-02-221-2/+1
|
* 2681 - drop reagent types from reagent propertiesKartik K. Agaram2016-02-211-4/+3
| | | | | | | | | | | | | | | | | 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.
* 2685Kartik K. Agaram2016-02-191-1/+1
| | | | | | | | | | | | | | | | Stack of plans for cleaning up replace_type_ingredients() and a couple of other things, from main problem to subproblems: include type names in the type_tree rather than in the separate properties vector make type_tree and string_tree real cons cells, with separate leaf nodes redo the vocabulary for dumping various objects: do we really need to_string and debug_string? can we have a version with *all* information? can we have to_string not call debug_string? This commit nibbles at the edges of the final task, switching from member method syntax to global function like almost everything else. I'm mostly using methods just for STL in this project.
* 2610 - warn when recipes don't use default-spaceKartik K. Agaram2016-01-271-2/+5
| | | | Somehow this never transferred over from the Arc version until now.
* 2579Kartik K. Agaram2016-01-201-0/+8
| | | | Separate core mu tests from those loaded from the commandline.
* 2576 - distinguish allocated addresses from othersKartik K. Agaram2016-01-191-2/+2
| | | | | | | | | | | | | | | | This is the one major refinement on the C programming model I'm planning to introduce in mu. Instead of Rust's menagerie of pointer types and static checking, I want to introduce just one new type, and use it to perform ref-counting at runtime. So far all we're doing is updating new's interface. The actual ref-counting implementation is next. One implication: I might sometimes need duplicate implementations for a recipe with allocated vs vanilla addresses of the same type. So far it seems I can get away with just always passing in allocated addresses; the situations when you want to pass an unallocated address to a recipe should be few and far between.
* 2561Kartik K. Agaram2016-01-171-1/+0
| | | | | Reorganize layers in preparation for a better, more type-safe implementation of first-class and higher-order recipes.
* 2606 - handle cycles inside stashKartik K. Agaram2015-11-291-6/+3
| | | | | | | | | The idea is that to-text-line should truncate blindly past some threshold, even if to-text isn't smart enough to avoid infinite loops. Maybe I should define a 'truncating buffer' which stops once it fills up. That would be an easy way to eliminate all infinite loops in to-text-line.
* 2483 - to-text can now handle listsKartik K. Agaram2015-11-271-2/+2
| | | | | 'append' also implicitly calls 'to-text' unless there's a better variant.
* 2466 - eliminate ':string' from scenariosKartik K. Agaram2015-11-211-3/+6
|
* 2458 - edit/: recipe side free of sandbox errorsKartik K. Agaram2015-11-181-0/+4
| | | | | | | | | This is happening because of our recent generic changes, which trigger some post-processing transforms on all recipes even if we processed them before. We could clear 'interactive' inside 'reload' to avoid this, but random 'run' blocks in scenarios can still pick up errors from sandboxes earlier in a scenario. The right place to clear the 'interactive' recipe is right after we use it, in run_code_end().