Commit Graph

20 Commits

Author SHA1 Message Date
Kartik Agaram bb1a1ac2b6 5704
Minor tweaks based on feedback from Max Bernstein.
2019-10-19 14:44:54 -07:00
Kartik Agaram 6e1eeeebfb 5485 - promote SubX to top-level 2019-07-27 17:47:59 -07:00
Kartik Agaram 8f97725d00 4252 2018-06-06 08:56:50 -07:00
Kartik K. Agaram 84ca523f03 4061 2017-10-13 21:50:41 -07:00
Kartik K. Agaram 36f616b5c0 4010 2017-10-04 22:38:22 -07:00
Kartik K. Agaram ec99eb7a2a 3966 2017-07-09 14:34:17 -07:00
Kartik K. Agaram 6573fe1f1a 3965 - get rid of the teardown() function
Instead of setup() and teardown() we'll just use a reset() function from
now on, which will bring the machine back to a good state before each
test or run, and also before exit (to avoid memory leaks).
2017-07-09 14:25:48 -07:00
Kartik K. Agaram 6a9d8191df 3557 2016-10-22 16:22:17 -07:00
Kartik K. Agaram 2d05f43cf1 3414 2016-09-24 20:07:42 -07:00
Kartik K. Agaram 4ea9905f00 3297 - run unit tests before scenarios
I've been putting up for some time with the tension between wanting to
show scenarios at the top of the layer even if I want to *run* any unit
tests of sub-components introduced within the layer before them. Turned
out to be an easy fix.

We don't have very many of these, and the unit tests in the early layers
don't compete with any scenarios, so I don't need to mess with them. But
this is a key tool in my toolkit, to be able to decouple presentation
order from run order for tests.

Though now the separate compilation units are again unbalanced; sigh.
2016-09-05 09:30:56 -07:00
Kartik K. Agaram 5f05e954ee 3273
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)
2016-08-28 18:37:57 -07:00
Kartik K. Agaram c7fde8d4e4 3272
Move global constants into their own section since we seem to be having
trouble linking in 'extern const' variables when manually cleaving mu.cc
into separate compilation units.
2016-08-28 17:08:01 -07:00
Kartik K. Agaram 1ba81b0f57 3270
Clean up the Globals section so that we can generate extern declarations
for all globals out using this command after we carve it out into
globals.cc:

  grep ';' globals.cc |perl -pwe 's/[=(].*/;/' |perl -pwe 's/^[^\/# ]/extern $&/' > globals.h

The first perl command strips out initializers. The second prepends
'extern'. This simplistic approach requires each global definition to
lie all on one line.
2016-08-28 15:21:12 -07:00
Kartik K. Agaram 385ff13617 3027 2016-06-02 10:40:06 -07:00
Kartik K. Agaram 5ba4eab4dc 2935 2016-05-07 10:35:13 -07:00
Kartik K. Agaram 8f2496770d 2609 - run $browse-trace on old runs
This is long overdue. Let's see if it gets me using traces more during
debugging.

Though perhaps I'm being too persnickety. These are all valid ways to
debug programs:

a) print directly to screen
b) log, and then dump the log on some condition
c) temporarily print selected log statements directly to screen
d) log, and then browse the log using the zoom interface

For a) to work we need to normally keep prints empty.
For b) to work the log needs to be of some manageable size, where it's
tractable to find interesting features.
d) is the ultimate weapon, but might be slow because it's interactive

c) seems like the ugly case. Should I be trying to avoid it altogether?
Let's try, and see if d) is useable when we want to do c). For simple
cases it's still totally acceptable to just print. If the prints get too
complex to parse, then we move to the zoom interface. Hopefully it'll be
easier because we have to spend less time getting the prints just so.

(Independent of all this, often the best way to make a log manageable so
any of the approaches works: distill the bad behavior down to a test.
But that leads to chicken-and-egg situations where you need to first
understand before you can distill.)
2015-11-29 12:42:04 -08:00
Kartik K. Agaram 455f033836 1342 2015-05-11 10:03:39 -07:00
Kartik K. Agaram be16deb0f9 1330 2015-05-10 12:05:33 -07:00
Kartik K. Agaram c6e1041fa4 1294 2015-05-06 18:37:36 -07:00
Kartik K. Agaram b96af395b9 1276 - make C++ version the default
I've tried to update the Readme, but there are at least a couple of issues.
2015-05-05 21:17:24 -07:00