Skip to content
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

Adapton Logging via Graphmovie #23

Open
kyleheadley opened this issue Mar 14, 2015 · 2 comments
Open

Adapton Logging via Graphmovie #23

kyleheadley opened this issue Mar 14, 2015 · 2 comments

Comments

@kyleheadley
Copy link
Contributor

Logging has been enabled by adding an new module 'Adapton_core_logging' and its wrapper 'Adapton_logging'. Including one of these versions rather than the one without '_logging' will allow adapton to keep track of the internal changes to the dependency graph, and will make memotables accessible.

There are two options for logging. One is to output the entire dependency graph between changes, the other is to output the changes. These can be independent of each other, and also can be interleaved in the output file without issue, as long as previous changes are sent immediately before outputting the whole state.

WARNING: Adapton creates a lot of internal nodes and changes, so viewing them all can be difficult. It's suggested to keep the output file under 5MB. Mergesort_name with 5(!) elements and limited incremental adjustments creates a nice movie.

Adapton handles all the changes internally, requiring only 'Viz.flush_ticks_out outfile' to write changes to a graphmovie file. Writing out the entire graph state to graphmovie hasn't been included in the Viz api at this time, but code to do so can be found in experiments.ml, 'output_graphstate ~label outfile'. You may also want to include the line '[styleselect adapton]' anywhere in the output file to avoid having to choose adapton in the gui.

This solution is not ideal, since changes to adapton_core must be added to adapton_core_logging. However, it is easy enough to generate the directory, which consists of all core files, but with ADAPTON_LOG IFDEFS deleted to leave their 'true' value. A more permanent solution is complicated by internal dependencies and alternate data types.

@kyleheadley
Copy link
Contributor Author

In order to use Spreadtree.ml with logging, the file must be recompiled with 'open Adapton_core_logging' rather than 'open Adapton_core'

@labichn
Copy link
Contributor

labichn commented Aug 6, 2015

Graphmovie was indispensable for debugging the initial implementation, but has been excised during the reorganization for the same reason the logging was. We need a disciplined way to reintroduce it.

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

No branches or pull requests

2 participants