Hi Tony,
I would like to write a method to get a list of all ancestor paths for a given node in a DAG.
I can see that there some nice new machinery for attributes and relations in Kiama 2.0 but I am not sure exactly where to start.
I would like a method with such a signature:
// collect all the nodes of type T
// and return for each distinct node (given the system hash code)
// a list of all ancestor paths to the root of the graph
def ancestorPaths[T : ClassTag, G](graph: G): Map[T, List[List[Any]]] = ???
- do I need first to traverse the graph to build a Relation?
- can we use attributes for this?
- since there's no Attributable anymore, should I build a Tree first?
Thanks,
Eric.