-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Visualize simulations coverage metrics #355
Comments
@melhindi If TLC is run with the PrintCoverage ==
Serialize(<<TLCGet("spec")>>, "Coverage.json", [format |-> "NDJSON", charset |-> "UTF-8", openOptions |-> <<"WRITE", "CREATE", "APPEND">>]) However, unfortunately, the VSCode extension does not currently support the Toolbox’s heatmap feature that you’ve shown in your screenshot. |
@lemmy, thanks; quick follow-up question: Is it correct to assume that Re Heatmap feature: Yes, I know it is currently not supported, but is heatmap part of this Feature/Issue? (I think a heatmap would be useful :) ) |
Yes, you won't need
Glad that you find the heatmap useful! This issue isn't narrowly scoped; the heatmap might very well be part of it. However, nobody has volunteered to implement any of it. |
Simulation is the only viable approach for checking very large specifications. However, evaluating the coverage of simulation remains challenging. Recent TLC improvements (tlaplus/tlaplus@05d7555, tlaplus/tlaplus@f764fbf, tlaplus/tlaplus@52f5445, tlaplus/tlaplus@84ac434, tlaplus/tlaplus@23f7650, tlaplus/tlaplus#897, ...) enable the simulator to generate relevant data with minimal overhead. The data provides detailed statistics, including the frequency of each action during the simulation run. Additionally, it reports the number of distinct states as well as the distinct values observed for each variable. Below is the `TLCGet("stats") output of some spec that has been periodically serialized and appended to a ndjson file:
Using the (serialized) data, users can manually create various statistics and plots to visualize the simulator's coverage (examples of such plots are available at microsoft/CCF#6537 (comment)). An earlier prototype even automatically regenerated the plot during simulation (https://www.youtube.com/watch?v=btikdh4xZQ0). I propose that the TLA+ VSCode extension should automatically generate these plots from the ndjson file and display them, for instance, within the model checking view.
Technology candidates
The text was updated successfully, but these errors were encountered: