Skip to content

Obtaining a sub-E-Graph #274

@ViciousDoormat

Description

@ViciousDoormat

Hello,
I was wondering whether there is a way to obtain a sub-E-graph given an E-Graph and a collection of root E-Class IDs

Say we have an E-Graph g representing 2*(2*a) and 4*a

[1] -> 2
[2] -> 4
[3] -> a
[4] -> [1] * [3]
[6] -> [1] * [4], [2] * [3]

Then get_subegraph(g, [4]) gives

[1] -> 2
[3] -> a
[4] -> [1] * [3]

And get_subegraph(g, [2,4]) gives

[1] -> 2
[2] -> 4
[3] -> a
[4] -> [1] * [3]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions