[e-lang] Distributed Space-Time Debugging (was: MAC calculation)

Mark Miller e-lang@mail.eros-os.org
Tue, 26 Nov 2002 00:22:57 -0800


--=====================_113588281==_.ALT
Content-Type: text/plain; charset="us-ascii"

At 08:42 PM 11/25/2002 Monday, Mark Miller wrote:
>At 06:21 PM 11/26/2002 Tuesday, Rob Withers wrote:
>>It will be interesting to analyze, and a remote debugging capablity will be
>>critical.[...]
>
>Funny you should mention that.  We just had some interesting victories for 
>distributed debugging of E code.  I hope to explain more about this soon...

But first some history.

<history>

As Chris Hibbert once pointed out to me, the stack-list-view is central to 
those traditional debuggers we like, with one list entry per activation 
frame. An example below is a traditional (Smalltalk-80-like) debugger 
organized in three major panes, where the "^" represents which item in each 
pane is selected (view the following in a fixed width font):

+-------------------------------+-+
|   factorial(1)                +-+ # Stack pane
| ^^factorial(2)^^              +-+ # (with scroll bar)
|   factorial(3)                | |
+-------------------------------+-+
| def factorial(n :int) :int {    | # Source pane
|     if (n <= 0) {               |
|         1                       |
|     } else {                    |
|         n * factorial(n - 1)    |
|     }       ^^^^^^^^^^^^^^^^    |
| }                               |
+-------------+-------------------+
|   factorial |   3               | # Variable pane
| ^^n^^       |                   | # (value of selected variable
+-------------+-------------------+ #  on right)

Back when Dean & I were working together on Joule at Agorics, I became 
worried about how one would debug Joule computation, since Joule is a purely 
asynch-message-oriented model of computation with no call-return stack.  In 
answer, Dean had yet another brilliant idea (when does the guy sleep), which 
he calls "space-time debugging":

In a space-time debugger, you start by replacing the stack pane 
by a causality pane. Rather than a list view, the causality pane uses an 
outline-editor-like tree view.  Each entry still represents an activation 
(what happens when an object receives a message). But in the Joule 
computational model (as with its ancestors Actors and Concurrent Prolog) 
these activation frames are not suspended waiting on each other. Rather, 
these are simply the atomic steps by which computation proceeds. Each 
activation causes other activations by sending messages. The causality graph 
considered purely in these terms therefore forms the tree visualized by the 
tree-view.

In Dean's conception, computation is advanced by a sort of visual pun. As 
the outline is expanded on a particular branch for the first time, the 
debugger advances computation along that path. When you were at the frontier 
of the outline, you were looking at live-but-suspended computation, and so 
could use actual variable values for the variable display. When you selected 
any prior event on the outline, some magic would have to occur to calculate 
what the values of those variables were at that previous time. There were a 
variety of paper designs for how to do this, but they were all hard. (How 
many ways can you spell "determinism"?)

Doug Barnes and the Electric Communities gang brought immediate call-return 
locally-sequential programming together with Joule-like event-send 
programming for the first time in creating Original-E.  Monica Anderson of 
EC did for Original-E the first implementation of a space-time debugger.  
This happened before Original-E specified partially-ordered message delivery 
http://www.erights.org/elib/concurrency/partial-order.html . In Monica's 
debugger, the user could advance computation along any frontier of the 
outline, and could thereby try to make those non-deterministic choices most 
likely to cause a bug to manifest.  Data on the frontier was inspectable as 
in Dean's design, but past activations could not be selected, and so no 
restoration of prior data states needed to happen.

</history>

Even though Original-E combines the two computational models, Monica's 
debugger didn't have a stack view, as stack-oriented debuggers for Java were 
hard, and the existing ones were not pluggable components. Nevertheless, 
what I've dreamt of for E was something like:

+-------------------------------+-+
| - foo <- bar(3)               +-+ # Causality pane
| ^^+ zip <- zap(7)^^           +-+ # (with scroll bar
|   - fnord <- glorp()          | | #  and +/- for outline)
+-------------------------------+-+
| ^^zip <- zap(7)^^             +-+ # Stack pane
|   zippity.dodah()             +-+ # (with scroll bar)
|   foo.bar(3)                  | |
+-------------------------------+-+
| def zippity {                   |
|     to dodah() {                |
|         zip <- zap(x)           |
|         ^^^^^^^^^^^^^           |
|         blah.blah()             |
|         fnord <- glorp()        |
|     }                           |
| }                               |
+-------------+-------------------+
|   fnord     |   7               | # Variable pane
| ^^x^^       |                   | # (value of selected variable
+-------------+-------------------+ #  on right)

The top pane shows that the event started by "foo" receiving the message 
"bar(3)" in turn sent the message "zap(7)" to "zip" and sent "glorp()" to 
"fnord".  The events in which these messages are received are children on 
the "foo <- bar(3)" event. The "+" before "zip <- zap(7)" indicates that 
this part of the outline may be expanded, and that therefore this event 
caused yet other events.

On selecting the "zip <- zap(7)", the Stack pane shows the call stack as it 
was when this event was spawned, ie, when the "zap(7)" message was 
eventually-sent to "zip". "zip <- zap(7)" is therefore at the top of this 
stack, and its causality-parent, "foo <- bar(3)", appears as an immediate 
delivery at the bottom of this stack.

Unfortunately, restoring past data states remains as hard as it ever was, 
and support for deterministic replay seems almost as far off as when I first 
started fantasizing about it. Fortunately, we could get much of the bang for 
very little of the buck.

In rebuilding the event-loop mechanisms for the next release, I paid a lot 
more attention to regaining another piece of technology we had at EC -- 
causality tracing.  Much as Java's Throwables includes a stack trace for 
helping to figure out why something bad happened, EC's causality tracing 
allows one to additionally trace backward through the chain of prior events. 
Instrumentation that allows such looking backwards also allows one to look 
forward, and log the causal chain of events.

For the next release I also rebuilt the interp-loop mechanism for the new 
release, replacing old crufty Java-written thread code (Interp.java) with 
new somewhat-less-crufty E-written event-loop code.  (If you don't what the 
interp-loop mechanism is, don't worry about it.) Unfortunately, the new code 
had a subtle but fatal bug that I couldn't find using IDEA's excellent 
traditional thread-and-stack-oriented debugger, nor could Terry and I find 
the bug in a code review.

Instead, we realized that the causality tracing information could be logged 
and used to produce a post-mortem version of the space-time debugger, but 
without any data state.  I modified the causality tracing mechanism to 
capture both Java and E stack traces (the latter thanks to a suggestion by 
Dean), and to log the E stacks as of the time each message is sent.  Here's 
a sample entry:

=== 2002-11-24T05:05:12.729Z (SendingContext.trace:SendingContext.java:87) DBG
causality:  : 
<Eventual ref> <- run()
--- event: <Vat parsing -.e in <runs in parsing -.e>>:3
--- sent by: <Vat start in <runs in start>>:2
---  @ run/0: <file:/C:/e/src/esrc/org/erights/e/elang/cmd/makeRepl.emaker#:span::126:29::126:30>
---  @ org.erights.e.elang.cmd.makeRepl$makeRepl__C$repl__C$loop_3__C#run/0
---  @ run/0: <file:/C:/e/src/esrc/org/erights/e/elang/cmd/makeRepl.emaker#:span::142:16::142:16>
---  @ org.erights.e.elang.cmd.makeRepl$makeRepl__C$repl__C#run/0
---  @ run/0: <file:/C:/e/src/esrc/org/erights/e/elang/launcher/eLauncherAuthor.emaker#:span::167:20::167:20>
---  @ org.erights.e.elang.launcher.eLauncherAuthor$eLauncherAuthor__C$eLauncher__C$2#run/0

The stack trace was captured at the moment that event #2 in Vat "start" sent 
the inter-vat message that, on delivery, will be event #3 in Vat "parsing". 
The log captures both E source position spans and fully qualified names.

Terry & I then sat down with the logs and a big sheet of paper and hand 
simulated what our fantasy post-mortem debugger would show for this log. The 
computation we were examining involved 3 vats and one non-vat thread, all in 
one JVM. We used the same visualization as above, but used colors to 
distinguish these four contexts. In the process of hand simulating the 
debugger ui, we came to understand the code better, and we found the bug.

Even though all four contexts were in one JVM in this case, I still consider 
this a triumph for distributed debugging. It will be some work to instrument 
CapTP to enable this kind of post-mortem for inter-vat computation, and it 
will take some care to ensure we don't blow security while we do so. But 
given that, this ui design and everything Terry and I experienced while 
simulating it would apply equally well if the vats had been distributed 
among different machines. I am unaware of anything else in the universe that 
gives this level of practical support for building distributed systems.

Besides helping debug, Terry points out that this space-time ui should also 
make it much easier for people to learn E's computational model.


----------------------------------------
Text by me above is hereby placed in the public domain

        Cheers,
        --MarkM

--=====================_113588281==_.ALT
Content-Type: text/html; charset="us-ascii"

<html>
At 08:42 PM 11/25/2002 Monday, Mark Miller wrote:<br>
<blockquote type=cite class=cite cite>At 06:21 PM 11/26/2002 Tuesday, Rob
Withers wrote:<br>
&gt;It will be interesting to analyze, and a remote debugging capablity
will be<br>
&gt;critical.[...]<br><br>
Funny you should mention that.&nbsp; We just had some interesting
victories for <br>
distributed debugging of E code.&nbsp; I hope to explain more about this
soon...</blockquote><br>
But first some history.<br><br>
&lt;history&gt;<br><br>
As Chris Hibbert once pointed out to me, the stack-list-view is central
to <br>
those traditional debuggers we like, with one list entry per activation
<br>
frame. An example below is a traditional (Smalltalk-80-like) debugger
<br>
organized in three major panes, where the &quot;^&quot; represents which
item in each <br>
pane is selected (view the following in a fixed width font):<br><br>
<tt>+-------------------------------+-+<br>
|&nbsp;&nbsp;
factorial(1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+-+ # Stack pane<br>
|
^^factorial(2)^^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+-+ # (with scroll bar)<br>
|&nbsp;&nbsp;
factorial(3)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
| |<br>
+-------------------------------+-+<br>
| def factorial(n :int) :int {&nbsp;&nbsp;&nbsp; | # Source pane<br>
|&nbsp;&nbsp;&nbsp;&nbsp; if (n &lt;= 0)
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|<br>
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|<br>
|&nbsp;&nbsp;&nbsp;&nbsp; } else
{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|<br>
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; n * factorial(n -
1)&nbsp;&nbsp;&nbsp; |<br>
|&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
^^^^^^^^^^^^^^^^&nbsp;&nbsp;&nbsp; |<br>
|
}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|<br>
+-------------+-------------------+<br>
|&nbsp;&nbsp; factorial |&nbsp;&nbsp;
3&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
| # Variable pane<br>
| ^^n^^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
| # (value of selected variable<br>
+-------------+-------------------+ #&nbsp; on right)<br><br>
</tt>Back when Dean &amp; I were working together on Joule at Agorics, I
became <br>
worried about how one would debug Joule computation, since Joule is a
purely <br>
asynch-message-oriented model of computation with no call-return
stack.&nbsp; In <br>
answer, Dean had yet another brilliant idea (when does the guy sleep),
which <br>
he calls &quot;space-time debugging&quot;:<br><br>
In a space-time debugger, you start by replacing the stack pane <br>
by a causality pane. Rather than a list view, the causality pane uses an
<br>
outline-editor-like tree view.&nbsp; Each entry still represents an
activation <br>
(what happens when an object receives a message). But in the Joule <br>
computational model (as with its ancestors Actors and Concurrent Prolog)
<br>
these activation frames are not suspended waiting on each other. Rather,
<br>
these are simply the atomic steps by which computation proceeds. Each
<br>
activation causes other activations by sending messages. The causality
graph <br>
considered purely in these terms therefore forms the tree visualized by
the <br>
tree-view.<br><br>
In Dean's conception, computation is advanced by a sort of visual pun. As
<br>
the outline is expanded on a particular branch for the first time, the
<br>
debugger advances computation along that path. When you were at the
frontier <br>
of the outline, you were looking at live-but-suspended computation, and
so <br>
could use actual variable values for the variable display. When you
selected <br>
any prior event on the outline, some magic would have to occur to
calculate <br>
what the values of those variables were at that previous time. There were
a <br>
variety of paper designs for how to do this, but they were all hard. (How
<br>
many ways can you spell &quot;determinism&quot;?)<br><br>
Doug Barnes and the Electric Communities gang brought immediate
call-return <br>
locally-sequential programming together with Joule-like event-send <br>
programming for the first time in creating Original-E.&nbsp; Monica
Anderson of <br>
EC did for Original-E the first implementation of a space-time
debugger.&nbsp; <br>
This happened before Original-E specified partially-ordered message
delivery <br>
<a href="http://www.erights.org/elib/concurrency/partial-order.html" eudora="autourl">http://www.erights.org/elib/concurrency/partial-order.html</a>
. In Monica's <br>
debugger, the user could advance computation along any frontier of the <br>
outline, and could thereby try to make those non-deterministic choices most <br>
likely to cause a bug to manifest.&nbsp; Data on the frontier was inspectable as <br>
in Dean's design, but past activations could not be selected, and so no <br>
restoration of prior data states needed to happen.<br><br>
&lt;/history&gt;<br><br>
Even though Original-E combines the two computational models, Monica's <br>
debugger didn't have a stack view, as stack-oriented debuggers for Java were <br>
hard, and the existing ones were not pluggable components. Nevertheless, <br>
what I've dreamt of for E was something like:<br><br>
<tt>+-------------------------------+-+<br>
| - foo &lt;- bar(3)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +-+ # Causality pane<br>
| ^^+ zip &lt;- zap(7)^^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +-+ # (with scroll bar<br>
|&nbsp;&nbsp; - fnord &lt;- glorp()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | | #&nbsp; and +/- for outline)<br>
+-------------------------------+-+<br>
| ^^zip &lt;- zap(7)^^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +-+ # Stack pane<br>
|&nbsp;&nbsp; zippity.dodah()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; +-+ # (with scroll bar)<br>
|&nbsp;&nbsp; foo.bar(3)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | |<br>
+-------------------------------+-+<br>
| def zippity {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
|&nbsp;&nbsp;&nbsp;&nbsp; to dodah() {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; zip &lt;- zap(x)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ^^^^^^^^^^^^^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; blah.blah()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fnord &lt;- glorp()&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
|&nbsp;&nbsp;&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
| }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |<br>
+-------------+-------------------+<br>
|&nbsp;&nbsp; fnord&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp; 7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | # Variable pane<br>
| ^^x^^&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | # (value of selected variable<br>
+-------------+-------------------+ #&nbsp; on right)<br><br>
</tt>The top pane shows that the event started by &quot;foo&quot; receiving the message <br>
&quot;bar(3)&quot; in turn sent the message &quot;zap(7)&quot; to &quot;zip&quot; and sent &quot;glorp()&quot; to <br>
&quot;fnord&quot;.&nbsp; The events in which these messages are received are children on <br>
the &quot;foo &lt;- bar(3)&quot; event. The &quot;+&quot; before &quot;zip &lt;- zap(7)&quot; indicates that <br>
this part of the outline may be expanded, and that therefore this event <br>
caused yet other events.<br><br>
On selecting the &quot;zip &lt;- zap(7)&quot;, the Stack pane shows the call stack as it <br>
was when this event was spawned, ie, when the &quot;zap(7)&quot; message was <br>
eventually-sent to &quot;zip&quot;. &quot;zip &lt;- zap(7)&quot; is therefore at the top of this <br>
stack, and its causality-parent, &quot;foo &lt;- bar(3)&quot;, appears as an immediate <br>
delivery at the bottom of this stack.<br><br>
Unfortunately, restoring past data states remains as hard as it ever was, <br>
and support for deterministic replay seems almost as far off as when I first <br>
started fantasizing about it. Fortunately, we could get much of the bang for <br>
very little of the buck.<br><br>
In rebuilding the event-loop mechanisms for the next release, I paid a lot <br>
more attention to regaining another piece of technology we had at EC -- <br>
causality tracing.&nbsp; Much as Java's Throwables includes a stack trace for <br>
helping to figure out why something bad happened, EC's causality tracing <br>
allows one to additionally trace backward through the chain of prior events. <br>
Instrumentation that allows such looking backwards also allows one to look <br>
forward, and log the causal chain of events.<br><br>
For the next release I also rebuilt the interp-loop mechanism for the new <br>
release, replacing old crufty Java-written thread code (Interp.java) with <br>
new somewhat-less-crufty E-written event-loop code.&nbsp; (If you don't what the <br>
interp-loop mechanism is, don't worry about it.) Unfortunately, the new code <br>
had a subtle but fatal bug that I couldn't find using IDEA's excellent <br>
traditional thread-and-stack-oriented debugger, nor could Terry and I find <br>
the bug in a code review.<br><br>
Instead, we realized that the causality tracing information could be logged <br>
and used to produce a post-mortem version of the space-time debugger, but <br>
without any data state.&nbsp; I modified the causality tracing mechanism to <br>
capture both Java and E stack traces (the latter thanks to a suggestion by <br>
Dean), and to log the E stacks as of the time each message is sent.&nbsp; Here's <br>
a sample entry:<br><br>
=== 2002-11-24T05:05:12.729Z (SendingContext.trace:SendingContext.java:87) DBG<br>
causality:&nbsp; : <br>
&lt;Eventual ref&gt; &lt;- run()<br>
--- event: &lt;Vat parsing -.e in &lt;runs in parsing -.e&gt;&gt;:3<br>
--- sent by: &lt;Vat start in &lt;runs in start&gt;&gt;:2<br>
---&nbsp; @ run/0: &lt;<a href="file://C:\e\src\esrc\org\erights\e\elang\cmd\makeRepl.emaker#:span::126:29::126:30" eudora="autourl">file:/C:/e/src/esrc/org/erights/e/elang/cmd/makeRepl.emaker#:span::126:29::126:30</a>&gt;<br>
---&nbsp; @ org.erights.e.elang.cmd.makeRepl$makeRepl__C$repl__C$loop_3__C#run/0<br>
---&nbsp; @ run/0: &lt;<a href="file://C:\e\src\esrc\org\erights\e\elang\cmd\makeRepl.emaker#:span::142:16::142:16" eudora="autourl">file:/C:/e/src/esrc/org/erights/e/elang/cmd/makeRepl.emaker#:span::142:16::142:16</a>&gt;<br>
---&nbsp; @ org.erights.e.elang.cmd.makeRepl$makeRepl__C$repl__C#run/0<br>
---&nbsp; @ run/0: &lt;<a href="file://C:\e\src\esrc\org\erights\e\elang\launcher\eLauncherAuthor.emaker#:span::167:20::167:20" eudora="autourl">file:/C:/e/src/esrc/org/erights/e/elang/launcher/eLauncherAuthor.emaker#:span::167:20::167:20</a>&gt;<br>
---&nbsp; @ org.erights.e.elang.launcher.eLauncherAuthor$eLauncherAuthor__C$eLauncher__C$2#run/0<br><br>
The stack trace was captured at the moment that event #2 in Vat &quot;start&quot; sent <br>
the inter-vat message that, on delivery, will be event #3 in Vat &quot;parsing&quot;. <br>
The log captures both E source position spans and fully qualified names.<br><br>
Terry &amp; I then sat down with the logs and a big sheet of paper and hand <br>
simulated what our fantasy post-mortem debugger would show for this log. The <br>
computation we were examining involved 3 vats and one non-vat thread, all in <br>
one JVM. We used the same visualization as above, but used colors to <br>
distinguish these four contexts. In the process of hand simulating the <br>
debugger ui, we came to understand the code better, and we found the bug.<br><br>
Even though all four contexts were in one JVM in this case, I still consider <br>
this a triumph for distributed debugging. It will be some work to instrument <br>
CapTP to enable this kind of post-mortem for inter-vat computation, and it <br>
will take some care to ensure we don't blow security while we do so. But <br>
given that, this ui design and everything Terry and I experienced while <br>
simulating it would apply equally well if the vats had been distributed <br>
among different machines. I am unaware of anything else in the universe that <br>
gives this level of practical support for building distributed systems.<br><br>
Besides helping debug, Terry points out that this space-time ui should also <br>
make it much easier for people to learn E's computational model.<br><br>
<x-sigsep><p></x-sigsep>
----------------------------------------<br>
Text by me above is hereby placed in the public domain<br><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cheers,<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --MarkM<br>
</html>

--=====================_113588281==_.ALT--