about summary refs log tree commit diff stats
path: root/050scenario.cc
Commit message (Collapse)AuthorAgeFilesLines
* 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().
* 2454Kartik K. Agaram2015-11-171-1/+1
| | | | | | Another gotcha uncovered in the process of sorting out the previous commit: I keep using eof() but forgetting that there are two other states an istream can get into. Just never use eof().
* 2379 - further improvements to map operationsKartik K. Agaram2015-11-061-2/+2
| | | | | | | 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
* 2377 - stop using operator[] in mapKartik K. Agaram2015-11-061-17/+17
| | | | | | | | | | | | | | | | 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.
* 2313Kartik K. Agaram2015-10-291-3/+3
|
* 2312Kartik K. Agaram2015-10-291-1/+1
|
* 2283 - represent each /property as a treeKartik K. Agaram2015-10-261-1/+1
|
* 2271 - bugfix: traces cross-contaminating errorsKartik K. Agaram2015-10-191-0/+5
| | | | | | | | | | | | | | | | | | There were several places where we push a call on to a routine without incrementing call-stack depth, which was used to compute the depth at which to trace an instruction. So sometimes you ended up one depth lower than you started a call with. Do this enough times and instructions that should be traced at level 100 end up at level 0 and pop up as errors. Solution: since call-stack depth is only used for tracing, include it in the trace stream and make sure we reset it along with the trace stream. Then catch all places where we forget to increment call-stack depth and make sure we catch such places in the future. When I first ran into this with Caleb I thought there must be some way that we're writing some output into the warnings result. I didn't recognize that the spurious output as part of the trace, just at the wrong level.
* 2258 - separate warnings from errorsKartik K. Agaram2015-10-061-48/+48
| | | | | | | 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.
* 2232Kartik K. Agaram2015-10-011-9/+29
|
* 2226 - standardize warning formatKartik K. Agaram2015-10-011-5/+5
| | | | | | | | 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-6/+6
| | | | | | | | | | | 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.
* 2195Kartik K. Agaram2015-09-141-2/+2
|
* 2137Kartik K. Agaram2015-09-031-1/+0
|
* 2095Kartik K. Agaram2015-08-281-15/+2
| | | | | | | | | | | | 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.
* 2088 - warn on duplicate scenario nameKartik K. Agaram2015-08-281-0/+5
|
* 2067Kartik K. Agaram2015-08-241-1/+1
|
* 2029Kartik K. Agaram2015-08-171-1/+1
|
* 1991 - new primitive to count lines in traceKartik K. Agaram2015-08-131-0/+60
|
* 1990 - extra ingredient for 'trace' depthKartik K. Agaram2015-08-131-13/+13
| | | | Now we can make use of all the depths from 1 to 99.
* 1871Kartik K. Agaram2015-07-281-0/+5
|
* 1868 - start using naked literals everywhereKartik K. Agaram2015-07-281-19/+19
| | | | First step to reducing typing burden. Next step: inferring types.
* 1846Kartik K. Agaram2015-07-251-1/+1
|
* 1845 - never ever redefine the scenario's recipeKartik K. Agaram2015-07-251-2/+19
| | | | | | A couple of times now I've accidentally named a scenario the same thing as a recipe inside it that I define using 'run' or something. The resulting infinite loop is invariably non-trivial to debug.
* 1844 - explicitly end each trace lineKartik K. Agaram2015-07-251-13/+13
| | | | | | | | | 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.
* 1796 - temporarily undo 1795Kartik K. Agaram2015-07-161-1/+1
| | | | | Debugging simulated-screen support is taking too long, and I suddenly have a few higher priorities.