Opened 15 months ago

Last modified 15 months ago

#6734 new enhancement

Update cmpgraph.pl and entgraph.pl

Reported by: Langbart Owned by:
Priority: If Time Permits Milestone: Backlog
Component: Build & Packages Keywords:
Cc: Patch:

Description (last modified by Langbart)

The cmpgraph.pl was added with [8857] to generate a function call dependency graph as a quick visual overview between simulation components.

The entgraph.pl was added with [2091] as an entity XML inheritance graph generator.

Outdated images can still be seen on Philip Taylor's website:

  • update the scripts, converting to python is preferred
  • since the graph calls will be very complex, the outcome shall be an interactive .html file to then be included in docs.wildfiregames.com therefore it is regularly examined on its functionality

related projects for visualization function calls

hyiltiz - templatesanalyzer

as part of updating templatesanalyzer/unitTables.py with [26403], hyiltiz gave instructions for creating an interactive .html file in the templatesanalyzer/Readme.md

Line 
55### Exploration
56To understand the internal logic, generating a function call dependency graph
57can be helpful by providing a quick visual overview. Use the following code to
58create the function call dependency graph. It is dynamic, and allows quickly
59getting familiarized with the analyzer. Note that you'll need `dot` engine provided
60by the `graphviz` package. You can install `graphviz` using your system's package manager.
61
62 pip3 install pyan3==1.1.1
63 python3 -m pyan unitTables.py --uses --no-defines --colored --grouped --annotated --html > fundeps.html

trompetin17 - UnitAI FSM Graph
  • project to visualize UnitAI calls
  • Source: https://pastebin.com/JG26P2n4
    • esprima would need to be replaced with espree as JavaScript parser
      • esprima had only full support for ECMAScript 2019
      • the UnitAI.js uses Optional chaining "?." (ECMA 2020 feature)
      • the lines with .match(...) need to be protected against undefined
  • Codepen: https://codepen.io/anon/pen/NZyzbb
    • add this to the html part
      <script src="http://d3js.org/d3.v4.min.js"></script>
      
  • related IRC conversations between trompetin17, Stan, wraitii, Vladislav, elexis
    • 29/Jun/19, 30/Jun/19, 01/Jul/19, 2/Jul/19
      # 30/Jun/19
      08:16 < Stan`> Can you make a graph out of it ?
      08:16 < trompetin17> thats the idea :D
      08:16 < trompetin17> Im just extracting the information
      08:16 < trompetin17> and then
      08:16 < trompetin17> use TextUml for Graph for example
      08:17 < trompetin17> or 3djs with Hierarchy
      # 01/Jul/19
      12:51 < wraitii> what's green vs orange?
      12:52 < trompetin17> the number of call
      12:52 < trompetin17> if the line stroke is bigger
      12:52 < trompetin17> means more "setNextState"
      

Attachments (4)

cut_entgraph.png (42.6 KB ) - added by Langbart 15 months ago.
cut_cmpgraph.png (179.8 KB ) - added by Langbart 15 months ago.
unitai_fsm.png (57.1 KB ) - added by Langbart 15 months ago.
temp_calls.png (61.4 KB ) - added by Langbart 15 months ago.

Download all attachments as: .zip

Change History (5)

by Langbart, 15 months ago

Attachment: cut_entgraph.png added

by Langbart, 15 months ago

Attachment: cut_cmpgraph.png added

by Langbart, 15 months ago

Attachment: unitai_fsm.png added

by Langbart, 15 months ago

Attachment: temp_calls.png added

comment:1 by Langbart, 15 months ago

Description: modified (diff)

correct links

Note: See TracTickets for help on using tickets.