-
Notifications
You must be signed in to change notification settings - Fork 84
Output g2html directly #1752
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
base: master
Are you sure you want to change the base?
Output g2html directly #1752
Conversation
This rolls back to commit 760e44a8f8abe89031109cc5ee8506cafad8fff6.
tried new version, but seems like there is no option to disable the animation
Index (position()) based lookup breaks if XML doesn't contain analyses in same order for each global variable.
…r other analyses For #469.
Somehow broke now and filtered too much.
I've now added syntax highlighting with Pygments, so this now should be able to completely replace g2html. |
I also ran before and after on sv-benchmarks with witness generation disabled and HTML generation enabled: https://goblint.cs.ut.ee/results/267-all-g2html-ocaml-2/table-generator-cmp.table.html. cputime![]() walltime![]() memory![]() |
As seen in extended benchmarks in #1810 (comment), the speedup is even greater when also using multiple cores for parallel GraphViz runs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I also tested this, and everything seems to work.
One minor difference to the old HTML view of the code is that now a trailing empty line of code is not shown anymore. This seems to be an irrelevant detail or maybe an improvement.
I think this is an annoying behavior of OCaml's standard |
Currently for the g2html output Goblint produces:
.dot
files for all function CFGs.Then g2html takes those and does the following:
.dot
files to get.svg
files.This PR shows that we can easily cut out the middle man and get rid of the Java-based g2html altogether by doing the following directly in Goblint:
.dot
files and also running Graphviz on them.The result is almost exactly the same HTML-like results viewing experience.
The only difference is that g2html includes a custom lexer for unpreprocessed C that's used for highlighting code in the g2html file view. This remake doesn't do highlighting, but I don't know if anyone even looks at the file view in g2html.
I think it's a minor loss for what otherwise allows us to get rid of an ancient Java-based component which just wastes time copying XML around and reconstructing liveness information.
Doing the same directly in OCaml means that this output is also available to Goblint installed via opam itself, where otherwise g2html isn't present.
TODO
Remove old single-XML output?Let's keep it for now as as possible fallback for when the new approach does fail.