As of this issue's creation, the Backend does not handle creating the CFG's yet. In order to remedy that, we need to build a CFG from the message sent to the server. The CFG's should be built in the following manner.
- Generate CFGs for each method.
Problems that need to be handled:
- How do we handle supporting generator methods?
- Generator methods are not in Java so we don't have to support them yet. However, once we do, we'll probably have to add links to an after yield node from the yield node and then from the after yield node to the node after the yield node.
- How do we handle supporting recursive methods?
- We don't. I would like to, but there does not appear to be a clean manner to represent recursive methods using CFGs without much higher level knowledge of static analysis techniques than I currently have. If we are wanting to do so, I'm willing to drill down on learning these things but it will take a lot of time and by the end of it I will functionally be doing compilers research as much as I'm doing AI research.
NOTE: One of the issues with recursive methods and interprocedural control flow graphs is that they are fundamentally infinite in scale and require more knowledge than any non-trivial compiler can guarantee providing. We can handle that cleverly if we define our own special methods for how to traverse and stop in the graph, however, this does not generalize to graph pooling methods for use in GNNs. Now, we may want to define a format that can be used in both GNNs and in our baseline graph embedding methods and if so, I'm ok with that. But it's going to take time and effort.
As of this issue's creation, the Backend does not handle creating the CFG's yet. In order to remedy that, we need to build a CFG from the message sent to the server. The CFG's should be built in the following manner.
Problems that need to be handled:
NOTE: One of the issues with recursive methods and interprocedural control flow graphs is that they are fundamentally infinite in scale and require more knowledge than any non-trivial compiler can guarantee providing. We can handle that cleverly if we define our own special methods for how to traverse and stop in the graph, however, this does not generalize to graph pooling methods for use in GNNs. Now, we may want to define a format that can be used in both GNNs and in our baseline graph embedding methods and if so, I'm ok with that. But it's going to take time and effort.