OscarRodriguezPrieto / ProgQuery

ProgQuery is a system to extract useful syntactic and semantic information from source code programs and store it in a graph database for posterior querying.
MIT License
15 stars 4 forks source link

Adding a feature to get the Control Flow Graph (CFG) using stored information from javac and integrate it in the final graph. #3

Closed OscarRodriguezPrieto closed 6 years ago

OscarRodriguezPrieto commented 7 years ago

Adding a new feature to incorporate a new fundamental data structure into the unified final graph stored in Neo4j:

  1. New edge type called NEXT, to relate statements, each one with the following that will be unconditionally executed.
  2. New edge type called CONDITION, to relate statements with boolean expressions that control the execution of the next statements.
  3. Two new edge types, TRUE and FALSE to relate statements, in the cases where the execution of the following sentences is conditional. (maybe the switch statement is easier with more)
  4. Only one new node type to represent the end of the methods called METHOD_END. Technically its type is STATEMENT (although it is a invisible one) and it is located after the last sentence (even if this sentence is a RETURN).
  5. Two new edge types, ENTRY and EXIT, relating blocks with the starting and the end statement of each method.