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

diamonds are not allowed #12

Open
muralikodali opened this issue Apr 4, 2021 · 3 comments
Open

diamonds are not allowed #12

muralikodali opened this issue Apr 4, 2021 · 3 comments

Comments

@muralikodali
Copy link

when i tried to link two tasks , following error occurred :

Couldn't create link (5) -> (3): diamonds are not allowed

my terminal is alacritty ans OS is Arch Linux

@terev
Copy link

terev commented Apr 6, 2021

This seems like a slightly silly limitation considering diamonds are valid in a DAG. Maybe it's a current limitation because of the way the graph is drawn horizontally?

@climech
Copy link
Owner

climech commented Apr 6, 2021

Grit uses multitrees, which are diamond-free by definition. The constraint ensures that the set of all nodes reachable from any node induces a valid tree. Multitrees share some nice properties with regular DAGs (the potential for adding alternate contexts, reusing hierarchies), but unlike DAGs—which can quickly become very complex and hard to read—multitrees can be more easily 'digested' by viewing their induced tree substructures one at a time.

So cross links are fine, but given a tree

[ ] one (1)
 ├──[ ] two (2)
 │   └──[ ] three (3)
 └──[ ] four (4)

creating a link from 1 to 3, or from 4 to 2, is an invalid multitree operation and will result in the "diamonds are not allowed" error.

More on multitrees: http://adrenaline.ucsd.edu/kirsh/Articles/In_Process/MultiTrees.pdf

@terev
Copy link

terev commented Apr 6, 2021

Ok I think I understand. So multitrees are not really meant for representing dependencies? My thinking is because theres often a scenario where two tasks with the same parent may depend on the same child, but this would be invalid since it creates a diamond

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

3 participants