module documentation
This implementation provides interface to build CFG(Control Flow Graph) of python files using AST (Abstract Syntax Tree). The CFGBuilder class works by walking through an AST and creating a new block for each statement. The blocks are then linked together by adding exits from one block to another. This implementation is partly adapted from the static cfg project https://github.com/coetaur0/staticfg
| Class | |
Control flow graph builder. |
| Function | invert |
Invert the operation in an ast node object (get its negation). |
| Function | merge |
Merge the exitcases of two Links. |
| Constant | NAMECONSTANT |
Undocumented |
| Variable | is |
Undocumented |
Invert the operation in an ast node object (get its negation).
| Parameters | |
| node | An ast node object. |
| Returns | |
| An ast node object containing the inverse (negation) of the input node. | |
Merge the exitcases of two Links.
| Parameters | |
| exit1 | The exitcase of a Link object. |
| exit2 | Another exitcase to merge with exit1. |
| Returns | |
| The merged exitcases. | |