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

Detect cyclic dependencies for calculations #46

Open
MartijnR opened this issue Dec 21, 2018 · 0 comments
Open

Detect cyclic dependencies for calculations #46

MartijnR opened this issue Dec 21, 2018 · 0 comments

Comments

@MartijnR
Copy link
Member

E.g.:

  • node a has calculation b + 1
  • node b has calculation a + 1

Or:

  • node a has calculation b + 1
  • node b has calculation c + 1
  • node c has calculation a + 1

Suggested implementation:

  1. iterate through all calculation expressions to build a map of all calculation nodes with the nodes they reference (using xform._extractNodeReferences).
  2. then, for each calculation, do a recursive check of all dependent nodes (and their dependencies etc)
  3. check if any of the dependencies in 2 is the node itself
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

1 participant