Skip to content

Commit

Permalink
Exposes visualizations in CLI and in the web (#186)
Browse files Browse the repository at this point in the history
* First go at graphviz export

* Skip generated names

* Use right hashmap

* Expose graph

* Make graph crate private

* Clippy fixes

* Tidy up string generation

* Add CLI options to output .dot and .svg

* Ignore .DS_Store

* Add ability to run on all tests

* Don't run failing tests

* Fix non primitive builtin sorts

* Fix extracting Sets with eq sort values

* Apply fix for graph

* Fix extracting Sets with eq sort values

* Require arcsort in extract

* Make arcsort required in find_best

* Make makefile iterative

* Add readme description for new CLI commands

* Move graph to its own folder

* clean up module statements

* Remove dead inputs, which removes some duplicates

* Make style closer to e-graph website

* fmt fixes

* Fix wasm build

* Order all e-class nodes in same rank

* Fix docstrings

* Add first working web demo

* fmt

* Make graph fit to box

* Fix performance

* Animate transitions

* Add resetting zoom

* Make primitive nodes have consistent IDs

* Refactor and tidy up

* Use has value to make IDs stable

* Rename to ExportedGraph

* Switch to using macros for graphviz gen to make smaller

* Add ports to differentiate arg positions

* Test graph generation during tests

* Fix graph generation for proofs by showing temp variables

* Clarify cargo req

* Typo

* Add flag for including temp vars

* Revert "Add flag for including temp vars"

e5979fc

* Always skip temporary names

* Switch to grouping all values

* Fix bug in adding container edges

* Start trying to remove duplicate values

* Refactor graphviz export to struct to make ownership clearer

* Add sorts to graphs

* Differentiate styles between e-classes and not

* Add colors to graphs

* fmt

* Separate unit nodes

* Switch to not grouping all equal prim values in cluster

* Ignore cykjson when testing graphs, too long

* Don't include unit nodes, redundant with sort

* Remove displaying sorts for size

* Try reducing size of generated graphviz to reduce memory

* undo making some things public to the crate

* Concentrate nodes

* Revert changes to foreach_tracked_values to fix tests

* Changes node fonts to helvetica

* Try limiting the size of the graphs

* Show ports for missing nodes

* Remove importmap to improve compat

* Fix limiting functions and calls

Previously we were limiting to the first 40 functions, but some of
those functions might have no live values. Now this makes sure to
filter for empty functions

* fmt

* Log result from running program

* Re-add accidentally removed import

* Add back accidentally remove assert

* Revert "Revert changes to foreach_tracked_values to fix tests"

810d8e8

* Save web artifact on build

* Upgrade upload artifact

* Fix warning, dont emit colspan if 0

* Fix edges so they all come from below the node

* Increase nodesep slightly so that long nodes dont touch

* Remove margin on outer graph

* Fix Vec sort registration

Fixes a typo so that the `Vec` sort will register a Vec instead of a Set

* Add vec tests

* Add vec get and length

* Add string concatenation

* Fix vec extract call

* Reduce rank sep slightly

* Add another cluster nesting to increase margin

* Reduce nodesep

* Revert "Reduce nodesep"

4380306

* Add outer cluster label to remove warning

* Add support for tooltips in graphviz

Add the e-class ids to the tooltip in graphviz, to help with debugging
output

* Add support for publicly registering sorts

* Switch to add arcsort and make eval_expr public

* Remove graph code

* Get working with serialize

* Fix graphviz for web

* Remove unused change

* Tidy up export code

* Remove another func tion

* Rename commands to `--to-...` to go with `--to-json`

* bump serialize version

* Fix web demo

* Fix tests

* Format

* Fix typo added to URL

* Add to describe why we upload an artifact
  • Loading branch information
saulshanabrook authored Aug 17, 2023
1 parent bf16e6c commit 6df6513
Show file tree
Hide file tree
Showing 14 changed files with 364 additions and 34 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,25 @@ jobs:
- name: Build
run: make web

# Upload the built website as an artifact, so that runs which are not deployed
# (i.e. other branches and PRs) to Github Pages can be be downloaded
# (https://docs.github.com/en/actions/managing-workflow-runs/downloading-workflow-artifacts)
# and viewed locally.
#
# When Github adds support for PR Github Pages previews
# (https://github.com/orgs/community/discussions/7730)
# this can be removed.
- name: Upload web artifact
uses: actions/upload-artifact@v3
with:
name: www
path: target/www

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
# only actually deploy if pushed to main branch
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: target/www
force_orphan: true
force_orphan: true
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ profile.json
_scratch.egg
/*.egg
*.log
*.dot
*.svg
*.DS_Store

# racket
scripts/compiled
scripts/compiled
Loading

0 comments on commit 6df6513

Please sign in to comment.