Asking help to find tips on JShell source code parsing
Robert Field
robert.field at oracle.com
Thu Aug 24 17:24:49 UTC 2017
Hi,
Right, Snippets give static information and SnippetEvents give execution
results, while, if I am understanding correctly, you are looking for
execution tracing. Execution is in compiled code rather than source,
although it can be tied back to source.
The debugger architecture provides functionality for tracing execution (the
same functionality that is used for single step); Search for demos of
tracing in JDI (there is one that was one of the original demos).
The default execution engine for JShell is built on JDI. The
idk.jshell.spi package provides a Service Provider Interface for
configuring execution engines. The jdk.jshell.execution package provides
execution engines and components. You could start from the default JDI
engine and add tracing feeding to your JavaFX animation.
Enjoy,
Robert
On August 24, 2017 9:37:25 AM Nazzareno Sileno <nazzareno.sileno at gmail.com>
wrote:
> Hi all,
> I'm trying to develop an educational tool that uses Jshell as a programming
> language. The tool must track the source code execution and it must produce
> commands. Commands are the inputs of the JavaFX 3D engine, they are used to
> transfer the minimal set of informations needed to reproduce the animations
> about the running source code. I want to use a consistent metaphor to teach
> the fundamental concepts about the procedural programming and the object
> oriented programming.
> I'm looking for something like a source code parser that I can use to
> extract informations about the execution flow to fill the commands. In
> particular I am interested in reproduce every single: declaration of
> variable, expression evaluation, passing parameters operation, method
> execution and termination, object creation, control flow statement, input
> and output stream.
> Could you suggest a solution to address these issues?
>
> The SnippetEvents are not enought to achieve the goal. They do not track
> every single line of code execution. I need to symulate the source code
> execution step-by-step.
>
>
> --
> Regards
> Nazzareno Sileno
More information about the kulla-dev
mailing list