Skip to content

For fun, I turned on DEBUG... #60

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

Closed
dalejordan opened this issue May 15, 2021 · 5 comments
Closed

For fun, I turned on DEBUG... #60

dalejordan opened this issue May 15, 2021 · 5 comments

Comments

@dalejordan
Copy link

and I noticed a few minor problems:

  • @debug "updated parents " id g.parents[id] in repair! generates an exception because g has no parents field (anymore).
  • @debug(n, " not found in memo") in add! has its arguments reversed.
    I would make a pull request but I'm not sure how to fix the first problem. Still learning how this all works.

I think it might be useful to add some simple statistics gathering about how many adds, merges, etc. are performed;
a less verbose tracing facility than debug would be useful for those wondering how it all really hangs together.

@0x0f0f0f
Copy link
Member

good catch! updated parents have to go directly into repair! since parents are now stored per-enode and not globally in the egraph! would you suggest me any package for defining customizable log levels? never really went deep in logging with julia

@dalejordan
Copy link
Author

I looked more deeply into stdlib Logging and it looks like it's gloriously flexible and almost painless with LoggingExtras.jl addons.
I will put together a prototype for tracing and stats (after I figure out a reasonable UI) for your perusal.

@0x0f0f0f
Copy link
Member

@dalejordan still interested ?

@0x0f0f0f
Copy link
Member

#169

@0x0f0f0f
Copy link
Member

Better debugging now in #177

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

No branches or pull requests

2 participants