User loginNavigation |
archivesA Language-Based Approach to Unifying Events and ThreadsA Language-Based Approach to Unifying Events and Threads
The implementation uses the CPS monad in such a way that the final result is a trace, that is, an ordered sequence of function calls. Threading is part of the basic monad implementation, and a scheduler is as simple as a tree traversal function over a queue of traces. Once you have a scheduler, events are obvious. By shapr at 2006-04-28 10:43 | Implementation | Software Engineering | 18 comments | other blogs | 29676 reads
Tom 2.3 ReleasedTom is a pattern matching compiler developed at INRIA. It is This release continues our work on the integration of pattern matching Many applications have been developed in Tom. Among them, lets mention: Tom is a complex compiler which adds powerful constructs to C and This new release contains many improvements and new features: - a new %strategy construct which allows to easilly define strategies that can be combined using strategy primitives a la Stratego (All, One, Repeat, Choice, Innermost, Mu, etc.) - a new %[...]% construct which helps to write cide generators (it is no longer necessary to encode special characters of strings) Tom is available, in open source (GPL/BSD License), from the Tom web page By Antoine Reilles at 2006-04-28 13:05 | LtU Forum | login or register to post comments | other blogs | 6390 reads
First-Class Traces
Some development environments provide a tracer, which allows you to
observe the entering and exiting of function calls[1].
E.g. in Common Lisp you can do:
which could output
As you can see, the macro Thus, continuing the above example, such a `trace' data structure
might roughly resemble
Since I could not find anything about this, I was wondering the
following: are there any languages (or easy ways of implementing it
yourself) that can reify traces as data structures such as above
that you can manipulate? In case you are wondering, there are
potentially many reasons why this might be useful. E.g. one might like
to compare two traces, or store a trace for later, or even consider the
trace itself as a kind of higher-level program (although I have not
investigated this idea in depth).
Note that I am not referring to `stack traces' (a.k.a. `backtraces'). The
stack trace at the execution of location X above might be a structure
resembling
Debuggers usually already provide many ways of manipulating
the stack trace after e.g. a exception or breakpoint (although I do not know
which ones are able to reify it...). Also, as I recall, one
simple way of implementing continuations is copying the stack (which is
part of the continuation) to the heap. So stack traces are not the
issue here, nor are the `traces' as the word is sometimes used in
theoretical computer science (sequences of successive states of some
state transition system).
[1]
It is actually an interesting question what it would mean to trace
operators other than functions, but I did not go into that here. |
Browse archivesActive forum topics |
Recent comments
23 weeks 13 hours ago
23 weeks 17 hours ago
23 weeks 17 hours ago
45 weeks 1 day ago
49 weeks 3 days ago
51 weeks 1 day ago
51 weeks 1 day ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago