Skip to content

generate execution trees for lsbs #47

Open

Description

@pmrowla

lmgraph supports generating call trees on a broad per LSB file level, but it would be good to actually have trees for LSB command execution.

LMScript.walk() should actually walk a tree (like os.walk), and yield blocks of commands at a time until any conditional or unconditional branch is reached, rather than the current naive search implementation. then the caller can choose which of the branches to actually follow (or none at all).

basically now that we have the text and menu apis, we should be able to generate actual call trees for lsb's, showing the order scripts are actually run, and how branch points work (including both variable/flag based and menu based branching)

Activity

  1. Stefan311 commented on May 9, 2020

    @Stefan311
    Contributor

    This sounds very interesting. The game I have is very complex. They made a kind of open world adventure game in this visual novel engine...

  2. pmrowla commented on May 9, 2020

    @pmrowla
    OwnerAuthor

    @Stefan311 have you tried using lmgraph? you can at least see how the lsb scripts call each other already

  3. pmrowla commented on May 17, 2020

    @pmrowla
    OwnerAuthor

    lmgraph now has two separate sub-commands for generating graphviz DOT syntax graphs

    • lmgraph game works the same as old lmgraph. you pass it ゲームメイン.lsb and it generates a DOT call graph for all the user-generated LSBs in a game.
    • lmgraph lsb generates a DOT execution graph for the commands within an LSB file.

    LMScript.walk() has not been updated to use the new graph functionality yet

    the output DOT files can be converted to viewable formats via graphviz, or in online graphviz viewers

    ex lmgraph lsb output (after converting an output DOT file to png w/graphviz):

    ex-graph1
    ...
    ex-graph2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions