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

Potential bug in dot file output #377

Closed
hessammehr opened this issue May 13, 2024 · 3 comments · Fixed by #394
Closed

Potential bug in dot file output #377

hessammehr opened this issue May 13, 2024 · 3 comments · Fixed by #394

Comments

@hessammehr
Copy link
Contributor

The following works seems to work fine for a small number of data points, i.e. (ion ...)s but larger inputs seem to produce dot files that make no sense (see attached test case).

(datatype Obs
    (Ion f64)
    (Combination Obs Obs))

(rule (
        (= child1 (Ion childmz1))
        (= child2 (Ion childmz2))
        (>= childmz1 childmz2)
        (= lhs (Ion parentmz))
        (= delta (- parentmz (+ childmz1 childmz2)))
        (< delta 0.1) (> delta -0.1))
    (
        (union lhs (Combination child1 child2))
    ))

(let ion_0 (Ion 63.167))
; etc.

Egglog invocation

egglog test.egg --to-dot

Expected behaviour

Each Combination node having two child nodes.

Actual behaviour

Some Combination nodes have one or no child nodes. Not a rendering issue afaik, since the .dot file is also missing the necessary edges.

JSON output seems fine.

test_case.txt

@yihozhang
Copy link
Collaborator

Yeah, egglog limits the number of nodes to be rendered: https://github.com/egraphs-good/egglog/blob/main/src/lib.rs#L1539 This prevents the visualization from blowing up, but seems confusing... The interface should probably be more explicit on that (e.g. a question-mark-in-bubble button).

@oflatt
Copy link
Member

oflatt commented May 13, 2024

Related to #368 and problems around the viz. I like the idea of a question mark and a warning

@yihozhang
Copy link
Collaborator

I believe this will be fixed by #394

@yihozhang yihozhang linked a pull request Jul 16, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

3 participants