Go to file
2019-11-13 12:04:54 +01:00
app Let there be light 2019-09-26 23:45:14 +02:00
doc Allow applications to appear in function OR module contexts 2019-10-11 16:55:48 +02:00
ruby Change option name 2019-10-14 22:33:13 +02:00
src Add some tests 2019-11-13 12:04:54 +01:00
test Add some tests 2019-11-13 12:04:54 +01:00
.gitignore Let there be light 2019-09-26 23:45:14 +02:00
BACKLOG.md Add backlog 2019-10-16 21:51:54 +02:00
ChangeLog.md Let there be light 2019-09-26 23:45:14 +02:00
LICENSE Let there be light 2019-09-26 23:45:14 +02:00
package.yaml Add test-case 2019-10-18 22:20:26 +02:00
README.md Change option name 2019-10-14 22:33:13 +02:00
Setup.hs Let there be light 2019-09-26 23:45:14 +02:00
stack.yaml Let there be light 2019-09-26 23:45:14 +02:00

rubyhs

A node is the "fully qualified name" of either 1) a function; or 2) a module. The program should create a reference graph. The reference graph shows which nodes reference other nodes. Treating modules and functions equally allow us to express that a module calls a function as in:

module M
  f
end

as well as the opposite where a function refers to a constant:

def f
  M
end

The program should ensure that references actually correspond to nodes that we know of.

The program should maintain forward edges as well as backwards edges. That way we can both answer the question "Which nodes does this node transitively reference" as well as "which nodes transitively reference this node".

Given a reference graph and a node - called the query - that program should print out a spanning tree rooted at the query node. Cycles should be marked. E.g. like so for two mutually defined nodes a and b:

{
  "a": {
    "b": { "a": "__cycle__" }
  }
}