For that you would have to write a (straightforward) compiler that
transformed a fully expanded Racket program into another program (in
that same language), inserting with-continuation-mark expressions
around every subexpression. Run the transformed program. Then, at the
point that you wish to compare with another, you can get the marks and
compare them with another set you got earlier. This won't be a short
function (as Racket is not a toy language), but it will be a
straightforward one; you do not need to cps-convert or
defunctionalize.

We have few transformations along these lines implemented already that
you may wish to look at. The most commonly used one is errortrace and
it is what we use to get the precise stacktraces that DrRacket shows
you. A similar transformation is used to do test coverage and another
to get profiling information. The library is called "errortrace" and
that search key in the docs should provide you with more information.

hth,
Robby


On Fri, Aug 14, 2015 at 6:02 AM, Klaus Ostermann <klaus...@gmail.com> wrote:
> Robby, I think what I want is simple to say:
>
> If I have a Racket program and manually CPS-transform and then 
> defunctionalize it, I would be able to compare and analyze continuations (and 
> normal procedures, for that matter).
>
> I want to be able to do the same without CPS-transforming and 
> defunctionalizing by hand, and I was hoping that there is some way to do that 
> in terms of the continuation machinery in Racket.
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to